@hungr/types
    Preparing search index...

    Module Common

    Building blocks shared by every resource: the server-set base fields, pagination, and the error response.

    Base

    Fields the server sets on every resource.

    PaginationQuery

    Query parameters that page through a list endpoint.

    ErrorCode

    Machine-readable error code. VALIDATION_ERROR is 400, UNAUTHENTICATED 401, FORBIDDEN 403, NOT_FOUND 404, CONFLICT 409 and INTERNAL 500.

    ErrorResponse

    Body of every error response.

    BaseSchema

    Fields the server sets on every resource.

    money

    An integer number of NZD cents, e.g. 1500 = $15.00. Give each field its own .meta({ description }).

    csv

    A comma-separated query parameter, parsed into an array: "Chinese,Thai" becomes ["Chinese", "Thai"]. Give each field its own .meta({ description }).

    PaginationQuerySchema

    Query parameters that page through a list endpoint.

    ErrorCodeSchema

    Machine-readable error code. VALIDATION_ERROR is 400, UNAUTHENTICATED 401, FORBIDDEN 403, NOT_FOUND 404, CONFLICT 409 and INTERNAL 500.

    ErrorResponseSchema

    Body of every error response.

    paginated

    Wraps an item schema in a list response. Give the result its own .meta({ id, description }).