UNPKG

redoc

Version:

API reference documentation for OpenAPI, AsyncAPI, and GraphQL

1,836 lines • 55.3 kB
import type { AsyncApiConfig } from '@redocly/config';
import type { EventType } from '@redocly/redoc-opentelemetry';
import type { GraphQLConfig } from '@redocly/config';
import type { LayoutVariant } from '@redocly/config';
import type { ReactElement } from 'react';
import type { ReactNode } from 'react';
import type { RedocConfig } from '@redocly/config';
import type { ResolvedNavItem } from '@redocly/config';
import { Root } from 'react-dom/client';

declare type AdmonitionNode = {
    nodeType: typeof nodeTypes.ADMONITION;
    admonitionType: NonNullable<AdmonitionProps['type']>;
    name?: string;
    nameTranslationKey?: string;
    content?: string | Node_2[] | Node_2;
};

declare type AdmonitionProps = Partial<AdmonitionTypeProps> & {
    name?: string;
    className?: string;
    'data-source'?: string;
    'data-hash'?: string;
};

declare type AdmonitionTypeProps = {
    type: 'warning' | 'success' | 'danger' | 'info' | 'idea';
};

declare type AnalyticsEvent = {
    eventType: AnalyticsEventType;
    resource: 'Redocly_CodeSample' | 'Redocly_Operation';
    action: 'LanguageSwitched' | 'CodeSampleCopied' | 'TargetServerSwitched';
    operationId?: string;
    operationPath: string;
    operationHttpVerb: string;
    operationSummary?: string | Record<string, unknown>;
};

declare type AnalyticsEventType = 'CodeSampleLanguageSwitched' | 'CodeSampleCopied' | 'OperationServerExpanded' | 'TargetServerSwitched';

declare type ApiDocsMetadata = {
    title?: string;
    description?: string | Node_2[] | Node_2;
    summary?: string;
    version?: string;
    [key: string]: unknown;
};

declare type ApiDocsOptions = {
    schemaDefinitionsTagName?: string;
    jsonSamplesExpandLevel: number;
    generatedSamplesMaxDepth: number;
    hideDownloadButtons: boolean;
    hideSchemaTitles: boolean;
    hideSchemaPattern: boolean;
    maxDisplayedEnumValues: number;
    onlyRequiredInSamples: boolean;
    onDeepLinkClick: ((link: string) => void) | undefined | null;
    schemasExpansionLevel?: number;
    sortRequiredPropsFirst: boolean;
    sanitize: boolean;
    showExtensions: string[] | boolean;
    ignoreNamedSchemas: Set<string>;
    markdownParser: MarkdownParser;
    codeSamples?: CodeSamplesConfig;
    events: Events;
    hidePropertiesPrefix: boolean;
    protocol?: ProtocolVariant;
    scrollYOffset: () => number;
    hideLoading: boolean;
    skipBundle: boolean;
    basePath: string;
    specType: ApiSpecType;
    metadata: ApiDocsMetadata;
    downloadUrls?: NormalizedDownloadUrl[];
    layout: LayoutVariant;
    apiLogo?: SidebarLogo;
    jsonSamplesDepth: number;
    samplesMaxInlineArgs: number;
    fieldExpandLevel: number;
} & GraphQLOptions;

declare type ApiItem = ResolvedNavItem & {
    content: ApiItemContent | null;
    httpVerb?: string;
};

declare type ApiItemContent = {
    contentType: ContentType;
    itemVariant?: ItemVariant;
    meta?: ItemMeta;
    children: ContentNode[];
    showDivider?: boolean;
};

declare type ApiSpecType = ObjectValues<typeof apiSpecType>;

declare const apiSpecType: {
    readonly OPENAPI: 'openapi';
    readonly ASYNCAPI: 'asyncapi';
    readonly GRAPHQL: 'graphql';
};

declare type ApiStore = {
    schemaStore: Record<string, SchemaEntry>;
    exampleStore: Record<string, ExampleEntry>;
    securitySchemeStore: Record<string, SecuritySchemeEntry>;
    graphqlMeta?: GraphqlStoreMeta;
    servers?: ServerData[];
    mcp?: McpData;
    /** From OpenAPI `info.x-logo`. Rendered by the standalone sidebar. */
    logo?: SidebarLogo;
    specType?: ApiSpecType;
    convertedFrom?: string;
};

declare interface AstType {
    readonly $$mdtype: 'Function' | 'Node' | 'Variable';
    resolve(config: Config): any;
}

declare type AsyncApiExternalDocs = {
    description?: string | Node_2[] | Node_2;
    url: string;
};

declare type AsyncAPISchema = JSONSchema7 | MultiFormatSchemaObject;

declare type AsyncApiSecuritySchemeType = ObjectValues<typeof asyncApiSecuritySchemeType>;

declare const asyncApiSecuritySchemeType: {
    readonly USER_PASSWORD: 'userPassword';
    readonly API_KEY: 'apiKey';
    readonly X509: 'X509';
    readonly SYMMETRIC_ENCRYPTION: 'symmetricEncryption';
    readonly ASYMMETRIC_ENCRYPTION: 'asymmetricEncryption';
    readonly HTTP_API_KEY: 'httpApiKey';
    readonly HTTP: 'http';
    readonly OAUTH2: 'oauth2';
    readonly OPEN_ID_CONNECT: 'openIdConnect';
    readonly PLAIN: 'plain';
    readonly SCRAM_SHA256: 'scramSha256';
    readonly SCRAM_SHA512: 'scramSha512';
    readonly GSSAPI: 'gssapi';
};

declare type AsyncApiServerBinding = {
    kafka?: AsyncApiServerKafkaBinding;
};

declare type AsyncApiServerKafkaBinding = {
    schemaRegistryUrl?: string;
    schemaRegistryVendor?: string;
    bindingVersion?: string;
};

declare type AsyncApiTag = {
    name: string;
    description?: string | Node_2[] | Node_2;
    externalDocs?: AsyncApiExternalDocs;
};

declare type AttributeValue = {
    type: string;
    name: string;
    value: any;
};

declare type AvroSchema = {
    type: string | string[] | AvroSchema[];
    name?: string;
    doc?: string;
    symbols?: string[];
    fields?: Array<{
        name: string;
        type: AvroSchema | string | (string | AvroSchema)[];
        doc?: string;
        default?: unknown;
    }>;
    items?: AvroSchema | string;
    values?: AvroSchema | string;
};

declare type Badge = {
    name: string;
    color?: string;
    icon?: string;
    description?: string;
};

declare type BadgeData = {
    name: string;
    color?: string;
    position?: 'before' | 'after';
    icon?: string;
    description?: string;
};

declare type BadgeType = {
    name: string;
    position: 'before' | 'after';
    color: string;
};

declare type BaseExamplePanelItem = {
    schemaId?: string;
    examples: {
        name?: string;
        summary?: string;
        statusCode?: string;
        mediaType?: string;
        value?: unknown;
    }[];
};

declare type BaseRequired = WithRequired<GraphQLConfig, 'jsonSamplesDepth' | 'samplesMaxInlineArgs' | 'fieldExpandLevel'>;

/** Sees every array payload before it is sent; returning `false` drops the event. */
declare type BeforeSend = (event: EventType, items: unknown[]) => boolean | void;

