lemma-sdk 0.2.1 → 0.2.3
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/dist/browser/lemma-client.js +2149 -1122
- package/dist/client.d.ts +22 -7
- package/dist/client.js +27 -9
- package/dist/index.d.ts +14 -9
- package/dist/index.js +1 -1
- package/dist/namespaces/agents.d.ts +5 -5
- package/dist/namespaces/assistants.d.ts +40 -40
- package/dist/namespaces/assistants.js +40 -24
- package/dist/namespaces/datastores.d.ts +6 -6
- package/dist/namespaces/desks.d.ts +6 -6
- package/dist/namespaces/files.d.ts +7 -7
- package/dist/namespaces/functions.d.ts +8 -8
- package/dist/namespaces/icons.d.ts +7 -0
- package/dist/namespaces/icons.js +13 -0
- package/dist/namespaces/integrations.d.ts +13 -13
- package/dist/namespaces/organizations.d.ts +46 -0
- package/dist/namespaces/organizations.js +51 -0
- package/dist/namespaces/pod-members.d.ts +15 -0
- package/dist/namespaces/pod-members.js +19 -0
- package/dist/namespaces/pod-surfaces.d.ts +16 -0
- package/dist/namespaces/pod-surfaces.js +22 -0
- package/dist/namespaces/pods.d.ts +26 -0
- package/dist/namespaces/pods.js +41 -0
- package/dist/namespaces/records.d.ts +14 -10
- package/dist/namespaces/records.js +34 -3
- package/dist/namespaces/resources.d.ts +9 -5
- package/dist/namespaces/resources.js +3 -2
- package/dist/namespaces/tables.d.ts +13 -7
- package/dist/namespaces/tables.js +11 -1
- package/dist/namespaces/tasks.d.ts +14 -13
- package/dist/namespaces/tasks.js +6 -18
- package/dist/namespaces/users.d.ts +9 -0
- package/dist/namespaces/users.js +16 -0
- package/dist/namespaces/workflows.d.ts +18 -11
- package/dist/namespaces/workflows.js +23 -1
- package/dist/types.d.ts +20 -9
- package/dist/types.js +5 -1
- package/package.json +1 -1
|
@@ -31,18 +31,24 @@ const auth_js_1 = require("./auth.js");
|
|
|
31
31
|
Object.defineProperty(exports, "AuthManager", { enumerable: true, get: function () { return auth_js_1.AuthManager; } });
|
|
32
32
|
const generated_js_1 = require("./generated.js");
|
|
33
33
|
const http_js_1 = require("./http.js");
|
|
34
|
-
const datastores_js_1 = require("./namespaces/datastores.js");
|
|
35
|
-
const tables_js_1 = require("./namespaces/tables.js");
|
|
36
|
-
const records_js_1 = require("./namespaces/records.js");
|
|
37
|
-
const files_js_1 = require("./namespaces/files.js");
|
|
38
|
-
const functions_js_1 = require("./namespaces/functions.js");
|
|
39
34
|
const agents_js_1 = require("./namespaces/agents.js");
|
|
40
|
-
const tasks_js_1 = require("./namespaces/tasks.js");
|
|
41
35
|
const assistants_js_1 = require("./namespaces/assistants.js");
|
|
42
|
-
const
|
|
36
|
+
const datastores_js_1 = require("./namespaces/datastores.js");
|
|
43
37
|
const desks_js_1 = require("./namespaces/desks.js");
|
|
38
|
+
const files_js_1 = require("./namespaces/files.js");
|
|
39
|
+
const functions_js_1 = require("./namespaces/functions.js");
|
|
40
|
+
const icons_js_1 = require("./namespaces/icons.js");
|
|
44
41
|
const integrations_js_1 = require("./namespaces/integrations.js");
|
|
42
|
+
const organizations_js_1 = require("./namespaces/organizations.js");
|
|
43
|
+
const pod_members_js_1 = require("./namespaces/pod-members.js");
|
|
44
|
+
const pods_js_1 = require("./namespaces/pods.js");
|
|
45
|
+
const pod_surfaces_js_1 = require("./namespaces/pod-surfaces.js");
|
|
46
|
+
const records_js_1 = require("./namespaces/records.js");
|
|
45
47
|
const resources_js_1 = require("./namespaces/resources.js");
|
|
48
|
+
const tables_js_1 = require("./namespaces/tables.js");
|
|
49
|
+
const tasks_js_1 = require("./namespaces/tasks.js");
|
|
50
|
+
const users_js_1 = require("./namespaces/users.js");
|
|
51
|
+
const workflows_js_1 = require("./namespaces/workflows.js");
|
|
46
52
|
class LemmaClient {
|
|
47
53
|
constructor(overrides = {}) {
|
|
48
54
|
this._config = (0, config_js_1.resolveConfig)(overrides);
|
|
@@ -59,17 +65,23 @@ class LemmaClient {
|
|
|
59
65
|
};
|
|
60
66
|
this.datastores = new datastores_js_1.DatastoresNamespace(this._generated, podIdFn);
|
|
61
67
|
this.tables = new tables_js_1.TablesNamespace(this._generated, podIdFn);
|
|
62
|
-
this.records = new records_js_1.RecordsNamespace(this._generated, podIdFn);
|
|
68
|
+
this.records = new records_js_1.RecordsNamespace(this._generated, this._http, podIdFn);
|
|
63
69
|
this.files = new files_js_1.FilesNamespace(this._generated, this._http, podIdFn);
|
|
64
70
|
this.functions = new functions_js_1.FunctionsNamespace(this._generated, podIdFn);
|
|
65
71
|
this.agents = new agents_js_1.AgentsNamespace(this._generated, podIdFn);
|
|
66
72
|
this.tasks = new tasks_js_1.TasksNamespace(this._http, podIdFn);
|
|
67
73
|
this.assistants = new assistants_js_1.AssistantsNamespace(this._http, podIdFn);
|
|
68
74
|
this.conversations = new assistants_js_1.ConversationsNamespace(this._http, podIdFn);
|
|
69
|
-
this.workflows = new workflows_js_1.WorkflowsNamespace(this._generated, podIdFn);
|
|
75
|
+
this.workflows = new workflows_js_1.WorkflowsNamespace(this._generated, this._http, podIdFn);
|
|
70
76
|
this.desks = new desks_js_1.DesksNamespace(this._generated, this._http, podIdFn);
|
|
71
77
|
this.integrations = new integrations_js_1.IntegrationsNamespace(this._generated);
|
|
72
78
|
this.resources = new resources_js_1.ResourcesNamespace(this._http);
|
|
79
|
+
this.users = new users_js_1.UsersNamespace(this._generated);
|
|
80
|
+
this.icons = new icons_js_1.IconsNamespace(this._generated);
|
|
81
|
+
this.pods = new pods_js_1.PodsNamespace(this._generated, this._http);
|
|
82
|
+
this.podMembers = new pod_members_js_1.PodMembersNamespace(this._generated);
|
|
83
|
+
this.organizations = new organizations_js_1.OrganizationsNamespace(this._generated, this._http);
|
|
84
|
+
this.podSurfaces = new pod_surfaces_js_1.PodSurfacesNamespace(this._generated);
|
|
73
85
|
}
|
|
74
86
|
/** Change the active pod ID for subsequent calls. */
|
|
75
87
|
setPodId(podId) {
|
|
@@ -647,58 +659,54 @@ exports.OpenAPI = {
|
|
|
647
659
|
};
|
|
648
660
|
|
|
649
661
|
},
|
|
650
|
-
"./namespaces/
|
|
662
|
+
"./namespaces/agents.js": function (module, exports, require) {
|
|
651
663
|
"use strict";
|
|
652
664
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
653
|
-
exports.
|
|
654
|
-
const
|
|
655
|
-
class
|
|
665
|
+
exports.AgentsNamespace = void 0;
|
|
666
|
+
const AgentsService_js_1 = require("./openapi_client/services/AgentsService.js");
|
|
667
|
+
class AgentsNamespace {
|
|
656
668
|
constructor(client, podId) {
|
|
657
669
|
this.client = client;
|
|
658
670
|
this.podId = podId;
|
|
659
671
|
}
|
|
660
672
|
list(options = {}) {
|
|
661
|
-
return this.client.request(() =>
|
|
673
|
+
return this.client.request(() => AgentsService_js_1.AgentsService.agentList(this.podId(), options.limit ?? 100, options.pageToken));
|
|
662
674
|
}
|
|
663
675
|
create(payload) {
|
|
664
|
-
return this.client.request(() =>
|
|
665
|
-
}
|
|
666
|
-
get(name) {
|
|
667
|
-
return this.client.request(() => DatastoreService_js_1.DatastoreService.datastoreGet(this.podId(), name));
|
|
676
|
+
return this.client.request(() => AgentsService_js_1.AgentsService.agentCreate(this.podId(), payload));
|
|
668
677
|
}
|
|
669
|
-
|
|
670
|
-
return this.client.request(() =>
|
|
678
|
+
get(agentName) {
|
|
679
|
+
return this.client.request(() => AgentsService_js_1.AgentsService.agentGet(this.podId(), agentName));
|
|
671
680
|
}
|
|
672
|
-
|
|
673
|
-
return this.client.request(() =>
|
|
681
|
+
update(agentName, payload) {
|
|
682
|
+
return this.client.request(() => AgentsService_js_1.AgentsService.agentUpdate(this.podId(), agentName, payload));
|
|
674
683
|
}
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
return this.client.request(() => DatastoreService_js_1.DatastoreService.datastoreQuery(this.podId(), name, payload));
|
|
684
|
+
delete(agentName) {
|
|
685
|
+
return this.client.request(() => AgentsService_js_1.AgentsService.agentDelete(this.podId(), agentName));
|
|
678
686
|
}
|
|
679
687
|
}
|
|
680
|
-
exports.
|
|
688
|
+
exports.AgentsNamespace = AgentsNamespace;
|
|
681
689
|
|
|
682
690
|
},
|
|
683
|
-
"./openapi_client/services/
|
|
691
|
+
"./openapi_client/services/AgentsService.js": function (module, exports, require) {
|
|
684
692
|
"use strict";
|
|
685
693
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
686
|
-
exports.
|
|
694
|
+
exports.AgentsService = void 0;
|
|
687
695
|
const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
|
|
688
696
|
const request_js_1 = require("./openapi_client/core/request.js");
|
|
689
|
-
class
|
|
697
|
+
class AgentsService {
|
|
690
698
|
/**
|
|
691
|
-
* Create
|
|
692
|
-
* Create a
|
|
699
|
+
* Create Agent
|
|
700
|
+
* Create a new agent in a pod
|
|
693
701
|
* @param podId
|
|
694
702
|
* @param requestBody
|
|
695
|
-
* @returns
|
|
703
|
+
* @returns AgentResponse Successful Response
|
|
696
704
|
* @throws ApiError
|
|
697
705
|
*/
|
|
698
|
-
static
|
|
706
|
+
static agentCreate(podId, requestBody) {
|
|
699
707
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
700
708
|
method: 'POST',
|
|
701
|
-
url: '/pods/{pod_id}/
|
|
709
|
+
url: '/pods/{pod_id}/agents',
|
|
702
710
|
path: {
|
|
703
711
|
'pod_id': podId,
|
|
704
712
|
},
|
|
@@ -710,18 +718,18 @@ class DatastoreService {
|
|
|
710
718
|
});
|
|
711
719
|
}
|
|
712
720
|
/**
|
|
713
|
-
* List
|
|
714
|
-
* List
|
|
721
|
+
* List Agents
|
|
722
|
+
* List all agents in a pod
|
|
715
723
|
* @param podId
|
|
716
|
-
* @param limit
|
|
717
|
-
* @param pageToken
|
|
718
|
-
* @returns
|
|
724
|
+
* @param limit
|
|
725
|
+
* @param pageToken
|
|
726
|
+
* @returns AgentListResponse Successful Response
|
|
719
727
|
* @throws ApiError
|
|
720
728
|
*/
|
|
721
|
-
static
|
|
729
|
+
static agentList(podId, limit = 100, pageToken) {
|
|
722
730
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
723
731
|
method: 'GET',
|
|
724
|
-
url: '/pods/{pod_id}/
|
|
732
|
+
url: '/pods/{pod_id}/agents',
|
|
725
733
|
path: {
|
|
726
734
|
'pod_id': podId,
|
|
727
735
|
},
|
|
@@ -735,20 +743,20 @@ class DatastoreService {
|
|
|
735
743
|
});
|
|
736
744
|
}
|
|
737
745
|
/**
|
|
738
|
-
* Get
|
|
739
|
-
* Get
|
|
746
|
+
* Get Agent
|
|
747
|
+
* Get an agent by name
|
|
740
748
|
* @param podId
|
|
741
|
-
* @param
|
|
742
|
-
* @returns
|
|
749
|
+
* @param agentName
|
|
750
|
+
* @returns AgentResponse Successful Response
|
|
743
751
|
* @throws ApiError
|
|
744
752
|
*/
|
|
745
|
-
static
|
|
753
|
+
static agentGet(podId, agentName) {
|
|
746
754
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
747
755
|
method: 'GET',
|
|
748
|
-
url: '/pods/{pod_id}/
|
|
756
|
+
url: '/pods/{pod_id}/agents/{agent_name}',
|
|
749
757
|
path: {
|
|
750
758
|
'pod_id': podId,
|
|
751
|
-
'
|
|
759
|
+
'agent_name': agentName,
|
|
752
760
|
},
|
|
753
761
|
errors: {
|
|
754
762
|
422: `Validation Error`,
|
|
@@ -756,21 +764,21 @@ class DatastoreService {
|
|
|
756
764
|
});
|
|
757
765
|
}
|
|
758
766
|
/**
|
|
759
|
-
* Update
|
|
760
|
-
* Update
|
|
767
|
+
* Update Agent
|
|
768
|
+
* Update an agent
|
|
761
769
|
* @param podId
|
|
762
|
-
* @param
|
|
770
|
+
* @param agentName
|
|
763
771
|
* @param requestBody
|
|
764
|
-
* @returns
|
|
772
|
+
* @returns AgentResponse Successful Response
|
|
765
773
|
* @throws ApiError
|
|
766
774
|
*/
|
|
767
|
-
static
|
|
775
|
+
static agentUpdate(podId, agentName, requestBody) {
|
|
768
776
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
769
777
|
method: 'PATCH',
|
|
770
|
-
url: '/pods/{pod_id}/
|
|
778
|
+
url: '/pods/{pod_id}/agents/{agent_name}',
|
|
771
779
|
path: {
|
|
772
780
|
'pod_id': podId,
|
|
773
|
-
'
|
|
781
|
+
'agent_name': agentName,
|
|
774
782
|
},
|
|
775
783
|
body: requestBody,
|
|
776
784
|
mediaType: 'application/json',
|
|
@@ -780,52 +788,28 @@ class DatastoreService {
|
|
|
780
788
|
});
|
|
781
789
|
}
|
|
782
790
|
/**
|
|
783
|
-
* Delete
|
|
784
|
-
* Delete
|
|
791
|
+
* Delete Agent
|
|
792
|
+
* Delete an agent
|
|
785
793
|
* @param podId
|
|
786
|
-
* @param
|
|
787
|
-
* @returns
|
|
794
|
+
* @param agentName
|
|
795
|
+
* @returns AgentMessageResponse Successful Response
|
|
788
796
|
* @throws ApiError
|
|
789
797
|
*/
|
|
790
|
-
static
|
|
798
|
+
static agentDelete(podId, agentName) {
|
|
791
799
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
792
800
|
method: 'DELETE',
|
|
793
|
-
url: '/pods/{pod_id}/
|
|
794
|
-
path: {
|
|
795
|
-
'pod_id': podId,
|
|
796
|
-
'datastore_name': datastoreName,
|
|
797
|
-
},
|
|
798
|
-
errors: {
|
|
799
|
-
422: `Validation Error`,
|
|
800
|
-
},
|
|
801
|
-
});
|
|
802
|
-
}
|
|
803
|
-
/**
|
|
804
|
-
* Execute Query
|
|
805
|
-
* Execute a read-only SQL query in the datastore schema. Mutating statements (`INSERT`, `UPDATE`, `DELETE`, `DROP`, etc.) are blocked.
|
|
806
|
-
* @param podId
|
|
807
|
-
* @param datastoreName
|
|
808
|
-
* @param requestBody
|
|
809
|
-
* @returns RecordQueryResponse Successful Response
|
|
810
|
-
* @throws ApiError
|
|
811
|
-
*/
|
|
812
|
-
static datastoreQuery(podId, datastoreName, requestBody) {
|
|
813
|
-
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
814
|
-
method: 'POST',
|
|
815
|
-
url: '/pods/{pod_id}/datastores/{datastore_name}/query',
|
|
801
|
+
url: '/pods/{pod_id}/agents/{agent_name}',
|
|
816
802
|
path: {
|
|
817
803
|
'pod_id': podId,
|
|
818
|
-
'
|
|
804
|
+
'agent_name': agentName,
|
|
819
805
|
},
|
|
820
|
-
body: requestBody,
|
|
821
|
-
mediaType: 'application/json',
|
|
822
806
|
errors: {
|
|
823
807
|
422: `Validation Error`,
|
|
824
808
|
},
|
|
825
809
|
});
|
|
826
810
|
}
|
|
827
811
|
}
|
|
828
|
-
exports.
|
|
812
|
+
exports.AgentsService = AgentsService;
|
|
829
813
|
|
|
830
814
|
},
|
|
831
815
|
"./openapi_client/core/request.js": function (module, exports, require) {
|
|
@@ -1244,117 +1228,242 @@ class CancelablePromise {
|
|
|
1244
1228
|
exports.CancelablePromise = CancelablePromise;
|
|
1245
1229
|
|
|
1246
1230
|
},
|
|
1247
|
-
"./namespaces/
|
|
1231
|
+
"./namespaces/assistants.js": function (module, exports, require) {
|
|
1248
1232
|
"use strict";
|
|
1249
1233
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1250
|
-
exports.
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
this.client = client;
|
|
1234
|
+
exports.ConversationsNamespace = exports.AssistantsNamespace = void 0;
|
|
1235
|
+
class AssistantsNamespace {
|
|
1236
|
+
constructor(http, podId) {
|
|
1237
|
+
this.http = http;
|
|
1255
1238
|
this.podId = podId;
|
|
1256
|
-
this.columns = {
|
|
1257
|
-
add: (datastore, tableName, request) => {
|
|
1258
|
-
const payload = "column" in request ? request : { column: request };
|
|
1259
|
-
return this.client.request(() => TablesService_js_1.TablesService.tableColumnAdd(this.podId(), datastore, tableName, payload));
|
|
1260
|
-
},
|
|
1261
|
-
remove: (datastore, tableName, columnName) => this.client.request(() => TablesService_js_1.TablesService.tableColumnRemove(this.podId(), datastore, tableName, columnName)),
|
|
1262
|
-
};
|
|
1263
1239
|
}
|
|
1264
|
-
list(
|
|
1265
|
-
return this.
|
|
1240
|
+
list(options = {}) {
|
|
1241
|
+
return this.http.request("GET", `/pods/${this.podId()}/assistants`, {
|
|
1242
|
+
params: {
|
|
1243
|
+
limit: options.limit ?? 100,
|
|
1244
|
+
page_token: options.page_token,
|
|
1245
|
+
},
|
|
1246
|
+
});
|
|
1266
1247
|
}
|
|
1267
|
-
create(
|
|
1268
|
-
return this.
|
|
1248
|
+
create(payload) {
|
|
1249
|
+
return this.http.request("POST", `/pods/${this.podId()}/assistants`, { body: payload });
|
|
1269
1250
|
}
|
|
1270
|
-
get(
|
|
1271
|
-
return this.
|
|
1251
|
+
get(assistantName) {
|
|
1252
|
+
return this.http.request("GET", `/pods/${this.podId()}/assistants/${assistantName}`);
|
|
1272
1253
|
}
|
|
1273
|
-
update(
|
|
1274
|
-
return this.
|
|
1254
|
+
update(assistantName, payload) {
|
|
1255
|
+
return this.http.request("PATCH", `/pods/${this.podId()}/assistants/${assistantName}`, {
|
|
1256
|
+
body: payload,
|
|
1257
|
+
});
|
|
1275
1258
|
}
|
|
1276
|
-
delete(
|
|
1277
|
-
return this.
|
|
1259
|
+
delete(assistantName) {
|
|
1260
|
+
return this.http.request("DELETE", `/pods/${this.podId()}/assistants/${assistantName}`);
|
|
1278
1261
|
}
|
|
1279
1262
|
}
|
|
1280
|
-
exports.
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1263
|
+
exports.AssistantsNamespace = AssistantsNamespace;
|
|
1264
|
+
class ConversationsNamespace {
|
|
1265
|
+
constructor(http, podId) {
|
|
1266
|
+
this.http = http;
|
|
1267
|
+
this.podId = podId;
|
|
1268
|
+
this.messages = {
|
|
1269
|
+
list: (conversationId, options = {}) => this.http.request("GET", `/conversations/${conversationId}/messages`, {
|
|
1270
|
+
params: {
|
|
1271
|
+
pod_id: this.resolvePodId(options.pod_id),
|
|
1272
|
+
limit: options.limit ?? 20,
|
|
1273
|
+
page_token: options.page_token,
|
|
1274
|
+
},
|
|
1275
|
+
}),
|
|
1276
|
+
send: (conversationId, payload, options = {}) => this.http.request("POST", `/conversations/${conversationId}/messages`, {
|
|
1277
|
+
params: {
|
|
1278
|
+
pod_id: this.resolvePodId(options.pod_id),
|
|
1279
|
+
},
|
|
1280
|
+
body: payload,
|
|
1281
|
+
}),
|
|
1282
|
+
};
|
|
1283
|
+
}
|
|
1284
|
+
resolvePodId(explicitPodId) {
|
|
1285
|
+
if (typeof explicitPodId === "string") {
|
|
1286
|
+
return explicitPodId;
|
|
1287
|
+
}
|
|
1288
|
+
try {
|
|
1289
|
+
return this.podId();
|
|
1290
|
+
}
|
|
1291
|
+
catch {
|
|
1292
|
+
return undefined;
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
requirePodId(explicitPodId) {
|
|
1296
|
+
const podId = this.resolvePodId(explicitPodId);
|
|
1297
|
+
if (!podId) {
|
|
1298
|
+
throw new Error("pod_id is required for this conversation operation.");
|
|
1299
|
+
}
|
|
1300
|
+
return podId;
|
|
1301
|
+
}
|
|
1302
|
+
list(options = {}) {
|
|
1303
|
+
return this.http.request("GET", "/conversations", {
|
|
1304
|
+
params: {
|
|
1305
|
+
assistant_id: options.assistant_id,
|
|
1306
|
+
pod_id: this.resolvePodId(options.pod_id),
|
|
1307
|
+
organization_id: options.organization_id,
|
|
1308
|
+
limit: options.limit ?? 20,
|
|
1309
|
+
page_token: options.page_token,
|
|
1306
1310
|
},
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
+
});
|
|
1312
|
+
}
|
|
1313
|
+
listByAssistant(assistantId, options = {}) {
|
|
1314
|
+
return this.list({ ...options, assistant_id: assistantId });
|
|
1315
|
+
}
|
|
1316
|
+
create(payload) {
|
|
1317
|
+
return this.http.request("POST", "/conversations", {
|
|
1318
|
+
body: {
|
|
1319
|
+
...payload,
|
|
1320
|
+
pod_id: this.resolvePodId(payload.pod_id),
|
|
1311
1321
|
},
|
|
1312
1322
|
});
|
|
1313
1323
|
}
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1324
|
+
createForAssistant(assistantId, payload = {}) {
|
|
1325
|
+
return this.create({
|
|
1326
|
+
...payload,
|
|
1327
|
+
assistant_id: assistantId,
|
|
1328
|
+
});
|
|
1329
|
+
}
|
|
1330
|
+
get(conversationId, options = {}) {
|
|
1331
|
+
return this.http.request("GET", `/conversations/${conversationId}`, {
|
|
1332
|
+
params: {
|
|
1333
|
+
pod_id: this.resolvePodId(options.pod_id),
|
|
1334
|
+
},
|
|
1335
|
+
});
|
|
1336
|
+
}
|
|
1337
|
+
update(conversationId, payload, options = {}) {
|
|
1338
|
+
return this.http.request("PATCH", `/conversations/${conversationId}`, {
|
|
1339
|
+
params: {
|
|
1340
|
+
pod_id: this.resolvePodId(options.pod_id),
|
|
1341
|
+
},
|
|
1342
|
+
body: payload,
|
|
1343
|
+
});
|
|
1344
|
+
}
|
|
1345
|
+
delete(conversationId, options = {}) {
|
|
1346
|
+
const scopedPodId = this.requirePodId(options.pod_id);
|
|
1347
|
+
return this.http.request("DELETE", `/pods/${scopedPodId}/conversations/${conversationId}`);
|
|
1348
|
+
}
|
|
1349
|
+
sendMessageStream(conversationId, payload, options = {}) {
|
|
1350
|
+
return this.http.stream(`/conversations/${conversationId}/messages`, {
|
|
1351
|
+
method: "POST",
|
|
1352
|
+
params: {
|
|
1353
|
+
pod_id: this.resolvePodId(options.pod_id),
|
|
1354
|
+
},
|
|
1355
|
+
body: payload,
|
|
1356
|
+
signal: options.signal,
|
|
1357
|
+
headers: {
|
|
1358
|
+
"Content-Type": "application/json",
|
|
1359
|
+
Accept: "text/event-stream",
|
|
1360
|
+
},
|
|
1361
|
+
});
|
|
1362
|
+
}
|
|
1363
|
+
resumeStream(conversationId, options = {}) {
|
|
1364
|
+
return this.http.stream(`/conversations/${conversationId}/stream`, {
|
|
1365
|
+
params: {
|
|
1366
|
+
pod_id: this.resolvePodId(options.pod_id),
|
|
1367
|
+
},
|
|
1368
|
+
signal: options.signal,
|
|
1369
|
+
headers: {
|
|
1370
|
+
Accept: "text/event-stream",
|
|
1371
|
+
},
|
|
1372
|
+
});
|
|
1373
|
+
}
|
|
1374
|
+
stopRun(conversationId, options = {}) {
|
|
1375
|
+
return this.http.request("PATCH", `/conversations/${conversationId}/stop`, {
|
|
1376
|
+
params: {
|
|
1377
|
+
pod_id: this.resolvePodId(options.pod_id),
|
|
1378
|
+
},
|
|
1379
|
+
body: {},
|
|
1380
|
+
});
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
exports.ConversationsNamespace = ConversationsNamespace;
|
|
1384
|
+
|
|
1385
|
+
},
|
|
1386
|
+
"./namespaces/datastores.js": function (module, exports, require) {
|
|
1387
|
+
"use strict";
|
|
1388
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1389
|
+
exports.DatastoresNamespace = void 0;
|
|
1390
|
+
const DatastoreService_js_1 = require("./openapi_client/services/DatastoreService.js");
|
|
1391
|
+
class DatastoresNamespace {
|
|
1392
|
+
constructor(client, podId) {
|
|
1393
|
+
this.client = client;
|
|
1394
|
+
this.podId = podId;
|
|
1395
|
+
}
|
|
1396
|
+
list(options = {}) {
|
|
1397
|
+
return this.client.request(() => DatastoreService_js_1.DatastoreService.datastoreList(this.podId(), options.limit ?? 100, options.pageToken));
|
|
1398
|
+
}
|
|
1399
|
+
create(payload) {
|
|
1400
|
+
return this.client.request(() => DatastoreService_js_1.DatastoreService.datastoreCreate(this.podId(), payload));
|
|
1401
|
+
}
|
|
1402
|
+
get(name) {
|
|
1403
|
+
return this.client.request(() => DatastoreService_js_1.DatastoreService.datastoreGet(this.podId(), name));
|
|
1404
|
+
}
|
|
1405
|
+
update(name, payload) {
|
|
1406
|
+
return this.client.request(() => DatastoreService_js_1.DatastoreService.datastoreUpdate(this.podId(), name, payload));
|
|
1407
|
+
}
|
|
1408
|
+
delete(name) {
|
|
1409
|
+
return this.client.request(() => DatastoreService_js_1.DatastoreService.datastoreDelete(this.podId(), name));
|
|
1410
|
+
}
|
|
1411
|
+
query(name, request) {
|
|
1412
|
+
const payload = typeof request === "string" ? { query: request } : request;
|
|
1413
|
+
return this.client.request(() => DatastoreService_js_1.DatastoreService.datastoreQuery(this.podId(), name, payload));
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
exports.DatastoresNamespace = DatastoresNamespace;
|
|
1417
|
+
|
|
1418
|
+
},
|
|
1419
|
+
"./openapi_client/services/DatastoreService.js": function (module, exports, require) {
|
|
1420
|
+
"use strict";
|
|
1421
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1422
|
+
exports.DatastoreService = void 0;
|
|
1423
|
+
const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
|
|
1424
|
+
const request_js_1 = require("./openapi_client/core/request.js");
|
|
1425
|
+
class DatastoreService {
|
|
1426
|
+
/**
|
|
1427
|
+
* Create Datastore
|
|
1428
|
+
* Create a datastore namespace inside a pod. Use this before creating tables. Datastore names are normalized for stable API paths.
|
|
1317
1429
|
* @param podId
|
|
1318
|
-
* @param
|
|
1319
|
-
* @
|
|
1320
|
-
* @param pageToken Cursor from a previous response for pagination.
|
|
1321
|
-
* @returns TableListResponse Successful Response
|
|
1430
|
+
* @param requestBody
|
|
1431
|
+
* @returns DatastoreResponse Successful Response
|
|
1322
1432
|
* @throws ApiError
|
|
1323
1433
|
*/
|
|
1324
|
-
static
|
|
1434
|
+
static datastoreCreate(podId, requestBody) {
|
|
1325
1435
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
1326
|
-
method: '
|
|
1327
|
-
url: '/pods/{pod_id}/datastores
|
|
1436
|
+
method: 'POST',
|
|
1437
|
+
url: '/pods/{pod_id}/datastores',
|
|
1328
1438
|
path: {
|
|
1329
1439
|
'pod_id': podId,
|
|
1330
|
-
'datastore_name': datastoreName,
|
|
1331
|
-
},
|
|
1332
|
-
query: {
|
|
1333
|
-
'limit': limit,
|
|
1334
|
-
'page_token': pageToken,
|
|
1335
1440
|
},
|
|
1441
|
+
body: requestBody,
|
|
1442
|
+
mediaType: 'application/json',
|
|
1336
1443
|
errors: {
|
|
1337
1444
|
422: `Validation Error`,
|
|
1338
1445
|
},
|
|
1339
1446
|
});
|
|
1340
1447
|
}
|
|
1341
1448
|
/**
|
|
1342
|
-
*
|
|
1343
|
-
*
|
|
1449
|
+
* List Datastores
|
|
1450
|
+
* List datastores available in the pod.
|
|
1344
1451
|
* @param podId
|
|
1345
|
-
* @param
|
|
1346
|
-
* @param
|
|
1347
|
-
* @returns
|
|
1452
|
+
* @param limit Max number of datastores to return.
|
|
1453
|
+
* @param pageToken Cursor from a previous response to fetch the next page.
|
|
1454
|
+
* @returns DatastoreListResponse Successful Response
|
|
1348
1455
|
* @throws ApiError
|
|
1349
1456
|
*/
|
|
1350
|
-
static
|
|
1457
|
+
static datastoreList(podId, limit = 100, pageToken) {
|
|
1351
1458
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
1352
1459
|
method: 'GET',
|
|
1353
|
-
url: '/pods/{pod_id}/datastores
|
|
1460
|
+
url: '/pods/{pod_id}/datastores',
|
|
1354
1461
|
path: {
|
|
1355
1462
|
'pod_id': podId,
|
|
1356
|
-
|
|
1357
|
-
|
|
1463
|
+
},
|
|
1464
|
+
query: {
|
|
1465
|
+
'limit': limit,
|
|
1466
|
+
'page_token': pageToken,
|
|
1358
1467
|
},
|
|
1359
1468
|
errors: {
|
|
1360
1469
|
422: `Validation Error`,
|
|
@@ -1362,22 +1471,20 @@ class TablesService {
|
|
|
1362
1471
|
});
|
|
1363
1472
|
}
|
|
1364
1473
|
/**
|
|
1365
|
-
*
|
|
1366
|
-
*
|
|
1474
|
+
* Get Datastore
|
|
1475
|
+
* Get datastore metadata by datastore name.
|
|
1367
1476
|
* @param podId
|
|
1368
1477
|
* @param datastoreName
|
|
1369
|
-
* @
|
|
1370
|
-
* @returns DatastoreMessageResponse Successful Response
|
|
1478
|
+
* @returns DatastoreResponse Successful Response
|
|
1371
1479
|
* @throws ApiError
|
|
1372
1480
|
*/
|
|
1373
|
-
static
|
|
1481
|
+
static datastoreGet(podId, datastoreName) {
|
|
1374
1482
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
1375
|
-
method: '
|
|
1376
|
-
url: '/pods/{pod_id}/datastores/{datastore_name}
|
|
1483
|
+
method: 'GET',
|
|
1484
|
+
url: '/pods/{pod_id}/datastores/{datastore_name}',
|
|
1377
1485
|
path: {
|
|
1378
1486
|
'pod_id': podId,
|
|
1379
1487
|
'datastore_name': datastoreName,
|
|
1380
|
-
'table_name': tableName,
|
|
1381
1488
|
},
|
|
1382
1489
|
errors: {
|
|
1383
1490
|
422: `Validation Error`,
|
|
@@ -1385,23 +1492,21 @@ class TablesService {
|
|
|
1385
1492
|
});
|
|
1386
1493
|
}
|
|
1387
1494
|
/**
|
|
1388
|
-
* Update
|
|
1389
|
-
* Update
|
|
1495
|
+
* Update Datastore
|
|
1496
|
+
* Update datastore metadata and event emission settings.
|
|
1390
1497
|
* @param podId
|
|
1391
1498
|
* @param datastoreName
|
|
1392
|
-
* @param tableName
|
|
1393
1499
|
* @param requestBody
|
|
1394
|
-
* @returns
|
|
1500
|
+
* @returns DatastoreResponse Successful Response
|
|
1395
1501
|
* @throws ApiError
|
|
1396
1502
|
*/
|
|
1397
|
-
static
|
|
1503
|
+
static datastoreUpdate(podId, datastoreName, requestBody) {
|
|
1398
1504
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
1399
1505
|
method: 'PATCH',
|
|
1400
|
-
url: '/pods/{pod_id}/datastores/{datastore_name}
|
|
1506
|
+
url: '/pods/{pod_id}/datastores/{datastore_name}',
|
|
1401
1507
|
path: {
|
|
1402
1508
|
'pod_id': podId,
|
|
1403
1509
|
'datastore_name': datastoreName,
|
|
1404
|
-
'table_name': tableName,
|
|
1405
1510
|
},
|
|
1406
1511
|
body: requestBody,
|
|
1407
1512
|
mediaType: 'application/json',
|
|
@@ -1411,136 +1516,113 @@ class TablesService {
|
|
|
1411
1516
|
});
|
|
1412
1517
|
}
|
|
1413
1518
|
/**
|
|
1414
|
-
*
|
|
1415
|
-
*
|
|
1519
|
+
* Delete Datastore
|
|
1520
|
+
* Delete a datastore and its underlying resources.
|
|
1416
1521
|
* @param podId
|
|
1417
1522
|
* @param datastoreName
|
|
1418
|
-
* @
|
|
1419
|
-
* @param requestBody
|
|
1420
|
-
* @returns TableResponse Successful Response
|
|
1523
|
+
* @returns DatastoreMessageResponse Successful Response
|
|
1421
1524
|
* @throws ApiError
|
|
1422
1525
|
*/
|
|
1423
|
-
static
|
|
1526
|
+
static datastoreDelete(podId, datastoreName) {
|
|
1424
1527
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
1425
|
-
method: '
|
|
1426
|
-
url: '/pods/{pod_id}/datastores/{datastore_name}
|
|
1528
|
+
method: 'DELETE',
|
|
1529
|
+
url: '/pods/{pod_id}/datastores/{datastore_name}',
|
|
1427
1530
|
path: {
|
|
1428
1531
|
'pod_id': podId,
|
|
1429
1532
|
'datastore_name': datastoreName,
|
|
1430
|
-
'table_name': tableName,
|
|
1431
1533
|
},
|
|
1432
|
-
body: requestBody,
|
|
1433
|
-
mediaType: 'application/json',
|
|
1434
1534
|
errors: {
|
|
1435
1535
|
422: `Validation Error`,
|
|
1436
1536
|
},
|
|
1437
1537
|
});
|
|
1438
1538
|
}
|
|
1439
1539
|
/**
|
|
1440
|
-
*
|
|
1441
|
-
*
|
|
1540
|
+
* Execute Query
|
|
1541
|
+
* Execute a read-only SQL query in the datastore schema. Mutating statements (`INSERT`, `UPDATE`, `DELETE`, `DROP`, etc.) are blocked.
|
|
1442
1542
|
* @param podId
|
|
1443
1543
|
* @param datastoreName
|
|
1444
|
-
* @param
|
|
1445
|
-
* @
|
|
1446
|
-
* @returns DatastoreMessageResponse Successful Response
|
|
1544
|
+
* @param requestBody
|
|
1545
|
+
* @returns RecordQueryResponse Successful Response
|
|
1447
1546
|
* @throws ApiError
|
|
1448
1547
|
*/
|
|
1449
|
-
static
|
|
1548
|
+
static datastoreQuery(podId, datastoreName, requestBody) {
|
|
1450
1549
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
1451
|
-
method: '
|
|
1452
|
-
url: '/pods/{pod_id}/datastores/{datastore_name}/
|
|
1550
|
+
method: 'POST',
|
|
1551
|
+
url: '/pods/{pod_id}/datastores/{datastore_name}/query',
|
|
1453
1552
|
path: {
|
|
1454
1553
|
'pod_id': podId,
|
|
1455
1554
|
'datastore_name': datastoreName,
|
|
1456
|
-
'table_name': tableName,
|
|
1457
|
-
'column_name': columnName,
|
|
1458
1555
|
},
|
|
1556
|
+
body: requestBody,
|
|
1557
|
+
mediaType: 'application/json',
|
|
1459
1558
|
errors: {
|
|
1460
1559
|
422: `Validation Error`,
|
|
1461
1560
|
},
|
|
1462
1561
|
});
|
|
1463
1562
|
}
|
|
1464
1563
|
}
|
|
1465
|
-
exports.
|
|
1564
|
+
exports.DatastoreService = DatastoreService;
|
|
1466
1565
|
|
|
1467
1566
|
},
|
|
1468
|
-
"./namespaces/
|
|
1567
|
+
"./namespaces/desks.js": function (module, exports, require) {
|
|
1469
1568
|
"use strict";
|
|
1470
1569
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1471
|
-
exports.
|
|
1472
|
-
const
|
|
1473
|
-
class
|
|
1474
|
-
constructor(client, podId) {
|
|
1570
|
+
exports.DesksNamespace = void 0;
|
|
1571
|
+
const DesksService_js_1 = require("./openapi_client/services/DesksService.js");
|
|
1572
|
+
class DesksNamespace {
|
|
1573
|
+
constructor(client, http, podId) {
|
|
1475
1574
|
this.client = client;
|
|
1575
|
+
this.http = http;
|
|
1476
1576
|
this.podId = podId;
|
|
1477
|
-
this.
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
},
|
|
1486
|
-
delete: (datastore, table, recordIds) => {
|
|
1487
|
-
const payload = { record_ids: recordIds };
|
|
1488
|
-
return this.client.request(() => RecordsService_js_1.RecordsService.recordBulkDelete(this.podId(), datastore, table, payload));
|
|
1489
|
-
},
|
|
1577
|
+
this.html = {
|
|
1578
|
+
get: (name) => this.client.request(() => DesksService_js_1.DesksService.podDeskHtmlGet(this.podId(), name)),
|
|
1579
|
+
};
|
|
1580
|
+
this.bundle = {
|
|
1581
|
+
upload: (name, payload) => this.client.request(() => DesksService_js_1.DesksService.podDeskBundleUpload(this.podId(), name, payload)),
|
|
1582
|
+
};
|
|
1583
|
+
this.source = {
|
|
1584
|
+
download: (name) => this.http.requestBytes("GET", `/pods/${this.podId()}/desks/${name}/source/archive`),
|
|
1490
1585
|
};
|
|
1491
1586
|
}
|
|
1492
|
-
list(
|
|
1493
|
-
|
|
1494
|
-
if (filters || sort) {
|
|
1495
|
-
const payload = { filters, sort, limit, page_token: pageToken };
|
|
1496
|
-
return this.client.request(() => RecordsService_js_1.RecordsService.recordQuery(this.podId(), datastore, table, payload));
|
|
1497
|
-
}
|
|
1498
|
-
return this.client.request(() => RecordsService_js_1.RecordsService.recordList(this.podId(), datastore, table, limit ?? 20, pageToken));
|
|
1499
|
-
}
|
|
1500
|
-
create(datastore, table, data) {
|
|
1501
|
-
return this.client.request(() => RecordsService_js_1.RecordsService.recordCreate(this.podId(), datastore, table, { data }));
|
|
1587
|
+
list(options = {}) {
|
|
1588
|
+
return this.client.request(() => DesksService_js_1.DesksService.podDeskList(this.podId(), options.limit ?? 100, options.pageToken));
|
|
1502
1589
|
}
|
|
1503
|
-
|
|
1504
|
-
return this.client.request(() =>
|
|
1590
|
+
create(payload) {
|
|
1591
|
+
return this.client.request(() => DesksService_js_1.DesksService.podDeskCreate(this.podId(), payload));
|
|
1505
1592
|
}
|
|
1506
|
-
|
|
1507
|
-
return this.client.request(() =>
|
|
1593
|
+
get(name) {
|
|
1594
|
+
return this.client.request(() => DesksService_js_1.DesksService.podDeskGet(this.podId(), name));
|
|
1508
1595
|
}
|
|
1509
|
-
|
|
1510
|
-
return this.client.request(() =>
|
|
1596
|
+
update(name, payload) {
|
|
1597
|
+
return this.client.request(() => DesksService_js_1.DesksService.podDeskUpdate(this.podId(), name, payload));
|
|
1511
1598
|
}
|
|
1512
|
-
|
|
1513
|
-
return this.client.request(() =>
|
|
1599
|
+
delete(name) {
|
|
1600
|
+
return this.client.request(() => DesksService_js_1.DesksService.podDeskDelete(this.podId(), name));
|
|
1514
1601
|
}
|
|
1515
1602
|
}
|
|
1516
|
-
exports.
|
|
1603
|
+
exports.DesksNamespace = DesksNamespace;
|
|
1517
1604
|
|
|
1518
1605
|
},
|
|
1519
|
-
"./openapi_client/services/
|
|
1606
|
+
"./openapi_client/services/DesksService.js": function (module, exports, require) {
|
|
1520
1607
|
"use strict";
|
|
1521
1608
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1522
|
-
exports.
|
|
1609
|
+
exports.DesksService = void 0;
|
|
1523
1610
|
const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
|
|
1524
1611
|
const request_js_1 = require("./openapi_client/core/request.js");
|
|
1525
|
-
class
|
|
1612
|
+
class DesksService {
|
|
1526
1613
|
/**
|
|
1527
|
-
* Create
|
|
1528
|
-
* Insert a record into a table. Reserved tables (`reserved_*`) are system-managed and cannot be mutated through record write endpoints.
|
|
1614
|
+
* Create Desk
|
|
1529
1615
|
* @param podId
|
|
1530
|
-
* @param datastoreName
|
|
1531
|
-
* @param tableName
|
|
1532
1616
|
* @param requestBody
|
|
1533
|
-
* @returns
|
|
1617
|
+
* @returns DeskResponse Successful Response
|
|
1534
1618
|
* @throws ApiError
|
|
1535
1619
|
*/
|
|
1536
|
-
static
|
|
1620
|
+
static podDeskCreate(podId, requestBody) {
|
|
1537
1621
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
1538
1622
|
method: 'POST',
|
|
1539
|
-
url: '/pods/{pod_id}/
|
|
1623
|
+
url: '/pods/{pod_id}/desks',
|
|
1540
1624
|
path: {
|
|
1541
1625
|
'pod_id': podId,
|
|
1542
|
-
'datastore_name': datastoreName,
|
|
1543
|
-
'table_name': tableName,
|
|
1544
1626
|
},
|
|
1545
1627
|
body: requestBody,
|
|
1546
1628
|
mediaType: 'application/json',
|
|
@@ -1550,24 +1632,19 @@ class RecordsService {
|
|
|
1550
1632
|
});
|
|
1551
1633
|
}
|
|
1552
1634
|
/**
|
|
1553
|
-
* List
|
|
1554
|
-
* List table records with token pagination only. Use `record.query` when you need structured filters or explicit sort clauses.
|
|
1635
|
+
* List Desks
|
|
1555
1636
|
* @param podId
|
|
1556
|
-
* @param
|
|
1557
|
-
* @param
|
|
1558
|
-
* @
|
|
1559
|
-
* @param pageToken Opaque token from a previous response page.
|
|
1560
|
-
* @returns RecordListResponse Successful Response
|
|
1637
|
+
* @param limit
|
|
1638
|
+
* @param pageToken
|
|
1639
|
+
* @returns DeskListResponse Successful Response
|
|
1561
1640
|
* @throws ApiError
|
|
1562
1641
|
*/
|
|
1563
|
-
static
|
|
1642
|
+
static podDeskList(podId, limit = 100, pageToken) {
|
|
1564
1643
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
1565
1644
|
method: 'GET',
|
|
1566
|
-
url: '/pods/{pod_id}/
|
|
1645
|
+
url: '/pods/{pod_id}/desks',
|
|
1567
1646
|
path: {
|
|
1568
1647
|
'pod_id': podId,
|
|
1569
|
-
'datastore_name': datastoreName,
|
|
1570
|
-
'table_name': tableName,
|
|
1571
1648
|
},
|
|
1572
1649
|
query: {
|
|
1573
1650
|
'limit': limit,
|
|
@@ -1579,24 +1656,19 @@ class RecordsService {
|
|
|
1579
1656
|
});
|
|
1580
1657
|
}
|
|
1581
1658
|
/**
|
|
1582
|
-
* Get
|
|
1583
|
-
* Fetch one record by primary key value. The `record_id` path segment is the table's primary key value as stored in the table, not necessarily a UUID.
|
|
1659
|
+
* Get Desk
|
|
1584
1660
|
* @param podId
|
|
1585
|
-
* @param
|
|
1586
|
-
* @
|
|
1587
|
-
* @param recordId
|
|
1588
|
-
* @returns RecordResponse Successful Response
|
|
1661
|
+
* @param deskName
|
|
1662
|
+
* @returns DeskResponse Successful Response
|
|
1589
1663
|
* @throws ApiError
|
|
1590
1664
|
*/
|
|
1591
|
-
static
|
|
1665
|
+
static podDeskGet(podId, deskName) {
|
|
1592
1666
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
1593
1667
|
method: 'GET',
|
|
1594
|
-
url: '/pods/{pod_id}/
|
|
1668
|
+
url: '/pods/{pod_id}/desks/{desk_name}',
|
|
1595
1669
|
path: {
|
|
1596
1670
|
'pod_id': podId,
|
|
1597
|
-
'
|
|
1598
|
-
'table_name': tableName,
|
|
1599
|
-
'record_id': recordId,
|
|
1671
|
+
'desk_name': deskName,
|
|
1600
1672
|
},
|
|
1601
1673
|
errors: {
|
|
1602
1674
|
422: `Validation Error`,
|
|
@@ -1604,25 +1676,20 @@ class RecordsService {
|
|
|
1604
1676
|
});
|
|
1605
1677
|
}
|
|
1606
1678
|
/**
|
|
1607
|
-
* Update
|
|
1608
|
-
* Patch a record by primary key.
|
|
1679
|
+
* Update Desk
|
|
1609
1680
|
* @param podId
|
|
1610
|
-
* @param
|
|
1611
|
-
* @param tableName
|
|
1612
|
-
* @param recordId
|
|
1681
|
+
* @param deskName
|
|
1613
1682
|
* @param requestBody
|
|
1614
|
-
* @returns
|
|
1683
|
+
* @returns DeskResponse Successful Response
|
|
1615
1684
|
* @throws ApiError
|
|
1616
1685
|
*/
|
|
1617
|
-
static
|
|
1686
|
+
static podDeskUpdate(podId, deskName, requestBody) {
|
|
1618
1687
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
1619
1688
|
method: 'PATCH',
|
|
1620
|
-
url: '/pods/{pod_id}/
|
|
1689
|
+
url: '/pods/{pod_id}/desks/{desk_name}',
|
|
1621
1690
|
path: {
|
|
1622
1691
|
'pod_id': podId,
|
|
1623
|
-
'
|
|
1624
|
-
'table_name': tableName,
|
|
1625
|
-
'record_id': recordId,
|
|
1692
|
+
'desk_name': deskName,
|
|
1626
1693
|
},
|
|
1627
1694
|
body: requestBody,
|
|
1628
1695
|
mediaType: 'application/json',
|
|
@@ -1632,136 +1699,90 @@ class RecordsService {
|
|
|
1632
1699
|
});
|
|
1633
1700
|
}
|
|
1634
1701
|
/**
|
|
1635
|
-
* Delete
|
|
1636
|
-
* Delete a record by primary key.
|
|
1702
|
+
* Delete Desk
|
|
1637
1703
|
* @param podId
|
|
1638
|
-
* @param
|
|
1639
|
-
* @
|
|
1640
|
-
* @param recordId
|
|
1641
|
-
* @returns DatastoreMessageResponse Successful Response
|
|
1704
|
+
* @param deskName
|
|
1705
|
+
* @returns DeskMessageResponse Successful Response
|
|
1642
1706
|
* @throws ApiError
|
|
1643
1707
|
*/
|
|
1644
|
-
static
|
|
1708
|
+
static podDeskDelete(podId, deskName) {
|
|
1645
1709
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
1646
1710
|
method: 'DELETE',
|
|
1647
|
-
url: '/pods/{pod_id}/
|
|
1648
|
-
path: {
|
|
1649
|
-
'pod_id': podId,
|
|
1650
|
-
'datastore_name': datastoreName,
|
|
1651
|
-
'table_name': tableName,
|
|
1652
|
-
'record_id': recordId,
|
|
1653
|
-
},
|
|
1654
|
-
errors: {
|
|
1655
|
-
422: `Validation Error`,
|
|
1656
|
-
},
|
|
1657
|
-
});
|
|
1658
|
-
}
|
|
1659
|
-
/**
|
|
1660
|
-
* Bulk Create
|
|
1661
|
-
* Insert multiple records in one request.
|
|
1662
|
-
* @param podId
|
|
1663
|
-
* @param datastoreName
|
|
1664
|
-
* @param tableName
|
|
1665
|
-
* @param requestBody
|
|
1666
|
-
* @returns DatastoreMessageResponse Successful Response
|
|
1667
|
-
* @throws ApiError
|
|
1668
|
-
*/
|
|
1669
|
-
static recordBulkCreate(podId, datastoreName, tableName, requestBody) {
|
|
1670
|
-
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
1671
|
-
method: 'POST',
|
|
1672
|
-
url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/records/bulk/create',
|
|
1711
|
+
url: '/pods/{pod_id}/desks/{desk_name}',
|
|
1673
1712
|
path: {
|
|
1674
1713
|
'pod_id': podId,
|
|
1675
|
-
'
|
|
1676
|
-
'table_name': tableName,
|
|
1714
|
+
'desk_name': deskName,
|
|
1677
1715
|
},
|
|
1678
|
-
body: requestBody,
|
|
1679
|
-
mediaType: 'application/json',
|
|
1680
1716
|
errors: {
|
|
1681
1717
|
422: `Validation Error`,
|
|
1682
1718
|
},
|
|
1683
1719
|
});
|
|
1684
1720
|
}
|
|
1685
1721
|
/**
|
|
1686
|
-
*
|
|
1687
|
-
* Update multiple records in one request (each item needs primary key).
|
|
1722
|
+
* Upload Desk Bundle
|
|
1688
1723
|
* @param podId
|
|
1689
|
-
* @param
|
|
1690
|
-
* @param
|
|
1691
|
-
* @
|
|
1692
|
-
* @returns DatastoreMessageResponse Successful Response
|
|
1724
|
+
* @param deskName
|
|
1725
|
+
* @param formData
|
|
1726
|
+
* @returns DeskBundleUploadResponse Successful Response
|
|
1693
1727
|
* @throws ApiError
|
|
1694
1728
|
*/
|
|
1695
|
-
static
|
|
1729
|
+
static podDeskBundleUpload(podId, deskName, formData) {
|
|
1696
1730
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
1697
1731
|
method: 'POST',
|
|
1698
|
-
url: '/pods/{pod_id}/
|
|
1732
|
+
url: '/pods/{pod_id}/desks/{desk_name}/bundle',
|
|
1699
1733
|
path: {
|
|
1700
1734
|
'pod_id': podId,
|
|
1701
|
-
'
|
|
1702
|
-
'table_name': tableName,
|
|
1735
|
+
'desk_name': deskName,
|
|
1703
1736
|
},
|
|
1704
|
-
|
|
1705
|
-
mediaType: '
|
|
1737
|
+
formData: formData,
|
|
1738
|
+
mediaType: 'multipart/form-data',
|
|
1706
1739
|
errors: {
|
|
1707
1740
|
422: `Validation Error`,
|
|
1708
1741
|
},
|
|
1709
1742
|
});
|
|
1710
1743
|
}
|
|
1711
1744
|
/**
|
|
1712
|
-
*
|
|
1713
|
-
* Delete multiple records by primary key values.
|
|
1745
|
+
* Get Desk HTML
|
|
1714
1746
|
* @param podId
|
|
1715
|
-
* @param
|
|
1716
|
-
* @
|
|
1717
|
-
* @param requestBody
|
|
1718
|
-
* @returns DatastoreMessageResponse Successful Response
|
|
1747
|
+
* @param deskName
|
|
1748
|
+
* @returns any Successful Response
|
|
1719
1749
|
* @throws ApiError
|
|
1720
1750
|
*/
|
|
1721
|
-
static
|
|
1751
|
+
static podDeskHtmlGet(podId, deskName) {
|
|
1722
1752
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
1723
|
-
method: '
|
|
1724
|
-
url: '/pods/{pod_id}/
|
|
1753
|
+
method: 'GET',
|
|
1754
|
+
url: '/pods/{pod_id}/desks/{desk_name}/html',
|
|
1725
1755
|
path: {
|
|
1726
1756
|
'pod_id': podId,
|
|
1727
|
-
'
|
|
1728
|
-
'table_name': tableName,
|
|
1757
|
+
'desk_name': deskName,
|
|
1729
1758
|
},
|
|
1730
|
-
body: requestBody,
|
|
1731
|
-
mediaType: 'application/json',
|
|
1732
1759
|
errors: {
|
|
1733
1760
|
422: `Validation Error`,
|
|
1734
1761
|
},
|
|
1735
1762
|
});
|
|
1736
1763
|
}
|
|
1737
1764
|
/**
|
|
1738
|
-
*
|
|
1739
|
-
* Query one table with structured filters and sorting. Use this instead of dynamic query parameters when you need filtering. Example filters: `[{"field": "status", "op": "eq", "value": "OPEN"}]`.
|
|
1765
|
+
* Download Desk Source Archive
|
|
1740
1766
|
* @param podId
|
|
1741
|
-
* @param
|
|
1742
|
-
* @
|
|
1743
|
-
* @param requestBody
|
|
1744
|
-
* @returns RecordListResponse Successful Response
|
|
1767
|
+
* @param deskName
|
|
1768
|
+
* @returns any Successful Response
|
|
1745
1769
|
* @throws ApiError
|
|
1746
1770
|
*/
|
|
1747
|
-
static
|
|
1771
|
+
static podDeskSourceArchiveGet(podId, deskName) {
|
|
1748
1772
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
1749
|
-
method: '
|
|
1750
|
-
url: '/pods/{pod_id}/
|
|
1773
|
+
method: 'GET',
|
|
1774
|
+
url: '/pods/{pod_id}/desks/{desk_name}/source/archive',
|
|
1751
1775
|
path: {
|
|
1752
1776
|
'pod_id': podId,
|
|
1753
|
-
'
|
|
1754
|
-
'table_name': tableName,
|
|
1777
|
+
'desk_name': deskName,
|
|
1755
1778
|
},
|
|
1756
|
-
body: requestBody,
|
|
1757
|
-
mediaType: 'application/json',
|
|
1758
1779
|
errors: {
|
|
1759
1780
|
422: `Validation Error`,
|
|
1760
1781
|
},
|
|
1761
1782
|
});
|
|
1762
1783
|
}
|
|
1763
1784
|
}
|
|
1764
|
-
exports.
|
|
1785
|
+
exports.DesksService = DesksService;
|
|
1765
1786
|
|
|
1766
1787
|
},
|
|
1767
1788
|
"./namespaces/files.js": function (module, exports, require) {
|
|
@@ -2378,126 +2399,817 @@ class FunctionsService {
|
|
|
2378
2399
|
exports.FunctionsService = FunctionsService;
|
|
2379
2400
|
|
|
2380
2401
|
},
|
|
2381
|
-
"./namespaces/
|
|
2402
|
+
"./namespaces/icons.js": function (module, exports, require) {
|
|
2382
2403
|
"use strict";
|
|
2383
2404
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2384
|
-
exports.
|
|
2385
|
-
const
|
|
2386
|
-
class
|
|
2387
|
-
constructor(client
|
|
2405
|
+
exports.IconsNamespace = void 0;
|
|
2406
|
+
const IconsService_js_1 = require("./openapi_client/services/IconsService.js");
|
|
2407
|
+
class IconsNamespace {
|
|
2408
|
+
constructor(client) {
|
|
2388
2409
|
this.client = client;
|
|
2389
|
-
this.podId = podId;
|
|
2390
|
-
}
|
|
2391
|
-
list(options = {}) {
|
|
2392
|
-
return this.client.request(() => AgentsService_js_1.AgentsService.agentList(this.podId(), options.limit ?? 100, options.pageToken));
|
|
2393
|
-
}
|
|
2394
|
-
create(payload) {
|
|
2395
|
-
return this.client.request(() => AgentsService_js_1.AgentsService.agentCreate(this.podId(), payload));
|
|
2396
|
-
}
|
|
2397
|
-
get(agentName) {
|
|
2398
|
-
return this.client.request(() => AgentsService_js_1.AgentsService.agentGet(this.podId(), agentName));
|
|
2399
2410
|
}
|
|
2400
|
-
|
|
2401
|
-
return this.client.request(() =>
|
|
2411
|
+
upload(file) {
|
|
2412
|
+
return this.client.request(() => IconsService_js_1.IconsService.iconUpload({ file }));
|
|
2402
2413
|
}
|
|
2403
|
-
|
|
2404
|
-
return this.client.request(() =>
|
|
2414
|
+
getPublic(iconPath) {
|
|
2415
|
+
return this.client.request(() => IconsService_js_1.IconsService.iconPublicGet(iconPath));
|
|
2405
2416
|
}
|
|
2406
2417
|
}
|
|
2407
|
-
exports.
|
|
2418
|
+
exports.IconsNamespace = IconsNamespace;
|
|
2408
2419
|
|
|
2409
2420
|
},
|
|
2410
|
-
"./openapi_client/services/
|
|
2421
|
+
"./openapi_client/services/IconsService.js": function (module, exports, require) {
|
|
2411
2422
|
"use strict";
|
|
2412
2423
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2413
|
-
exports.
|
|
2424
|
+
exports.IconsService = void 0;
|
|
2414
2425
|
const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
|
|
2415
2426
|
const request_js_1 = require("./openapi_client/core/request.js");
|
|
2416
|
-
class
|
|
2427
|
+
class IconsService {
|
|
2417
2428
|
/**
|
|
2418
|
-
*
|
|
2419
|
-
*
|
|
2420
|
-
* @param
|
|
2421
|
-
* @
|
|
2422
|
-
* @returns AgentResponse Successful Response
|
|
2429
|
+
* Upload Icon
|
|
2430
|
+
* Upload an image asset and receive a public icon URL.
|
|
2431
|
+
* @param formData
|
|
2432
|
+
* @returns IconUploadResponse Successful Response
|
|
2423
2433
|
* @throws ApiError
|
|
2424
2434
|
*/
|
|
2425
|
-
static
|
|
2435
|
+
static iconUpload(formData) {
|
|
2426
2436
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2427
2437
|
method: 'POST',
|
|
2428
|
-
url: '/
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
},
|
|
2432
|
-
body: requestBody,
|
|
2433
|
-
mediaType: 'application/json',
|
|
2434
|
-
errors: {
|
|
2435
|
-
422: `Validation Error`,
|
|
2436
|
-
},
|
|
2437
|
-
});
|
|
2438
|
-
}
|
|
2439
|
-
/**
|
|
2440
|
-
* List Agents
|
|
2441
|
-
* List all agents in a pod
|
|
2442
|
-
* @param podId
|
|
2443
|
-
* @param limit
|
|
2444
|
-
* @param pageToken
|
|
2445
|
-
* @returns AgentListResponse Successful Response
|
|
2446
|
-
* @throws ApiError
|
|
2447
|
-
*/
|
|
2448
|
-
static agentList(podId, limit = 100, pageToken) {
|
|
2449
|
-
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2450
|
-
method: 'GET',
|
|
2451
|
-
url: '/pods/{pod_id}/agents',
|
|
2452
|
-
path: {
|
|
2453
|
-
'pod_id': podId,
|
|
2454
|
-
},
|
|
2455
|
-
query: {
|
|
2456
|
-
'limit': limit,
|
|
2457
|
-
'page_token': pageToken,
|
|
2458
|
-
},
|
|
2438
|
+
url: '/icons/upload',
|
|
2439
|
+
formData: formData,
|
|
2440
|
+
mediaType: 'multipart/form-data',
|
|
2459
2441
|
errors: {
|
|
2460
2442
|
422: `Validation Error`,
|
|
2461
2443
|
},
|
|
2462
2444
|
});
|
|
2463
2445
|
}
|
|
2464
2446
|
/**
|
|
2465
|
-
* Get
|
|
2466
|
-
*
|
|
2467
|
-
* @param
|
|
2468
|
-
* @
|
|
2469
|
-
* @returns AgentResponse Successful Response
|
|
2447
|
+
* Get Public Icon
|
|
2448
|
+
* Fetch a previously uploaded public icon asset.
|
|
2449
|
+
* @param iconPath
|
|
2450
|
+
* @returns any Successful Response
|
|
2470
2451
|
* @throws ApiError
|
|
2471
2452
|
*/
|
|
2472
|
-
static
|
|
2453
|
+
static iconPublicGet(iconPath) {
|
|
2473
2454
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2474
2455
|
method: 'GET',
|
|
2475
|
-
url: '/
|
|
2456
|
+
url: '/public/icons/{icon_path}',
|
|
2476
2457
|
path: {
|
|
2477
|
-
'
|
|
2478
|
-
'agent_name': agentName,
|
|
2458
|
+
'icon_path': iconPath,
|
|
2479
2459
|
},
|
|
2480
2460
|
errors: {
|
|
2481
2461
|
422: `Validation Error`,
|
|
2482
2462
|
},
|
|
2483
2463
|
});
|
|
2484
2464
|
}
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2465
|
+
}
|
|
2466
|
+
exports.IconsService = IconsService;
|
|
2467
|
+
|
|
2468
|
+
},
|
|
2469
|
+
"./namespaces/integrations.js": function (module, exports, require) {
|
|
2470
|
+
"use strict";
|
|
2471
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2472
|
+
exports.IntegrationsNamespace = void 0;
|
|
2473
|
+
const ApplicationsService_js_1 = require("./openapi_client/services/ApplicationsService.js");
|
|
2474
|
+
const IntegrationsService_js_1 = require("./openapi_client/services/IntegrationsService.js");
|
|
2475
|
+
class IntegrationsNamespace {
|
|
2476
|
+
constructor(client) {
|
|
2477
|
+
this.client = client;
|
|
2478
|
+
this.operations = {
|
|
2479
|
+
list: (applicationId) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationOperationList(applicationId)),
|
|
2480
|
+
get: (applicationId, operationName) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationOperationDetail(applicationId, operationName)),
|
|
2481
|
+
execute: (applicationId, operationName, payload, accountId) => {
|
|
2482
|
+
const body = { payload, account_id: accountId };
|
|
2483
|
+
return this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationOperationExecute(applicationId, operationName, body));
|
|
2484
|
+
},
|
|
2485
|
+
descriptor: (applicationId) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationDescriptor(applicationId)),
|
|
2486
|
+
};
|
|
2487
|
+
this.triggers = {
|
|
2488
|
+
list: (options = {}) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationTriggerList(options.applicationId, options.search, options.limit ?? 100, options.pageToken)),
|
|
2489
|
+
get: (triggerId) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationTriggerGet(triggerId)),
|
|
2490
|
+
};
|
|
2491
|
+
this.accounts = {
|
|
2492
|
+
list: (options = {}) => this.client.request(() => IntegrationsService_js_1.IntegrationsService.integrationAccountList(options.applicationId, options.limit ?? 100, options.pageToken)),
|
|
2493
|
+
get: (accountId) => this.client.request(() => IntegrationsService_js_1.IntegrationsService.integrationAccountGet(accountId)),
|
|
2494
|
+
credentials: (accountId) => this.client.request(() => IntegrationsService_js_1.IntegrationsService.integrationAccountCredentialsGet(accountId)),
|
|
2495
|
+
delete: (accountId) => this.client.request(() => IntegrationsService_js_1.IntegrationsService.integrationAccountDelete(accountId)),
|
|
2496
|
+
};
|
|
2497
|
+
}
|
|
2498
|
+
list(options = {}) {
|
|
2499
|
+
return this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationList(options.limit ?? 100, options.pageToken));
|
|
2500
|
+
}
|
|
2501
|
+
get(applicationId) {
|
|
2502
|
+
return this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationGet(applicationId));
|
|
2503
|
+
}
|
|
2504
|
+
createConnectRequest(applicationId) {
|
|
2505
|
+
const payload = { application_id: applicationId };
|
|
2506
|
+
return this.client.request(() => IntegrationsService_js_1.IntegrationsService.integrationConnectRequestCreate(payload));
|
|
2507
|
+
}
|
|
2508
|
+
}
|
|
2509
|
+
exports.IntegrationsNamespace = IntegrationsNamespace;
|
|
2510
|
+
|
|
2511
|
+
},
|
|
2512
|
+
"./openapi_client/services/ApplicationsService.js": function (module, exports, require) {
|
|
2513
|
+
"use strict";
|
|
2514
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2515
|
+
exports.ApplicationsService = void 0;
|
|
2516
|
+
const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
|
|
2517
|
+
const request_js_1 = require("./openapi_client/core/request.js");
|
|
2518
|
+
class ApplicationsService {
|
|
2519
|
+
/**
|
|
2520
|
+
* List Applications
|
|
2521
|
+
* Get all active applications available for integration
|
|
2522
|
+
* @param limit
|
|
2523
|
+
* @param pageToken
|
|
2524
|
+
* @returns ApplicationListResponseSchema Successful Response
|
|
2525
|
+
* @throws ApiError
|
|
2526
|
+
*/
|
|
2527
|
+
static applicationList(limit = 100, pageToken) {
|
|
2528
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2529
|
+
method: 'GET',
|
|
2530
|
+
url: '/integrations/applications',
|
|
2531
|
+
query: {
|
|
2532
|
+
'limit': limit,
|
|
2533
|
+
'page_token': pageToken,
|
|
2534
|
+
},
|
|
2535
|
+
errors: {
|
|
2536
|
+
422: `Validation Error`,
|
|
2537
|
+
},
|
|
2538
|
+
});
|
|
2539
|
+
}
|
|
2540
|
+
/**
|
|
2541
|
+
* List Triggers
|
|
2542
|
+
* Get all triggers. Optionally filter by application_id and search in description
|
|
2543
|
+
* @param applicationId
|
|
2544
|
+
* @param search
|
|
2545
|
+
* @param limit
|
|
2546
|
+
* @param pageToken
|
|
2547
|
+
* @returns AppTriggerListResponseSchema Successful Response
|
|
2548
|
+
* @throws ApiError
|
|
2549
|
+
*/
|
|
2550
|
+
static applicationTriggerList(applicationId, search, limit = 100, pageToken) {
|
|
2551
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2552
|
+
method: 'GET',
|
|
2553
|
+
url: '/integrations/applications/triggers',
|
|
2554
|
+
query: {
|
|
2555
|
+
'application_id': applicationId,
|
|
2556
|
+
'search': search,
|
|
2557
|
+
'limit': limit,
|
|
2558
|
+
'page_token': pageToken,
|
|
2559
|
+
},
|
|
2560
|
+
errors: {
|
|
2561
|
+
422: `Validation Error`,
|
|
2562
|
+
},
|
|
2563
|
+
});
|
|
2564
|
+
}
|
|
2565
|
+
/**
|
|
2566
|
+
* Get Trigger
|
|
2567
|
+
* Get a specific trigger by ID
|
|
2568
|
+
* @param triggerId
|
|
2569
|
+
* @returns AppTriggerResponseSchema Successful Response
|
|
2570
|
+
* @throws ApiError
|
|
2571
|
+
*/
|
|
2572
|
+
static applicationTriggerGet(triggerId) {
|
|
2573
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2574
|
+
method: 'GET',
|
|
2575
|
+
url: '/integrations/applications/triggers/{trigger_id}',
|
|
2576
|
+
path: {
|
|
2577
|
+
'trigger_id': triggerId,
|
|
2578
|
+
},
|
|
2579
|
+
errors: {
|
|
2580
|
+
422: `Validation Error`,
|
|
2581
|
+
},
|
|
2582
|
+
});
|
|
2583
|
+
}
|
|
2584
|
+
/**
|
|
2585
|
+
* Get Application
|
|
2586
|
+
* Get a specific application by ID along with its operation catalog
|
|
2587
|
+
* @param applicationId
|
|
2588
|
+
* @returns ApplicationDetailResponseSchema Successful Response
|
|
2589
|
+
* @throws ApiError
|
|
2590
|
+
*/
|
|
2591
|
+
static applicationGet(applicationId) {
|
|
2592
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2593
|
+
method: 'GET',
|
|
2594
|
+
url: '/integrations/applications/{application_id}',
|
|
2595
|
+
path: {
|
|
2596
|
+
'application_id': applicationId,
|
|
2597
|
+
},
|
|
2598
|
+
errors: {
|
|
2599
|
+
422: `Validation Error`,
|
|
2600
|
+
},
|
|
2601
|
+
});
|
|
2602
|
+
}
|
|
2603
|
+
/**
|
|
2604
|
+
* Get Application Descriptor
|
|
2605
|
+
* @param applicationId
|
|
2606
|
+
* @returns AppDescriptorResponse Successful Response
|
|
2607
|
+
* @throws ApiError
|
|
2608
|
+
*/
|
|
2609
|
+
static applicationDescriptor(applicationId) {
|
|
2610
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2611
|
+
method: 'GET',
|
|
2612
|
+
url: '/integrations/applications/{application_id}/operations/descriptor',
|
|
2613
|
+
path: {
|
|
2614
|
+
'application_id': applicationId,
|
|
2615
|
+
},
|
|
2616
|
+
errors: {
|
|
2617
|
+
422: `Validation Error`,
|
|
2618
|
+
},
|
|
2619
|
+
});
|
|
2620
|
+
}
|
|
2621
|
+
/**
|
|
2622
|
+
* List Application Operations
|
|
2623
|
+
* @param applicationId
|
|
2624
|
+
* @param search
|
|
2625
|
+
* @param limit
|
|
2626
|
+
* @param pageToken
|
|
2627
|
+
* @returns OperationListResponse Successful Response
|
|
2628
|
+
* @throws ApiError
|
|
2629
|
+
*/
|
|
2630
|
+
static applicationOperationList(applicationId, search, limit = 100, pageToken) {
|
|
2631
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2632
|
+
method: 'GET',
|
|
2633
|
+
url: '/integrations/applications/{application_id}/operations',
|
|
2634
|
+
path: {
|
|
2635
|
+
'application_id': applicationId,
|
|
2636
|
+
},
|
|
2637
|
+
query: {
|
|
2638
|
+
'search': search,
|
|
2639
|
+
'limit': limit,
|
|
2640
|
+
'page_token': pageToken,
|
|
2641
|
+
},
|
|
2642
|
+
errors: {
|
|
2643
|
+
422: `Validation Error`,
|
|
2644
|
+
},
|
|
2645
|
+
});
|
|
2646
|
+
}
|
|
2647
|
+
/**
|
|
2648
|
+
* Get Application Operation Details
|
|
2649
|
+
* @param applicationId
|
|
2650
|
+
* @param operationName
|
|
2651
|
+
* @returns OperationDetail Successful Response
|
|
2652
|
+
* @throws ApiError
|
|
2653
|
+
*/
|
|
2654
|
+
static applicationOperationDetail(applicationId, operationName) {
|
|
2655
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2656
|
+
method: 'GET',
|
|
2657
|
+
url: '/integrations/applications/{application_id}/operations/{operation_name}',
|
|
2658
|
+
path: {
|
|
2659
|
+
'application_id': applicationId,
|
|
2660
|
+
'operation_name': operationName,
|
|
2661
|
+
},
|
|
2662
|
+
errors: {
|
|
2663
|
+
422: `Validation Error`,
|
|
2664
|
+
},
|
|
2665
|
+
});
|
|
2666
|
+
}
|
|
2667
|
+
/**
|
|
2668
|
+
* Execute Application Operation
|
|
2669
|
+
* @param applicationId
|
|
2670
|
+
* @param operationName
|
|
2671
|
+
* @param requestBody
|
|
2672
|
+
* @returns OperationExecutionResponse Successful Response
|
|
2673
|
+
* @throws ApiError
|
|
2674
|
+
*/
|
|
2675
|
+
static applicationOperationExecute(applicationId, operationName, requestBody) {
|
|
2676
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2677
|
+
method: 'POST',
|
|
2678
|
+
url: '/integrations/applications/{application_id}/operations/{operation_name}/execute',
|
|
2679
|
+
path: {
|
|
2680
|
+
'application_id': applicationId,
|
|
2681
|
+
'operation_name': operationName,
|
|
2682
|
+
},
|
|
2683
|
+
body: requestBody,
|
|
2684
|
+
mediaType: 'application/json',
|
|
2685
|
+
errors: {
|
|
2686
|
+
422: `Validation Error`,
|
|
2687
|
+
},
|
|
2688
|
+
});
|
|
2689
|
+
}
|
|
2690
|
+
}
|
|
2691
|
+
exports.ApplicationsService = ApplicationsService;
|
|
2692
|
+
|
|
2693
|
+
},
|
|
2694
|
+
"./openapi_client/services/IntegrationsService.js": function (module, exports, require) {
|
|
2695
|
+
"use strict";
|
|
2696
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2697
|
+
exports.IntegrationsService = void 0;
|
|
2698
|
+
const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
|
|
2699
|
+
const request_js_1 = require("./openapi_client/core/request.js");
|
|
2700
|
+
class IntegrationsService {
|
|
2701
|
+
/**
|
|
2702
|
+
* Initiate Connect Request
|
|
2703
|
+
* Initiate an OAuth connection request for an application
|
|
2704
|
+
* @param requestBody
|
|
2705
|
+
* @returns ConnectRequestResponseSchema Successful Response
|
|
2706
|
+
* @throws ApiError
|
|
2707
|
+
*/
|
|
2708
|
+
static integrationConnectRequestCreate(requestBody) {
|
|
2709
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2710
|
+
method: 'POST',
|
|
2711
|
+
url: '/integrations/connect-requests',
|
|
2712
|
+
body: requestBody,
|
|
2713
|
+
mediaType: 'application/json',
|
|
2714
|
+
errors: {
|
|
2715
|
+
422: `Validation Error`,
|
|
2716
|
+
},
|
|
2717
|
+
});
|
|
2718
|
+
}
|
|
2719
|
+
/**
|
|
2720
|
+
* OAuth Callback
|
|
2721
|
+
* Handle OAuth callback and complete account connection. This endpoint is public and uses state parameter for security.
|
|
2722
|
+
* @param error
|
|
2723
|
+
* @returns AccountResponseSchema Successful Response
|
|
2724
|
+
* @throws ApiError
|
|
2725
|
+
*/
|
|
2726
|
+
static integrationOauthCallback(error) {
|
|
2727
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2728
|
+
method: 'GET',
|
|
2729
|
+
url: '/integrations/connect-requests/oauth/callback',
|
|
2730
|
+
query: {
|
|
2731
|
+
'error': error,
|
|
2732
|
+
},
|
|
2733
|
+
errors: {
|
|
2734
|
+
422: `Validation Error`,
|
|
2735
|
+
},
|
|
2736
|
+
});
|
|
2737
|
+
}
|
|
2738
|
+
/**
|
|
2739
|
+
* List Accounts
|
|
2740
|
+
* Get all connected accounts for the current user. Optionally filter by application_id or application_name
|
|
2741
|
+
* @param applicationId
|
|
2742
|
+
* @param limit
|
|
2743
|
+
* @param pageToken
|
|
2744
|
+
* @returns AccountListResponseSchema Successful Response
|
|
2745
|
+
* @throws ApiError
|
|
2746
|
+
*/
|
|
2747
|
+
static integrationAccountList(applicationId, limit = 100, pageToken) {
|
|
2748
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2749
|
+
method: 'GET',
|
|
2750
|
+
url: '/integrations/accounts',
|
|
2751
|
+
query: {
|
|
2752
|
+
'application_id': applicationId,
|
|
2753
|
+
'limit': limit,
|
|
2754
|
+
'page_token': pageToken,
|
|
2755
|
+
},
|
|
2756
|
+
errors: {
|
|
2757
|
+
422: `Validation Error`,
|
|
2758
|
+
},
|
|
2759
|
+
});
|
|
2760
|
+
}
|
|
2761
|
+
/**
|
|
2762
|
+
* Get Account
|
|
2763
|
+
* Get a specific account by ID
|
|
2764
|
+
* @param accountId
|
|
2765
|
+
* @returns AccountResponseSchema Successful Response
|
|
2766
|
+
* @throws ApiError
|
|
2767
|
+
*/
|
|
2768
|
+
static integrationAccountGet(accountId) {
|
|
2769
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2770
|
+
method: 'GET',
|
|
2771
|
+
url: '/integrations/accounts/{account_id}',
|
|
2772
|
+
path: {
|
|
2773
|
+
'account_id': accountId,
|
|
2774
|
+
},
|
|
2775
|
+
errors: {
|
|
2776
|
+
422: `Validation Error`,
|
|
2777
|
+
},
|
|
2778
|
+
});
|
|
2779
|
+
}
|
|
2780
|
+
/**
|
|
2781
|
+
* Delete Account
|
|
2782
|
+
* Delete a connected account and revoke the connection
|
|
2783
|
+
* @param accountId
|
|
2784
|
+
* @returns MessageResponseSchema Successful Response
|
|
2785
|
+
* @throws ApiError
|
|
2786
|
+
*/
|
|
2787
|
+
static integrationAccountDelete(accountId) {
|
|
2788
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2789
|
+
method: 'DELETE',
|
|
2790
|
+
url: '/integrations/accounts/{account_id}',
|
|
2791
|
+
path: {
|
|
2792
|
+
'account_id': accountId,
|
|
2793
|
+
},
|
|
2794
|
+
errors: {
|
|
2795
|
+
422: `Validation Error`,
|
|
2796
|
+
},
|
|
2797
|
+
});
|
|
2798
|
+
}
|
|
2799
|
+
/**
|
|
2800
|
+
* Get Credentials
|
|
2801
|
+
* Get the credentials for a specific account
|
|
2802
|
+
* @param accountId
|
|
2803
|
+
* @returns AccountCredentialsResponseSchema Successful Response
|
|
2804
|
+
* @throws ApiError
|
|
2805
|
+
*/
|
|
2806
|
+
static integrationAccountCredentialsGet(accountId) {
|
|
2807
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2808
|
+
method: 'GET',
|
|
2809
|
+
url: '/integrations/accounts/{account_id}/credentials',
|
|
2810
|
+
path: {
|
|
2811
|
+
'account_id': accountId,
|
|
2812
|
+
},
|
|
2813
|
+
errors: {
|
|
2814
|
+
422: `Validation Error`,
|
|
2815
|
+
},
|
|
2816
|
+
});
|
|
2817
|
+
}
|
|
2818
|
+
}
|
|
2819
|
+
exports.IntegrationsService = IntegrationsService;
|
|
2820
|
+
|
|
2821
|
+
},
|
|
2822
|
+
"./namespaces/organizations.js": function (module, exports, require) {
|
|
2823
|
+
"use strict";
|
|
2824
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2825
|
+
exports.OrganizationsNamespace = void 0;
|
|
2826
|
+
const OrganizationsService_js_1 = require("./openapi_client/services/OrganizationsService.js");
|
|
2827
|
+
class OrganizationsNamespace {
|
|
2828
|
+
constructor(client, http) {
|
|
2829
|
+
this.client = client;
|
|
2830
|
+
this.http = http;
|
|
2831
|
+
this.members = {
|
|
2832
|
+
list: (orgId, options = {}) => this.client.request(() => OrganizationsService_js_1.OrganizationsService.orgMemberList(orgId, options.limit ?? 100, options.pageToken ?? options.cursor)),
|
|
2833
|
+
updateRole: (orgId, memberId, role) => this.client.request(() => OrganizationsService_js_1.OrganizationsService.orgMemberUpdateRole(orgId, memberId, { role })),
|
|
2834
|
+
remove: (orgId, memberId) => this.client.request(() => OrganizationsService_js_1.OrganizationsService.orgMemberRemove(orgId, memberId)),
|
|
2835
|
+
};
|
|
2836
|
+
this.invitations = {
|
|
2837
|
+
listMine: async (options = {}) => {
|
|
2838
|
+
if (options.status) {
|
|
2839
|
+
return this.client.request(() => OrganizationsService_js_1.OrganizationsService.orgInvitationListMine(options.status, options.limit ?? 100, options.pageToken ?? options.cursor));
|
|
2840
|
+
}
|
|
2841
|
+
return this.http.request("GET", "/organizations/invitations", {
|
|
2842
|
+
params: {
|
|
2843
|
+
limit: options.limit ?? 100,
|
|
2844
|
+
page_token: options.pageToken ?? options.cursor,
|
|
2845
|
+
},
|
|
2846
|
+
});
|
|
2847
|
+
},
|
|
2848
|
+
list: async (orgId, options = {}) => {
|
|
2849
|
+
if (options.status) {
|
|
2850
|
+
return this.client.request(() => OrganizationsService_js_1.OrganizationsService.orgInvitationList(orgId, options.status, options.limit ?? 100, options.pageToken ?? options.cursor));
|
|
2851
|
+
}
|
|
2852
|
+
return this.http.request("GET", `/organizations/${encodeURIComponent(orgId)}/invitations`, {
|
|
2853
|
+
params: {
|
|
2854
|
+
limit: options.limit ?? 100,
|
|
2855
|
+
page_token: options.pageToken ?? options.cursor,
|
|
2856
|
+
},
|
|
2857
|
+
});
|
|
2858
|
+
},
|
|
2859
|
+
get: (invitationId) => this.client.request(() => OrganizationsService_js_1.OrganizationsService.orgInvitationGet(invitationId)),
|
|
2860
|
+
invite: (orgId, payload) => this.client.request(() => OrganizationsService_js_1.OrganizationsService.orgInvitationInvite(orgId, payload)),
|
|
2861
|
+
accept: (invitationId) => this.client.request(() => OrganizationsService_js_1.OrganizationsService.orgInvitationAccept(invitationId)),
|
|
2862
|
+
revoke: (invitationId) => this.client.request(() => OrganizationsService_js_1.OrganizationsService.orgInvitationRevoke(invitationId)),
|
|
2863
|
+
};
|
|
2864
|
+
}
|
|
2865
|
+
list(options = {}) {
|
|
2866
|
+
return this.client.request(() => OrganizationsService_js_1.OrganizationsService.orgList(options.limit ?? 100, options.pageToken ?? options.cursor));
|
|
2867
|
+
}
|
|
2868
|
+
get(orgId) {
|
|
2869
|
+
return this.client.request(() => OrganizationsService_js_1.OrganizationsService.orgGet(orgId));
|
|
2870
|
+
}
|
|
2871
|
+
create(payload) {
|
|
2872
|
+
return this.client.request(() => OrganizationsService_js_1.OrganizationsService.orgCreate(payload));
|
|
2873
|
+
}
|
|
2874
|
+
}
|
|
2875
|
+
exports.OrganizationsNamespace = OrganizationsNamespace;
|
|
2876
|
+
|
|
2877
|
+
},
|
|
2878
|
+
"./openapi_client/services/OrganizationsService.js": function (module, exports, require) {
|
|
2879
|
+
"use strict";
|
|
2880
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2881
|
+
exports.OrganizationsService = void 0;
|
|
2882
|
+
const OrganizationInvitationStatus_js_1 = require("./openapi_client/models/OrganizationInvitationStatus.js");
|
|
2883
|
+
const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
|
|
2884
|
+
const request_js_1 = require("./openapi_client/core/request.js");
|
|
2885
|
+
class OrganizationsService {
|
|
2886
|
+
/**
|
|
2887
|
+
* Create Organization
|
|
2888
|
+
* Create a new organization
|
|
2889
|
+
* @param requestBody
|
|
2890
|
+
* @returns OrganizationResponse Successful Response
|
|
2891
|
+
* @throws ApiError
|
|
2892
|
+
*/
|
|
2893
|
+
static orgCreate(requestBody) {
|
|
2894
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2895
|
+
method: 'POST',
|
|
2896
|
+
url: '/organizations',
|
|
2897
|
+
body: requestBody,
|
|
2898
|
+
mediaType: 'application/json',
|
|
2899
|
+
errors: {
|
|
2900
|
+
422: `Validation Error`,
|
|
2901
|
+
},
|
|
2902
|
+
});
|
|
2903
|
+
}
|
|
2904
|
+
/**
|
|
2905
|
+
* List My Organizations
|
|
2906
|
+
* Get all organizations the current user belongs to
|
|
2907
|
+
* @param limit
|
|
2908
|
+
* @param pageToken
|
|
2909
|
+
* @returns OrganizationListResponse Successful Response
|
|
2910
|
+
* @throws ApiError
|
|
2911
|
+
*/
|
|
2912
|
+
static orgList(limit = 100, pageToken) {
|
|
2913
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2914
|
+
method: 'GET',
|
|
2915
|
+
url: '/organizations',
|
|
2916
|
+
query: {
|
|
2917
|
+
'limit': limit,
|
|
2918
|
+
'page_token': pageToken,
|
|
2919
|
+
},
|
|
2920
|
+
errors: {
|
|
2921
|
+
422: `Validation Error`,
|
|
2922
|
+
},
|
|
2923
|
+
});
|
|
2924
|
+
}
|
|
2925
|
+
/**
|
|
2926
|
+
* List My Invitations
|
|
2927
|
+
* Get all pending invitations for the current user
|
|
2928
|
+
* @param status
|
|
2929
|
+
* @param limit
|
|
2930
|
+
* @param pageToken
|
|
2931
|
+
* @returns OrganizationInvitationListResponse Successful Response
|
|
2932
|
+
* @throws ApiError
|
|
2933
|
+
*/
|
|
2934
|
+
static orgInvitationListMine(status = OrganizationInvitationStatus_js_1.OrganizationInvitationStatus.PENDING, limit = 100, pageToken) {
|
|
2935
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2936
|
+
method: 'GET',
|
|
2937
|
+
url: '/organizations/invitations',
|
|
2938
|
+
query: {
|
|
2939
|
+
'status': status,
|
|
2940
|
+
'limit': limit,
|
|
2941
|
+
'page_token': pageToken,
|
|
2942
|
+
},
|
|
2943
|
+
errors: {
|
|
2944
|
+
422: `Validation Error`,
|
|
2945
|
+
},
|
|
2946
|
+
});
|
|
2947
|
+
}
|
|
2948
|
+
/**
|
|
2949
|
+
* Get Organization
|
|
2950
|
+
* Get organization details
|
|
2951
|
+
* @param orgId
|
|
2952
|
+
* @returns OrganizationResponse Successful Response
|
|
2953
|
+
* @throws ApiError
|
|
2954
|
+
*/
|
|
2955
|
+
static orgGet(orgId) {
|
|
2956
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2957
|
+
method: 'GET',
|
|
2958
|
+
url: '/organizations/{org_id}',
|
|
2959
|
+
path: {
|
|
2960
|
+
'org_id': orgId,
|
|
2961
|
+
},
|
|
2962
|
+
errors: {
|
|
2963
|
+
422: `Validation Error`,
|
|
2964
|
+
},
|
|
2965
|
+
});
|
|
2966
|
+
}
|
|
2967
|
+
/**
|
|
2968
|
+
* List Organization Members
|
|
2969
|
+
* Get all members of an organization
|
|
2970
|
+
* @param orgId
|
|
2971
|
+
* @param limit
|
|
2972
|
+
* @param pageToken
|
|
2973
|
+
* @returns OrganizationMemberListResponse Successful Response
|
|
2974
|
+
* @throws ApiError
|
|
2975
|
+
*/
|
|
2976
|
+
static orgMemberList(orgId, limit = 100, pageToken) {
|
|
2977
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2978
|
+
method: 'GET',
|
|
2979
|
+
url: '/organizations/{org_id}/members',
|
|
2980
|
+
path: {
|
|
2981
|
+
'org_id': orgId,
|
|
2982
|
+
},
|
|
2983
|
+
query: {
|
|
2984
|
+
'limit': limit,
|
|
2985
|
+
'page_token': pageToken,
|
|
2986
|
+
},
|
|
2987
|
+
errors: {
|
|
2988
|
+
422: `Validation Error`,
|
|
2989
|
+
},
|
|
2990
|
+
});
|
|
2991
|
+
}
|
|
2992
|
+
/**
|
|
2993
|
+
* Invite Member
|
|
2994
|
+
* Invite a user to join the organization
|
|
2995
|
+
* @param orgId
|
|
2996
|
+
* @param requestBody
|
|
2997
|
+
* @returns OrganizationInvitationResponse Successful Response
|
|
2998
|
+
* @throws ApiError
|
|
2999
|
+
*/
|
|
3000
|
+
static orgInvitationInvite(orgId, requestBody) {
|
|
3001
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3002
|
+
method: 'POST',
|
|
3003
|
+
url: '/organizations/{org_id}/invitations',
|
|
3004
|
+
path: {
|
|
3005
|
+
'org_id': orgId,
|
|
3006
|
+
},
|
|
3007
|
+
body: requestBody,
|
|
3008
|
+
mediaType: 'application/json',
|
|
3009
|
+
errors: {
|
|
3010
|
+
422: `Validation Error`,
|
|
3011
|
+
},
|
|
3012
|
+
});
|
|
3013
|
+
}
|
|
3014
|
+
/**
|
|
3015
|
+
* List Organization Invitations
|
|
3016
|
+
* Get all pending invitations for an organization
|
|
3017
|
+
* @param orgId
|
|
3018
|
+
* @param status
|
|
3019
|
+
* @param limit
|
|
3020
|
+
* @param pageToken
|
|
3021
|
+
* @returns OrganizationInvitationListResponse Successful Response
|
|
3022
|
+
* @throws ApiError
|
|
3023
|
+
*/
|
|
3024
|
+
static orgInvitationList(orgId, status = OrganizationInvitationStatus_js_1.OrganizationInvitationStatus.PENDING, limit = 100, pageToken) {
|
|
3025
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3026
|
+
method: 'GET',
|
|
3027
|
+
url: '/organizations/{org_id}/invitations',
|
|
3028
|
+
path: {
|
|
3029
|
+
'org_id': orgId,
|
|
3030
|
+
},
|
|
3031
|
+
query: {
|
|
3032
|
+
'status': status,
|
|
3033
|
+
'limit': limit,
|
|
3034
|
+
'page_token': pageToken,
|
|
3035
|
+
},
|
|
3036
|
+
errors: {
|
|
3037
|
+
422: `Validation Error`,
|
|
3038
|
+
},
|
|
3039
|
+
});
|
|
3040
|
+
}
|
|
3041
|
+
/**
|
|
3042
|
+
* Accept Invitation
|
|
3043
|
+
* Accept an organization invitation
|
|
3044
|
+
* @param invitationId
|
|
3045
|
+
* @returns OrganizationMessageResponse Successful Response
|
|
3046
|
+
* @throws ApiError
|
|
3047
|
+
*/
|
|
3048
|
+
static orgInvitationAccept(invitationId) {
|
|
3049
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3050
|
+
method: 'POST',
|
|
3051
|
+
url: '/organizations/invitations/{invitation_id}/accept',
|
|
3052
|
+
path: {
|
|
3053
|
+
'invitation_id': invitationId,
|
|
3054
|
+
},
|
|
3055
|
+
errors: {
|
|
3056
|
+
422: `Validation Error`,
|
|
3057
|
+
},
|
|
3058
|
+
});
|
|
3059
|
+
}
|
|
3060
|
+
/**
|
|
3061
|
+
* Get Organization Invitation
|
|
3062
|
+
* Get an invitation by id
|
|
3063
|
+
* @param invitationId
|
|
3064
|
+
* @returns OrganizationInvitationResponse Successful Response
|
|
3065
|
+
* @throws ApiError
|
|
3066
|
+
*/
|
|
3067
|
+
static orgInvitationGet(invitationId) {
|
|
3068
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3069
|
+
method: 'GET',
|
|
3070
|
+
url: '/organizations/invitations/{invitation_id}',
|
|
3071
|
+
path: {
|
|
3072
|
+
'invitation_id': invitationId,
|
|
3073
|
+
},
|
|
3074
|
+
errors: {
|
|
3075
|
+
422: `Validation Error`,
|
|
3076
|
+
},
|
|
3077
|
+
});
|
|
3078
|
+
}
|
|
3079
|
+
/**
|
|
3080
|
+
* Revoke Invitation
|
|
3081
|
+
* Revoke an organization invitation
|
|
3082
|
+
* @param invitationId
|
|
3083
|
+
* @returns void
|
|
3084
|
+
* @throws ApiError
|
|
3085
|
+
*/
|
|
3086
|
+
static orgInvitationRevoke(invitationId) {
|
|
3087
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3088
|
+
method: 'DELETE',
|
|
3089
|
+
url: '/organizations/invitations/{invitation_id}',
|
|
3090
|
+
path: {
|
|
3091
|
+
'invitation_id': invitationId,
|
|
3092
|
+
},
|
|
3093
|
+
errors: {
|
|
3094
|
+
422: `Validation Error`,
|
|
3095
|
+
},
|
|
3096
|
+
});
|
|
3097
|
+
}
|
|
3098
|
+
/**
|
|
3099
|
+
* Update Member Role
|
|
3100
|
+
* Update a member's role in the organization
|
|
3101
|
+
* @param orgId
|
|
3102
|
+
* @param memberId
|
|
2490
3103
|
* @param requestBody
|
|
2491
|
-
* @returns
|
|
3104
|
+
* @returns OrganizationMemberResponse Successful Response
|
|
2492
3105
|
* @throws ApiError
|
|
2493
3106
|
*/
|
|
2494
|
-
static
|
|
3107
|
+
static orgMemberUpdateRole(orgId, memberId, requestBody) {
|
|
2495
3108
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2496
3109
|
method: 'PATCH',
|
|
2497
|
-
url: '/
|
|
3110
|
+
url: '/organizations/{org_id}/members/{member_id}/role',
|
|
3111
|
+
path: {
|
|
3112
|
+
'org_id': orgId,
|
|
3113
|
+
'member_id': memberId,
|
|
3114
|
+
},
|
|
3115
|
+
body: requestBody,
|
|
3116
|
+
mediaType: 'application/json',
|
|
3117
|
+
errors: {
|
|
3118
|
+
422: `Validation Error`,
|
|
3119
|
+
},
|
|
3120
|
+
});
|
|
3121
|
+
}
|
|
3122
|
+
/**
|
|
3123
|
+
* Remove Member
|
|
3124
|
+
* Remove a member from the organization
|
|
3125
|
+
* @param orgId
|
|
3126
|
+
* @param memberId
|
|
3127
|
+
* @returns void
|
|
3128
|
+
* @throws ApiError
|
|
3129
|
+
*/
|
|
3130
|
+
static orgMemberRemove(orgId, memberId) {
|
|
3131
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3132
|
+
method: 'DELETE',
|
|
3133
|
+
url: '/organizations/{org_id}/members/{member_id}',
|
|
3134
|
+
path: {
|
|
3135
|
+
'org_id': orgId,
|
|
3136
|
+
'member_id': memberId,
|
|
3137
|
+
},
|
|
3138
|
+
errors: {
|
|
3139
|
+
422: `Validation Error`,
|
|
3140
|
+
},
|
|
3141
|
+
});
|
|
3142
|
+
}
|
|
3143
|
+
}
|
|
3144
|
+
exports.OrganizationsService = OrganizationsService;
|
|
3145
|
+
|
|
3146
|
+
},
|
|
3147
|
+
"./openapi_client/models/OrganizationInvitationStatus.js": function (module, exports, require) {
|
|
3148
|
+
"use strict";
|
|
3149
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3150
|
+
exports.OrganizationInvitationStatus = void 0;
|
|
3151
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
3152
|
+
/* istanbul ignore file */
|
|
3153
|
+
/* tslint:disable */
|
|
3154
|
+
/* eslint-disable */
|
|
3155
|
+
/**
|
|
3156
|
+
* Statuses for organization invitations.
|
|
3157
|
+
*/
|
|
3158
|
+
var OrganizationInvitationStatus;
|
|
3159
|
+
(function (OrganizationInvitationStatus) {
|
|
3160
|
+
OrganizationInvitationStatus["PENDING"] = "PENDING";
|
|
3161
|
+
OrganizationInvitationStatus["ACCEPTED"] = "ACCEPTED";
|
|
3162
|
+
OrganizationInvitationStatus["EXPIRED"] = "EXPIRED";
|
|
3163
|
+
OrganizationInvitationStatus["REVOKED"] = "REVOKED";
|
|
3164
|
+
})(OrganizationInvitationStatus || (exports.OrganizationInvitationStatus = OrganizationInvitationStatus = {}));
|
|
3165
|
+
|
|
3166
|
+
},
|
|
3167
|
+
"./namespaces/pod-members.js": function (module, exports, require) {
|
|
3168
|
+
"use strict";
|
|
3169
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3170
|
+
exports.PodMembersNamespace = void 0;
|
|
3171
|
+
const PodMembersService_js_1 = require("./openapi_client/services/PodMembersService.js");
|
|
3172
|
+
class PodMembersNamespace {
|
|
3173
|
+
constructor(client) {
|
|
3174
|
+
this.client = client;
|
|
3175
|
+
}
|
|
3176
|
+
list(podId, options = {}) {
|
|
3177
|
+
return this.client.request(() => PodMembersService_js_1.PodMembersService.podMemberList(podId, options.limit ?? 100, options.pageToken ?? options.cursor));
|
|
3178
|
+
}
|
|
3179
|
+
add(podId, payload) {
|
|
3180
|
+
return this.client.request(() => PodMembersService_js_1.PodMembersService.podMemberAdd(podId, payload));
|
|
3181
|
+
}
|
|
3182
|
+
updateRole(podId, memberId, role) {
|
|
3183
|
+
return this.client.request(() => PodMembersService_js_1.PodMembersService.podMemberUpdateRole(podId, memberId, { role }));
|
|
3184
|
+
}
|
|
3185
|
+
remove(podId, memberId) {
|
|
3186
|
+
return this.client.request(() => PodMembersService_js_1.PodMembersService.podMemberRemove(podId, memberId));
|
|
3187
|
+
}
|
|
3188
|
+
}
|
|
3189
|
+
exports.PodMembersNamespace = PodMembersNamespace;
|
|
3190
|
+
|
|
3191
|
+
},
|
|
3192
|
+
"./openapi_client/services/PodMembersService.js": function (module, exports, require) {
|
|
3193
|
+
"use strict";
|
|
3194
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3195
|
+
exports.PodMembersService = void 0;
|
|
3196
|
+
const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
|
|
3197
|
+
const request_js_1 = require("./openapi_client/core/request.js");
|
|
3198
|
+
class PodMembersService {
|
|
3199
|
+
/**
|
|
3200
|
+
* Add Pod Member
|
|
3201
|
+
* Add a member to a pod
|
|
3202
|
+
* @param podId
|
|
3203
|
+
* @param requestBody
|
|
3204
|
+
* @returns PodMemberResponse Successful Response
|
|
3205
|
+
* @throws ApiError
|
|
3206
|
+
*/
|
|
3207
|
+
static podMemberAdd(podId, requestBody) {
|
|
3208
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3209
|
+
method: 'POST',
|
|
3210
|
+
url: '/pods/{pod_id}/members',
|
|
2498
3211
|
path: {
|
|
2499
3212
|
'pod_id': podId,
|
|
2500
|
-
'agent_name': agentName,
|
|
2501
3213
|
},
|
|
2502
3214
|
body: requestBody,
|
|
2503
3215
|
mediaType: 'application/json',
|
|
@@ -2507,20 +3219,69 @@ class AgentsService {
|
|
|
2507
3219
|
});
|
|
2508
3220
|
}
|
|
2509
3221
|
/**
|
|
2510
|
-
*
|
|
2511
|
-
*
|
|
3222
|
+
* List Pod Members
|
|
3223
|
+
* List all members of a pod
|
|
2512
3224
|
* @param podId
|
|
2513
|
-
* @param
|
|
2514
|
-
* @
|
|
3225
|
+
* @param limit
|
|
3226
|
+
* @param pageToken
|
|
3227
|
+
* @returns PodMemberListResponse Successful Response
|
|
2515
3228
|
* @throws ApiError
|
|
2516
3229
|
*/
|
|
2517
|
-
static
|
|
3230
|
+
static podMemberList(podId, limit = 100, pageToken) {
|
|
3231
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3232
|
+
method: 'GET',
|
|
3233
|
+
url: '/pods/{pod_id}/members',
|
|
3234
|
+
path: {
|
|
3235
|
+
'pod_id': podId,
|
|
3236
|
+
},
|
|
3237
|
+
query: {
|
|
3238
|
+
'limit': limit,
|
|
3239
|
+
'page_token': pageToken,
|
|
3240
|
+
},
|
|
3241
|
+
errors: {
|
|
3242
|
+
422: `Validation Error`,
|
|
3243
|
+
},
|
|
3244
|
+
});
|
|
3245
|
+
}
|
|
3246
|
+
/**
|
|
3247
|
+
* Update Member Role
|
|
3248
|
+
* Update a pod member's role
|
|
3249
|
+
* @param podId
|
|
3250
|
+
* @param memberId
|
|
3251
|
+
* @param requestBody
|
|
3252
|
+
* @returns PodMemberResponse Successful Response
|
|
3253
|
+
* @throws ApiError
|
|
3254
|
+
*/
|
|
3255
|
+
static podMemberUpdateRole(podId, memberId, requestBody) {
|
|
3256
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3257
|
+
method: 'PATCH',
|
|
3258
|
+
url: '/pods/{pod_id}/members/{member_id}/role',
|
|
3259
|
+
path: {
|
|
3260
|
+
'pod_id': podId,
|
|
3261
|
+
'member_id': memberId,
|
|
3262
|
+
},
|
|
3263
|
+
body: requestBody,
|
|
3264
|
+
mediaType: 'application/json',
|
|
3265
|
+
errors: {
|
|
3266
|
+
422: `Validation Error`,
|
|
3267
|
+
},
|
|
3268
|
+
});
|
|
3269
|
+
}
|
|
3270
|
+
/**
|
|
3271
|
+
* Remove Pod Member
|
|
3272
|
+
* Remove a member from a pod
|
|
3273
|
+
* @param podId
|
|
3274
|
+
* @param memberId
|
|
3275
|
+
* @returns void
|
|
3276
|
+
* @throws ApiError
|
|
3277
|
+
*/
|
|
3278
|
+
static podMemberRemove(podId, memberId) {
|
|
2518
3279
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2519
3280
|
method: 'DELETE',
|
|
2520
|
-
url: '/pods/{pod_id}/
|
|
3281
|
+
url: '/pods/{pod_id}/members/{member_id}',
|
|
2521
3282
|
path: {
|
|
2522
3283
|
'pod_id': podId,
|
|
2523
|
-
'
|
|
3284
|
+
'member_id': memberId,
|
|
2524
3285
|
},
|
|
2525
3286
|
errors: {
|
|
2526
3287
|
422: `Validation Error`,
|
|
@@ -2528,277 +3289,449 @@ class AgentsService {
|
|
|
2528
3289
|
});
|
|
2529
3290
|
}
|
|
2530
3291
|
}
|
|
2531
|
-
exports.
|
|
3292
|
+
exports.PodMembersService = PodMembersService;
|
|
2532
3293
|
|
|
2533
3294
|
},
|
|
2534
|
-
"./namespaces/
|
|
3295
|
+
"./namespaces/pods.js": function (module, exports, require) {
|
|
2535
3296
|
"use strict";
|
|
2536
3297
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2537
|
-
exports.
|
|
2538
|
-
|
|
2539
|
-
|
|
3298
|
+
exports.PodsNamespace = void 0;
|
|
3299
|
+
const PodsService_js_1 = require("./openapi_client/services/PodsService.js");
|
|
3300
|
+
class PodsNamespace {
|
|
3301
|
+
constructor(client, http) {
|
|
3302
|
+
this.client = client;
|
|
2540
3303
|
this.http = http;
|
|
2541
|
-
this.podId = podId;
|
|
2542
|
-
this.messages = {
|
|
2543
|
-
list: (taskId, options = {}) => this.http.request("GET", `/pods/${this.podId()}/tasks/${taskId}/messages`, {
|
|
2544
|
-
params: {
|
|
2545
|
-
limit: options.limit ?? 100,
|
|
2546
|
-
page_token: options.pageToken ?? options.cursor,
|
|
2547
|
-
cursor: options.cursor,
|
|
2548
|
-
},
|
|
2549
|
-
}),
|
|
2550
|
-
add: (taskId, content) => {
|
|
2551
|
-
const payload = { content };
|
|
2552
|
-
return this.http.request("POST", `/pods/${this.podId()}/tasks/${taskId}/messages`, {
|
|
2553
|
-
body: payload,
|
|
2554
|
-
});
|
|
2555
|
-
},
|
|
2556
|
-
};
|
|
2557
3304
|
}
|
|
2558
3305
|
list(options = {}) {
|
|
2559
|
-
|
|
3306
|
+
if (options.organizationId) {
|
|
3307
|
+
return this.listByOrganization(options.organizationId, {
|
|
3308
|
+
limit: options.limit,
|
|
3309
|
+
pageToken: options.pageToken ?? options.cursor,
|
|
3310
|
+
});
|
|
3311
|
+
}
|
|
3312
|
+
return this.http.request("GET", "/pods", {
|
|
2560
3313
|
params: {
|
|
2561
|
-
agent_name: options.agentName,
|
|
2562
|
-
agent_id: options.agentId,
|
|
2563
3314
|
limit: options.limit ?? 100,
|
|
2564
3315
|
page_token: options.pageToken ?? options.cursor,
|
|
2565
|
-
cursor: options.cursor,
|
|
2566
3316
|
},
|
|
2567
3317
|
});
|
|
2568
3318
|
}
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
return this.
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
3319
|
+
listByOrganization(organizationId, options = {}) {
|
|
3320
|
+
return this.client.request(() => PodsService_js_1.PodsService.podList(organizationId, options.limit ?? 100, options.pageToken ?? options.cursor));
|
|
3321
|
+
}
|
|
3322
|
+
get(podId) {
|
|
3323
|
+
return this.client.request(() => PodsService_js_1.PodsService.podGet(podId));
|
|
3324
|
+
}
|
|
3325
|
+
create(payload) {
|
|
3326
|
+
return this.client.request(() => PodsService_js_1.PodsService.podCreate(payload));
|
|
3327
|
+
}
|
|
3328
|
+
update(podId, payload) {
|
|
3329
|
+
return this.client.request(() => PodsService_js_1.PodsService.podUpdate(podId, payload));
|
|
3330
|
+
}
|
|
3331
|
+
delete(podId) {
|
|
3332
|
+
return this.client.request(() => PodsService_js_1.PodsService.podDelete(podId));
|
|
3333
|
+
}
|
|
3334
|
+
config(podId) {
|
|
3335
|
+
return this.client.request(() => PodsService_js_1.PodsService.podConfigGet(podId));
|
|
3336
|
+
}
|
|
3337
|
+
}
|
|
3338
|
+
exports.PodsNamespace = PodsNamespace;
|
|
3339
|
+
|
|
3340
|
+
},
|
|
3341
|
+
"./openapi_client/services/PodsService.js": function (module, exports, require) {
|
|
3342
|
+
"use strict";
|
|
3343
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3344
|
+
exports.PodsService = void 0;
|
|
3345
|
+
const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
|
|
3346
|
+
const request_js_1 = require("./openapi_client/core/request.js");
|
|
3347
|
+
class PodsService {
|
|
3348
|
+
/**
|
|
3349
|
+
* Create Pod
|
|
3350
|
+
* Create a new pod
|
|
3351
|
+
* @param requestBody
|
|
3352
|
+
* @returns PodResponse Successful Response
|
|
3353
|
+
* @throws ApiError
|
|
3354
|
+
*/
|
|
3355
|
+
static podCreate(requestBody) {
|
|
3356
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3357
|
+
method: 'POST',
|
|
3358
|
+
url: '/pods',
|
|
3359
|
+
body: requestBody,
|
|
3360
|
+
mediaType: 'application/json',
|
|
3361
|
+
errors: {
|
|
3362
|
+
422: `Validation Error`,
|
|
2579
3363
|
},
|
|
2580
3364
|
});
|
|
2581
3365
|
}
|
|
2582
|
-
|
|
2583
|
-
|
|
3366
|
+
/**
|
|
3367
|
+
* Get Pod
|
|
3368
|
+
* Get pod details
|
|
3369
|
+
* @param podId
|
|
3370
|
+
* @returns PodResponse Successful Response
|
|
3371
|
+
* @throws ApiError
|
|
3372
|
+
*/
|
|
3373
|
+
static podGet(podId) {
|
|
3374
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3375
|
+
method: 'GET',
|
|
3376
|
+
url: '/pods/{pod_id}',
|
|
3377
|
+
path: {
|
|
3378
|
+
'pod_id': podId,
|
|
3379
|
+
},
|
|
3380
|
+
errors: {
|
|
3381
|
+
422: `Validation Error`,
|
|
3382
|
+
},
|
|
3383
|
+
});
|
|
2584
3384
|
}
|
|
2585
|
-
|
|
2586
|
-
|
|
3385
|
+
/**
|
|
3386
|
+
* Update Pod
|
|
3387
|
+
* Update pod details
|
|
3388
|
+
* @param podId
|
|
3389
|
+
* @param requestBody
|
|
3390
|
+
* @returns PodResponse Successful Response
|
|
3391
|
+
* @throws ApiError
|
|
3392
|
+
*/
|
|
3393
|
+
static podUpdate(podId, requestBody) {
|
|
3394
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3395
|
+
method: 'PUT',
|
|
3396
|
+
url: '/pods/{pod_id}',
|
|
3397
|
+
path: {
|
|
3398
|
+
'pod_id': podId,
|
|
3399
|
+
},
|
|
3400
|
+
body: requestBody,
|
|
3401
|
+
mediaType: 'application/json',
|
|
3402
|
+
errors: {
|
|
3403
|
+
422: `Validation Error`,
|
|
3404
|
+
},
|
|
3405
|
+
});
|
|
2587
3406
|
}
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
3407
|
+
/**
|
|
3408
|
+
* Delete Pod
|
|
3409
|
+
* Delete a pod
|
|
3410
|
+
* @param podId
|
|
3411
|
+
* @returns void
|
|
3412
|
+
* @throws ApiError
|
|
3413
|
+
*/
|
|
3414
|
+
static podDelete(podId) {
|
|
3415
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3416
|
+
method: 'DELETE',
|
|
3417
|
+
url: '/pods/{pod_id}',
|
|
3418
|
+
path: {
|
|
3419
|
+
'pod_id': podId,
|
|
3420
|
+
},
|
|
3421
|
+
errors: {
|
|
3422
|
+
422: `Validation Error`,
|
|
3423
|
+
},
|
|
3424
|
+
});
|
|
3425
|
+
}
|
|
3426
|
+
/**
|
|
3427
|
+
* List PodS by Organization
|
|
3428
|
+
* List all pods in an organization
|
|
3429
|
+
* @param organizationId
|
|
3430
|
+
* @param limit
|
|
3431
|
+
* @param pageToken
|
|
3432
|
+
* @returns PodListResponse Successful Response
|
|
3433
|
+
* @throws ApiError
|
|
3434
|
+
*/
|
|
3435
|
+
static podList(organizationId, limit = 100, pageToken) {
|
|
3436
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3437
|
+
method: 'GET',
|
|
3438
|
+
url: '/pods/organization/{organization_id}',
|
|
3439
|
+
path: {
|
|
3440
|
+
'organization_id': organizationId,
|
|
3441
|
+
},
|
|
3442
|
+
query: {
|
|
3443
|
+
'limit': limit,
|
|
3444
|
+
'page_token': pageToken,
|
|
3445
|
+
},
|
|
3446
|
+
errors: {
|
|
3447
|
+
422: `Validation Error`,
|
|
3448
|
+
},
|
|
3449
|
+
});
|
|
3450
|
+
}
|
|
3451
|
+
/**
|
|
3452
|
+
* Get Pod Config
|
|
3453
|
+
* Get pod configuration requirements (apps, flows) and user status
|
|
3454
|
+
* @param podId
|
|
3455
|
+
* @returns PodConfigResponse Successful Response
|
|
3456
|
+
* @throws ApiError
|
|
3457
|
+
*/
|
|
3458
|
+
static podConfigGet(podId) {
|
|
3459
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3460
|
+
method: 'GET',
|
|
3461
|
+
url: '/pods/{pod_id}/config',
|
|
3462
|
+
path: {
|
|
3463
|
+
'pod_id': podId,
|
|
3464
|
+
},
|
|
3465
|
+
errors: {
|
|
3466
|
+
422: `Validation Error`,
|
|
2593
3467
|
},
|
|
2594
3468
|
});
|
|
2595
3469
|
}
|
|
2596
3470
|
}
|
|
2597
|
-
exports.
|
|
3471
|
+
exports.PodsService = PodsService;
|
|
2598
3472
|
|
|
2599
3473
|
},
|
|
2600
|
-
"./namespaces/
|
|
3474
|
+
"./namespaces/pod-surfaces.js": function (module, exports, require) {
|
|
2601
3475
|
"use strict";
|
|
2602
3476
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2603
|
-
exports.
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
this.
|
|
3477
|
+
exports.PodSurfacesNamespace = void 0;
|
|
3478
|
+
const AssistantSurfacesService_js_1 = require("./openapi_client/services/AssistantSurfacesService.js");
|
|
3479
|
+
class PodSurfacesNamespace {
|
|
3480
|
+
constructor(client) {
|
|
3481
|
+
this.client = client;
|
|
2608
3482
|
}
|
|
2609
|
-
list(options = {}) {
|
|
2610
|
-
return this.
|
|
2611
|
-
params: {
|
|
2612
|
-
limit: options.limit ?? 100,
|
|
2613
|
-
page_token: options.pageToken ?? options.cursor,
|
|
2614
|
-
cursor: options.cursor,
|
|
2615
|
-
},
|
|
2616
|
-
});
|
|
3483
|
+
list(podId, options = {}) {
|
|
3484
|
+
return this.client.request(() => AssistantSurfacesService_js_1.AssistantSurfacesService.assistantSurfaceList(podId, options.limit ?? 100, options.pageToken ?? options.cursor));
|
|
2617
3485
|
}
|
|
2618
|
-
create(payload) {
|
|
2619
|
-
return this.
|
|
3486
|
+
create(podId, payload) {
|
|
3487
|
+
return this.client.request(() => AssistantSurfacesService_js_1.AssistantSurfacesService.assistantSurfaceCreate(podId, payload));
|
|
2620
3488
|
}
|
|
2621
|
-
get(
|
|
2622
|
-
return this.
|
|
3489
|
+
get(podId, surfaceId) {
|
|
3490
|
+
return this.client.request(() => AssistantSurfacesService_js_1.AssistantSurfacesService.assistantSurfaceGet(podId, surfaceId));
|
|
2623
3491
|
}
|
|
2624
|
-
|
|
2625
|
-
return this.
|
|
2626
|
-
body: payload,
|
|
2627
|
-
});
|
|
3492
|
+
updateConfig(podId, surfaceId, payload) {
|
|
3493
|
+
return this.client.request(() => AssistantSurfacesService_js_1.AssistantSurfacesService.assistantSurfaceUpdateConfig(podId, surfaceId, payload));
|
|
2628
3494
|
}
|
|
2629
|
-
|
|
2630
|
-
return this.
|
|
3495
|
+
toggle(podId, surfaceId, isActive) {
|
|
3496
|
+
return this.client.request(() => AssistantSurfacesService_js_1.AssistantSurfacesService.assistantSurfaceToggle(podId, surfaceId, { is_active: isActive }));
|
|
2631
3497
|
}
|
|
2632
3498
|
}
|
|
2633
|
-
exports.
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
return this.http.request("GET", "/conversations", {
|
|
2658
|
-
params: {
|
|
2659
|
-
assistant_id: options.assistantName ?? options.assistantId,
|
|
2660
|
-
pod_id: options.podId ?? this.podId(),
|
|
2661
|
-
organization_id: options.organizationId,
|
|
2662
|
-
limit: options.limit ?? 20,
|
|
2663
|
-
page_token: options.pageToken ?? options.cursor,
|
|
2664
|
-
cursor: options.cursor,
|
|
3499
|
+
exports.PodSurfacesNamespace = PodSurfacesNamespace;
|
|
3500
|
+
|
|
3501
|
+
},
|
|
3502
|
+
"./openapi_client/services/AssistantSurfacesService.js": function (module, exports, require) {
|
|
3503
|
+
"use strict";
|
|
3504
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3505
|
+
exports.AssistantSurfacesService = void 0;
|
|
3506
|
+
const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
|
|
3507
|
+
const request_js_1 = require("./openapi_client/core/request.js");
|
|
3508
|
+
class AssistantSurfacesService {
|
|
3509
|
+
/**
|
|
3510
|
+
* Create Surface
|
|
3511
|
+
* Create a new surface for an assistant.
|
|
3512
|
+
* @param podId
|
|
3513
|
+
* @param requestBody
|
|
3514
|
+
* @returns any Successful Response
|
|
3515
|
+
* @throws ApiError
|
|
3516
|
+
*/
|
|
3517
|
+
static assistantSurfaceCreate(podId, requestBody) {
|
|
3518
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3519
|
+
method: 'POST',
|
|
3520
|
+
url: '/pods/{pod_id}/surfaces',
|
|
3521
|
+
path: {
|
|
3522
|
+
'pod_id': podId,
|
|
2665
3523
|
},
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
}
|
|
2671
|
-
create(payload) {
|
|
2672
|
-
return this.http.request("POST", "/conversations", {
|
|
2673
|
-
body: {
|
|
2674
|
-
...payload,
|
|
2675
|
-
assistant_id: payload.assistant_id ?? payload.assistant_name,
|
|
2676
|
-
pod_id: payload.pod_id ?? this.podId(),
|
|
3524
|
+
body: requestBody,
|
|
3525
|
+
mediaType: 'application/json',
|
|
3526
|
+
errors: {
|
|
3527
|
+
422: `Validation Error`,
|
|
2677
3528
|
},
|
|
2678
3529
|
});
|
|
2679
3530
|
}
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
3531
|
+
/**
|
|
3532
|
+
* List Surfaces
|
|
3533
|
+
* List configured surfaces in a pod.
|
|
3534
|
+
* @param podId
|
|
3535
|
+
* @param limit
|
|
3536
|
+
* @param pageToken
|
|
3537
|
+
* @returns AssistantSurfaceListResponse Successful Response
|
|
3538
|
+
* @throws ApiError
|
|
3539
|
+
*/
|
|
3540
|
+
static assistantSurfaceList(podId, limit = 100, pageToken) {
|
|
3541
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3542
|
+
method: 'GET',
|
|
3543
|
+
url: '/pods/{pod_id}/surfaces',
|
|
3544
|
+
path: {
|
|
3545
|
+
'pod_id': podId,
|
|
2691
3546
|
},
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
3547
|
+
query: {
|
|
3548
|
+
'limit': limit,
|
|
3549
|
+
'page_token': pageToken,
|
|
3550
|
+
},
|
|
3551
|
+
errors: {
|
|
3552
|
+
422: `Validation Error`,
|
|
2698
3553
|
},
|
|
2699
|
-
body: payload,
|
|
2700
3554
|
});
|
|
2701
3555
|
}
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
3556
|
+
/**
|
|
3557
|
+
* Get Surface
|
|
3558
|
+
* Get a specific surface configuration.
|
|
3559
|
+
* @param podId
|
|
3560
|
+
* @param surfaceId
|
|
3561
|
+
* @returns any Successful Response
|
|
3562
|
+
* @throws ApiError
|
|
3563
|
+
*/
|
|
3564
|
+
static assistantSurfaceGet(podId, surfaceId) {
|
|
3565
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3566
|
+
method: 'GET',
|
|
3567
|
+
url: '/pods/{pod_id}/surfaces/{surface_id}',
|
|
3568
|
+
path: {
|
|
3569
|
+
'pod_id': podId,
|
|
3570
|
+
'surface_id': surfaceId,
|
|
2707
3571
|
},
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
headers: {
|
|
2711
|
-
"Content-Type": "application/json",
|
|
2712
|
-
Accept: "text/event-stream",
|
|
3572
|
+
errors: {
|
|
3573
|
+
422: `Validation Error`,
|
|
2713
3574
|
},
|
|
2714
3575
|
});
|
|
2715
3576
|
}
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
3577
|
+
/**
|
|
3578
|
+
* Update Surface
|
|
3579
|
+
* Update a surface configuration.
|
|
3580
|
+
* @param podId
|
|
3581
|
+
* @param surfaceId
|
|
3582
|
+
* @param requestBody
|
|
3583
|
+
* @returns any Successful Response
|
|
3584
|
+
* @throws ApiError
|
|
3585
|
+
*/
|
|
3586
|
+
static assistantSurfaceUpdateConfig(podId, surfaceId, requestBody) {
|
|
3587
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3588
|
+
method: 'PATCH',
|
|
3589
|
+
url: '/pods/{pod_id}/surfaces/{surface_id}/config',
|
|
3590
|
+
path: {
|
|
3591
|
+
'pod_id': podId,
|
|
3592
|
+
'surface_id': surfaceId,
|
|
2720
3593
|
},
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
3594
|
+
body: requestBody,
|
|
3595
|
+
mediaType: 'application/json',
|
|
3596
|
+
errors: {
|
|
3597
|
+
422: `Validation Error`,
|
|
2724
3598
|
},
|
|
2725
3599
|
});
|
|
2726
3600
|
}
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
3601
|
+
/**
|
|
3602
|
+
* Toggle Surface
|
|
3603
|
+
* Toggle a surface active state.
|
|
3604
|
+
* @param podId
|
|
3605
|
+
* @param surfaceId
|
|
3606
|
+
* @param requestBody
|
|
3607
|
+
* @returns any Successful Response
|
|
3608
|
+
* @throws ApiError
|
|
3609
|
+
*/
|
|
3610
|
+
static assistantSurfaceToggle(podId, surfaceId, requestBody) {
|
|
3611
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3612
|
+
method: 'PATCH',
|
|
3613
|
+
url: '/pods/{pod_id}/surfaces/{surface_id}/toggle',
|
|
3614
|
+
path: {
|
|
3615
|
+
'pod_id': podId,
|
|
3616
|
+
'surface_id': surfaceId,
|
|
3617
|
+
},
|
|
3618
|
+
body: requestBody,
|
|
3619
|
+
mediaType: 'application/json',
|
|
3620
|
+
errors: {
|
|
3621
|
+
422: `Validation Error`,
|
|
2731
3622
|
},
|
|
2732
|
-
body: {},
|
|
2733
3623
|
});
|
|
2734
3624
|
}
|
|
2735
3625
|
}
|
|
2736
|
-
exports.
|
|
3626
|
+
exports.AssistantSurfacesService = AssistantSurfacesService;
|
|
2737
3627
|
|
|
2738
3628
|
},
|
|
2739
|
-
"./namespaces/
|
|
3629
|
+
"./namespaces/records.js": function (module, exports, require) {
|
|
2740
3630
|
"use strict";
|
|
2741
3631
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2742
|
-
exports.
|
|
2743
|
-
const
|
|
2744
|
-
|
|
2745
|
-
|
|
3632
|
+
exports.RecordsNamespace = void 0;
|
|
3633
|
+
const RecordsService_js_1 = require("./openapi_client/services/RecordsService.js");
|
|
3634
|
+
function getRecordsPath(podId, datastore, table) {
|
|
3635
|
+
return `/pods/${encodeURIComponent(podId)}/datastores/${encodeURIComponent(datastore)}/tables/${encodeURIComponent(table)}/records`;
|
|
3636
|
+
}
|
|
3637
|
+
class RecordsNamespace {
|
|
3638
|
+
constructor(client, http, podId) {
|
|
2746
3639
|
this.client = client;
|
|
3640
|
+
this.http = http;
|
|
2747
3641
|
this.podId = podId;
|
|
2748
|
-
this.
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
3642
|
+
this.bulk = {
|
|
3643
|
+
create: (datastore, table, records) => {
|
|
3644
|
+
const payload = { records };
|
|
3645
|
+
return this.client.request(() => RecordsService_js_1.RecordsService.recordBulkCreate(this.podId(), datastore, table, payload));
|
|
3646
|
+
},
|
|
3647
|
+
update: (datastore, table, records) => {
|
|
3648
|
+
const payload = { records };
|
|
3649
|
+
return this.client.request(() => RecordsService_js_1.RecordsService.recordBulkUpdate(this.podId(), datastore, table, payload));
|
|
3650
|
+
},
|
|
3651
|
+
delete: (datastore, table, recordIds) => {
|
|
3652
|
+
const payload = { record_ids: recordIds };
|
|
3653
|
+
return this.client.request(() => RecordsService_js_1.RecordsService.recordBulkDelete(this.podId(), datastore, table, payload));
|
|
3654
|
+
},
|
|
2760
3655
|
};
|
|
2761
3656
|
}
|
|
2762
|
-
list(options = {}) {
|
|
2763
|
-
|
|
3657
|
+
list(datastore, table, options = {}) {
|
|
3658
|
+
const { filters, sort, limit, pageToken, offset, sortBy, order, params } = options;
|
|
3659
|
+
if (filters || sort) {
|
|
3660
|
+
const payload = {
|
|
3661
|
+
filters,
|
|
3662
|
+
sort,
|
|
3663
|
+
limit,
|
|
3664
|
+
page_token: pageToken,
|
|
3665
|
+
};
|
|
3666
|
+
return this.client.request(() => RecordsService_js_1.RecordsService.recordQuery(this.podId(), datastore, table, payload));
|
|
3667
|
+
}
|
|
3668
|
+
const hasCustomParams = typeof offset === "number" ||
|
|
3669
|
+
typeof sortBy === "string" ||
|
|
3670
|
+
typeof order === "string" ||
|
|
3671
|
+
!!params;
|
|
3672
|
+
if (hasCustomParams) {
|
|
3673
|
+
return this.http.request("GET", getRecordsPath(this.podId(), datastore, table), {
|
|
3674
|
+
params: {
|
|
3675
|
+
limit: limit ?? 20,
|
|
3676
|
+
page_token: pageToken,
|
|
3677
|
+
offset,
|
|
3678
|
+
sort_by: sortBy,
|
|
3679
|
+
order,
|
|
3680
|
+
...(params ?? {}),
|
|
3681
|
+
},
|
|
3682
|
+
});
|
|
3683
|
+
}
|
|
3684
|
+
return this.client.request(() => RecordsService_js_1.RecordsService.recordList(this.podId(), datastore, table, limit ?? 20, pageToken));
|
|
2764
3685
|
}
|
|
2765
|
-
|
|
2766
|
-
return this.
|
|
3686
|
+
listWithParams(datastore, table, params) {
|
|
3687
|
+
return this.http.request("GET", getRecordsPath(this.podId(), datastore, table), {
|
|
3688
|
+
params,
|
|
3689
|
+
});
|
|
2767
3690
|
}
|
|
2768
|
-
|
|
2769
|
-
return this.client.request(() =>
|
|
3691
|
+
create(datastore, table, data) {
|
|
3692
|
+
return this.client.request(() => RecordsService_js_1.RecordsService.recordCreate(this.podId(), datastore, table, { data }));
|
|
2770
3693
|
}
|
|
2771
|
-
|
|
2772
|
-
return this.client.request(() =>
|
|
3694
|
+
get(datastore, table, recordId) {
|
|
3695
|
+
return this.client.request(() => RecordsService_js_1.RecordsService.recordGet(this.podId(), datastore, table, recordId));
|
|
2773
3696
|
}
|
|
2774
|
-
|
|
2775
|
-
return this.client.request(() =>
|
|
3697
|
+
update(datastore, table, recordId, data) {
|
|
3698
|
+
return this.client.request(() => RecordsService_js_1.RecordsService.recordUpdate(this.podId(), datastore, table, recordId, { data }));
|
|
3699
|
+
}
|
|
3700
|
+
delete(datastore, table, recordId) {
|
|
3701
|
+
return this.client.request(() => RecordsService_js_1.RecordsService.recordDelete(this.podId(), datastore, table, recordId));
|
|
3702
|
+
}
|
|
3703
|
+
query(datastore, table, payload) {
|
|
3704
|
+
return this.client.request(() => RecordsService_js_1.RecordsService.recordQuery(this.podId(), datastore, table, payload));
|
|
2776
3705
|
}
|
|
2777
3706
|
}
|
|
2778
|
-
exports.
|
|
3707
|
+
exports.RecordsNamespace = RecordsNamespace;
|
|
2779
3708
|
|
|
2780
3709
|
},
|
|
2781
|
-
"./openapi_client/services/
|
|
3710
|
+
"./openapi_client/services/RecordsService.js": function (module, exports, require) {
|
|
2782
3711
|
"use strict";
|
|
2783
3712
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2784
|
-
exports.
|
|
3713
|
+
exports.RecordsService = void 0;
|
|
2785
3714
|
const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
|
|
2786
3715
|
const request_js_1 = require("./openapi_client/core/request.js");
|
|
2787
|
-
class
|
|
3716
|
+
class RecordsService {
|
|
2788
3717
|
/**
|
|
2789
|
-
* Create
|
|
2790
|
-
*
|
|
3718
|
+
* Create Record
|
|
3719
|
+
* Insert a record into a table. Reserved tables (`reserved_*`) are system-managed and cannot be mutated through record write endpoints.
|
|
2791
3720
|
* @param podId
|
|
3721
|
+
* @param datastoreName
|
|
3722
|
+
* @param tableName
|
|
2792
3723
|
* @param requestBody
|
|
2793
|
-
* @returns
|
|
3724
|
+
* @returns RecordResponse Successful Response
|
|
2794
3725
|
* @throws ApiError
|
|
2795
3726
|
*/
|
|
2796
|
-
static
|
|
3727
|
+
static recordCreate(podId, datastoreName, tableName, requestBody) {
|
|
2797
3728
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2798
3729
|
method: 'POST',
|
|
2799
|
-
url: '/pods/{pod_id}/
|
|
3730
|
+
url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/records',
|
|
2800
3731
|
path: {
|
|
2801
3732
|
'pod_id': podId,
|
|
3733
|
+
'datastore_name': datastoreName,
|
|
3734
|
+
'table_name': tableName,
|
|
2802
3735
|
},
|
|
2803
3736
|
body: requestBody,
|
|
2804
3737
|
mediaType: 'application/json',
|
|
@@ -2808,20 +3741,24 @@ class WorkflowsService {
|
|
|
2808
3741
|
});
|
|
2809
3742
|
}
|
|
2810
3743
|
/**
|
|
2811
|
-
* List
|
|
2812
|
-
* List
|
|
3744
|
+
* List Records
|
|
3745
|
+
* List table records with token pagination only. Use `record.query` when you need structured filters or explicit sort clauses.
|
|
2813
3746
|
* @param podId
|
|
2814
|
-
* @param
|
|
2815
|
-
* @param
|
|
2816
|
-
* @
|
|
3747
|
+
* @param datastoreName
|
|
3748
|
+
* @param tableName
|
|
3749
|
+
* @param limit Max number of rows to return.
|
|
3750
|
+
* @param pageToken Opaque token from a previous response page.
|
|
3751
|
+
* @returns RecordListResponse Successful Response
|
|
2817
3752
|
* @throws ApiError
|
|
2818
3753
|
*/
|
|
2819
|
-
static
|
|
3754
|
+
static recordList(podId, datastoreName, tableName, limit = 20, pageToken) {
|
|
2820
3755
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2821
3756
|
method: 'GET',
|
|
2822
|
-
url: '/pods/{pod_id}/
|
|
3757
|
+
url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/records',
|
|
2823
3758
|
path: {
|
|
2824
3759
|
'pod_id': podId,
|
|
3760
|
+
'datastore_name': datastoreName,
|
|
3761
|
+
'table_name': tableName,
|
|
2825
3762
|
},
|
|
2826
3763
|
query: {
|
|
2827
3764
|
'limit': limit,
|
|
@@ -2833,20 +3770,24 @@ class WorkflowsService {
|
|
|
2833
3770
|
});
|
|
2834
3771
|
}
|
|
2835
3772
|
/**
|
|
2836
|
-
* Get
|
|
2837
|
-
*
|
|
3773
|
+
* Get Record
|
|
3774
|
+
* Fetch one record by primary key value. The `record_id` path segment is the table's primary key value as stored in the table, not necessarily a UUID.
|
|
2838
3775
|
* @param podId
|
|
2839
|
-
* @param
|
|
2840
|
-
* @
|
|
3776
|
+
* @param datastoreName
|
|
3777
|
+
* @param tableName
|
|
3778
|
+
* @param recordId
|
|
3779
|
+
* @returns RecordResponse Successful Response
|
|
2841
3780
|
* @throws ApiError
|
|
2842
3781
|
*/
|
|
2843
|
-
static
|
|
3782
|
+
static recordGet(podId, datastoreName, tableName, recordId) {
|
|
2844
3783
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2845
3784
|
method: 'GET',
|
|
2846
|
-
url: '/pods/{pod_id}/
|
|
3785
|
+
url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/records/{record_id}',
|
|
2847
3786
|
path: {
|
|
2848
3787
|
'pod_id': podId,
|
|
2849
|
-
'
|
|
3788
|
+
'datastore_name': datastoreName,
|
|
3789
|
+
'table_name': tableName,
|
|
3790
|
+
'record_id': recordId,
|
|
2850
3791
|
},
|
|
2851
3792
|
errors: {
|
|
2852
3793
|
422: `Validation Error`,
|
|
@@ -2854,21 +3795,25 @@ class WorkflowsService {
|
|
|
2854
3795
|
});
|
|
2855
3796
|
}
|
|
2856
3797
|
/**
|
|
2857
|
-
* Update
|
|
2858
|
-
*
|
|
3798
|
+
* Update Record
|
|
3799
|
+
* Patch a record by primary key.
|
|
2859
3800
|
* @param podId
|
|
2860
|
-
* @param
|
|
3801
|
+
* @param datastoreName
|
|
3802
|
+
* @param tableName
|
|
3803
|
+
* @param recordId
|
|
2861
3804
|
* @param requestBody
|
|
2862
|
-
* @returns
|
|
3805
|
+
* @returns RecordResponse Successful Response
|
|
2863
3806
|
* @throws ApiError
|
|
2864
3807
|
*/
|
|
2865
|
-
static
|
|
3808
|
+
static recordUpdate(podId, datastoreName, tableName, recordId, requestBody) {
|
|
2866
3809
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2867
3810
|
method: 'PATCH',
|
|
2868
|
-
url: '/pods/{pod_id}/
|
|
3811
|
+
url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/records/{record_id}',
|
|
2869
3812
|
path: {
|
|
2870
3813
|
'pod_id': podId,
|
|
2871
|
-
'
|
|
3814
|
+
'datastore_name': datastoreName,
|
|
3815
|
+
'table_name': tableName,
|
|
3816
|
+
'record_id': recordId,
|
|
2872
3817
|
},
|
|
2873
3818
|
body: requestBody,
|
|
2874
3819
|
mediaType: 'application/json',
|
|
@@ -2878,66 +3823,48 @@ class WorkflowsService {
|
|
|
2878
3823
|
});
|
|
2879
3824
|
}
|
|
2880
3825
|
/**
|
|
2881
|
-
* Delete
|
|
2882
|
-
* Delete a
|
|
3826
|
+
* Delete Record
|
|
3827
|
+
* Delete a record by primary key.
|
|
2883
3828
|
* @param podId
|
|
2884
|
-
* @param
|
|
2885
|
-
* @
|
|
3829
|
+
* @param datastoreName
|
|
3830
|
+
* @param tableName
|
|
3831
|
+
* @param recordId
|
|
3832
|
+
* @returns DatastoreMessageResponse Successful Response
|
|
2886
3833
|
* @throws ApiError
|
|
2887
3834
|
*/
|
|
2888
|
-
static
|
|
3835
|
+
static recordDelete(podId, datastoreName, tableName, recordId) {
|
|
2889
3836
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2890
3837
|
method: 'DELETE',
|
|
2891
|
-
url: '/pods/{pod_id}/
|
|
2892
|
-
path: {
|
|
2893
|
-
'pod_id': podId,
|
|
2894
|
-
'workflow_name': workflowName,
|
|
2895
|
-
},
|
|
2896
|
-
errors: {
|
|
2897
|
-
422: `Validation Error`,
|
|
2898
|
-
},
|
|
2899
|
-
});
|
|
2900
|
-
}
|
|
2901
|
-
/**
|
|
2902
|
-
* Update Workflow Graph
|
|
2903
|
-
* Replace the workflow graph. Agent/function node `input_mapping` entries must use explicit typed bindings. Use `{type: "expression", value: "start.payload.issue.key"}` for context lookups and `{type: "literal", value: "abc"}` for fixed JSON values.
|
|
2904
|
-
* @param podId
|
|
2905
|
-
* @param workflowName
|
|
2906
|
-
* @param requestBody
|
|
2907
|
-
* @returns FlowEntity Successful Response
|
|
2908
|
-
* @throws ApiError
|
|
2909
|
-
*/
|
|
2910
|
-
static workflowGraphUpdate(podId, workflowName, requestBody) {
|
|
2911
|
-
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2912
|
-
method: 'PUT',
|
|
2913
|
-
url: '/pods/{pod_id}/workflows/{workflow_name}/graph',
|
|
3838
|
+
url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/records/{record_id}',
|
|
2914
3839
|
path: {
|
|
2915
3840
|
'pod_id': podId,
|
|
2916
|
-
'
|
|
3841
|
+
'datastore_name': datastoreName,
|
|
3842
|
+
'table_name': tableName,
|
|
3843
|
+
'record_id': recordId,
|
|
2917
3844
|
},
|
|
2918
|
-
body: requestBody,
|
|
2919
|
-
mediaType: 'application/json',
|
|
2920
3845
|
errors: {
|
|
2921
3846
|
422: `Validation Error`,
|
|
2922
3847
|
},
|
|
2923
3848
|
});
|
|
2924
3849
|
}
|
|
2925
3850
|
/**
|
|
2926
|
-
*
|
|
2927
|
-
*
|
|
3851
|
+
* Bulk Create
|
|
3852
|
+
* Insert multiple records in one request.
|
|
2928
3853
|
* @param podId
|
|
2929
|
-
* @param
|
|
3854
|
+
* @param datastoreName
|
|
3855
|
+
* @param tableName
|
|
2930
3856
|
* @param requestBody
|
|
2931
|
-
* @returns
|
|
3857
|
+
* @returns DatastoreMessageResponse Successful Response
|
|
2932
3858
|
* @throws ApiError
|
|
2933
3859
|
*/
|
|
2934
|
-
static
|
|
3860
|
+
static recordBulkCreate(podId, datastoreName, tableName, requestBody) {
|
|
2935
3861
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2936
3862
|
method: 'POST',
|
|
2937
|
-
url: '/pods/{pod_id}/
|
|
3863
|
+
url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/records/bulk/create',
|
|
2938
3864
|
path: {
|
|
2939
3865
|
'pod_id': podId,
|
|
2940
|
-
'
|
|
3866
|
+
'datastore_name': datastoreName,
|
|
3867
|
+
'table_name': tableName,
|
|
2941
3868
|
},
|
|
2942
3869
|
body: requestBody,
|
|
2943
3870
|
mediaType: 'application/json',
|
|
@@ -2947,44 +3874,23 @@ class WorkflowsService {
|
|
|
2947
3874
|
});
|
|
2948
3875
|
}
|
|
2949
3876
|
/**
|
|
2950
|
-
*
|
|
2951
|
-
*
|
|
2952
|
-
* @param podId
|
|
2953
|
-
* @param workflowName
|
|
2954
|
-
* @param installId
|
|
2955
|
-
* @returns void
|
|
2956
|
-
* @throws ApiError
|
|
2957
|
-
*/
|
|
2958
|
-
static workflowInstallDelete(podId, workflowName, installId) {
|
|
2959
|
-
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2960
|
-
method: 'DELETE',
|
|
2961
|
-
url: '/pods/{pod_id}/workflows/{workflow_name}/installs/{install_id}',
|
|
2962
|
-
path: {
|
|
2963
|
-
'pod_id': podId,
|
|
2964
|
-
'workflow_name': workflowName,
|
|
2965
|
-
'install_id': installId,
|
|
2966
|
-
},
|
|
2967
|
-
errors: {
|
|
2968
|
-
422: `Validation Error`,
|
|
2969
|
-
},
|
|
2970
|
-
});
|
|
2971
|
-
}
|
|
2972
|
-
/**
|
|
2973
|
-
* Start Workflow
|
|
2974
|
-
* Start a new workflow run. For event/scheduled/datastore starts, the request body is treated as initial trigger payload and merged into execution context.
|
|
3877
|
+
* Bulk Update
|
|
3878
|
+
* Update multiple records in one request (each item needs primary key).
|
|
2975
3879
|
* @param podId
|
|
2976
|
-
* @param
|
|
3880
|
+
* @param datastoreName
|
|
3881
|
+
* @param tableName
|
|
2977
3882
|
* @param requestBody
|
|
2978
|
-
* @returns
|
|
3883
|
+
* @returns DatastoreMessageResponse Successful Response
|
|
2979
3884
|
* @throws ApiError
|
|
2980
3885
|
*/
|
|
2981
|
-
static
|
|
3886
|
+
static recordBulkUpdate(podId, datastoreName, tableName, requestBody) {
|
|
2982
3887
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2983
3888
|
method: 'POST',
|
|
2984
|
-
url: '/pods/{pod_id}/
|
|
3889
|
+
url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/records/bulk/update',
|
|
2985
3890
|
path: {
|
|
2986
3891
|
'pod_id': podId,
|
|
2987
|
-
'
|
|
3892
|
+
'datastore_name': datastoreName,
|
|
3893
|
+
'table_name': tableName,
|
|
2988
3894
|
},
|
|
2989
3895
|
body: requestBody,
|
|
2990
3896
|
mediaType: 'application/json',
|
|
@@ -2994,42 +3900,23 @@ class WorkflowsService {
|
|
|
2994
3900
|
});
|
|
2995
3901
|
}
|
|
2996
3902
|
/**
|
|
2997
|
-
*
|
|
2998
|
-
*
|
|
2999
|
-
* @param podId
|
|
3000
|
-
* @param workflowName
|
|
3001
|
-
* @returns string Successful Response
|
|
3002
|
-
* @throws ApiError
|
|
3003
|
-
*/
|
|
3004
|
-
static workflowVisualize(podId, workflowName) {
|
|
3005
|
-
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3006
|
-
method: 'GET',
|
|
3007
|
-
url: '/pods/{pod_id}/workflows/{workflow_name}/visualize',
|
|
3008
|
-
path: {
|
|
3009
|
-
'pod_id': podId,
|
|
3010
|
-
'workflow_name': workflowName,
|
|
3011
|
-
},
|
|
3012
|
-
errors: {
|
|
3013
|
-
422: `Validation Error`,
|
|
3014
|
-
},
|
|
3015
|
-
});
|
|
3016
|
-
}
|
|
3017
|
-
/**
|
|
3018
|
-
* Resume Workflow Run
|
|
3019
|
-
* Resume a run in WAITING or EXECUTING state. The payload is written back into the current waiting node output and execution continues.
|
|
3903
|
+
* Bulk Delete
|
|
3904
|
+
* Delete multiple records by primary key values.
|
|
3020
3905
|
* @param podId
|
|
3021
|
-
* @param
|
|
3906
|
+
* @param datastoreName
|
|
3907
|
+
* @param tableName
|
|
3022
3908
|
* @param requestBody
|
|
3023
|
-
* @returns
|
|
3909
|
+
* @returns DatastoreMessageResponse Successful Response
|
|
3024
3910
|
* @throws ApiError
|
|
3025
3911
|
*/
|
|
3026
|
-
static
|
|
3912
|
+
static recordBulkDelete(podId, datastoreName, tableName, requestBody) {
|
|
3027
3913
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3028
3914
|
method: 'POST',
|
|
3029
|
-
url: '/pods/{pod_id}/
|
|
3915
|
+
url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/records/bulk/delete',
|
|
3030
3916
|
path: {
|
|
3031
3917
|
'pod_id': podId,
|
|
3032
|
-
'
|
|
3918
|
+
'datastore_name': datastoreName,
|
|
3919
|
+
'table_name': tableName,
|
|
3033
3920
|
},
|
|
3034
3921
|
body: requestBody,
|
|
3035
3922
|
mediaType: 'application/json',
|
|
@@ -3039,137 +3926,143 @@ class WorkflowsService {
|
|
|
3039
3926
|
});
|
|
3040
3927
|
}
|
|
3041
3928
|
/**
|
|
3042
|
-
*
|
|
3043
|
-
*
|
|
3044
|
-
* @param podId
|
|
3045
|
-
* @param runId
|
|
3046
|
-
* @returns FlowRunEntity Successful Response
|
|
3047
|
-
* @throws ApiError
|
|
3048
|
-
*/
|
|
3049
|
-
static workflowRunGet(podId, runId) {
|
|
3050
|
-
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3051
|
-
method: 'GET',
|
|
3052
|
-
url: '/pods/{pod_id}/workflow-runs/{run_id}',
|
|
3053
|
-
path: {
|
|
3054
|
-
'pod_id': podId,
|
|
3055
|
-
'run_id': runId,
|
|
3056
|
-
},
|
|
3057
|
-
errors: {
|
|
3058
|
-
422: `Validation Error`,
|
|
3059
|
-
},
|
|
3060
|
-
});
|
|
3061
|
-
}
|
|
3062
|
-
/**
|
|
3063
|
-
* List Workflow Runs
|
|
3064
|
-
* List recent runs for a given workflow.
|
|
3065
|
-
* @param podId
|
|
3066
|
-
* @param workflowName
|
|
3067
|
-
* @param limit
|
|
3068
|
-
* @param pageToken
|
|
3069
|
-
* @returns WorkflowRunListResponse Successful Response
|
|
3070
|
-
* @throws ApiError
|
|
3071
|
-
*/
|
|
3072
|
-
static workflowRunList(podId, workflowName, limit = 100, pageToken) {
|
|
3073
|
-
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3074
|
-
method: 'GET',
|
|
3075
|
-
url: '/pods/{pod_id}/workflow-runs/{workflow_name}/runs',
|
|
3076
|
-
path: {
|
|
3077
|
-
'pod_id': podId,
|
|
3078
|
-
'workflow_name': workflowName,
|
|
3079
|
-
},
|
|
3080
|
-
query: {
|
|
3081
|
-
'limit': limit,
|
|
3082
|
-
'page_token': pageToken,
|
|
3083
|
-
},
|
|
3084
|
-
errors: {
|
|
3085
|
-
422: `Validation Error`,
|
|
3086
|
-
},
|
|
3087
|
-
});
|
|
3088
|
-
}
|
|
3089
|
-
/**
|
|
3090
|
-
* Visualize Workflow Run
|
|
3091
|
-
* Render an HTML view of a run overlaid on its workflow graph.
|
|
3929
|
+
* Query Records
|
|
3930
|
+
* Query one table with structured filters and sorting. Use this instead of dynamic query parameters when you need filtering. Example filters: `[{"field": "status", "op": "eq", "value": "OPEN"}]`.
|
|
3092
3931
|
* @param podId
|
|
3093
|
-
* @param
|
|
3094
|
-
* @
|
|
3932
|
+
* @param datastoreName
|
|
3933
|
+
* @param tableName
|
|
3934
|
+
* @param requestBody
|
|
3935
|
+
* @returns RecordListResponse Successful Response
|
|
3095
3936
|
* @throws ApiError
|
|
3096
3937
|
*/
|
|
3097
|
-
static
|
|
3938
|
+
static recordQuery(podId, datastoreName, tableName, requestBody) {
|
|
3098
3939
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3099
|
-
method: '
|
|
3100
|
-
url: '/pods/{pod_id}/
|
|
3940
|
+
method: 'POST',
|
|
3941
|
+
url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/records/query',
|
|
3101
3942
|
path: {
|
|
3102
3943
|
'pod_id': podId,
|
|
3103
|
-
'
|
|
3944
|
+
'datastore_name': datastoreName,
|
|
3945
|
+
'table_name': tableName,
|
|
3104
3946
|
},
|
|
3947
|
+
body: requestBody,
|
|
3948
|
+
mediaType: 'application/json',
|
|
3105
3949
|
errors: {
|
|
3106
3950
|
422: `Validation Error`,
|
|
3107
3951
|
},
|
|
3108
3952
|
});
|
|
3109
3953
|
}
|
|
3110
3954
|
}
|
|
3111
|
-
exports.
|
|
3955
|
+
exports.RecordsService = RecordsService;
|
|
3112
3956
|
|
|
3113
3957
|
},
|
|
3114
|
-
"./namespaces/
|
|
3958
|
+
"./namespaces/resources.js": function (module, exports, require) {
|
|
3115
3959
|
"use strict";
|
|
3116
3960
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3117
|
-
exports.
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
constructor(client, http, podId) {
|
|
3121
|
-
this.client = client;
|
|
3961
|
+
exports.ResourcesNamespace = void 0;
|
|
3962
|
+
class ResourcesNamespace {
|
|
3963
|
+
constructor(http) {
|
|
3122
3964
|
this.http = http;
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3965
|
+
}
|
|
3966
|
+
list(resourceType, resourceId, options = {}) {
|
|
3967
|
+
return this.http.request("GET", `/files/${resourceType}/${resourceId}/list`, {
|
|
3968
|
+
params: {
|
|
3969
|
+
path: options.path,
|
|
3970
|
+
limit: options.limit ?? 100,
|
|
3971
|
+
page_token: options.page_token,
|
|
3972
|
+
},
|
|
3973
|
+
});
|
|
3974
|
+
}
|
|
3975
|
+
upload(resourceType, resourceId, file, options = {}) {
|
|
3976
|
+
const formData = new FormData();
|
|
3977
|
+
const name = options.name ?? (file instanceof File ? file.name : "upload.bin");
|
|
3978
|
+
formData.append("file", file, name);
|
|
3979
|
+
return this.http.request("POST", `/files/${resourceType}/${resourceId}/upload`, {
|
|
3980
|
+
params: {
|
|
3981
|
+
path: options.path,
|
|
3982
|
+
},
|
|
3983
|
+
body: formData,
|
|
3984
|
+
isFormData: true,
|
|
3985
|
+
});
|
|
3986
|
+
}
|
|
3987
|
+
delete(resourceType, resourceId, filePath) {
|
|
3988
|
+
return this.http.request("DELETE", `/files/${resourceType}/${resourceId}/delete/${filePath}`);
|
|
3989
|
+
}
|
|
3990
|
+
download(resourceType, resourceId, filePath) {
|
|
3991
|
+
return this.http.requestBytes("GET", `/files/${resourceType}/${resourceId}/download/${filePath}`);
|
|
3992
|
+
}
|
|
3993
|
+
}
|
|
3994
|
+
exports.ResourcesNamespace = ResourcesNamespace;
|
|
3995
|
+
|
|
3996
|
+
},
|
|
3997
|
+
"./namespaces/tables.js": function (module, exports, require) {
|
|
3998
|
+
"use strict";
|
|
3999
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4000
|
+
exports.TablesNamespace = void 0;
|
|
4001
|
+
const TablesService_js_1 = require("./openapi_client/services/TablesService.js");
|
|
4002
|
+
function normalizeCreateTablePayload(payload) {
|
|
4003
|
+
if ("table_name" in payload) {
|
|
4004
|
+
const { table_name, name, ...rest } = payload;
|
|
4005
|
+
return {
|
|
4006
|
+
...rest,
|
|
4007
|
+
name: name ?? table_name,
|
|
3129
4008
|
};
|
|
3130
|
-
|
|
3131
|
-
|
|
4009
|
+
}
|
|
4010
|
+
return payload;
|
|
4011
|
+
}
|
|
4012
|
+
class TablesNamespace {
|
|
4013
|
+
constructor(client, podId) {
|
|
4014
|
+
this.client = client;
|
|
4015
|
+
this.podId = podId;
|
|
4016
|
+
this.columns = {
|
|
4017
|
+
add: (datastore, tableName, request) => {
|
|
4018
|
+
const payload = "column" in request ? request : { column: request };
|
|
4019
|
+
return this.client.request(() => TablesService_js_1.TablesService.tableColumnAdd(this.podId(), datastore, tableName, payload));
|
|
4020
|
+
},
|
|
4021
|
+
remove: (datastore, tableName, columnName) => this.client.request(() => TablesService_js_1.TablesService.tableColumnRemove(this.podId(), datastore, tableName, columnName)),
|
|
3132
4022
|
};
|
|
3133
4023
|
}
|
|
3134
|
-
list(options = {}) {
|
|
3135
|
-
return this.client.request(() =>
|
|
4024
|
+
list(datastore, options = {}) {
|
|
4025
|
+
return this.client.request(() => TablesService_js_1.TablesService.tableList(this.podId(), datastore, options.limit ?? 100, options.pageToken));
|
|
3136
4026
|
}
|
|
3137
|
-
create(payload) {
|
|
3138
|
-
return this.client.request(() =>
|
|
4027
|
+
create(datastore, payload) {
|
|
4028
|
+
return this.client.request(() => TablesService_js_1.TablesService.tableCreate(this.podId(), datastore, normalizeCreateTablePayload(payload)));
|
|
3139
4029
|
}
|
|
3140
|
-
get(
|
|
3141
|
-
return this.client.request(() =>
|
|
4030
|
+
get(datastore, tableName) {
|
|
4031
|
+
return this.client.request(() => TablesService_js_1.TablesService.tableGet(this.podId(), datastore, tableName));
|
|
3142
4032
|
}
|
|
3143
|
-
update(
|
|
3144
|
-
return this.client.request(() =>
|
|
4033
|
+
update(datastore, tableName, payload) {
|
|
4034
|
+
return this.client.request(() => TablesService_js_1.TablesService.tableUpdate(this.podId(), datastore, tableName, payload));
|
|
3145
4035
|
}
|
|
3146
|
-
delete(
|
|
3147
|
-
return this.client.request(() =>
|
|
4036
|
+
delete(datastore, tableName) {
|
|
4037
|
+
return this.client.request(() => TablesService_js_1.TablesService.tableDelete(this.podId(), datastore, tableName));
|
|
3148
4038
|
}
|
|
3149
4039
|
}
|
|
3150
|
-
exports.
|
|
4040
|
+
exports.TablesNamespace = TablesNamespace;
|
|
3151
4041
|
|
|
3152
4042
|
},
|
|
3153
|
-
"./openapi_client/services/
|
|
4043
|
+
"./openapi_client/services/TablesService.js": function (module, exports, require) {
|
|
3154
4044
|
"use strict";
|
|
3155
4045
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3156
|
-
exports.
|
|
4046
|
+
exports.TablesService = void 0;
|
|
3157
4047
|
const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
|
|
3158
4048
|
const request_js_1 = require("./openapi_client/core/request.js");
|
|
3159
|
-
class
|
|
4049
|
+
class TablesService {
|
|
3160
4050
|
/**
|
|
3161
|
-
* Create
|
|
4051
|
+
* Create Table
|
|
4052
|
+
* Create a table in a datastore. Define primary key, column schema, and optional RLS behavior.
|
|
3162
4053
|
* @param podId
|
|
4054
|
+
* @param datastoreName
|
|
3163
4055
|
* @param requestBody
|
|
3164
|
-
* @returns
|
|
4056
|
+
* @returns TableResponse Successful Response
|
|
3165
4057
|
* @throws ApiError
|
|
3166
4058
|
*/
|
|
3167
|
-
static
|
|
4059
|
+
static tableCreate(podId, datastoreName, requestBody) {
|
|
3168
4060
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3169
4061
|
method: 'POST',
|
|
3170
|
-
url: '/pods/{pod_id}/
|
|
4062
|
+
url: '/pods/{pod_id}/datastores/{datastore_name}/tables',
|
|
3171
4063
|
path: {
|
|
3172
4064
|
'pod_id': podId,
|
|
4065
|
+
'datastore_name': datastoreName,
|
|
3173
4066
|
},
|
|
3174
4067
|
body: requestBody,
|
|
3175
4068
|
mediaType: 'application/json',
|
|
@@ -3179,19 +4072,22 @@ class DesksService {
|
|
|
3179
4072
|
});
|
|
3180
4073
|
}
|
|
3181
4074
|
/**
|
|
3182
|
-
* List
|
|
4075
|
+
* List Tables
|
|
4076
|
+
* List tables in a datastore.
|
|
3183
4077
|
* @param podId
|
|
3184
|
-
* @param
|
|
3185
|
-
* @param
|
|
3186
|
-
* @
|
|
4078
|
+
* @param datastoreName
|
|
4079
|
+
* @param limit Max number of tables to return.
|
|
4080
|
+
* @param pageToken Cursor from a previous response for pagination.
|
|
4081
|
+
* @returns TableListResponse Successful Response
|
|
3187
4082
|
* @throws ApiError
|
|
3188
4083
|
*/
|
|
3189
|
-
static
|
|
4084
|
+
static tableList(podId, datastoreName, limit = 100, pageToken) {
|
|
3190
4085
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3191
4086
|
method: 'GET',
|
|
3192
|
-
url: '/pods/{pod_id}/
|
|
4087
|
+
url: '/pods/{pod_id}/datastores/{datastore_name}/tables',
|
|
3193
4088
|
path: {
|
|
3194
4089
|
'pod_id': podId,
|
|
4090
|
+
'datastore_name': datastoreName,
|
|
3195
4091
|
},
|
|
3196
4092
|
query: {
|
|
3197
4093
|
'limit': limit,
|
|
@@ -3203,19 +4099,22 @@ class DesksService {
|
|
|
3203
4099
|
});
|
|
3204
4100
|
}
|
|
3205
4101
|
/**
|
|
3206
|
-
* Get
|
|
4102
|
+
* Get Table
|
|
4103
|
+
* Get table schema metadata by table name.
|
|
3207
4104
|
* @param podId
|
|
3208
|
-
* @param
|
|
3209
|
-
* @
|
|
4105
|
+
* @param datastoreName
|
|
4106
|
+
* @param tableName
|
|
4107
|
+
* @returns TableResponse Successful Response
|
|
3210
4108
|
* @throws ApiError
|
|
3211
4109
|
*/
|
|
3212
|
-
static
|
|
4110
|
+
static tableGet(podId, datastoreName, tableName) {
|
|
3213
4111
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3214
4112
|
method: 'GET',
|
|
3215
|
-
url: '/pods/{pod_id}/
|
|
4113
|
+
url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}',
|
|
3216
4114
|
path: {
|
|
3217
4115
|
'pod_id': podId,
|
|
3218
|
-
'
|
|
4116
|
+
'datastore_name': datastoreName,
|
|
4117
|
+
'table_name': tableName,
|
|
3219
4118
|
},
|
|
3220
4119
|
errors: {
|
|
3221
4120
|
422: `Validation Error`,
|
|
@@ -3223,20 +4122,46 @@ class DesksService {
|
|
|
3223
4122
|
});
|
|
3224
4123
|
}
|
|
3225
4124
|
/**
|
|
3226
|
-
*
|
|
4125
|
+
* Delete Table
|
|
4126
|
+
* Delete a table and all records in it.
|
|
3227
4127
|
* @param podId
|
|
3228
|
-
* @param
|
|
4128
|
+
* @param datastoreName
|
|
4129
|
+
* @param tableName
|
|
4130
|
+
* @returns DatastoreMessageResponse Successful Response
|
|
4131
|
+
* @throws ApiError
|
|
4132
|
+
*/
|
|
4133
|
+
static tableDelete(podId, datastoreName, tableName) {
|
|
4134
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
4135
|
+
method: 'DELETE',
|
|
4136
|
+
url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}',
|
|
4137
|
+
path: {
|
|
4138
|
+
'pod_id': podId,
|
|
4139
|
+
'datastore_name': datastoreName,
|
|
4140
|
+
'table_name': tableName,
|
|
4141
|
+
},
|
|
4142
|
+
errors: {
|
|
4143
|
+
422: `Validation Error`,
|
|
4144
|
+
},
|
|
4145
|
+
});
|
|
4146
|
+
}
|
|
4147
|
+
/**
|
|
4148
|
+
* Update Table
|
|
4149
|
+
* Update table metadata/configuration payload.
|
|
4150
|
+
* @param podId
|
|
4151
|
+
* @param datastoreName
|
|
4152
|
+
* @param tableName
|
|
3229
4153
|
* @param requestBody
|
|
3230
|
-
* @returns
|
|
4154
|
+
* @returns TableResponse Successful Response
|
|
3231
4155
|
* @throws ApiError
|
|
3232
4156
|
*/
|
|
3233
|
-
static
|
|
4157
|
+
static tableUpdate(podId, datastoreName, tableName, requestBody) {
|
|
3234
4158
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3235
4159
|
method: 'PATCH',
|
|
3236
|
-
url: '/pods/{pod_id}/
|
|
4160
|
+
url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}',
|
|
3237
4161
|
path: {
|
|
3238
4162
|
'pod_id': podId,
|
|
3239
|
-
'
|
|
4163
|
+
'datastore_name': datastoreName,
|
|
4164
|
+
'table_name': tableName,
|
|
3240
4165
|
},
|
|
3241
4166
|
body: requestBody,
|
|
3242
4167
|
mediaType: 'application/json',
|
|
@@ -3246,180 +4171,298 @@ class DesksService {
|
|
|
3246
4171
|
});
|
|
3247
4172
|
}
|
|
3248
4173
|
/**
|
|
3249
|
-
*
|
|
4174
|
+
* Add Column
|
|
4175
|
+
* Add a new column to a table. Column names must be unique and compatible with existing table schema rules.
|
|
3250
4176
|
* @param podId
|
|
3251
|
-
* @param
|
|
3252
|
-
* @
|
|
4177
|
+
* @param datastoreName
|
|
4178
|
+
* @param tableName
|
|
4179
|
+
* @param requestBody
|
|
4180
|
+
* @returns TableResponse Successful Response
|
|
3253
4181
|
* @throws ApiError
|
|
3254
4182
|
*/
|
|
3255
|
-
static
|
|
4183
|
+
static tableColumnAdd(podId, datastoreName, tableName, requestBody) {
|
|
4184
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
4185
|
+
method: 'POST',
|
|
4186
|
+
url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/columns',
|
|
4187
|
+
path: {
|
|
4188
|
+
'pod_id': podId,
|
|
4189
|
+
'datastore_name': datastoreName,
|
|
4190
|
+
'table_name': tableName,
|
|
4191
|
+
},
|
|
4192
|
+
body: requestBody,
|
|
4193
|
+
mediaType: 'application/json',
|
|
4194
|
+
errors: {
|
|
4195
|
+
422: `Validation Error`,
|
|
4196
|
+
},
|
|
4197
|
+
});
|
|
4198
|
+
}
|
|
4199
|
+
/**
|
|
4200
|
+
* Remove Column
|
|
4201
|
+
* Remove a non-primary, non-system column from a table. System columns and the primary key cannot be removed.
|
|
4202
|
+
* @param podId
|
|
4203
|
+
* @param datastoreName
|
|
4204
|
+
* @param tableName
|
|
4205
|
+
* @param columnName
|
|
4206
|
+
* @returns DatastoreMessageResponse Successful Response
|
|
4207
|
+
* @throws ApiError
|
|
4208
|
+
*/
|
|
4209
|
+
static tableColumnRemove(podId, datastoreName, tableName, columnName) {
|
|
3256
4210
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3257
4211
|
method: 'DELETE',
|
|
3258
|
-
url: '/pods/{pod_id}/
|
|
4212
|
+
url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/columns/{column_name}',
|
|
3259
4213
|
path: {
|
|
3260
4214
|
'pod_id': podId,
|
|
3261
|
-
'
|
|
4215
|
+
'datastore_name': datastoreName,
|
|
4216
|
+
'table_name': tableName,
|
|
4217
|
+
'column_name': columnName,
|
|
4218
|
+
},
|
|
4219
|
+
errors: {
|
|
4220
|
+
422: `Validation Error`,
|
|
4221
|
+
},
|
|
4222
|
+
});
|
|
4223
|
+
}
|
|
4224
|
+
}
|
|
4225
|
+
exports.TablesService = TablesService;
|
|
4226
|
+
|
|
4227
|
+
},
|
|
4228
|
+
"./namespaces/tasks.js": function (module, exports, require) {
|
|
4229
|
+
"use strict";
|
|
4230
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4231
|
+
exports.TasksNamespace = void 0;
|
|
4232
|
+
class TasksNamespace {
|
|
4233
|
+
constructor(http, podId) {
|
|
4234
|
+
this.http = http;
|
|
4235
|
+
this.podId = podId;
|
|
4236
|
+
this.messages = {
|
|
4237
|
+
list: (taskId, options = {}) => this.http.request("GET", `/pods/${this.podId()}/tasks/${taskId}/messages`, {
|
|
4238
|
+
params: {
|
|
4239
|
+
limit: options.limit ?? 100,
|
|
4240
|
+
page_token: options.page_token,
|
|
4241
|
+
},
|
|
4242
|
+
}),
|
|
4243
|
+
add: (taskId, payload) => {
|
|
4244
|
+
return this.http.request("POST", `/pods/${this.podId()}/tasks/${taskId}/messages`, {
|
|
4245
|
+
body: payload,
|
|
4246
|
+
});
|
|
4247
|
+
},
|
|
4248
|
+
};
|
|
4249
|
+
}
|
|
4250
|
+
list(options = {}) {
|
|
4251
|
+
return this.http.request("GET", `/pods/${this.podId()}/tasks`, {
|
|
4252
|
+
params: {
|
|
4253
|
+
agent_name: options.agent_name,
|
|
4254
|
+
limit: options.limit ?? 100,
|
|
4255
|
+
page_token: options.page_token,
|
|
3262
4256
|
},
|
|
3263
|
-
|
|
3264
|
-
|
|
4257
|
+
});
|
|
4258
|
+
}
|
|
4259
|
+
create(payload) {
|
|
4260
|
+
return this.http.request("POST", `/pods/${this.podId()}/tasks`, {
|
|
4261
|
+
body: payload,
|
|
4262
|
+
});
|
|
4263
|
+
}
|
|
4264
|
+
get(taskId) {
|
|
4265
|
+
return this.http.request("GET", `/pods/${this.podId()}/tasks/${taskId}`);
|
|
4266
|
+
}
|
|
4267
|
+
stop(taskId) {
|
|
4268
|
+
return this.http.request("PATCH", `/pods/${this.podId()}/tasks/${taskId}/stop`);
|
|
4269
|
+
}
|
|
4270
|
+
stream(taskId, options = {}) {
|
|
4271
|
+
return this.http.stream(`/pods/${this.podId()}/tasks/${taskId}/stream`, {
|
|
4272
|
+
signal: options.signal,
|
|
4273
|
+
headers: {
|
|
4274
|
+
Accept: "text/event-stream",
|
|
3265
4275
|
},
|
|
3266
4276
|
});
|
|
3267
4277
|
}
|
|
4278
|
+
}
|
|
4279
|
+
exports.TasksNamespace = TasksNamespace;
|
|
4280
|
+
|
|
4281
|
+
},
|
|
4282
|
+
"./namespaces/users.js": function (module, exports, require) {
|
|
4283
|
+
"use strict";
|
|
4284
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4285
|
+
exports.UsersNamespace = void 0;
|
|
4286
|
+
const UsersService_js_1 = require("./openapi_client/services/UsersService.js");
|
|
4287
|
+
class UsersNamespace {
|
|
4288
|
+
constructor(client) {
|
|
4289
|
+
this.client = client;
|
|
4290
|
+
}
|
|
4291
|
+
current() {
|
|
4292
|
+
return this.client.request(() => UsersService_js_1.UsersService.userCurrentGet());
|
|
4293
|
+
}
|
|
4294
|
+
getProfile() {
|
|
4295
|
+
return this.client.request(() => UsersService_js_1.UsersService.userProfileGet());
|
|
4296
|
+
}
|
|
4297
|
+
upsertProfile(payload) {
|
|
4298
|
+
return this.client.request(() => UsersService_js_1.UsersService.userProfileUpsert(payload));
|
|
4299
|
+
}
|
|
4300
|
+
}
|
|
4301
|
+
exports.UsersNamespace = UsersNamespace;
|
|
4302
|
+
|
|
4303
|
+
},
|
|
4304
|
+
"./openapi_client/services/UsersService.js": function (module, exports, require) {
|
|
4305
|
+
"use strict";
|
|
4306
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4307
|
+
exports.UsersService = void 0;
|
|
4308
|
+
const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
|
|
4309
|
+
const request_js_1 = require("./openapi_client/core/request.js");
|
|
4310
|
+
class UsersService {
|
|
3268
4311
|
/**
|
|
3269
|
-
*
|
|
3270
|
-
*
|
|
3271
|
-
* @
|
|
3272
|
-
* @param formData
|
|
3273
|
-
* @returns DeskBundleUploadResponse Successful Response
|
|
4312
|
+
* Get Current User
|
|
4313
|
+
* Get the current authenticated user's information
|
|
4314
|
+
* @returns UserResponse Successful Response
|
|
3274
4315
|
* @throws ApiError
|
|
3275
4316
|
*/
|
|
3276
|
-
static
|
|
4317
|
+
static userCurrentGet() {
|
|
3277
4318
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3278
|
-
method: '
|
|
3279
|
-
url: '/
|
|
3280
|
-
path: {
|
|
3281
|
-
'pod_id': podId,
|
|
3282
|
-
'desk_name': deskName,
|
|
3283
|
-
},
|
|
3284
|
-
formData: formData,
|
|
3285
|
-
mediaType: 'multipart/form-data',
|
|
3286
|
-
errors: {
|
|
3287
|
-
422: `Validation Error`,
|
|
3288
|
-
},
|
|
4319
|
+
method: 'GET',
|
|
4320
|
+
url: '/users/me',
|
|
3289
4321
|
});
|
|
3290
4322
|
}
|
|
3291
4323
|
/**
|
|
3292
|
-
* Get
|
|
3293
|
-
*
|
|
3294
|
-
* @
|
|
3295
|
-
* @returns any Successful Response
|
|
4324
|
+
* Get User Profile
|
|
4325
|
+
* Get the current user's profile
|
|
4326
|
+
* @returns UserResponse Successful Response
|
|
3296
4327
|
* @throws ApiError
|
|
3297
4328
|
*/
|
|
3298
|
-
static
|
|
4329
|
+
static userProfileGet() {
|
|
3299
4330
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3300
4331
|
method: 'GET',
|
|
3301
|
-
url: '/
|
|
3302
|
-
path: {
|
|
3303
|
-
'pod_id': podId,
|
|
3304
|
-
'desk_name': deskName,
|
|
3305
|
-
},
|
|
3306
|
-
errors: {
|
|
3307
|
-
422: `Validation Error`,
|
|
3308
|
-
},
|
|
4332
|
+
url: '/users/me/profile',
|
|
3309
4333
|
});
|
|
3310
4334
|
}
|
|
3311
4335
|
/**
|
|
3312
|
-
*
|
|
3313
|
-
*
|
|
3314
|
-
* @param
|
|
3315
|
-
* @returns
|
|
4336
|
+
* Create or Update Profile
|
|
4337
|
+
* Create or update the current user's profile
|
|
4338
|
+
* @param requestBody
|
|
4339
|
+
* @returns UserResponse Successful Response
|
|
3316
4340
|
* @throws ApiError
|
|
3317
4341
|
*/
|
|
3318
|
-
static
|
|
4342
|
+
static userProfileUpsert(requestBody) {
|
|
3319
4343
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3320
|
-
method: '
|
|
3321
|
-
url: '/
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
'desk_name': deskName,
|
|
3325
|
-
},
|
|
4344
|
+
method: 'POST',
|
|
4345
|
+
url: '/users/me/profile',
|
|
4346
|
+
body: requestBody,
|
|
4347
|
+
mediaType: 'application/json',
|
|
3326
4348
|
errors: {
|
|
3327
4349
|
422: `Validation Error`,
|
|
3328
4350
|
},
|
|
3329
4351
|
});
|
|
3330
4352
|
}
|
|
3331
4353
|
}
|
|
3332
|
-
exports.
|
|
4354
|
+
exports.UsersService = UsersService;
|
|
3333
4355
|
|
|
3334
4356
|
},
|
|
3335
|
-
"./namespaces/
|
|
4357
|
+
"./namespaces/workflows.js": function (module, exports, require) {
|
|
3336
4358
|
"use strict";
|
|
3337
4359
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3338
|
-
exports.
|
|
3339
|
-
const
|
|
3340
|
-
const
|
|
3341
|
-
class
|
|
3342
|
-
constructor(client) {
|
|
4360
|
+
exports.WorkflowsNamespace = void 0;
|
|
4361
|
+
const http_js_1 = require("./http.js");
|
|
4362
|
+
const WorkflowsService_js_1 = require("./openapi_client/services/WorkflowsService.js");
|
|
4363
|
+
class WorkflowsNamespace {
|
|
4364
|
+
constructor(client, http, podId) {
|
|
3343
4365
|
this.client = client;
|
|
3344
|
-
this.
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
const body = { payload, account_id: accountId };
|
|
3349
|
-
return this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationOperationExecute(applicationId, operationName, body));
|
|
3350
|
-
},
|
|
3351
|
-
descriptor: (applicationId) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationDescriptor(applicationId)),
|
|
4366
|
+
this.http = http;
|
|
4367
|
+
this.podId = podId;
|
|
4368
|
+
this.graph = {
|
|
4369
|
+
update: (workflowName, graph) => this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowGraphUpdate(this.podId(), workflowName, graph)),
|
|
3352
4370
|
};
|
|
3353
|
-
this.
|
|
3354
|
-
|
|
3355
|
-
|
|
4371
|
+
this.installs = {
|
|
4372
|
+
create: (workflowName, payload = {}) => this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowInstallCreate(this.podId(), workflowName, payload)),
|
|
4373
|
+
delete: (workflowName, installId) => this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowInstallDelete(this.podId(), workflowName, installId)),
|
|
3356
4374
|
};
|
|
3357
|
-
this.
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
4375
|
+
this.runs = {
|
|
4376
|
+
start: (workflowName, inputs = {}) => this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowStart(this.podId(), workflowName, inputs)),
|
|
4377
|
+
list: (workflowName, options = {}) => this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowRunList(this.podId(), workflowName, options.limit ?? 100, options.pageToken)),
|
|
4378
|
+
get: (runId, podId = this.podId()) => this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowRunGet(podId, runId)),
|
|
4379
|
+
resume: (runId, inputs = {}, podId = this.podId()) => this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowRunResume(podId, runId, inputs)),
|
|
4380
|
+
visualize: (runId, podId = this.podId()) => this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowRunVisualize(podId, runId)),
|
|
4381
|
+
cancel: (runId, podId = this.podId()) => this.postRunAction(runId, "cancel", podId),
|
|
4382
|
+
retry: (runId, podId = this.podId()) => this.postRunAction(runId, "retry", podId),
|
|
3362
4383
|
};
|
|
3363
4384
|
}
|
|
3364
4385
|
list(options = {}) {
|
|
3365
|
-
return this.client.request(() =>
|
|
4386
|
+
return this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowList(this.podId(), options.limit ?? 100, options.pageToken));
|
|
3366
4387
|
}
|
|
3367
|
-
|
|
3368
|
-
return this.client.request(() =>
|
|
4388
|
+
create(payload) {
|
|
4389
|
+
return this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowCreate(this.podId(), payload));
|
|
3369
4390
|
}
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
4391
|
+
get(workflowName) {
|
|
4392
|
+
return this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowGet(this.podId(), workflowName));
|
|
4393
|
+
}
|
|
4394
|
+
update(workflowName, payload) {
|
|
4395
|
+
return this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowUpdate(this.podId(), workflowName, payload));
|
|
4396
|
+
}
|
|
4397
|
+
delete(workflowName) {
|
|
4398
|
+
return this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowDelete(this.podId(), workflowName));
|
|
4399
|
+
}
|
|
4400
|
+
visualize(workflowName) {
|
|
4401
|
+
return this.client.request(() => WorkflowsService_js_1.WorkflowsService.workflowVisualize(this.podId(), workflowName));
|
|
4402
|
+
}
|
|
4403
|
+
async postRunAction(runId, action, podId) {
|
|
4404
|
+
const encodedPodId = encodeURIComponent(podId);
|
|
4405
|
+
const encodedRunId = encodeURIComponent(runId);
|
|
4406
|
+
try {
|
|
4407
|
+
return await this.http.request("POST", `/pods/${encodedPodId}/workflow-runs/${encodedRunId}/${action}`, { body: {} });
|
|
4408
|
+
}
|
|
4409
|
+
catch (error) {
|
|
4410
|
+
if (error instanceof http_js_1.ApiError && (error.statusCode === 404 || error.statusCode === 405)) {
|
|
4411
|
+
return this.http.request("POST", `/pods/${encodedPodId}/flow-runs/${encodedRunId}/${action}`, { body: {} });
|
|
4412
|
+
}
|
|
4413
|
+
throw error;
|
|
4414
|
+
}
|
|
3373
4415
|
}
|
|
3374
4416
|
}
|
|
3375
|
-
exports.
|
|
4417
|
+
exports.WorkflowsNamespace = WorkflowsNamespace;
|
|
3376
4418
|
|
|
3377
4419
|
},
|
|
3378
|
-
"./openapi_client/services/
|
|
4420
|
+
"./openapi_client/services/WorkflowsService.js": function (module, exports, require) {
|
|
3379
4421
|
"use strict";
|
|
3380
4422
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3381
|
-
exports.
|
|
4423
|
+
exports.WorkflowsService = void 0;
|
|
3382
4424
|
const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
|
|
3383
4425
|
const request_js_1 = require("./openapi_client/core/request.js");
|
|
3384
|
-
class
|
|
4426
|
+
class WorkflowsService {
|
|
3385
4427
|
/**
|
|
3386
|
-
*
|
|
3387
|
-
*
|
|
3388
|
-
* @param
|
|
3389
|
-
* @param
|
|
3390
|
-
* @returns
|
|
4428
|
+
* Create Workflow
|
|
4429
|
+
* Create a workflow definition. Use this before uploading graph nodes/edges with `workflow.graph.update`.
|
|
4430
|
+
* @param podId
|
|
4431
|
+
* @param requestBody
|
|
4432
|
+
* @returns FlowEntity Successful Response
|
|
3391
4433
|
* @throws ApiError
|
|
3392
4434
|
*/
|
|
3393
|
-
static
|
|
4435
|
+
static workflowCreate(podId, requestBody) {
|
|
3394
4436
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3395
|
-
method: '
|
|
3396
|
-
url: '/
|
|
3397
|
-
|
|
3398
|
-
'
|
|
3399
|
-
'page_token': pageToken,
|
|
4437
|
+
method: 'POST',
|
|
4438
|
+
url: '/pods/{pod_id}/workflows',
|
|
4439
|
+
path: {
|
|
4440
|
+
'pod_id': podId,
|
|
3400
4441
|
},
|
|
4442
|
+
body: requestBody,
|
|
4443
|
+
mediaType: 'application/json',
|
|
3401
4444
|
errors: {
|
|
3402
4445
|
422: `Validation Error`,
|
|
3403
4446
|
},
|
|
3404
4447
|
});
|
|
3405
4448
|
}
|
|
3406
4449
|
/**
|
|
3407
|
-
* List
|
|
3408
|
-
*
|
|
3409
|
-
* @param
|
|
3410
|
-
* @param search
|
|
4450
|
+
* List Workflows
|
|
4451
|
+
* List all workflows in a pod.
|
|
4452
|
+
* @param podId
|
|
3411
4453
|
* @param limit
|
|
3412
4454
|
* @param pageToken
|
|
3413
|
-
* @returns
|
|
4455
|
+
* @returns WorkflowListResponse Successful Response
|
|
3414
4456
|
* @throws ApiError
|
|
3415
4457
|
*/
|
|
3416
|
-
static
|
|
4458
|
+
static workflowList(podId, limit = 100, pageToken) {
|
|
3417
4459
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3418
4460
|
method: 'GET',
|
|
3419
|
-
url: '/
|
|
4461
|
+
url: '/pods/{pod_id}/workflows',
|
|
4462
|
+
path: {
|
|
4463
|
+
'pod_id': podId,
|
|
4464
|
+
},
|
|
3420
4465
|
query: {
|
|
3421
|
-
'application_id': applicationId,
|
|
3422
|
-
'search': search,
|
|
3423
4466
|
'limit': limit,
|
|
3424
4467
|
'page_token': pageToken,
|
|
3425
4468
|
},
|
|
@@ -3429,37 +4472,20 @@ class ApplicationsService {
|
|
|
3429
4472
|
});
|
|
3430
4473
|
}
|
|
3431
4474
|
/**
|
|
3432
|
-
* Get
|
|
3433
|
-
* Get a
|
|
3434
|
-
* @param
|
|
3435
|
-
* @
|
|
3436
|
-
* @
|
|
3437
|
-
*/
|
|
3438
|
-
static applicationTriggerGet(triggerId) {
|
|
3439
|
-
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3440
|
-
method: 'GET',
|
|
3441
|
-
url: '/integrations/applications/triggers/{trigger_id}',
|
|
3442
|
-
path: {
|
|
3443
|
-
'trigger_id': triggerId,
|
|
3444
|
-
},
|
|
3445
|
-
errors: {
|
|
3446
|
-
422: `Validation Error`,
|
|
3447
|
-
},
|
|
3448
|
-
});
|
|
3449
|
-
}
|
|
3450
|
-
/**
|
|
3451
|
-
* Get Application
|
|
3452
|
-
* Get a specific application by ID along with its operation catalog
|
|
3453
|
-
* @param applicationId
|
|
3454
|
-
* @returns ApplicationDetailResponseSchema Successful Response
|
|
4475
|
+
* Get Workflow
|
|
4476
|
+
* Get a single workflow definition including graph and start configuration.
|
|
4477
|
+
* @param podId
|
|
4478
|
+
* @param workflowName
|
|
4479
|
+
* @returns FlowEntity Successful Response
|
|
3455
4480
|
* @throws ApiError
|
|
3456
4481
|
*/
|
|
3457
|
-
static
|
|
4482
|
+
static workflowGet(podId, workflowName) {
|
|
3458
4483
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3459
4484
|
method: 'GET',
|
|
3460
|
-
url: '/
|
|
4485
|
+
url: '/pods/{pod_id}/workflows/{workflow_name}',
|
|
3461
4486
|
path: {
|
|
3462
|
-
'
|
|
4487
|
+
'pod_id': podId,
|
|
4488
|
+
'workflow_name': workflowName,
|
|
3463
4489
|
},
|
|
3464
4490
|
errors: {
|
|
3465
4491
|
422: `Validation Error`,
|
|
@@ -3467,43 +4493,44 @@ class ApplicationsService {
|
|
|
3467
4493
|
});
|
|
3468
4494
|
}
|
|
3469
4495
|
/**
|
|
3470
|
-
*
|
|
3471
|
-
*
|
|
3472
|
-
* @
|
|
4496
|
+
* Update Workflow Metadata
|
|
4497
|
+
* Update workflow-level metadata such as description/install requirements. Workflow names are immutable after creation. Use `workflow.graph.update` for nodes and edges.
|
|
4498
|
+
* @param podId
|
|
4499
|
+
* @param workflowName
|
|
4500
|
+
* @param requestBody
|
|
4501
|
+
* @returns FlowEntity Successful Response
|
|
3473
4502
|
* @throws ApiError
|
|
3474
4503
|
*/
|
|
3475
|
-
static
|
|
4504
|
+
static workflowUpdate(podId, workflowName, requestBody) {
|
|
3476
4505
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3477
|
-
method: '
|
|
3478
|
-
url: '/
|
|
4506
|
+
method: 'PATCH',
|
|
4507
|
+
url: '/pods/{pod_id}/workflows/{workflow_name}',
|
|
3479
4508
|
path: {
|
|
3480
|
-
'
|
|
4509
|
+
'pod_id': podId,
|
|
4510
|
+
'workflow_name': workflowName,
|
|
3481
4511
|
},
|
|
4512
|
+
body: requestBody,
|
|
4513
|
+
mediaType: 'application/json',
|
|
3482
4514
|
errors: {
|
|
3483
4515
|
422: `Validation Error`,
|
|
3484
4516
|
},
|
|
3485
4517
|
});
|
|
3486
4518
|
}
|
|
3487
4519
|
/**
|
|
3488
|
-
*
|
|
3489
|
-
*
|
|
3490
|
-
* @param
|
|
3491
|
-
* @param
|
|
3492
|
-
* @
|
|
3493
|
-
* @returns OperationListResponse Successful Response
|
|
4520
|
+
* Delete Workflow
|
|
4521
|
+
* Delete a workflow definition.
|
|
4522
|
+
* @param podId
|
|
4523
|
+
* @param workflowName
|
|
4524
|
+
* @returns void
|
|
3494
4525
|
* @throws ApiError
|
|
3495
4526
|
*/
|
|
3496
|
-
static
|
|
4527
|
+
static workflowDelete(podId, workflowName) {
|
|
3497
4528
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3498
|
-
method: '
|
|
3499
|
-
url: '/
|
|
4529
|
+
method: 'DELETE',
|
|
4530
|
+
url: '/pods/{pod_id}/workflows/{workflow_name}',
|
|
3500
4531
|
path: {
|
|
3501
|
-
'
|
|
3502
|
-
|
|
3503
|
-
query: {
|
|
3504
|
-
'search': search,
|
|
3505
|
-
'limit': limit,
|
|
3506
|
-
'page_token': pageToken,
|
|
4532
|
+
'pod_id': podId,
|
|
4533
|
+
'workflow_name': workflowName,
|
|
3507
4534
|
},
|
|
3508
4535
|
errors: {
|
|
3509
4536
|
422: `Validation Error`,
|
|
@@ -3511,40 +4538,45 @@ class ApplicationsService {
|
|
|
3511
4538
|
});
|
|
3512
4539
|
}
|
|
3513
4540
|
/**
|
|
3514
|
-
*
|
|
3515
|
-
*
|
|
3516
|
-
* @param
|
|
3517
|
-
* @
|
|
4541
|
+
* Update Workflow Graph
|
|
4542
|
+
* Replace the workflow graph. Agent/function node `input_mapping` entries must use explicit typed bindings. Use `{type: "expression", value: "start.payload.issue.key"}` for context lookups and `{type: "literal", value: "abc"}` for fixed JSON values.
|
|
4543
|
+
* @param podId
|
|
4544
|
+
* @param workflowName
|
|
4545
|
+
* @param requestBody
|
|
4546
|
+
* @returns FlowEntity Successful Response
|
|
3518
4547
|
* @throws ApiError
|
|
3519
4548
|
*/
|
|
3520
|
-
static
|
|
4549
|
+
static workflowGraphUpdate(podId, workflowName, requestBody) {
|
|
3521
4550
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3522
|
-
method: '
|
|
3523
|
-
url: '/
|
|
4551
|
+
method: 'PUT',
|
|
4552
|
+
url: '/pods/{pod_id}/workflows/{workflow_name}/graph',
|
|
3524
4553
|
path: {
|
|
3525
|
-
'
|
|
3526
|
-
'
|
|
4554
|
+
'pod_id': podId,
|
|
4555
|
+
'workflow_name': workflowName,
|
|
3527
4556
|
},
|
|
4557
|
+
body: requestBody,
|
|
4558
|
+
mediaType: 'application/json',
|
|
3528
4559
|
errors: {
|
|
3529
4560
|
422: `Validation Error`,
|
|
3530
4561
|
},
|
|
3531
4562
|
});
|
|
3532
4563
|
}
|
|
3533
4564
|
/**
|
|
3534
|
-
*
|
|
3535
|
-
*
|
|
3536
|
-
* @param
|
|
4565
|
+
* Install Workflow
|
|
4566
|
+
* Install a workflow for runtime execution. Provide `account_id` when the workflow needs an integration account binding.
|
|
4567
|
+
* @param podId
|
|
4568
|
+
* @param workflowName
|
|
3537
4569
|
* @param requestBody
|
|
3538
|
-
* @returns
|
|
4570
|
+
* @returns FlowInstallEntity Successful Response
|
|
3539
4571
|
* @throws ApiError
|
|
3540
4572
|
*/
|
|
3541
|
-
static
|
|
4573
|
+
static workflowInstallCreate(podId, workflowName, requestBody) {
|
|
3542
4574
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3543
4575
|
method: 'POST',
|
|
3544
|
-
url: '/
|
|
4576
|
+
url: '/pods/{pod_id}/workflows/{workflow_name}/install',
|
|
3545
4577
|
path: {
|
|
3546
|
-
'
|
|
3547
|
-
'
|
|
4578
|
+
'pod_id': podId,
|
|
4579
|
+
'workflow_name': workflowName,
|
|
3548
4580
|
},
|
|
3549
4581
|
body: requestBody,
|
|
3550
4582
|
mediaType: 'application/json',
|
|
@@ -3553,28 +4585,46 @@ class ApplicationsService {
|
|
|
3553
4585
|
},
|
|
3554
4586
|
});
|
|
3555
4587
|
}
|
|
3556
|
-
}
|
|
3557
|
-
exports.ApplicationsService = ApplicationsService;
|
|
3558
|
-
|
|
3559
|
-
},
|
|
3560
|
-
"./openapi_client/services/IntegrationsService.js": function (module, exports, require) {
|
|
3561
|
-
"use strict";
|
|
3562
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3563
|
-
exports.IntegrationsService = void 0;
|
|
3564
|
-
const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
|
|
3565
|
-
const request_js_1 = require("./openapi_client/core/request.js");
|
|
3566
|
-
class IntegrationsService {
|
|
3567
4588
|
/**
|
|
3568
|
-
*
|
|
3569
|
-
*
|
|
4589
|
+
* Uninstall Workflow
|
|
4590
|
+
* Remove a previously created workflow installation binding.
|
|
4591
|
+
* @param podId
|
|
4592
|
+
* @param workflowName
|
|
4593
|
+
* @param installId
|
|
4594
|
+
* @returns void
|
|
4595
|
+
* @throws ApiError
|
|
4596
|
+
*/
|
|
4597
|
+
static workflowInstallDelete(podId, workflowName, installId) {
|
|
4598
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
4599
|
+
method: 'DELETE',
|
|
4600
|
+
url: '/pods/{pod_id}/workflows/{workflow_name}/installs/{install_id}',
|
|
4601
|
+
path: {
|
|
4602
|
+
'pod_id': podId,
|
|
4603
|
+
'workflow_name': workflowName,
|
|
4604
|
+
'install_id': installId,
|
|
4605
|
+
},
|
|
4606
|
+
errors: {
|
|
4607
|
+
422: `Validation Error`,
|
|
4608
|
+
},
|
|
4609
|
+
});
|
|
4610
|
+
}
|
|
4611
|
+
/**
|
|
4612
|
+
* Start Workflow
|
|
4613
|
+
* Start a new workflow run. For event/scheduled/datastore starts, the request body is treated as initial trigger payload and merged into execution context.
|
|
4614
|
+
* @param podId
|
|
4615
|
+
* @param workflowName
|
|
3570
4616
|
* @param requestBody
|
|
3571
|
-
* @returns
|
|
4617
|
+
* @returns FlowRunEntity Successful Response
|
|
3572
4618
|
* @throws ApiError
|
|
3573
4619
|
*/
|
|
3574
|
-
static
|
|
4620
|
+
static workflowStart(podId, workflowName, requestBody) {
|
|
3575
4621
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3576
4622
|
method: 'POST',
|
|
3577
|
-
url: '/
|
|
4623
|
+
url: '/pods/{pod_id}/workflows/{workflow_name}/start',
|
|
4624
|
+
path: {
|
|
4625
|
+
'pod_id': podId,
|
|
4626
|
+
'workflow_name': workflowName,
|
|
4627
|
+
},
|
|
3578
4628
|
body: requestBody,
|
|
3579
4629
|
mediaType: 'application/json',
|
|
3580
4630
|
errors: {
|
|
@@ -3583,18 +4633,20 @@ class IntegrationsService {
|
|
|
3583
4633
|
});
|
|
3584
4634
|
}
|
|
3585
4635
|
/**
|
|
3586
|
-
*
|
|
3587
|
-
*
|
|
3588
|
-
* @param
|
|
3589
|
-
* @
|
|
4636
|
+
* Visualize Workflow
|
|
4637
|
+
* Render an HTML visualization for debugging workflow graph structure.
|
|
4638
|
+
* @param podId
|
|
4639
|
+
* @param workflowName
|
|
4640
|
+
* @returns string Successful Response
|
|
3590
4641
|
* @throws ApiError
|
|
3591
4642
|
*/
|
|
3592
|
-
static
|
|
4643
|
+
static workflowVisualize(podId, workflowName) {
|
|
3593
4644
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3594
4645
|
method: 'GET',
|
|
3595
|
-
url: '/
|
|
3596
|
-
|
|
3597
|
-
'
|
|
4646
|
+
url: '/pods/{pod_id}/workflows/{workflow_name}/visualize',
|
|
4647
|
+
path: {
|
|
4648
|
+
'pod_id': podId,
|
|
4649
|
+
'workflow_name': workflowName,
|
|
3598
4650
|
},
|
|
3599
4651
|
errors: {
|
|
3600
4652
|
422: `Validation Error`,
|
|
@@ -3602,41 +4654,44 @@ class IntegrationsService {
|
|
|
3602
4654
|
});
|
|
3603
4655
|
}
|
|
3604
4656
|
/**
|
|
3605
|
-
*
|
|
3606
|
-
*
|
|
3607
|
-
* @param
|
|
3608
|
-
* @param
|
|
3609
|
-
* @param
|
|
3610
|
-
* @returns
|
|
4657
|
+
* Resume Workflow Run
|
|
4658
|
+
* Resume a run in WAITING or EXECUTING state. The payload is written back into the current waiting node output and execution continues.
|
|
4659
|
+
* @param podId
|
|
4660
|
+
* @param runId
|
|
4661
|
+
* @param requestBody
|
|
4662
|
+
* @returns FlowRunEntity Successful Response
|
|
3611
4663
|
* @throws ApiError
|
|
3612
4664
|
*/
|
|
3613
|
-
static
|
|
4665
|
+
static workflowRunResume(podId, runId, requestBody) {
|
|
3614
4666
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3615
|
-
method: '
|
|
3616
|
-
url: '/
|
|
3617
|
-
|
|
3618
|
-
'
|
|
3619
|
-
'
|
|
3620
|
-
'page_token': pageToken,
|
|
4667
|
+
method: 'POST',
|
|
4668
|
+
url: '/pods/{pod_id}/workflow-runs/{run_id}/resume',
|
|
4669
|
+
path: {
|
|
4670
|
+
'pod_id': podId,
|
|
4671
|
+
'run_id': runId,
|
|
3621
4672
|
},
|
|
4673
|
+
body: requestBody,
|
|
4674
|
+
mediaType: 'application/json',
|
|
3622
4675
|
errors: {
|
|
3623
4676
|
422: `Validation Error`,
|
|
3624
4677
|
},
|
|
3625
4678
|
});
|
|
3626
4679
|
}
|
|
3627
4680
|
/**
|
|
3628
|
-
* Get
|
|
3629
|
-
* Get
|
|
3630
|
-
* @param
|
|
3631
|
-
* @
|
|
4681
|
+
* Get Workflow Run
|
|
4682
|
+
* Get current state, context, and step history of a workflow run.
|
|
4683
|
+
* @param podId
|
|
4684
|
+
* @param runId
|
|
4685
|
+
* @returns FlowRunEntity Successful Response
|
|
3632
4686
|
* @throws ApiError
|
|
3633
4687
|
*/
|
|
3634
|
-
static
|
|
4688
|
+
static workflowRunGet(podId, runId) {
|
|
3635
4689
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3636
4690
|
method: 'GET',
|
|
3637
|
-
url: '/
|
|
4691
|
+
url: '/pods/{pod_id}/workflow-runs/{run_id}',
|
|
3638
4692
|
path: {
|
|
3639
|
-
'
|
|
4693
|
+
'pod_id': podId,
|
|
4694
|
+
'run_id': runId,
|
|
3640
4695
|
},
|
|
3641
4696
|
errors: {
|
|
3642
4697
|
422: `Validation Error`,
|
|
@@ -3644,18 +4699,26 @@ class IntegrationsService {
|
|
|
3644
4699
|
});
|
|
3645
4700
|
}
|
|
3646
4701
|
/**
|
|
3647
|
-
*
|
|
3648
|
-
*
|
|
3649
|
-
* @param
|
|
3650
|
-
* @
|
|
4702
|
+
* List Workflow Runs
|
|
4703
|
+
* List recent runs for a given workflow.
|
|
4704
|
+
* @param podId
|
|
4705
|
+
* @param workflowName
|
|
4706
|
+
* @param limit
|
|
4707
|
+
* @param pageToken
|
|
4708
|
+
* @returns WorkflowRunListResponse Successful Response
|
|
3651
4709
|
* @throws ApiError
|
|
3652
4710
|
*/
|
|
3653
|
-
static
|
|
4711
|
+
static workflowRunList(podId, workflowName, limit = 100, pageToken) {
|
|
3654
4712
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3655
|
-
method: '
|
|
3656
|
-
url: '/
|
|
4713
|
+
method: 'GET',
|
|
4714
|
+
url: '/pods/{pod_id}/workflow-runs/{workflow_name}/runs',
|
|
3657
4715
|
path: {
|
|
3658
|
-
'
|
|
4716
|
+
'pod_id': podId,
|
|
4717
|
+
'workflow_name': workflowName,
|
|
4718
|
+
},
|
|
4719
|
+
query: {
|
|
4720
|
+
'limit': limit,
|
|
4721
|
+
'page_token': pageToken,
|
|
3659
4722
|
},
|
|
3660
4723
|
errors: {
|
|
3661
4724
|
422: `Validation Error`,
|
|
@@ -3663,18 +4726,20 @@ class IntegrationsService {
|
|
|
3663
4726
|
});
|
|
3664
4727
|
}
|
|
3665
4728
|
/**
|
|
3666
|
-
*
|
|
3667
|
-
*
|
|
3668
|
-
* @param
|
|
3669
|
-
* @
|
|
4729
|
+
* Visualize Workflow Run
|
|
4730
|
+
* Render an HTML view of a run overlaid on its workflow graph.
|
|
4731
|
+
* @param podId
|
|
4732
|
+
* @param runId
|
|
4733
|
+
* @returns string Successful Response
|
|
3670
4734
|
* @throws ApiError
|
|
3671
4735
|
*/
|
|
3672
|
-
static
|
|
4736
|
+
static workflowRunVisualize(podId, runId) {
|
|
3673
4737
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3674
4738
|
method: 'GET',
|
|
3675
|
-
url: '/
|
|
4739
|
+
url: '/pods/{pod_id}/workflow-runs/{run_id}/visualize',
|
|
3676
4740
|
path: {
|
|
3677
|
-
'
|
|
4741
|
+
'pod_id': podId,
|
|
4742
|
+
'run_id': runId,
|
|
3678
4743
|
},
|
|
3679
4744
|
errors: {
|
|
3680
4745
|
422: `Validation Error`,
|
|
@@ -3682,45 +4747,7 @@ class IntegrationsService {
|
|
|
3682
4747
|
});
|
|
3683
4748
|
}
|
|
3684
4749
|
}
|
|
3685
|
-
exports.
|
|
3686
|
-
|
|
3687
|
-
},
|
|
3688
|
-
"./namespaces/resources.js": function (module, exports, require) {
|
|
3689
|
-
"use strict";
|
|
3690
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3691
|
-
exports.ResourcesNamespace = void 0;
|
|
3692
|
-
class ResourcesNamespace {
|
|
3693
|
-
constructor(http) {
|
|
3694
|
-
this.http = http;
|
|
3695
|
-
}
|
|
3696
|
-
list(resourceType, resourceId, options = {}) {
|
|
3697
|
-
return this.http.request("GET", `/files/${resourceType}/${resourceId}/list`, {
|
|
3698
|
-
params: {
|
|
3699
|
-
path: options.path,
|
|
3700
|
-
},
|
|
3701
|
-
});
|
|
3702
|
-
}
|
|
3703
|
-
upload(resourceType, resourceId, file, options = {}) {
|
|
3704
|
-
const formData = new FormData();
|
|
3705
|
-
const fieldName = options.fieldName ?? "file";
|
|
3706
|
-
const name = options.name ?? (file instanceof File ? file.name : "upload.bin");
|
|
3707
|
-
formData.append(fieldName, file, name);
|
|
3708
|
-
return this.http.request("POST", `/files/${resourceType}/${resourceId}/upload`, {
|
|
3709
|
-
params: {
|
|
3710
|
-
path: options.path,
|
|
3711
|
-
},
|
|
3712
|
-
body: formData,
|
|
3713
|
-
isFormData: true,
|
|
3714
|
-
});
|
|
3715
|
-
}
|
|
3716
|
-
delete(resourceType, resourceId, filePath) {
|
|
3717
|
-
return this.http.request("DELETE", `/files/${resourceType}/${resourceId}/delete/${filePath}`);
|
|
3718
|
-
}
|
|
3719
|
-
download(resourceType, resourceId, filePath) {
|
|
3720
|
-
return this.http.requestBytes("GET", `/files/${resourceType}/${resourceId}/download/${filePath}`);
|
|
3721
|
-
}
|
|
3722
|
-
}
|
|
3723
|
-
exports.ResourcesNamespace = ResourcesNamespace;
|
|
4750
|
+
exports.WorkflowsService = WorkflowsService;
|
|
3724
4751
|
|
|
3725
4752
|
}
|
|
3726
4753
|
};
|