Beignet API reference
    Preparing search index...

    Type Alias HttpContractConfig<TMethod, TPathParams, TQuery, TBody, TResponses, TMeta, TPath, THeaders>

    Plain HTTP contract configuration consumed by server, client, and tooling.

    type HttpContractConfig<
        TMethod extends HttpMethod = HttpMethod,
        TPathParams extends StandardSchema | null = StandardSchema | null,
        TQuery extends StandardSchema | null = StandardSchema | null,
        TBody extends StandardSchema | null = StandardSchema | null,
        TResponses extends ContractResponses = ContractResponses,
        TMeta extends ContractMeta = ContractMeta,
        TPath extends string = string,
        THeaders extends ContractHeaderSchemas = ContractHeaderSchemas,
    > = {
        body: TBody;
        headers?: THeaders;
        kind: "http";
        localName?: string;
        metadata: TMeta;
        method: TMethod;
        name: string;
        namespace?: string;
        path: TPath;
        pathParams: TPathParams;
        query: TQuery;
        responses: TResponses;
    }

    Type Parameters

    Index

    Properties

    body: TBody

    Request body schema.

    headers?: THeaders

    Request header schema or schemas.

    kind: "http"
    localName?: string

    Contract name without the resource namespace.

    metadata: TMeta

    Contract metadata.

    method: TMethod

    HTTP method.

    name: string

    Fully qualified contract name. Contracts created from a namespaced ContractGroup use ${namespace}.${localName}.

    namespace?: string

    Optional resource namespace for contracts created from a ContractGroup.

    path: TPath

    Path template.

    pathParams: TPathParams

    Path parameter schema.

    query: TQuery

    Query parameter schema.

    responses: TResponses

    Response schemas keyed by HTTP status code.