declare type BreadcrumbItem = {
    label: string;
};

declare type BrokerData = {
    /** Server host; absent only for invalid documents. */
    url?: string;
    description?: string | Node_2[] | Node_2;
    name?: string;
    variables?: Record<string, {
        enum?: string[];
        default: string;
        description?: string | Node_2[] | Node_2;
        examples?: string[];
    }>;
    protocol?: string;
    protocolVersion?: string;
    pathname?: string;
    title?: string;
    summary?: string;
    tags?: AsyncApiTag[];
    externalDocs?: AsyncApiExternalDocs;
    bindings?: AsyncApiServerBinding;
    security?: SecurityRequirementDetail[];
};

declare type BrokersNode = SingleChildPanelBase<typeof panelKind.BROKERS>;

declare type BrokersPanelItem = {
    kind: typeof panelKind.BROKERS;
    panelLabel?: string;
    brokers: BrokerData[];
};

declare type BuildTimings = {
    resolveSpecMs: number;
    buildItemsMs: number;
};

declare type CallbackPayloadPanelItem = BaseExamplePanelItem & {
    kind: typeof panelKind.CALLBACK_PAYLOAD;
    callbackName?: string;
    path?: string;
    httpVerb?: string;
    servers?: {
        url: string;
        name?: string;
        description?: string;
        variables?: Record<string, {
            default?: string;
        }>;
    }[];
    definitionSamples?: DefinitionCodeSample_2[];
    mediaTypes?: string[];
    mediaTypeSchemas?: Record<string, MediaTypeContent>;
};

declare type ChannelAddressNode = {
    nodeType: typeof nodeTypes.CHANNEL_ADDRESS;
    address: string;
};

declare type ChannelBindingNode = SingleChildPanelBase<typeof panelKind.CHANNEL_BINDING>;

declare type ChannelBindingPanelItem = {
    kind: typeof panelKind.CHANNEL_BINDING;
    panelLabel?: string;
    bindingKey: string;
    bindingValue: Record<string, unknown>;
};

declare type CodeSamplePanelItem = BaseExamplePanelItem & {
    kind: typeof panelKind.CODE_SAMPLE;
    source: CodeSampleSource;
    definitionSamples?: DefinitionCodeSample_2[];
    isWebhook?: boolean;
    servers?: {
        url: string;
        name?: string;
        description?: string;
        variables?: Record<string, {
            default?: string;
        }>;
    }[];
    exampleIds?: string[];
    mediaTypes?: string[];
    mediaTypeSchemas?: Record<string, MediaTypeContent>;
};

/**
 * Community edition: generated code samples are not included. The language
 * list survives only to drive the payload tab and `x-codeSamples` matching.
 * `key` and `label` are stamped onto every entry by `normalizeCodeSamples()`.
 */
declare interface CodeSamplesConfig {
    languages: {
        lang: string;
        label: string;
        key: string;
    }[];
}

declare type CodeSamplesCopiedEvent = AnalyticsEvent & {
    lang: string;
    label: string;
    type: 'request' | 'response';
    exampleId?: string;
    exampleMimeType?: string;
};

declare type CodeSamplesLanguageSwitchedEvent = AnalyticsEvent & {
    lang: string;
    label: string;
    exampleId?: string;
};

declare type CodeSampleSource = {
    kind: typeof panelKind.CODE_SAMPLE;
    operationType: 'http' | 'webhook' | 'callback';
    method: string;
    path: string;
    servers: ServerEntry[];
    parameters: {
        path: ParameterEntry[];
        query: ParameterEntry[];
        querystring: ParameterEntry[];
        header: ParameterEntry[];
        cookie: ParameterEntry[];
    };
    security: SecurityRequirement[];
    /** mediaType name → { schemaId, exampleIds } */
    requestBody?: Record<string, MediaTypeEntry>;
    /** Pre-authored code samples from the spec (x-codeSamples) */
    definitionSamples?: DefinitionCodeSample[];
    /** Response status codes (for generators that include expected status) */
    responseCodes?: string[];
    /** Raw pointer into the spec (for deep linking) */
    pointer?: string;
    /** Docs route slug of the operation page, relative to the routing base path
     * (e.g. `operations/getmuseumhours`) — lets hosts link back to the description */
    href?: string;
    /** OpenAPI `operationId` — should match the loaded spec so hosts can resolve the operation */
    openApiOperationId?: string;
    /** OpenAPI operation `summary` — the human-readable operation name */
    summary?: string;
};

declare type Config<R = string> = Readonly<ConfigType<R>>;

declare type ConfigFunction = {
    returns?: ValidationType | ValidationType[];
    parameters?: Record<string, SchemaAttribute>;
    transform?(parameters: Record<string, any>, config: Config): any;
    validate?(fn: Function_2, config: Config): ValidationError[];
};

declare type ConfigType<R = string> = Partial<{
    nodes: Partial<Record<NodeType, Schema<ConfigType, R>>>;
    tags: Record<string, Schema>;
    variables: Record<string, any>;
    functions: Record<string, ConfigFunction>;
    partials: Record<string, any>;
    validation?: {
        parents?: Node_2[];
        validateFunctions?: boolean;
        environment?: string;
    };
}>;

declare type ConnectMcpButtonPanelItem = {
    kind: typeof panelKind.CONNECT_MCP_BUTTON;
    title?: string;
    titleTranslationKey?: string;
    mcpUrl: string;
    actions: string[];
};

declare const CONST_PROTOCOL_VARIANT: {
    readonly DEFAULT: 'default';
    readonly KAFKA: 'kafka';
    readonly AMQP: 'amqp';
    readonly WSS: 'wss';
};

declare type ContainerNode = {
    nodeType: typeof nodeTypes.CONTAINER;
    panels?: PanelNode[];
    children: ContentNode[];
};

declare type ContentNode = ContainerNode | OverviewSectionWrapperNode | HeaderNode | EmptyMessageNode | ItemContentNode | SecurityNode | MarkdocNode | AdmonitionNode | ExternalDocsNode | ChannelAddressNode | MessageLinksNode | InfoMetadataNode | ExtensionsNode;

declare type ContentType = ObjectValues<typeof contentType>;

declare const contentType: {
    readonly OVERVIEW: 'overview';
    readonly GROUP: 'group';
    readonly ITEM: 'item';
};

declare interface CustomAttributeType {
    new (): CustomAttributeTypeInterface;
    readonly prototype: CustomAttributeTypeInterface;
}

declare interface CustomAttributeTypeInterface {
    transform?(value: any, config: Config): Scalar;
    validate?(value: any, config: Config, name: string): ValidationError[];
}

declare type DefinitionCodeSample = {
    lang: string;
    label?: string;
    source: string;
};

declare type DefinitionCodeSample_2 = {
    lang: string;
    label?: string;
    source: string;
};

declare type DownloadNode = MultiChildPanelBase<typeof panelKind.DOWNLOAD>;

declare type DownloadPanelItem = {
    kind: typeof panelKind.DOWNLOAD;
    label: string;
    labelTranslationKey?: string;
    url: string;
    icon?: string;
};

declare type DownloadUrl = {
    title?: string;
    url: string;
};

