@cargo-ai/api 1.0.52 → 1.0.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import type { Ai, Billing, Connection, Content, Hosting, Orchestration, RevenueOrganization, Segmentation, Storage, SystemOfRecordIntegration, WorkspaceManagement } from "../domains/index.js";
1
+ import type { Ai, Billing, Connection, Content, Hosting, Observability, Orchestration, RevenueOrganization, Segmentation, Storage, SystemOfRecordIntegration, WorkspaceManagement } from "../domains/index.js";
2
2
  import type { ClientTransport, FetcherOrigin } from "../fetcher/index.js";
3
3
  import type { ApiType } from "../types.js";
4
4
  import type { AiApi } from "./ai/index.js";
@@ -9,6 +9,7 @@ import type { ContextApi } from "./context/index.js";
9
9
  import type { DomainManagementApi } from "./domainManagement/index.js";
10
10
  import type { ExpressionApi } from "./expression/index.js";
11
11
  import type { HostingApi } from "./hosting/index.js";
12
+ import type { ObservabilityApi } from "./observability/index.js";
12
13
  import type { OrchestrationApi } from "./orchestration/index.js";
13
14
  import type { RevenueOrganizationApi } from "./revenueOrganization/index.js";
14
15
  import type { SegmentationApi } from "./segmentation/index.js";
@@ -24,6 +25,7 @@ export * from "./context/index.js";
24
25
  export * from "./domainManagement/index.js";
25
26
  export * from "./expression/index.js";
26
27
  export * from "./hosting/index.js";
28
+ export * from "./observability/index.js";
27
29
  export * from "./orchestration/index.js";
28
30
  export * from "./revenueOrganization/index.js";
29
31
  export * from "./segmentation/index.js";
