interface Oas3DefinitionBase { openapi: string; info?: Oas3Info; servers?: Oas3Server[]; paths?: Oas3Paths; components?: T extends Oas3_1Schema ? Oas3_1Components : Oas3Components; security?: Oas3SecurityRequirement[]; tags?: Oas3Tag[]; externalDocs?: Oas3ExternalDocs; } export interface Oas3Definition extends Oas3DefinitionBase { 'x-webhooks'?: Oas3Webhooks; } export interface Oas3_1Definition extends Oas3DefinitionBase { webhooks?: Oas3Webhooks; } export interface Oas3_2Definition extends Oas3_1Definition { $self?: string; tags?: Oas3_2Tag[]; } export interface Oas3Info { title: string; version: string; description?: string; termsOfService?: string; contact?: Oas3Contact; license?: Oas3License; } export interface Oas3Server { url: string; description?: string; variables?: { [name: string]: Oas3ServerVariable; }; name?: string; } export interface Oas3ServerVariable { enum?: string[]; default: string; description?: string; } export interface Oas3Paths { [path: string]: Referenced>; } export interface OasRef { $ref: string; } export type Referenced = OasRef | T; export interface Oas3PathItem { summary?: string; description?: string; get?: Oas3Operation; put?: Oas3Operation; post?: Oas3Operation; delete?: Oas3Operation; options?: Oas3Operation; head?: Oas3Operation; patch?: Oas3Operation; trace?: Oas3Operation; query?: Oas3Operation; additionalOperations?: { [name: string]: Referenced>; }; servers?: Oas3Server[]; parameters?: Array>>; } export interface Oas3XCodeSample { lang: string; label?: string; source: string; } export interface Oas3Operation { tags?: string[]; summary?: string; description?: string; externalDocs?: Oas3ExternalDocs; operationId?: string; parameters?: Array>>; requestBody?: Referenced>; responses: Oas3Responses; callbacks?: { [name: string]: Referenced>; }; deprecated?: boolean; security?: Oas3SecurityRequirement[]; servers?: Oas3Server[]; 'x-codeSamples'?: Oas3XCodeSample[]; 'x-code-samples'?: Oas3XCodeSample[]; 'x-hideTryItPanel'?: boolean; } export interface Oas3Parameter { name: string; in?: Oas3ParameterLocation; description?: string; required?: boolean; deprecated?: boolean; allowEmptyValue?: boolean; style?: Oas3ParameterStyle; explode?: boolean; allowReserved?: boolean; schema?: Referenced; example?: unknown; examples?: { [media: string]: Referenced; }; content?: { [media: string]: Oas3MediaType; }; } export interface Oas3Example { value: unknown; dataValue?: unknown; serializedValue?: string; summary?: string; description?: string; externalValue?: string; } export interface Oas3Xml { nodeType?: 'element' | 'attribute' | 'text' | 'cdata' | 'none'; name?: string; namespace?: string; prefix?: string; attribute?: boolean; wrapped?: boolean; } interface Oas3XSchemaBase { $ref?: string; properties?: { [name: string]: Referenced; }; additionalProperties?: boolean | T; description?: string; default?: unknown; required?: string[]; readOnly?: boolean; writeOnly?: boolean; deprecated?: boolean; format?: string; externalDocs?: Oas3ExternalDocs; discriminator?: Oas3Discriminator; oneOf?: T[]; anyOf?: T[]; allOf?: T[]; not?: T; title?: string; multipleOf?: number; maximum?: number; minimum?: number; maxLength?: number; minLength?: number; pattern?: string; items?: boolean | T; maxItems?: number; minItems?: number; uniqueItems?: boolean; maxProperties?: number; minProperties?: number; enum?: unknown[]; example?: unknown; xml?: Oas3Xml; 'x-tags'?: string[]; } export interface Oas3Schema extends Oas3XSchemaBase { type?: string; exclusiveMaximum?: boolean; exclusiveMinimum?: boolean; nullable?: boolean; } export interface Oas3_1Schema extends Oas3XSchemaBase { $id?: string; $schema?: string; $anchor?: string; $dynamicAnchor?: string; $dynamicRef?: string; $defs?: { [name: string]: Referenced; }; $vocabulary?: { [uri: string]: boolean; }; $comment?: string; type?: string | string[]; examples?: unknown[]; prefixItems?: Oas3_1Schema[]; exclusiveMaximum?: number; exclusiveMinimum?: number; const?: unknown; contains?: Oas3_1Schema; minContains?: number; maxContains?: number; propertyNames?: Oas3_1Schema; if?: Oas3_1Schema; then?: Oas3_1Schema; else?: Oas3_1Schema; dependentRequired?: { [name: string]: string[]; }; dependentSchemas?: { [name: string]: Referenced; }; patternProperties?: { [name: string]: Referenced; }; unevaluatedItems?: boolean | Oas3_1Schema; unevaluatedProperties?: boolean | Oas3_1Schema; contentSchema?: Oas3_1Schema; contentMediaType?: string; contentEncoding?: string; } export interface Oas3Webhooks { [webhook: string]: Referenced>; } export interface Oas3Discriminator { propertyName: string; mapping?: { [name: string]: string; }; defaultMapping?: string; 'x-explicitMappingOnly'?: boolean; } export interface Oas3MediaType { schema?: Referenced; example?: unknown; examples?: { [name: string]: Referenced; }; encoding?: { [field: string]: Oas3Encoding; }; itemSchema?: Referenced; prefixEncoding?: Oas3Encoding[]; itemEncoding?: Referenced>; } export interface Oas3Encoding { contentType: string; headers?: { [name: string]: Referenced>; }; style: Oas3ParameterStyle; explode: boolean; allowReserved: boolean; } export type Oas3ParameterLocation = 'query' | 'querystring' | 'header' | 'path' | 'cookie'; export type Oas3ParameterStyle = 'matrix' | 'label' | 'form' | 'simple' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject'; export interface Oas3RequestBody { description?: string; required?: boolean; content: { [mime: string]: Oas3MediaType; }; } export interface Oas3Responses { [code: string]: Oas3Response; } export interface Oas3Response { description?: string; summary?: string; headers?: { [name: string]: Referenced>; }; content?: { [mime: string]: Oas3MediaType; }; links?: { [name: string]: Referenced; }; } export interface Oas3Link { operationRef?: string; operationId?: string; parameters?: { [name: string]: unknown; }; requestBody?: unknown; description?: string; server?: Oas3Server; } export type Oas3Header = Omit, 'in' | 'name'>; export interface Oas3Callback { [name: string]: Oas3PathItem; } export interface Oas3ComponentsBase { schemas?: { [name: string]: Referenced; }; responses?: { [name: string]: Referenced>; }; parameters?: { [name: string]: Referenced>; }; examples?: { [name: string]: Referenced; }; requestBodies?: { [name: string]: Referenced>; }; headers?: { [name: string]: Referenced>; }; securitySchemes?: { [name: string]: Referenced; }; links?: { [name: string]: Referenced; }; callbacks?: { [name: string]: Referenced>; }; } export interface Oas3_1Components extends Oas3ComponentsBase { pathItems?: { [name: string]: Referenced>; }; } export interface Oas3_2Components extends Oas3_1Components { mediaTypes?: { [name: string]: Referenced>; }; } export interface Oas3Components extends Oas3ComponentsBase { } export type Oas3ComponentName = keyof Oas3ComponentsBase; export interface Oas3SecurityRequirement { [name: string]: string[]; } type SecuritySchemeBase = { description?: string; deprecated?: boolean; [key: `x-${string}`]: unknown; }; export type ApiKeyAuth = { type: 'apiKey'; in: 'query' | 'header' | 'cookie'; name: string; } & SecuritySchemeBase; export type HttpAuth = { type: 'http'; scheme: string; } & SecuritySchemeBase; export type BasicAuth = { type: 'http'; scheme: 'basic'; } & SecuritySchemeBase; export type BearerAuth = { type: 'http'; scheme: 'bearer'; bearerFormat?: string; } & SecuritySchemeBase; export type DigestAuth = { type: 'http'; scheme: 'digest'; } & SecuritySchemeBase; export type MutualTLSAuth = { type: 'mutualTLS'; } & SecuritySchemeBase; export type OAuth2Auth = { type: 'oauth2'; flows: { implicit?: { authorizationUrl: string; scopes: Record; refreshUrl?: string; }; password?: { tokenUrl: string; scopes: Record; refreshUrl?: string; }; clientCredentials?: { tokenUrl: string; scopes: Record; refreshUrl?: string; }; authorizationCode?: { authorizationUrl: string; tokenUrl: string; scopes: Record; refreshUrl?: string; }; deviceAuthorization?: { deviceAuthorizationUrl: string; tokenUrl: string; scopes: Record; refreshUrl?: string; }; }; oauth2MetadataUrl?: string; } & SecuritySchemeBase; export type OpenIDAuth = { type: 'openIdConnect'; openIdConnectUrl: string; } & SecuritySchemeBase; export type Oas3SecurityScheme = ApiKeyAuth | HttpAuth | BasicAuth | BearerAuth | DigestAuth | MutualTLSAuth | OAuth2Auth | OpenIDAuth; export interface Oas3Tag { name: string; description?: string; externalDocs?: Oas3ExternalDocs; 'x-displayName'?: string; } export type Oas3_2Tag = Omit & { kind?: string; parent?: string; summary?: string; }; export interface Oas3ExternalDocs { description?: string; url: string; } export interface Oas3Contact { name?: string; url?: string; email?: string; } export interface Oas3License { name: string; url?: string; } export {}; //# sourceMappingURL=openapi.d.ts.map