lemma-sdk 0.2.1 → 0.2.2

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