export declare const TELEMETRY_PRODUCERS: readonly ["cli", "data_connect", "personal_server"]; export type TelemetryProducer = (typeof TELEMETRY_PRODUCERS)[number]; export declare const TELEMETRY_ERROR_CLASSES: readonly ["auth_failed", "rate_limited", "upstream_error", "navigation_error", "network_error", "selector_error", "timeout", "protocol_violation", "runtime_error", "personal_server_unavailable", "unknown"]; export type TelemetryErrorClass = (typeof TELEMETRY_ERROR_CLASSES)[number]; export declare const TELEMETRY_CANCELLATION_REASONS: readonly ["user_aborted", "abandoned", "timeout"]; export type TelemetryCancellationReason = (typeof TELEMETRY_CANCELLATION_REASONS)[number]; export declare const TELEMETRY_INTERACTION_KINDS: readonly ["login", "otp", "captcha", "manual_action"]; export type TelemetryInteractionKind = (typeof TELEMETRY_INTERACTION_KINDS)[number]; export declare const TELEMETRY_SYNC_SKIP_REASONS: readonly ["server_unavailable", "not_requested"]; export type TelemetrySyncSkipReason = (typeof TELEMETRY_SYNC_SKIP_REASONS)[number]; export declare const TELEMETRY_OS_VALUES: readonly ["linux", "macos", "windows"]; export type TelemetryOs = (typeof TELEMETRY_OS_VALUES)[number]; export declare const TELEMETRY_ARCH_VALUES: readonly ["x86_64", "arm64"]; export type TelemetryArch = (typeof TELEMETRY_ARCH_VALUES)[number]; export interface TelemetryIdentity { eventId: string; eventVersion: number; } export interface TelemetryTime { occurredAt: string; durationMs?: number; } export interface TelemetryAttribution { producer: TelemetryProducer; installId: string; appSessionId?: string; } export interface TelemetryContext { hostPlatform: string; os: TelemetryOs; arch: TelemetryArch; producerVersion: string; connectorVersion?: string; authMode?: string; } export type TelemetryCorrelation = { scope: "host"; hostRunId: string; } | { scope: "collection"; hostRunId: string; collectionRunId: string; source: string; } | { scope: "sync"; hostRunId: string; syncRunId: string; source: string; collectionRunId?: string; } | { scope: "grant"; hostRunId: string; grantFlowId: string; }; export type TelemetryKind = { lifecycle: "host"; phase: "started"; } | { lifecycle: "host"; phase: "terminal"; outcome: "success"; } | { lifecycle: "host"; phase: "terminal"; outcome: "failure"; errorClass: TelemetryErrorClass; } | { lifecycle: "collection"; phase: "started"; } | { lifecycle: "collection"; phase: "needs_input"; interactionKind?: TelemetryInteractionKind; } | { lifecycle: "collection"; phase: "terminal"; outcome: "success"; recordCount?: number; } | { lifecycle: "collection"; phase: "terminal"; outcome: "failure"; errorClass: TelemetryErrorClass; } | { lifecycle: "collection"; phase: "terminal"; outcome: "cancelled"; reason?: TelemetryCancellationReason; } | { lifecycle: "sync"; phase: "started"; } | { lifecycle: "sync"; phase: "terminal"; outcome: "success"; storedScopeCount: number; failedScopeCount: number; } | { lifecycle: "sync"; phase: "terminal"; outcome: "failure"; errorClass: TelemetryErrorClass; } | { lifecycle: "sync"; phase: "skipped"; reason: TelemetrySyncSkipReason; } | { lifecycle: "grant"; phase: "started"; } | { lifecycle: "grant"; phase: "terminal"; outcome: "approved"; } | { lifecycle: "grant"; phase: "terminal"; outcome: "denied"; } | { lifecycle: "grant"; phase: "terminal"; outcome: "expired"; } | { lifecycle: "grant"; phase: "terminal"; outcome: "failure"; errorClass: TelemetryErrorClass; }; export interface TelemetryEvent { identity: TelemetryIdentity; time: TelemetryTime; attribution: TelemetryAttribution; context: TelemetryContext; correlation: TelemetryCorrelation; kind: TelemetryKind; debug?: string; extensions?: Record; } export interface TelemetryBatch { batchId: string; sentAt: string; events: TelemetryEvent[]; } export declare const TELEMETRY_ENDPOINT = "https://telemetry.opendatalabs.com/v1/telemetry/events"; export declare const TELEMETRY_EVENT_VERSION = 1; export declare const TELEMETRY_PRODUCER_NAME: TelemetryProducer; //# sourceMappingURL=telemetry-contract.d.ts.map