declare type EditionAsyncApiConfig = Omit<AsyncApiConfig, EnterpriseOnlyOptionKey>;

declare type EditionGraphQLConfig = Omit<GraphQLConfig, EnterpriseOnlyOptionKey>;

declare type EditionRedocConfig = Omit<RedocConfig, EnterpriseOnlyOptionKey>;

declare type EmailPanelItem = {
    kind: typeof panelKind.EMAIL;
    title?: string;
    titleTranslationKey?: string;
    email: string;
    label: string;
    labelTranslationKey?: string;
    withCopyButton?: boolean;
    copyContent?: string;
};

declare type EmptyMessageNode = {
    nodeType: typeof nodeTypes.EMPTY_MESSAGE;
    label: string;
    labelTranslationKey?: string;
};

declare type EnterpriseOnlyOptionKey = 'licenseKey' | 'hideReplay' | 'mockServer' | 'corsProxyUrl' | 'oAuth2RedirectURI' | 'feedback' | 'hideInfoMetadata' | 'showSchemaCatalogLinks' | 'servers';

declare type Events = {
    codeSamplesLanguageSwitch?: (event: CodeSamplesLanguageSwitchedEvent) => void;
    codeSamplesCopy?: (event: CodeSamplesCopiedEvent) => void;
    targetServerSwitch?: (event: TargetServerSwitchedEvent) => void;
};

declare type ExampleEntry = {
    id: string;
    value: unknown;
    key?: string;
    summary?: string;
    description?: string | Node_2 | Node_2[];
    mediaType?: string;
    externalValue?: string;
    /** Header values of an AsyncAPI message example. */
    headers?: Record<string, unknown>;
};

declare type ExamplePanelItem = PayloadExamplesPanelItem | CodeSamplePanelItem | ResponseExamplesPanelItem | CallbackPayloadPanelItem | GraphQLQueryPanelItem | GraphQLResponsePanelItem | GraphQLVariablesPanelItem | GraphQLTypeSamplePanelItem;

declare type ExamplesNode = MultiChildPanelBase<typeof panelKind.PAYLOAD | typeof panelKind.CODE_SAMPLE | typeof panelKind.RESPONSE | typeof panelKind.CALLBACK_PAYLOAD | typeof panelKind.GRAPHQL_QUERY | typeof panelKind.GRAPHQL_RESPONSE | typeof panelKind.GRAPHQL_VARIABLES | typeof panelKind.GRAPHQL_TYPE_SAMPLE>;

declare type ExampleType = {
    summary?: string;
    description?: string;
    value?: string;
};

declare type ExtensionsNode = {
    nodeType: typeof nodeTypes.EXTENSIONS;
    extensions: Record<string, unknown>;
};

declare type ExternalDocsNode = {
    nodeType: typeof nodeTypes.EXTERNAL_DOCS;
    url: string;
    description: string | Node_2[] | Node_2;
};

declare type ExternalLinkPanelItem = {
    kind: typeof panelKind.EXTERNAL_LINK;
    title?: string;
    titleTranslationKey?: string;
    label: string;
    labelTranslationKey?: string;
    url: string;
    withCopyButton?: boolean;
    copyContent?: string;
};

declare type FormFieldEncoding = {
    contentType?: string;
    style?: string;
    explode?: boolean;
    allowReserved?: boolean;
    headers?: Record<string, string>;
    xmlName?: string;
};

declare class Function_2 implements AstType {
    readonly $$mdtype = "Function";
    name: string;
    parameters: Record<string, any>;
    constructor(name: string, parameters: Record<string, any>);
    resolve(config?: Config): any;
}

declare type GraphQLContact = {
    name?: string;
    url?: string;
    email?: string;
};

declare type GraphQLInfo = {
    title?: string;
    version?: string;
    description?: string;
    termsOfService?: string;
    contact?: GraphQLContact;
    license?: GraphQLLicense;
};

declare type GraphQLLicense = {
    name?: string;
    url?: string;
    identifier?: string;
};

declare type GraphQLOperationData = {
    operationType: 'query' | 'mutation' | 'subscription';
    operationName: string;
    typeName: string;
};

declare type GraphQLOptions = Omit<BaseRequired, 'layout'> & {
    layout: LayoutVariant;
    info?: GraphQLInfo;
    menu?: GraphQLConfig['menu'];
};

declare type GraphQLQueryPanelItem = BaseExamplePanelItem & {
    kind: typeof panelKind.GRAPHQL_QUERY;
    graphqlOperationData?: GraphQLOperationData;
};

declare type GraphQLResponsePanelItem = BaseExamplePanelItem & {
    kind: typeof panelKind.GRAPHQL_RESPONSE;
    graphqlOperationData?: GraphQLOperationData;
};

declare type GraphqlStoreMeta = {
    rootTypes: {
        query?: string;
        mutation?: string;
        subscription?: string;
    };
};

declare type GraphQLTypeSamplePanelItem = BaseExamplePanelItem & {
    kind: typeof panelKind.GRAPHQL_TYPE_SAMPLE;
    graphqlOperationData?: GraphQLOperationData;
};

declare type GraphQLVariablesPanelItem = BaseExamplePanelItem & {
    kind: typeof panelKind.GRAPHQL_VARIABLES;
    graphqlOperationData?: GraphQLOperationData;
};

declare type GroupItem = {
    title: string;
    summary?: string;
    prefix?: Badge;
    badges?: Badge[];
    link: string;
    deprecated: boolean;
    childTag?: boolean;
};

declare type GroupItemNode = MultiChildPanelBase<typeof panelKind.GROUP_ITEMS>;

declare type GroupItemsPanelItem = {
    kind: typeof panelKind.GROUP_ITEMS;
    title: string;
    titleTranslationKey?: string;
    items: GroupItem[];
};

declare type HeaderNode = {
    nodeType: typeof nodeTypes.HEADER;
    level: number;
    label: string;
    labelTranslationKey?: string;
    badges?: BadgeData[];
    deprecated?: boolean;
    isWebhook?: boolean;
    showPageActions?: boolean;
    protocolTag?: {
        label: string;
        color?: string;
    };
    deepLinkSuffix?: string;
    graphqlReturnType?: string;
    graphqlArgs?: {
        name: string;
    }[];
    graphqlDeprecated?: boolean;
    graphqlOperationType?: 'query' | 'mutation' | 'subscription';
};

/**
 * Attaches to server-rendered markup instead of replacing it. The spec must be
 * the same pre-bundled document the server pass rendered from.
 */
export declare function hydrate(specOrSpecUrl: string | Record<string, unknown>, options?: InitOptions, element?: Element | null): Promise<void>;

declare type InfoMetadataNode = {
    nodeType: typeof nodeTypes.INFO_METADATA;
    rows: InfoMetadataRow[];
};

declare type InfoMetadataRow = {
    key: string;
    value: string;
};

export declare function init(specOrSpecUrl: string | Record<string, unknown>, options?: InitOptions, element?: Element | null): Root;

export declare type InitOptions = NonNullable<RedocStandaloneProps['options']> & {
    router?: 'hash' | 'history';
    disableTelemetry?: boolean;
    /** The Docker image sets `type-of-usage="docker"` on the `<redoc>` element. */
    typeOfUsage?: TypeOfUsage;
    basePath?: string;
};

