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.
- package/README.md +108 -36
- package/dist/browser/lemma-client.js +2012 -1242
- package/dist/client.d.ts +23 -6
- package/dist/client.js +32 -11
- package/dist/http.d.ts +18 -5
- package/dist/http.js +77 -22
- package/dist/index.d.ts +16 -7
- package/dist/index.js +1 -0
- package/dist/namespaces/assistants.d.ts +61 -16
- package/dist/namespaces/assistants.js +130 -19
- package/dist/namespaces/icons.d.ts +7 -0
- package/dist/namespaces/icons.js +13 -0
- package/dist/namespaces/organizations.d.ts +46 -0
- package/dist/namespaces/organizations.js +51 -0
- package/dist/namespaces/pod-members.d.ts +15 -0
- package/dist/namespaces/pod-members.js +19 -0
- package/dist/namespaces/pod-surfaces.d.ts +16 -0
- package/dist/namespaces/pod-surfaces.js +22 -0
- package/dist/namespaces/pods.d.ts +26 -0
- package/dist/namespaces/pods.js +41 -0
- package/dist/namespaces/records.d.ts +7 -3
- package/dist/namespaces/records.js +34 -3
- package/dist/namespaces/resources.d.ts +16 -0
- package/dist/namespaces/resources.js +32 -0
- package/dist/namespaces/tables.d.ts +7 -1
- package/dist/namespaces/tables.js +11 -1
- package/dist/namespaces/tasks.d.ts +15 -9
- package/dist/namespaces/tasks.js +43 -11
- package/dist/namespaces/users.d.ts +9 -0
- package/dist/namespaces/users.js +16 -0
- package/dist/namespaces/workflows.d.ts +8 -1
- package/dist/namespaces/workflows.js +23 -1
- package/dist/react/index.d.ts +4 -0
- package/dist/react/index.js +2 -0
- package/dist/react/useAgentRun.d.ts +17 -0
- package/dist/react/useAgentRun.js +66 -0
- package/dist/react/useAssistantRun.d.ts +18 -0
- package/dist/react/useAssistantRun.js +82 -0
- package/dist/streams.d.ts +10 -0
- package/dist/streams.js +68 -0
- package/dist/types.d.ts +39 -1
- 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
|
|
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
|
|
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
|
|
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.
|
|
66
|
-
this.assistants = new assistants_js_1.AssistantsNamespace(this.
|
|
67
|
-
this.conversations = new assistants_js_1.ConversationsNamespace(this.
|
|
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
|
-
|
|
492
|
-
|
|
493
|
-
|
|
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
|
-
|
|
502
|
-
|
|
503
|
-
|
|
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
|
-
|
|
517
|
-
|
|
553
|
+
if (options.isFormData && options.body instanceof FormData) {
|
|
554
|
+
return options.body;
|
|
518
555
|
}
|
|
519
|
-
|
|
520
|
-
|
|
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(([
|
|
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/
|
|
662
|
+
"./namespaces/agents.js": function (module, exports, require) {
|
|
594
663
|
"use strict";
|
|
595
664
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
596
|
-
exports.
|
|
597
|
-
const
|
|
598
|
-
class
|
|
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(() =>
|
|
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(() =>
|
|
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
|
-
|
|
613
|
-
return this.client.request(() =>
|
|
678
|
+
get(agentName) {
|
|
679
|
+
return this.client.request(() => AgentsService_js_1.AgentsService.agentGet(this.podId(), agentName));
|
|
614
680
|
}
|
|
615
|
-
|
|
616
|
-
return this.client.request(() =>
|
|
681
|
+
update(agentName, payload) {
|
|
682
|
+
return this.client.request(() => AgentsService_js_1.AgentsService.agentUpdate(this.podId(), agentName, payload));
|
|
617
683
|
}
|
|
618
|
-
|
|
619
|
-
|
|
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.
|
|
688
|
+
exports.AgentsNamespace = AgentsNamespace;
|
|
624
689
|
|
|
625
690
|
},
|
|
626
|
-
"./openapi_client/services/
|
|
691
|
+
"./openapi_client/services/AgentsService.js": function (module, exports, require) {
|
|
627
692
|
"use strict";
|
|
628
693
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
629
|
-
exports.
|
|
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
|
|
697
|
+
class AgentsService {
|
|
633
698
|
/**
|
|
634
|
-
* Create
|
|
635
|
-
* Create a
|
|
699
|
+
* Create Agent
|
|
700
|
+
* Create a new agent in a pod
|
|
636
701
|
* @param podId
|
|
637
702
|
* @param requestBody
|
|
638
|
-
* @returns
|
|
703
|
+
* @returns AgentResponse Successful Response
|
|
639
704
|
* @throws ApiError
|
|
640
705
|
*/
|
|
641
|
-
static
|
|
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}/
|
|
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
|
|
657
|
-
* List
|
|
721
|
+
* List Agents
|
|
722
|
+
* List all agents in a pod
|
|
658
723
|
* @param podId
|
|
659
|
-
* @param limit
|
|
660
|
-
* @param pageToken
|
|
661
|
-
* @returns
|
|
724
|
+
* @param limit
|
|
725
|
+
* @param pageToken
|
|
726
|
+
* @returns AgentListResponse Successful Response
|
|
662
727
|
* @throws ApiError
|
|
663
728
|
*/
|
|
664
|
-
static
|
|
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}/
|
|
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
|
|
682
|
-
* Get
|
|
746
|
+
* Get Agent
|
|
747
|
+
* Get an agent by name
|
|
683
748
|
* @param podId
|
|
684
|
-
* @param
|
|
685
|
-
* @returns
|
|
749
|
+
* @param agentName
|
|
750
|
+
* @returns AgentResponse Successful Response
|
|
686
751
|
* @throws ApiError
|
|
687
752
|
*/
|
|
688
|
-
static
|
|
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}/
|
|
756
|
+
url: '/pods/{pod_id}/agents/{agent_name}',
|
|
692
757
|
path: {
|
|
693
758
|
'pod_id': podId,
|
|
694
|
-
'
|
|
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
|
|
703
|
-
* Update
|
|
767
|
+
* Update Agent
|
|
768
|
+
* Update an agent
|
|
704
769
|
* @param podId
|
|
705
|
-
* @param
|
|
770
|
+
* @param agentName
|
|
706
771
|
* @param requestBody
|
|
707
|
-
* @returns
|
|
772
|
+
* @returns AgentResponse Successful Response
|
|
708
773
|
* @throws ApiError
|
|
709
774
|
*/
|
|
710
|
-
static
|
|
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}/
|
|
778
|
+
url: '/pods/{pod_id}/agents/{agent_name}',
|
|
714
779
|
path: {
|
|
715
780
|
'pod_id': podId,
|
|
716
|
-
'
|
|
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
|
|
727
|
-
* Delete
|
|
791
|
+
* Delete Agent
|
|
792
|
+
* Delete an agent
|
|
728
793
|
* @param podId
|
|
729
|
-
* @param
|
|
730
|
-
* @returns
|
|
794
|
+
* @param agentName
|
|
795
|
+
* @returns AgentMessageResponse Successful Response
|
|
731
796
|
* @throws ApiError
|
|
732
797
|
*/
|
|
733
|
-
static
|
|
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}/
|
|
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
|
-
'
|
|
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.
|
|
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/
|
|
1231
|
+
"./namespaces/assistants.js": function (module, exports, require) {
|
|
1191
1232
|
"use strict";
|
|
1192
1233
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1193
|
-
exports.
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
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
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1208
|
-
|
|
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
|
-
|
|
1211
|
-
|
|
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
|
-
|
|
1214
|
-
return this.
|
|
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
|
-
|
|
1217
|
-
return this.
|
|
1317
|
+
listByAssistant(assistantName, options = {}) {
|
|
1318
|
+
return this.list({ ...options, assistantName });
|
|
1218
1319
|
}
|
|
1219
|
-
|
|
1220
|
-
return this.
|
|
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.
|
|
1389
|
+
exports.ConversationsNamespace = ConversationsNamespace;
|
|
1224
1390
|
|
|
1225
1391
|
},
|
|
1226
|
-
"./
|
|
1392
|
+
"./namespaces/datastores.js": function (module, exports, require) {
|
|
1227
1393
|
"use strict";
|
|
1228
1394
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1229
|
-
exports.
|
|
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
|
|
1431
|
+
class DatastoreService {
|
|
1233
1432
|
/**
|
|
1234
|
-
* Create
|
|
1235
|
-
* Create a
|
|
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
|
|
1437
|
+
* @returns DatastoreResponse Successful Response
|
|
1240
1438
|
* @throws ApiError
|
|
1241
1439
|
*/
|
|
1242
|
-
static
|
|
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
|
|
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
|
|
1259
|
-
* List
|
|
1455
|
+
* List Datastores
|
|
1456
|
+
* List datastores available in the pod.
|
|
1260
1457
|
* @param podId
|
|
1261
|
-
* @param
|
|
1262
|
-
* @param
|
|
1263
|
-
* @
|
|
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
|
|
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
|
|
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
|
|
1286
|
-
* Get
|
|
1480
|
+
* Get Datastore
|
|
1481
|
+
* Get datastore metadata by datastore name.
|
|
1287
1482
|
* @param podId
|
|
1288
1483
|
* @param datastoreName
|
|
1289
|
-
* @
|
|
1290
|
-
* @returns TableResponse Successful Response
|
|
1484
|
+
* @returns DatastoreResponse Successful Response
|
|
1291
1485
|
* @throws ApiError
|
|
1292
1486
|
*/
|
|
1293
|
-
static
|
|
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}
|
|
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
|
|
1332
|
-
* Update
|
|
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
|
|
1506
|
+
* @returns DatastoreResponse Successful Response
|
|
1338
1507
|
* @throws ApiError
|
|
1339
1508
|
*/
|
|
1340
|
-
static
|
|
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}
|
|
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
|
-
*
|
|
1358
|
-
*
|
|
1525
|
+
* Delete Datastore
|
|
1526
|
+
* Delete a datastore and its underlying resources.
|
|
1359
1527
|
* @param podId
|
|
1360
1528
|
* @param datastoreName
|
|
1361
|
-
* @
|
|
1362
|
-
* @param requestBody
|
|
1363
|
-
* @returns TableResponse Successful Response
|
|
1529
|
+
* @returns DatastoreMessageResponse Successful Response
|
|
1364
1530
|
* @throws ApiError
|
|
1365
1531
|
*/
|
|
1366
|
-
static
|
|
1532
|
+
static datastoreDelete(podId, datastoreName) {
|
|
1367
1533
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
1368
|
-
method: '
|
|
1369
|
-
url: '/pods/{pod_id}/datastores/{datastore_name}
|
|
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
|
-
*
|
|
1384
|
-
*
|
|
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
|
|
1388
|
-
* @
|
|
1389
|
-
* @returns DatastoreMessageResponse Successful Response
|
|
1550
|
+
* @param requestBody
|
|
1551
|
+
* @returns RecordQueryResponse Successful Response
|
|
1390
1552
|
* @throws ApiError
|
|
1391
1553
|
*/
|
|
1392
|
-
static
|
|
1554
|
+
static datastoreQuery(podId, datastoreName, requestBody) {
|
|
1393
1555
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
1394
|
-
method: '
|
|
1395
|
-
url: '/pods/{pod_id}/datastores/{datastore_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.
|
|
1570
|
+
exports.DatastoreService = DatastoreService;
|
|
1409
1571
|
|
|
1410
1572
|
},
|
|
1411
|
-
"./namespaces/
|
|
1573
|
+
"./namespaces/desks.js": function (module, exports, require) {
|
|
1412
1574
|
"use strict";
|
|
1413
1575
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1414
|
-
exports.
|
|
1415
|
-
const
|
|
1416
|
-
class
|
|
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.
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
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(
|
|
1436
|
-
|
|
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
|
-
|
|
1447
|
-
return this.client.request(() =>
|
|
1596
|
+
create(payload) {
|
|
1597
|
+
return this.client.request(() => DesksService_js_1.DesksService.podDeskCreate(this.podId(), payload));
|
|
1448
1598
|
}
|
|
1449
|
-
|
|
1450
|
-
return this.client.request(() =>
|
|
1599
|
+
get(name) {
|
|
1600
|
+
return this.client.request(() => DesksService_js_1.DesksService.podDeskGet(this.podId(), name));
|
|
1451
1601
|
}
|
|
1452
|
-
|
|
1453
|
-
return this.client.request(() =>
|
|
1602
|
+
update(name, payload) {
|
|
1603
|
+
return this.client.request(() => DesksService_js_1.DesksService.podDeskUpdate(this.podId(), name, payload));
|
|
1454
1604
|
}
|
|
1455
|
-
|
|
1456
|
-
return this.client.request(() =>
|
|
1605
|
+
delete(name) {
|
|
1606
|
+
return this.client.request(() => DesksService_js_1.DesksService.podDeskDelete(this.podId(), name));
|
|
1457
1607
|
}
|
|
1458
1608
|
}
|
|
1459
|
-
exports.
|
|
1609
|
+
exports.DesksNamespace = DesksNamespace;
|
|
1460
1610
|
|
|
1461
1611
|
},
|
|
1462
|
-
"./openapi_client/services/
|
|
1612
|
+
"./openapi_client/services/DesksService.js": function (module, exports, require) {
|
|
1463
1613
|
"use strict";
|
|
1464
1614
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1465
|
-
exports.
|
|
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
|
|
1618
|
+
class DesksService {
|
|
1469
1619
|
/**
|
|
1470
|
-
* Create
|
|
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
|
|
1623
|
+
* @returns DeskResponse Successful Response
|
|
1477
1624
|
* @throws ApiError
|
|
1478
1625
|
*/
|
|
1479
|
-
static
|
|
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}/
|
|
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
|
|
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
|
|
1500
|
-
* @param
|
|
1501
|
-
* @
|
|
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
|
|
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}/
|
|
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
|
|
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
|
|
1529
|
-
* @
|
|
1530
|
-
* @param recordId
|
|
1531
|
-
* @returns RecordResponse Successful Response
|
|
1667
|
+
* @param deskName
|
|
1668
|
+
* @returns DeskResponse Successful Response
|
|
1532
1669
|
* @throws ApiError
|
|
1533
1670
|
*/
|
|
1534
|
-
static
|
|
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}/
|
|
1674
|
+
url: '/pods/{pod_id}/desks/{desk_name}',
|
|
1538
1675
|
path: {
|
|
1539
1676
|
'pod_id': podId,
|
|
1540
|
-
'
|
|
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
|
|
1551
|
-
* Patch a record by primary key.
|
|
1685
|
+
* Update Desk
|
|
1552
1686
|
* @param podId
|
|
1553
|
-
* @param
|
|
1554
|
-
* @param tableName
|
|
1555
|
-
* @param recordId
|
|
1687
|
+
* @param deskName
|
|
1556
1688
|
* @param requestBody
|
|
1557
|
-
* @returns
|
|
1689
|
+
* @returns DeskResponse Successful Response
|
|
1558
1690
|
* @throws ApiError
|
|
1559
1691
|
*/
|
|
1560
|
-
static
|
|
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}/
|
|
1695
|
+
url: '/pods/{pod_id}/desks/{desk_name}',
|
|
1564
1696
|
path: {
|
|
1565
1697
|
'pod_id': podId,
|
|
1566
|
-
'
|
|
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
|
|
1579
|
-
* Delete a record by primary key.
|
|
1708
|
+
* Delete Desk
|
|
1580
1709
|
* @param podId
|
|
1581
|
-
* @param
|
|
1582
|
-
* @
|
|
1583
|
-
* @param recordId
|
|
1584
|
-
* @returns DatastoreMessageResponse Successful Response
|
|
1710
|
+
* @param deskName
|
|
1711
|
+
* @returns DeskMessageResponse Successful Response
|
|
1585
1712
|
* @throws ApiError
|
|
1586
1713
|
*/
|
|
1587
|
-
static
|
|
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}/
|
|
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
|
-
'
|
|
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
|
-
*
|
|
1630
|
-
* Update multiple records in one request (each item needs primary key).
|
|
1728
|
+
* Upload Desk Bundle
|
|
1631
1729
|
* @param podId
|
|
1632
|
-
* @param
|
|
1633
|
-
* @param
|
|
1634
|
-
* @
|
|
1635
|
-
* @returns DatastoreMessageResponse Successful Response
|
|
1730
|
+
* @param deskName
|
|
1731
|
+
* @param formData
|
|
1732
|
+
* @returns DeskBundleUploadResponse Successful Response
|
|
1636
1733
|
* @throws ApiError
|
|
1637
1734
|
*/
|
|
1638
|
-
static
|
|
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}/
|
|
1738
|
+
url: '/pods/{pod_id}/desks/{desk_name}/bundle',
|
|
1642
1739
|
path: {
|
|
1643
1740
|
'pod_id': podId,
|
|
1644
|
-
'
|
|
1645
|
-
'table_name': tableName,
|
|
1741
|
+
'desk_name': deskName,
|
|
1646
1742
|
},
|
|
1647
|
-
|
|
1648
|
-
mediaType: '
|
|
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
|
-
*
|
|
1656
|
-
* Delete multiple records by primary key values.
|
|
1751
|
+
* Get Desk HTML
|
|
1657
1752
|
* @param podId
|
|
1658
|
-
* @param
|
|
1659
|
-
* @
|
|
1660
|
-
* @param requestBody
|
|
1661
|
-
* @returns DatastoreMessageResponse Successful Response
|
|
1753
|
+
* @param deskName
|
|
1754
|
+
* @returns any Successful Response
|
|
1662
1755
|
* @throws ApiError
|
|
1663
1756
|
*/
|
|
1664
|
-
static
|
|
1757
|
+
static podDeskHtmlGet(podId, deskName) {
|
|
1665
1758
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
1666
|
-
method: '
|
|
1667
|
-
url: '/pods/{pod_id}/
|
|
1759
|
+
method: 'GET',
|
|
1760
|
+
url: '/pods/{pod_id}/desks/{desk_name}/html',
|
|
1668
1761
|
path: {
|
|
1669
1762
|
'pod_id': podId,
|
|
1670
|
-
'
|
|
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
|
-
*
|
|
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
|
|
1685
|
-
* @
|
|
1686
|
-
* @param requestBody
|
|
1687
|
-
* @returns RecordListResponse Successful Response
|
|
1773
|
+
* @param deskName
|
|
1774
|
+
* @returns any Successful Response
|
|
1688
1775
|
* @throws ApiError
|
|
1689
1776
|
*/
|
|
1690
|
-
static
|
|
1777
|
+
static podDeskSourceArchiveGet(podId, deskName) {
|
|
1691
1778
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
1692
|
-
method: '
|
|
1693
|
-
url: '/pods/{pod_id}/
|
|
1779
|
+
method: 'GET',
|
|
1780
|
+
url: '/pods/{pod_id}/desks/{desk_name}/source/archive',
|
|
1694
1781
|
path: {
|
|
1695
1782
|
'pod_id': podId,
|
|
1696
|
-
'
|
|
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.
|
|
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/
|
|
2408
|
+
"./namespaces/icons.js": function (module, exports, require) {
|
|
2325
2409
|
"use strict";
|
|
2326
2410
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2327
|
-
exports.
|
|
2328
|
-
const
|
|
2329
|
-
class
|
|
2330
|
-
constructor(client
|
|
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
|
-
|
|
2344
|
-
return this.client.request(() =>
|
|
2417
|
+
upload(file) {
|
|
2418
|
+
return this.client.request(() => IconsService_js_1.IconsService.iconUpload({ file }));
|
|
2345
2419
|
}
|
|
2346
|
-
|
|
2347
|
-
return this.client.request(() =>
|
|
2420
|
+
getPublic(iconPath) {
|
|
2421
|
+
return this.client.request(() => IconsService_js_1.IconsService.iconPublicGet(iconPath));
|
|
2348
2422
|
}
|
|
2349
2423
|
}
|
|
2350
|
-
exports.
|
|
2424
|
+
exports.IconsNamespace = IconsNamespace;
|
|
2351
2425
|
|
|
2352
2426
|
},
|
|
2353
|
-
"./openapi_client/services/
|
|
2427
|
+
"./openapi_client/services/IconsService.js": function (module, exports, require) {
|
|
2354
2428
|
"use strict";
|
|
2355
2429
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2356
|
-
exports.
|
|
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
|
|
2433
|
+
class IconsService {
|
|
2360
2434
|
/**
|
|
2361
|
-
*
|
|
2362
|
-
*
|
|
2363
|
-
* @param
|
|
2364
|
-
* @
|
|
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
|
|
2441
|
+
static iconUpload(formData) {
|
|
2369
2442
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2370
2443
|
method: 'POST',
|
|
2371
|
-
url: '/
|
|
2372
|
-
|
|
2373
|
-
|
|
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
|
-
*
|
|
2384
|
-
*
|
|
2385
|
-
* @param
|
|
2386
|
-
* @
|
|
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
|
|
2459
|
+
static iconPublicGet(iconPath) {
|
|
2392
2460
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2393
2461
|
method: 'GET',
|
|
2394
|
-
url: '/
|
|
2462
|
+
url: '/public/icons/{icon_path}',
|
|
2395
2463
|
path: {
|
|
2396
|
-
'
|
|
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
|
-
*
|
|
2409
|
-
* Get
|
|
2410
|
-
* @param
|
|
2411
|
-
* @param
|
|
2412
|
-
* @returns
|
|
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
|
|
2533
|
+
static applicationList(limit = 100, pageToken) {
|
|
2416
2534
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2417
2535
|
method: 'GET',
|
|
2418
|
-
url: '/
|
|
2419
|
-
|
|
2420
|
-
'
|
|
2421
|
-
'
|
|
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
|
-
*
|
|
2430
|
-
*
|
|
2431
|
-
* @param
|
|
2432
|
-
* @param
|
|
2433
|
-
* @param
|
|
2434
|
-
* @
|
|
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
|
|
2556
|
+
static applicationTriggerList(applicationId, search, limit = 100, pageToken) {
|
|
2438
2557
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2439
|
-
method: '
|
|
2440
|
-
url: '/
|
|
2441
|
-
|
|
2442
|
-
'
|
|
2443
|
-
'
|
|
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
|
-
*
|
|
2454
|
-
*
|
|
2455
|
-
* @param
|
|
2456
|
-
* @
|
|
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
|
|
2578
|
+
static applicationTriggerGet(triggerId) {
|
|
2461
2579
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2462
|
-
method: '
|
|
2463
|
-
url: '/
|
|
2580
|
+
method: 'GET',
|
|
2581
|
+
url: '/integrations/applications/triggers/{trigger_id}',
|
|
2464
2582
|
path: {
|
|
2465
|
-
'
|
|
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
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
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
|
-
|
|
2495
|
-
|
|
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
|
-
*
|
|
2520
|
-
*
|
|
2521
|
-
* @
|
|
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
|
|
2615
|
+
static applicationDescriptor(applicationId) {
|
|
2527
2616
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2528
|
-
method: '
|
|
2529
|
-
url: '/
|
|
2617
|
+
method: 'GET',
|
|
2618
|
+
url: '/integrations/applications/{application_id}/operations/descriptor',
|
|
2530
2619
|
path: {
|
|
2531
|
-
'
|
|
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
|
|
2542
|
-
*
|
|
2543
|
-
* @param
|
|
2544
|
-
* @param agentName
|
|
2628
|
+
* List Application Operations
|
|
2629
|
+
* @param applicationId
|
|
2630
|
+
* @param search
|
|
2545
2631
|
* @param limit
|
|
2546
2632
|
* @param pageToken
|
|
2547
|
-
* @returns
|
|
2633
|
+
* @returns OperationListResponse Successful Response
|
|
2548
2634
|
* @throws ApiError
|
|
2549
2635
|
*/
|
|
2550
|
-
static
|
|
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: '/
|
|
2639
|
+
url: '/integrations/applications/{application_id}/operations',
|
|
2554
2640
|
path: {
|
|
2555
|
-
'
|
|
2641
|
+
'application_id': applicationId,
|
|
2556
2642
|
},
|
|
2557
2643
|
query: {
|
|
2558
|
-
'
|
|
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
|
|
2569
|
-
*
|
|
2570
|
-
* @param
|
|
2571
|
-
* @
|
|
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
|
|
2660
|
+
static applicationOperationDetail(applicationId, operationName) {
|
|
2576
2661
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2577
2662
|
method: 'GET',
|
|
2578
|
-
url: '/
|
|
2663
|
+
url: '/integrations/applications/{application_id}/operations/{operation_name}',
|
|
2579
2664
|
path: {
|
|
2580
|
-
'
|
|
2581
|
-
'
|
|
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
|
-
*
|
|
2590
|
-
*
|
|
2591
|
-
* @param
|
|
2592
|
-
* @param
|
|
2593
|
-
* @returns
|
|
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
|
|
2681
|
+
static applicationOperationExecute(applicationId, operationName, requestBody) {
|
|
2597
2682
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2598
|
-
method: '
|
|
2599
|
-
url: '/
|
|
2683
|
+
method: 'POST',
|
|
2684
|
+
url: '/integrations/applications/{application_id}/operations/{operation_name}/execute',
|
|
2600
2685
|
path: {
|
|
2601
|
-
'
|
|
2602
|
-
'
|
|
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
|
-
*
|
|
2611
|
-
*
|
|
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
|
|
2711
|
+
* @returns ConnectRequestResponseSchema Successful Response
|
|
2616
2712
|
* @throws ApiError
|
|
2617
2713
|
*/
|
|
2618
|
-
static
|
|
2714
|
+
static integrationConnectRequestCreate(requestBody) {
|
|
2619
2715
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2620
2716
|
method: 'POST',
|
|
2621
|
-
url: '/
|
|
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
|
-
*
|
|
2635
|
-
*
|
|
2636
|
-
* @param
|
|
2637
|
-
* @
|
|
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
|
|
2732
|
+
static integrationOauthCallback(error) {
|
|
2644
2733
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2645
2734
|
method: 'GET',
|
|
2646
|
-
url: '/
|
|
2647
|
-
path: {
|
|
2648
|
-
'pod_id': podId,
|
|
2649
|
-
'task_id': taskId,
|
|
2650
|
-
},
|
|
2735
|
+
url: '/integrations/connect-requests/oauth/callback',
|
|
2651
2736
|
query: {
|
|
2652
|
-
'
|
|
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
|
-
*
|
|
2662
|
-
*
|
|
2663
|
-
* @param
|
|
2664
|
-
* @param
|
|
2665
|
-
* @
|
|
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
|
|
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: '/
|
|
2672
|
-
|
|
2673
|
-
'
|
|
2674
|
-
'
|
|
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
|
-
*
|
|
2744
|
-
*
|
|
2745
|
-
* @param
|
|
2746
|
-
* @returns
|
|
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
|
|
2774
|
+
static integrationAccountGet(accountId) {
|
|
2750
2775
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2751
|
-
method: '
|
|
2752
|
-
url: '/
|
|
2776
|
+
method: 'GET',
|
|
2777
|
+
url: '/integrations/accounts/{account_id}',
|
|
2753
2778
|
path: {
|
|
2754
|
-
'
|
|
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
|
-
*
|
|
2765
|
-
*
|
|
2766
|
-
* @param
|
|
2767
|
-
* @
|
|
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
|
|
2793
|
+
static integrationAccountDelete(accountId) {
|
|
2772
2794
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2773
|
-
method: '
|
|
2774
|
-
url: '/
|
|
2795
|
+
method: 'DELETE',
|
|
2796
|
+
url: '/integrations/accounts/{account_id}',
|
|
2775
2797
|
path: {
|
|
2776
|
-
'
|
|
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
|
|
2789
|
-
*
|
|
2790
|
-
* @param
|
|
2791
|
-
* @returns
|
|
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
|
|
2812
|
+
static integrationAccountCredentialsGet(accountId) {
|
|
2795
2813
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2796
2814
|
method: 'GET',
|
|
2797
|
-
url: '/
|
|
2815
|
+
url: '/integrations/accounts/{account_id}/credentials',
|
|
2798
2816
|
path: {
|
|
2799
|
-
'
|
|
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
|
-
*
|
|
2809
|
-
*
|
|
2810
|
-
* @param assistantName
|
|
2893
|
+
* Create Organization
|
|
2894
|
+
* Create a new organization
|
|
2811
2895
|
* @param requestBody
|
|
2812
|
-
* @returns
|
|
2896
|
+
* @returns OrganizationResponse Successful Response
|
|
2813
2897
|
* @throws ApiError
|
|
2814
2898
|
*/
|
|
2815
|
-
static
|
|
2899
|
+
static orgCreate(requestBody) {
|
|
2816
2900
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2817
|
-
method: '
|
|
2818
|
-
url: '/
|
|
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
|
-
*
|
|
2832
|
-
*
|
|
2833
|
-
* @param
|
|
2834
|
-
* @
|
|
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
|
|
2918
|
+
static orgList(limit = 100, pageToken) {
|
|
2838
2919
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2839
|
-
method: '
|
|
2840
|
-
url: '/
|
|
2841
|
-
|
|
2842
|
-
'
|
|
2843
|
-
'
|
|
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
|
-
*
|
|
2863
|
-
*
|
|
2864
|
-
* @
|
|
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
|
|
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: '
|
|
2870
|
-
url: '/
|
|
2871
|
-
|
|
2872
|
-
|
|
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
|
-
*
|
|
2880
|
-
*
|
|
2881
|
-
* @param
|
|
2882
|
-
* @
|
|
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
|
|
2961
|
+
static orgGet(orgId) {
|
|
2889
2962
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2890
2963
|
method: 'GET',
|
|
2891
|
-
url: '/
|
|
2892
|
-
|
|
2893
|
-
'
|
|
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
|
-
*
|
|
2906
|
-
*
|
|
2907
|
-
* @param
|
|
2908
|
-
* @
|
|
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
|
|
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: '/
|
|
2985
|
+
url: '/organizations/{org_id}/members',
|
|
2915
2986
|
path: {
|
|
2916
|
-
'
|
|
2987
|
+
'org_id': orgId,
|
|
2917
2988
|
},
|
|
2918
2989
|
query: {
|
|
2919
|
-
'
|
|
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
|
-
*
|
|
2928
|
-
*
|
|
2999
|
+
* Invite Member
|
|
3000
|
+
* Invite a user to join the organization
|
|
3001
|
+
* @param orgId
|
|
2929
3002
|
* @param requestBody
|
|
2930
|
-
* @
|
|
2931
|
-
* @returns ConversationResponse Successful Response
|
|
3003
|
+
* @returns OrganizationInvitationResponse Successful Response
|
|
2932
3004
|
* @throws ApiError
|
|
2933
3005
|
*/
|
|
2934
|
-
static
|
|
3006
|
+
static orgInvitationInvite(orgId, requestBody) {
|
|
2935
3007
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2936
|
-
method: '
|
|
2937
|
-
url: '/
|
|
3008
|
+
method: 'POST',
|
|
3009
|
+
url: '/organizations/{org_id}/invitations',
|
|
2938
3010
|
path: {
|
|
2939
|
-
'
|
|
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
|
|
2953
|
-
*
|
|
2954
|
-
* @param
|
|
2955
|
-
* @param
|
|
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
|
-
* @
|
|
3026
|
+
* @param pageToken
|
|
3027
|
+
* @returns OrganizationInvitationListResponse Successful Response
|
|
2959
3028
|
* @throws ApiError
|
|
2960
3029
|
*/
|
|
2961
|
-
static
|
|
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: '/
|
|
3033
|
+
url: '/organizations/{org_id}/invitations',
|
|
2965
3034
|
path: {
|
|
2966
|
-
'
|
|
3035
|
+
'org_id': orgId,
|
|
2967
3036
|
},
|
|
2968
3037
|
query: {
|
|
2969
|
-
'
|
|
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
|
-
*
|
|
2980
|
-
*
|
|
2981
|
-
* @param
|
|
2982
|
-
* @
|
|
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
|
|
3054
|
+
static orgInvitationAccept(invitationId) {
|
|
2987
3055
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2988
3056
|
method: 'POST',
|
|
2989
|
-
url: '/
|
|
3057
|
+
url: '/organizations/invitations/{invitation_id}/accept',
|
|
2990
3058
|
path: {
|
|
2991
|
-
'
|
|
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
|
-
*
|
|
3005
|
-
*
|
|
3006
|
-
* @param
|
|
3007
|
-
* @returns
|
|
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
|
|
3073
|
+
static orgInvitationGet(invitationId) {
|
|
3011
3074
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3012
3075
|
method: 'GET',
|
|
3013
|
-
url: '/
|
|
3076
|
+
url: '/organizations/invitations/{invitation_id}',
|
|
3014
3077
|
path: {
|
|
3015
|
-
'
|
|
3078
|
+
'invitation_id': invitationId,
|
|
3016
3079
|
},
|
|
3017
|
-
|
|
3018
|
-
|
|
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
|
-
*
|
|
3027
|
-
*
|
|
3028
|
-
* @param
|
|
3029
|
-
* @
|
|
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
|
|
3113
|
+
static orgMemberUpdateRole(orgId, memberId, requestBody) {
|
|
3033
3114
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3034
3115
|
method: 'PATCH',
|
|
3035
|
-
url: '/
|
|
3116
|
+
url: '/organizations/{org_id}/members/{member_id}/role',
|
|
3036
3117
|
path: {
|
|
3037
|
-
'
|
|
3118
|
+
'org_id': orgId,
|
|
3119
|
+
'member_id': memberId,
|
|
3038
3120
|
},
|
|
3039
|
-
|
|
3040
|
-
|
|
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.
|
|
3150
|
+
exports.OrganizationsService = OrganizationsService;
|
|
3049
3151
|
|
|
3050
3152
|
},
|
|
3051
|
-
"./
|
|
3153
|
+
"./openapi_client/models/OrganizationInvitationStatus.js": function (module, exports, require) {
|
|
3052
3154
|
"use strict";
|
|
3053
3155
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3054
|
-
exports.
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
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
|
-
|
|
3078
|
-
return this.client.request(() =>
|
|
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
|
-
|
|
3081
|
-
return this.client.request(() =>
|
|
3185
|
+
add(podId, payload) {
|
|
3186
|
+
return this.client.request(() => PodMembersService_js_1.PodMembersService.podMemberAdd(podId, payload));
|
|
3082
3187
|
}
|
|
3083
|
-
|
|
3084
|
-
return this.client.request(() =>
|
|
3188
|
+
updateRole(podId, memberId, role) {
|
|
3189
|
+
return this.client.request(() => PodMembersService_js_1.PodMembersService.podMemberUpdateRole(podId, memberId, { role }));
|
|
3085
3190
|
}
|
|
3086
|
-
|
|
3087
|
-
return this.client.request(() =>
|
|
3191
|
+
remove(podId, memberId) {
|
|
3192
|
+
return this.client.request(() => PodMembersService_js_1.PodMembersService.podMemberRemove(podId, memberId));
|
|
3088
3193
|
}
|
|
3089
3194
|
}
|
|
3090
|
-
exports.
|
|
3195
|
+
exports.PodMembersNamespace = PodMembersNamespace;
|
|
3091
3196
|
|
|
3092
3197
|
},
|
|
3093
|
-
"./openapi_client/services/
|
|
3198
|
+
"./openapi_client/services/PodMembersService.js": function (module, exports, require) {
|
|
3094
3199
|
"use strict";
|
|
3095
3200
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3096
|
-
exports.
|
|
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
|
|
3204
|
+
class PodMembersService {
|
|
3100
3205
|
/**
|
|
3101
|
-
*
|
|
3102
|
-
*
|
|
3206
|
+
* Add Pod Member
|
|
3207
|
+
* Add a member to a pod
|
|
3103
3208
|
* @param podId
|
|
3104
3209
|
* @param requestBody
|
|
3105
|
-
* @returns
|
|
3210
|
+
* @returns PodMemberResponse Successful Response
|
|
3106
3211
|
* @throws ApiError
|
|
3107
3212
|
*/
|
|
3108
|
-
static
|
|
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}/
|
|
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
|
|
3124
|
-
* List all
|
|
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
|
|
3233
|
+
* @returns PodMemberListResponse Successful Response
|
|
3129
3234
|
* @throws ApiError
|
|
3130
3235
|
*/
|
|
3131
|
-
static
|
|
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}/
|
|
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
|
-
*
|
|
3149
|
-
*
|
|
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
|
|
3256
|
+
* @param memberId
|
|
3173
3257
|
* @param requestBody
|
|
3174
|
-
* @returns
|
|
3258
|
+
* @returns PodMemberResponse Successful Response
|
|
3175
3259
|
* @throws ApiError
|
|
3176
3260
|
*/
|
|
3177
|
-
static
|
|
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}/
|
|
3264
|
+
url: '/pods/{pod_id}/members/{member_id}/role',
|
|
3181
3265
|
path: {
|
|
3182
3266
|
'pod_id': podId,
|
|
3183
|
-
'
|
|
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
|
-
*
|
|
3194
|
-
*
|
|
3277
|
+
* Remove Pod Member
|
|
3278
|
+
* Remove a member from a pod
|
|
3195
3279
|
* @param podId
|
|
3196
|
-
* @param
|
|
3280
|
+
* @param memberId
|
|
3197
3281
|
* @returns void
|
|
3198
3282
|
* @throws ApiError
|
|
3199
3283
|
*/
|
|
3200
|
-
static
|
|
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}/
|
|
3287
|
+
url: '/pods/{pod_id}/members/{member_id}',
|
|
3204
3288
|
path: {
|
|
3205
3289
|
'pod_id': podId,
|
|
3206
|
-
'
|
|
3290
|
+
'member_id': memberId,
|
|
3207
3291
|
},
|
|
3208
3292
|
errors: {
|
|
3209
3293
|
422: `Validation Error`,
|
|
3210
3294
|
},
|
|
3211
3295
|
});
|
|
3212
3296
|
}
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
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
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
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
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
return (
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
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
|
-
*
|
|
3286
|
-
*
|
|
3287
|
-
* @param podId
|
|
3288
|
-
* @param workflowName
|
|
3355
|
+
* Create Pod
|
|
3356
|
+
* Create a new pod
|
|
3289
3357
|
* @param requestBody
|
|
3290
|
-
* @returns
|
|
3358
|
+
* @returns PodResponse Successful Response
|
|
3291
3359
|
* @throws ApiError
|
|
3292
3360
|
*/
|
|
3293
|
-
static
|
|
3361
|
+
static podCreate(requestBody) {
|
|
3294
3362
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3295
3363
|
method: 'POST',
|
|
3296
|
-
url: '/pods
|
|
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
|
-
*
|
|
3310
|
-
*
|
|
3373
|
+
* Get Pod
|
|
3374
|
+
* Get pod details
|
|
3311
3375
|
* @param podId
|
|
3312
|
-
* @
|
|
3313
|
-
* @returns string Successful Response
|
|
3376
|
+
* @returns PodResponse Successful Response
|
|
3314
3377
|
* @throws ApiError
|
|
3315
3378
|
*/
|
|
3316
|
-
static
|
|
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}
|
|
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
|
-
*
|
|
3331
|
-
*
|
|
3392
|
+
* Update Pod
|
|
3393
|
+
* Update pod details
|
|
3332
3394
|
* @param podId
|
|
3333
|
-
* @param runId
|
|
3334
3395
|
* @param requestBody
|
|
3335
|
-
* @returns
|
|
3396
|
+
* @returns PodResponse Successful Response
|
|
3336
3397
|
* @throws ApiError
|
|
3337
3398
|
*/
|
|
3338
|
-
static
|
|
3399
|
+
static podUpdate(podId, requestBody) {
|
|
3339
3400
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3340
|
-
method: '
|
|
3341
|
-
url: '/pods/{pod_id}
|
|
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
|
-
*
|
|
3355
|
-
*
|
|
3414
|
+
* Delete Pod
|
|
3415
|
+
* Delete a pod
|
|
3356
3416
|
* @param podId
|
|
3357
|
-
* @
|
|
3358
|
-
* @returns FlowRunEntity Successful Response
|
|
3417
|
+
* @returns void
|
|
3359
3418
|
* @throws ApiError
|
|
3360
3419
|
*/
|
|
3361
|
-
static
|
|
3420
|
+
static podDelete(podId) {
|
|
3362
3421
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3363
|
-
method: '
|
|
3364
|
-
url: '/pods/{pod_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
|
|
3376
|
-
* List
|
|
3377
|
-
* @param
|
|
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
|
|
3438
|
+
* @returns PodListResponse Successful Response
|
|
3382
3439
|
* @throws ApiError
|
|
3383
3440
|
*/
|
|
3384
|
-
static
|
|
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/
|
|
3444
|
+
url: '/pods/organization/{organization_id}',
|
|
3388
3445
|
path: {
|
|
3389
|
-
'
|
|
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
|
-
*
|
|
3403
|
-
*
|
|
3458
|
+
* Get Pod Config
|
|
3459
|
+
* Get pod configuration requirements (apps, flows) and user status
|
|
3404
3460
|
* @param podId
|
|
3405
|
-
* @
|
|
3406
|
-
* @returns string Successful Response
|
|
3461
|
+
* @returns PodConfigResponse Successful Response
|
|
3407
3462
|
* @throws ApiError
|
|
3408
3463
|
*/
|
|
3409
|
-
static
|
|
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}/
|
|
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.
|
|
3477
|
+
exports.PodsService = PodsService;
|
|
3424
3478
|
|
|
3425
3479
|
},
|
|
3426
|
-
"./namespaces/
|
|
3480
|
+
"./namespaces/pod-surfaces.js": function (module, exports, require) {
|
|
3427
3481
|
"use strict";
|
|
3428
3482
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3429
|
-
exports.
|
|
3430
|
-
const
|
|
3431
|
-
class
|
|
3432
|
-
constructor(client
|
|
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(() =>
|
|
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(() =>
|
|
3492
|
+
create(podId, payload) {
|
|
3493
|
+
return this.client.request(() => AssistantSurfacesService_js_1.AssistantSurfacesService.assistantSurfaceCreate(podId, payload));
|
|
3451
3494
|
}
|
|
3452
|
-
get(
|
|
3453
|
-
return this.client.request(() =>
|
|
3495
|
+
get(podId, surfaceId) {
|
|
3496
|
+
return this.client.request(() => AssistantSurfacesService_js_1.AssistantSurfacesService.assistantSurfaceGet(podId, surfaceId));
|
|
3454
3497
|
}
|
|
3455
|
-
|
|
3456
|
-
return this.client.request(() =>
|
|
3498
|
+
updateConfig(podId, surfaceId, payload) {
|
|
3499
|
+
return this.client.request(() => AssistantSurfacesService_js_1.AssistantSurfacesService.assistantSurfaceUpdateConfig(podId, surfaceId, payload));
|
|
3457
3500
|
}
|
|
3458
|
-
|
|
3459
|
-
return this.client.request(() =>
|
|
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.
|
|
3505
|
+
exports.PodSurfacesNamespace = PodSurfacesNamespace;
|
|
3463
3506
|
|
|
3464
3507
|
},
|
|
3465
|
-
"./openapi_client/services/
|
|
3508
|
+
"./openapi_client/services/AssistantSurfacesService.js": function (module, exports, require) {
|
|
3466
3509
|
"use strict";
|
|
3467
3510
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3468
|
-
exports.
|
|
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
|
|
3514
|
+
class AssistantSurfacesService {
|
|
3472
3515
|
/**
|
|
3473
|
-
* Create
|
|
3516
|
+
* Create Surface
|
|
3517
|
+
* Create a new surface for an assistant.
|
|
3474
3518
|
* @param podId
|
|
3475
3519
|
* @param requestBody
|
|
3476
|
-
* @returns
|
|
3520
|
+
* @returns any Successful Response
|
|
3477
3521
|
* @throws ApiError
|
|
3478
3522
|
*/
|
|
3479
|
-
static
|
|
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}/
|
|
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
|
|
3538
|
+
* List Surfaces
|
|
3539
|
+
* List configured surfaces in a pod.
|
|
3495
3540
|
* @param podId
|
|
3496
3541
|
* @param limit
|
|
3497
3542
|
* @param pageToken
|
|
3498
|
-
* @returns
|
|
3543
|
+
* @returns AssistantSurfaceListResponse Successful Response
|
|
3499
3544
|
* @throws ApiError
|
|
3500
3545
|
*/
|
|
3501
|
-
static
|
|
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}/
|
|
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
|
|
3563
|
+
* Get Surface
|
|
3564
|
+
* Get a specific surface configuration.
|
|
3519
3565
|
* @param podId
|
|
3520
|
-
* @param
|
|
3521
|
-
* @returns
|
|
3566
|
+
* @param surfaceId
|
|
3567
|
+
* @returns any Successful Response
|
|
3522
3568
|
* @throws ApiError
|
|
3523
3569
|
*/
|
|
3524
|
-
static
|
|
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}/
|
|
3573
|
+
url: '/pods/{pod_id}/surfaces/{surface_id}',
|
|
3528
3574
|
path: {
|
|
3529
3575
|
'pod_id': podId,
|
|
3530
|
-
'
|
|
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
|
|
3584
|
+
* Update Surface
|
|
3585
|
+
* Update a surface configuration.
|
|
3539
3586
|
* @param podId
|
|
3540
|
-
* @param
|
|
3587
|
+
* @param surfaceId
|
|
3541
3588
|
* @param requestBody
|
|
3542
|
-
* @returns
|
|
3589
|
+
* @returns any Successful Response
|
|
3543
3590
|
* @throws ApiError
|
|
3544
3591
|
*/
|
|
3545
|
-
static
|
|
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}/
|
|
3595
|
+
url: '/pods/{pod_id}/surfaces/{surface_id}/config',
|
|
3549
3596
|
path: {
|
|
3550
3597
|
'pod_id': podId,
|
|
3551
|
-
'
|
|
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
|
-
*
|
|
3608
|
+
* Toggle Surface
|
|
3609
|
+
* Toggle a surface active state.
|
|
3562
3610
|
* @param podId
|
|
3563
|
-
* @param
|
|
3564
|
-
* @
|
|
3611
|
+
* @param surfaceId
|
|
3612
|
+
* @param requestBody
|
|
3613
|
+
* @returns any Successful Response
|
|
3565
3614
|
* @throws ApiError
|
|
3566
3615
|
*/
|
|
3567
|
-
static
|
|
3616
|
+
static assistantSurfaceToggle(podId, surfaceId, requestBody) {
|
|
3568
3617
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3569
|
-
method: '
|
|
3570
|
-
url: '/pods/{pod_id}/
|
|
3618
|
+
method: 'PATCH',
|
|
3619
|
+
url: '/pods/{pod_id}/surfaces/{surface_id}/toggle',
|
|
3571
3620
|
path: {
|
|
3572
3621
|
'pod_id': podId,
|
|
3573
|
-
'
|
|
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
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
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
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
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
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
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}/
|
|
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
|
-
'
|
|
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
|
-
*
|
|
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
|
|
3627
|
-
* @
|
|
4182
|
+
* @param datastoreName
|
|
4183
|
+
* @param tableName
|
|
4184
|
+
* @param requestBody
|
|
4185
|
+
* @returns TableResponse Successful Response
|
|
3628
4186
|
* @throws ApiError
|
|
3629
4187
|
*/
|
|
3630
|
-
static
|
|
4188
|
+
static tableColumnAdd(podId, datastoreName, tableName, requestBody) {
|
|
3631
4189
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3632
|
-
method: '
|
|
3633
|
-
url: '/pods/{pod_id}/
|
|
4190
|
+
method: 'POST',
|
|
4191
|
+
url: '/pods/{pod_id}/datastores/{datastore_name}/tables/{table_name}/columns',
|
|
3634
4192
|
path: {
|
|
3635
4193
|
'pod_id': podId,
|
|
3636
|
-
'
|
|
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.
|
|
4230
|
+
exports.TablesService = TablesService;
|
|
3645
4231
|
|
|
3646
4232
|
},
|
|
3647
|
-
"./namespaces/
|
|
4233
|
+
"./namespaces/tasks.js": function (module, exports, require) {
|
|
3648
4234
|
"use strict";
|
|
3649
4235
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3650
|
-
exports.
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
this.
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
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.
|
|
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
|
-
|
|
3680
|
-
|
|
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
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
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.
|
|
4296
|
+
exports.TasksNamespace = TasksNamespace;
|
|
3688
4297
|
|
|
3689
4298
|
},
|
|
3690
|
-
"./
|
|
4299
|
+
"./namespaces/users.js": function (module, exports, require) {
|
|
3691
4300
|
"use strict";
|
|
3692
4301
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3693
|
-
exports.
|
|
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
|
|
4327
|
+
class UsersService {
|
|
3697
4328
|
/**
|
|
3698
|
-
*
|
|
3699
|
-
* Get
|
|
3700
|
-
* @
|
|
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
|
|
4334
|
+
static userCurrentGet() {
|
|
3706
4335
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3707
4336
|
method: 'GET',
|
|
3708
|
-
url: '/
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
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
|
-
*
|
|
3720
|
-
*
|
|
3721
|
-
* @param
|
|
3722
|
-
* @param
|
|
3723
|
-
* @
|
|
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
|
|
4452
|
+
static workflowCreate(podId, requestBody) {
|
|
3729
4453
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3730
|
-
method: '
|
|
3731
|
-
url: '/
|
|
3732
|
-
|
|
3733
|
-
'
|
|
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
|
-
*
|
|
3745
|
-
*
|
|
3746
|
-
* @param
|
|
3747
|
-
* @
|
|
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
|
|
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: '/
|
|
4478
|
+
url: '/pods/{pod_id}/workflows',
|
|
3754
4479
|
path: {
|
|
3755
|
-
'
|
|
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
|
|
3764
|
-
* Get a
|
|
3765
|
-
* @param
|
|
3766
|
-
* @
|
|
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
|
|
4499
|
+
static workflowGet(podId, workflowName) {
|
|
3770
4500
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3771
4501
|
method: 'GET',
|
|
3772
|
-
url: '/
|
|
4502
|
+
url: '/pods/{pod_id}/workflows/{workflow_name}',
|
|
3773
4503
|
path: {
|
|
3774
|
-
'
|
|
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
|
-
*
|
|
3783
|
-
*
|
|
3784
|
-
* @
|
|
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
|
|
4521
|
+
static workflowUpdate(podId, workflowName, requestBody) {
|
|
3788
4522
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3789
|
-
method: '
|
|
3790
|
-
url: '/
|
|
4523
|
+
method: 'PATCH',
|
|
4524
|
+
url: '/pods/{pod_id}/workflows/{workflow_name}',
|
|
3791
4525
|
path: {
|
|
3792
|
-
'
|
|
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
|
-
*
|
|
3801
|
-
*
|
|
3802
|
-
* @param
|
|
3803
|
-
* @param
|
|
3804
|
-
* @
|
|
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
|
|
4544
|
+
static workflowDelete(podId, workflowName) {
|
|
3809
4545
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3810
|
-
method: '
|
|
3811
|
-
url: '/
|
|
4546
|
+
method: 'DELETE',
|
|
4547
|
+
url: '/pods/{pod_id}/workflows/{workflow_name}',
|
|
3812
4548
|
path: {
|
|
3813
|
-
'
|
|
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
|
-
*
|
|
3827
|
-
*
|
|
3828
|
-
* @param
|
|
3829
|
-
* @
|
|
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
|
|
4566
|
+
static workflowGraphUpdate(podId, workflowName, requestBody) {
|
|
3833
4567
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3834
|
-
method: '
|
|
3835
|
-
url: '/
|
|
4568
|
+
method: 'PUT',
|
|
4569
|
+
url: '/pods/{pod_id}/workflows/{workflow_name}/graph',
|
|
3836
4570
|
path: {
|
|
3837
|
-
'
|
|
3838
|
-
'
|
|
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
|
-
*
|
|
3847
|
-
*
|
|
3848
|
-
* @param
|
|
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
|
|
4587
|
+
* @returns FlowInstallEntity Successful Response
|
|
3851
4588
|
* @throws ApiError
|
|
3852
4589
|
*/
|
|
3853
|
-
static
|
|
4590
|
+
static workflowInstallCreate(podId, workflowName, requestBody) {
|
|
3854
4591
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3855
4592
|
method: 'POST',
|
|
3856
|
-
url: '/
|
|
4593
|
+
url: '/pods/{pod_id}/workflows/{workflow_name}/install',
|
|
3857
4594
|
path: {
|
|
3858
|
-
'
|
|
3859
|
-
'
|
|
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
|
-
*
|
|
3881
|
-
*
|
|
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
|
|
4634
|
+
* @returns FlowRunEntity Successful Response
|
|
3884
4635
|
* @throws ApiError
|
|
3885
4636
|
*/
|
|
3886
|
-
static
|
|
4637
|
+
static workflowStart(podId, workflowName, requestBody) {
|
|
3887
4638
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3888
4639
|
method: 'POST',
|
|
3889
|
-
url: '/
|
|
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
|
-
*
|
|
3899
|
-
*
|
|
3900
|
-
* @param
|
|
3901
|
-
* @
|
|
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
|
|
4660
|
+
static workflowVisualize(podId, workflowName) {
|
|
3905
4661
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3906
4662
|
method: 'GET',
|
|
3907
|
-
url: '/
|
|
3908
|
-
|
|
3909
|
-
'
|
|
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
|
-
*
|
|
3918
|
-
*
|
|
3919
|
-
* @param
|
|
3920
|
-
* @param
|
|
3921
|
-
* @param
|
|
3922
|
-
* @returns
|
|
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
|
|
4682
|
+
static workflowRunResume(podId, runId, requestBody) {
|
|
3926
4683
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3927
|
-
method: '
|
|
3928
|
-
url: '/
|
|
3929
|
-
|
|
3930
|
-
'
|
|
3931
|
-
'
|
|
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
|
|
3941
|
-
* Get
|
|
3942
|
-
* @param
|
|
3943
|
-
* @
|
|
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
|
|
4705
|
+
static workflowRunGet(podId, runId) {
|
|
3947
4706
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3948
4707
|
method: 'GET',
|
|
3949
|
-
url: '/
|
|
4708
|
+
url: '/pods/{pod_id}/workflow-runs/{run_id}',
|
|
3950
4709
|
path: {
|
|
3951
|
-
'
|
|
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
|
-
*
|
|
3960
|
-
*
|
|
3961
|
-
* @param
|
|
3962
|
-
* @
|
|
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
|
|
4728
|
+
static workflowRunList(podId, workflowName, limit = 100, pageToken) {
|
|
3966
4729
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3967
|
-
method: '
|
|
3968
|
-
url: '/
|
|
4730
|
+
method: 'GET',
|
|
4731
|
+
url: '/pods/{pod_id}/workflow-runs/{workflow_name}/runs',
|
|
3969
4732
|
path: {
|
|
3970
|
-
'
|
|
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
|
-
*
|
|
3979
|
-
*
|
|
3980
|
-
* @param
|
|
3981
|
-
* @
|
|
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
|
|
4753
|
+
static workflowRunVisualize(podId, runId) {
|
|
3985
4754
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3986
4755
|
method: 'GET',
|
|
3987
|
-
url: '/
|
|
4756
|
+
url: '/pods/{pod_id}/workflow-runs/{run_id}/visualize',
|
|
3988
4757
|
path: {
|
|
3989
|
-
'
|
|
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.
|
|
4767
|
+
exports.WorkflowsService = WorkflowsService;
|
|
3998
4768
|
|
|
3999
4769
|
}
|
|
4000
4770
|
};
|