@cargo-ai/api 1.0.33 → 1.0.35
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.
- package/build/src/domains/ai.d.ts +1 -1
- package/build/src/domains/orchestration.d.ts +10 -9
- package/build/src/domains/orchestration.d.ts.map +1 -1
- package/build/src/domains/segmentation.d.ts +1 -1
- package/build/src/domains/storage.d.ts +28 -28
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/build/src/api/ignition/index.d.ts +0 -17
- package/build/src/api/ignition/index.d.ts.map +0 -1
- package/build/src/api/ignition/index.js +0 -65
- package/build/src/domains/ignition.d.ts +0 -74
- package/build/src/domains/ignition.d.ts.map +0 -1
- package/build/src/domains/ignition.js +0 -21
- package/build/src/version.d.ts +0 -3
- package/build/src/version.d.ts.map +0 -1
- package/build/src/version.js +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cargo-ai/api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.35",
|
|
4
4
|
"description": "Cargo API client and types",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"axios": "1.16.0",
|
|
33
33
|
"zod": "4.4.3",
|
|
34
|
-
"@cargo-ai/types": "^1.0.
|
|
34
|
+
"@cargo-ai/types": "^1.0.37",
|
|
35
35
|
"@cargo-ai/utils": "^1.0.17"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Ignition } from "../../domains/index.js";
|
|
2
|
-
import { type Fetcher } from "../../fetcher/index.js";
|
|
3
|
-
interface IgnitionApiDependencies {
|
|
4
|
-
fetcher: Fetcher;
|
|
5
|
-
}
|
|
6
|
-
export interface IgnitionApi {
|
|
7
|
-
trigger: {
|
|
8
|
-
list: (payload: Ignition.Api.ListTriggersPayload) => Promise<Ignition.Api.ListTriggersResult>;
|
|
9
|
-
get: (uuid: string) => Promise<Ignition.Api.GetTriggerResult>;
|
|
10
|
-
create: (payload: Ignition.Api.CreateTriggerPayload) => Promise<Ignition.Api.CreateTriggerResult>;
|
|
11
|
-
update: (payload: Ignition.Api.UpdateTriggerPayload) => Promise<Ignition.Api.UpdateTriggerResult>;
|
|
12
|
-
remove: (uuid: string) => Promise<void>;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
export declare const buildIgnitionApi: ({ fetcher, }: IgnitionApiDependencies) => IgnitionApi;
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/ignition/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EACL,KAAK,OAAO,EAEb,MAAM,wBAAwB,CAAC;AAEhC,UAAU,uBAAuB;IAC/B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE;QACP,IAAI,EAAE,CACJ,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,mBAAmB,KACtC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;QAC9C,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAC9D,MAAM,EAAE,CACN,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,oBAAoB,KACvC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;QAC/C,MAAM,EAAE,CACN,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,oBAAoB,KACvC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;QAC/C,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;KACzC,CAAC;CACH;AAED,eAAO,MAAM,gBAAgB,iBAE1B,uBAAuB,KAAG,WA8E5B,CAAC"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { Ignition } from "../../domains/index.js";
|
|
2
|
-
import { getErrorWithReasonErrorMessage, } from "../../fetcher/index.js";
|
|
3
|
-
export const buildIgnitionApi = ({ fetcher, }) => {
|
|
4
|
-
async function listTriggers(payload) {
|
|
5
|
-
const result = await fetcher.fetch({
|
|
6
|
-
method: "get",
|
|
7
|
-
endpoint: "/ignition/triggers/list",
|
|
8
|
-
params: payload,
|
|
9
|
-
});
|
|
10
|
-
return result;
|
|
11
|
-
}
|
|
12
|
-
async function getTrigger(uuid) {
|
|
13
|
-
const result = await fetcher.fetch({
|
|
14
|
-
method: "get",
|
|
15
|
-
endpoint: `/ignition/triggers/${uuid}`,
|
|
16
|
-
});
|
|
17
|
-
return result;
|
|
18
|
-
}
|
|
19
|
-
async function createTrigger(payload) {
|
|
20
|
-
const result = await fetcher.fetch({
|
|
21
|
-
method: "post",
|
|
22
|
-
endpoint: "/ignition/triggers",
|
|
23
|
-
payload,
|
|
24
|
-
});
|
|
25
|
-
return result;
|
|
26
|
-
}
|
|
27
|
-
async function updateTrigger(payload) {
|
|
28
|
-
const { uuid, ...other } = payload;
|
|
29
|
-
try {
|
|
30
|
-
const result = await fetcher.fetch({
|
|
31
|
-
method: "put",
|
|
32
|
-
endpoint: `/ignition/triggers/${uuid}`,
|
|
33
|
-
payload: other,
|
|
34
|
-
});
|
|
35
|
-
return result;
|
|
36
|
-
}
|
|
37
|
-
catch (error) {
|
|
38
|
-
throw getErrorWithReasonErrorMessage(error, Ignition.Api.zodUpdateTriggerErrorReason, {
|
|
39
|
-
triggerNotFound: "Trigger not found.",
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
async function removeTrigger(uuid) {
|
|
44
|
-
try {
|
|
45
|
-
await fetcher.fetch({
|
|
46
|
-
method: "delete",
|
|
47
|
-
endpoint: `/ignition/triggers/${uuid}`,
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
catch (error) {
|
|
51
|
-
throw getErrorWithReasonErrorMessage(error, Ignition.Api.zodRemoveTriggerErrorReason, {
|
|
52
|
-
triggerNotFound: "Trigger not found.",
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return {
|
|
57
|
-
trigger: {
|
|
58
|
-
list: listTriggers,
|
|
59
|
-
get: getTrigger,
|
|
60
|
-
create: createTrigger,
|
|
61
|
-
update: updateTrigger,
|
|
62
|
-
remove: removeTrigger,
|
|
63
|
-
},
|
|
64
|
-
};
|
|
65
|
-
};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { type IgnitionTypes } from "@cargo-ai/types";
|
|
2
|
-
import { z } from "zod/v4";
|
|
3
|
-
import type { ApiType, DateToString } from "../types.js";
|
|
4
|
-
export declare namespace Ignition {
|
|
5
|
-
type Trigger = ApiType<IgnitionTypes.Trigger>;
|
|
6
|
-
type TriggerTargetKind = IgnitionTypes.TriggerTargetKind;
|
|
7
|
-
type TriggerType = IgnitionTypes.TriggerType;
|
|
8
|
-
namespace Api {
|
|
9
|
-
type ListTriggersPayload = {
|
|
10
|
-
targetKind?: TriggerTargetKind;
|
|
11
|
-
targetUuid?: string;
|
|
12
|
-
};
|
|
13
|
-
type ListTriggersResult = {
|
|
14
|
-
triggers: Trigger[];
|
|
15
|
-
};
|
|
16
|
-
type GetTriggerResult = {
|
|
17
|
-
trigger: Trigger;
|
|
18
|
-
};
|
|
19
|
-
type CreateTriggerPayload = DateToString<{
|
|
20
|
-
targetKind: "agent";
|
|
21
|
-
targetUuid: string;
|
|
22
|
-
type: "cron";
|
|
23
|
-
name: string;
|
|
24
|
-
description?: string | null;
|
|
25
|
-
cron: string;
|
|
26
|
-
text: string;
|
|
27
|
-
} | {
|
|
28
|
-
targetKind: "agent";
|
|
29
|
-
targetUuid: string;
|
|
30
|
-
type: "connector";
|
|
31
|
-
name: string;
|
|
32
|
-
description?: string | null;
|
|
33
|
-
connectorUuid: string | null;
|
|
34
|
-
integrationSlug: string;
|
|
35
|
-
config: Record<string, unknown>;
|
|
36
|
-
} | {
|
|
37
|
-
targetKind: "tool";
|
|
38
|
-
targetUuid: string;
|
|
39
|
-
type: "cron";
|
|
40
|
-
name: string;
|
|
41
|
-
description?: string | null;
|
|
42
|
-
cron: string;
|
|
43
|
-
data: Record<string, unknown>;
|
|
44
|
-
}>;
|
|
45
|
-
type CreateTriggerResult = {
|
|
46
|
-
trigger: Trigger;
|
|
47
|
-
};
|
|
48
|
-
type UpdateTriggerPayload = DateToString<{
|
|
49
|
-
uuid: string;
|
|
50
|
-
name?: string;
|
|
51
|
-
description?: string | null;
|
|
52
|
-
cron?: string;
|
|
53
|
-
text?: string;
|
|
54
|
-
data?: Record<string, unknown>;
|
|
55
|
-
connectorUuid?: string | null;
|
|
56
|
-
integrationSlug?: string;
|
|
57
|
-
config?: Record<string, unknown>;
|
|
58
|
-
}>;
|
|
59
|
-
type UpdateTriggerResult = {
|
|
60
|
-
trigger: Trigger;
|
|
61
|
-
};
|
|
62
|
-
const zodUpdateTriggerErrorReason: z.ZodEnum<{
|
|
63
|
-
triggerNotFound: "triggerNotFound";
|
|
64
|
-
}>;
|
|
65
|
-
const zodRemoveTriggerErrorReason: z.ZodEnum<{
|
|
66
|
-
triggerNotFound: "triggerNotFound";
|
|
67
|
-
}>;
|
|
68
|
-
}
|
|
69
|
-
const triggersKeys: {
|
|
70
|
-
all: (workspaceUuid: string) => readonly ["triggers", string];
|
|
71
|
-
list: (workspaceUuid: string, targetKind?: TriggerTargetKind, targetUuid?: string) => readonly ["triggers", string, IgnitionTypes.TriggerTargetKind | null, string | null];
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
//# s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slint/no-explicit-any */
|
|
2
|
-
import { z } from "zod/v4";
|
|
3
|
-
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
4
|
-
export var Ignition;
|
|
5
|
-
(function (Ignition) {
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
7
|
-
let Api;
|
|
8
|
-
(function (Api) {
|
|
9
|
-
Api.zodUpdateTriggerErrorReason = z.enum(["triggerNotFound"]);
|
|
10
|
-
Api.zodRemoveTriggerErrorReason = z.enum(["triggerNotFound"]);
|
|
11
|
-
})(Api = Ignition.Api || (Ignition.Api = {}));
|
|
12
|
-
Ignition.triggersKeys = {
|
|
13
|
-
all: (workspaceUuid) => ["triggers", workspaceUuid],
|
|
14
|
-
list: (workspaceUuid, targetKind, targetUuid) => [
|
|
15
|
-
"triggers",
|
|
16
|
-
workspaceUuid,
|
|
17
|
-
targetKind ?? null,
|
|
18
|
-
targetUuid ?? null,
|
|
19
|
-
],
|
|
20
|
-
};
|
|
21
|
-
})(Ignition || (Ignition = {}));
|
package/build/src/version.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,YAAY,kBAAkB,CAAC;AAC5C,eAAO,MAAM,OAAO,WAAW,CAAC"}
|
package/build/src/version.js
DELETED