OptionalclientThe client origin requirement for this route. If this is undefined or omitted, the api's
overall client origin requirement is fallen back to.
OptionalsearchSearch params that this route supports.
Omit or set to undefined to disable search params checking (the route will then accept
arbitrary search params on the URL without validation).
Set to an object to declare the search params this route expects. Each key's value picks how the search param value is parsed and validated:
Shape whose runtime type is a single string (e.g. defineShape('')): the URL must carry
exactly one occurrence of the key.Shape whose runtime type is string[] (e.g. defineShape([''])): the URL must carry one
or more occurrences. A single occurrence is auto-wrapped into a one-element array.Shape whose runtime type is string | string[]: both URL forms are accepted. The value
is passed through as-is.RegExp: the URL must carry exactly one occurrence. The value is tested against the
regex.RegExp (e.g. [/^\d+$/, /^[a-z]+$/]): the URL must carry one or more
occurrences. Each value must match at least one of the supplied regexes (any regex in
the array may match. The position of the regex in the array is not significant).Whether a key is required is driven by its shape: a non-nullable shape is required, a
nullable shape (e.g. nullableShape(...)) is optional. RegExp requirements are always
required. See RouteSearchParamsType for the derived TypeScript type.
Package
@rest-vir/api