@vertesia/client 0.80.1 → 0.81.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/lib/cjs/AccountApi.js +85 -0
- package/lib/cjs/AccountApi.js.map +1 -0
- package/lib/cjs/AccountsApi.js +16 -0
- package/lib/cjs/AccountsApi.js.map +1 -0
- package/lib/cjs/AnalyticsApi.js +13 -0
- package/lib/cjs/AnalyticsApi.js.map +1 -0
- package/lib/cjs/ApiKeysApi.js +63 -0
- package/lib/cjs/ApiKeysApi.js.map +1 -0
- package/lib/cjs/AppsApi.js +119 -0
- package/lib/cjs/AppsApi.js.map +1 -0
- package/lib/cjs/CommandsApi.js +19 -0
- package/lib/cjs/CommandsApi.js.map +1 -0
- package/lib/cjs/EnvironmentsApi.js +58 -0
- package/lib/cjs/EnvironmentsApi.js.map +1 -0
- package/lib/cjs/GroupsApi.js +78 -0
- package/lib/cjs/GroupsApi.js.map +1 -0
- package/lib/cjs/IamApi.js +53 -0
- package/lib/cjs/IamApi.js.map +1 -0
- package/lib/cjs/InteractionBase.js +44 -0
- package/lib/cjs/InteractionBase.js.map +1 -0
- package/lib/cjs/InteractionCatalogApi.js +64 -0
- package/lib/cjs/InteractionCatalogApi.js.map +1 -0
- package/lib/cjs/InteractionOutput.js +300 -0
- package/lib/cjs/InteractionOutput.js.map +1 -0
- package/lib/cjs/InteractionResult.example.js +57 -0
- package/lib/cjs/InteractionResult.example.js.map +1 -0
- package/lib/cjs/InteractionsApi.js +243 -0
- package/lib/cjs/InteractionsApi.js.map +1 -0
- package/lib/cjs/ProjectsApi.js +53 -0
- package/lib/cjs/ProjectsApi.js.map +1 -0
- package/lib/cjs/PromptsApi.js +133 -0
- package/lib/cjs/PromptsApi.js.map +1 -0
- package/lib/cjs/RefsApi.js +14 -0
- package/lib/cjs/RefsApi.js.map +1 -0
- package/lib/cjs/RunsApi.js +113 -0
- package/lib/cjs/RunsApi.js.map +1 -0
- package/lib/cjs/SkillsApi.js +39 -0
- package/lib/cjs/SkillsApi.js.map +1 -0
- package/lib/cjs/StreamSource.js +17 -0
- package/lib/cjs/StreamSource.js.map +1 -0
- package/lib/cjs/TrainingApi.js +54 -0
- package/lib/cjs/TrainingApi.js.map +1 -0
- package/lib/cjs/UsersApi.js +13 -0
- package/lib/cjs/UsersApi.js.map +1 -0
- package/lib/cjs/client.js +351 -0
- package/lib/cjs/client.js.map +1 -0
- package/lib/cjs/execute.js +158 -0
- package/lib/cjs/execute.js.map +1 -0
- package/lib/cjs/index.js +22 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/nodejs/NodeStreamSource.js +45 -0
- package/lib/cjs/nodejs/NodeStreamSource.js.map +1 -0
- package/lib/cjs/nodejs/index.js +18 -0
- package/lib/cjs/nodejs/index.js.map +1 -0
- package/lib/cjs/package.json +3 -0
- package/lib/cjs/store/AnalyzeDocApi.js +56 -0
- package/lib/cjs/store/AnalyzeDocApi.js.map +1 -0
- package/lib/cjs/store/CollectionsApi.js +131 -0
- package/lib/cjs/store/CollectionsApi.js.map +1 -0
- package/lib/cjs/store/CommandsApi.js +17 -0
- package/lib/cjs/store/CommandsApi.js.map +1 -0
- package/lib/cjs/store/EmbeddingsApi.js +29 -0
- package/lib/cjs/store/EmbeddingsApi.js.map +1 -0
- package/lib/cjs/store/FilesApi.js +225 -0
- package/lib/cjs/store/FilesApi.js.map +1 -0
- package/lib/cjs/store/ObjectsApi.js +283 -0
- package/lib/cjs/store/ObjectsApi.js.map +1 -0
- package/lib/cjs/store/TypesApi.js +57 -0
- package/lib/cjs/store/TypesApi.js.map +1 -0
- package/lib/cjs/store/WorkersApi.js +16 -0
- package/lib/cjs/store/WorkersApi.js.map +1 -0
- package/lib/cjs/store/WorkflowsApi.js +425 -0
- package/lib/cjs/store/WorkflowsApi.js.map +1 -0
- package/lib/cjs/store/client.js +71 -0
- package/lib/cjs/store/client.js.map +1 -0
- package/lib/cjs/store/errors.js +11 -0
- package/lib/cjs/store/errors.js.map +1 -0
- package/lib/cjs/store/index.js +23 -0
- package/lib/cjs/store/index.js.map +1 -0
- package/lib/cjs/store/version.js +6 -0
- package/lib/cjs/store/version.js.map +1 -0
- package/lib/esm/AccountApi.js +82 -0
- package/lib/esm/AccountApi.js.map +1 -0
- package/lib/esm/AccountsApi.js +13 -0
- package/lib/esm/AccountsApi.js.map +1 -0
- package/lib/esm/AnalyticsApi.js +10 -0
- package/lib/esm/AnalyticsApi.js.map +1 -0
- package/lib/esm/ApiKeysApi.js +59 -0
- package/lib/esm/ApiKeysApi.js.map +1 -0
- package/lib/esm/AppsApi.js +116 -0
- package/lib/esm/AppsApi.js.map +1 -0
- package/lib/esm/CommandsApi.js +16 -0
- package/lib/esm/CommandsApi.js.map +1 -0
- package/lib/esm/EnvironmentsApi.js +55 -0
- package/lib/esm/EnvironmentsApi.js.map +1 -0
- package/lib/esm/GroupsApi.js +74 -0
- package/lib/esm/GroupsApi.js.map +1 -0
- package/lib/esm/IamApi.js +47 -0
- package/lib/esm/IamApi.js.map +1 -0
- package/lib/esm/InteractionBase.js +40 -0
- package/lib/esm/InteractionBase.js.map +1 -0
- package/lib/esm/InteractionCatalogApi.js +60 -0
- package/lib/esm/InteractionCatalogApi.js.map +1 -0
- package/lib/esm/InteractionOutput.js +293 -0
- package/lib/esm/InteractionOutput.js.map +1 -0
- package/lib/esm/InteractionResult.example.js +55 -0
- package/lib/esm/InteractionResult.example.js.map +1 -0
- package/lib/esm/InteractionsApi.js +240 -0
- package/lib/esm/InteractionsApi.js.map +1 -0
- package/lib/esm/ProjectsApi.js +50 -0
- package/lib/esm/ProjectsApi.js.map +1 -0
- package/lib/esm/PromptsApi.js +130 -0
- package/lib/esm/PromptsApi.js.map +1 -0
- package/lib/esm/RefsApi.js +10 -0
- package/lib/esm/RefsApi.js.map +1 -0
- package/lib/esm/RunsApi.js +109 -0
- package/lib/esm/RunsApi.js.map +1 -0
- package/lib/esm/SkillsApi.js +36 -0
- package/lib/esm/SkillsApi.js.map +1 -0
- package/lib/esm/StreamSource.js +13 -0
- package/lib/esm/StreamSource.js.map +1 -0
- package/lib/esm/TrainingApi.js +51 -0
- package/lib/esm/TrainingApi.js.map +1 -0
- package/lib/esm/UsersApi.js +10 -0
- package/lib/esm/UsersApi.js.map +1 -0
- package/lib/esm/client.js +342 -0
- package/lib/esm/client.js.map +1 -0
- package/lib/esm/execute.js +118 -0
- package/lib/esm/execute.js.map +1 -0
- package/lib/esm/index.js +6 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/nodejs/NodeStreamSource.js +41 -0
- package/lib/esm/nodejs/NodeStreamSource.js.map +1 -0
- package/lib/esm/nodejs/index.js +2 -0
- package/lib/esm/nodejs/index.js.map +1 -0
- package/lib/esm/store/AnalyzeDocApi.js +52 -0
- package/lib/esm/store/AnalyzeDocApi.js.map +1 -0
- package/lib/esm/store/CollectionsApi.js +127 -0
- package/lib/esm/store/CollectionsApi.js.map +1 -0
- package/lib/esm/store/CommandsApi.js +13 -0
- package/lib/esm/store/CommandsApi.js.map +1 -0
- package/lib/esm/store/EmbeddingsApi.js +25 -0
- package/lib/esm/store/EmbeddingsApi.js.map +1 -0
- package/lib/esm/store/FilesApi.js +219 -0
- package/lib/esm/store/FilesApi.js.map +1 -0
- package/lib/esm/store/ObjectsApi.js +279 -0
- package/lib/esm/store/ObjectsApi.js.map +1 -0
- package/lib/esm/store/TypesApi.js +53 -0
- package/lib/esm/store/TypesApi.js.map +1 -0
- package/lib/esm/store/WorkersApi.js +12 -0
- package/lib/esm/store/WorkersApi.js.map +1 -0
- package/lib/esm/store/WorkflowsApi.js +419 -0
- package/lib/esm/store/WorkflowsApi.js.map +1 -0
- package/lib/esm/store/client.js +67 -0
- package/lib/esm/store/client.js.map +1 -0
- package/lib/esm/store/errors.js +7 -0
- package/lib/esm/store/errors.js.map +1 -0
- package/lib/esm/store/index.js +7 -0
- package/lib/esm/store/index.js.map +1 -0
- package/lib/esm/store/version.js +3 -0
- package/lib/esm/store/version.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/types/AccountApi.d.ts +59 -0
- package/lib/types/AccountApi.d.ts.map +1 -0
- package/lib/types/AccountsApi.d.ts +7 -0
- package/lib/types/AccountsApi.d.ts.map +1 -0
- package/lib/types/AnalyticsApi.d.ts +6 -0
- package/lib/types/AnalyticsApi.d.ts.map +1 -0
- package/lib/types/ApiKeysApi.d.ts +42 -0
- package/lib/types/ApiKeysApi.d.ts.map +1 -0
- package/lib/types/AppsApi.d.ts +65 -0
- package/lib/types/AppsApi.d.ts.map +1 -0
- package/lib/types/CommandsApi.d.ts +10 -0
- package/lib/types/CommandsApi.d.ts.map +1 -0
- package/lib/types/EnvironmentsApi.d.ts +30 -0
- package/lib/types/EnvironmentsApi.d.ts.map +1 -0
- package/lib/types/GroupsApi.d.ts +65 -0
- package/lib/types/GroupsApi.d.ts.map +1 -0
- package/lib/types/IamApi.d.ts +41 -0
- package/lib/types/IamApi.d.ts.map +1 -0
- package/lib/types/InteractionBase.d.ts +22 -0
- package/lib/types/InteractionBase.d.ts.map +1 -0
- package/lib/types/InteractionCatalogApi.d.ts +36 -0
- package/lib/types/InteractionCatalogApi.d.ts.map +1 -0
- package/lib/types/InteractionOutput.d.ts +174 -0
- package/lib/types/InteractionOutput.d.ts.map +1 -0
- package/lib/types/InteractionResult.example.d.ts +6 -0
- package/lib/types/InteractionResult.example.d.ts.map +1 -0
- package/lib/types/InteractionsApi.d.ts +165 -0
- package/lib/types/InteractionsApi.d.ts.map +1 -0
- package/lib/types/ProjectsApi.d.ts +18 -0
- package/lib/types/ProjectsApi.d.ts.map +1 -0
- package/lib/types/PromptsApi.d.ts +106 -0
- package/lib/types/PromptsApi.d.ts.map +1 -0
- package/lib/types/RefsApi.d.ts +6 -0
- package/lib/types/RefsApi.d.ts.map +1 -0
- package/lib/types/RunsApi.d.ts +79 -0
- package/lib/types/RunsApi.d.ts.map +1 -0
- package/lib/types/SkillsApi.d.ts +26 -0
- package/lib/types/SkillsApi.d.ts.map +1 -0
- package/lib/types/StreamSource.d.ts +7 -0
- package/lib/types/StreamSource.d.ts.map +1 -0
- package/lib/types/TrainingApi.d.ts +27 -0
- package/lib/types/TrainingApi.d.ts.map +1 -0
- package/lib/types/UsersApi.d.ts +6 -0
- package/lib/types/UsersApi.d.ts.map +1 -0
- package/lib/types/client.d.ts +125 -0
- package/lib/types/client.d.ts.map +1 -0
- package/lib/types/execute.d.ts +37 -0
- package/lib/types/execute.d.ts.map +1 -0
- package/lib/types/index.d.ts +10 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/nodejs/NodeStreamSource.d.ts +9 -0
- package/lib/types/nodejs/NodeStreamSource.d.ts.map +1 -0
- package/lib/types/nodejs/index.d.ts +1 -0
- package/lib/types/nodejs/index.d.ts.map +1 -0
- package/lib/types/store/AnalyzeDocApi.d.ts +17 -0
- package/lib/types/store/AnalyzeDocApi.d.ts.map +1 -0
- package/lib/types/store/CollectionsApi.d.ts +82 -0
- package/lib/types/store/CollectionsApi.d.ts.map +1 -0
- package/lib/types/store/CommandsApi.d.ts +10 -0
- package/lib/types/store/CommandsApi.d.ts.map +1 -0
- package/lib/types/store/EmbeddingsApi.d.ts +12 -0
- package/lib/types/store/EmbeddingsApi.d.ts.map +1 -0
- package/lib/types/store/FilesApi.d.ts +103 -0
- package/lib/types/store/FilesApi.d.ts.map +1 -0
- package/lib/types/store/ObjectsApi.d.ts +117 -0
- package/lib/types/store/ObjectsApi.d.ts.map +1 -0
- package/lib/types/store/TypesApi.d.ts +23 -0
- package/lib/types/store/TypesApi.d.ts.map +1 -0
- package/lib/types/store/WorkersApi.d.ts +6 -0
- package/lib/types/store/WorkersApi.d.ts.map +1 -0
- package/lib/types/store/WorkflowsApi.d.ts +71 -0
- package/lib/types/store/WorkflowsApi.d.ts.map +1 -0
- package/lib/types/store/client.d.ts +35 -0
- package/lib/types/store/client.d.ts.map +1 -0
- package/lib/types/store/errors.d.ts +4 -0
- package/lib/types/store/errors.d.ts.map +1 -0
- package/lib/types/store/index.d.ts +6 -0
- package/lib/types/store/index.d.ts.map +1 -0
- package/lib/types/store/version.d.ts +2 -0
- package/lib/types/store/version.d.ts.map +1 -0
- package/lib/vertesia-client.js +2 -0
- package/lib/vertesia-client.js.map +1 -0
- package/package.json +4 -4
- package/src/store/WorkflowsApi.ts +12 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const api_fetch_client_1 = require("@vertesia/api-fetch-client");
|
|
4
|
+
class AccountApi extends api_fetch_client_1.ApiTopic {
|
|
5
|
+
constructor(parent) {
|
|
6
|
+
super(parent, "/api/v1/account");
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Retrieve all account information for current account
|
|
10
|
+
* @returns Account[]
|
|
11
|
+
*/
|
|
12
|
+
info() {
|
|
13
|
+
return this.get('/');
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Update account information
|
|
17
|
+
* @returns Account
|
|
18
|
+
*/
|
|
19
|
+
update(payload) {
|
|
20
|
+
return this.put('/', { payload });
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Get all projects for account
|
|
24
|
+
*/
|
|
25
|
+
projects() {
|
|
26
|
+
return this.get('/projects').then(res => res.data);
|
|
27
|
+
}
|
|
28
|
+
members() {
|
|
29
|
+
return this.get('/members');
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Invite User to account
|
|
33
|
+
*/
|
|
34
|
+
inviteUser(payload) {
|
|
35
|
+
return this.post('/invites', { payload });
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Fetch Invites for Principal
|
|
39
|
+
* @returns UserInviteTokenData[]
|
|
40
|
+
* */
|
|
41
|
+
listInvites() {
|
|
42
|
+
return this.get('/invites');
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Fetch Invites for specific account or project
|
|
46
|
+
* @param type Filter for the type of invitation, either "project" or "account"
|
|
47
|
+
* @returns UserInviteTokenData[]
|
|
48
|
+
* */
|
|
49
|
+
listInvitation(type = "project") {
|
|
50
|
+
return this.get(`/invites/${type}`);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Accept Invite for account
|
|
54
|
+
* @returns UserInviteTokenData
|
|
55
|
+
* */
|
|
56
|
+
acceptInvite(id) {
|
|
57
|
+
return this.put(`/invites/${id}`);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Delete Invite for account
|
|
61
|
+
* @returns UserInviteTokenData
|
|
62
|
+
* */
|
|
63
|
+
rejectInvite(id) {
|
|
64
|
+
return this.delete(`/invites/${id}`);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Get Onboarding Progress for account
|
|
68
|
+
*/
|
|
69
|
+
onboardingProgress() {
|
|
70
|
+
return this.get('/onboarding');
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Get a google auth token for the current project.
|
|
74
|
+
* This token can be used to access exposed google cloud services
|
|
75
|
+
* @returns
|
|
76
|
+
*/
|
|
77
|
+
getGoogleToken() {
|
|
78
|
+
return this.get('/google-token');
|
|
79
|
+
}
|
|
80
|
+
getStripeBillingStatus() {
|
|
81
|
+
return this.get('/stripe-billing-status');
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.default = AccountApi;
|
|
85
|
+
//# sourceMappingURL=AccountApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountApi.js","sourceRoot":"","sources":["../../src/AccountApi.ts"],"names":[],"mappings":";;AAAA,iEAAkE;AAGlE,MAAqB,UAAW,SAAQ,2BAAQ;IAE5C,YAAY,MAAkB;QAC1B,KAAK,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;IACpC,CAAC;IAED;;;OAGG;IACH,IAAI;QACA,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IAED;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 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const api_fetch_client_1 = require("@vertesia/api-fetch-client");
|
|
4
|
+
class AccountsApi extends api_fetch_client_1.ApiTopic {
|
|
5
|
+
constructor(parent) {
|
|
6
|
+
super(parent, "/api/v1/accounts");
|
|
7
|
+
}
|
|
8
|
+
create(name) {
|
|
9
|
+
return this.post('/', { payload: { name } });
|
|
10
|
+
}
|
|
11
|
+
list() {
|
|
12
|
+
return this.get('/');
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.default = AccountsApi;
|
|
16
|
+
//# sourceMappingURL=AccountsApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountsApi.js","sourceRoot":"","sources":["../../src/AccountsApi.ts"],"names":[],"mappings":";;AACA,iEAAkE;AAElE,MAAqB,WAAY,SAAQ,2BAAQ;IAE7C,YAAY,MAAkB;QAC1B,KAAK,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAA;IACrC,CAAC;IAED,MAAM,CAAC,IAAY;QACf,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IACjD,CAAC;IAED,IAAI;QACA,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;CAMJ;AAlBD,8BAkBC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const api_fetch_client_1 = require("@vertesia/api-fetch-client");
|
|
4
|
+
class AnalyticsApi extends api_fetch_client_1.ApiTopic {
|
|
5
|
+
constructor(parent) {
|
|
6
|
+
super(parent, "/api/v1/analytics");
|
|
7
|
+
}
|
|
8
|
+
runs(params) {
|
|
9
|
+
return this.post('/runs', { payload: params });
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.default = AnalyticsApi;
|
|
13
|
+
//# sourceMappingURL=AnalyticsApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnalyticsApi.js","sourceRoot":"","sources":["../../src/AnalyticsApi.ts"],"names":[],"mappings":";;AACA,iEAAkE;AAKlE,MAAqB,YAAa,SAAQ,2BAAQ;IAE9C,YAAY,MAAkB;QAC1B,KAAK,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAA;IACtC,CAAC;IAED,IAAI,CAAC,MAAyB;QAE1B,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;IAEnD,CAAC;CAGJ;AAbD,+BAaC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApiKeysApi = void 0;
|
|
4
|
+
const api_fetch_client_1 = require("@vertesia/api-fetch-client");
|
|
5
|
+
class ApiKeysApi extends api_fetch_client_1.ApiTopic {
|
|
6
|
+
constructor(parent) {
|
|
7
|
+
super(parent, "/api/v1/apikeys");
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* List all keys for account without values
|
|
11
|
+
* @returns ApiKey[]
|
|
12
|
+
*/
|
|
13
|
+
list(level = 'account') {
|
|
14
|
+
return this.get('/', { query: { level } });
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Create an new ApiKey for account
|
|
18
|
+
* BE VERY CAREFUL USING THIS API
|
|
19
|
+
* ALL REQUESTS ARE LOGGED IN SECURITY AUDIT LOG
|
|
20
|
+
* @returns ApiKeyWithValue
|
|
21
|
+
*/
|
|
22
|
+
create(payload) {
|
|
23
|
+
return this.post('/', { payload });
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Update an existing ApiKey for account
|
|
27
|
+
* @returns ApiKey
|
|
28
|
+
*/
|
|
29
|
+
update(id, payload) {
|
|
30
|
+
return this.put(`/${id}`, { payload });
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Retrieve an ApiKey and its value
|
|
34
|
+
* BE VERY CAREFUL USING THIS API AS IT EXPOSE THE API KEY VALUE
|
|
35
|
+
* ALL REQUESTS ARE LOGGED IN SECURITY AUDIT LOG
|
|
36
|
+
* @returns ApiKeyWithValue
|
|
37
|
+
* */
|
|
38
|
+
retrieve(id, withValue = false) {
|
|
39
|
+
if (withValue) {
|
|
40
|
+
return this.get(`/${id}`, { query: { withValue: true } });
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
return this.get(`/${id}`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* get or create a temporary public key which can be used from browser to browse and execute interactions.
|
|
48
|
+
* If a public key already exists for the given project (or for the current organization) then it is returned, otherwise a new one is created.
|
|
49
|
+
* The payload object can contain the following properties:
|
|
50
|
+
* - name: the name of the public key. If not specified a random name is generated.
|
|
51
|
+
* - projectId: the id of the project to which the public key will be associated.
|
|
52
|
+
* If not specified the key is associated with the current organization. (i.e. account).
|
|
53
|
+
* - ttl: the time to live of the public key in seconds.
|
|
54
|
+
* The ttl defaults to 1h.
|
|
55
|
+
* @param opts
|
|
56
|
+
* @returns
|
|
57
|
+
*/
|
|
58
|
+
requestPublicKey(payload = {}) {
|
|
59
|
+
return this.get('/pk', { query: payload });
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.ApiKeysApi = ApiKeysApi;
|
|
63
|
+
//# sourceMappingURL=ApiKeysApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiKeysApi.js","sourceRoot":"","sources":["../../src/ApiKeysApi.ts"],"names":[],"mappings":";;;AACA,iEAAkE;AAElE,MAAa,UAAW,SAAQ,2BAAQ;IAGpC,YAAY,MAAkB;QAC1B,KAAK,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;IACpC,CAAC;IAGD;;;OAGG;IACH,IAAI,CAAC,QAA+B,SAAS;QACzC,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;IAC/C,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,OAAoC;QACvC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IACvC,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,EAAU,EAAE,OAAoC;QACnD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IAC3C,CAAC;IAED;;;;;SAKK;IACL,QAAQ,CAAC,EAAU,EAAE,YAAqB,KAAK;QAC3C,IAAI,SAAS,EAAE,CAAC;YACZ,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QAC9D,CAAC;aAAM,CAAC;YACJ,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC9B,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,gBAAgB,CAAC,UAAkC,EAAE;QACjD,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,OAA0C,EAAE,CAAC,CAAC;IAClF,CAAC;CACJ;AA/DD,gCA+DC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const api_fetch_client_1 = require("@vertesia/api-fetch-client");
|
|
4
|
+
class AppsApi extends api_fetch_client_1.ApiTopic {
|
|
5
|
+
constructor(parent) {
|
|
6
|
+
super(parent, "/api/v1/apps");
|
|
7
|
+
}
|
|
8
|
+
create(manifest) {
|
|
9
|
+
return this.post('/', { payload: manifest });
|
|
10
|
+
}
|
|
11
|
+
update(id, manifest) {
|
|
12
|
+
return this.put(`/${id}`, { payload: manifest });
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Get the list if tools provided by the given app.
|
|
16
|
+
* @param appId
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
listAppInstallationTools(appInstallId) {
|
|
20
|
+
return this.get(`/installations/${appInstallId}/tools`);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @param ids - ids to filter by
|
|
24
|
+
* @returns the app manifests but without the agent.tool property which can be big.
|
|
25
|
+
*/
|
|
26
|
+
list() {
|
|
27
|
+
return this.get('/');
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Install the app with the given id in the current project.
|
|
31
|
+
* @param appId - the id of the app to install
|
|
32
|
+
*/
|
|
33
|
+
install(appId, settings) {
|
|
34
|
+
return this.post(`/install`, {
|
|
35
|
+
payload: {
|
|
36
|
+
app_id: appId,
|
|
37
|
+
settings
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Remove the given app from the current project.
|
|
43
|
+
* @param installationId - the id of the app installation
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
uninstall(installationId) {
|
|
47
|
+
return this.del(`/install/${installationId}`);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* get an app unstallation given its name or null if the app is not installed
|
|
51
|
+
* @returns
|
|
52
|
+
*/
|
|
53
|
+
getAppInstallationByName(appName) {
|
|
54
|
+
return this.get(`/installations/name/${appName}`).catch((err) => {
|
|
55
|
+
if (err.status === 404) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
throw err;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Get the project refs where the application is visible by the current user.
|
|
65
|
+
* The application is specified either by id or by name.
|
|
66
|
+
* @param param0
|
|
67
|
+
* @returns
|
|
68
|
+
*/
|
|
69
|
+
getAppInstallationProjects(app) {
|
|
70
|
+
if (!app.id && !app.name) {
|
|
71
|
+
throw new Error("Invalid arguments: appId or appName must be specified");
|
|
72
|
+
}
|
|
73
|
+
const query = app.id ? {
|
|
74
|
+
id: app.id
|
|
75
|
+
} : {
|
|
76
|
+
name: app.name
|
|
77
|
+
};
|
|
78
|
+
return this.get("/installations/projects", {
|
|
79
|
+
query
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Get the apps installed for the current authenticated project
|
|
84
|
+
* @param kind - the kind of app installations to filter by (e.g., 'agent', 'tool', etc.)
|
|
85
|
+
*/
|
|
86
|
+
getInstalledApps(kind) {
|
|
87
|
+
return this.get('/installations', {
|
|
88
|
+
query: {
|
|
89
|
+
kind,
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* This operation will return an array of all the found AppInstallations in the current project
|
|
95
|
+
* including orphaned installations
|
|
96
|
+
* This requires project admin since access is not checked on the insytallations.
|
|
97
|
+
* For a user level list of available installations (with user permission check) use getInstalledApps
|
|
98
|
+
* @returns
|
|
99
|
+
*/
|
|
100
|
+
getAllAppInstallations() {
|
|
101
|
+
return this.get('/installations/all');
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* List the app installations of the current project.
|
|
105
|
+
*/
|
|
106
|
+
listInstallations() {
|
|
107
|
+
return this.get('/installations/refs');
|
|
108
|
+
}
|
|
109
|
+
updateInstallationSettings(settingsPayload) {
|
|
110
|
+
return this.put(`/installations/settings/${settingsPayload.app_id}`, {
|
|
111
|
+
payload: {
|
|
112
|
+
app_id: settingsPayload.app_id,
|
|
113
|
+
settings: settingsPayload.settings
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
exports.default = A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19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const api_fetch_client_1 = require("@vertesia/api-fetch-client");
|
|
4
|
+
/**
|
|
5
|
+
* Various utility commands
|
|
6
|
+
*/
|
|
7
|
+
class CommandsApi extends api_fetch_client_1.ApiTopic {
|
|
8
|
+
constructor(parent) {
|
|
9
|
+
super(parent, "/api/v1/commands");
|
|
10
|
+
}
|
|
11
|
+
async isNamespaceAvailable(name) {
|
|
12
|
+
return this.get(`/namespaces/${name}/is_available`).then((response) => response.available);
|
|
13
|
+
}
|
|
14
|
+
async initSamples() {
|
|
15
|
+
return this.post("/onboarding/init-samples");
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.default = CommandsApi;
|
|
19
|
+
//# sourceMappingURL=CommandsApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandsApi.js","sourceRoot":"","sources":["../../src/CommandsApi.ts"],"names":[],"mappings":";;AAAA,iEAAkE;AAIlE;;GAEG;AAEH,MAAqB,WAAY,SAAQ,2BAAQ;IAE7C,YAAY,MAAkB;QAC1B,KAAK,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAA;IACrC,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAC,IAAY;QACnC,OAAO,IAAI,CAAC,GAAG,CAAC,eAAe,IAAI,eAAe,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC/F,CAAC;IAED,KAAK,CAAC,WAAW;QACb,OAAO,IAAI,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;IACjD,CAAC;CAEJ;AAdD,8BAcC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const api_fetch_client_1 = require("@vertesia/api-fetch-client");
|
|
4
|
+
class EnvironmentsApi extends api_fetch_client_1.ApiTopic {
|
|
5
|
+
constructor(parent) {
|
|
6
|
+
super(parent, "/api/v1/environments");
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* List all environments for the current project
|
|
10
|
+
* @param all if true, list all environments, otherwise only the ones for the current project
|
|
11
|
+
*/
|
|
12
|
+
list(all = false) {
|
|
13
|
+
const query = all ? { all: true } : undefined;
|
|
14
|
+
return this.get('/', { query });
|
|
15
|
+
}
|
|
16
|
+
create(payload) {
|
|
17
|
+
return this.post('/', {
|
|
18
|
+
payload
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
retrieve(id) {
|
|
22
|
+
return this.get('/' + id);
|
|
23
|
+
}
|
|
24
|
+
update(id, payload) {
|
|
25
|
+
return this.put('/' + id, {
|
|
26
|
+
payload
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Update enabled models and / or config. If enabled_models is not provided, the existing enabled models will not change.
|
|
31
|
+
* Same, if config is not provided the exiting config is not changed.
|
|
32
|
+
* If the config is provided then it will be updated without removing fields that are not provided.
|
|
33
|
+
*
|
|
34
|
+
* @param id
|
|
35
|
+
* @param payload
|
|
36
|
+
* @returns
|
|
37
|
+
*/
|
|
38
|
+
updateConfig(id, payload) {
|
|
39
|
+
return this.put('/' + id + '/config', {
|
|
40
|
+
payload
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
listModels(id, payload) {
|
|
44
|
+
return this.get('/' + id + '/models', {
|
|
45
|
+
query: payload ? { ...payload } : undefined
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
listTrainableModels(id) {
|
|
49
|
+
return this.get(`/${id}/trainable-models`);
|
|
50
|
+
}
|
|
51
|
+
embeddings(id, payload) {
|
|
52
|
+
return this.post('/' + id + '/embeddings', {
|
|
53
|
+
payload
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.default = EnvironmentsApi;
|
|
58
|
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C,SAAS;SAC9C,CAAC,CAAC;IACP,CAAC;IAED,mBAAmB,CAAC,EAAU;QAC1B,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC;IAC/C,CAAC;IAED,UAAU,CAAC,EAAU,EAAE,OAA2B;QAC9C,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,EAAE,GAAG,aAAa,EAAE;YACvC,OAAO;SACV,CAAC,CAAC;IACP,CAAC;CAEJ;AAjED,kCAiEC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GroupsApi = void 0;
|
|
4
|
+
const api_fetch_client_1 = require("@vertesia/api-fetch-client");
|
|
5
|
+
class GroupsApi extends api_fetch_client_1.ApiTopic {
|
|
6
|
+
constructor(parent) {
|
|
7
|
+
super(parent, "/groups");
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* List all groups in the current account
|
|
11
|
+
* @param options Query options for filtering and pagination
|
|
12
|
+
* @returns Array of UserGroup objects
|
|
13
|
+
*/
|
|
14
|
+
list(options) {
|
|
15
|
+
return this.get('/', { query: options });
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Create a new group
|
|
19
|
+
* @param payload The group data to create
|
|
20
|
+
* @returns The created UserGroup object
|
|
21
|
+
*/
|
|
22
|
+
create(payload) {
|
|
23
|
+
return this.post('/', { payload });
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Retrieve a specific group by ID
|
|
27
|
+
* @param groupId The ID of the group to retrieve
|
|
28
|
+
* @returns The UserGroup object
|
|
29
|
+
*/
|
|
30
|
+
retrieve(groupId) {
|
|
31
|
+
return this.get('/' + groupId);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Update a group
|
|
35
|
+
* @param groupId The ID of the group to update
|
|
36
|
+
* @param payload The group data to update
|
|
37
|
+
* @returns The updated UserGroup object
|
|
38
|
+
*/
|
|
39
|
+
update(groupId, payload) {
|
|
40
|
+
return this.put('/' + groupId, { payload });
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Delete a group
|
|
44
|
+
* @param groupId The ID of the group to delete
|
|
45
|
+
* @returns Object with the deleted group ID
|
|
46
|
+
*/
|
|
47
|
+
delete(groupId) {
|
|
48
|
+
return this.del('/' + groupId);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* List members of a group
|
|
52
|
+
* @param groupId The ID of the group
|
|
53
|
+
* @returns Array of UserRef objects representing group members
|
|
54
|
+
*/
|
|
55
|
+
listMembers(groupId) {
|
|
56
|
+
return this.get('/' + groupId + '/members');
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Add a member to a group
|
|
60
|
+
* @param groupId The ID of the group
|
|
61
|
+
* @param userId The ID of the user to add
|
|
62
|
+
* @returns The updated UserGroup object
|
|
63
|
+
*/
|
|
64
|
+
addMember(groupId, userId) {
|
|
65
|
+
return this.post('/' + groupId + '/members/' + userId);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Remove a member from a group
|
|
69
|
+
* @param groupId The ID of the group
|
|
70
|
+
* @param userId The ID of the user to remove
|
|
71
|
+
* @returns The updated UserGroup object
|
|
72
|
+
*/
|
|
73
|
+
removeMember(groupId, userId) {
|
|
74
|
+
return this.del('/' + groupId + '/members/' + userId);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.GroupsApi = GroupsApi;
|
|
78
|
+
//# sourceMappingURL=GroupsApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupsApi.js","sourceRoot":"","sources":["../../src/GroupsApi.ts"],"names":[],"mappings":";;;AACA,iEAAkE;AAUlE,MAAa,SAAU,SAAQ,2BAAQ;IAEnC,YAAY,MAAkB;QAC1B,KAAK,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC7B,CAAC;I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RolesApi = exports.IamApi = void 0;
|
|
4
|
+
const api_fetch_client_1 = require("@vertesia/api-fetch-client");
|
|
5
|
+
const GroupsApi_js_1 = require("./GroupsApi.js");
|
|
6
|
+
class IamApi extends api_fetch_client_1.ApiTopic {
|
|
7
|
+
constructor(parent) {
|
|
8
|
+
super(parent, "/api/v1/iam");
|
|
9
|
+
}
|
|
10
|
+
aces = new AcesApi(this);
|
|
11
|
+
roles = new RolesApi(this);
|
|
12
|
+
groups = new GroupsApi_js_1.GroupsApi(this);
|
|
13
|
+
}
|
|
14
|
+
exports.IamApi = IamApi;
|
|
15
|
+
class RolesApi extends api_fetch_client_1.ApiTopic {
|
|
16
|
+
constructor(parent) {
|
|
17
|
+
super(parent, "/roles");
|
|
18
|
+
}
|
|
19
|
+
list() {
|
|
20
|
+
return this.get('/');
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.RolesApi = RolesApi;
|
|
24
|
+
class AcesApi extends api_fetch_client_1.ApiTopic {
|
|
25
|
+
constructor(parent) {
|
|
26
|
+
super(parent, "/aces");
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Get the list of all runs
|
|
30
|
+
* @param project optional project id to filter by
|
|
31
|
+
* @param interaction optional interaction id to filter by
|
|
32
|
+
* @returns InteractionResult[]
|
|
33
|
+
**/
|
|
34
|
+
list(options) {
|
|
35
|
+
return this.get('/', { query: { ...options } });
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Get an ACE by its Id
|
|
39
|
+
* @param id
|
|
40
|
+
* @returns InteractionResult
|
|
41
|
+
**/
|
|
42
|
+
retrieve(id) {
|
|
43
|
+
return this.get('/' + id);
|
|
44
|
+
}
|
|
45
|
+
create(payload) {
|
|
46
|
+
return this.post('/', { payload });
|
|
47
|
+
}
|
|
48
|
+
delete(id) {
|
|
49
|
+
return this.del('/' + id);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.AcesApi = AcesApi;
|
|
53
|
+
//# sour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GAAG,GAAG,EAAE,CAAC,CAAA;IAC7B,CAAC;CAEJ;AAjCD,0BAiCC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InteractionBase = void 0;
|
|
4
|
+
const client_js_1 = require("./client.js");
|
|
5
|
+
const execute_js_1 = require("./execute.js");
|
|
6
|
+
class InteractionBase {
|
|
7
|
+
id;
|
|
8
|
+
client;
|
|
9
|
+
constructor(id, clientOrOpts) {
|
|
10
|
+
this.id = id;
|
|
11
|
+
if (clientOrOpts instanceof client_js_1.VertesiaClient) {
|
|
12
|
+
this.client = clientOrOpts;
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
this.client = new client_js_1.VertesiaClient(clientOrOpts);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
retrieve() {
|
|
19
|
+
return this.client.interactions.retrieve(this.id);
|
|
20
|
+
}
|
|
21
|
+
update(payload) {
|
|
22
|
+
return this.client.interactions.update(this.id, payload);
|
|
23
|
+
}
|
|
24
|
+
render(data) {
|
|
25
|
+
data;
|
|
26
|
+
//TODO
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Execute an interaction and return a promise which will be resolved with the executed run when
|
|
30
|
+
* the run completes or fails.
|
|
31
|
+
* If the onChunk callback is passed then the streaming of the result is enabled.
|
|
32
|
+
* The onChunk callback with be called with the next chunk of the result as soon as it is available.
|
|
33
|
+
* When all chunks are received the function will return the resolved promise
|
|
34
|
+
* @param id of the interaction to execute
|
|
35
|
+
* @param payload InteractionExecutionPayload
|
|
36
|
+
* @param onChunk callback to be called when the next chunk of the response is available
|
|
37
|
+
* @returns the resolved execution run as Promise<ExecutionRun>
|
|
38
|
+
*/
|
|
39
|
+
async execute(payload = {}, onChunk) {
|
|
40
|
+
return (0, execute_js_1.executeInteraction)(this.client, this.id, payload, onChunk);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.InteractionBase = InteractionBase;
|
|
44
|
+
//# sourceMappingURL=InteractionBase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InteractionBase.js","sourceRoot":"","sources":["../../src/InteractionBase.ts"],"names":[],"mappings":";;;AACA,2CAAkE;AAClE,6CAAkD;AAElD,MAAa,eAAe;IAGL;IAFnB,MAAM,CAAiB;IAEvB,YAAmB,EAAU,EAAE,YAAkD;QAA9D,OAAE,GAAF,EAAE,CAAQ;QACzB,IAAI,YAAY,YAAY,0BAAc,EAAE,CAAC;YACzC,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC;QAC/B,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,MAAM,GAAG,IAAI,0BAAc,CAAC,YAAY,CAAC,CAAC;QACnD,CAAC;IACL,CAAC;IAED,QAAQ;QACJ,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,MAAM,CAAC,OAAiC;QACpC,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED,MAAM,CAAC,IAAO;QACV,IAAI,CAAC;QACL,MAAM;IACV,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,OAAO,CAAC,UAAuC,EAAE,EACnD,OAAiC;QACjC,OAAO,IAAA,+BAAkB,EAAI,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;CACJ;AAvCD,0CAuCC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InteractionCatalogApi = void 0;
|
|
4
|
+
const api_fetch_client_1 = require("@vertesia/api-fetch-client");
|
|
5
|
+
class InteractionCatalogApi extends api_fetch_client_1.ApiTopic {
|
|
6
|
+
constructor(parent) {
|
|
7
|
+
super(parent, "/api/v1/interactions/catalog");
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* List all project interactions
|
|
11
|
+
*/
|
|
12
|
+
list(query = {}) {
|
|
13
|
+
return this.get("/", {
|
|
14
|
+
query
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* List all stored interactions
|
|
19
|
+
*/
|
|
20
|
+
listStoredInteractions(query = {}) {
|
|
21
|
+
return this.get("/stored", {
|
|
22
|
+
query
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* List sys interactions
|
|
27
|
+
*/
|
|
28
|
+
listSysInteractions(tag) {
|
|
29
|
+
return this.get(`/sys`, {
|
|
30
|
+
query: {
|
|
31
|
+
tag
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* List sys interactions
|
|
37
|
+
*/
|
|
38
|
+
listAppInteractions(appName, tag) {
|
|
39
|
+
return this.get(`/apps/${appName}`, {
|
|
40
|
+
query: {
|
|
41
|
+
tag
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* List all app interactions
|
|
47
|
+
*/
|
|
48
|
+
listAllAppInteractions(tag) {
|
|
49
|
+
return this.get(`/apps`, {
|
|
50
|
+
query: {
|
|
51
|
+
tag
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Resolve an interaction given its id to a InCodeInteraction
|
|
57
|
+
* @param id Interaction id
|
|
58
|
+
*/
|
|
59
|
+
resolve(id) {
|
|
60
|
+
return this.get(`/resolve/${id}`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.InteractionCatalogApi = InteractionCatalogApi;
|
|
64
|
+
//# sourceMappingURL=InteractionCatalogApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InteractionCatalogApi.js","sourceRoot":"","sources":["../../src/InteractionCatalogApi.ts"],"names":[],"mappings":";;;AAAA,iEAAkE;AAQlE,MAAa,qBAAsB,SAAQ,2BAAQ;IAC/C,YAAY,MAAkB;QAC1B,KAAK,CAAC,MAAM,EAAE,8BAA8B,CAAC,CAAC;IAClD,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,QAAsD,EAAE;QACzD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;YACjB,KAAK;SACR,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACH,sBAAsB,CAAC,QAAsD,EAAE;QAC3E,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE;YACvB,KAAK;SACR,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACH,mBAAmB,CAAC,GAAY;QAC5B,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE;YACpB,KAAK,EAAE;gBACH,GAAG;aACN;SACJ,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACH,mBAAmB,CAAC,OAAe,EAAE,GAAY;QAC7C,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,OAAO,EAAE,EAAE;YAChC,KAAK,EAAE;gBACH,GAAG;aACN;SACJ,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACH,sBAAsB,CAAC,GAAY;QAC/B,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE;YACrB,KAAK,EAAE;gBACH,GAAG;aACN;SACJ,CAAC,CAAC;IACP,CAAC;IAED;;;OAGG;IACH,OAAO,CAAC,EAAU;QACd,OAAO,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;IACtC,CAAC;CACJ;AA/DD,sDA+DC"}
|