import { type ObservabilityTypes } from "@cargo-ai/types"; import { z } from "zod"; import type { ApiType, DateToString } from "../types.js"; import type { Orchestration } from "./orchestration.js"; export declare namespace Observability { type Alert = ApiType; type AlertScope = ApiType; type AlertScopeSpans = ApiType; type AlertScopeRuns = ApiType; type AlertScopeRecords = ApiType; type AlertScopeOrchestrationQuery = ApiType; type AlertScopeStorageQuery = ApiType; type AlertScopeModel = ApiType; type AlertThreshold = ApiType; type AlertTelemetryThreshold = ApiType; type AlertQueryThreshold = ApiType; type AlertModelThreshold = ApiType; type AlertCondition = ApiType; const buildAlertCondition: (scope: ObservabilityTypes.AlertScope, threshold: ObservabilityTypes.AlertThreshold) => ObservabilityTypes.AlertCondition | undefined; type AlertThresholdOperator = ApiType; type AlertDurationAggregation = ApiType; type AlertCreditsAggregation = ApiType; type AlertSchedule = ApiType; type Event = ApiType; type EventStatus = ApiType; namespace Api { type CreateAlertPayload = DateToString<{ name: string; description?: string; cron: string; isEnabled?: boolean; actions?: Orchestration.ConfiguredAction[]; folderUuid?: string; }> & AlertCondition; type CreateAlertResult = { alert: Alert; }; const zodCreateAlertErrorReason: z.ZodEnum<{ folderNotFound: "folderNotFound"; modelNotFound: "modelNotFound"; actionNotFound: "actionNotFound"; invalidCron: "invalidCron"; invalidSql: "invalidSql"; mismatchedThreshold: "mismatchedThreshold"; }>; type ListAlertsResult = { alerts: Alert[]; }; type GetAlertResult = { alert: Alert; }; const zodGetAlertErrorReason: z.ZodEnum<{ alertNotFound: "alertNotFound"; }>; type UpdateAlertPayload = DateToString<{ uuid: string; name?: string; description?: string | null; cron?: string; isEnabled?: boolean; scope?: AlertScope; threshold?: AlertThreshold; actions?: Orchestration.ConfiguredAction[]; folderUuid?: string | null; }>; type UpdateAlertResult = { alert: Alert; }; const zodUpdateAlertErrorReason: z.ZodEnum<{ folderNotFound: "folderNotFound"; modelNotFound: "modelNotFound"; actionNotFound: "actionNotFound"; invalidCron: "invalidCron"; invalidSql: "invalidSql"; mismatchedThreshold: "mismatchedThreshold"; alertNotFound: "alertNotFound"; }>; const zodRemoveAlertErrorReason: z.ZodEnum<{ alertNotFound: "alertNotFound"; }>; type ListEventsPayload = DateToString<{ alertUuid: string; statuses?: EventStatus[]; createdAfter?: Date; createdBefore?: Date; limit?: number; offset?: number; }>; type ListEventsResult = { count: number; events: Event[]; }; type CountEventsPayload = DateToString<{ alertUuid: string; statuses?: EventStatus[]; createdAfter?: Date; createdBefore?: Date; }>; type CountEventsResult = { count: number; }; type PreviewAlertPayload = DateToString<{ windowMinutes: number; }> & AlertCondition; type PreviewAlertResult = { outcome: "empty"; } | { outcome: "notComputed"; computeErrorMessage: string; } | { outcome: "computed"; value: number; total?: number; failed?: number; isBreached: boolean; }; } const alertKeys: { all: (workspaceUuid: string) => readonly ["alerts", string]; get: (workspaceUuid: string, uuid: string) => readonly ["alerts", string, string]; }; const eventKeys: { all: (workspaceUuid: string) => readonly ["events", string]; list: (workspaceUuid: string, payload: Api.ListEventsPayload) => readonly ["events", string, { alertUuid: string; statuses?: EventStatus[] | undefined; createdAfter?: string | undefined; createdBefore?: string | undefined; limit?: number | undefined; offset?: number | undefined; }]; count: (workspaceUuid: string, payload: Api.CountEventsPayload) => readonly ["events", string, { alertUuid: string; statuses?: EventStatus[] | undefined; createdAfter?: string | undefined; createdBefore?: string | undefined; }]; }; } //# sourceMappingURL=observability.d.ts.map