import { z } from '#compiled/zod/index.js'; import type { PaginatedResponse, PaginationOptions } from './shared.js'; export declare const AnalyticsRunSchema: z.ZodObject<{ runId: z.ZodString; status: z.ZodEnum<{ pending: "pending"; running: "running"; completed: "completed"; failed: "failed"; cancelled: "cancelled"; }>; deploymentId: z.ZodString; workflowName: z.ZodString; specVersion: z.ZodOptional>; attributes: z.ZodDefault>; createdAt: z.ZodPipe, z.ZodCoercedDate>; updatedAt: z.ZodPipe, z.ZodCoercedDate>; startedAt: z.ZodOptional, z.ZodCoercedDate>>>; completedAt: z.ZodOptional, z.ZodCoercedDate>>>; errorCode: z.ZodOptional>; workflowCoreVersion: z.ZodOptional>; workflowEncryptionEnabled: z.ZodOptional>; }, z.core.$strip>; export declare const AnalyticsStepSchema: z.ZodObject<{ runId: z.ZodString; stepId: z.ZodString; stepName: z.ZodOptional>; status: z.ZodEnum<{ pending: "pending"; running: "running"; completed: "completed"; failed: "failed"; cancelled: "cancelled"; }>; attempt: z.ZodOptional; createdAt: z.ZodPipe, z.ZodCoercedDate>; updatedAt: z.ZodPipe, z.ZodCoercedDate>; startedAt: z.ZodOptional, z.ZodCoercedDate>>>; completedAt: z.ZodOptional, z.ZodCoercedDate>>>; retryAfter: z.ZodOptional, z.ZodCoercedDate>>>; errorCode: z.ZodOptional>; workflowCoreVersion: z.ZodOptional>; workflowEncryptionEnabled: z.ZodOptional>; computeInstanceId: z.ZodOptional>; }, z.core.$strip>; export declare const AnalyticsEventSchema: z.ZodObject<{ runId: z.ZodString; eventId: z.ZodString; eventType: z.ZodEnum<{ run_created: "run_created"; run_started: "run_started"; run_completed: "run_completed"; run_failed: "run_failed"; run_cancelled: "run_cancelled"; attr_set: "attr_set"; step_created: "step_created"; step_completed: "step_completed"; step_failed: "step_failed"; step_retrying: "step_retrying"; step_started: "step_started"; hook_created: "hook_created"; hook_received: "hook_received"; hook_disposed: "hook_disposed"; hook_conflict: "hook_conflict"; wait_created: "wait_created"; wait_completed: "wait_completed"; }>; correlationId: z.ZodOptional>; entityId: z.ZodOptional>; stepName: z.ZodOptional>; workflowName: z.ZodString; deploymentId: z.ZodString; specVersion: z.ZodOptional>; runCreatedAt: z.ZodPipe, z.ZodCoercedDate>; createdAt: z.ZodPipe, z.ZodCoercedDate>; region: z.ZodOptional>; vercelId: z.ZodOptional>; requestId: z.ZodOptional>; computeInstanceId: z.ZodOptional>; resumeAt: z.ZodOptional, z.ZodCoercedDate>>>; retryAfter: z.ZodOptional, z.ZodCoercedDate>>>; errorCode: z.ZodOptional>; workflowCoreVersion: z.ZodOptional>; isWebhook: z.ZodOptional>; isSystem: z.ZodOptional>; workflowEncryptionEnabled: z.ZodOptional>; }, z.core.$strip>; export declare const AnalyticsHookSchema: z.ZodObject<{ runId: z.ZodString; hookId: z.ZodString; status: z.ZodEnum<{ created: "created"; received: "received"; disposed: "disposed"; conflict: "conflict"; }>; createdAt: z.ZodPipe, z.ZodCoercedDate>; updatedAt: z.ZodPipe, z.ZodCoercedDate>; receivedAt: z.ZodOptional, z.ZodCoercedDate>>>; disposedAt: z.ZodOptional, z.ZodCoercedDate>>>; isWebhook: z.ZodOptional>; isSystem: z.ZodOptional>; workflowCoreVersion: z.ZodOptional>; workflowEncryptionEnabled: z.ZodOptional>; }, z.core.$strip>; export declare const AnalyticsWaitSchema: z.ZodObject<{ runId: z.ZodString; waitId: z.ZodString; status: z.ZodEnum<{ completed: "completed"; waiting: "waiting"; }>; resumeAt: z.ZodOptional, z.ZodCoercedDate>>>; createdAt: z.ZodPipe, z.ZodCoercedDate>; updatedAt: z.ZodPipe, z.ZodCoercedDate>; completedAt: z.ZodOptional, z.ZodCoercedDate>>>; workflowCoreVersion: z.ZodOptional>; workflowEncryptionEnabled: z.ZodOptional>; }, z.core.$strip>; export declare const AnalyticsAttributeKeySchema: z.ZodObject<{ key: z.ZodString; runCount: z.ZodCoercedNumber; firstSeenAt: z.ZodCoercedDate; lastSeenAt: z.ZodCoercedDate; }, z.core.$strip>; export type AnalyticsRun = z.infer; export type AnalyticsStep = z.infer; export type AnalyticsEvent = z.infer; export type AnalyticsHook = z.infer; export type AnalyticsWait = z.infer; export type AnalyticsAttributeKey = z.infer; export interface AnalyticsListRunsParams { workflowName?: string; status?: AnalyticsRun['status']; /** * Bound the listing to runs active between `startTime` and `endTime` * (ISO 8601 timestamps). Both must be provided together. A bounded window * lets the backend prune its scan — the ClickHouse-backed Vercel * implementation is significantly faster with one. Requesting a window * older than the plan's observability lookback fails with * `observability-upgrade-required`. */ startTime?: string; endTime?: string; /** * Restrict the listing to runs whose latest attribute snapshot matches * every provided key=value pair (up to 8 pairs). Matching is * latest-write-wins: a run whose attribute moved from `v1` to `v2` no * longer matches `v1`. Reserved `$`-prefixed keys may be used in filters * even though user writes to that namespace are rejected. */ attributes?: Record; pagination?: PaginationOptions; } export interface AnalyticsListAttributesParams { workflowName?: string; /** * Bound the listing to attribute writes between `startTime` and `endTime` * (ISO 8601 timestamps). Both must be provided together. Requesting a * window older than the plan's observability lookback fails with * `observability-upgrade-required`. */ startTime?: string; endTime?: string; pagination?: PaginationOptions; } export interface AnalyticsListRunScopedParams { runId: string; pagination?: PaginationOptions; } export interface AnalyticsListEventsParams extends AnalyticsListRunScopedParams { eventType?: AnalyticsEvent['eventType']; correlationId?: string; } export interface AnalyticsListEventsByCorrelationIdParams { correlationId: string; /** The run the correlation id belongs to; see `ListEventsByCorrelationIdParams`. */ runId: string; pagination?: PaginationOptions; } export interface AnalyticsListHooksParams { runId: string; pagination?: PaginationOptions; } export interface AnalyticsListWaitsParams extends AnalyticsListRunScopedParams { status?: AnalyticsWait['status']; } export interface Analytics { runs: { get(runId: string): Promise; list(params?: AnalyticsListRunsParams): Promise>; }; attributes: { /** * List the distinct attribute keys observed on runs in the window, * with run counts and first/last seen timestamps. Ordered * alphabetically by key. */ list(params?: AnalyticsListAttributesParams): Promise>; }; steps: { get(runId: string, stepId: string): Promise; list(params: AnalyticsListRunScopedParams): Promise>; }; events: { get(runId: string, eventId: string): Promise; list(params: AnalyticsListEventsParams): Promise>; listByCorrelationId(params: AnalyticsListEventsByCorrelationIdParams): Promise>; }; hooks: { get(hookId: string, params?: { runId?: string; }): Promise; list(params: AnalyticsListHooksParams): Promise>; }; waits: { get(runId: string, waitId: string): Promise; list(params: AnalyticsListWaitsParams): Promise>; }; } //# sourceMappingURL=analytics.d.ts.map