/** * 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 CopyCodeSnippetClickedMessage = BaseEventMessage & { type: "com.redocly.copyCodeSnippet.clicked"; /** * @minItems 2 * @maxItems 2 */ data: [ { /** * Identifier for the code snippet that was copied. */ id: string; object: "button"; specType?: SpecificationType; /** * URN identifying the copy code snippet button. */ uri: "urn:redocly:redoc:ui:button:copyCodeSnippetButton"; snippetType: "request" | "response" | "copy"; language?: string; }, PageResource ]; }; /** * 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; } /** * Common page resource describing the page where an event was triggered. When this resource is referenced in a message's `data` array, the generated telemetry client auto-populates it from the current browser location at send time. */ export interface PageResource { /** * Page ID. Defaults to the canonical URI of the current page. */ id: string; /** * Entity name. */ object: "page"; /** * Canonical URI of the page (typically `location.href`). */ uri: string; /** * Document referrer (`document.referrer`) when present, captured at send time. */ referrer?: string; }