@vertesia/client 0.80.0-dev.20251121 → 0.80.1
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/README.md +110 -0
- package/package.json +13 -4
- package/src/InteractionsApi.ts +14 -1
- package/src/SkillsApi.ts +46 -0
- package/src/client.test.ts +3 -0
- package/src/client.ts +11 -7
- package/src/store/FilesApi.ts +93 -0
- package/src/store/ObjectsApi.ts +1 -0
- package/src/store/WorkersApi.ts +17 -0
- package/src/store/client.ts +2 -2
- package/src/store/index.ts +1 -0
- package/lib/cjs/AccountApi.js +0 -85
- package/lib/cjs/AccountApi.js.map +0 -1
- package/lib/cjs/AccountsApi.js +0 -16
- package/lib/cjs/AccountsApi.js.map +0 -1
- package/lib/cjs/AnalyticsApi.js +0 -13
- package/lib/cjs/AnalyticsApi.js.map +0 -1
- package/lib/cjs/ApiKeysApi.js +0 -63
- package/lib/cjs/ApiKeysApi.js.map +0 -1
- package/lib/cjs/AppsApi.js +0 -119
- package/lib/cjs/AppsApi.js.map +0 -1
- package/lib/cjs/CommandsApi.js +0 -19
- package/lib/cjs/CommandsApi.js.map +0 -1
- package/lib/cjs/EnvironmentsApi.js +0 -58
- package/lib/cjs/EnvironmentsApi.js.map +0 -1
- package/lib/cjs/GroupsApi.js +0 -78
- package/lib/cjs/GroupsApi.js.map +0 -1
- package/lib/cjs/IamApi.js +0 -53
- package/lib/cjs/IamApi.js.map +0 -1
- package/lib/cjs/InteractionBase.js +0 -44
- package/lib/cjs/InteractionBase.js.map +0 -1
- package/lib/cjs/InteractionCatalogApi.js +0 -64
- package/lib/cjs/InteractionCatalogApi.js.map +0 -1
- package/lib/cjs/InteractionOutput.js +0 -300
- package/lib/cjs/InteractionOutput.js.map +0 -1
- package/lib/cjs/InteractionResult.example.js +0 -57
- package/lib/cjs/InteractionResult.example.js.map +0 -1
- package/lib/cjs/InteractionsApi.js +0 -231
- package/lib/cjs/InteractionsApi.js.map +0 -1
- package/lib/cjs/ProjectsApi.js +0 -53
- package/lib/cjs/ProjectsApi.js.map +0 -1
- package/lib/cjs/PromptsApi.js +0 -133
- package/lib/cjs/PromptsApi.js.map +0 -1
- package/lib/cjs/RefsApi.js +0 -14
- package/lib/cjs/RefsApi.js.map +0 -1
- package/lib/cjs/RunsApi.js +0 -113
- package/lib/cjs/RunsApi.js.map +0 -1
- package/lib/cjs/StreamSource.js +0 -17
- package/lib/cjs/StreamSource.js.map +0 -1
- package/lib/cjs/TrainingApi.js +0 -54
- package/lib/cjs/TrainingApi.js.map +0 -1
- package/lib/cjs/UsersApi.js +0 -13
- package/lib/cjs/UsersApi.js.map +0 -1
- package/lib/cjs/client.js +0 -346
- package/lib/cjs/client.js.map +0 -1
- package/lib/cjs/execute.js +0 -158
- package/lib/cjs/execute.js.map +0 -1
- package/lib/cjs/index.js +0 -22
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/nodejs/NodeStreamSource.js +0 -45
- package/lib/cjs/nodejs/NodeStreamSource.js.map +0 -1
- package/lib/cjs/nodejs/index.js +0 -18
- package/lib/cjs/nodejs/index.js.map +0 -1
- package/lib/cjs/package.json +0 -3
- package/lib/cjs/store/AgentsApi.js +0 -16
- package/lib/cjs/store/AgentsApi.js.map +0 -1
- package/lib/cjs/store/AnalyzeDocApi.js +0 -56
- package/lib/cjs/store/AnalyzeDocApi.js.map +0 -1
- package/lib/cjs/store/CollectionsApi.js +0 -131
- package/lib/cjs/store/CollectionsApi.js.map +0 -1
- package/lib/cjs/store/CommandsApi.js +0 -17
- package/lib/cjs/store/CommandsApi.js.map +0 -1
- package/lib/cjs/store/EmbeddingsApi.js +0 -29
- package/lib/cjs/store/EmbeddingsApi.js.map +0 -1
- package/lib/cjs/store/FilesApi.js +0 -148
- package/lib/cjs/store/FilesApi.js.map +0 -1
- package/lib/cjs/store/ObjectsApi.js +0 -282
- package/lib/cjs/store/ObjectsApi.js.map +0 -1
- package/lib/cjs/store/TypesApi.js +0 -57
- package/lib/cjs/store/TypesApi.js.map +0 -1
- package/lib/cjs/store/WorkflowsApi.js +0 -414
- package/lib/cjs/store/WorkflowsApi.js.map +0 -1
- package/lib/cjs/store/client.js +0 -71
- package/lib/cjs/store/client.js.map +0 -1
- package/lib/cjs/store/errors.js +0 -11
- package/lib/cjs/store/errors.js.map +0 -1
- package/lib/cjs/store/index.js +0 -22
- package/lib/cjs/store/index.js.map +0 -1
- package/lib/cjs/store/version.js +0 -6
- package/lib/cjs/store/version.js.map +0 -1
- package/lib/esm/AccountApi.js +0 -82
- package/lib/esm/AccountApi.js.map +0 -1
- package/lib/esm/AccountsApi.js +0 -13
- package/lib/esm/AccountsApi.js.map +0 -1
- package/lib/esm/AnalyticsApi.js +0 -10
- package/lib/esm/AnalyticsApi.js.map +0 -1
- package/lib/esm/ApiKeysApi.js +0 -59
- package/lib/esm/ApiKeysApi.js.map +0 -1
- package/lib/esm/AppsApi.js +0 -116
- package/lib/esm/AppsApi.js.map +0 -1
- package/lib/esm/CommandsApi.js +0 -16
- package/lib/esm/CommandsApi.js.map +0 -1
- package/lib/esm/EnvironmentsApi.js +0 -55
- package/lib/esm/EnvironmentsApi.js.map +0 -1
- package/lib/esm/GroupsApi.js +0 -74
- package/lib/esm/GroupsApi.js.map +0 -1
- package/lib/esm/IamApi.js +0 -47
- package/lib/esm/IamApi.js.map +0 -1
- package/lib/esm/InteractionBase.js +0 -40
- package/lib/esm/InteractionBase.js.map +0 -1
- package/lib/esm/InteractionCatalogApi.js +0 -60
- package/lib/esm/InteractionCatalogApi.js.map +0 -1
- package/lib/esm/InteractionOutput.js +0 -293
- package/lib/esm/InteractionOutput.js.map +0 -1
- package/lib/esm/InteractionResult.example.js +0 -55
- package/lib/esm/InteractionResult.example.js.map +0 -1
- package/lib/esm/InteractionsApi.js +0 -228
- package/lib/esm/InteractionsApi.js.map +0 -1
- package/lib/esm/ProjectsApi.js +0 -50
- package/lib/esm/ProjectsApi.js.map +0 -1
- package/lib/esm/PromptsApi.js +0 -130
- package/lib/esm/PromptsApi.js.map +0 -1
- package/lib/esm/RefsApi.js +0 -10
- package/lib/esm/RefsApi.js.map +0 -1
- package/lib/esm/RunsApi.js +0 -109
- package/lib/esm/RunsApi.js.map +0 -1
- package/lib/esm/StreamSource.js +0 -13
- package/lib/esm/StreamSource.js.map +0 -1
- package/lib/esm/TrainingApi.js +0 -51
- package/lib/esm/TrainingApi.js.map +0 -1
- package/lib/esm/UsersApi.js +0 -10
- package/lib/esm/UsersApi.js.map +0 -1
- package/lib/esm/client.js +0 -337
- package/lib/esm/client.js.map +0 -1
- package/lib/esm/execute.js +0 -118
- package/lib/esm/execute.js.map +0 -1
- package/lib/esm/index.js +0 -6
- package/lib/esm/index.js.map +0 -1
- package/lib/esm/nodejs/NodeStreamSource.js +0 -41
- package/lib/esm/nodejs/NodeStreamSource.js.map +0 -1
- package/lib/esm/nodejs/index.js +0 -2
- package/lib/esm/nodejs/index.js.map +0 -1
- package/lib/esm/store/AgentsApi.js +0 -12
- package/lib/esm/store/AgentsApi.js.map +0 -1
- package/lib/esm/store/AnalyzeDocApi.js +0 -52
- package/lib/esm/store/AnalyzeDocApi.js.map +0 -1
- package/lib/esm/store/CollectionsApi.js +0 -127
- package/lib/esm/store/CollectionsApi.js.map +0 -1
- package/lib/esm/store/CommandsApi.js +0 -13
- package/lib/esm/store/CommandsApi.js.map +0 -1
- package/lib/esm/store/EmbeddingsApi.js +0 -25
- package/lib/esm/store/EmbeddingsApi.js.map +0 -1
- package/lib/esm/store/FilesApi.js +0 -143
- package/lib/esm/store/FilesApi.js.map +0 -1
- package/lib/esm/store/ObjectsApi.js +0 -278
- package/lib/esm/store/ObjectsApi.js.map +0 -1
- package/lib/esm/store/TypesApi.js +0 -53
- package/lib/esm/store/TypesApi.js.map +0 -1
- package/lib/esm/store/WorkflowsApi.js +0 -408
- package/lib/esm/store/WorkflowsApi.js.map +0 -1
- package/lib/esm/store/client.js +0 -67
- package/lib/esm/store/client.js.map +0 -1
- package/lib/esm/store/errors.js +0 -7
- package/lib/esm/store/errors.js.map +0 -1
- package/lib/esm/store/index.js +0 -6
- package/lib/esm/store/index.js.map +0 -1
- package/lib/esm/store/version.js +0 -3
- package/lib/esm/store/version.js.map +0 -1
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/lib/types/AccountApi.d.ts +0 -59
- package/lib/types/AccountApi.d.ts.map +0 -1
- package/lib/types/AccountsApi.d.ts +0 -7
- package/lib/types/AccountsApi.d.ts.map +0 -1
- package/lib/types/AnalyticsApi.d.ts +0 -6
- package/lib/types/AnalyticsApi.d.ts.map +0 -1
- package/lib/types/ApiKeysApi.d.ts +0 -42
- package/lib/types/ApiKeysApi.d.ts.map +0 -1
- package/lib/types/AppsApi.d.ts +0 -65
- package/lib/types/AppsApi.d.ts.map +0 -1
- package/lib/types/CommandsApi.d.ts +0 -10
- package/lib/types/CommandsApi.d.ts.map +0 -1
- package/lib/types/EnvironmentsApi.d.ts +0 -30
- package/lib/types/EnvironmentsApi.d.ts.map +0 -1
- package/lib/types/GroupsApi.d.ts +0 -65
- package/lib/types/GroupsApi.d.ts.map +0 -1
- package/lib/types/IamApi.d.ts +0 -41
- package/lib/types/IamApi.d.ts.map +0 -1
- package/lib/types/InteractionBase.d.ts +0 -22
- package/lib/types/InteractionBase.d.ts.map +0 -1
- package/lib/types/InteractionCatalogApi.d.ts +0 -36
- package/lib/types/InteractionCatalogApi.d.ts.map +0 -1
- package/lib/types/InteractionOutput.d.ts +0 -174
- package/lib/types/InteractionOutput.d.ts.map +0 -1
- package/lib/types/InteractionResult.example.d.ts +0 -6
- package/lib/types/InteractionResult.example.d.ts.map +0 -1
- package/lib/types/InteractionsApi.d.ts +0 -159
- package/lib/types/InteractionsApi.d.ts.map +0 -1
- package/lib/types/ProjectsApi.d.ts +0 -18
- package/lib/types/ProjectsApi.d.ts.map +0 -1
- package/lib/types/PromptsApi.d.ts +0 -106
- package/lib/types/PromptsApi.d.ts.map +0 -1
- package/lib/types/RefsApi.d.ts +0 -6
- package/lib/types/RefsApi.d.ts.map +0 -1
- package/lib/types/RunsApi.d.ts +0 -79
- package/lib/types/RunsApi.d.ts.map +0 -1
- package/lib/types/StreamSource.d.ts +0 -7
- package/lib/types/StreamSource.d.ts.map +0 -1
- package/lib/types/TrainingApi.d.ts +0 -27
- package/lib/types/TrainingApi.d.ts.map +0 -1
- package/lib/types/UsersApi.d.ts +0 -6
- package/lib/types/UsersApi.d.ts.map +0 -1
- package/lib/types/client.d.ts +0 -123
- package/lib/types/client.d.ts.map +0 -1
- package/lib/types/execute.d.ts +0 -37
- package/lib/types/execute.d.ts.map +0 -1
- package/lib/types/index.d.ts +0 -10
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/nodejs/NodeStreamSource.d.ts +0 -9
- package/lib/types/nodejs/NodeStreamSource.d.ts.map +0 -1
- package/lib/types/nodejs/index.d.ts +0 -1
- package/lib/types/nodejs/index.d.ts.map +0 -1
- package/lib/types/store/AgentsApi.d.ts +0 -6
- package/lib/types/store/AgentsApi.d.ts.map +0 -1
- package/lib/types/store/AnalyzeDocApi.d.ts +0 -17
- package/lib/types/store/AnalyzeDocApi.d.ts.map +0 -1
- package/lib/types/store/CollectionsApi.d.ts +0 -82
- package/lib/types/store/CollectionsApi.d.ts.map +0 -1
- package/lib/types/store/CommandsApi.d.ts +0 -10
- package/lib/types/store/CommandsApi.d.ts.map +0 -1
- package/lib/types/store/EmbeddingsApi.d.ts +0 -12
- package/lib/types/store/EmbeddingsApi.d.ts.map +0 -1
- package/lib/types/store/FilesApi.d.ts +0 -48
- package/lib/types/store/FilesApi.d.ts.map +0 -1
- package/lib/types/store/ObjectsApi.d.ts +0 -117
- package/lib/types/store/ObjectsApi.d.ts.map +0 -1
- package/lib/types/store/TypesApi.d.ts +0 -23
- package/lib/types/store/TypesApi.d.ts.map +0 -1
- package/lib/types/store/WorkflowsApi.d.ts +0 -62
- package/lib/types/store/WorkflowsApi.d.ts.map +0 -1
- package/lib/types/store/client.d.ts +0 -35
- package/lib/types/store/client.d.ts.map +0 -1
- package/lib/types/store/errors.d.ts +0 -4
- package/lib/types/store/errors.d.ts.map +0 -1
- package/lib/types/store/index.d.ts +0 -5
- package/lib/types/store/index.d.ts.map +0 -1
- package/lib/types/store/version.d.ts +0 -2
- package/lib/types/store/version.d.ts.map +0 -1
- package/lib/vertesia-client.js +0 -2
- package/lib/vertesia-client.js.map +0 -1
- package/src/store/AgentsApi.ts +0 -17
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/lib/cjs/AppsApi.js
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
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 = AppsApi;
|
|
119
|
-
//# sourceMappingURL=AppsApi.js.map
|
package/lib/cjs/AppsApi.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AppsApi.js","sourceRoot":"","sources":["../../src/AppsApi.ts"],"names":[],"mappings":";;AAAA,iEAA+E;AAO/E,MAAqB,OAAQ,SAAQ,2BAAQ;IAEzC,YAAY,MAAkB;QAC1B,KAAK,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IACjC,CAAC;IAED,MAAM,CAAC,QAAyB;QAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,EAAU,EAAE,QAAyB;QACxC,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;IACrD,CAAC;IAED;;;;OAIG;IACH,wBAAwB,CAAC,YAAoB;QACzC,OAAO,IAAI,CAAC,GAAG,CAAC,kBAAkB,YAAY,QAAQ,CAAC,CAAA;IAC3D,CAAC;IAED;;;OAGG;IACH,IAAI;QACA,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IAED;;;OAGG;IACH,OAAO,CAAC,KAAa,EAAE,QAA8B;QACjD,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YACzB,OAAO,EAAE;gBACL,MAAM,EAAE,KAAK;gBACb,QAAQ;aACsB;SACrC,CAAC,CAAC;IACP,CAAC;IAED;;;;OAIG;IACH,SAAS,CAAC,cAAsB;QAC5B,OAAO,IAAI,CAAC,GAAG,CAAC,YAAY,cAAc,EAAE,CAAC,CAAC;IAClD,CAAC;IAED;;;OAGG;IACH,wBAAwB,CAAC,OAAe;QACpC,OAAO,IAAI,CAAC,GAAG,CAAC,uBAAuB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,GAAgB,EAAE,EAAE;YACzE,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;gBACrB,OAAO,IAAI,CAAC;YAChB,CAAC;iBAAM,CAAC;gBACJ,MAAM,GAAG,CAAC;YACd,CAAC;QACL,CAAC,CAAC,CAAA;IACN,CAAC;IAED;;;;;OAKG;IACH,0BAA0B,CAAC,GAAqE;QAC5F,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;QAC7E,CAAC;QACD,MAAM,KAAK,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;YACnB,EAAE,EAAE,GAAG,CAAC,EAAE;SACb,CAAC,CAAC,CAAC;YACA,IAAI,EAAE,GAAG,CAAC,IAAI;SACjB,CAAA;QACD,OAAO,IAAI,CAAC,GAAG,CAAC,yBAAyB,EAAE;YACvC,KAAK;SACR,CAAC,CAAC;IACP,CAAC;IAED;;;OAGG;IACH,gBAAgB,CAAC,IAA0B;QACvC,OAAO,IAAI,CAAC,GAAG,CAAC,gBAAgB,EAAE;YAC9B,KAAK,EAAE;gBACH,IAAI;aACP;SACJ,CAAC,CAAC;IACP,CAAC;IAED;;;;;;OAMG;IACH,sBAAsB;QAClB,OAAO,IAAI,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAC1C,CAAC;IAED;;OAEG;IACH,iBAAiB;QACb,OAAO,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;IAC3C,CAAC;IAED,0BAA0B,CAAC,eAAuC;QAC9D,OAAO,IAAI,CAAC,GAAG,CAAC,2BAA2B,eAAe,CAAC,MAAM,EAAE,EAAE;YACjE,OAAO,EAAE;gBACL,MAAM,EAAE,eAAe,CAAC,MAAM;gBAC9B,QAAQ,EAAE,eAAe,CAAC,QAAQ;aACJ;SACrC,CAAC,CAAC;IACP,CAAC;CAEJ;AA9HD,0BA8HC"}
|
package/lib/cjs/CommandsApi.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,58 +0,0 @@
|
|
|
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
|
-
//# sourceMappingURL=EnvironmentsApi.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentsApi.js","sourceRoot":"","sources":["../../src/EnvironmentsApi.ts"],"names":[],"mappings":";;AAEA,iEAAkE;AAElE,MAAqB,eAAgB,SAAQ,2BAAQ;IACjD,YAAY,MAAkB;QAC1B,KAAK,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,MAAe,KAAK;QACrB,MAAM,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;QAE9C,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,CAAC,OAA0C;QAC7C,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;YAClB,OAAO;SACV,CAAC,CAAC;IACP,CAAC;IAED,QAAQ,CAAC,EAAU;QACf,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC;IAC9B,CAAC;IAED,MAAM,CAAC,EAAU,EAAE,OAA0C;QACzD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,EAAE,EAAE;YACtB,OAAO;SACV,CAAC,CAAC;IACP,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAU,EAAE,OAGxB;QACG,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,EAAE,GAAG,SAAS,EAAE;YAClC,OAAO;SACV,CAAC,CAAC;IACP,CAAC;IAED,UAAU,CAAC,EAAU,EAAE,OAA4B;QAC/C,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,EAAE,GAAG,SAAS,EAAE;YAClC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC,CAAC,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"}
|
package/lib/cjs/GroupsApi.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
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
|
package/lib/cjs/GroupsApi.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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;IAED;;;;OAIG;IACH,IAAI,CAAC,OAA4B;QAC7B,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,OAA2B;QAC9B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IACvC,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,OAAe;QACpB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,OAAO,CAAC,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,OAAe,EAAE,OAA2B;QAC/C,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IAChD,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,OAAe;QAClB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,OAAO,CAAC,CAAC;IACnC,CAAC;IAED;;;;OAIG;IACH,WAAW,CAAC,OAAe;QACvB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,OAAO,GAAG,UAAU,CAAC,CAAC;IAChD,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,OAAe,EAAE,MAAc;QACrC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,OAAO,GAAG,WAAW,GAAG,MAAM,CAAC,CAAC;IAC3D,CAAC;IAED;;;;;OAKG;IACH,YAAY,CAAC,OAAe,EAAE,MAAc;QACxC,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,OAAO,GAAG,WAAW,GAAG,MAAM,CAAC,CAAC;IAC1D,CAAC;CACJ;AAhFD,8BAgFC"}
|
package/lib/cjs/IamApi.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AcesApi = exports.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
|
-
//# sourceMappingURL=IamApi.js.map
|
package/lib/cjs/IamApi.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IamApi.js","sourceRoot":"","sources":["../../src/IamApi.ts"],"names":[],"mappings":";;;AACA,iEAAkE;AAClE,iDAA2C;AAU3C,MAAa,MAAO,SAAQ,2BAAQ;IAEhC,YAAY,MAAkB;QAC1B,KAAK,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IAChC,CAAC;IAED,IAAI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACxB,KAAK,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAA;IAC1B,MAAM,GAAG,IAAI,wBAAS,CAAC,IAAI,CAAC,CAAA;CAC/B;AATD,wBASC;AAED,MAAa,QAAS,SAAQ,2BAAQ;IAElC,YAAY,MAAkB;QAC1B,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IAC3B,CAAC;IAED,IAAI;QACA,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;CAEJ;AAVD,4BAUC;AAGD,MAAa,OAAQ,SAAQ,2BAAQ;IAEjC,YAAY,MAAkB;QAC1B,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC1B,CAAC;IAED;;;;;QAKI;IACJ,IAAI,CAAC,OAAyB;QAC1B,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,OAAO,EAAE,EAAE,CAAC,CAAC;IACpD,CAAC;IAED;;;;QAII;IACJ,QAAQ,CAAC,EAAU;QACf,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC;IAC9B,CAAC;IAED,MAAM,CAAC,OAAyB;QAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,CAAC,CAAA;IACtC,CAAC;IAED,MAAM,CAAC,EAAU;QACb,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,EAAE,CAAC,CAAA;IAC7B,CAAC;CAEJ;AAjCD,0BAiCC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,64 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|