@scalar/types
Version:
Types to work with Scalar packages
765 lines • 39.1 kB
TypeScript
/**
* This file is autogenerated. Do not edit it.
*
* Generated at: 2026-05-21T19:13:38.253Z
*/
export type AsyncApiContactObject = {
/** The identifying name of the contact person/organization. */
name?: string;
/** The URL pointing to the contact information. This MUST be in the form of an absolute URL. */
url?: string;
/** The email address of the contact person/organization. */
email?: string;
};
export type AsyncApiLicenseObject = {
/** REQUIRED. The license name used for the API. */
name: string;
/** A URL to the license used for the API. This MUST be in the form of an absolute URL. */
url?: string;
};
/** JSON Reference for AsyncAPI components. */
export type AsyncApiReferenceObject = {
/** REQUIRED. The reference string. */
$ref: string;
};
export type ReferenceObjectExtensions = {
/** Indicates the current status of the reference resolution. Can be either 'loading' while fetching the reference or 'error' if the resolution failed. */
$status?: 'loading' | 'error';
/** Indicates whether this reference should be resolved globally across all documents, rather than just within the current document context. */
$global?: boolean;
};
export type AsyncApiExternalDocumentationObject = {
/** A short description of the target documentation. CommonMark syntax MAY be used for rich text representation. */
description?: string;
/** REQUIRED. The URL for the target documentation. This MUST be in the form of an absolute URL. */
url: string;
};
export type AsyncApiTagObject = {
/** REQUIRED. The name of the tag. */
name: string;
/** A short description for the tag. CommonMark syntax MAY be used for rich text representation. */
description?: string;
externalDocs?: AsyncApiExternalDocumentationObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiExternalDocumentationObject;
} & ReferenceObjectExtensions);
};
/** A list of Tag Objects (entries MAY be Reference Objects). */
export type AsyncApiTagsObject = (AsyncApiTagObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiTagObject;
} & ReferenceObjectExtensions))[];
export type AsyncApiInfoObject = {
/** REQUIRED. The title of the application. */
title: string;
/** REQUIRED. Provides the version of the application API (not to be confused with the AsyncAPI Specification version). */
version: string;
/** A short description of the application. CommonMark syntax MAY be used for rich text representation. */
description?: string;
/** A URL to the Terms of Service for the API (absolute URL). */
termsOfService?: string;
contact?: AsyncApiContactObject;
license?: AsyncApiLicenseObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiLicenseObject;
} & ReferenceObjectExtensions);
/** A list of Tag Objects (entries MAY be Reference Objects). */
tags?: AsyncApiTagsObject;
externalDocs?: AsyncApiExternalDocumentationObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiExternalDocumentationObject;
} & ReferenceObjectExtensions);
};
export type AsyncApiServerVariableObject = {
/** An enumeration of string values for substitution. */
enum?: string[];
/** The default value to use for substitution, and to send, if an alternate value is not supplied. */
default?: string;
/** An optional description for the server variable. CommonMark syntax MAY be used for rich text representation. */
description?: string;
/** Examples of the server variable. */
examples?: string[];
};
export type AsyncApiOAuthFlowObject = {
/** REQUIRED for implicit and authorizationCode flows. The authorization URL (absolute URL). */
authorizationUrl?: string;
/** REQUIRED for password, clientCredentials, and authorizationCode flows. The token URL (absolute URL). */
tokenUrl?: string;
/** The URL to be used for obtaining refresh tokens. This MUST be in the form of an absolute URL. */
refreshUrl?: string;
/** REQUIRED for OAuth2 flows. Map of scope name to a short description. */
availableScopes?: Record<string, string>;
};
export type AsyncApiOAuthFlowsObject = {
implicit?: AsyncApiOAuthFlowObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiOAuthFlowObject;
} & ReferenceObjectExtensions);
password?: AsyncApiOAuthFlowObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiOAuthFlowObject;
} & ReferenceObjectExtensions);
clientCredentials?: AsyncApiOAuthFlowObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiOAuthFlowObject;
} & ReferenceObjectExtensions);
authorizationCode?: AsyncApiOAuthFlowObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiOAuthFlowObject;
} & ReferenceObjectExtensions);
};
export type AsyncApiSecuritySchemeObject = {
/** REQUIRED. Security scheme type: userPassword, apiKey, X509, symmetricEncryption, asymmetricEncryption, httpApiKey, http, oauth2, openIdConnect, plain, scramSha256, scramSha512, gssapi. */
type: 'userPassword' | 'apiKey' | 'X509' | 'symmetricEncryption' | 'asymmetricEncryption' | 'httpApiKey' | 'http' | 'oauth2' | 'openIdConnect' | 'plain' | 'scramSha256' | 'scramSha512' | 'gssapi';
/** A short description for security scheme. CommonMark syntax MAY be used for rich text representation. */
description?: string;
/** REQUIRED for httpApiKey. The name of the header, query or cookie parameter. */
name?: string;
/** REQUIRED for apiKey and httpApiKey. Location of the API key: user, password, query, header, or cookie. */
in?: 'user' | 'password' | 'query' | 'header' | 'cookie';
/** REQUIRED for http. The name of the HTTP Authorization scheme to be used in the Authorization header. */
scheme?: string;
/** A hint to the client to identify how the bearer token is formatted. */
bearerFormat?: string;
flows?: AsyncApiOAuthFlowsObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiOAuthFlowsObject;
} & ReferenceObjectExtensions);
/** REQUIRED for openIdConnect. OpenId Connect URL to discover OAuth2 configuration values (absolute URL). */
openIdConnectUrl?: string;
/** List of the needed scope names for oauth2 and openIdConnect. */
scopes?: string[];
};
/** JSON Schema Draft 07 compatible schema (boolean true/false or object); see AsyncAPI Schema Object. */
export type AsyncApiSchemaObject = unknown;
export type AsyncApiSchemaJsonShape = true | false | AsyncApiSchemaObject;
/** AsyncAPI WebSocket binding for handshake method, query, and headers. */
export type AsyncApiWsBindingObject = {
/** HTTP method used when establishing the WebSocket connection (typically GET). */
method?: 'GET' | 'POST';
/** Schema Object describing WebSocket handshake query parameters (type object with properties). May be a Reference Object. */
query?: AsyncApiSchemaJsonShape | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiSchemaJsonShape;
} & ReferenceObjectExtensions);
/** Schema Object describing HTTP headers sent during the WebSocket handshake (type object with properties). May be a Reference Object. */
headers?: AsyncApiSchemaJsonShape | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiSchemaJsonShape;
} & ReferenceObjectExtensions);
/** Version of the WebSocket binding. When omitted, "latest" is assumed per the binding spec. */
bindingVersion?: string;
};
/** Map describing protocol-specific definitions for a server (AsyncAPI 3.1.0). */
export type AsyncApiServerBindingsObject = {
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
http?: unknown;
/** AsyncAPI WebSocket binding for handshake method, query, and headers. */
ws?: AsyncApiWsBindingObject;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
kafka?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
anypointmq?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
amqp?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
amqp1?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
mqtt?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
mqtt5?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
nats?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
jms?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
sns?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
solace?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
sqs?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
stomp?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
redis?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
mercure?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
ibmmq?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
googlepubsub?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
pulsar?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
ros2?: unknown;
};
export type AsyncApiServerObject = {
/** REQUIRED. The server host name. It MAY include the port. Supports Server Variables in {braces}. */
host: string;
/** REQUIRED. The protocol this server supports for connection. */
protocol: string;
/** The version of the protocol used for connection (for example 0-9-1 for AMQP). */
protocolVersion?: string;
/** The path to a resource in the host. Supports Server Variables in {braces}. */
pathname?: string;
/** An optional string describing the server. CommonMark syntax MAY be used for rich text representation. */
description?: string;
/** A human-friendly title for the server. */
title?: string;
/** A short summary of the server. */
summary?: string;
/** Map between a variable name and its Server Variable Object or Reference Object. */
variables?: Record<string, AsyncApiServerVariableObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiServerVariableObject;
} & ReferenceObjectExtensions)>;
/** Alternative security schemes for this server; only one of the security scheme objects need to be satisfied. */
security?: (AsyncApiSecuritySchemeObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiSecuritySchemeObject;
} & ReferenceObjectExtensions))[];
/** A list of Tag Objects (entries MAY be Reference Objects). */
tags?: AsyncApiTagsObject;
externalDocs?: AsyncApiExternalDocumentationObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiExternalDocumentationObject;
} & ReferenceObjectExtensions);
bindings?: AsyncApiServerBindingsObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiServerBindingsObject;
} & ReferenceObjectExtensions);
};
/** Map of server name to Server Object or Reference Object. */
export type AsyncApiServersObject = Record<string, AsyncApiServerObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiServerObject;
} & ReferenceObjectExtensions)>;
export type AsyncApiMultiFormatSchemaObject = {
/** Media type identifying the schema format. When omitted, defaults to the AsyncAPI JSON Schema vocabulary for the document version. */
schemaFormat?: string;
/** REQUIRED. Schema definition in the format given by schemaFormat. */
schema: unknown;
};
export type AsyncApiMultiFormatSchemaOrSchemaObject = AsyncApiMultiFormatSchemaObject | AsyncApiSchemaJsonShape;
export type AsyncApiCorrelationIdObject = {
/** An optional description of the identifier. CommonMark syntax MAY be used for rich text representation. */
description?: string;
/** REQUIRED. A runtime expression that specifies the location of the correlation ID. */
location: string;
};
/** Map describing protocol-specific definitions for a message (AsyncAPI 3.1.0). */
export type AsyncApiMessageBindingsObject = {
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
http?: unknown;
/** AsyncAPI WebSocket binding for handshake method, query, and headers. */
ws?: AsyncApiWsBindingObject;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
kafka?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
anypointmq?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
amqp?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
amqp1?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
mqtt?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
mqtt5?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
nats?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
jms?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
sns?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
solace?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
sqs?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
stomp?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
redis?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
mercure?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
ibmmq?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
googlepubsub?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
pulsar?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
ros2?: unknown;
};
export type AsyncApiMessageExampleObject = {
/** Example headers; MUST validate against the Message Object headers field when present. */
headers?: Record<string, unknown>;
/** Example payload; MUST validate against the Message Object payload field when present. */
payload?: unknown;
/** A machine-friendly name. */
name?: string;
/** A short summary of what the example is about. */
summary?: string;
};
export type AsyncApiMessageTraitObject = {
headers?: AsyncApiMultiFormatSchemaOrSchemaObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiMultiFormatSchemaOrSchemaObject;
} & ReferenceObjectExtensions);
correlationId?: AsyncApiCorrelationIdObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiCorrelationIdObject;
} & ReferenceObjectExtensions);
/** The content type to use when encoding/decoding a message payload (for example application/json). */
contentType?: string;
/** A machine-friendly name for the message. */
name?: string;
/** A human-friendly title for the message. */
title?: string;
/** A short summary of what the message is about. */
summary?: string;
/** A verbose explanation of the message. CommonMark syntax MAY be used for rich text representation. */
description?: string;
/** A list of Tag Objects (entries MAY be Reference Objects). */
tags?: AsyncApiTagsObject;
externalDocs?: AsyncApiExternalDocumentationObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiExternalDocumentationObject;
} & ReferenceObjectExtensions);
bindings?: AsyncApiMessageBindingsObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiMessageBindingsObject;
} & ReferenceObjectExtensions);
examples?: (AsyncApiMessageExampleObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiMessageExampleObject;
} & ReferenceObjectExtensions))[];
};
export type AsyncApiMessageObject = {
headers?: AsyncApiMultiFormatSchemaOrSchemaObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiMultiFormatSchemaOrSchemaObject;
} & ReferenceObjectExtensions);
payload?: AsyncApiMultiFormatSchemaOrSchemaObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiMultiFormatSchemaOrSchemaObject;
} & ReferenceObjectExtensions);
correlationId?: AsyncApiCorrelationIdObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiCorrelationIdObject;
} & ReferenceObjectExtensions);
/** The content type to use when encoding/decoding a message payload (for example application/json). */
contentType?: string;
/** A machine-friendly name for the message. */
name?: string;
/** A human-friendly title for the message. */
title?: string;
/** A short summary of what the message is about. */
summary?: string;
/** A verbose explanation of the message. CommonMark syntax MAY be used for rich text representation. */
description?: string;
/** A list of Tag Objects (entries MAY be Reference Objects). */
tags?: AsyncApiTagsObject;
externalDocs?: AsyncApiExternalDocumentationObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiExternalDocumentationObject;
} & ReferenceObjectExtensions);
bindings?: AsyncApiMessageBindingsObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiMessageBindingsObject;
} & ReferenceObjectExtensions);
examples?: (AsyncApiMessageExampleObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiMessageExampleObject;
} & ReferenceObjectExtensions))[];
traits?: (AsyncApiMessageTraitObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiMessageTraitObject;
} & ReferenceObjectExtensions))[];
};
/** Map of messageId to Message Object or Reference Object. */
export type AsyncApiMessagesObject = Record<string, AsyncApiMessageObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiMessageObject;
} & ReferenceObjectExtensions)>;
export type AsyncApiParameterObject = {
/** An enumeration of string values for substitution. */
enum?: string[];
/** The default value to use for substitution, and to send, if an alternate value is not supplied. */
default?: string;
/** An optional description for the parameter. CommonMark syntax MAY be used for rich text representation. */
description?: string;
/** Examples of the parameter value. */
examples?: string[];
/** A runtime expression that specifies the location of the parameter value. */
location?: string;
};
/** Map of parameter name to Parameter Object or Reference Object. */
export type AsyncApiParametersObject = Record<string, AsyncApiParameterObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiParameterObject;
} & ReferenceObjectExtensions)>;
/** Map describing protocol-specific definitions for a channel (AsyncAPI 3.1.0). */
export type AsyncApiChannelBindingsObject = {
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
http?: unknown;
/** AsyncAPI WebSocket binding for handshake method, query, and headers. */
ws?: AsyncApiWsBindingObject;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
kafka?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
anypointmq?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
amqp?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
amqp1?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
mqtt?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
mqtt5?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
nats?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
jms?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
sns?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
solace?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
sqs?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
stomp?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
redis?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
mercure?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
ibmmq?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
googlepubsub?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
pulsar?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
ros2?: unknown;
};
export type AsyncApiChannelObject = {
/** Channel address or null when unknown. */
address?: string | null;
/** Map of messageId to Message Object or Reference Object. */
messages?: AsyncApiMessagesObject;
/** A human-friendly title for the channel. */
title?: string;
/** A short summary of the channel. */
summary?: string;
/** An optional description of this channel. CommonMark syntax MAY be used for rich text representation. */
description?: string;
/** References to Server definitions where this channel is available (Reference Objects only in the raw document). */
servers?: (AsyncApiReferenceObject & {
'$ref-value': AsyncApiServerObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiServerObject;
} & ReferenceObjectExtensions);
} & ReferenceObjectExtensions)[];
/** Map of parameter name to Parameter Object or Reference Object. */
parameters?: AsyncApiParametersObject;
/** A list of Tag Objects (entries MAY be Reference Objects). */
tags?: AsyncApiTagsObject;
externalDocs?: AsyncApiExternalDocumentationObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiExternalDocumentationObject;
} & ReferenceObjectExtensions);
bindings?: AsyncApiChannelBindingsObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiChannelBindingsObject;
} & ReferenceObjectExtensions);
};
/** Map of channelId to Channel Object or Reference Object. */
export type AsyncApiChannelsObject = Record<string, AsyncApiChannelObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiChannelObject;
} & ReferenceObjectExtensions)>;
/** Map describing protocol-specific definitions for an operation (AsyncAPI 3.1.0). */
export type AsyncApiOperationBindingsObject = {
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
http?: unknown;
/** AsyncAPI WebSocket binding for handshake method, query, and headers. */
ws?: AsyncApiWsBindingObject;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
kafka?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
anypointmq?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
amqp?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
amqp1?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
mqtt?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
mqtt5?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
nats?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
jms?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
sns?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
solace?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
sqs?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
stomp?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
redis?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
mercure?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
ibmmq?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
googlepubsub?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
pulsar?: unknown;
/** Protocol-specific binding definition (see AsyncAPI protocol bindings). */
ros2?: unknown;
};
export type AsyncApiOperationTraitObject = {
/** A human-friendly title for the operation. */
title?: string;
/** A short summary of what the operation is about. */
summary?: string;
/** A verbose explanation of the operation. CommonMark syntax MAY be used for rich text representation. */
description?: string;
/** Security schemes for this operation. Only one of the security scheme objects MUST be satisfied. */
security?: (AsyncApiSecuritySchemeObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiSecuritySchemeObject;
} & ReferenceObjectExtensions))[];
/** A list of Tag Objects (entries MAY be Reference Objects). */
tags?: AsyncApiTagsObject;
externalDocs?: AsyncApiExternalDocumentationObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiExternalDocumentationObject;
} & ReferenceObjectExtensions);
bindings?: AsyncApiOperationBindingsObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiOperationBindingsObject;
} & ReferenceObjectExtensions);
};
export type AsyncApiOperationReplyAddressObject = {
/** An optional description of the address. CommonMark syntax MAY be used for rich text representation. */
description?: string;
/** REQUIRED. A runtime expression that specifies the location of the reply address. */
location: string;
};
export type AsyncApiOperationReplyObject = {
address?: AsyncApiOperationReplyAddressObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiOperationReplyAddressObject;
} & ReferenceObjectExtensions);
channel?: AsyncApiReferenceObject & {
'$ref-value': AsyncApiChannelObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiChannelObject;
} & ReferenceObjectExtensions);
} & ReferenceObjectExtensions;
/** List of $ref pointers to Message Objects used as reply payloads (Reference Objects only in the raw document). */
messages?: (AsyncApiReferenceObject & {
'$ref-value': AsyncApiMessageObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiMessageObject;
} & ReferenceObjectExtensions);
} & ReferenceObjectExtensions)[];
};
export type AsyncApiOperationObject = {
/** REQUIRED. send when the application sends to the channel; receive when it receives from the channel. */
action: 'send' | 'receive';
channel: AsyncApiReferenceObject & {
'$ref-value': AsyncApiChannelObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiChannelObject;
} & ReferenceObjectExtensions);
} & ReferenceObjectExtensions;
/** A human-friendly title for the operation. */
title?: string;
/** A short summary of what the operation is about. */
summary?: string;
/** A verbose explanation of the operation. CommonMark syntax MAY be used for rich text representation. */
description?: string;
/** Security schemes for this operation. Only one of the security scheme objects MUST be satisfied. */
security?: (AsyncApiSecuritySchemeObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiSecuritySchemeObject;
} & ReferenceObjectExtensions))[];
/** A list of Tag Objects (entries MAY be Reference Objects). */
tags?: AsyncApiTagsObject;
externalDocs?: AsyncApiExternalDocumentationObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiExternalDocumentationObject;
} & ReferenceObjectExtensions);
bindings?: AsyncApiOperationBindingsObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiOperationBindingsObject;
} & ReferenceObjectExtensions);
traits?: (AsyncApiOperationTraitObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiOperationTraitObject;
} & ReferenceObjectExtensions))[];
/** Subset of channel messages as Reference Objects only. Omit to include all channel messages; use [] for none. */
messages?: (AsyncApiReferenceObject & {
'$ref-value': AsyncApiMessageObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiMessageObject;
} & ReferenceObjectExtensions);
} & ReferenceObjectExtensions)[];
reply?: AsyncApiOperationReplyObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiOperationReplyObject;
} & ReferenceObjectExtensions);
};
/** Map of operationId to Operation Object or Reference Object. */
export type AsyncApiOperationsObject = Record<string, AsyncApiOperationObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiOperationObject;
} & ReferenceObjectExtensions)>;
/** Reusable objects. Definitions here have no effect unless referenced from outside components. */
export type AsyncApiComponentsObject = {
/** Reusable Multi Format Schema, Schema Object, or Reference Object. */
schemas?: Record<string, AsyncApiMultiFormatSchemaOrSchemaObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiMultiFormatSchemaOrSchemaObject;
} & ReferenceObjectExtensions)>;
servers?: Record<string, AsyncApiServerObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiServerObject;
} & ReferenceObjectExtensions)>;
channels?: Record<string, AsyncApiChannelObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiChannelObject;
} & ReferenceObjectExtensions)>;
operations?: Record<string, AsyncApiOperationObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiOperationObject;
} & ReferenceObjectExtensions)>;
messages?: Record<string, AsyncApiMessageObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiMessageObject;
} & ReferenceObjectExtensions)>;
securitySchemes?: Record<string, AsyncApiSecuritySchemeObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiSecuritySchemeObject;
} & ReferenceObjectExtensions)>;
serverVariables?: Record<string, AsyncApiServerVariableObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiServerVariableObject;
} & ReferenceObjectExtensions)>;
parameters?: Record<string, AsyncApiParameterObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiParameterObject;
} & ReferenceObjectExtensions)>;
correlationIds?: Record<string, AsyncApiCorrelationIdObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiCorrelationIdObject;
} & ReferenceObjectExtensions)>;
replies?: Record<string, AsyncApiOperationReplyObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiOperationReplyObject;
} & ReferenceObjectExtensions)>;
replyAddresses?: Record<string, AsyncApiOperationReplyAddressObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiOperationReplyAddressObject;
} & ReferenceObjectExtensions)>;
externalDocs?: Record<string, AsyncApiExternalDocumentationObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiExternalDocumentationObject;
} & ReferenceObjectExtensions)>;
tags?: Record<string, AsyncApiTagObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiTagObject;
} & ReferenceObjectExtensions)>;
operationTraits?: Record<string, AsyncApiOperationTraitObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiOperationTraitObject;
} & ReferenceObjectExtensions)>;
messageTraits?: Record<string, AsyncApiMessageTraitObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiMessageTraitObject;
} & ReferenceObjectExtensions)>;
serverBindings?: Record<string, AsyncApiServerBindingsObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiServerBindingsObject;
} & ReferenceObjectExtensions)>;
channelBindings?: Record<string, AsyncApiChannelBindingsObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiChannelBindingsObject;
} & ReferenceObjectExtensions)>;
operationBindings?: Record<string, AsyncApiOperationBindingsObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiOperationBindingsObject;
} & ReferenceObjectExtensions)>;
messageBindings?: Record<string, AsyncApiMessageBindingsObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiMessageBindingsObject;
} & ReferenceObjectExtensions)>;
};
/** Root AsyncAPI 3.1.0 document combining resource listing and API declaration. */
export type AsyncApiDocumentCore = {
/** REQUIRED. AsyncAPI Specification version (major.minor.patch). Patch MAY include a hyphen suffix. */
asyncapi: string;
/** Identifier of the application the AsyncAPI document is defining (URI, RFC3986). */
id?: string;
info: AsyncApiInfoObject;
/** Map of server name to Server Object or Reference Object. */
servers?: AsyncApiServersObject;
/** Default content type when encoding/decoding a message payload (for example application/json). */
defaultContentType?: string;
/** Map of channelId to Channel Object or Reference Object. */
channels?: AsyncApiChannelsObject;
/** Map of operationId to Operation Object or Reference Object. */
operations?: AsyncApiOperationsObject;
components?: AsyncApiComponentsObject | (AsyncApiReferenceObject & {
'$ref-value': AsyncApiComponentsObject;
} & ReferenceObjectExtensions);
};
/**
* Original AsyncAPI Specification version of the source document before ingestion.
*
* @example
* ```yaml
* x-original-aas-version: "3.0.0"
* ```
*/
export type XOriginalAasVersion = {
/** Original AsyncAPI Specification version the document was loaded with. */
'x-original-aas-version'?: string;
};
/** Client-side navigation tree persisted on the document. Matches `TraversedDocumentObjectRef` in strict OpenAPI schemas. */
export type XScalarNavigation = {
/** Serialized client navigation tree (`TraversedDocument`) for this API description */
'x-scalar-navigation'?: any;
};
/**
* Original document source URL when the API description was loaded from an external source.
*
* @example
* ```yaml
* x-scalar-original-source-url: https://example.com/openapi.yaml
* ```
*/
export type XScalarOriginalSourceUrl = {
/** Original document source URL when loaded from an external source */
'x-scalar-original-source-url'?: string;
};
/**
* Tracks the original document hash when loading from an external source. Used to detect modifications since last save.
*
* @example
* ```yaml
* x-scalar-original-document-hash: "abc123"
* ```
*/
export type XScalarOriginalDocumentHash = {
/** Hash of the document as originally loaded from an external source */
'x-scalar-original-document-hash': string;
};
/**
* Tracks whether the document has been modified since it was last saved.
*
* @example
* ```yaml
* x-scalar-is-dirty: true
* ```
*/
export type XScalarIsDirty = {
/** When true, the document has unsaved changes */
'x-scalar-is-dirty'?: boolean;
};
/**
* Whether the document is in watch mode (reloads when the source file changes).
*
* @example
* ```yaml
* x-scalar-watch-mode: true
* ```
*/
export type XScalarWatchMode = {
/** When true, the document is watched for external file changes */
'x-scalar-watch-mode'?: boolean;
};
/** Registry meta namespace and slug */
export type XScalarRegistryMetaInner = {
/** The namespace under which this registry meta is scoped. */
namespace: string;
/** A unique slug identifier for this registry meta within the namespace. */
slug: string;
/** The version of the registry meta. */
version: string;
/** Last known commit hash of this document. Is going to be used to track if the document has been modified since it was last saved. */
commitHash?: string;
/** Registry commit hash that the cached `hasConflict` flag was computed against. When the registry advertises a different hash later, the cached result is stale and the conflict check must be re-run. */
conflictCheckedAgainstHash?: string;
/** Cached outcome of the last conflict check, valid only while `conflictCheckedAgainstHash` matches the registry current hash for this version. */
hasConflict?: boolean;
};
/**
* Registry sync metadata for a document published to Scalar Registry.
*
* @example
* ```yaml
* x-scalar-registry-meta:
* namespace: acme
* slug: public-api
* version: "1.0.0"
* ```
*/
export type XScalarRegistryMeta = {
/** Registry meta namespace and slug */
'x-scalar-registry-meta'?: XScalarRegistryMetaInner;
};
/**
* The currently selected server for this API description. For OpenAPI documents the value is the server URL; for AsyncAPI documents the value is the server name (key in `document.servers`).
*
* @example
* ```yaml
* x-scalar-selected-server: https://api.example.com
* ```
*/
export type XScalarSelectedServer = {
/** The currently selected server. For OpenAPI documents this is the server URL; for AsyncAPI documents this is the server name (key in `document.servers`). */
'x-scalar-selected-server'?: string;
};
/** AsyncAPI document-level Scalar extensions shared with workspace tooling. */
export type AsyncApiExtensions = XOriginalAasVersion & XScalarNavigation & XScalarOriginalSourceUrl & XScalarOriginalDocumentHash & XScalarIsDirty & XScalarWatchMode & XScalarRegistryMeta & XScalarSelectedServer;
/** Root AsyncAPI 3.1.0 document including Scalar workspace extensions (AsyncApiExtensionsSchema). */
export type AsyncApiDocument = AsyncApiDocumentCore & AsyncApiExtensions;
//# sourceMappingURL=index.generated.d.ts.map