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