import { Procedure, ProcedureParams, Router, RouterDef } from '@trpc/server'; import type { RootConfig } from '@trpc/server/dist/core/internals/config'; import { TRPC_ERROR_CODE_KEY } from '@trpc/server/rpc'; import { OpenAPIV3 } from 'openapi-types'; import { ZodIssue } from 'zod'; export type OpenApiMethod = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE'; type TRPCMeta = Record; export type OpenApiContentType = 'application/json' | 'application/x-www-form-urlencoded'; export type OpenApiMeta = TMeta & { openapi?: { enabled?: boolean; method: OpenApiMethod; path: `/${string}`; summary?: string; description?: string; protect?: boolean; tags?: string[]; headers?: (OpenAPIV3.ParameterBaseObject & { name: string; in?: 'header'; })[]; contentTypes?: OpenApiContentType[]; }; }; export type OpenApiProcedure = Procedure<'query' | 'mutation', ProcedureParams; }>, any, any, any, any, any, OpenApiMeta>>; export type OpenApiProcedureRecord = Record>; export type OpenApiRouter = Router; }>, any, any>>; export type OpenApiSuccessResponse = D; export type OpenApiErrorResponse = { message: string; code: TRPC_ERROR_CODE_KEY; issues?: ZodIssue[]; }; export type OpenApiResponse = OpenApiSuccessResponse | OpenApiErrorResponse; export {}; //# sourceMappingURL=types.d.ts.map