declare type ItemContentNode = {
    nodeType: typeof nodeTypes.ITEM;
    variant: 'headers' | 'query' | 'querystring' | 'querystring-body' | 'path' | 'parameters' | 'cookies' | 'body' | 'properties' | 'arguments' | 'fields' | 'responses' | 'callback' | 'messages' | 'values' | 'graphql-fields' | 'graphql-args' | 'return-type' | 'possible-types' | 'implements' | 'implemented-by' | 'requires-scopes';
    label?: string;
    labelTranslationKey?: string;
    schemaId?: string;
    exampleIds?: string[];
    parameters?: ParameterData[];
    required?: boolean;
    /** Webhook/callback body: the server sends it, so readOnly stays and writeOnly is dropped. */
    isEvent?: boolean;
    mediaTypes?: string[];
    mediaTypeSchemas?: Record<string, MediaTypeContent>;
    pointer?: string;
    description?: string | Node_2 | Node_2[];
    graphqlTypeName?: string;
    graphqlFieldName?: string;
    graphqlOperationType?: 'query' | 'mutation' | 'subscription';
    graphqlInterfaceNames?: string[];
    graphqlTypeNames?: string[];
    responses?: Array<{
        code: string;
        summary?: string | Node_2[] | Node_2;
        description?: string | Node_2[] | Node_2;
        mediaType?: string;
        mediaTypes?: string[];
        mediaTypeContent?: Record<string, MediaTypeContent>;
        schemaId?: string;
        exampleIds?: string[];
        headers?: OpenAPIResponse['headers'];
        headerSchemaId?: string;
    }>;
    callback?: {
        httpVerb: string;
        pathName: string;
        summary?: string;
        operationId?: string;
        description?: string | Node_2 | Node_2[];
        deprecated?: boolean;
        callbackName: string;
        callbackId: string;
        externalDocs?: {
            url: string;
            description?: string;
        };
        extensions?: Record<string, unknown>;
        contentChildren?: ContentNode[];
    };
    messages?: Array<{
        name: string;
        label: string;
        summary?: string;
        description?: string | Node_2[] | Node_2;
        contentType?: string;
        schemaId?: string;
        headerSchemaId?: string;
        exampleIds?: string[];
        payload?: AsyncAPISchema;
        payloadLabel?: string;
        headers?: AsyncAPISchema;
        externalDocs?: {
            url: string;
            description?: string | Node_2[] | Node_2;
        };
        correlationId?: {
            location: string;
            description?: string | Node_2[] | Node_2;
        };
    }>;
    values?: Array<{
        name: string;
        description?: string | Node_2[] | Node_2;
        deprecated?: boolean;
        type?: string;
    }>;
};

declare type ItemMeta = {
    name?: string;
    deprecated?: boolean;
    isWebhook?: boolean;
    hasSamples?: boolean;
    badges?: BadgeData[];
    pointer?: string;
    position?: {
        start: {
            lineNumber: number;
            column: number;
        };
        end?: {
            lineNumber: number;
            column: number;
        };
    };
    protocolTag?: {
        label: string;
        color: string;
    };
    breadcrumbs?: BreadcrumbItem[];
    action?: 'send' | 'receive';
    actionLabel?: string;
    channelBindings?: Record<string, unknown>;
    returnType?: string;
};

declare type ItemVariant = ObjectValues<typeof itemVariant>;

declare const itemVariant: {
    readonly HTTP_ITEM: 'httpItem';
    readonly SCHEMA: 'schema';
    readonly CHANNEL: 'channel';
    readonly CHANNEL_OPERATION: 'channelOperation';
    readonly MESSAGE: 'message';
    readonly QUERY: 'query';
    readonly MUTATION: 'mutation';
    readonly SUBSCRIPTION: 'subscription';
    readonly DIRECTIVE: 'directive';
    readonly OBJECT: 'object';
    readonly INTERFACE: 'interface';
    readonly INPUT: 'input';
    readonly UNION: 'union';
    readonly ENUM: 'enum';
    readonly SCALAR: 'scalar';
    readonly MARKDOWN: 'markdown';
};

declare interface JSONSchema7 {
    $id?: string | undefined;
    $ref?: string | undefined;
    $schema?: JSONSchema7Version | undefined;
    $comment?: string | undefined;

    /**
     * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.4
     * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A
     */
    $defs?: {
        [key: string]: JSONSchema7Definition;
    } | undefined;

    /**
     * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1
     */
    type?: JSONSchema7TypeName | JSONSchema7TypeName[] | undefined;
    enum?: JSONSchema7Type[] | undefined;
    const?: JSONSchema7Type | undefined;

    /**
     * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2
     */
    multipleOf?: number | undefined;
    maximum?: number | undefined;
    exclusiveMaximum?: number | undefined;
    minimum?: number | undefined;
    exclusiveMinimum?: number | undefined;

    /**
     * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3
     */
    maxLength?: number | undefined;
    minLength?: number | undefined;
    pattern?: string | undefined;

    /**
     * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4
     */
    items?: JSONSchema7Definition | JSONSchema7Definition[] | undefined;
    additionalItems?: JSONSchema7Definition | undefined;
    maxItems?: number | undefined;
    minItems?: number | undefined;
    uniqueItems?: boolean | undefined;
    contains?: JSONSchema7Definition | undefined;

    /**
     * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5
     */
    maxProperties?: number | undefined;
    minProperties?: number | undefined;
    required?: string[] | undefined;
    properties?: {
        [key: string]: JSONSchema7Definition;
    } | undefined;
    patternProperties?: {
        [key: string]: JSONSchema7Definition;
    } | undefined;
    additionalProperties?: JSONSchema7Definition | undefined;
    dependencies?: {
        [key: string]: JSONSchema7Definition | string[];
    } | undefined;
    propertyNames?: JSONSchema7Definition | undefined;

    /**
     * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6
     */
    if?: JSONSchema7Definition | undefined;
    then?: JSONSchema7Definition | undefined;
    else?: JSONSchema7Definition | undefined;

    /**
     * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7
     */
    allOf?: JSONSchema7Definition[] | undefined;
    anyOf?: JSONSchema7Definition[] | undefined;
    oneOf?: JSONSchema7Definition[] | undefined;
    not?: JSONSchema7Definition | undefined;

    /**
     * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
     */
    format?: string | undefined;

    /**
     * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8
     */
    contentMediaType?: string | undefined;
    contentEncoding?: string | undefined;

    /**
     * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9
     */
    definitions?: {
        [key: string]: JSONSchema7Definition;
    } | undefined;

    /**
     * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10
     */
    title?: string | undefined;
    description?: string | undefined;
    default?: JSONSchema7Type | undefined;
    readOnly?: boolean | undefined;
    writeOnly?: boolean | undefined;
    examples?: JSONSchema7Type | undefined;
}

declare interface JSONSchema7Array extends Array<JSONSchema7Type> {}

/**
 * JSON Schema v7
 * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
 */
declare type JSONSchema7Definition = JSONSchema7 | boolean;

declare interface JSONSchema7Object {
    [key: string]: JSONSchema7Type;
}

/**
 * Primitive type
 * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
 */
declare type JSONSchema7Type =
| string //
| number
| boolean
| JSONSchema7Object
| JSONSchema7Array
| null;

