/** * @generated by cli:generate:telemetry-client (openapigen) * Source: apps/cli/specs/telemetry-openapi.json * Regenerate: pnpm exec nx run cli:generate:telemetry-client * DO NOT EDIT - changes are overwritten on regeneration. */ import * as Effect from "effect/Effect"; import type { SchemaError } from "effect/Schema"; import * as Schema from "effect/Schema"; import type * as HttpClient from "effect/unstable/http/HttpClient"; import * as HttpClientError from "effect/unstable/http/HttpClientError"; import * as HttpClientRequest from "effect/unstable/http/HttpClientRequest"; import * as HttpClientResponse from "effect/unstable/http/HttpClientResponse"; export type TelemetryMetaResponse = { readonly ok: true; readonly service: "telemetry"; readonly message: string; readonly docs: string | null; readonly openapi: string | null; }; export declare const TelemetryMetaResponse: Schema.Struct<{ readonly ok: Schema.Literal; readonly service: Schema.Literal<"telemetry">; readonly message: Schema.String; readonly docs: Schema.Union; readonly openapi: Schema.Union; }>; export type DecodeErrorResponseEncoded = { readonly kind: "DecodeErrorResponse"; readonly type: string; readonly title: string; readonly status: number; readonly detail: string; readonly instance?: string; readonly code: string; }; export declare const DecodeErrorResponseEncoded: Schema.Struct<{ readonly kind: Schema.Literal<"DecodeErrorResponse">; readonly type: Schema.String; readonly title: Schema.String; readonly status: Schema.Number; readonly detail: Schema.String; readonly instance: Schema.optionalKey; readonly code: Schema.String; }>; export type IsoDateTimeString = string; export declare const IsoDateTimeString: Schema.String; export type TelemetryEvent = { readonly eventId: string; readonly event: string; readonly distinctId: string; readonly timestamp: string; readonly properties?: { readonly [x: string]: string | number | boolean | null | ReadonlyArray; }; readonly userProperties?: { readonly set?: { readonly [x: string]: string | number | boolean | null | ReadonlyArray; }; readonly setOnce?: { readonly [x: string]: string | number | boolean | null | ReadonlyArray; }; }; readonly groups?: { readonly [x: string]: string; }; readonly sessionId?: string; readonly anonymous?: boolean; }; export declare const TelemetryEvent: Schema.Struct<{ readonly eventId: Schema.String; readonly event: Schema.String; readonly distinctId: Schema.String; readonly timestamp: Schema.String; readonly properties: Schema.optionalKey, Schema.$Array>]>>>; readonly userProperties: Schema.optionalKey, Schema.$Array>]>>>; readonly setOnce: Schema.optionalKey, Schema.$Array>]>>>; }>>; readonly groups: Schema.optionalKey>; readonly sessionId: Schema.optionalKey; readonly anonymous: Schema.optionalKey; }>; export type TelemetryClientContext = { readonly name: string; readonly version: string; }; export declare const TelemetryClientContext: Schema.Struct<{ readonly name: Schema.String; readonly version: Schema.String; }>; export type TelemetryPayloadTooLargeErrorEncoded = { readonly kind: "TelemetryPayloadTooLargeError"; readonly type: string; readonly title: string; readonly status: number; readonly detail: string; readonly instance?: string; readonly code: string; }; export declare const TelemetryPayloadTooLargeErrorEncoded: Schema.Struct<{ readonly kind: Schema.Literal<"TelemetryPayloadTooLargeError">; readonly type: Schema.String; readonly title: Schema.String; readonly status: Schema.Number; readonly detail: Schema.String; readonly instance: Schema.optionalKey; readonly code: Schema.String; }>; export type TelemetryStackFrame = { readonly filename?: string; readonly function?: string; readonly lineno?: number; readonly colno?: number; readonly absPath?: string; readonly inApp?: boolean; readonly contextLine?: string; readonly preContext?: ReadonlyArray; readonly postContext?: ReadonlyArray; }; export declare const TelemetryStackFrame: Schema.Struct<{ readonly filename: Schema.optionalKey; readonly function: Schema.optionalKey; readonly lineno: Schema.optionalKey; readonly colno: Schema.optionalKey; readonly absPath: Schema.optionalKey; readonly inApp: Schema.optionalKey; readonly contextLine: Schema.optionalKey; readonly preContext: Schema.optionalKey>; readonly postContext: Schema.optionalKey>; }>; export type TelemetryBreadcrumb = { readonly type?: string; readonly category?: string; readonly message?: string; readonly timestamp?: string; readonly level?: "fatal" | "error" | "warning" | "info" | "debug"; readonly data?: { readonly [x: string]: Schema.Json; }; }; export declare const TelemetryBreadcrumb: Schema.Struct<{ readonly type: Schema.optionalKey; readonly category: Schema.optionalKey; readonly message: Schema.optionalKey; readonly timestamp: Schema.optionalKey; readonly level: Schema.optionalKey>; readonly data: Schema.optionalKey>>; }>; export type TelemetryContext = { readonly client: TelemetryClientContext; readonly os?: { readonly name: string; readonly version?: string; }; readonly runtime?: { readonly name: string; readonly version: string; }; readonly device?: { readonly arch: string; }; readonly ide?: { readonly name: string; readonly version: string; }; readonly environment?: string; readonly ci?: boolean; }; export declare const TelemetryContext: Schema.Struct<{ readonly client: Schema.Struct<{ readonly name: Schema.String; readonly version: Schema.String; }>; readonly os: Schema.optionalKey; }>>; readonly runtime: Schema.optionalKey>; readonly device: Schema.optionalKey>; readonly ide: Schema.optionalKey>; readonly environment: Schema.optionalKey; readonly ci: Schema.optionalKey; }>; export type TelemetryErrorContext = { readonly command: string; readonly client: TelemetryClientContext; readonly os?: { readonly name: string; readonly version?: string; }; readonly runtime?: { readonly name: string; readonly version: string; }; readonly device?: { readonly arch: string; }; readonly ide?: { readonly name: string; readonly version: string; }; readonly environment?: string; readonly ci?: boolean; }; export declare const TelemetryErrorContext: Schema.Struct<{ readonly command: Schema.String; readonly client: Schema.Struct<{ readonly name: Schema.String; readonly version: Schema.String; }>; readonly os: Schema.optionalKey; }>>; readonly runtime: Schema.optionalKey>; readonly device: Schema.optionalKey>; readonly ide: Schema.optionalKey>; readonly environment: Schema.optionalKey; readonly ci: Schema.optionalKey; }>; export type TelemetryErrorItem = { readonly message: string; readonly name: string; readonly module?: string; readonly stackFrames?: ReadonlyArray; readonly stack?: string; readonly details?: ReadonlyArray; }; export declare const TelemetryErrorItem: Schema.Struct<{ readonly message: Schema.String; readonly name: Schema.String; readonly module: Schema.optionalKey; readonly stackFrames: Schema.optionalKey; readonly function: Schema.optionalKey; readonly lineno: Schema.optionalKey; readonly colno: Schema.optionalKey; readonly absPath: Schema.optionalKey; readonly inApp: Schema.optionalKey; readonly contextLine: Schema.optionalKey; readonly preContext: Schema.optionalKey>; readonly postContext: Schema.optionalKey>; }>>>; readonly stack: Schema.optionalKey; readonly details: Schema.optionalKey>; }>; export type TelemetryEventsRequest = { readonly events: ReadonlyArray; readonly sentAt?: string; readonly context: TelemetryContext; }; export declare const TelemetryEventsRequest: Schema.Struct<{ readonly events: Schema.$Array, Schema.$Array>]>>>; readonly userProperties: Schema.optionalKey, Schema.$Array>]>>>; readonly setOnce: Schema.optionalKey, Schema.$Array>]>>>; }>>; readonly groups: Schema.optionalKey>; readonly sessionId: Schema.optionalKey; readonly anonymous: Schema.optionalKey; }>>; readonly sentAt: Schema.optionalKey; readonly context: Schema.Struct<{ readonly client: Schema.Struct<{ readonly name: Schema.String; readonly version: Schema.String; }>; readonly os: Schema.optionalKey; }>>; readonly runtime: Schema.optionalKey>; readonly device: Schema.optionalKey>; readonly ide: Schema.optionalKey>; readonly environment: Schema.optionalKey; readonly ci: Schema.optionalKey; }>; }>; export type TelemetryErrorsRequest = { readonly errors: ReadonlyArray; readonly level?: "fatal" | "error" | "warning" | "info" | "debug"; readonly errorClass?: "internal" | "user" | "external"; readonly handled?: boolean; readonly breadcrumbs?: ReadonlyArray; readonly tags?: { readonly [x: string]: string; }; readonly fingerprint?: ReadonlyArray; readonly user?: { readonly id?: string; readonly username?: string; }; readonly sentAt?: string; readonly context: TelemetryErrorContext; }; export declare const TelemetryErrorsRequest: Schema.Struct<{ readonly errors: Schema.$Array; readonly stackFrames: Schema.optionalKey; readonly function: Schema.optionalKey; readonly lineno: Schema.optionalKey; readonly colno: Schema.optionalKey; readonly absPath: Schema.optionalKey; readonly inApp: Schema.optionalKey; readonly contextLine: Schema.optionalKey; readonly preContext: Schema.optionalKey>; readonly postContext: Schema.optionalKey>; }>>>; readonly stack: Schema.optionalKey; readonly details: Schema.optionalKey>; }>>; readonly level: Schema.optionalKey>; readonly errorClass: Schema.optionalKey>; readonly handled: Schema.optionalKey; readonly breadcrumbs: Schema.optionalKey; readonly category: Schema.optionalKey; readonly message: Schema.optionalKey; readonly timestamp: Schema.optionalKey; readonly level: Schema.optionalKey>; readonly data: Schema.optionalKey>>; }>>>; readonly tags: Schema.optionalKey>; readonly fingerprint: Schema.optionalKey>; readonly user: Schema.optionalKey; readonly username: Schema.optionalKey; }>>; readonly sentAt: Schema.optionalKey; readonly context: Schema.Struct<{ readonly command: Schema.String; readonly client: Schema.Struct<{ readonly name: Schema.String; readonly version: Schema.String; }>; readonly os: Schema.optionalKey; }>>; readonly runtime: Schema.optionalKey>; readonly device: Schema.optionalKey>; readonly ide: Schema.optionalKey>; readonly environment: Schema.optionalKey; readonly ci: Schema.optionalKey; }>; }>; export type MetaGet200 = TelemetryMetaResponse; export declare const MetaGet200: Schema.Struct<{ readonly ok: Schema.Literal; readonly service: Schema.Literal<"telemetry">; readonly message: Schema.String; readonly docs: Schema.Union; readonly openapi: Schema.Union; }>; export type MetaGet400 = DecodeErrorResponseEncoded; export declare const MetaGet400: Schema.Struct<{ readonly kind: Schema.Literal<"DecodeErrorResponse">; readonly type: Schema.String; readonly title: Schema.String; readonly status: Schema.Number; readonly detail: Schema.String; readonly instance: Schema.optionalKey; readonly code: Schema.String; }>; export type HealthGetShallowHealth200 = { readonly status: "pass" | "warn" | "fail"; }; export declare const HealthGetShallowHealth200: Schema.Struct<{ readonly status: Schema.Literals; }>; export type HealthGetShallowHealth400 = DecodeErrorResponseEncoded; export declare const HealthGetShallowHealth400: Schema.Struct<{ readonly kind: Schema.Literal<"DecodeErrorResponse">; readonly type: Schema.String; readonly title: Schema.String; readonly status: Schema.Number; readonly detail: Schema.String; readonly instance: Schema.optionalKey; readonly code: Schema.String; }>; export type HealthGetDeepHealthParams = { readonly "x-health-key"?: string | null; }; export declare const HealthGetDeepHealthParams: Schema.Struct<{ readonly "x-health-key": Schema.optionalKey>; }>; export type HealthGetDeepHealth200 = { readonly status: "pass" | "warn" | "fail"; readonly serviceId?: string | null; readonly version?: string | null; readonly releaseId?: string | null; readonly commit?: string | null; readonly environment?: string | null; readonly region?: string | null; readonly checks?: { readonly [x: string]: ReadonlyArray<{ readonly componentName: string; readonly componentType: "datastore" | "system" | "component"; readonly measurementName: string; readonly status: "pass" | "warn" | "fail"; readonly observedValue: number; readonly observedUnit: string; readonly time: IsoDateTimeString; readonly output?: string | null; }>; } | null; readonly output?: string | null; }; export declare const HealthGetDeepHealth200: Schema.Struct<{ readonly status: Schema.Literals; readonly serviceId: Schema.optionalKey>; readonly version: Schema.optionalKey>; readonly releaseId: Schema.optionalKey>; readonly commit: Schema.optionalKey>; readonly environment: Schema.optionalKey>; readonly region: Schema.optionalKey>; readonly checks: Schema.optionalKey; readonly measurementName: Schema.String; readonly status: Schema.Literals; readonly observedValue: Schema.Number; readonly observedUnit: Schema.String; readonly time: Schema.String; readonly output: Schema.optionalKey>; }>>>, Schema.Null]>>; readonly output: Schema.optionalKey>; }>; export type HealthGetDeepHealth400 = DecodeErrorResponseEncoded; export declare const HealthGetDeepHealth400: Schema.Struct<{ readonly kind: Schema.Literal<"DecodeErrorResponse">; readonly type: Schema.String; readonly title: Schema.String; readonly status: Schema.Number; readonly detail: Schema.String; readonly instance: Schema.optionalKey; readonly code: Schema.String; }>; export type HealthGetObservabilityVerificationParams = { readonly "x-health-key"?: string | null; readonly level?: string | null; readonly scenario?: "effect-handled-500" | "surface-unhandled-500" | null; readonly scenarioId?: string | null; }; export declare const HealthGetObservabilityVerificationParams: Schema.Struct<{ readonly "x-health-key": Schema.optionalKey>; readonly level: Schema.optionalKey>; readonly scenario: Schema.optionalKey, Schema.Null]>>; readonly scenarioId: Schema.optionalKey>; }>; export type HealthGetObservabilityVerification200 = { readonly status: "ok" | "warn" | "error"; readonly timestamp: IsoDateTimeString; readonly serviceId: string; readonly level: "basic" | "standard" | "full"; readonly checks: { readonly logging?: { readonly status: "ok" | "warn" | "error"; readonly correlationId: string; } | null; readonly tracing?: { readonly status: "ok" | "warn" | "error"; readonly traceId?: string | null; readonly message?: string | null; } | null; readonly metrics?: { readonly status: "ok" | "warn" | "error"; readonly counter: string; } | null; readonly errors?: { readonly status: "ok" | "warn" | "error"; readonly sentryEventId?: string | null; readonly reason?: "sentry-issue-reporter-disabled" | null; readonly message?: string | null; } | null; }; }; export declare const HealthGetObservabilityVerification200: Schema.Struct<{ readonly status: Schema.Literals; readonly timestamp: Schema.String; readonly serviceId: Schema.String; readonly level: Schema.Literals; readonly checks: Schema.Struct<{ readonly logging: Schema.optionalKey; readonly correlationId: Schema.String; }>, Schema.Null]>>; readonly tracing: Schema.optionalKey; readonly traceId: Schema.optionalKey>; readonly message: Schema.optionalKey>; }>, Schema.Null]>>; readonly metrics: Schema.optionalKey; readonly counter: Schema.String; }>, Schema.Null]>>; readonly errors: Schema.optionalKey; readonly sentryEventId: Schema.optionalKey>; readonly reason: Schema.optionalKey, Schema.Null]>>; readonly message: Schema.optionalKey>; }>, Schema.Null]>>; }>; }>; export type HealthGetObservabilityVerification400 = DecodeErrorResponseEncoded; export declare const HealthGetObservabilityVerification400: Schema.Struct<{ readonly kind: Schema.Literal<"DecodeErrorResponse">; readonly type: Schema.String; readonly title: Schema.String; readonly status: Schema.Number; readonly detail: Schema.String; readonly instance: Schema.optionalKey; readonly code: Schema.String; }>; export type EventsIngestRequestJson = TelemetryEventsRequest; export declare const EventsIngestRequestJson: Schema.Struct<{ readonly events: Schema.$Array, Schema.$Array>]>>>; readonly userProperties: Schema.optionalKey, Schema.$Array>]>>>; readonly setOnce: Schema.optionalKey, Schema.$Array>]>>>; }>>; readonly groups: Schema.optionalKey>; readonly sessionId: Schema.optionalKey; readonly anonymous: Schema.optionalKey; }>>; readonly sentAt: Schema.optionalKey; readonly context: Schema.Struct<{ readonly client: Schema.Struct<{ readonly name: Schema.String; readonly version: Schema.String; }>; readonly os: Schema.optionalKey; }>>; readonly runtime: Schema.optionalKey>; readonly device: Schema.optionalKey>; readonly ide: Schema.optionalKey>; readonly environment: Schema.optionalKey; readonly ci: Schema.optionalKey; }>; }>; export type EventsIngest400 = DecodeErrorResponseEncoded; export declare const EventsIngest400: Schema.Struct<{ readonly kind: Schema.Literal<"DecodeErrorResponse">; readonly type: Schema.String; readonly title: Schema.String; readonly status: Schema.Number; readonly detail: Schema.String; readonly instance: Schema.optionalKey; readonly code: Schema.String; }>; export type EventsIngest413 = TelemetryPayloadTooLargeErrorEncoded; export declare const EventsIngest413: Schema.Struct<{ readonly kind: Schema.Literal<"TelemetryPayloadTooLargeError">; readonly type: Schema.String; readonly title: Schema.String; readonly status: Schema.Number; readonly detail: Schema.String; readonly instance: Schema.optionalKey; readonly code: Schema.String; }>; export type ErrorsIngestRequestJson = TelemetryErrorsRequest; export declare const ErrorsIngestRequestJson: Schema.Struct<{ readonly errors: Schema.$Array; readonly stackFrames: Schema.optionalKey; readonly function: Schema.optionalKey; readonly lineno: Schema.optionalKey; readonly colno: Schema.optionalKey; readonly absPath: Schema.optionalKey; readonly inApp: Schema.optionalKey; readonly contextLine: Schema.optionalKey; readonly preContext: Schema.optionalKey>; readonly postContext: Schema.optionalKey>; }>>>; readonly stack: Schema.optionalKey; readonly details: Schema.optionalKey>; }>>; readonly level: Schema.optionalKey>; readonly errorClass: Schema.optionalKey>; readonly handled: Schema.optionalKey; readonly breadcrumbs: Schema.optionalKey; readonly category: Schema.optionalKey; readonly message: Schema.optionalKey; readonly timestamp: Schema.optionalKey; readonly level: Schema.optionalKey>; readonly data: Schema.optionalKey>>; }>>>; readonly tags: Schema.optionalKey>; readonly fingerprint: Schema.optionalKey>; readonly user: Schema.optionalKey; readonly username: Schema.optionalKey; }>>; readonly sentAt: Schema.optionalKey; readonly context: Schema.Struct<{ readonly command: Schema.String; readonly client: Schema.Struct<{ readonly name: Schema.String; readonly version: Schema.String; }>; readonly os: Schema.optionalKey; }>>; readonly runtime: Schema.optionalKey>; readonly device: Schema.optionalKey>; readonly ide: Schema.optionalKey>; readonly environment: Schema.optionalKey; readonly ci: Schema.optionalKey; }>; }>; export type ErrorsIngest400 = DecodeErrorResponseEncoded; export declare const ErrorsIngest400: Schema.Struct<{ readonly kind: Schema.Literal<"DecodeErrorResponse">; readonly type: Schema.String; readonly title: Schema.String; readonly status: Schema.Number; readonly detail: Schema.String; readonly instance: Schema.optionalKey; readonly code: Schema.String; }>; export interface OperationConfig { /** * Whether or not the response should be included in the value returned from * an operation. * * If set to `true`, a tuple of `[A, HttpClientResponse]` will be returned, * where `A` is the success type of the operation. * * If set to `false`, only the success type of the operation will be returned. */ readonly includeResponse?: boolean | undefined; } /** * A utility type which optionally includes the response in the return result * of an operation based upon the value of the `includeResponse` configuration * option. */ export type WithOptionalResponse = Config extends { readonly includeResponse: true; } ? [A, HttpClientResponse.HttpClientResponse] : A; export declare const make: (httpClient: HttpClient.HttpClient, options?: { readonly transformClient?: ((client: HttpClient.HttpClient) => Effect.Effect) | undefined; }) => TelemetryClient; export interface TelemetryClient { readonly httpClient: HttpClient.HttpClient; /** * Returns service metadata and the documentation entrypoints. */ readonly MetaGet: (options: { readonly config?: Config | undefined; } | undefined) => Effect.Effect, HttpClientError.HttpClientError | SchemaError | TelemetryClientError<"MetaGet400", typeof MetaGet400.Type>>; /** * Returns pass/fail status. Public, no auth required. */ readonly HealthGetShallowHealth: (options: { readonly config?: Config | undefined; } | undefined) => Effect.Effect, HttpClientError.HttpClientError | SchemaError | TelemetryClientError<"HealthGetShallowHealth400", typeof HealthGetShallowHealth400.Type>>; /** * Returns IETF health+json response with per-dependency check results. Requires X-Health-Key header. */ readonly HealthGetDeepHealth: (options: { readonly params?: typeof HealthGetDeepHealthParams.Encoded | undefined; readonly config?: Config | undefined; } | undefined) => Effect.Effect, HttpClientError.HttpClientError | SchemaError | TelemetryClientError<"HealthGetDeepHealth400", typeof HealthGetDeepHealth400.Type>>; /** * Exercises observability pipelines and can simulate server error scenarios. Requires X-Health-Key header. */ readonly HealthGetObservabilityVerification: (options: { readonly params?: typeof HealthGetObservabilityVerificationParams.Encoded | undefined; readonly config?: Config | undefined; } | undefined) => Effect.Effect, HttpClientError.HttpClientError | SchemaError | TelemetryClientError<"HealthGetObservabilityVerification400", typeof HealthGetObservabilityVerification400.Type>>; /** * Accepts a JSON batch of telemetry events. Content-Type must be application/json. Payloads exceeding 64 KB are rejected with 413. */ readonly EventsIngest: (options: { readonly payload: typeof EventsIngestRequestJson.Encoded; readonly config?: Config | undefined; }) => Effect.Effect, HttpClientError.HttpClientError | SchemaError | TelemetryClientError<"EventsIngest400", typeof EventsIngest400.Type> | TelemetryClientError<"EventsIngest413", typeof EventsIngest413.Type>>; /** * Accepts telemetry error reports as JSON. * * **PII and secret filtering.** The server stores and forwards error reports * as-is; it does not scrub, redact, or transform payload contents. Clients * are responsible for stripping secrets, credentials, tokens, and personally * identifiable information before submission. In particular: * * - Remove environment variables, auth tokens, and API keys from stack traces, * breadcrumb data, and tags before sending. * - The `user` field should contain only opaque identifiers (user ID or handle), * never email addresses, real names, or other PII. * - Breadcrumb `data` maps must not include request/response bodies that may * carry user-generated content or credentials. * - The `context` fields (os, runtime, device, ide) are considered low-risk * metadata but should still be reviewed for unexpected PII. */ readonly ErrorsIngest: (options: { readonly payload: typeof ErrorsIngestRequestJson.Encoded; readonly config?: Config | undefined; }) => Effect.Effect, HttpClientError.HttpClientError | SchemaError | TelemetryClientError<"ErrorsIngest400", typeof ErrorsIngest400.Type>>; } export interface TelemetryClientError { readonly _tag: Tag; readonly request: HttpClientRequest.HttpClientRequest; readonly response: HttpClientResponse.HttpClientResponse; readonly cause: E; } export declare const TelemetryClientError: (tag: Tag, cause: E, response: HttpClientResponse.HttpClientResponse) => TelemetryClientError; //# sourceMappingURL=telemetry-client.d.ts.map