@getsupervisor/agents-studio-sdk 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +659 -144
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +711 -50
- package/dist/index.d.ts +711 -50
- package/dist/index.js +654 -144
- package/dist/index.js.map +1 -1
- package/package.json +6 -3
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,22 @@ type paths = {
|
|
|
21
21
|
get: operations["listAgentInstructions"];
|
|
22
22
|
post: operations["createAgentInstruction"];
|
|
23
23
|
};
|
|
24
|
+
"/v1/agents/{agentId}/instructions/{instructionId}": {
|
|
25
|
+
patch: operations["updateAgentInstruction"];
|
|
26
|
+
};
|
|
27
|
+
"/v1/agents/{agentId}/schedule": {
|
|
28
|
+
get: operations["getAgentSchedule"];
|
|
29
|
+
put: operations["updateAgentSchedule"];
|
|
30
|
+
};
|
|
31
|
+
"/v1/agents/{agentId}/versions": {
|
|
32
|
+
get: operations["listAgentVersions"];
|
|
33
|
+
post: operations["createAgentVersion"];
|
|
34
|
+
};
|
|
35
|
+
"/v1/agents/{agentId}/versions/{versionId}": {
|
|
36
|
+
get: operations["getAgentVersion"];
|
|
37
|
+
delete: operations["deleteAgentInstruction"];
|
|
38
|
+
patch: operations["updateAgentVersion"];
|
|
39
|
+
};
|
|
24
40
|
"/v1/agents/{agentId}/phones": {
|
|
25
41
|
post: operations["connectAgentPhone"];
|
|
26
42
|
};
|
|
@@ -39,6 +55,9 @@ type paths = {
|
|
|
39
55
|
"/v1/tools/{toolId}/execute": {
|
|
40
56
|
post: operations["executeTool"];
|
|
41
57
|
};
|
|
58
|
+
"/v1/voices": {
|
|
59
|
+
get: operations["listVoices"];
|
|
60
|
+
};
|
|
42
61
|
};
|
|
43
62
|
type components = {
|
|
44
63
|
schemas: {
|
|
@@ -65,6 +84,16 @@ type components = {
|
|
|
65
84
|
limit: number;
|
|
66
85
|
hasNext: boolean;
|
|
67
86
|
};
|
|
87
|
+
QueryValue: string | number | boolean | string[];
|
|
88
|
+
QueryFilterOperators: {
|
|
89
|
+
[key: string]: components["schemas"]["QueryValue"];
|
|
90
|
+
};
|
|
91
|
+
QueryFilters: {
|
|
92
|
+
[key: string]: components["schemas"]["QueryValue"] | components["schemas"]["QueryFilterOperators"];
|
|
93
|
+
};
|
|
94
|
+
QueryOrGroups: {
|
|
95
|
+
[key: string]: components["schemas"]["QueryFilters"];
|
|
96
|
+
};
|
|
68
97
|
AgentSummary: {
|
|
69
98
|
agentId: string;
|
|
70
99
|
name: string;
|
|
@@ -149,6 +178,88 @@ type components = {
|
|
|
149
178
|
order: number;
|
|
150
179
|
createdAt: string;
|
|
151
180
|
};
|
|
181
|
+
UpdateInstructionRequest: {
|
|
182
|
+
order?: number;
|
|
183
|
+
content?: string;
|
|
184
|
+
metadata?: {
|
|
185
|
+
[key: string]: unknown;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
VoiceSummary: {
|
|
189
|
+
id: string;
|
|
190
|
+
providerVoiceId?: string;
|
|
191
|
+
name: string;
|
|
192
|
+
gender?: "female" | "male" | "neutral";
|
|
193
|
+
locale: string;
|
|
194
|
+
tags?: string[];
|
|
195
|
+
previewUrl?: string;
|
|
196
|
+
provider: string;
|
|
197
|
+
};
|
|
198
|
+
VoiceListResponse: {
|
|
199
|
+
data: components["schemas"]["VoiceSummary"][];
|
|
200
|
+
meta: components["schemas"]["PaginationMeta"];
|
|
201
|
+
};
|
|
202
|
+
AgentScheduleSlot: {
|
|
203
|
+
startTime: string;
|
|
204
|
+
endTime: string;
|
|
205
|
+
};
|
|
206
|
+
AgentScheduleRule: {
|
|
207
|
+
dayOfWeek: "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
|
|
208
|
+
slots: components["schemas"]["AgentScheduleSlot"][];
|
|
209
|
+
isClosed?: boolean;
|
|
210
|
+
};
|
|
211
|
+
AgentSchedule: {
|
|
212
|
+
agentId: string;
|
|
213
|
+
timezone: string;
|
|
214
|
+
rules: components["schemas"]["AgentScheduleRule"][];
|
|
215
|
+
metadata?: {
|
|
216
|
+
[key: string]: unknown;
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
UpdateAgentScheduleRequest: {
|
|
220
|
+
timezone: string;
|
|
221
|
+
rules: components["schemas"]["AgentScheduleRule"][];
|
|
222
|
+
metadata?: {
|
|
223
|
+
[key: string]: unknown;
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
AgentVersionSummary: {
|
|
227
|
+
versionId: string;
|
|
228
|
+
agentId: string;
|
|
229
|
+
label: string;
|
|
230
|
+
status: "draft" | "published" | "archived";
|
|
231
|
+
isActive?: boolean;
|
|
232
|
+
createdAt: string;
|
|
233
|
+
updatedAt?: string;
|
|
234
|
+
publishedAt?: string | null;
|
|
235
|
+
};
|
|
236
|
+
AgentVersionDetail: components["schemas"]["AgentVersionSummary"] & {
|
|
237
|
+
description?: string;
|
|
238
|
+
metadata?: {
|
|
239
|
+
[key: string]: unknown;
|
|
240
|
+
};
|
|
241
|
+
instructionsVersionId?: string;
|
|
242
|
+
};
|
|
243
|
+
AgentVersionListResponse: {
|
|
244
|
+
data: components["schemas"]["AgentVersionSummary"][];
|
|
245
|
+
meta?: components["schemas"]["PaginationMeta"];
|
|
246
|
+
};
|
|
247
|
+
CreateAgentVersionRequest: {
|
|
248
|
+
label: string;
|
|
249
|
+
description?: string;
|
|
250
|
+
sourceVersionId?: string;
|
|
251
|
+
metadata?: {
|
|
252
|
+
[key: string]: unknown;
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
UpdateAgentVersionRequest: {
|
|
256
|
+
label?: string;
|
|
257
|
+
description?: string;
|
|
258
|
+
status?: "draft" | "published" | "archived";
|
|
259
|
+
metadata?: {
|
|
260
|
+
[key: string]: unknown;
|
|
261
|
+
};
|
|
262
|
+
};
|
|
152
263
|
ConnectPhoneRequest: {
|
|
153
264
|
agent_id: string;
|
|
154
265
|
phone_id: string;
|
|
@@ -224,8 +335,18 @@ type components = {
|
|
|
224
335
|
XWorkspaceId: string;
|
|
225
336
|
AgentId: string;
|
|
226
337
|
PhoneId: string;
|
|
338
|
+
InstructionId: string;
|
|
339
|
+
VersionId: string;
|
|
227
340
|
WorkspaceId: string;
|
|
228
341
|
ToolId: string;
|
|
342
|
+
PageParam?: number;
|
|
343
|
+
LimitParam?: number;
|
|
344
|
+
SortParam?: string;
|
|
345
|
+
FieldsParam?: string;
|
|
346
|
+
IncludeParam?: string;
|
|
347
|
+
SearchParam?: string;
|
|
348
|
+
FilterParam?: components["schemas"]["QueryFilters"];
|
|
349
|
+
OrParam?: components["schemas"]["QueryOrGroups"];
|
|
229
350
|
};
|
|
230
351
|
requestBodies: never;
|
|
231
352
|
headers: never;
|
|
@@ -234,6 +355,16 @@ type components = {
|
|
|
234
355
|
type operations = {
|
|
235
356
|
listAgents: {
|
|
236
357
|
parameters: {
|
|
358
|
+
query?: {
|
|
359
|
+
page?: components["parameters"]["PageParam"];
|
|
360
|
+
limit?: components["parameters"]["LimitParam"];
|
|
361
|
+
sort?: components["parameters"]["SortParam"];
|
|
362
|
+
fields?: components["parameters"]["FieldsParam"];
|
|
363
|
+
include?: components["parameters"]["IncludeParam"];
|
|
364
|
+
q?: components["parameters"]["SearchParam"];
|
|
365
|
+
filter?: components["parameters"]["FilterParam"];
|
|
366
|
+
or?: components["parameters"]["OrParam"];
|
|
367
|
+
};
|
|
237
368
|
header: {
|
|
238
369
|
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
239
370
|
};
|
|
@@ -393,6 +524,16 @@ type operations = {
|
|
|
393
524
|
};
|
|
394
525
|
listAgentKnowledgeBases: {
|
|
395
526
|
parameters: {
|
|
527
|
+
query?: {
|
|
528
|
+
page?: components["parameters"]["PageParam"];
|
|
529
|
+
limit?: components["parameters"]["LimitParam"];
|
|
530
|
+
sort?: components["parameters"]["SortParam"];
|
|
531
|
+
fields?: components["parameters"]["FieldsParam"];
|
|
532
|
+
include?: components["parameters"]["IncludeParam"];
|
|
533
|
+
q?: components["parameters"]["SearchParam"];
|
|
534
|
+
filter?: components["parameters"]["FilterParam"];
|
|
535
|
+
or?: components["parameters"]["OrParam"];
|
|
536
|
+
};
|
|
396
537
|
header: {
|
|
397
538
|
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
398
539
|
};
|
|
@@ -418,6 +559,16 @@ type operations = {
|
|
|
418
559
|
};
|
|
419
560
|
listAgentKnowledgeUploads: {
|
|
420
561
|
parameters: {
|
|
562
|
+
query?: {
|
|
563
|
+
page?: components["parameters"]["PageParam"];
|
|
564
|
+
limit?: components["parameters"]["LimitParam"];
|
|
565
|
+
sort?: components["parameters"]["SortParam"];
|
|
566
|
+
fields?: components["parameters"]["FieldsParam"];
|
|
567
|
+
include?: components["parameters"]["IncludeParam"];
|
|
568
|
+
q?: components["parameters"]["SearchParam"];
|
|
569
|
+
filter?: components["parameters"]["FilterParam"];
|
|
570
|
+
or?: components["parameters"]["OrParam"];
|
|
571
|
+
};
|
|
421
572
|
header: {
|
|
422
573
|
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
423
574
|
};
|
|
@@ -437,6 +588,13 @@ type operations = {
|
|
|
437
588
|
parameters: {
|
|
438
589
|
query?: {
|
|
439
590
|
versionId?: string;
|
|
591
|
+
page?: components["parameters"]["PageParam"];
|
|
592
|
+
limit?: components["parameters"]["LimitParam"];
|
|
593
|
+
sort?: components["parameters"]["SortParam"];
|
|
594
|
+
fields?: components["parameters"]["FieldsParam"];
|
|
595
|
+
q?: components["parameters"]["SearchParam"];
|
|
596
|
+
filter?: components["parameters"]["FilterParam"];
|
|
597
|
+
or?: components["parameters"]["OrParam"];
|
|
440
598
|
};
|
|
441
599
|
header: {
|
|
442
600
|
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
@@ -493,6 +651,225 @@ type operations = {
|
|
|
493
651
|
};
|
|
494
652
|
};
|
|
495
653
|
};
|
|
654
|
+
updateAgentInstruction: {
|
|
655
|
+
parameters: {
|
|
656
|
+
header: {
|
|
657
|
+
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
658
|
+
};
|
|
659
|
+
path: {
|
|
660
|
+
agentId: components["parameters"]["AgentId"];
|
|
661
|
+
instructionId: components["parameters"]["InstructionId"];
|
|
662
|
+
};
|
|
663
|
+
};
|
|
664
|
+
requestBody: {
|
|
665
|
+
content: {
|
|
666
|
+
"application/json": components["schemas"]["UpdateInstructionRequest"];
|
|
667
|
+
};
|
|
668
|
+
};
|
|
669
|
+
responses: {
|
|
670
|
+
200: {
|
|
671
|
+
content: {
|
|
672
|
+
"application/json": components["schemas"]["Instruction"];
|
|
673
|
+
};
|
|
674
|
+
};
|
|
675
|
+
400: {
|
|
676
|
+
content: {
|
|
677
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
678
|
+
};
|
|
679
|
+
};
|
|
680
|
+
404: {
|
|
681
|
+
content: {
|
|
682
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
683
|
+
};
|
|
684
|
+
};
|
|
685
|
+
};
|
|
686
|
+
};
|
|
687
|
+
getAgentSchedule: {
|
|
688
|
+
parameters: {
|
|
689
|
+
header: {
|
|
690
|
+
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
691
|
+
};
|
|
692
|
+
path: {
|
|
693
|
+
agentId: components["parameters"]["AgentId"];
|
|
694
|
+
};
|
|
695
|
+
};
|
|
696
|
+
responses: {
|
|
697
|
+
200: {
|
|
698
|
+
content: {
|
|
699
|
+
"application/json": components["schemas"]["AgentSchedule"];
|
|
700
|
+
};
|
|
701
|
+
};
|
|
702
|
+
404: {
|
|
703
|
+
content: {
|
|
704
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
705
|
+
};
|
|
706
|
+
};
|
|
707
|
+
};
|
|
708
|
+
};
|
|
709
|
+
updateAgentSchedule: {
|
|
710
|
+
parameters: {
|
|
711
|
+
header: {
|
|
712
|
+
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
713
|
+
};
|
|
714
|
+
path: {
|
|
715
|
+
agentId: components["parameters"]["AgentId"];
|
|
716
|
+
};
|
|
717
|
+
};
|
|
718
|
+
requestBody: {
|
|
719
|
+
content: {
|
|
720
|
+
"application/json": components["schemas"]["UpdateAgentScheduleRequest"];
|
|
721
|
+
};
|
|
722
|
+
};
|
|
723
|
+
responses: {
|
|
724
|
+
200: {
|
|
725
|
+
content: {
|
|
726
|
+
"application/json": components["schemas"]["AgentSchedule"];
|
|
727
|
+
};
|
|
728
|
+
};
|
|
729
|
+
400: {
|
|
730
|
+
content: {
|
|
731
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
732
|
+
};
|
|
733
|
+
};
|
|
734
|
+
404: {
|
|
735
|
+
content: {
|
|
736
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
737
|
+
};
|
|
738
|
+
};
|
|
739
|
+
};
|
|
740
|
+
};
|
|
741
|
+
listAgentVersions: {
|
|
742
|
+
parameters: {
|
|
743
|
+
query?: {
|
|
744
|
+
status?: "draft" | "published" | "archived";
|
|
745
|
+
page?: components["parameters"]["PageParam"];
|
|
746
|
+
limit?: components["parameters"]["LimitParam"];
|
|
747
|
+
sort?: components["parameters"]["SortParam"];
|
|
748
|
+
fields?: components["parameters"]["FieldsParam"];
|
|
749
|
+
include?: components["parameters"]["IncludeParam"];
|
|
750
|
+
q?: components["parameters"]["SearchParam"];
|
|
751
|
+
filter?: components["parameters"]["FilterParam"];
|
|
752
|
+
or?: components["parameters"]["OrParam"];
|
|
753
|
+
};
|
|
754
|
+
header: {
|
|
755
|
+
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
756
|
+
};
|
|
757
|
+
path: {
|
|
758
|
+
agentId: components["parameters"]["AgentId"];
|
|
759
|
+
};
|
|
760
|
+
};
|
|
761
|
+
responses: {
|
|
762
|
+
200: {
|
|
763
|
+
content: {
|
|
764
|
+
"application/json": components["schemas"]["AgentVersionListResponse"];
|
|
765
|
+
};
|
|
766
|
+
};
|
|
767
|
+
};
|
|
768
|
+
};
|
|
769
|
+
createAgentVersion: {
|
|
770
|
+
parameters: {
|
|
771
|
+
header: {
|
|
772
|
+
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
773
|
+
};
|
|
774
|
+
path: {
|
|
775
|
+
agentId: components["parameters"]["AgentId"];
|
|
776
|
+
};
|
|
777
|
+
};
|
|
778
|
+
requestBody: {
|
|
779
|
+
content: {
|
|
780
|
+
"application/json": components["schemas"]["CreateAgentVersionRequest"];
|
|
781
|
+
};
|
|
782
|
+
};
|
|
783
|
+
responses: {
|
|
784
|
+
201: {
|
|
785
|
+
content: {
|
|
786
|
+
"application/json": components["schemas"]["AgentVersionDetail"];
|
|
787
|
+
};
|
|
788
|
+
};
|
|
789
|
+
400: {
|
|
790
|
+
content: {
|
|
791
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
792
|
+
};
|
|
793
|
+
};
|
|
794
|
+
};
|
|
795
|
+
};
|
|
796
|
+
getAgentVersion: {
|
|
797
|
+
parameters: {
|
|
798
|
+
header: {
|
|
799
|
+
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
800
|
+
};
|
|
801
|
+
path: {
|
|
802
|
+
agentId: components["parameters"]["AgentId"];
|
|
803
|
+
versionId: components["parameters"]["VersionId"];
|
|
804
|
+
};
|
|
805
|
+
};
|
|
806
|
+
responses: {
|
|
807
|
+
200: {
|
|
808
|
+
content: {
|
|
809
|
+
"application/json": components["schemas"]["AgentVersionDetail"];
|
|
810
|
+
};
|
|
811
|
+
};
|
|
812
|
+
404: {
|
|
813
|
+
content: {
|
|
814
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
815
|
+
};
|
|
816
|
+
};
|
|
817
|
+
};
|
|
818
|
+
};
|
|
819
|
+
deleteAgentInstruction: {
|
|
820
|
+
parameters: {
|
|
821
|
+
header: {
|
|
822
|
+
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
823
|
+
};
|
|
824
|
+
path: {
|
|
825
|
+
agentId: components["parameters"]["AgentId"];
|
|
826
|
+
instructionId: components["parameters"]["InstructionId"];
|
|
827
|
+
};
|
|
828
|
+
};
|
|
829
|
+
responses: {
|
|
830
|
+
204: {
|
|
831
|
+
content: never;
|
|
832
|
+
};
|
|
833
|
+
404: {
|
|
834
|
+
content: {
|
|
835
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
836
|
+
};
|
|
837
|
+
};
|
|
838
|
+
};
|
|
839
|
+
};
|
|
840
|
+
updateAgentVersion: {
|
|
841
|
+
parameters: {
|
|
842
|
+
header: {
|
|
843
|
+
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
844
|
+
};
|
|
845
|
+
path: {
|
|
846
|
+
agentId: components["parameters"]["AgentId"];
|
|
847
|
+
versionId: components["parameters"]["VersionId"];
|
|
848
|
+
};
|
|
849
|
+
};
|
|
850
|
+
requestBody: {
|
|
851
|
+
content: {
|
|
852
|
+
"application/json": components["schemas"]["UpdateAgentVersionRequest"];
|
|
853
|
+
};
|
|
854
|
+
};
|
|
855
|
+
responses: {
|
|
856
|
+
200: {
|
|
857
|
+
content: {
|
|
858
|
+
"application/json": components["schemas"]["AgentVersionDetail"];
|
|
859
|
+
};
|
|
860
|
+
};
|
|
861
|
+
400: {
|
|
862
|
+
content: {
|
|
863
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
864
|
+
};
|
|
865
|
+
};
|
|
866
|
+
404: {
|
|
867
|
+
content: {
|
|
868
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
869
|
+
};
|
|
870
|
+
};
|
|
871
|
+
};
|
|
872
|
+
};
|
|
496
873
|
connectAgentPhone: {
|
|
497
874
|
parameters: {
|
|
498
875
|
header: {
|
|
@@ -560,6 +937,14 @@ type operations = {
|
|
|
560
937
|
parameters: {
|
|
561
938
|
query?: {
|
|
562
939
|
channel?: "voice";
|
|
940
|
+
page?: components["parameters"]["PageParam"];
|
|
941
|
+
limit?: components["parameters"]["LimitParam"];
|
|
942
|
+
sort?: components["parameters"]["SortParam"];
|
|
943
|
+
fields?: components["parameters"]["FieldsParam"];
|
|
944
|
+
include?: components["parameters"]["IncludeParam"];
|
|
945
|
+
q?: components["parameters"]["SearchParam"];
|
|
946
|
+
filter?: components["parameters"]["FilterParam"];
|
|
947
|
+
or?: components["parameters"]["OrParam"];
|
|
563
948
|
};
|
|
564
949
|
path: {
|
|
565
950
|
workspaceId: components["parameters"]["WorkspaceId"];
|
|
@@ -603,6 +988,18 @@ type operations = {
|
|
|
603
988
|
};
|
|
604
989
|
};
|
|
605
990
|
listTools: {
|
|
991
|
+
parameters: {
|
|
992
|
+
query?: {
|
|
993
|
+
page?: components["parameters"]["PageParam"];
|
|
994
|
+
limit?: components["parameters"]["LimitParam"];
|
|
995
|
+
sort?: components["parameters"]["SortParam"];
|
|
996
|
+
fields?: components["parameters"]["FieldsParam"];
|
|
997
|
+
include?: components["parameters"]["IncludeParam"];
|
|
998
|
+
q?: components["parameters"]["SearchParam"];
|
|
999
|
+
filter?: components["parameters"]["FilterParam"];
|
|
1000
|
+
or?: components["parameters"]["OrParam"];
|
|
1001
|
+
};
|
|
1002
|
+
};
|
|
606
1003
|
responses: {
|
|
607
1004
|
200: {
|
|
608
1005
|
content: {
|
|
@@ -647,8 +1044,67 @@ type operations = {
|
|
|
647
1044
|
};
|
|
648
1045
|
};
|
|
649
1046
|
};
|
|
1047
|
+
listVoices: {
|
|
1048
|
+
parameters: {
|
|
1049
|
+
query?: {
|
|
1050
|
+
agentId?: string;
|
|
1051
|
+
agentVersionId?: string;
|
|
1052
|
+
gender?: "female" | "male" | "neutral";
|
|
1053
|
+
locale?: string;
|
|
1054
|
+
page?: components["parameters"]["PageParam"];
|
|
1055
|
+
limit?: components["parameters"]["LimitParam"];
|
|
1056
|
+
sort?: components["parameters"]["SortParam"];
|
|
1057
|
+
fields?: components["parameters"]["FieldsParam"];
|
|
1058
|
+
include?: components["parameters"]["IncludeParam"];
|
|
1059
|
+
q?: components["parameters"]["SearchParam"];
|
|
1060
|
+
filter?: components["parameters"]["FilterParam"];
|
|
1061
|
+
or?: components["parameters"]["OrParam"];
|
|
1062
|
+
};
|
|
1063
|
+
header: {
|
|
1064
|
+
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
1065
|
+
};
|
|
1066
|
+
};
|
|
1067
|
+
responses: {
|
|
1068
|
+
200: {
|
|
1069
|
+
content: {
|
|
1070
|
+
"application/json": components["schemas"]["VoiceListResponse"];
|
|
1071
|
+
};
|
|
1072
|
+
};
|
|
1073
|
+
400: {
|
|
1074
|
+
content: {
|
|
1075
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1076
|
+
};
|
|
1077
|
+
};
|
|
1078
|
+
};
|
|
1079
|
+
};
|
|
650
1080
|
};
|
|
651
1081
|
|
|
1082
|
+
type QueryValue = components['schemas']['QueryValue'];
|
|
1083
|
+
type QueryFilterOperators = components['schemas']['QueryFilterOperators'];
|
|
1084
|
+
type QueryFilters = components['schemas']['QueryFilters'];
|
|
1085
|
+
type QueryOrGroups = components['schemas']['QueryOrGroups'];
|
|
1086
|
+
type PaginationMeta = components['schemas']['PaginationMeta'];
|
|
1087
|
+
type QueryBuilderSerializable = {
|
|
1088
|
+
build: () => string;
|
|
1089
|
+
toString?: () => string;
|
|
1090
|
+
};
|
|
1091
|
+
type QueryBuilderInput = string | QueryBuilderSerializable | undefined | null;
|
|
1092
|
+
type ListQueryOptions = Partial<{
|
|
1093
|
+
page: number;
|
|
1094
|
+
limit: number;
|
|
1095
|
+
sort: string | string[];
|
|
1096
|
+
fields: string | string[];
|
|
1097
|
+
include: string | string[];
|
|
1098
|
+
search: string;
|
|
1099
|
+
filter: QueryFilters | QueryBuilderInput;
|
|
1100
|
+
or: QueryOrGroups | QueryBuilderInput;
|
|
1101
|
+
}>;
|
|
1102
|
+
type PaginatedResult<TResponse, TOptions extends ListQueryOptions> = TResponse & {
|
|
1103
|
+
next(): Promise<PaginatedResult<TResponse, TOptions> | null>;
|
|
1104
|
+
prev(): Promise<PaginatedResult<TResponse, TOptions> | null>;
|
|
1105
|
+
page(page: number): Promise<PaginatedResult<TResponse, TOptions>>;
|
|
1106
|
+
reload(): Promise<PaginatedResult<TResponse, TOptions>>;
|
|
1107
|
+
};
|
|
652
1108
|
type ClientConfig = {
|
|
653
1109
|
baseUrl: string;
|
|
654
1110
|
headers?: Record<string, string>;
|
|
@@ -675,6 +1131,7 @@ type Instruction = components['schemas']['Instruction'];
|
|
|
675
1131
|
type CreateInstructionRequest = components['schemas']['CreateInstructionRequest'];
|
|
676
1132
|
type InstructionCreatedResponse = components['schemas']['InstructionCreatedResponse'];
|
|
677
1133
|
type AgentInstructionsResponse = paths['/v1/agents/{agentId}/instructions']['get']['responses'][200]['content']['application/json'];
|
|
1134
|
+
type UpdateInstructionRequest = components['schemas']['UpdateInstructionRequest'];
|
|
678
1135
|
type ConnectPhoneRequest = components['schemas']['ConnectPhoneRequest'];
|
|
679
1136
|
type PhoneAssignmentResponse = components['schemas']['PhoneAssignmentResponse'];
|
|
680
1137
|
type WorkspacePhone = components['schemas']['WorkspacePhone'];
|
|
@@ -682,6 +1139,15 @@ type WorkspacePhonesResponse = components['schemas']['WorkspacePhonesResponse'];
|
|
|
682
1139
|
type WorkspacePhoneChannel = 'voice';
|
|
683
1140
|
type WorkspaceEnableRequest = components['schemas']['WorkspaceEnableRequest'];
|
|
684
1141
|
type WorkspaceEnableResponse = components['schemas']['WorkspaceEnableResponse'];
|
|
1142
|
+
type VoiceSummary = components['schemas']['VoiceSummary'];
|
|
1143
|
+
type VoiceListResponse = components['schemas']['VoiceListResponse'];
|
|
1144
|
+
type AgentSchedule = components['schemas']['AgentSchedule'];
|
|
1145
|
+
type UpdateAgentScheduleRequest = components['schemas']['UpdateAgentScheduleRequest'];
|
|
1146
|
+
type AgentVersionSummary = components['schemas']['AgentVersionSummary'];
|
|
1147
|
+
type AgentVersionDetail = components['schemas']['AgentVersionDetail'];
|
|
1148
|
+
type AgentVersionListResponse = components['schemas']['AgentVersionListResponse'];
|
|
1149
|
+
type CreateAgentVersionRequest = components['schemas']['CreateAgentVersionRequest'];
|
|
1150
|
+
type UpdateAgentVersionRequest = components['schemas']['UpdateAgentVersionRequest'];
|
|
685
1151
|
type ToolSummary = components['schemas']['ToolSummary'];
|
|
686
1152
|
type ExecuteToolRequest = components['schemas']['ExecuteToolRequest'];
|
|
687
1153
|
type ExecuteToolResponse = components['schemas']['ExecuteToolResponse'];
|
|
@@ -712,21 +1178,25 @@ type RetryPolicy = {
|
|
|
712
1178
|
retryOn?: (err: unknown, attempt: number) => boolean;
|
|
713
1179
|
};
|
|
714
1180
|
|
|
1181
|
+
type ListAgentInstructionsOptions = ListQueryOptions & {
|
|
1182
|
+
versionId?: string;
|
|
1183
|
+
};
|
|
715
1184
|
declare function createAgentInstructionsApi(cfg: ClientConfig & {
|
|
716
1185
|
retry?: RetryPolicy;
|
|
717
1186
|
}): {
|
|
718
|
-
list(agentId: string, opts?:
|
|
719
|
-
versionId?: string;
|
|
720
|
-
}): Promise<AgentInstructionsResponse>;
|
|
1187
|
+
list(agentId: string, opts?: ListAgentInstructionsOptions): Promise<PaginatedResult<AgentInstructionsResponse, ListAgentInstructionsOptions>>;
|
|
721
1188
|
create(agentId: string, payload: CreateInstructionRequest): Promise<InstructionCreatedResponse>;
|
|
1189
|
+
update(agentId: string, instructionId: string, payload: UpdateInstructionRequest): Promise<Instruction>;
|
|
1190
|
+
delete(agentId: string, instructionId: string): Promise<void>;
|
|
722
1191
|
};
|
|
723
1192
|
|
|
1193
|
+
type ListAgentKnowledgeOptions = ListQueryOptions;
|
|
724
1194
|
declare function createAgentKnowledgeApi(cfg: ClientConfig & {
|
|
725
1195
|
retry?: RetryPolicy;
|
|
726
1196
|
}): {
|
|
727
1197
|
upload(agentId: string, payload: KnowledgeUploadRequest): Promise<KnowledgeUploadResponse>;
|
|
728
|
-
listBases(agentId: string): Promise<AgentKnowledgeBasesResponse
|
|
729
|
-
listUploads(agentId: string): Promise<AgentKnowledgeUploadsResponse
|
|
1198
|
+
listBases(agentId: string, opts?: ListAgentKnowledgeOptions): Promise<PaginatedResult<AgentKnowledgeBasesResponse, ListAgentKnowledgeOptions>>;
|
|
1199
|
+
listUploads(agentId: string, opts?: ListAgentKnowledgeOptions): Promise<PaginatedResult<AgentKnowledgeUploadsResponse, ListAgentKnowledgeOptions>>;
|
|
730
1200
|
};
|
|
731
1201
|
|
|
732
1202
|
declare function createAgentPhonesApi(cfg: ClientConfig & {
|
|
@@ -736,37 +1206,76 @@ declare function createAgentPhonesApi(cfg: ClientConfig & {
|
|
|
736
1206
|
disconnect(agentId: string, phoneId: string): Promise<void>;
|
|
737
1207
|
};
|
|
738
1208
|
|
|
1209
|
+
declare function createAgentScheduleApi(cfg: ClientConfig & {
|
|
1210
|
+
retry?: RetryPolicy;
|
|
1211
|
+
}): {
|
|
1212
|
+
get(agentId: string): Promise<AgentSchedule>;
|
|
1213
|
+
update(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
|
|
1214
|
+
};
|
|
1215
|
+
|
|
1216
|
+
type ListAgentVersionsOptions = {
|
|
1217
|
+
status?: 'draft' | 'published' | 'archived';
|
|
1218
|
+
} & ListQueryOptions;
|
|
1219
|
+
declare function createAgentVersionsApi(cfg: ClientConfig & {
|
|
1220
|
+
retry?: RetryPolicy;
|
|
1221
|
+
}): {
|
|
1222
|
+
list(agentId: string, opts?: ListAgentVersionsOptions): Promise<PaginatedResult<AgentVersionListResponse, ListAgentVersionsOptions>>;
|
|
1223
|
+
get(agentId: string, versionId: string): Promise<AgentVersionDetail>;
|
|
1224
|
+
create(agentId: string, payload: CreateAgentVersionRequest): Promise<AgentVersionDetail>;
|
|
1225
|
+
update(agentId: string, versionId: string, payload: UpdateAgentVersionRequest): Promise<AgentVersionDetail>;
|
|
1226
|
+
};
|
|
1227
|
+
|
|
739
1228
|
type AgentInstructionsApi = ReturnType<typeof createAgentInstructionsApi>;
|
|
740
1229
|
type AgentKnowledgeApi = ReturnType<typeof createAgentKnowledgeApi>;
|
|
741
1230
|
type AgentPhonesApi = ReturnType<typeof createAgentPhonesApi>;
|
|
1231
|
+
type AgentScheduleApi = ReturnType<typeof createAgentScheduleApi>;
|
|
1232
|
+
type AgentVersionsApi = ReturnType<typeof createAgentVersionsApi>;
|
|
742
1233
|
type AgentInstructionsHelper = ReturnType<typeof bindAgentInstructions>;
|
|
743
1234
|
type AgentKnowledgeHelper = ReturnType<typeof bindAgentKnowledge>;
|
|
744
1235
|
type AgentPhonesHelper = ReturnType<typeof bindAgentPhones>;
|
|
745
|
-
|
|
1236
|
+
type AgentScheduleHelper = ReturnType<typeof bindAgentSchedule>;
|
|
1237
|
+
type AgentVersionsHelper = ReturnType<typeof bindAgentVersions>;
|
|
1238
|
+
type AgentBase = AgentSummary & Partial<Omit<AgentDetail, keyof AgentSummary>>;
|
|
1239
|
+
interface AgentEntity extends AgentBase {
|
|
746
1240
|
instructions: AgentInstructionsHelper;
|
|
747
1241
|
knowledge: AgentKnowledgeHelper;
|
|
748
1242
|
phones: AgentPhonesHelper;
|
|
1243
|
+
schedule: AgentScheduleHelper;
|
|
1244
|
+
versions: AgentVersionsHelper;
|
|
1245
|
+
save(patch: UpdateAgentRequest): Promise<AgentEntity>;
|
|
1246
|
+
delete(): Promise<void>;
|
|
749
1247
|
refresh(): Promise<AgentEntity>;
|
|
750
1248
|
}
|
|
751
1249
|
type AgentEntityFactoryOptions = {
|
|
752
1250
|
instructionsApi: AgentInstructionsApi;
|
|
753
1251
|
knowledgeApi: AgentKnowledgeApi;
|
|
754
1252
|
phonesApi: AgentPhonesApi;
|
|
1253
|
+
scheduleApi: AgentScheduleApi;
|
|
1254
|
+
versionsApi: AgentVersionsApi;
|
|
755
1255
|
reload(agentId: string): Promise<AgentEntity>;
|
|
1256
|
+
updateAgent(agentId: string, payload: UpdateAgentRequest): Promise<AgentEntity>;
|
|
1257
|
+
deleteAgent(agentId: string): Promise<void>;
|
|
756
1258
|
};
|
|
757
1259
|
declare const bindAgentInstructions: (api: AgentInstructionsApi, agentId: string) => {
|
|
758
|
-
list(opts?: {
|
|
759
|
-
versionId?: string;
|
|
760
|
-
}): Promise<{
|
|
1260
|
+
list(opts?: ListAgentInstructionsOptions): Promise<PaginatedResult<{
|
|
761
1261
|
data: components["schemas"]["Instruction"][];
|
|
762
1262
|
versionId?: string;
|
|
763
|
-
}
|
|
1263
|
+
}, ListAgentInstructionsOptions>>;
|
|
764
1264
|
create(payload: CreateInstructionRequest): Promise<{
|
|
765
1265
|
id: string;
|
|
766
1266
|
versionId: string;
|
|
767
1267
|
order: number;
|
|
768
1268
|
createdAt: string;
|
|
769
1269
|
}>;
|
|
1270
|
+
update(instructionId: string, payload: UpdateInstructionRequest): Promise<{
|
|
1271
|
+
id: string;
|
|
1272
|
+
versionId: string;
|
|
1273
|
+
order: number;
|
|
1274
|
+
content: string;
|
|
1275
|
+
createdAt?: string;
|
|
1276
|
+
updatedAt?: string;
|
|
1277
|
+
}>;
|
|
1278
|
+
delete(instructionId: string): Promise<void>;
|
|
770
1279
|
};
|
|
771
1280
|
declare const bindAgentKnowledge: (api: AgentKnowledgeApi, agentId: string) => {
|
|
772
1281
|
upload(payload: KnowledgeUploadRequest): Promise<{
|
|
@@ -778,11 +1287,20 @@ declare const bindAgentKnowledge: (api: AgentKnowledgeApi, agentId: string) => {
|
|
|
778
1287
|
user_id: string;
|
|
779
1288
|
status: "queued" | "processing" | "completed" | "failed";
|
|
780
1289
|
}>;
|
|
781
|
-
listBases(): Promise<{
|
|
1290
|
+
listBases(opts?: ListAgentKnowledgeOptions): Promise<PaginatedResult<{
|
|
782
1291
|
data?: components["schemas"]["KnowledgeBaseSummary"][];
|
|
783
1292
|
agent_id?: string;
|
|
784
|
-
}
|
|
785
|
-
|
|
1293
|
+
}, Partial<{
|
|
1294
|
+
page: number;
|
|
1295
|
+
limit: number;
|
|
1296
|
+
sort: string | string[];
|
|
1297
|
+
fields: string | string[];
|
|
1298
|
+
include: string | string[];
|
|
1299
|
+
search: string;
|
|
1300
|
+
filter: QueryFilters | QueryBuilderInput;
|
|
1301
|
+
or: QueryOrGroups | QueryBuilderInput;
|
|
1302
|
+
}>>>;
|
|
1303
|
+
listUploads(opts?: ListAgentKnowledgeOptions): Promise<PaginatedResult<{
|
|
786
1304
|
data: ({
|
|
787
1305
|
document_id: string;
|
|
788
1306
|
file_path: string;
|
|
@@ -792,7 +1310,16 @@ declare const bindAgentKnowledge: (api: AgentKnowledgeApi, agentId: string) => {
|
|
|
792
1310
|
user_id: string;
|
|
793
1311
|
status: "queued" | "processing" | "completed" | "failed";
|
|
794
1312
|
})[];
|
|
795
|
-
}
|
|
1313
|
+
}, Partial<{
|
|
1314
|
+
page: number;
|
|
1315
|
+
limit: number;
|
|
1316
|
+
sort: string | string[];
|
|
1317
|
+
fields: string | string[];
|
|
1318
|
+
include: string | string[];
|
|
1319
|
+
search: string;
|
|
1320
|
+
filter: QueryFilters | QueryBuilderInput;
|
|
1321
|
+
or: QueryOrGroups | QueryBuilderInput;
|
|
1322
|
+
}>>>;
|
|
796
1323
|
};
|
|
797
1324
|
declare const bindAgentPhones: (api: AgentPhonesApi, agentId: string) => {
|
|
798
1325
|
connect(payload: ConnectPhoneRequest): Promise<{
|
|
@@ -805,21 +1332,101 @@ declare const bindAgentPhones: (api: AgentPhonesApi, agentId: string) => {
|
|
|
805
1332
|
}>;
|
|
806
1333
|
disconnect(phoneId: string): Promise<void>;
|
|
807
1334
|
};
|
|
808
|
-
declare const
|
|
1335
|
+
declare const bindAgentSchedule: (api: AgentScheduleApi, agentId: string) => {
|
|
1336
|
+
get(): Promise<{
|
|
1337
|
+
agentId: string;
|
|
1338
|
+
timezone: string;
|
|
1339
|
+
rules: components["schemas"]["AgentScheduleRule"][];
|
|
1340
|
+
metadata?: {
|
|
1341
|
+
[key: string]: unknown;
|
|
1342
|
+
};
|
|
1343
|
+
}>;
|
|
1344
|
+
update(payload: UpdateAgentScheduleRequest): Promise<{
|
|
1345
|
+
agentId: string;
|
|
1346
|
+
timezone: string;
|
|
1347
|
+
rules: components["schemas"]["AgentScheduleRule"][];
|
|
1348
|
+
metadata?: {
|
|
1349
|
+
[key: string]: unknown;
|
|
1350
|
+
};
|
|
1351
|
+
}>;
|
|
1352
|
+
};
|
|
1353
|
+
declare const bindAgentVersions: (api: AgentVersionsApi, agentId: string) => {
|
|
1354
|
+
list(opts?: ListAgentVersionsOptions): Promise<PaginatedResult<{
|
|
1355
|
+
data: components["schemas"]["AgentVersionSummary"][];
|
|
1356
|
+
meta?: components["schemas"]["PaginationMeta"];
|
|
1357
|
+
}, ListAgentVersionsOptions>>;
|
|
1358
|
+
get(versionId: string): Promise<{
|
|
1359
|
+
versionId: string;
|
|
1360
|
+
agentId: string;
|
|
1361
|
+
label: string;
|
|
1362
|
+
status: "draft" | "published" | "archived";
|
|
1363
|
+
isActive?: boolean;
|
|
1364
|
+
createdAt: string;
|
|
1365
|
+
updatedAt?: string;
|
|
1366
|
+
publishedAt?: string | null;
|
|
1367
|
+
} & {
|
|
1368
|
+
description?: string;
|
|
1369
|
+
metadata?: {
|
|
1370
|
+
[key: string]: unknown;
|
|
1371
|
+
};
|
|
1372
|
+
instructionsVersionId?: string;
|
|
1373
|
+
}>;
|
|
1374
|
+
create(payload: CreateAgentVersionRequest): Promise<{
|
|
1375
|
+
versionId: string;
|
|
1376
|
+
agentId: string;
|
|
1377
|
+
label: string;
|
|
1378
|
+
status: "draft" | "published" | "archived";
|
|
1379
|
+
isActive?: boolean;
|
|
1380
|
+
createdAt: string;
|
|
1381
|
+
updatedAt?: string;
|
|
1382
|
+
publishedAt?: string | null;
|
|
1383
|
+
} & {
|
|
1384
|
+
description?: string;
|
|
1385
|
+
metadata?: {
|
|
1386
|
+
[key: string]: unknown;
|
|
1387
|
+
};
|
|
1388
|
+
instructionsVersionId?: string;
|
|
1389
|
+
}>;
|
|
1390
|
+
update(versionId: string, payload: UpdateAgentVersionRequest): Promise<{
|
|
1391
|
+
versionId: string;
|
|
1392
|
+
agentId: string;
|
|
1393
|
+
label: string;
|
|
1394
|
+
status: "draft" | "published" | "archived";
|
|
1395
|
+
isActive?: boolean;
|
|
1396
|
+
createdAt: string;
|
|
1397
|
+
updatedAt?: string;
|
|
1398
|
+
publishedAt?: string | null;
|
|
1399
|
+
} & {
|
|
1400
|
+
description?: string;
|
|
1401
|
+
metadata?: {
|
|
1402
|
+
[key: string]: unknown;
|
|
1403
|
+
};
|
|
1404
|
+
instructionsVersionId?: string;
|
|
1405
|
+
}>;
|
|
1406
|
+
};
|
|
1407
|
+
type AgentSnapshot = AgentDetail | AgentSummary;
|
|
1408
|
+
declare const createAgentEntity: (dto: AgentSnapshot, options: AgentEntityFactoryOptions) => AgentEntity;
|
|
809
1409
|
|
|
810
1410
|
type AgentEntityDependencies = {
|
|
811
1411
|
instructionsApi: ReturnType<typeof createAgentInstructionsApi>;
|
|
812
1412
|
knowledgeApi: ReturnType<typeof createAgentKnowledgeApi>;
|
|
813
1413
|
phonesApi: ReturnType<typeof createAgentPhonesApi>;
|
|
1414
|
+
scheduleApi: ReturnType<typeof createAgentScheduleApi>;
|
|
1415
|
+
versionsApi: ReturnType<typeof createAgentVersionsApi>;
|
|
814
1416
|
};
|
|
1417
|
+
type ListAgentsOptions = ListQueryOptions;
|
|
815
1418
|
type AgentsApi = {
|
|
816
|
-
list(): Promise<AgentListResponse
|
|
1419
|
+
list(options?: ListAgentsOptions): Promise<PaginatedResult<AgentListResponse, ListAgentsOptions>>;
|
|
817
1420
|
get(agentId: string): Promise<AgentDetail>;
|
|
818
1421
|
create(payload: CreateAgentRequest): Promise<AgentDetail>;
|
|
819
1422
|
update(agentId: string, payload: UpdateAgentRequest): Promise<AgentDetail>;
|
|
820
|
-
delete(
|
|
1423
|
+
delete(agent: string | AgentEntity): Promise<void>;
|
|
1424
|
+
};
|
|
1425
|
+
type AgentListResponseWithEntities = Omit<AgentListResponse, 'data'> & {
|
|
1426
|
+
data: AgentEntity[];
|
|
821
1427
|
};
|
|
822
|
-
type AgentsApiWithEntities = Omit<AgentsApi, 'get' | 'create' | 'update'> & {
|
|
1428
|
+
type AgentsApiWithEntities = Omit<AgentsApi, 'get' | 'create' | 'update' | 'list'> & {
|
|
1429
|
+
list(options?: ListAgentsOptions): Promise<PaginatedResult<AgentListResponseWithEntities, ListAgentsOptions>>;
|
|
823
1430
|
get(agentId: string): Promise<AgentEntity>;
|
|
824
1431
|
create(payload: CreateAgentRequest): Promise<AgentEntity>;
|
|
825
1432
|
update(agentId: string, payload: UpdateAgentRequest): Promise<AgentEntity>;
|
|
@@ -828,20 +1435,36 @@ declare function createAgentsApi(cfg: ClientConfig & {
|
|
|
828
1435
|
retry?: RetryPolicy;
|
|
829
1436
|
}, relatedApis?: AgentEntityDependencies): AgentsApi | AgentsApiWithEntities;
|
|
830
1437
|
|
|
831
|
-
|
|
1438
|
+
type ListToolsOptions = ListQueryOptions;
|
|
1439
|
+
declare function createToolsApi(cfg: ClientConfig & {
|
|
832
1440
|
retry?: RetryPolicy;
|
|
833
1441
|
}): {
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
}): Promise<WorkspacePhonesResponse>;
|
|
837
|
-
enable(workspaceId: string, payload: WorkspaceEnableRequest): Promise<WorkspaceEnableResponse>;
|
|
1442
|
+
list(options?: ListToolsOptions): Promise<PaginatedResult<ToolsCatalogResponse, ListToolsOptions>>;
|
|
1443
|
+
execute(toolId: string, payload: ExecuteToolRequest): Promise<ExecuteToolResponse>;
|
|
838
1444
|
};
|
|
839
1445
|
|
|
840
|
-
|
|
1446
|
+
type ListVoicesOptions = ListQueryOptions & {
|
|
1447
|
+
agentId?: string;
|
|
1448
|
+
agentVersionId?: string;
|
|
1449
|
+
gender?: 'female' | 'male' | 'neutral';
|
|
1450
|
+
locale?: string;
|
|
1451
|
+
page?: number;
|
|
1452
|
+
pageSize?: number;
|
|
1453
|
+
};
|
|
1454
|
+
declare function createVoicesApi(cfg: ClientConfig & {
|
|
841
1455
|
retry?: RetryPolicy;
|
|
842
1456
|
}): {
|
|
843
|
-
list(): Promise<
|
|
844
|
-
|
|
1457
|
+
list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
|
|
1458
|
+
};
|
|
1459
|
+
|
|
1460
|
+
type ListWorkspacePhonesOptions = ListQueryOptions & {
|
|
1461
|
+
channel?: WorkspacePhoneChannel;
|
|
1462
|
+
};
|
|
1463
|
+
declare function createWorkspacesApi(cfg: ClientConfig & {
|
|
1464
|
+
retry?: RetryPolicy;
|
|
1465
|
+
}): {
|
|
1466
|
+
listPhones(workspaceId: string, opts?: ListWorkspacePhonesOptions): Promise<PaginatedResult<WorkspacePhonesResponse, ListWorkspacePhonesOptions>>;
|
|
1467
|
+
enable(workspaceId: string, payload: WorkspaceEnableRequest): Promise<WorkspaceEnableResponse>;
|
|
845
1468
|
};
|
|
846
1469
|
|
|
847
1470
|
declare function createClient(initialCfg: ClientConfig & {
|
|
@@ -863,71 +1486,109 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
863
1486
|
agents: {
|
|
864
1487
|
knowledge: {
|
|
865
1488
|
upload(agentId: string, payload: KnowledgeUploadRequest): Promise<KnowledgeUploadResponse>;
|
|
866
|
-
listBases(agentId: string): Promise<AgentKnowledgeBasesResponse
|
|
867
|
-
listUploads(agentId: string): Promise<AgentKnowledgeUploadsResponse
|
|
1489
|
+
listBases(agentId: string, opts?: ListAgentKnowledgeOptions): Promise<PaginatedResult<AgentKnowledgeBasesResponse, ListAgentKnowledgeOptions>>;
|
|
1490
|
+
listUploads(agentId: string, opts?: ListAgentKnowledgeOptions): Promise<PaginatedResult<AgentKnowledgeUploadsResponse, ListAgentKnowledgeOptions>>;
|
|
868
1491
|
};
|
|
869
1492
|
instructions: {
|
|
870
|
-
list(agentId: string, opts?:
|
|
871
|
-
versionId?: string;
|
|
872
|
-
}): Promise<AgentInstructionsResponse>;
|
|
1493
|
+
list(agentId: string, opts?: ListAgentInstructionsOptions): Promise<PaginatedResult<AgentInstructionsResponse, ListAgentInstructionsOptions>>;
|
|
873
1494
|
create(agentId: string, payload: CreateInstructionRequest): Promise<InstructionCreatedResponse>;
|
|
1495
|
+
update(agentId: string, instructionId: string, payload: UpdateInstructionRequest): Promise<Instruction>;
|
|
1496
|
+
delete(agentId: string, instructionId: string): Promise<void>;
|
|
874
1497
|
};
|
|
875
1498
|
phones: {
|
|
876
1499
|
connect(agentId: string, payload: ConnectPhoneRequest): Promise<PhoneAssignmentResponse>;
|
|
877
1500
|
disconnect(agentId: string, phoneId: string): Promise<void>;
|
|
878
1501
|
};
|
|
879
|
-
|
|
880
|
-
|
|
1502
|
+
schedule: {
|
|
1503
|
+
get(agentId: string): Promise<AgentSchedule>;
|
|
1504
|
+
update(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
|
|
1505
|
+
};
|
|
1506
|
+
versions: {
|
|
1507
|
+
list(agentId: string, opts?: ListAgentVersionsOptions): Promise<PaginatedResult<AgentVersionListResponse, ListAgentVersionsOptions>>;
|
|
1508
|
+
get(agentId: string, versionId: string): Promise<AgentVersionDetail>;
|
|
1509
|
+
create(agentId: string, payload: CreateAgentVersionRequest): Promise<AgentVersionDetail>;
|
|
1510
|
+
update(agentId: string, versionId: string, payload: UpdateAgentVersionRequest): Promise<AgentVersionDetail>;
|
|
1511
|
+
};
|
|
1512
|
+
delete: (agent: string | AgentEntity) => Promise<void>;
|
|
1513
|
+
list(options?: ListAgentsOptions): Promise<PaginatedResult<Omit<{
|
|
1514
|
+
data: components["schemas"]["AgentSummary"][];
|
|
1515
|
+
meta: components["schemas"]["PaginationMeta"];
|
|
1516
|
+
}, "data"> & {
|
|
1517
|
+
data: AgentEntity[];
|
|
1518
|
+
}, ListAgentsOptions>>;
|
|
881
1519
|
get(agentId: string): Promise<AgentEntity>;
|
|
882
1520
|
create(payload: CreateAgentRequest): Promise<AgentEntity>;
|
|
883
1521
|
update(agentId: string, payload: UpdateAgentRequest): Promise<AgentEntity>;
|
|
884
1522
|
};
|
|
885
1523
|
workspaces: {
|
|
886
|
-
listPhones(workspaceId: string, opts?:
|
|
887
|
-
channel?: WorkspacePhoneChannel;
|
|
888
|
-
}): Promise<WorkspacePhonesResponse>;
|
|
1524
|
+
listPhones(workspaceId: string, opts?: ListWorkspacePhonesOptions): Promise<PaginatedResult<WorkspacePhonesResponse, ListWorkspacePhonesOptions>>;
|
|
889
1525
|
enable(workspaceId: string, payload: WorkspaceEnableRequest): Promise<WorkspaceEnableResponse>;
|
|
890
1526
|
};
|
|
891
1527
|
tools: {
|
|
892
|
-
list(): Promise<ToolsCatalogResponse
|
|
1528
|
+
list(options?: ListToolsOptions): Promise<PaginatedResult<ToolsCatalogResponse, ListToolsOptions>>;
|
|
893
1529
|
execute(toolId: string, payload: ExecuteToolRequest): Promise<ExecuteToolResponse>;
|
|
894
1530
|
};
|
|
1531
|
+
voices: {
|
|
1532
|
+
list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
|
|
1533
|
+
};
|
|
895
1534
|
};
|
|
896
1535
|
};
|
|
897
1536
|
agents: {
|
|
898
1537
|
knowledge: {
|
|
899
1538
|
upload(agentId: string, payload: KnowledgeUploadRequest): Promise<KnowledgeUploadResponse>;
|
|
900
|
-
listBases(agentId: string): Promise<AgentKnowledgeBasesResponse
|
|
901
|
-
listUploads(agentId: string): Promise<AgentKnowledgeUploadsResponse
|
|
1539
|
+
listBases(agentId: string, opts?: ListAgentKnowledgeOptions): Promise<PaginatedResult<AgentKnowledgeBasesResponse, ListAgentKnowledgeOptions>>;
|
|
1540
|
+
listUploads(agentId: string, opts?: ListAgentKnowledgeOptions): Promise<PaginatedResult<AgentKnowledgeUploadsResponse, ListAgentKnowledgeOptions>>;
|
|
902
1541
|
};
|
|
903
1542
|
instructions: {
|
|
904
|
-
list(agentId: string, opts?:
|
|
905
|
-
versionId?: string;
|
|
906
|
-
}): Promise<AgentInstructionsResponse>;
|
|
1543
|
+
list(agentId: string, opts?: ListAgentInstructionsOptions): Promise<PaginatedResult<AgentInstructionsResponse, ListAgentInstructionsOptions>>;
|
|
907
1544
|
create(agentId: string, payload: CreateInstructionRequest): Promise<InstructionCreatedResponse>;
|
|
1545
|
+
update(agentId: string, instructionId: string, payload: UpdateInstructionRequest): Promise<Instruction>;
|
|
1546
|
+
delete(agentId: string, instructionId: string): Promise<void>;
|
|
908
1547
|
};
|
|
909
1548
|
phones: {
|
|
910
1549
|
connect(agentId: string, payload: ConnectPhoneRequest): Promise<PhoneAssignmentResponse>;
|
|
911
1550
|
disconnect(agentId: string, phoneId: string): Promise<void>;
|
|
912
1551
|
};
|
|
913
|
-
|
|
914
|
-
|
|
1552
|
+
schedule: {
|
|
1553
|
+
get(agentId: string): Promise<AgentSchedule>;
|
|
1554
|
+
update(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
|
|
1555
|
+
};
|
|
1556
|
+
versions: {
|
|
1557
|
+
list(agentId: string, opts?: ListAgentVersionsOptions): Promise<PaginatedResult<AgentVersionListResponse, ListAgentVersionsOptions>>;
|
|
1558
|
+
get(agentId: string, versionId: string): Promise<AgentVersionDetail>;
|
|
1559
|
+
create(agentId: string, payload: CreateAgentVersionRequest): Promise<AgentVersionDetail>;
|
|
1560
|
+
update(agentId: string, versionId: string, payload: UpdateAgentVersionRequest): Promise<AgentVersionDetail>;
|
|
1561
|
+
};
|
|
1562
|
+
delete: (agent: string | AgentEntity) => Promise<void>;
|
|
1563
|
+
list(options?: ListAgentsOptions): Promise<PaginatedResult<Omit<{
|
|
1564
|
+
data: components["schemas"]["AgentSummary"][];
|
|
1565
|
+
meta: components["schemas"]["PaginationMeta"];
|
|
1566
|
+
}, "data"> & {
|
|
1567
|
+
data: AgentEntity[];
|
|
1568
|
+
}, ListAgentsOptions>>;
|
|
915
1569
|
get(agentId: string): Promise<AgentEntity>;
|
|
916
1570
|
create(payload: CreateAgentRequest): Promise<AgentEntity>;
|
|
917
1571
|
update(agentId: string, payload: UpdateAgentRequest): Promise<AgentEntity>;
|
|
918
1572
|
};
|
|
919
1573
|
workspaces: {
|
|
920
|
-
listPhones(workspaceId: string, opts?:
|
|
921
|
-
channel?: WorkspacePhoneChannel;
|
|
922
|
-
}): Promise<WorkspacePhonesResponse>;
|
|
1574
|
+
listPhones(workspaceId: string, opts?: ListWorkspacePhonesOptions): Promise<PaginatedResult<WorkspacePhonesResponse, ListWorkspacePhonesOptions>>;
|
|
923
1575
|
enable(workspaceId: string, payload: WorkspaceEnableRequest): Promise<WorkspaceEnableResponse>;
|
|
924
1576
|
};
|
|
925
1577
|
tools: {
|
|
926
|
-
list(): Promise<ToolsCatalogResponse
|
|
1578
|
+
list(options?: ListToolsOptions): Promise<PaginatedResult<ToolsCatalogResponse, ListToolsOptions>>;
|
|
927
1579
|
execute(toolId: string, payload: ExecuteToolRequest): Promise<ExecuteToolResponse>;
|
|
928
1580
|
};
|
|
1581
|
+
voices: {
|
|
1582
|
+
list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
|
|
1583
|
+
};
|
|
929
1584
|
};
|
|
930
1585
|
|
|
1586
|
+
type QueryParamPrimitive = string | number | boolean;
|
|
1587
|
+
type QueryParamValue = QueryParamPrimitive | QueryParamPrimitive[] | null | undefined;
|
|
1588
|
+
type QueryInit = string | URLSearchParams | Record<string, QueryParamValue>;
|
|
1589
|
+
type FetchOptions = RequestInit & {
|
|
1590
|
+
query?: QueryInit;
|
|
1591
|
+
};
|
|
931
1592
|
declare function createHttp(cfg: ClientConfig & {
|
|
932
1593
|
retry?: RetryPolicy;
|
|
933
1594
|
}): {
|
|
@@ -938,9 +1599,9 @@ declare function createHttp(cfg: ClientConfig & {
|
|
|
938
1599
|
error?: (...a: any[]) => void;
|
|
939
1600
|
};
|
|
940
1601
|
retry: RetryPolicy;
|
|
941
|
-
doFetch: (url: string, init?:
|
|
1602
|
+
doFetch: (url: string, init?: FetchOptions) => Promise<Response>;
|
|
942
1603
|
buildHeaders: (extra?: HeadersInit) => Record<string, string>;
|
|
943
1604
|
resolveWorkspaceId: () => string;
|
|
944
1605
|
};
|
|
945
1606
|
|
|
946
|
-
export { type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentInstructionsResponse, type AgentKnowledgeBasesResponse, type AgentKnowledgeUploadsResponse, type AgentListResponse, type AgentSummary, type AgentsApi, type AgentsApiWithEntities, type ClientConfig, type ConnectPhoneRequest, type CreateAgentRequest, type CreateInstructionRequest, type ErrorResponse, type ExecuteToolRequest, type ExecuteToolResponse, HttpError, type Instruction, type InstructionCreatedResponse, type KnowledgeUploadListResponse, type KnowledgeUploadRequest, type KnowledgeUploadResponse, NetworkError, type PhoneAssignmentResponse, type RetryPolicy, TimeoutError, type ToolSummary, type ToolsCatalogResponse, type UpdateAgentRequest, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, bindAgentInstructions, bindAgentKnowledge, bindAgentPhones, createAgentEntity, createAgentInstructionsApi, createAgentKnowledgeApi, createAgentPhonesApi, createAgentsApi, createClient, createHttp, createToolsApi, createWorkspacesApi };
|
|
1607
|
+
export { type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentInstructionsResponse, type AgentKnowledgeBasesResponse, type AgentKnowledgeUploadsResponse, type AgentListResponse, type AgentSchedule, type AgentSummary, type AgentVersionDetail, type AgentVersionListResponse, type AgentVersionSummary, type AgentsApi, type AgentsApiWithEntities, type ClientConfig, type ConnectPhoneRequest, type CreateAgentRequest, type CreateAgentVersionRequest, type CreateInstructionRequest, type ErrorResponse, type ExecuteToolRequest, type ExecuteToolResponse, HttpError, type Instruction, type InstructionCreatedResponse, type KnowledgeUploadListResponse, type KnowledgeUploadRequest, type KnowledgeUploadResponse, type ListAgentInstructionsOptions, type ListAgentKnowledgeOptions, type ListAgentVersionsOptions, type ListAgentsOptions, type ListQueryOptions, type ListToolsOptions, type ListVoicesOptions, type ListWorkspacePhonesOptions, NetworkError, type PaginatedResult, type PaginationMeta, type PhoneAssignmentResponse, type QueryBuilderInput, type QueryBuilderSerializable, type QueryFilterOperators, type QueryFilters, type QueryOrGroups, type QueryValue, type RetryPolicy, TimeoutError, type ToolSummary, type ToolsCatalogResponse, type UpdateAgentRequest, type UpdateAgentScheduleRequest, type UpdateAgentVersionRequest, type UpdateInstructionRequest, type VoiceListResponse, type VoiceSummary, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, bindAgentInstructions, bindAgentKnowledge, bindAgentPhones, bindAgentSchedule, bindAgentVersions, createAgentEntity, createAgentInstructionsApi, createAgentKnowledgeApi, createAgentPhonesApi, createAgentScheduleApi, createAgentVersionsApi, createAgentsApi, createClient, createHttp, createToolsApi, createVoicesApi, createWorkspacesApi };
|