@@ -62,6 +64,7 @@ export interface Api {
62
64
  context: ContextApi;
63
65
  expression: ExpressionApi;
64
66
  systemOfRecordIntegration: SystemOfRecordIntegrationApi;
67
+ observability: ObservabilityApi;
65
68
  orchestration: OrchestrationApi;
66
69
  hosting: HostingApi;
67
70
  domainManagement: DomainManagementApi;
@@ -94,6 +97,7 @@ export type InitialisationResult = {
94
97
  files: Content.File[];
95
98
  apps: Hosting.App[];
96
99
  workers: Hosting.Worker[];
100
+ alerts: Observability.Alert[];
97
101
  };
98
102
  export declare const buildApi: (dependencies: ApiDependencies) => Api;
99
103
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,EAAE,EACF,OAAO,EACP,UAAU,EACV,OAAO,EACP,OAAO,EACP,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,OAAO,EACP,yBAAyB,EACzB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE1E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAE7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AAEzF,OAA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,MAAM,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC;IACtC,UAAU,EAAE,UAAU,CAAC,SAAS,EAAE,CAAC;IACnC,QAAQ,EAAE,YAAY,CAAC,OAAO,EAAE,CAAC;IACjC,SAAS,EAAE,aAAa,CAAC,QAAQ,EAAE,CAAC;IACpC,KAAK,EAAE,aAAa,CAAC,IAAI,EAAE,CAAC;IAC5B,KAAK,EAAE,aAAa,CAAC,IAAI,EAAE,CAAC;IAC5B,eAAe,EAAE,KAAK,CAAC,aAAa,CAAC,QAAQ,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC;IAC7D,eAAe,EAAE,yBAAyB,CAAC,cAAc,EAAE,CAAC;IAC5D,YAAY,EAAE,OAAO,CAAC,oBAAoB,CAAC;IAC3C,KAAK,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;IACtB,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;IAC1B,MAAM,EAAE,aAAa,CAAC,KAAK,EAAE,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,QAAQ,iBAAkB,eAAe,KAAG,GAiDxD,CAAC"}
@@ -7,6 +7,7 @@ import { buildContextApi } from "./context/index.js";
7
7
  import { buildDomainManagementApi } from "./domainManagement/index.js";
8
8
  import { buildExpressionApi } from "./expression/index.js";
9
9
  import { buildHostingApi } from "./hosting/index.js";
10
+ import { buildObservabilityApi } from "./observability/index.js";
10
11
  import { buildOrchestrationApi } from "./orchestration/index.js";
11
12
  import { buildRevenueOrganizationApi } from "./revenueOrganization/index.js";
12
13
  import { buildSegmentationApi } from "./segmentation/index.js";
@@ -22,6 +23,7 @@ export * from "./context/index.js";
22
23
  export * from "./domainManagement/index.js";
23
24
  export * from "./expression/index.js";
24
25
  export * from "./hosting/index.js";
26
+ export * from "./observability/index.js";
25
27
  export * from "./orchestration/index.js";
26
28
  export * from "./revenueOrganization/index.js";
27
29
  export * from "./segmentation/index.js";
@@ -62,6 +64,7 @@ export const buildApi = (dependencies) => {
62
64
  context: buildContextApi({ fetcher }),
63
65
  expression: buildExpressionApi({ fetcher }),
64
66
  systemOfRecordIntegration: buildSystemOfRecordIntegrationApi({ fetcher }),
67
+ observability: buildObservabilityApi({ fetcher }),
65
68
  orchestration: buildOrchestrationApi({ fetcher }),
66
69
  hosting: buildHostingApi({ fetcher }),
67
70
  domainManagement: buildDomainManagementApi({ fetcher }),
@@ -0,0 +1,22 @@
1
+ import { Observability } from "../../domains/index.js";
2
+ import { type Fetcher } from "../../fetcher/index.js";
3
+ interface ObservabilityApiDependencies {
4
+ fetcher: Fetcher;
5
+ }
6
+ export interface ObservabilityApi {
7
+ alert: {
8
+ create: (payload: Observability.Api.CreateAlertPayload) => Promise<Observability.Api.CreateAlertResult>;
9
+ update: (payload: Observability.Api.UpdateAlertPayload) => Promise<Observability.Api.UpdateAlertResult>;
10
+ remove: (uuid: string) => Promise<void>;
11
+ get: (uuid: string) => Promise<Observability.Api.GetAlertResult>;
12
+ list: () => Promise<Observability.Api.ListAlertsResult>;
13
+ preview: (payload: Observability.Api.PreviewAlertPayload) => Promise<Observability.Api.PreviewAlertResult>;
14
+ };
15
+ event: {
16
+ list: (payload: Observability.Api.ListEventsPayload) => Promise<Observability.Api.ListEventsResult>;
17
+ count: (payload: Observability.Api.CountEventsPayload) => Promise<Observability.Api.CountEventsResult>;
18
+ };
19
+ }
20
+ export declare const buildObservabilityApi: ({ fetcher, }: ObservabilityApiDependencies) => ObservabilityApi;
21
+ export {};
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/observability/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EACL,KAAK,OAAO,EAEb,MAAM,wBAAwB,CAAC;AAEhC,UAAU,4BAA4B;IACpC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE;QACL,MAAM,EAAE,CACN,OAAO,EAAE,aAAa,CAAC,GAAG,CAAC,kBAAkB,KAC1C,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QAClD,MAAM,EAAE,CACN,OAAO,EAAE,aAAa,CAAC,GAAG,CAAC,kBAAkB,KAC1C,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QAClD,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;QACxC,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QACjE,IAAI,EAAE,MAAM,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QACxD,OAAO,EAAE,CACP,OAAO,EAAE,aAAa,CAAC,GAAG,CAAC,mBAAmB,KAC3C,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;KACpD,CAAC;IACF,KAAK,EAAE;QACL,IAAI,EAAE,CACJ,OAAO,EAAE,aAAa,CAAC,GAAG,CAAC,iBAAiB,KACzC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QACjD,KAAK,EAAE,CACL,OAAO,EAAE,aAAa,CAAC,GAAG,CAAC,kBAAkB,KAC1C,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;KACnD,CAAC;CACH;AAED,eAAO,MAAM,qBAAqB,iBAE/B,4BAA4B,KAAG,gBAmJjC,CAAC"}
@@ -0,0 +1,118 @@
1
+ import { Observability } from "../../domains/index.js";
2
+ import { getErrorWithReasonErrorMessage, } from "../../fetcher/index.js";
3
+ export const buildObservabilityApi = ({ fetcher, }) => {
4
+ async function createAlert(payload) {
5
+ try {
6
+ const result = await fetcher.fetch({
7
+ method: "post",
8
+ endpoint: "/observability/alerts",
9
+ payload,
10
+ });
11
+ return result;
12
+ }
13
+ catch (error) {
14
+ throw getErrorWithReasonErrorMessage(error, Observability.Api.zodCreateAlertErrorReason, {
15
+ invalidCron: "Invalid cron expression.",
16
+ invalidSql: "Invalid SQL query.",
17
+ mismatchedThreshold: "The threshold metric does not match the scope's data source.",
18
+ modelNotFound: "Model not found.",
19
+ folderNotFound: "Folder not found.",
20
+ actionNotFound: "An action references a resource that no longer exists.",
21
+ });
22
+ }
23
+ }
24
+ async function updateAlert(payload) {
25
+ const { uuid, ...other } = payload;
26
+ try {
27
+ const result = await fetcher.fetch({
28
+ method: "put",
29
+ endpoint: `/observability/alerts/${uuid}`,
30
+ payload: other,
31
+ });
32
+ return result;
33
+ }
34
+ catch (error) {
35
+ throw getErrorWithReasonErrorMessage(error, Observability.Api.zodUpdateAlertErrorReason, {
36
+ alertNotFound: "Alert not found.",
37
+ invalidCron: "Invalid cron expression.",
38
+ invalidSql: "Invalid SQL query.",
39
+ mismatchedThreshold: "The threshold metric does not match the scope's data source.",
40
+ modelNotFound: "Model not found.",
41
+ folderNotFound: "Folder not found.",
42
+ actionNotFound: "An action references a resource that no longer exists.",
43
+ });
44
+ }
45
+ }
46
+ async function removeAlert(uuid) {
47
+ try {
48
+ await fetcher.fetch({
49
+ method: "delete",
50
+ endpoint: `/observability/alerts/${uuid}`,
51
+ });
52
+ }
53
+ catch (error) {
54
+ throw getErrorWithReasonErrorMessage(error, Observability.Api.zodRemoveAlertErrorReason, {
55
+ alertNotFound: "Alert not found.",
56
+ });
57
+ }
58
+ }
59
+ async function getAlert(uuid) {
60
+ try {
61
+ const result = await fetcher.fetch({
62
+ method: "get",
63
+ endpoint: `/observability/alerts/${uuid}`,
64
+ });
65
+ return result;
66
+ }
67
+ catch (error) {
68
+ throw getErrorWithReasonErrorMessage(error, Observability.Api.zodGetAlertErrorReason, {
69
+ alertNotFound: "Alert not found.",
70
+ });
71
+ }
72
+ }
73
+ async function listAlerts() {
74
+ const result = await fetcher.fetch({
75
+ method: "get",
76
+ endpoint: "/observability/alerts/list",
77
+ });
78
+ return result;
79
+ }
80
+ async function listEvents(payload) {
81
+ const result = await fetcher.fetch({
82
+ method: "post",
83
+ endpoint: "/observability/events/list",
84
+ payload,
85
+ });
86
+ return result;
87
+ }
88
+ async function countEvents(payload) {
89
+ const result = await fetcher.fetch({
90
+ method: "post",
91
+ endpoint: "/observability/events/count",
92
+ payload,
93
+ });
94
+ return result;
95
+ }
96
+ async function previewAlert(payload) {
97
+ const result = await fetcher.fetch({
98
+ method: "post",
99
+ endpoint: "/observability/alerts/preview",
100
+ payload,
101
+ });
102
+ return result;
103
+ }
104
+ return {
105
+ alert: {
106
+ create: createAlert,
107
+ update: updateAlert,
108
+ remove: removeAlert,
109
+ get: getAlert,
110
+ list: listAlerts,
111
+ preview: previewAlert,
112
+ },
113
+ event: {
114
+ list: listEvents,
115
+ count: countEvents,
116
+ },
117
+ };
118
+ };
@@ -6,6 +6,7 @@ export { Context } from "./context.js";
6
6
  export { DomainManagement } from "./domainManagement.js";
7
7
  export { Expression } from "./expression.js";
8
8
  export { Hosting } from "./hosting.js";
9
+ export { Observability } from "./observability.js";
9
10
  export { Orchestration } from "./orchestration.js";
10
11
  export { RevenueOrganization } from "./revenueOrganization.js";
11
12
  export { Segmentation } from "./segmentation.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domains/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,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,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -6,6 +6,7 @@ export { Context } from "./context.js";
6
6
  export { DomainManagement } from "./domainManagement.js";
7
7
  export { Expression } from "./expression.js";
8
8
  export { Hosting } from "./hosting.js";
9
+ export { Observability } from "./observability.js";
9
10
  export { Orchestration } from "./orchestration.js";
10
11
  export { RevenueOrganization } from "./revenueOrganization.js";
11
12
  export { Segmentation } from "./segmentation.js";
@@ -0,0 +1,140 @@
1
+ import { type ObservabilityTypes } from "@cargo-ai/types";
2
+ import { z } from "zod";
3
+ import type { ApiType, DateToString } from "../types.js";
4
+ import type { Orchestration } from "./orchestration.js";
5
+ export declare namespace Observability {
6
+ type Alert = ApiType<ObservabilityTypes.Alert>;
7
+ type AlertScope = ApiType<ObservabilityTypes.AlertScope>;
8
+ type AlertScopeSpans = ApiType<ObservabilityTypes.AlertScopeSpans>;
9
+ type AlertScopeRuns = ApiType<ObservabilityTypes.AlertScopeRuns>;
10
+ type AlertScopeRecords = ApiType<ObservabilityTypes.AlertScopeRecords>;
11
+ type AlertScopeOrchestrationQuery = ApiType<ObservabilityTypes.AlertScopeOrchestrationQuery>;
12
+ type AlertScopeStorageQuery = ApiType<ObservabilityTypes.AlertScopeStorageQuery>;
13
+ type AlertScopeModel = ApiType<ObservabilityTypes.AlertScopeModel>;
14
+ type AlertThreshold = ApiType<ObservabilityTypes.AlertThreshold>;
15
+ type AlertTelemetryThreshold = ApiType<ObservabilityTypes.AlertTelemetryThreshold>;
16
+ type AlertQueryThreshold = ApiType<ObservabilityTypes.AlertQueryThreshold>;
17
+ type AlertModelThreshold = ApiType<ObservabilityTypes.AlertModelThreshold>;
18
+ type AlertCondition = ApiType<ObservabilityTypes.AlertCondition>;
19
+ const buildAlertCondition: (scope: ObservabilityTypes.AlertScope, threshold: ObservabilityTypes.AlertThreshold) => ObservabilityTypes.AlertCondition | undefined;
20
+ type AlertThresholdOperator = ApiType<ObservabilityTypes.AlertThresholdOperator>;
21
+ type AlertDurationAggregation = ApiType<ObservabilityTypes.AlertDurationAggregation>;
22
+ type AlertCreditsAggregation = ApiType<ObservabilityTypes.AlertCreditsAggregation>;
23
+ type AlertSchedule = ApiType<ObservabilityTypes.AlertSchedule>;
24
+ type Event = ApiType<ObservabilityTypes.Event>;
25
+ type EventStatus = ApiType<ObservabilityTypes.EventStatus>;
26
+ namespace Api {
27
+ type CreateAlertPayload = DateToString<{
28
+ name: string;
29
+ description?: string;
30
+ cron: string;
31
+ isEnabled?: boolean;
32
+ actions?: Orchestration.Action[];
33
+ folderUuid?: string;
34
+ }> & AlertCondition;
35
+ type CreateAlertResult = {
36
+ alert: Alert;
37
+ };
38
+ const zodCreateAlertErrorReason: z.ZodEnum<{
39
+ folderNotFound: "folderNotFound";
40
+ modelNotFound: "modelNotFound";
41
+ actionNotFound: "actionNotFound";
42
+ invalidCron: "invalidCron";
43
+ invalidSql: "invalidSql";
44
+ mismatchedThreshold: "mismatchedThreshold";
45
+ }>;
46
+ type ListAlertsResult = {
47
+ alerts: Alert[];
48
+ };
49
+ type GetAlertResult = {
50
+ alert: Alert;
51
+ };
52
+ const zodGetAlertErrorReason: z.ZodEnum<{
53
+ alertNotFound: "alertNotFound";
54
+ }>;
55
+ type UpdateAlertPayload = DateToString<{
56
+ uuid: string;
57
+ name?: string;
58
+ description?: string | null;
59
+ cron?: string;
60
+ isEnabled?: boolean;
61
+ scope?: AlertScope;
62
+ threshold?: AlertThreshold;
63
+ actions?: Orchestration.Action[];
64
+ folderUuid?: string | null;
65
+ }>;
66
+ type UpdateAlertResult = {
67
+ alert: Alert;
68
+ };
69
+ const zodUpdateAlertErrorReason: z.ZodEnum<{
70
+ folderNotFound: "folderNotFound";
71
+ modelNotFound: "modelNotFound";
72
+ actionNotFound: "actionNotFound";
73
+ invalidCron: "invalidCron";
74
+ invalidSql: "invalidSql";
75
+ mismatchedThreshold: "mismatchedThreshold";
76
+ alertNotFound: "alertNotFound";
77
+ }>;
78
+ const zodRemoveAlertErrorReason: z.ZodEnum<{
79
+ alertNotFound: "alertNotFound";
80
+ }>;
81
+ type ListEventsPayload = DateToString<{
82
+ alertUuid: string;
83
+ statuses?: EventStatus[];
84
+ createdAfter?: Date;
85
+ createdBefore?: Date;
86
+ limit?: number;
87
+ offset?: number;
88
+ }>;
89
+ type ListEventsResult = {
90
+ count: number;
91
+ events: Event[];
92
+ };
93
+ type CountEventsPayload = DateToString<{
94
+ alertUuid: string;
95
+ statuses?: EventStatus[];
96
+ createdAfter?: Date;
97
+ createdBefore?: Date;
98
+ }>;
99
+ type CountEventsResult = {
100
+ count: number;
101
+ };
102
+ type PreviewAlertPayload = DateToString<{
103
+ windowMinutes: number;
104
+ }> & AlertCondition;
105
+ type PreviewAlertResult = {
106
+ outcome: "empty";
107
+ } | {
108
+ outcome: "notComputed";
109
+ computeErrorMessage: string;
110
+ } | {
111
+ outcome: "computed";
112
+ value: number;
113
+ total?: number;
114
+ failed?: number;
115
+ isBreached: boolean;
116
+ };
117
+ }
118
+ const alertKeys: {
119
+ all: (workspaceUuid: string) => readonly ["alerts", string];
120
+ get: (workspaceUuid: string, uuid: string) => readonly ["alerts", string, string];
121
+ };
122
+ const eventKeys: {
123
+ all: (workspaceUuid: string) => readonly ["events", string];
124
+ list: (workspaceUuid: string, payload: Api.ListEventsPayload) => readonly ["events", string, {
125
+ alertUuid: string;
126
+ statuses?: EventStatus[] | undefined;
127
+ createdAfter?: string | undefined;
128
+ createdBefore?: string | undefined;
129
+ limit?: number | undefined;
130
+ offset?: number | undefined;
131
+ }];
132
+ count: (workspaceUuid: string, payload: Api.CountEventsPayload) => readonly ["events", string, {
133
+ alertUuid: string;
134
+ statuses?: EventStatus[] | undefined;
135
+ createdAfter?: string | undefined;
136
+ createdBefore?: string | undefined;
137
+ }];
138
+ };
139
+ }
140
+ //# sourceMappingURL=observability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"observability.d.ts","sourceRoot":"","sources":["../../../src/domains/observability.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAsB,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD,yBAAiB,aAAa,CAAC;IAC7B,KAAY,KAAK,GAAG,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACtD,KAAY,UAAU,GAAG,OAAO,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAChE,KAAY,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAC;IAC1E,KAAY,cAAc,GAAG,OAAO,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC;IACxE,KAAY,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;IAC9E,KAAY,4BAA4B,GACtC,OAAO,CAAC,kBAAkB,CAAC,4BAA4B,CAAC,CAAC;IAC3D,KAAY,sBAAsB,GAChC,OAAO,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;IACrD,KAAY,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAC;IAC1E,KAAY,cAAc,GAAG,OAAO,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC;IACxE,KAAY,uBAAuB,GACjC,OAAO,CAAC,kBAAkB,CAAC,uBAAuB,CAAC,CAAC;IACtD,KAAY,mBAAmB,GAC7B,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;IAClD,KAAY,mBAAmB,GAC7B,OAAO,CAAC,kBAAkB,CAAC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cAAc,CAAC;QAEjB,KAAY,kBAAkB,GAC1B;YAAE,OAAO,EAAE,OAAO,CAAA;SAAE,GACpB;YAAE,OAAO,EAAE,aAAa,CAAC;YAAC,mBAAmB,EAAE,MAAM,CAAA;SAAE,GACvD;YACE,OAAO,EAAE,UAAU,CAAC;YACpB,KAAK,EAAE,MAAM,CAAC;YAGd,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,MAAM,CAAC,EAAE,MAAM,CAAC;YAChB,UAAU,EAAE,OAAO,CAAC;SACrB,CAAC;KACP;IAEM,MAAM,SAAS;6BACC,MAAM;6BACN,MAAM,QAAQ,MAAM;KAE1C,CAAC;IAEK,MAAM,SAAS;6BACC,MAAM;8BACL,MAAM,WAAW,IAAI,iBAAiB;uBAnD/C,MAAM;;;;;;;+BAqDI,MAAM,WAAW,IAAI,kBAAkB;uBAvCjD,MAAM;;;;;KAyCpB,CAAC;CACH"}
@@ -0,0 +1,42 @@
1
+ import { ObservabilityUtils } from "@cargo-ai/types";
2
+ import { z } from "zod";
3
+ // eslint-disable-next-line @typescript-eslint/no-namespace
4
+ export var Observability;
5
+ (function (Observability) {
6
+ // Re-exported so consumers (the webApp, which may not import @cargo-ai/types
7
+ // directly) re-pair a scope with a threshold through the one enforcement
8
+ // point instead of spreading them independently.
9
+ Observability.buildAlertCondition = ObservabilityUtils.buildAlertCondition;
10
+ // eslint-disable-next-line @typescript-eslint/no-namespace
11
+ let Api;
12
+ (function (Api) {
13
+ Api.zodCreateAlertErrorReason = z.enum([
14
+ "invalidCron",
15
+ "invalidSql",
16
+ "mismatchedThreshold",
17
+ "modelNotFound",
18
+ "folderNotFound",
19
+ "actionNotFound",
20
+ ]);
21
+ Api.zodGetAlertErrorReason = z.enum(["alertNotFound"]);
22
+ Api.zodUpdateAlertErrorReason = z.enum([
23
+ "alertNotFound",
24
+ "invalidCron",
25
+ "invalidSql",
26
+ "mismatchedThreshold",
27
+ "modelNotFound",
28
+ "folderNotFound",
29
+ "actionNotFound",
30
+ ]);
31
+ Api.zodRemoveAlertErrorReason = z.enum(["alertNotFound"]);
32
+ })(Api = Observability.Api || (Observability.Api = {}));
33
+ Observability.alertKeys = {
34
+ all: (workspaceUuid) => ["alerts", workspaceUuid],
35
+ get: (workspaceUuid, uuid) => [...Observability.alertKeys.all(workspaceUuid), uuid],
36
+ };
37
+ Observability.eventKeys = {
38
+ all: (workspaceUuid) => ["events", workspaceUuid],
39
+ list: (workspaceUuid, payload) => [...Observability.eventKeys.all(workspaceUuid), payload],
40
+ count: (workspaceUuid, payload) => [...Observability.eventKeys.all(workspaceUuid), payload],
41
+ };
42
+ })(Observability || (Observability = {}));
@@ -578,7 +578,8 @@ export declare namespace Orchestration {
578
578
  runContext: GlobalRecord<string, any>;
579
579
  };
580
580
  export type ListRunsPayload = DateToString<{
581
- workflowUuid: string;
581
+ workflowUuid?: string;
582
+ userUuid?: string;
582
583
  batchUuid?: string;
583
584
  releaseUuid?: string;
584
585
  statuses?: RunStatus[];
@@ -599,7 +600,8 @@ export declare namespace Orchestration {
599
600
  offset?: number;
600
601
  }>;
601
602
  export type CountRunsPayload = DateToString<{
602
- workflowUuid: string;
603
+ workflowUuid?: string;
604
+ userUuid?: string;
603
605
  batchUuid?: string;
604
606
  releaseUuid?: string;
605
607
  statuses?: RunStatus[];
@@ -714,7 +716,8 @@ export declare namespace Orchestration {
714
716
  runMetrics: RunMetric[];
715
717
  };
716
718
  export type ListRecordsPayload = DateToString<{
717
- workflowUuid: string;
719
+ workflowUuid?: string;
720
+ userUuid?: string;
718
721
  ids?: string[];
719
722
  title?: string;
720
723
  titleOrId?: string;
@@ -832,7 +835,8 @@ export declare namespace Orchestration {
832
835
  rows: Array<GlobalRecord<string, unknown>>;
833
836
  };
834
837
  export type CountRecordsPayload = DateToString<{
835
- workflowUuid: string;
838
+ workflowUuid?: string;
839
+ userUuid?: string;
836
840
  ids?: string[];
837
841
  title?: string;
838
842
  titleOrId?: string;
@@ -1072,7 +1076,8 @@ export declare namespace Orchestration {
1072
1076
  all: (workspaceUuid: string) => readonly ["runs", string];
1073
1077
  get: (workspaceUuid: string, uuid: string) => readonly ["runs", string, string];
1074
1078
  list: (workspaceUuid: string, payload: Api.ListRunsPayload) => readonly ["runs", string, {
1075
- workflowUuid: string;
1079
+ workflowUuid?: string | undefined;
1080
+ userUuid?: string | undefined;
1076
1081
  batchUuid?: string | undefined;
1077
1082
  releaseUuid?: string | undefined;
1078
1083
  statuses?: RunStatus[] | undefined;
@@ -1104,7 +1109,8 @@ export declare namespace Orchestration {
1104
1109
  offset?: number | undefined;
1105
1110
  }];
1106
1111
  count: (workspaceUuid: string, payload: Api.CountRunsPayload) => readonly ["runs", string, {
1107
- workflowUuid: string;
1112
+ workflowUuid?: string | undefined;
1113
+ userUuid?: string | undefined;
1108
1114
  batchUuid?: string | undefined;
1109
1115
  releaseUuid?: string | undefined;
1110
1116
  statuses?: RunStatus[] | undefined;
@@ -1144,7 +1150,8 @@ export declare namespace Orchestration {
1144
1150
  const recordKeys: {
1145
1151
  all: (workspaceUuid: string) => readonly ["records", string];
1146
1152
  list: (workspaceUuid: string, payload: Api.ListRecordsPayload) => readonly ["records", string, {
1147
- workflowUuid: string;
1153
+ workflowUuid?: string | undefined;
1154
+ userUuid?: string | undefined;
1148
1155
  ids?: string[] | undefined;
1149
1156
  title?: string | undefined;
1150
1157
  titleOrId?: string | undefined;
@@ -1175,7 +1182,8 @@ export declare namespace Orchestration {
1175
1182
  offset?: number | undefined;
1176
1183
  }];
1177
1184
  count: (workspaceUuid: string, payload: Api.CountRecordsPayload) => readonly ["records", string, {
1178
- workflowUuid: string;
1185
+ workflowUuid?: string | undefined;
1186
+ userUuid?: string | undefined;
1179
1187
  ids?: string[] | undefined;
1180
1188
  title?: string | undefined;
1181
1189
  titleOrId?: string | undefined;