/**
 * Primitive type
 * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
 */
declare type JSONSchema7TypeName =
| "string" //
| "number"
| "integer"
| "boolean"
| "object"
| "array"
| "null";

/**
 * Meta schema
 *
 * Recommended values:
 * - 'http://json-schema.org/schema#'
 * - 'http://json-schema.org/hyper-schema#'
 * - 'http://json-schema.org/draft-07/schema#'
 * - 'http://json-schema.org/draft-07/hyper-schema#'
 *
 * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
 */
declare type JSONSchema7Version = string;

declare type KeyValuePanelItem = {
    kind: typeof panelKind.ATTRIBUTE;
    title?: string;
    titleTranslationKey?: string;
    label: string;
    labelTranslationKey?: string;
    value: string;
    withCopyButton?: boolean;
    copyContent?: string;
};

declare type Location_2 = {
    file?: string;
    start: LocationEdge;
    end: LocationEdge;
};

declare type LocationEdge = {
    line: number;
    character?: number;
};

declare type LocationsPanelItem = {
    kind: typeof panelKind.LOCATIONS;
    locations: string[];
};

declare type LocationsPanelNode = SingleChildPanelBase<typeof panelKind.LOCATIONS>;

declare type MarkdocNode = {
    nodeType: typeof nodeTypes.MARKDOC;
    content: string | Node_2[] | Node_2;
};

declare type MarkdownAdapter = {
    parse: (source: unknown) => unknown;
    render: MarkdownRenderer;
};

/**
 * Turns a raw markdown string into an AST. api-docs core does not bundle a markdown engine — the
 * host supplies the parser (the standalone build supplies a Markdoc-based one; see
 * `markdocParser`). It is the single seam where markdown text becomes an AST.
 */
declare type MarkdownParser = (markdown: string, sanitizeOptions?: {
    sanitize?: ApiDocsOptions['sanitize'];
}) => Node_2 | Node_2[] | undefined;

/**
 * Host-provided markdown handling. api-docs core does not bundle a markdown engine — embedders
 * supply an adapter so they own how descriptions become React:
 * - `parse` normalizes a source — a raw markdown string, or an already-parsed AST — into whatever
 *   `render` consumes. It is opaque to api-docs. Item descriptions are parsed at build, so they
 *   reach `parse` as ASTs; the lazily-rendered schema descriptions reach it as raw strings.
 * - `render` turns the parsed value into React.
 *
 * The standalone build supplies a Markdoc-based adapter (`createMarkdocAdapter`). Embedders that
 * pre-parse upstream supply a `parse` no-op plus their own `render`, so the Markdoc
 * parser never enters their client bundle.
 */
declare type MarkdownRenderer = (parsed: unknown) => ReactNode;

declare type MaybePromise<T> = T | Promise<T>;

declare type McpData = {
    tools?: McpTool[];
    resources?: McpResource[];
    prompts?: McpPrompt[];
};

declare type McpExampleNode = SingleChildPanelBase<typeof panelKind.MCP_EXAMPLE>;

declare type McpExamplePanelItem = {
    kind: typeof panelKind.MCP_EXAMPLE;
    headerTitleTranslationKey: string;
    data: unknown;
    language?: string;
};

declare type McpNode = MultiChildPanelBase<typeof panelKind.ATTRIBUTE | typeof panelKind.TAGS | typeof panelKind.EXTERNAL_LINK | typeof panelKind.CONNECT_MCP_BUTTON>;

declare type McpPanelItem = KeyValuePanelItem | TagsPanelItem | ExternalLinkPanelItem | ConnectMcpButtonPanelItem;

declare type McpPrompt = {
    name: string;
    title?: string;
    description: string | Node_2[] | Node_2;
    arguments: McpPromptArgument[];
    security?: OpenAPISecurityRequirement[];
    tags?: string[];
    'x-badges'?: OpenAPIXBadges[];
};

declare type McpPromptArgument = {
    name: string;
    description: string | Node_2[] | Node_2;
    required: boolean;
    example?: string;
};

declare type McpResource = {
    name: string;
    title?: string;
    description?: string | Node_2[] | Node_2;
    uri: string;
    mimeType: string;
    blob?: string;
    text?: string;
    security?: OpenAPISecurityRequirement[];
    tags?: string[];
    'x-badges'?: OpenAPIXBadges[];
};

declare type McpTool = {
    name: string;
    title?: string;
    description?: string | Node_2[] | Node_2;
    inputSchema: OpenAPISchema;
    outputSchema?: OpenAPISchema;
    security?: OpenAPISecurityRequirement[];
    tags?: string[];
    'x-badges'?: OpenAPIXBadges[];
};

declare type MediaTypeContent = {
    schemaId?: string;
    exampleIds?: string[];
    encoding?: Record<string, FormFieldEncoding>;
};

declare type MediaTypeEntry = {
    schemaId?: string;
    exampleIds?: string[];
    encoding?: Record<string, FormFieldEncoding>;
};

declare type MessageBindingData = {
    bindingKey: string;
    bindingValue: Record<string, unknown>;
    keySchemaId?: string;
};

declare type MessageBindingNode = SingleChildPanelBase<typeof panelKind.MESSAGE_BINDING>;

declare type MessageBindingPanelItem = {
    kind: typeof panelKind.MESSAGE_BINDING;
    panelLabel?: string;
    bindingsByMessageKey: Record<string, MessageBindingData>;
};

declare type MessageChannelReference = {
    key: string;
    label: string;
    link: string;
};

declare type MessageLinksNode = {
    nodeType: typeof nodeTypes.MESSAGE_LINKS;
    channelLink: string;
    messages: Array<{
        name: string;
        label: string;
    }>;
};

declare type MessageReferencesGroups = {
    exchanges: MessageChannelReference[];
    queues: MessageChannelReference[];
};

declare type MessageReferencesNode = SingleChildPanelBase<typeof panelKind.MESSAGE_REFERENCES>;

declare type MessageReferencesPanelItem = {
    kind: typeof panelKind.MESSAGE_REFERENCES;
    panelLabel?: string;
    referencesByMessageKey: Record<string, MessageReferencesGroups>;
};

declare type MultiChildPanelBase<TKind extends PanelItem['kind']> = {
    title?: string;
    titleTranslationKey?: string;
    children: PanelItemsByKind<TKind>[];
};

declare type MultiFormatSchemaObject = {
    schema: JSONSchema7 | AvroSchema;
    schemaFormat: string;
};

declare class Node_2 implements AstType {
    readonly $$mdtype = "Node";
    attributes: Record<string, any>;
    slots: Record<string, Node_2>;
    children: Node_2[];
    errors: ValidationError[];
    lines: number[];
    type: NodeType;
    tag?: string;
    annotations: AttributeValue[];
    inline: boolean;
    location?: Location_2;
    constructor(type?: NodeType, attributes?: Record<string, any>, children?: Node_2[], tag?: string);
    walk(): Generator<Node_2, void, unknown>;
    push(node: Node_2): void;
    resolve(config?: Config): Node_2;
    findSchema(config?: Config): Schema | undefined;
    transformAttributes(config?: Config): Record<string, any>;
    transformChildren(config: Config): RenderableTreeNode[];
    transform(config: Config): MaybePromise<RenderableTreeNodes>;
}

