import type { OpenapiV3 } from '@skyleague/therefore'; import type { JsonSchema } from '@skyleague/therefore/src/json.js'; import type { Components, Info, Reference, Schema } from '@skyleague/therefore/src/types/openapi.type.js'; import type { SecurityRequirement, SecurityRequirements } from '../../events/apigateway/types.js'; import type { GenericParser } from '../../parsers/types.js'; interface JsonSchemaContext { openapi: OpenapiV3; id: (object: JsonSchema) => string; } export declare function genericJsonSchema(parser: T | undefined | null, suggestedName: string): Promise | JsonSchema | undefined; export declare function jsonptrToName(ptr: string): string; export declare function addComponent({ ctx, schema, name, jsonptrs, referenceToName, ptrToReference, sanitize, }: { ctx: JsonSchemaContext; schema: JsonSchema | Schema; name?: string; jsonptrs: Record; referenceToName: Record; ptrToReference: Record; sanitize?: boolean; }): string; export declare function ensureTarget({ ctx, ptr, target, schema, referenceToName, ptrToReference, }: { ctx: JsonSchemaContext; ptr: string; target: 'parameters' | 'requestBodies' | 'responses' | 'schemas'; schema: JsonSchema; referenceToName: Record; ptrToReference: Record; }): void; export declare function normalizeSecurity(security: SecurityRequirements | undefined): SecurityRequirement[] | undefined; export declare function normalizeSchema({ ctx, schema, components, jsonptrs, referenceToName, ptrToReference, target, defsOnly, }: { ctx: JsonSchemaContext; schema: JsonSchema | Reference | Schema; target?: 'parameters' | 'requestBodies' | 'responses' | 'schemas'; defsOnly?: boolean; components: Components; jsonptrs: Record; referenceToName: Record; ptrToReference: Record; }): JsonSchema | Reference; export interface OpenapiOptions extends Partial { openapi?: '3.0.1' | '3.1.0'; info: Info; defaultError?: Schema; } export declare function openapiFromHandlers(handlers: Record, options: OpenapiOptions): Promise; export {};