/** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export type InitialMessage = BaseEventMessage & { type: "com.redocly.redoc.initialized"; /** * @minItems 1 * @maxItems 1 */ data: [ { /** * Identifier for the initial event context. */ id: string; object: "initial"; specType?: SpecificationType; /** * The URI of the page where the documentation was initialized. */ uri: string; performanceMetrics?: { cls: number; lcp: number; fcp: number; ttfb: number; }; /** * All custom extensions from the API specification. */ extensions?: string[]; /** * Unique request bodies from the API specification. */ requestBodies?: string[]; authorizations?: ("apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect")[]; typeOfUsage?: "html" | "cli" | "react" | "docker"; /** * The router type used in the documentation. */ router?: "hash" | "history" | "memory"; /** * Number of operations in the API specification. */ operationsCount?: number; /** * The layout type used in the documentation. */ layout?: "stacked" | "three-panel"; /** * The options used in the documentation. */ options?: { [k: string]: unknown; }; } ]; }; /** * The type of API specification being documented. */ export type SpecificationType = "openapi" | "asyncapi" | "graphql"; export interface BaseEventMessage { /** * Event ID. */ id: string; /** * Object type. */ object: "event"; /** * CloudEvents specification version. */ specversion: "1.0"; /** * Data content type. */ datacontenttype: "application/json; charset=utf-8"; /** * Context in which the event happened. Format `urn:redocly:{product}:{component}`. */ source: string; actor: null | { id: string; object: "user" | "webhook" | "cronJob"; uri: string; }; /** * Timestamp of when the event happened. */ time: string; /** * Origin of the event. */ origin: "redocUi"; /** * Telemetry signal kind: log (fire-and-forget event), trace (correlated span), or metric (reserved). */ signal?: "log" | "trace" | "metric"; /** * Session ID. */ sessionId?: string; /** * Deployment environment. */ env: string; }