declare type NodeType = 'blockquote' | 'code' | 'comment' | 'document' | 'em' | 'error' | 'fence' | 'hardbreak' | 'heading' | 'hr' | 'image' | 'inline' | 'item' | 'link' | 'list' | 'node' | 'paragraph' | 's' | 'softbreak' | 'strong' | 'table' | 'tag' | 'tbody' | 'td' | 'text' | 'th' | 'thead' | 'tr';

declare const nodeTypes: {
    readonly CONTAINER: 'container';
    readonly HEADER: 'header';
    readonly EMPTY_MESSAGE: 'empty-message';
    readonly ITEM: 'item-content';
    readonly SECURITY: 'security';
    readonly MARKDOC: 'markdoc';
    readonly ADMONITION: 'admonition';
    readonly OVERVIEW_SECTION_WRAPPER: 'overview-section-wrapper';
    readonly EXTERNAL_DOCS: 'external-docs';
    readonly CHANNEL_ADDRESS: 'channel-address';
    readonly MESSAGE_LINKS: 'message-links';
    readonly INFO_METADATA: 'info-metadata';
    readonly EXTENSIONS: 'extensions';
};

declare type NormalizedDownloadUrl = DownloadUrl & {
    title: string;
};

declare type OAuthFlowsData = {
    implicit?: {
        authorizationUrl?: string;
        refreshUrl?: string;
        scopes: Record<string, string>;
    };
    password?: {
        tokenUrl: string;
        refreshUrl?: string;
        scopes: Record<string, string>;
    };
    clientCredentials?: {
        tokenUrl: string;
        refreshUrl?: string;
        scopes: Record<string, string>;
    };
    authorizationCode?: {
        authorizationUrl: string;
        tokenUrl: string;
        refreshUrl?: string;
        scopes: Record<string, string>;
        'x-usePkce'?: boolean;
    };
    deviceAuthorization?: {
        deviceAuthorizationUrl: string;
        tokenUrl: string;
        refreshUrl?: string;
        scopes: Record<string, string>;
    };
};

declare type ObjectValues<T> = T[keyof T];

declare type OpenAPIDiscriminator = {
    propertyName: string;
    mapping?: {
        [name: string]: string;
    };
    'x-explicitMappingOnly'?: boolean;
    defaultMapping?: string;
};

declare type OpenAPIEncoding = {
    contentType?: string;
    headers?: {
        [name: string]: Referenced<OpenAPIHeader>;
    };
    style?: OpenAPIParameterStyle;
    explode?: boolean;
    allowReserved?: boolean;
};

declare type OpenAPIExample = {
    value?: unknown;
    dataValue?: unknown;
    serializedValue?: string;
    summary?: string;
    description?: string | Node_2[] | Node_2;
    externalValue?: string;
};

declare type OpenAPIExternalDocumentation = {
    description?: string | Node_2[] | Node_2;
    url: string;
};

declare type OpenAPIHeader = Omit<OpenAPIParameter, 'in' | 'name'>;

declare type OpenAPILink = {
    $ref?: string;
};

declare type OpenAPIMediaType = {
    schema?: Referenced<OpenAPISchema>;
    itemSchema?: Referenced<OpenAPISchema>;
    example?: unknown;
    examples?: {
        [name: string]: Referenced<OpenAPIExample>;
    };
    encoding?: {
        [field: string]: OpenAPIEncoding;
    };
};

declare type OpenAPIParameter = {
    name: string;
    in?: OpenAPIParameterLocation;
    description?: string | Node_2[] | Node_2;
    required?: boolean;
    deprecated?: boolean;
    allowEmptyValue?: boolean;
    style?: OpenAPIParameterStyle;
    explode?: boolean;
    allowReserved?: boolean;
    schema?: Referenced<OpenAPISchema>;
    example?: unknown;
    examples?: {
        [media: string]: Referenced<OpenAPIExample>;
    };
    content?: {
        [media: string]: Referenced<OpenAPIMediaType>;
    };
    encoding?: Record<string, OpenAPIEncoding>;
    const?: unknown;
};

declare type OpenAPIParameterLocation = ObjectValues<typeof parameterLocation>;

declare type OpenAPIParameterStyle = 'matrix' | 'label' | 'form' | 'simple' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject';

declare type OpenAPIRef = {
    $ref: string;
    'x-refsStack'?: string[];
    summary?: string;
    description?: string | Node_2[] | Node_2;
};

declare type OpenAPIResponse = {
    description?: string | Node_2[] | Node_2;
    headers?: {
        [name: string]: Referenced<OpenAPIHeader>;
    };
    content?: {
        [mime: string]: Referenced<OpenAPIMediaType>;
    };
    links?: {
        [name: string]: Referenced<OpenAPILink>;
    };
    $ref?: string;
    'x-examples'?: {
        [mime: string]: {
            [name: string]: Referenced<OpenAPIExample>;
        };
    };
    'x-example'?: {
        [mime: string]: unknown;
    };
    'x-summary'?: string;
};

declare type OpenAPISchema = {
    $ref?: string;
    type?: string | string[];
    properties?: {
        [name: string]: OpenAPISchema;
    };
    patternProperties?: {
        [name: string]: OpenAPISchema;
    };
    additionalProperties?: boolean | OpenAPISchema;
    unevaluatedProperties?: boolean | OpenAPISchema;
    description?: string | Node_2[] | Node_2;
    default?: unknown;
    items?: OpenAPISchema | OpenAPISchema[] | boolean;
    required?: string[];
    readOnly?: boolean;
    writeOnly?: boolean;
    deprecated?: boolean;
    format?: string;
    externalDocs?: OpenAPIExternalDocumentation;
    discriminator?: OpenAPIDiscriminator;
    nullable?: boolean;
    oneOf?: OpenAPISchema[];
    anyOf?: OpenAPISchema[];
    allOf?: OpenAPISchema[];
    not?: OpenAPISchema;
    title?: string;
    multipleOf?: number;
    maximum?: number;
    exclusiveMaximum?: boolean | number;
    minimum?: number;
    exclusiveMinimum?: boolean | number;
    maxLength?: number;
    minLength?: number;
    pattern?: string;
    maxItems?: number;
    minItems?: number;
    uniqueItems?: boolean;
    maxProperties?: number;
    minProperties?: number;
    enum?: unknown[];
    example?: unknown;
    examples?: unknown[] | Record<string, ExampleType>;
    const?: string;
    contentEncoding?: string;
    contentMediaType?: string;
    if?: OpenAPISchema;
    else?: OpenAPISchema;
    then?: OpenAPISchema;
    prefixItems?: OpenAPISchema[];
    additionalItems?: OpenAPISchema | boolean;
    xml?: XMLObject;
};

declare type OpenAPISecurityRequirement = {
    [name: string]: string[];
};

declare type OpenAPIXBadges = {
    name: string;
    color?: string;
    position?: 'before' | 'after';
    icon?: string;
    description?: string;
};

declare type OperationBindingNode = SingleChildPanelBase<typeof panelKind.OPERATION_BINDING>;

declare type OperationBindingPanelItem = {
    kind: typeof panelKind.OPERATION_BINDING;
    panelLabel?: string;
    bindingKey: string;
    bindingValue: Record<string, unknown>;
    groupIdSchemaId?: string;
    clientIdSchemaId?: string;
};

