/** * This file contains the types for providing automatic type inference * for SDK related method calls that is generated from the OpenAPI spec. * * This file is not needed for the core driver interface to work, but it is * useful for providing type inference for the SDK related method calls. */ import { paths } from "./paths"; export declare type Method = "get" | "post" | "put" | "delete" | "patch"; declare type ExtractMethodTypeWithUndefined
= M extends keyof paths[P] ? paths[P][M] : never; export declare type ExtractMethodType
= Exclude< ExtractMethodTypeWithUndefined
,
undefined
>;
declare type MakeAllRequired = ExtractMethodType extends {
requestBody?: infer ReqBody;
}
? ReqBody extends {
content: {
"application/json": infer R;
};
}
? R | undefined
: undefined
: undefined;
export declare type UncleanedResponseBody = ExtractMethodType extends {
responses: {
200: {
content: {
"application/json": infer R;
};
};
};
}
? R
: unknown;
export declare type RemoveGeneralError = DeepRequireAllFields<
RemoveGeneralError = ExtractMethodType extends {
parameters?: {
query?: infer Q;
};
}
? Q extends object
? Q
: {}
: {};
export declare type PathParam =
| P
| {
path: P;
pathParams: PathParamsObject ;
queryParams?: ExtractQueryParams ;
};
export declare type RequestInitWithInferredBody = Omit ;
};
export declare type RequestInitWithInferredBodyRequired = Omit<
RequestInit,
"body"
> & {
body: RequestBody ;
};
export {};