iya-sts
    Preparing search index...

    The closed sets an administrator's input is held to: the enums the OpenAPI document declares, enforced at the console, the management API's query strings and its bodies.

    A leaf holding the console's register of enums per page and action, and the one refusal sentence all three doors give.

    Index
    • Checks a console form body against what its control is held to.

      An empty value is absent; case is exact.

      Parameters

      • page: string

        the console path

      • action: string

        the form's action value

      • body: any

        the form body

      Returns ClosedCheck

      ok, or the field, value, accepted values and refusal sentence

    • Checks a query string against the enums an operation's query parameters declare.

      Parameters

      • parameters: QueryParameter[]

        the operation's OpenAPI parameters

      • query: any

        the parsed query string

      Returns ClosedCheck

      ok, or the field, value, accepted values and refusal sentence

    • Collects every enum a request schema declares outside anyOf, oneOf and not, following $ref into the components.

      An enum marked x-refused-by-handler is left out.

      Parameters

      • schema: any

        the request schema

      • Optionalcomponents: any

        the document's component schemas

      Returns ClosedField[]

      each enum's path (* for an array's items) and values

    • Lists every registered console control; for the tests.

      Returns { action: string; fields: ClosedField[]; page: string }[]

      the page, action and fields of each

    • Returns the enums a console POST to a page with an action is held to.

      Parameters

      • page: string

        the console path

      • action: string

        the form's action value

      Returns ClosedField[]

      the fields

    • Returns a form body with every value of a repeated field, which the ordinary body parser does not keep.

      Parameters

      • req: any

        the request

      • parsed: any

        the parsed body, returned as is when the body is not form-encoded

      Returns any

      the fields, a repeated one as an array

    • Says whether any control on a console page is registered under an action of its own.

      Parameters

      • page: string

        the console path

      Returns boolean

      true when one is

    • Registers the top-level enums a console form posting action to page is held to.

      Parameters

      • page: string

        the console path the form posts to

      • action: string

        the form's action value

      • fields: ClosedField[]

        the enums, as collect() answers them; only flat fields are kept

      Returns void

    • Returns the refusal sentence: the field, the value, and every value the set accepts.

      Parameters

      • field: string

        the field's name

      • value: unknown

        the value given

      • values: unknown[]

        the values the set accepts

      Returns string

      the sentence