declare type OverviewNode = MultiChildPanelBase<typeof panelKind.EXTERNAL_LINK | typeof panelKind.EMAIL | typeof panelKind.ATTRIBUTE>;

declare type OverviewPanelItem = ExternalLinkPanelItem | EmailPanelItem | KeyValuePanelItem;

declare type OverviewSectionWrapperNode = {
    nodeType: typeof nodeTypes.OVERVIEW_SECTION_WRAPPER;
    children: ContentNode[];
    sectionId: string;
};

declare type PanelItem = DownloadPanelItem | OverviewPanelItem | ServersPanelItem | BrokersPanelItem | ChannelBindingPanelItem | OperationBindingPanelItem | MessageBindingPanelItem | MessageReferencesPanelItem | McpPanelItem | McpExamplePanelItem | ExamplePanelItem | ReferencesPanelItem | LocationsPanelItem | GroupItemsPanelItem;

declare type PanelItemsByKind<TKind extends PanelItem['kind']> = Extract<PanelItem, {
    kind: TKind;
}>;

declare const panelKind: {
    readonly LOCATIONS: 'locations';
    readonly GROUP_ITEMS: 'group-items';
    readonly EXTERNAL_LINK: 'externallink';
    readonly EMAIL: 'email';
    readonly PAYLOAD: 'payload';
    readonly TAGS: 'tags';
    readonly CONNECT_MCP_BUTTON: 'connect-mcp-button';
    readonly ATTRIBUTE: 'attribute';
    readonly DOWNLOAD: 'download';
    readonly SERVERS: 'servers';
    readonly BROKERS: 'brokers';
    readonly CHANNEL_BINDING: 'channel-binding';
    readonly OPERATION_BINDING: 'operation-binding';
    readonly MESSAGE_BINDING: 'message-binding';
    readonly MESSAGE_REFERENCES: 'message-references';
    readonly REFERENCES: 'references';
    readonly CODE_SAMPLE: 'code-sample';
    readonly CALLBACK_PAYLOAD: 'callback-payload';
    readonly RESPONSE: 'response';
    readonly GRAPHQL_QUERY: 'graphql-query';
    readonly GRAPHQL_RESPONSE: 'graphql-response';
    readonly GRAPHQL_VARIABLES: 'graphql-variables';
    readonly GRAPHQL_TYPE_SAMPLE: 'graphql-type-sample';
    readonly MCP_EXAMPLE: 'mcp-example';
};

declare type PanelNode = DownloadNode | ServersNode | BrokersNode | ChannelBindingNode | OperationBindingNode | MessageBindingNode | MessageReferencesNode | OverviewNode | McpNode | ExamplesNode | McpExampleNode | ReferencesNode | LocationsPanelNode | GroupItemNode;

declare type PanelTag = {
    text: string;
    color?: string;
    icon?: string;
};

declare type ParameterData = {
    name: string;
    in?: string;
    style?: string;
    explode?: boolean;
    schemaId: string;
    description?: string | Node_2 | Node_2[];
    required?: boolean;
    deprecated?: boolean;
    example?: unknown;
    examples?: Record<string, ExampleType>;
    badges?: BadgeType[];
    extensions?: Record<string, unknown>;
};

declare type ParameterEntry = {
    name: string;
    in: OpenAPIParameterLocation;
    required?: boolean;
    deprecated?: boolean;
    example?: unknown;
    schemaId?: string;
    serializationMime?: string;
    style?: string;
    explode?: boolean;
    allowReserved?: boolean;
};

declare const parameterLocation: {
    readonly QUERY: 'query';
    readonly HEADER: 'header';
    readonly PATH: 'path';
    readonly COOKIE: 'cookie';
    readonly QUERYSTRING: 'querystring';
};

declare type PayloadExamplesPanelItem = BaseExamplePanelItem & {
    kind: typeof panelKind.PAYLOAD;
    panelLabel?: string;
    exampleIds?: string[];
    mediaTypes?: string[];
    mediaTypeSchemas?: Record<string, MediaTypeContent>;
    messagesByKey?: Record<string, {
        schemaId?: string;
        exampleIds?: string[];
    }>;
};

declare type Primitive = null | boolean | number | string;

declare type ProtocolVariant = ObjectValues<typeof CONST_PROTOCOL_VARIANT>;

declare type RawApiDocsOptions = EditionRedocConfig & EditionAsyncApiConfig & EditionGraphQLConfig & {
    specType: ApiSpecType;
    markdownParser: MarkdownParser;
    basePath?: string;
    hideSchemaPattern?: boolean;
    disableTelemetry?: boolean;
    requiredPropsFirst?: boolean;
    protocol?: ProtocolVariant;
    layout?: EditionRedocConfig['layout'] | EditionAsyncApiConfig['layout'] | EditionGraphQLConfig['layout'];
};

/** A logo as authored, keyed by `url`: OpenAPI `info.x-logo` and the standalone `logo` prop. */
declare type RawLogo = {
    url?: string;
    href?: string;
    altText?: string;
    backgroundColor?: string;
};

declare type RedoclyApiDocsStandaloneProps = {
    items: ApiItem[];
    store: ApiStore;
    basePath: string;
    options: RawApiDocsOptions;
    logo?: RawLogo;
    telemetryConfig?: Partial<RedocTelemetryConfig>;
    markdownAdapter?: MarkdownAdapter;
    spec?: Record<string, unknown> | string;
    specUrl?: string;
    buildTimings?: BuildTimings;
};

/** Loads and bundles the spec, builds the item model, and renders `RedoclyApiDocsStandalone`. */
export declare const RedocStandalone: ({ spec, specUrl, options, basePath, logo, markdownAdapter, onLoaded, children, }: RedocStandaloneProps) => ReactElement | null;

export declare type RedocStandaloneProps = {
    /** Parsed API description object, its JSON or YAML text, or a GraphQL SDL string. */
    spec?: Record<string, unknown> | string;
    /** URL of the API description. Ignored when `spec` is provided. */
    specUrl?: string;
    options?: Partial<RawApiDocsOptions>;
    basePath?: string;
    logo?: RedoclyApiDocsStandaloneProps['logo'];
    markdownAdapter?: MarkdownAdapter;
    onLoaded?: (error?: Error) => void;
    /** Rendered while the spec is loading. */
    children?: ReactNode;
};

declare interface RedocTelemetryConfig {
    specType?: SpecType;
    collectorUrl?: string;
    serviceName?: string;
    disabled?: boolean;
    serviceVersion?: string;
    typeOfUsage?: TypeOfUsage;
    beforeSend?: BeforeSend;
}

declare type Referenced<T> = T | OpenAPIRef;

declare type ReferencesNode = SingleChildPanelBase<typeof panelKind.REFERENCES>;

declare type ReferencesPanelItem = {
    kind: typeof panelKind.REFERENCES;
    graphqlTypeName?: string;
    references: {
        name: string;
        pointer: string;
        field?: string;
    }[];
};

declare type RenderableTreeNode = Tag | Scalar;

declare type RenderableTreeNodes = RenderableTreeNode | RenderableTreeNode[];

