@egose/n8n-client 0.1.2 → 0.2.0
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/CHANGELOG.md +12 -0
- package/README.md +188 -46
- package/chunk-2R6A6NJE.js +38 -0
- package/chunk-3FDDCKAY.js +95 -0
- package/chunk-3YWWR6UD.cjs +98 -0
- package/chunk-4M2HGY3F.cjs +12 -0
- package/chunk-4VK7K4IF.js +29 -0
- package/chunk-54MX3Y2M.cjs +15 -0
- package/{chunk-NMKH2J77.js → chunk-54N6YD4R.js} +28 -6
- package/{chunk-2H3GEKKO.js → chunk-5DDMSYH2.js} +25 -6
- package/chunk-5ZRUF6XZ.cjs +15 -0
- package/chunk-6JJ6RA5B.cjs +32 -0
- package/chunk-7H75UBMH.cjs +29 -0
- package/chunk-B7CINZ27.cjs +43 -0
- package/chunk-BA4KTRMX.cjs +15 -0
- package/{chunk-DO5OI6ZU.js → chunk-BQ2OTUXQ.js} +25 -6
- package/chunk-C3JBYESS.cjs +35 -0
- package/chunk-C6W6ERQD.js +53 -0
- package/{chunk-5WH4FOE2.cjs → chunk-CCS5ALTN.cjs} +5 -5
- package/chunk-DTDNBA7W.cjs +59 -0
- package/chunk-ETVDSJLY.js +48 -0
- package/chunk-F5RPJMNK.js +15 -0
- package/chunk-FIKGC2EL.cjs +29 -0
- package/{chunk-YONLN7XM.cjs → chunk-FTIVM52X.cjs} +24 -5
- package/chunk-GEWLPVNV.cjs +48 -0
- package/{chunk-75AXCCWF.cjs → chunk-GZ3POWDP.cjs} +27 -5
- package/chunk-HISH4ORK.js +59 -0
- package/chunk-I4MMTW33.js +98 -0
- package/chunk-KRPRS2E5.cjs +46 -0
- package/chunk-L2FFL3BY.js +35 -0
- package/chunk-LQULSPET.cjs +55 -0
- package/chunk-LTYQTCHM.js +196 -0
- package/chunk-MMN2UKTI.cjs +41 -0
- package/chunk-NBLW25ME.cjs +67 -0
- package/chunk-NS2RDZ7W.js +15 -0
- package/chunk-OUOWDGL7.js +15 -0
- package/chunk-PT5DDLHC.js +46 -0
- package/chunk-Q6FSREKN.js +12 -0
- package/chunk-QJR4WFNV.js +55 -0
- package/chunk-RPB226OX.cjs +54 -0
- package/chunk-S4ZASMBT.js +43 -0
- package/chunk-T62VHXNY.js +67 -0
- package/chunk-TLBDBRPJ.js +29 -0
- package/chunk-TY76RTXQ.cjs +32 -0
- package/chunk-USTEEQQG.js +43 -0
- package/chunk-W5P34RYO.cjs +196 -0
- package/chunk-XJP6FPN3.js +41 -0
- package/chunk-YBMEMKCN.cjs +53 -0
- package/chunk-YE2OS2KS.js +32 -0
- package/chunk-YHSDCE3I.js +32 -0
- package/chunk-YSWBOCXJ.cjs +38 -0
- package/chunk-YUCX7HE3.js +15 -0
- package/chunk-Z3D4URRD.cjs +43 -0
- package/chunk-ZIIR24GM.cjs +95 -0
- package/chunk-ZPU6PQES.cjs +15 -0
- package/{chunk-6L3JVMUK.js → chunk-ZVZIMJRM.js} +6 -6
- package/clients/audit.cjs +8 -0
- package/{handles → clients}/audit.d.cts +3 -3
- package/{handles → clients}/audit.d.ts +3 -3
- package/clients/audit.js +8 -0
- package/clients/base.cjs +7 -0
- package/{handles → clients}/base.d.cts +2 -2
- package/{handles → clients}/base.d.ts +2 -2
- package/clients/base.js +7 -0
- package/clients/community-package.cjs +12 -0
- package/clients/community-package.d.cts +6 -0
- package/clients/community-package.d.ts +6 -0
- package/clients/community-package.js +12 -0
- package/clients/credential.cjs +10 -0
- package/clients/credential.d.cts +6 -0
- package/clients/credential.d.ts +6 -0
- package/clients/credential.js +10 -0
- package/clients/data-table.cjs +10 -0
- package/clients/data-table.d.cts +6 -0
- package/clients/data-table.d.ts +6 -0
- package/clients/data-table.js +10 -0
- package/clients/discover.cjs +8 -0
- package/{handles → clients}/discover.d.cts +3 -3
- package/{handles → clients}/discover.d.ts +3 -3
- package/clients/discover.js +8 -0
- package/clients/execution.cjs +10 -0
- package/clients/execution.d.cts +6 -0
- package/clients/execution.d.ts +6 -0
- package/clients/execution.js +10 -0
- package/clients/folder.cjs +10 -0
- package/clients/folder.d.cts +6 -0
- package/clients/folder.d.ts +6 -0
- package/clients/folder.js +10 -0
- package/clients/insights.cjs +8 -0
- package/{handles → clients}/insights.d.cts +3 -3
- package/{handles → clients}/insights.d.ts +3 -3
- package/clients/insights.js +8 -0
- package/clients/n8n-package.cjs +8 -0
- package/{handles → clients}/n8n-package.d.cts +3 -3
- package/{handles → clients}/n8n-package.d.ts +3 -3
- package/clients/n8n-package.js +8 -0
- package/clients/project.cjs +22 -0
- package/clients/project.d.cts +11 -0
- package/clients/project.d.ts +11 -0
- package/clients/project.js +22 -0
- package/clients/source-control.cjs +8 -0
- package/{handles → clients}/source-control.d.cts +3 -3
- package/{handles → clients}/source-control.d.ts +3 -3
- package/clients/source-control.js +8 -0
- package/clients/tag.cjs +10 -0
- package/clients/tag.d.cts +6 -0
- package/clients/tag.d.ts +6 -0
- package/clients/tag.js +10 -0
- package/clients/user.cjs +10 -0
- package/clients/user.d.cts +6 -0
- package/clients/user.d.ts +6 -0
- package/clients/user.js +10 -0
- package/clients/variable.cjs +12 -0
- package/clients/variable.d.cts +6 -0
- package/clients/variable.d.ts +6 -0
- package/clients/variable.js +12 -0
- package/clients/workflow.cjs +14 -0
- package/clients/workflow.d.cts +7 -0
- package/clients/workflow.d.ts +7 -0
- package/clients/workflow.js +14 -0
- package/community-package-CyzAqqwH.d.ts +26 -0
- package/community-package-DBpReCPV.d.cts +26 -0
- package/credential-BWcrGfqd.d.ts +34 -0
- package/credential-CEH7XbGn.d.cts +34 -0
- package/data-table-CHGUClGF.d.ts +60 -0
- package/data-table-CzR5kl9T.d.cts +60 -0
- package/execution-BjR6z5Vu.d.ts +33 -0
- package/execution-C0c9utwa.d.cts +33 -0
- package/folder-DvgIxSea.d.cts +31 -0
- package/folder-bjRPcy2j.d.ts +31 -0
- package/index.cjs +85 -44
- package/index.d.cts +42 -31
- package/index.d.ts +42 -31
- package/index.js +98 -57
- package/package.json +1 -1
- package/project-BS1fXSLW.d.cts +94 -0
- package/project-uws9k24H.d.ts +94 -0
- package/resources/base.cjs +7 -0
- package/resources/base.d.cts +11 -0
- package/resources/base.d.ts +11 -0
- package/resources/base.js +7 -0
- package/resources/community-package.cjs +8 -0
- package/resources/community-package.d.cts +6 -0
- package/resources/community-package.d.ts +6 -0
- package/resources/community-package.js +8 -0
- package/resources/credential.cjs +8 -0
- package/resources/credential.d.cts +6 -0
- package/resources/credential.d.ts +6 -0
- package/resources/credential.js +8 -0
- package/resources/data-table.cjs +8 -0
- package/resources/data-table.d.cts +6 -0
- package/resources/data-table.d.ts +6 -0
- package/resources/data-table.js +8 -0
- package/resources/execution.cjs +8 -0
- package/resources/execution.d.cts +6 -0
- package/resources/execution.d.ts +6 -0
- package/resources/execution.js +8 -0
- package/resources/folder.cjs +8 -0
- package/resources/folder.d.cts +6 -0
- package/resources/folder.d.ts +6 -0
- package/resources/folder.js +8 -0
- package/resources/project.cjs +11 -0
- package/resources/project.d.cts +11 -0
- package/resources/project.d.ts +11 -0
- package/resources/project.js +11 -0
- package/resources/tag.cjs +8 -0
- package/resources/tag.d.cts +6 -0
- package/resources/tag.d.ts +6 -0
- package/resources/tag.js +8 -0
- package/resources/user.cjs +8 -0
- package/resources/user.d.cts +6 -0
- package/resources/user.d.ts +6 -0
- package/resources/user.js +8 -0
- package/resources/variable.cjs +8 -0
- package/resources/variable.d.cts +6 -0
- package/resources/variable.d.ts +6 -0
- package/resources/variable.js +8 -0
- package/resources/workflow.cjs +10 -0
- package/resources/workflow.d.cts +7 -0
- package/resources/workflow.d.ts +7 -0
- package/resources/workflow.js +10 -0
- package/tag-CzazpR40.d.cts +27 -0
- package/tag-lmf8obZe.d.ts +27 -0
- package/user-B0WdVahA.d.ts +27 -0
- package/user-CBa2VjYj.d.cts +27 -0
- package/variable-C2LmlaTx.d.ts +29 -0
- package/variable-CuCiwy0G.d.cts +29 -0
- package/workflow-8pMj_fR_.d.ts +56 -0
- package/workflow-B2nxUmWq.d.cts +56 -0
- package/chunk-2DSU5F3J.js +0 -37
- package/chunk-2JBRCS53.js +0 -27
- package/chunk-4QPHBRTA.js +0 -15
- package/chunk-ACVK7R2L.cjs +0 -12
- package/chunk-BI6R6RFB.js +0 -36
- package/chunk-CDYFI72K.js +0 -28
- package/chunk-FKHPF5R5.cjs +0 -37
- package/chunk-GYCE5P4Y.js +0 -24
- package/chunk-HDN3VTQ4.cjs +0 -15
- package/chunk-HYJ7KYNG.cjs +0 -35
- package/chunk-IDD662MQ.js +0 -15
- package/chunk-JUWY746V.cjs +0 -15
- package/chunk-JWSD43W3.js +0 -36
- package/chunk-L36NK3EC.cjs +0 -27
- package/chunk-LBBJ6MTN.cjs +0 -36
- package/chunk-OHQBXLTJ.js +0 -12
- package/chunk-ONBMQHLH.cjs +0 -28
- package/chunk-R3HQQ6JP.cjs +0 -15
- package/chunk-RXHHER7R.js +0 -24
- package/chunk-THVPKRZ6.js +0 -15
- package/chunk-UKWCRX4F.cjs +0 -36
- package/chunk-UPL3BYDO.js +0 -15
- package/chunk-UU6H6FNY.cjs +0 -15
- package/chunk-VS6V3PD6.cjs +0 -24
- package/chunk-XHPNV55G.cjs +0 -24
- package/handles/audit.cjs +0 -8
- package/handles/audit.js +0 -8
- package/handles/base.cjs +0 -7
- package/handles/base.js +0 -7
- package/handles/community-package.cjs +0 -8
- package/handles/community-package.d.cts +0 -13
- package/handles/community-package.d.ts +0 -13
- package/handles/community-package.js +0 -8
- package/handles/credential.cjs +0 -8
- package/handles/credential.d.cts +0 -17
- package/handles/credential.d.ts +0 -17
- package/handles/credential.js +0 -8
- package/handles/data-table.cjs +0 -8
- package/handles/data-table.d.cts +0 -30
- package/handles/data-table.d.ts +0 -30
- package/handles/data-table.js +0 -8
- package/handles/discover.cjs +0 -8
- package/handles/discover.js +0 -8
- package/handles/execution.cjs +0 -8
- package/handles/execution.d.cts +0 -17
- package/handles/execution.d.ts +0 -17
- package/handles/execution.js +0 -8
- package/handles/folder.cjs +0 -8
- package/handles/folder.d.cts +0 -16
- package/handles/folder.d.ts +0 -16
- package/handles/folder.js +0 -8
- package/handles/insights.cjs +0 -8
- package/handles/insights.js +0 -8
- package/handles/n8n-package.cjs +0 -8
- package/handles/n8n-package.js +0 -8
- package/handles/project.cjs +0 -8
- package/handles/project.d.cts +0 -17
- package/handles/project.d.ts +0 -17
- package/handles/project.js +0 -8
- package/handles/source-control.cjs +0 -8
- package/handles/source-control.js +0 -8
- package/handles/tag.cjs +0 -8
- package/handles/tag.d.cts +0 -14
- package/handles/tag.d.ts +0 -14
- package/handles/tag.js +0 -8
- package/handles/user.cjs +0 -8
- package/handles/user.d.cts +0 -14
- package/handles/user.d.ts +0 -14
- package/handles/user.js +0 -8
- package/handles/variable.cjs +0 -8
- package/handles/variable.d.cts +0 -13
- package/handles/variable.d.ts +0 -13
- package/handles/variable.js +0 -8
- package/handles/workflow.cjs +0 -8
- package/handles/workflow.d.cts +0 -22
- package/handles/workflow.d.ts +0 -22
- package/handles/workflow.js +0 -8
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BaseResource
|
|
3
|
+
} from "./chunk-TLBDBRPJ.js";
|
|
4
|
+
|
|
5
|
+
// src/resources/tag.ts
|
|
6
|
+
var TagResource = class extends BaseResource {
|
|
7
|
+
constructor(tags, tag) {
|
|
8
|
+
super(tag);
|
|
9
|
+
this.tags = tags;
|
|
10
|
+
}
|
|
11
|
+
tags;
|
|
12
|
+
get id() {
|
|
13
|
+
return this.data.id;
|
|
14
|
+
}
|
|
15
|
+
get name() {
|
|
16
|
+
return this.data.name;
|
|
17
|
+
}
|
|
18
|
+
async update(data) {
|
|
19
|
+
return this.replaceSnapshot(await this.tags.update(this.id, data));
|
|
20
|
+
}
|
|
21
|
+
async delete() {
|
|
22
|
+
return this.tags.delete(this.id);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
TagResource
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=chunk-4VK7K4IF.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunk4M2HGY3Fcjs = require('./chunk-4M2HGY3F.cjs');
|
|
4
|
+
|
|
5
|
+
// src/clients/insights.ts
|
|
6
|
+
var InsightsClient = class extends _chunk4M2HGY3Fcjs.BaseClient {
|
|
7
|
+
async getSummary(params) {
|
|
8
|
+
return this.http.get("/insights/summary", params);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
exports.InsightsClient = InsightsClient;
|
|
15
|
+
//# sourceMappingURL=chunk-54MX3Y2M.cjs.map
|
|
@@ -1,21 +1,43 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
WorkflowResource
|
|
3
|
+
} from "./chunk-I4MMTW33.js";
|
|
4
|
+
import {
|
|
5
|
+
ExecutionClient
|
|
6
|
+
} from "./chunk-C6W6ERQD.js";
|
|
7
|
+
import {
|
|
8
|
+
BaseClient
|
|
9
|
+
} from "./chunk-Q6FSREKN.js";
|
|
4
10
|
|
|
5
|
-
// src/
|
|
6
|
-
var
|
|
11
|
+
// src/clients/workflow.ts
|
|
12
|
+
var WorkflowClient = class extends BaseClient {
|
|
7
13
|
async list(params) {
|
|
8
14
|
return this.http.get("/workflows", params);
|
|
9
15
|
}
|
|
10
16
|
async get(id, params) {
|
|
11
17
|
return this.http.get(`/workflows/${id}`, params);
|
|
12
18
|
}
|
|
19
|
+
async getResource(id, params) {
|
|
20
|
+
return new WorkflowResource(this, new ExecutionClient(this.http), await this.get(id, params));
|
|
21
|
+
}
|
|
22
|
+
async listResources(params) {
|
|
23
|
+
const response = await this.list(params);
|
|
24
|
+
return {
|
|
25
|
+
data: response.data.map((workflow) => new WorkflowResource(this, new ExecutionClient(this.http), workflow)),
|
|
26
|
+
nextCursor: response.nextCursor
|
|
27
|
+
};
|
|
28
|
+
}
|
|
13
29
|
async create(data) {
|
|
14
30
|
return this.http.post("/workflows", data);
|
|
15
31
|
}
|
|
32
|
+
async createResource(data) {
|
|
33
|
+
return new WorkflowResource(this, new ExecutionClient(this.http), await this.create(data));
|
|
34
|
+
}
|
|
16
35
|
async update(id, data) {
|
|
17
36
|
return this.http.put(`/workflows/${id}`, data);
|
|
18
37
|
}
|
|
38
|
+
async updateResource(id, data) {
|
|
39
|
+
return new WorkflowResource(this, new ExecutionClient(this.http), await this.update(id, data));
|
|
40
|
+
}
|
|
19
41
|
async delete(id) {
|
|
20
42
|
return this.http.delete(`/workflows/${id}`);
|
|
21
43
|
}
|
|
@@ -46,6 +68,6 @@ var WorkflowHandle = class extends BaseHandle {
|
|
|
46
68
|
};
|
|
47
69
|
|
|
48
70
|
export {
|
|
49
|
-
|
|
71
|
+
WorkflowClient
|
|
50
72
|
};
|
|
51
|
-
//# sourceMappingURL=chunk-
|
|
73
|
+
//# sourceMappingURL=chunk-54N6YD4R.js.map
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
FolderResource
|
|
3
|
+
} from "./chunk-YE2OS2KS.js";
|
|
4
|
+
import {
|
|
5
|
+
BaseClient
|
|
6
|
+
} from "./chunk-Q6FSREKN.js";
|
|
4
7
|
|
|
5
|
-
// src/
|
|
6
|
-
var
|
|
8
|
+
// src/clients/folder.ts
|
|
9
|
+
var FolderClient = class extends BaseClient {
|
|
7
10
|
projectId;
|
|
8
11
|
constructor(http, projectId) {
|
|
9
12
|
super(http);
|
|
@@ -15,12 +18,28 @@ var FolderHandle = class extends BaseHandle {
|
|
|
15
18
|
async get(folderId) {
|
|
16
19
|
return this.http.get(`/projects/${this.projectId}/folders/${folderId}`);
|
|
17
20
|
}
|
|
21
|
+
async getResource(folderId) {
|
|
22
|
+
return new FolderResource(this, await this.get(folderId));
|
|
23
|
+
}
|
|
24
|
+
async listResources(params) {
|
|
25
|
+
const response = await this.list(params);
|
|
26
|
+
return {
|
|
27
|
+
data: response.data.map((folder) => new FolderResource(this, folder)),
|
|
28
|
+
nextCursor: void 0
|
|
29
|
+
};
|
|
30
|
+
}
|
|
18
31
|
async create(data) {
|
|
19
32
|
return this.http.post(`/projects/${this.projectId}/folders`, data);
|
|
20
33
|
}
|
|
34
|
+
async createResource(data) {
|
|
35
|
+
return new FolderResource(this, await this.create(data));
|
|
36
|
+
}
|
|
21
37
|
async update(folderId, data) {
|
|
22
38
|
return this.http.patch(`/projects/${this.projectId}/folders/${folderId}`, data);
|
|
23
39
|
}
|
|
40
|
+
async updateResource(folderId, data) {
|
|
41
|
+
return new FolderResource(this, await this.update(folderId, data));
|
|
42
|
+
}
|
|
24
43
|
async delete(folderId, transferToFolderId) {
|
|
25
44
|
await this.http.delete(
|
|
26
45
|
`/projects/${this.projectId}/folders/${folderId}`,
|
|
@@ -30,6 +49,6 @@ var FolderHandle = class extends BaseHandle {
|
|
|
30
49
|
};
|
|
31
50
|
|
|
32
51
|
export {
|
|
33
|
-
|
|
52
|
+
FolderClient
|
|
34
53
|
};
|
|
35
|
-
//# sourceMappingURL=chunk-
|
|
54
|
+
//# sourceMappingURL=chunk-5DDMSYH2.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunk4M2HGY3Fcjs = require('./chunk-4M2HGY3F.cjs');
|
|
4
|
+
|
|
5
|
+
// src/clients/audit.ts
|
|
6
|
+
var AuditClient = class extends _chunk4M2HGY3Fcjs.BaseClient {
|
|
7
|
+
async generate(data) {
|
|
8
|
+
return this.http.post("/audit", data);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
exports.AuditClient = AuditClient;
|
|
15
|
+
//# sourceMappingURL=chunk-5ZRUF6XZ.cjs.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkFIKGC2ELcjs = require('./chunk-FIKGC2EL.cjs');
|
|
4
|
+
|
|
5
|
+
// src/resources/folder.ts
|
|
6
|
+
var FolderResource = class extends _chunkFIKGC2ELcjs.BaseResource {
|
|
7
|
+
constructor(folders, folder) {
|
|
8
|
+
super(folder);
|
|
9
|
+
this.folders = folders;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
get id() {
|
|
13
|
+
return this.data.id;
|
|
14
|
+
}
|
|
15
|
+
get name() {
|
|
16
|
+
return this.data.name;
|
|
17
|
+
}
|
|
18
|
+
get parentFolderId() {
|
|
19
|
+
return this.data.parentFolderId;
|
|
20
|
+
}
|
|
21
|
+
async update(data) {
|
|
22
|
+
return this.replaceSnapshot(await this.folders.update(this.id, data));
|
|
23
|
+
}
|
|
24
|
+
async delete(transferToFolderId) {
|
|
25
|
+
await this.folders.delete(this.id, transferToFolderId);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
exports.FolderResource = FolderResource;
|
|
32
|
+
//# sourceMappingURL=chunk-6JJ6RA5B.cjs.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkFIKGC2ELcjs = require('./chunk-FIKGC2EL.cjs');
|
|
4
|
+
|
|
5
|
+
// src/resources/tag.ts
|
|
6
|
+
var TagResource = class extends _chunkFIKGC2ELcjs.BaseResource {
|
|
7
|
+
constructor(tags, tag) {
|
|
8
|
+
super(tag);
|
|
9
|
+
this.tags = tags;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
get id() {
|
|
13
|
+
return this.data.id;
|
|
14
|
+
}
|
|
15
|
+
get name() {
|
|
16
|
+
return this.data.name;
|
|
17
|
+
}
|
|
18
|
+
async update(data) {
|
|
19
|
+
return this.replaceSnapshot(await this.tags.update(this.id, data));
|
|
20
|
+
}
|
|
21
|
+
async delete() {
|
|
22
|
+
return this.tags.delete(this.id);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
exports.TagResource = TagResource;
|
|
29
|
+
//# sourceMappingURL=chunk-7H75UBMH.cjs.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
var _chunkC3JBYESScjs = require('./chunk-C3JBYESS.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunk4M2HGY3Fcjs = require('./chunk-4M2HGY3F.cjs');
|
|
7
|
+
|
|
8
|
+
// src/clients/user.ts
|
|
9
|
+
var UserClient = class extends _chunk4M2HGY3Fcjs.BaseClient {
|
|
10
|
+
async list(params) {
|
|
11
|
+
return this.http.get("/users", params);
|
|
12
|
+
}
|
|
13
|
+
async get(id, params) {
|
|
14
|
+
return this.http.get(`/users/${id}`, params);
|
|
15
|
+
}
|
|
16
|
+
async getResource(id, params) {
|
|
17
|
+
return new (0, _chunkC3JBYESScjs.UserResource)(this, await this.get(id, params), params);
|
|
18
|
+
}
|
|
19
|
+
async listResources(params) {
|
|
20
|
+
const response = await this.list(params);
|
|
21
|
+
return {
|
|
22
|
+
data: response.data.map(
|
|
23
|
+
(user) => new (0, _chunkC3JBYESScjs.UserResource)(this, user, _optionalChain([params, 'optionalAccess', _ => _.includeRole]) ? { includeRole: true } : void 0)
|
|
24
|
+
),
|
|
25
|
+
nextCursor: response.nextCursor
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
async create(data) {
|
|
29
|
+
return this.http.post("/users", data);
|
|
30
|
+
}
|
|
31
|
+
async delete(id) {
|
|
32
|
+
await this.http.delete(`/users/${id}`);
|
|
33
|
+
}
|
|
34
|
+
async changeRole(id, newRoleName) {
|
|
35
|
+
const data = { newRoleName };
|
|
36
|
+
await this.http.patch(`/users/${id}/role`, data);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
exports.UserClient = UserClient;
|
|
43
|
+
//# sourceMappingURL=chunk-B7CINZ27.cjs.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunk4M2HGY3Fcjs = require('./chunk-4M2HGY3F.cjs');
|
|
4
|
+
|
|
5
|
+
// src/clients/discover.ts
|
|
6
|
+
var DiscoverClient = class extends _chunk4M2HGY3Fcjs.BaseClient {
|
|
7
|
+
async get(params) {
|
|
8
|
+
return this.http.get("/discover", params);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
exports.DiscoverClient = DiscoverClient;
|
|
15
|
+
//# sourceMappingURL=chunk-BA4KTRMX.cjs.map
|
|
@@ -1,21 +1,40 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
DataTableResource
|
|
3
|
+
} from "./chunk-T62VHXNY.js";
|
|
4
|
+
import {
|
|
5
|
+
BaseClient
|
|
6
|
+
} from "./chunk-Q6FSREKN.js";
|
|
4
7
|
|
|
5
|
-
// src/
|
|
6
|
-
var
|
|
8
|
+
// src/clients/data-table.ts
|
|
9
|
+
var DataTableClient = class extends BaseClient {
|
|
7
10
|
async list(params) {
|
|
8
11
|
return this.http.get("/data-tables", params);
|
|
9
12
|
}
|
|
10
13
|
async get(id) {
|
|
11
14
|
return this.http.get(`/data-tables/${id}`);
|
|
12
15
|
}
|
|
16
|
+
async getResource(id) {
|
|
17
|
+
return new DataTableResource(this, await this.get(id));
|
|
18
|
+
}
|
|
19
|
+
async listResources(params) {
|
|
20
|
+
const response = await this.list(params);
|
|
21
|
+
return {
|
|
22
|
+
data: response.data.map((dataTable) => new DataTableResource(this, dataTable)),
|
|
23
|
+
nextCursor: response.nextCursor
|
|
24
|
+
};
|
|
25
|
+
}
|
|
13
26
|
async create(data) {
|
|
14
27
|
return this.http.post("/data-tables", data);
|
|
15
28
|
}
|
|
29
|
+
async createResource(data) {
|
|
30
|
+
return new DataTableResource(this, await this.create(data));
|
|
31
|
+
}
|
|
16
32
|
async update(id, data) {
|
|
17
33
|
return this.http.patch(`/data-tables/${id}`, data);
|
|
18
34
|
}
|
|
35
|
+
async updateResource(id, data) {
|
|
36
|
+
return new DataTableResource(this, await this.update(id, data));
|
|
37
|
+
}
|
|
19
38
|
async delete(id) {
|
|
20
39
|
await this.http.delete(`/data-tables/${id}`);
|
|
21
40
|
}
|
|
@@ -49,6 +68,6 @@ var DataTableHandle = class extends BaseHandle {
|
|
|
49
68
|
};
|
|
50
69
|
|
|
51
70
|
export {
|
|
52
|
-
|
|
71
|
+
DataTableClient
|
|
53
72
|
};
|
|
54
|
-
//# sourceMappingURL=chunk-
|
|
73
|
+
//# sourceMappingURL=chunk-BQ2OTUXQ.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkFIKGC2ELcjs = require('./chunk-FIKGC2EL.cjs');
|
|
4
|
+
|
|
5
|
+
// src/resources/user.ts
|
|
6
|
+
var UserResource = class extends _chunkFIKGC2ELcjs.BaseResource {
|
|
7
|
+
constructor(users, user, params) {
|
|
8
|
+
super(user);
|
|
9
|
+
this.users = users;
|
|
10
|
+
this.params = params;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
get id() {
|
|
15
|
+
return this.data.id;
|
|
16
|
+
}
|
|
17
|
+
get email() {
|
|
18
|
+
return this.data.email;
|
|
19
|
+
}
|
|
20
|
+
async refresh() {
|
|
21
|
+
return this.replaceSnapshot(await this.users.get(this.id, this.params));
|
|
22
|
+
}
|
|
23
|
+
async delete() {
|
|
24
|
+
await this.users.delete(this.id);
|
|
25
|
+
}
|
|
26
|
+
async changeRole(newRoleName) {
|
|
27
|
+
await this.users.changeRole(this.id, newRoleName);
|
|
28
|
+
return this.mergeSnapshot({ role: newRoleName });
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
exports.UserResource = UserResource;
|
|
35
|
+
//# sourceMappingURL=chunk-C3JBYESS.cjs.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ExecutionResource
|
|
3
|
+
} from "./chunk-S4ZASMBT.js";
|
|
4
|
+
import {
|
|
5
|
+
BaseClient
|
|
6
|
+
} from "./chunk-Q6FSREKN.js";
|
|
7
|
+
|
|
8
|
+
// src/clients/execution.ts
|
|
9
|
+
var ExecutionClient = class extends BaseClient {
|
|
10
|
+
async list(params) {
|
|
11
|
+
return this.http.get("/executions", params);
|
|
12
|
+
}
|
|
13
|
+
async get(id, params) {
|
|
14
|
+
return this.http.get(`/executions/${id}`, params);
|
|
15
|
+
}
|
|
16
|
+
async getResource(id, params) {
|
|
17
|
+
return new ExecutionResource(this, await this.get(id, params), params);
|
|
18
|
+
}
|
|
19
|
+
async listResources(params) {
|
|
20
|
+
const response = await this.list(params);
|
|
21
|
+
const getParams = params ? {
|
|
22
|
+
includeData: params.includeData,
|
|
23
|
+
redactExecutionData: params.redactExecutionData
|
|
24
|
+
} : void 0;
|
|
25
|
+
return {
|
|
26
|
+
data: response.data.map((execution) => new ExecutionResource(this, execution, getParams)),
|
|
27
|
+
nextCursor: response.nextCursor
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
async delete(id) {
|
|
31
|
+
return this.http.delete(`/executions/${id}`);
|
|
32
|
+
}
|
|
33
|
+
async retry(id, data) {
|
|
34
|
+
return this.http.post(`/executions/${id}/retry`, data);
|
|
35
|
+
}
|
|
36
|
+
async stop(id) {
|
|
37
|
+
return this.http.post(`/executions/${id}/stop`);
|
|
38
|
+
}
|
|
39
|
+
async stopMany(data) {
|
|
40
|
+
return this.http.post("/executions/stop", data);
|
|
41
|
+
}
|
|
42
|
+
async getTags(id) {
|
|
43
|
+
return this.http.get(`/executions/${id}/tags`);
|
|
44
|
+
}
|
|
45
|
+
async updateTags(id, tags) {
|
|
46
|
+
return this.http.put(`/executions/${id}/tags`, tags);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export {
|
|
51
|
+
ExecutionClient
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=chunk-C6W6ERQD.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk4M2HGY3Fcjs = require('./chunk-4M2HGY3F.cjs');
|
|
4
4
|
|
|
5
|
-
// src/
|
|
6
|
-
var
|
|
5
|
+
// src/clients/n8n-package.ts
|
|
6
|
+
var N8nPackageClient = class extends _chunk4M2HGY3Fcjs.BaseClient {
|
|
7
7
|
async exportWorkflows(data) {
|
|
8
8
|
return this.http.post("/n8n-packages/export", data, void 0, { Accept: "application/gzip" });
|
|
9
9
|
}
|
|
@@ -25,5 +25,5 @@ var N8nPackageHandle = class extends _chunkACVK7R2Lcjs.BaseHandle {
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
exports.
|
|
29
|
-
//# sourceMappingURL=chunk-
|
|
28
|
+
exports.N8nPackageClient = N8nPackageClient;
|
|
29
|
+
//# sourceMappingURL=chunk-CCS5ALTN.cjs.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
var _chunkYSWBOCXJcjs = require('./chunk-YSWBOCXJ.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkLC3TKRMXcjs = require('./chunk-LC3TKRMX.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunk4M2HGY3Fcjs = require('./chunk-4M2HGY3F.cjs');
|
|
10
|
+
|
|
11
|
+
// src/clients/variable.ts
|
|
12
|
+
var VariableClient = class extends _chunk4M2HGY3Fcjs.BaseClient {
|
|
13
|
+
async list(params) {
|
|
14
|
+
return this.http.get("/variables", params);
|
|
15
|
+
}
|
|
16
|
+
async get(id, params) {
|
|
17
|
+
const variable = await this.findVariable(id, params);
|
|
18
|
+
if (!variable) {
|
|
19
|
+
throw new (0, _chunkLC3TKRMXcjs.HttpError)(404, `Variable not found: ${id}`, { id });
|
|
20
|
+
}
|
|
21
|
+
return variable;
|
|
22
|
+
}
|
|
23
|
+
async getResource(id, params) {
|
|
24
|
+
return new (0, _chunkYSWBOCXJcjs.VariableResource)(this, await this.get(id, params), params);
|
|
25
|
+
}
|
|
26
|
+
async listResources(params) {
|
|
27
|
+
const response = await this.list(params);
|
|
28
|
+
return {
|
|
29
|
+
data: response.data.map((variable) => new (0, _chunkYSWBOCXJcjs.VariableResource)(this, variable, params)),
|
|
30
|
+
nextCursor: response.nextCursor
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
async create(data) {
|
|
34
|
+
await this.http.post("/variables", data);
|
|
35
|
+
}
|
|
36
|
+
async update(id, data) {
|
|
37
|
+
await this.http.put(`/variables/${id}`, data);
|
|
38
|
+
}
|
|
39
|
+
async delete(id) {
|
|
40
|
+
await this.http.delete(`/variables/${id}`);
|
|
41
|
+
}
|
|
42
|
+
async findVariable(id, params) {
|
|
43
|
+
let cursor = _optionalChain([params, 'optionalAccess', _ => _.cursor]);
|
|
44
|
+
do {
|
|
45
|
+
const response = await this.list({ ...params, cursor });
|
|
46
|
+
const variable = response.data.find((entry) => entry.id === id);
|
|
47
|
+
if (variable) {
|
|
48
|
+
return variable;
|
|
49
|
+
}
|
|
50
|
+
cursor = response.nextCursor;
|
|
51
|
+
} while (cursor);
|
|
52
|
+
return void 0;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
exports.VariableClient = VariableClient;
|
|
59
|
+
//# sourceMappingURL=chunk-DTDNBA7W.cjs.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CommunityPackageResource
|
|
3
|
+
} from "./chunk-YHSDCE3I.js";
|
|
4
|
+
import {
|
|
5
|
+
HttpError
|
|
6
|
+
} from "./chunk-RMEH2UPX.js";
|
|
7
|
+
import {
|
|
8
|
+
BaseClient
|
|
9
|
+
} from "./chunk-Q6FSREKN.js";
|
|
10
|
+
|
|
11
|
+
// src/clients/community-package.ts
|
|
12
|
+
var CommunityPackageClient = class extends BaseClient {
|
|
13
|
+
async list() {
|
|
14
|
+
return this.http.get("/community-packages");
|
|
15
|
+
}
|
|
16
|
+
async listResources() {
|
|
17
|
+
const communityPackages = await this.list();
|
|
18
|
+
return communityPackages.map((communityPackage) => new CommunityPackageResource(this, communityPackage));
|
|
19
|
+
}
|
|
20
|
+
async getResource(name) {
|
|
21
|
+
const communityPackages = await this.list();
|
|
22
|
+
const communityPackage = communityPackages.find((entry) => entry.packageName === name);
|
|
23
|
+
if (!communityPackage) {
|
|
24
|
+
throw new HttpError(404, `Community package not found: ${name}`, { name });
|
|
25
|
+
}
|
|
26
|
+
return new CommunityPackageResource(this, communityPackage);
|
|
27
|
+
}
|
|
28
|
+
async install(data) {
|
|
29
|
+
return this.http.post("/community-packages", data);
|
|
30
|
+
}
|
|
31
|
+
async installResource(data) {
|
|
32
|
+
return new CommunityPackageResource(this, await this.install(data));
|
|
33
|
+
}
|
|
34
|
+
async update(name, data) {
|
|
35
|
+
return this.http.patch(`/community-packages/${name}`, data);
|
|
36
|
+
}
|
|
37
|
+
async updateResource(name, data) {
|
|
38
|
+
return new CommunityPackageResource(this, await this.update(name, data));
|
|
39
|
+
}
|
|
40
|
+
async uninstall(name) {
|
|
41
|
+
await this.http.delete(`/community-packages/${name}`);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export {
|
|
46
|
+
CommunityPackageClient
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=chunk-ETVDSJLY.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BaseClient
|
|
3
|
+
} from "./chunk-Q6FSREKN.js";
|
|
4
|
+
|
|
5
|
+
// src/clients/discover.ts
|
|
6
|
+
var DiscoverClient = class extends BaseClient {
|
|
7
|
+
async get(params) {
|
|
8
|
+
return this.http.get("/discover", params);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
DiscoverClient
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=chunk-F5RPJMNK.js.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/resources/base.ts
|
|
2
|
+
var BaseResource = class {
|
|
3
|
+
constructor(snapshot) {
|
|
4
|
+
this.snapshot = snapshot;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
get data() {
|
|
8
|
+
return this.snapshot;
|
|
9
|
+
}
|
|
10
|
+
toObject() {
|
|
11
|
+
return this.snapshot;
|
|
12
|
+
}
|
|
13
|
+
toJSON() {
|
|
14
|
+
return this.toObject();
|
|
15
|
+
}
|
|
16
|
+
replaceSnapshot(data) {
|
|
17
|
+
this.snapshot = data;
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
20
|
+
mergeSnapshot(data) {
|
|
21
|
+
this.snapshot = { ...this.snapshot, ...data };
|
|
22
|
+
return this;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
exports.BaseResource = BaseResource;
|
|
29
|
+
//# sourceMappingURL=chunk-FIKGC2EL.cjs.map
|
|
@@ -1,21 +1,40 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkNBLW25MEcjs = require('./chunk-NBLW25ME.cjs');
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
var
|
|
5
|
+
|
|
6
|
+
var _chunk4M2HGY3Fcjs = require('./chunk-4M2HGY3F.cjs');
|
|
7
|
+
|
|
8
|
+
// src/clients/data-table.ts
|
|
9
|
+
var DataTableClient = class extends _chunk4M2HGY3Fcjs.BaseClient {
|
|
7
10
|
async list(params) {
|
|
8
11
|
return this.http.get("/data-tables", params);
|
|
9
12
|
}
|
|
10
13
|
async get(id) {
|
|
11
14
|
return this.http.get(`/data-tables/${id}`);
|
|
12
15
|
}
|
|
16
|
+
async getResource(id) {
|
|
17
|
+
return new (0, _chunkNBLW25MEcjs.DataTableResource)(this, await this.get(id));
|
|
18
|
+
}
|
|
19
|
+
async listResources(params) {
|
|
20
|
+
const response = await this.list(params);
|
|
21
|
+
return {
|
|
22
|
+
data: response.data.map((dataTable) => new (0, _chunkNBLW25MEcjs.DataTableResource)(this, dataTable)),
|
|
23
|
+
nextCursor: response.nextCursor
|
|
24
|
+
};
|
|
25
|
+
}
|
|
13
26
|
async create(data) {
|
|
14
27
|
return this.http.post("/data-tables", data);
|
|
15
28
|
}
|
|
29
|
+
async createResource(data) {
|
|
30
|
+
return new (0, _chunkNBLW25MEcjs.DataTableResource)(this, await this.create(data));
|
|
31
|
+
}
|
|
16
32
|
async update(id, data) {
|
|
17
33
|
return this.http.patch(`/data-tables/${id}`, data);
|
|
18
34
|
}
|
|
35
|
+
async updateResource(id, data) {
|
|
36
|
+
return new (0, _chunkNBLW25MEcjs.DataTableResource)(this, await this.update(id, data));
|
|
37
|
+
}
|
|
19
38
|
async delete(id) {
|
|
20
39
|
await this.http.delete(`/data-tables/${id}`);
|
|
21
40
|
}
|
|
@@ -50,5 +69,5 @@ var DataTableHandle = class extends _chunkACVK7R2Lcjs.BaseHandle {
|
|
|
50
69
|
|
|
51
70
|
|
|
52
71
|
|
|
53
|
-
exports.
|
|
54
|
-
//# sourceMappingURL=chunk-
|
|
72
|
+
exports.DataTableClient = DataTableClient;
|
|
73
|
+
//# sourceMappingURL=chunk-FTIVM52X.cjs.map
|