next-api-utils
    Preparing search index...

    Type Alias ParsedRequest<RequestBody, QueryParameters, PathParameters>

    Representing a parsed request from validateRequest.

    type ParsedRequest<
        RequestBody = never,
        QueryParameters extends undefined | Record<string, unknown> = never,
        PathParameters extends
            undefined | Record<string, string | string[]> = never,
    > = {
        body: never extends RequestBody ? undefined : RequestBody;
        params: never extends PathParameters ? undefined : PathParameters;
        query: never extends QueryParameters ? undefined : QueryParameters;
    }

    Type Parameters

    • RequestBody = never
    • QueryParameters extends undefined | Record<string, unknown> = never
    • PathParameters extends undefined | Record<string, string | string[]> = never
    Index

    Properties

    Properties

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