declare type ResponseCodeEntry = {
    code: string;
    schemaId?: string;
    exampleIds?: string[];
    mediaTypes?: string[];
    mediaTypeContent?: Record<string, MediaTypeContent>;
};

declare type ResponseExamplesPanelItem = BaseExamplePanelItem & {
    kind: typeof panelKind.RESPONSE;
    exampleIds?: string[];
    responseCodes?: ResponseCodeEntry[];
    /** Webhook response: the client sends it, so samples drop readOnly like a request. */
    isEvent?: boolean;
    hideHeaderTitle?: boolean;
};

declare type Scalar = Primitive | Scalar[] | {
    [key: string]: Scalar;
};

declare type Schema<C extends Config = Config, R = string> = {
    render?: R;
    children?: string[];
    attributes?: Record<string, SchemaAttribute>;
    slots?: Record<string, SchemaSlot>;
    selfClosing?: boolean;
    inline?: boolean;
    transform?(node: Node_2, config: C): MaybePromise<RenderableTreeNodes>;
    validate?(node: Node_2, config: C): MaybePromise<ValidationError[]>;
    description?: string;
};

declare type SchemaAttribute = {
    type?: ValidationType | ValidationType[];
    render?: boolean | string;
    default?: any;
    required?: boolean;
    matches?: SchemaMatches | ((config: Config) => SchemaMatches);
    validate?(value: any, config: Config, name: string): ValidationError[];
    errorLevel?: ValidationError['level'];
    description?: string;
};

declare type SchemaEntry = {
    id: string;
    kind: SchemaKind;
    title?: string;
    data: Record<string, unknown>;
};

declare type SchemaKind = ObjectValues<typeof schemaKind>;

declare const schemaKind: {
    readonly JSON_SCHEMA: 'json-schema';
    readonly GRAPHQL_TYPE: 'graphql-type';
};

declare type SchemaMatches = RegExp | string[] | null;

declare type SchemaSlot = {
    render?: boolean | string;
    required?: boolean;
};

declare type SecurityNode = {
    nodeType: typeof nodeTypes.SECURITY;
    requirements: SecurityRequirementDetail[];
};

/** One AND-group: all schemes in the array must be satisfied together */
declare type SecurityRequirement = {
    schemes: SecuritySchemeEntry_2[];
    scopes: string[];
};

/** Schemes required together; separate requirements are alternatives. */
declare type SecurityRequirementDetail = {
    schemes: SecuritySchemeDetail[];
};

declare type SecuritySchemeDetail = {
    name: string;
    type?: string;
    scheme?: string;
    bearerFormat?: string;
    in?: string;
    paramName?: string;
    scopes?: string[];
    description?: string | Node_2[] | Node_2;
    openIdConnectUrl?: string;
    oauth2MetadataUrl?: string;
    flows?: SecuritySchemeEntry['flows'];
    deprecated?: boolean;
};

declare type SecuritySchemeEntry = {
    id: string;
    type: SecuritySchemeType | AsyncApiSecuritySchemeType;
    scheme?: string;
    bearerFormat?: string;
    description?: string | Node_2[] | Node_2;
    in?: SecuritySchemeIn | 'user' | 'password';
    paramName?: string;
    scopes?: string[];
    openIdConnectUrl?: string;
    deprecated?: boolean;
    oauth2MetadataUrl?: string;
    flows?: OAuthFlowsData;
};

declare type SecuritySchemeEntry_2 = {
    id: string;
    type: Exclude<SecuritySchemeType, typeof securitySchemeType.MUTUAL_TLS>;
    name?: string;
    in?: SecuritySchemeIn;
    scheme?: string;
    bearerFormat?: string;
    openIdConnectUrl?: string;
    flows?: OAuthFlowsData;
};

declare type SecuritySchemeIn = ObjectValues<typeof securitySchemeIn>;

declare const securitySchemeIn: {
    readonly QUERY: 'query';
    readonly HEADER: 'header';
    readonly COOKIE: 'cookie';
    readonly QUERYSTRING: 'querystring';
};

declare type SecuritySchemeType = ObjectValues<typeof securitySchemeType>;

declare const securitySchemeType: {
    readonly API_KEY: 'apiKey';
    readonly HTTP: 'http';
    readonly OAUTH2: 'oauth2';
    readonly OPEN_ID_CONNECT: 'openIdConnect';
    readonly MUTUAL_TLS: 'mutualTLS';
};

declare type ServerData = {
    url: string;
    name?: string;
    description?: string;
    variables?: Record<string, {
        enum?: string[];
        default: string;
        description?: string | Node_2[] | Node_2;
        examples?: string[];
    }>;
};

declare type ServerEntry = {
    url: string;
    name?: string;
    description?: string;
    variables?: Record<string, ServerVariable>;
};

declare type ServersNode = SingleChildPanelBase<typeof panelKind.SERVERS>;

declare type ServersPanelItem = {
    kind: typeof panelKind.SERVERS;
    servers: ServerData[];
    mode?: string;
};

declare type ServerVariable = {
    default?: string;
    enum?: string[];
    description?: string;
};

/**
 * A logo normalized to what the `SidebarLogo` component renders, keyed by `imageUrl`.
 * Also the shape of the `apiLogo` option, which is authored this way already.
 */
declare type SidebarLogo = {
    imageUrl?: string;
    href?: string;
    altText?: string;
    backgroundColor?: string;
};

declare type SingleChildPanelBase<TKind extends PanelItem['kind']> = {
    title?: string;
    titleTranslationKey?: string;
    children: [PanelItemsByKind<TKind>];
};

declare type SpecType = 'openapi' | 'asyncapi' | 'graphql';

declare class Tag<N extends string = string, A extends Record<string, any> = Record<string, any>> {
    readonly $$mdtype: "Tag";
    static isTag: (tag: any) => tag is Tag<string, Record<string, any>>;
    name: N;
    attributes: A;
    children: RenderableTreeNode[];
    constructor(name?: N, attributes?: A, children?: RenderableTreeNode[]);
}

declare type TagsPanelItem = {
    kind: typeof panelKind.TAGS;
    title?: string;
    titleTranslationKey?: string;
    tags: PanelTag[];
};

declare type TargetServerSwitchedEvent = AnalyticsEvent & {
    serverUrl: string;
};

declare type TypeOfUsage = 'html' | 'cli' | 'react' | 'init' | 'docker';

declare type ValidationError = {
    id: string;
    level: 'debug' | 'info' | 'warning' | 'error' | 'critical';
    message: string;
    location?: Location_2;
};

declare type ValidationType = CustomAttributeType | typeof String | typeof Number | typeof Boolean | typeof Object | typeof Array | 'String' | 'Number' | 'Boolean' | 'Object' | 'Array';

declare type WithRequired<T, K extends keyof T> = T & {
    [P in K]-?: T[P];
};

declare type XMLNodeType = 'element' | 'attribute' | 'text' | 'cdata' | 'none';

declare type XMLObject = {
    nodeType?: XMLNodeType;
    name?: string;
    namespace?: string;
    prefix?: string;
    /** @deprecated Use nodeType: "attribute" instead */
    attribute?: boolean;
    /** @deprecated Use nodeType: "element" instead (for wrapped arrays) */
    wrapped?: boolean;
};

export { }