next-api-utils
    Preparing search index...

    Type Alias RequestSchema<RequestBody, QueryParameters, PathParameters>

    An object with Zod schemas for validating a request body, query parameters, and/or path parameters with validateRequest.

    type RequestSchema<
        RequestBody extends z.Schema
        | undefined = never,
        QueryParameters extends z.Schema | undefined = never,
        PathParameters extends z.Schema | undefined = never,
    > = {
        body: never extends RequestBody ? undefined : RequestBody;
        params: never extends PathParameters ? undefined : PathParameters;
        query: never extends QueryParameters ? undefined : QueryParameters;
    }

    Type Parameters

    • RequestBody extends z.Schema | undefined = never
    • QueryParameters extends z.Schema | undefined = never
    • PathParameters extends z.Schema | undefined = never
    Index

    Properties

    Properties

    body: never extends RequestBody ? undefined : RequestBody
    params: never extends PathParameters ? undefined : PathParameters
    query: never extends QueryParameters ? undefined : QueryParameters