import type { HttpRouter } from '../http'; import type { BaseAppConfig } from '../app'; import type { TypeAnnotation } from '../reflection'; export type ApiName = TypeAnnotation<'openapi:name', T>; export type ApiType = T & ApiName; export type ApiResponse = Promise; export interface OpenApiSerializableApp { readonly router: HttpRouter; readonly config: BaseAppConfig; } export interface OpenApiDocument { openapi: '3.1.0'; jsonSchemaDialect?: string; info: { title: string; version: string; }; paths: Record; components?: { schemas?: Record; securitySchemes?: Record; }; } export type OpenApiPathItem = Partial>; export type OpenApiHttpMethod = 'get' | 'post' | 'put' | 'patch' | 'delete' | 'options' | 'head'; export interface OpenApiOperation { operationId: string; tags?: string[]; summary?: string; parameters?: OpenApiParameter[]; requestBody?: OpenApiRequestBody; responses: Record; security?: Array>; } export interface OpenApiParameter { name: string; in: 'path' | 'query' | 'header'; required?: boolean; description?: string; schema: OpenApiSchemaObject | OpenApiReferenceObject; } export interface OpenApiRequestBody { required?: boolean; content: Record; } export interface OpenApiMediaType { schema: OpenApiSchemaObject | OpenApiReferenceObject; encoding?: Record; } export interface OpenApiResponse { description: string; headers?: Record; content?: Record; } export interface OpenApiReferenceObject { $ref: string; } export interface OpenApiDiscriminatorObject { propertyName: string; mapping?: Record; } export interface OpenApiSchemaObject { type?: string | string[]; format?: string; enum?: unknown[]; const?: unknown; description?: string; properties?: Record; required?: string[]; items?: OpenApiSchemaObject | OpenApiReferenceObject; additionalProperties?: boolean | OpenApiSchemaObject | OpenApiReferenceObject; oneOf?: Array; anyOf?: Array; allOf?: Array; discriminator?: OpenApiDiscriminatorObject; not?: OpenApiSchemaObject | OpenApiReferenceObject; minLength?: number; maxLength?: number; pattern?: string; minimum?: number; exclusiveMinimum?: number; maximum?: number; exclusiveMaximum?: number; [extension: `x-${string}`]: unknown; } //# sourceMappingURL=types.d.ts.map