import { ZodOpenApiObject, ZodOpenApiPathsObject, type CreateDocumentOptions } from 'zod-openapi'; import type { ContactObject, LicenseObject } from 'openapi3-ts/oas31'; import type { ZodSchema } from 'zod/v4'; import { OpenApiMeta, type OpenAPIObject, OpenApiRouter, type SecuritySchemeObject } from '../types'; export type OpenApiContactObject = ContactObject; export type OpenApiLicenseObject = LicenseObject; export interface GenerateOpenApiDocumentOptions> { title: string; description?: string; version: string; contact?: OpenApiContactObject; license?: OpenApiLicenseObject; openApiVersion?: ZodOpenApiObject['openapi']; baseUrl: string; docsUrl?: string; tags?: string[]; securitySchemes?: Record; paths?: ZodOpenApiPathsObject; /** * Optional filter function to include/exclude procedures from the generated OpenAPI document. * * The function receives a context object with the procedure's metadata as `ctx.metadata`. * Return `true` to include the procedure, or `false` to exclude it from the OpenAPI output. * * @example * filter: ({ metadata }) => metadata.isPublic === true */ filter?: (ctx: { metadata: { openapi: NonNullable; } & TMeta; }) => boolean; /** * Optional object containing Zod schemas to be included in the OpenAPI document's components/schemas section. * * @example * defs: { * UserSchema: z.object({ id: z.string(), name: z.string() }), * ProductSchema: z.object({ id: z.string(), price: z.number() }) * } */ defs?: Record; /** * Options forwarded to `zod-openapi`'s `createDocument`, such as `override` * for custom scalar schemas. Optional: when omitted, the previous behavior * is unchanged. */ options?: CreateDocumentOptions; } export declare const generateOpenApiDocument: >(appRouter: OpenApiRouter, opts: GenerateOpenApiDocumentOptions) => OpenAPIObject; //# sourceMappingURL=index.d.ts.map