@getsupervisor/agents-studio-sdk 1.3.0 → 1.5.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/CHANGELOG.md +51 -0
- package/README.md +31 -23
- package/dist/index.cjs +401 -128
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +283 -937
- package/dist/index.d.ts +283 -937
- package/dist/index.js +399 -126
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,105 +1,54 @@
|
|
|
1
|
-
type paths = {
|
|
2
|
-
"/v1/agents": {
|
|
3
|
-
get: operations["listAgents"];
|
|
4
|
-
post: operations["createAgent"];
|
|
5
|
-
};
|
|
6
|
-
"/v1/agents/{agentId}": {
|
|
7
|
-
get: operations["getAgentDetail"];
|
|
8
|
-
delete: operations["deleteAgent"];
|
|
9
|
-
patch: operations["updateAgent"];
|
|
10
|
-
};
|
|
11
|
-
"/v1/agents/{agentId}/knowledge/upload": {
|
|
12
|
-
post: operations["uploadAgentKnowledge"];
|
|
13
|
-
};
|
|
14
|
-
"/v1/agents/{agentId}/knowledge/bases": {
|
|
15
|
-
get: operations["listAgentKnowledgeBases"];
|
|
16
|
-
};
|
|
17
|
-
"/v1/agents/{agentId}/knowledge/uploads": {
|
|
18
|
-
get: operations["listAgentKnowledgeUploads"];
|
|
19
|
-
};
|
|
20
|
-
"/v1/agents/{agentId}/instructions": {
|
|
21
|
-
get: operations["listAgentInstructions"];
|
|
22
|
-
post: operations["createAgentInstruction"];
|
|
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
|
-
};
|
|
40
|
-
"/v1/agents/{agentId}/phones": {
|
|
41
|
-
post: operations["connectAgentPhone"];
|
|
42
|
-
};
|
|
43
|
-
"/v1/agents/{agentId}/phones/{phoneId}": {
|
|
44
|
-
delete: operations["disconnectAgentPhone"];
|
|
45
|
-
};
|
|
46
|
-
"/v1/workspaces/{workspaceId}/phones": {
|
|
47
|
-
get: operations["listWorkspacePhones"];
|
|
48
|
-
};
|
|
49
|
-
"/v1/workspaces/{workspaceId}/enable": {
|
|
50
|
-
post: operations["enableWorkspace"];
|
|
51
|
-
};
|
|
52
|
-
"/v1/tools": {
|
|
53
|
-
get: operations["listTools"];
|
|
54
|
-
};
|
|
55
|
-
"/v1/tools/{toolId}/execute": {
|
|
56
|
-
post: operations["executeTool"];
|
|
57
|
-
};
|
|
58
|
-
"/v1/voices": {
|
|
59
|
-
get: operations["listVoices"];
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
1
|
type components = {
|
|
63
2
|
schemas: {
|
|
64
3
|
AgentDetail: {
|
|
65
4
|
agentId: string;
|
|
66
5
|
name: string;
|
|
6
|
+
agentType: "chat" | "voice";
|
|
67
7
|
workspaceId: string;
|
|
68
|
-
provider
|
|
8
|
+
provider?: string;
|
|
69
9
|
versionId?: string;
|
|
70
10
|
status: "inactive" | "training" | "active" | "archived";
|
|
71
|
-
|
|
11
|
+
languageCode?: string;
|
|
12
|
+
description?: string | null;
|
|
13
|
+
toneId?: string | null;
|
|
14
|
+
messageStyleId?: string | null;
|
|
15
|
+
ownerUserId?: string | null;
|
|
16
|
+
knowledgeBaseIds?: string[];
|
|
17
|
+
tags?: string[];
|
|
18
|
+
tools?: {
|
|
19
|
+
identifier: string;
|
|
20
|
+
displayName: string;
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
}[];
|
|
23
|
+
voiceConfig?: ({
|
|
72
24
|
voiceId?: string;
|
|
73
|
-
llmId?: string;
|
|
74
25
|
webhookUrl?: string;
|
|
26
|
+
llmId?: string | null;
|
|
27
|
+
}) | null;
|
|
28
|
+
createdAt: string;
|
|
29
|
+
updatedAt: string;
|
|
30
|
+
metadata?: {
|
|
31
|
+
[key: string]: unknown;
|
|
75
32
|
};
|
|
76
|
-
knowledgeBaseIds?: string[];
|
|
77
|
-
tools?: string[];
|
|
78
|
-
createdAt?: string;
|
|
79
|
-
updatedAt?: string;
|
|
80
33
|
};
|
|
81
34
|
PaginationMeta: {
|
|
82
35
|
total: number;
|
|
83
36
|
page: number;
|
|
84
37
|
limit: number;
|
|
85
38
|
hasNext: boolean;
|
|
39
|
+
hasPrevious?: boolean;
|
|
86
40
|
};
|
|
87
|
-
|
|
88
|
-
|
|
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
|
-
};
|
|
41
|
+
QueryFilters: string;
|
|
42
|
+
QueryOrGroups: string;
|
|
97
43
|
AgentSummary: {
|
|
98
44
|
agentId: string;
|
|
99
45
|
name: string;
|
|
46
|
+
agentType: "chat" | "voice";
|
|
100
47
|
status: "inactive" | "training" | "active" | "archived";
|
|
101
48
|
workspaceId: string;
|
|
49
|
+
provider?: string | null;
|
|
102
50
|
createdAt: string;
|
|
51
|
+
updatedAt: string;
|
|
103
52
|
};
|
|
104
53
|
AgentListResponse: {
|
|
105
54
|
data: components["schemas"]["AgentSummary"][];
|
|
@@ -107,55 +56,37 @@ type components = {
|
|
|
107
56
|
};
|
|
108
57
|
CreateAgentRequest: {
|
|
109
58
|
name: string;
|
|
110
|
-
|
|
59
|
+
description?: string | null;
|
|
60
|
+
agentType: "chat" | "voice";
|
|
111
61
|
languageCode: string;
|
|
112
|
-
|
|
62
|
+
provider?: string | null;
|
|
63
|
+
status?: "inactive" | "training" | "active";
|
|
64
|
+
avatarUrl?: string | null;
|
|
65
|
+
debounceDelayMs?: number | null;
|
|
113
66
|
metadata?: {
|
|
114
67
|
[key: string]: unknown;
|
|
115
68
|
};
|
|
116
69
|
};
|
|
70
|
+
AgentTagRequest: {
|
|
71
|
+
tagId: string;
|
|
72
|
+
};
|
|
73
|
+
AgentTagsResponse: {
|
|
74
|
+
agentId: string;
|
|
75
|
+
tags: string[];
|
|
76
|
+
};
|
|
117
77
|
UpdateAgentRequest: {
|
|
118
78
|
name?: string;
|
|
119
79
|
status?: "inactive" | "training" | "active" | "archived";
|
|
80
|
+
description?: string | null;
|
|
81
|
+
toneId?: string | null;
|
|
82
|
+
messageStyleId?: string | null;
|
|
83
|
+
tags?: string[];
|
|
84
|
+
debounceDelayMs?: number | null;
|
|
85
|
+
ownerUserId?: string | null;
|
|
120
86
|
metadata?: {
|
|
121
87
|
[key: string]: unknown;
|
|
122
88
|
};
|
|
123
|
-
provider?: string;
|
|
124
|
-
};
|
|
125
|
-
KnowledgeBaseSummary: {
|
|
126
|
-
id: string;
|
|
127
|
-
providerId?: string;
|
|
128
|
-
name: string;
|
|
129
|
-
documents?: number;
|
|
130
|
-
lastSyncedAt?: string;
|
|
131
|
-
};
|
|
132
|
-
KnowledgeUploadRequest: {
|
|
133
|
-
document_id: string;
|
|
134
|
-
file_path: string;
|
|
135
|
-
file_name: string;
|
|
136
|
-
source: string;
|
|
137
|
-
drive_file_id?: string | null;
|
|
138
|
-
user_id: string;
|
|
139
|
-
};
|
|
140
|
-
KnowledgeUploadResponse: {
|
|
141
|
-
document_id: string;
|
|
142
|
-
file_path: string;
|
|
143
|
-
file_name: string;
|
|
144
|
-
source: string;
|
|
145
|
-
drive_file_id?: string | null;
|
|
146
|
-
user_id: string;
|
|
147
|
-
status: "queued" | "processing" | "completed" | "failed";
|
|
148
|
-
};
|
|
149
|
-
KnowledgeUploadListResponse: {
|
|
150
|
-
data: ({
|
|
151
|
-
document_id: string;
|
|
152
|
-
file_path: string;
|
|
153
|
-
file_name: string;
|
|
154
|
-
source: string;
|
|
155
|
-
drive_file_id?: string | null;
|
|
156
|
-
user_id: string;
|
|
157
|
-
status: "queued" | "processing" | "completed" | "failed";
|
|
158
|
-
})[];
|
|
89
|
+
provider?: string | null;
|
|
159
90
|
};
|
|
160
91
|
Instruction: {
|
|
161
92
|
id: string;
|
|
@@ -165,6 +96,11 @@ type components = {
|
|
|
165
96
|
createdAt?: string;
|
|
166
97
|
updatedAt?: string;
|
|
167
98
|
};
|
|
99
|
+
InstructionListResponse: {
|
|
100
|
+
data: components["schemas"]["Instruction"][];
|
|
101
|
+
versionId?: string | null;
|
|
102
|
+
meta?: components["schemas"]["PaginationMeta"];
|
|
103
|
+
};
|
|
168
104
|
CreateInstructionRequest: {
|
|
169
105
|
order: number;
|
|
170
106
|
content: string;
|
|
@@ -277,7 +213,7 @@ type components = {
|
|
|
277
213
|
WorkspacePhone: {
|
|
278
214
|
id: string;
|
|
279
215
|
external_id: string;
|
|
280
|
-
channel?: "voice"
|
|
216
|
+
channel?: "voice";
|
|
281
217
|
supports_outbound?: boolean | null;
|
|
282
218
|
assigned_to?: string | null;
|
|
283
219
|
last_used_at?: string | null;
|
|
@@ -293,6 +229,69 @@ type components = {
|
|
|
293
229
|
description?: string;
|
|
294
230
|
enabled: boolean;
|
|
295
231
|
};
|
|
232
|
+
ToolListResponse: {
|
|
233
|
+
data: components["schemas"]["ToolSummary"][];
|
|
234
|
+
meta: components["schemas"]["PaginationMeta"];
|
|
235
|
+
};
|
|
236
|
+
ToolResourceSummary: {
|
|
237
|
+
id: string;
|
|
238
|
+
toolId: string;
|
|
239
|
+
type: "document" | "media" | "file";
|
|
240
|
+
title?: string;
|
|
241
|
+
status: "pending" | "processing" | "ready" | "failed";
|
|
242
|
+
sizeBytes?: number | null;
|
|
243
|
+
createdAt: string;
|
|
244
|
+
updatedAt?: string | null;
|
|
245
|
+
metadata?: {
|
|
246
|
+
[key: string]: unknown;
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
ToolResourceListResponse: {
|
|
250
|
+
data: components["schemas"]["ToolResourceSummary"][];
|
|
251
|
+
meta: components["schemas"]["PaginationMeta"];
|
|
252
|
+
};
|
|
253
|
+
ToolResourceUploadRequest: {
|
|
254
|
+
file: string;
|
|
255
|
+
type?: "document" | "media" | "file";
|
|
256
|
+
title?: string;
|
|
257
|
+
metadata?: {
|
|
258
|
+
[key: string]: unknown;
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
ToolResourceUploadResponse: {
|
|
262
|
+
resourceId: string;
|
|
263
|
+
status: "queued" | "processing" | "completed" | "failed";
|
|
264
|
+
message?: string;
|
|
265
|
+
toolId?: string;
|
|
266
|
+
};
|
|
267
|
+
ToolResourceReloadResponse: {
|
|
268
|
+
resourceId: string;
|
|
269
|
+
status: "queued" | "processing" | "completed" | "failed";
|
|
270
|
+
toolId?: string;
|
|
271
|
+
message?: string;
|
|
272
|
+
};
|
|
273
|
+
ToolConnectionRequest: {
|
|
274
|
+
type?: "oauth2" | "api_key" | "credentials";
|
|
275
|
+
authorizationCode?: string | null;
|
|
276
|
+
redirectUri?: string | null;
|
|
277
|
+
credentials?: {
|
|
278
|
+
[key: string]: unknown;
|
|
279
|
+
};
|
|
280
|
+
metadata?: {
|
|
281
|
+
[key: string]: unknown;
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
ToolConnectionResponse: {
|
|
285
|
+
status: "connected" | "pending" | "requires_action";
|
|
286
|
+
toolId?: string | null;
|
|
287
|
+
connectionId?: string | null;
|
|
288
|
+
authorizationUrl?: string | null;
|
|
289
|
+
expiresAt?: string | null;
|
|
290
|
+
message?: string | null;
|
|
291
|
+
metadata?: {
|
|
292
|
+
[key: string]: unknown;
|
|
293
|
+
};
|
|
294
|
+
};
|
|
296
295
|
ExecuteToolRequest: {
|
|
297
296
|
payload: {
|
|
298
297
|
[key: string]: unknown;
|
|
@@ -337,10 +336,14 @@ type components = {
|
|
|
337
336
|
PhoneId: string;
|
|
338
337
|
InstructionId: string;
|
|
339
338
|
VersionId: string;
|
|
339
|
+
TagId: string;
|
|
340
340
|
WorkspaceId: string;
|
|
341
341
|
ToolId: string;
|
|
342
|
+
ResourceId: string;
|
|
342
343
|
PageParam?: number;
|
|
343
344
|
LimitParam?: number;
|
|
345
|
+
Page?: number;
|
|
346
|
+
Limit?: number;
|
|
344
347
|
SortParam?: string;
|
|
345
348
|
FieldsParam?: string;
|
|
346
349
|
IncludeParam?: string;
|
|
@@ -352,737 +355,11 @@ type components = {
|
|
|
352
355
|
headers: never;
|
|
353
356
|
pathItems: never;
|
|
354
357
|
};
|
|
355
|
-
type operations = {
|
|
356
|
-
listAgents: {
|
|
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
|
-
};
|
|
368
|
-
header: {
|
|
369
|
-
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
370
|
-
};
|
|
371
|
-
};
|
|
372
|
-
responses: {
|
|
373
|
-
200: {
|
|
374
|
-
content: {
|
|
375
|
-
"application/json": components["schemas"]["AgentListResponse"];
|
|
376
|
-
};
|
|
377
|
-
};
|
|
378
|
-
};
|
|
379
|
-
};
|
|
380
|
-
createAgent: {
|
|
381
|
-
parameters: {
|
|
382
|
-
header: {
|
|
383
|
-
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
384
|
-
};
|
|
385
|
-
};
|
|
386
|
-
requestBody: {
|
|
387
|
-
content: {
|
|
388
|
-
"application/json": components["schemas"]["CreateAgentRequest"];
|
|
389
|
-
};
|
|
390
|
-
};
|
|
391
|
-
responses: {
|
|
392
|
-
201: {
|
|
393
|
-
content: {
|
|
394
|
-
"application/json": components["schemas"]["AgentDetail"];
|
|
395
|
-
};
|
|
396
|
-
};
|
|
397
|
-
400: {
|
|
398
|
-
content: {
|
|
399
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
400
|
-
};
|
|
401
|
-
};
|
|
402
|
-
404: {
|
|
403
|
-
content: {
|
|
404
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
405
|
-
};
|
|
406
|
-
};
|
|
407
|
-
409: {
|
|
408
|
-
content: {
|
|
409
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
410
|
-
};
|
|
411
|
-
};
|
|
412
|
-
};
|
|
413
|
-
};
|
|
414
|
-
getAgentDetail: {
|
|
415
|
-
parameters: {
|
|
416
|
-
header: {
|
|
417
|
-
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
418
|
-
};
|
|
419
|
-
path: {
|
|
420
|
-
agentId: components["parameters"]["AgentId"];
|
|
421
|
-
};
|
|
422
|
-
};
|
|
423
|
-
responses: {
|
|
424
|
-
200: {
|
|
425
|
-
content: {
|
|
426
|
-
"application/json": components["schemas"]["AgentDetail"];
|
|
427
|
-
};
|
|
428
|
-
};
|
|
429
|
-
404: {
|
|
430
|
-
content: {
|
|
431
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
432
|
-
};
|
|
433
|
-
};
|
|
434
|
-
};
|
|
435
|
-
};
|
|
436
|
-
deleteAgent: {
|
|
437
|
-
parameters: {
|
|
438
|
-
header: {
|
|
439
|
-
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
440
|
-
};
|
|
441
|
-
path: {
|
|
442
|
-
agentId: components["parameters"]["AgentId"];
|
|
443
|
-
};
|
|
444
|
-
};
|
|
445
|
-
responses: {
|
|
446
|
-
204: {
|
|
447
|
-
content: never;
|
|
448
|
-
};
|
|
449
|
-
409: {
|
|
450
|
-
content: {
|
|
451
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
452
|
-
};
|
|
453
|
-
};
|
|
454
|
-
};
|
|
455
|
-
};
|
|
456
|
-
updateAgent: {
|
|
457
|
-
parameters: {
|
|
458
|
-
header: {
|
|
459
|
-
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
460
|
-
};
|
|
461
|
-
path: {
|
|
462
|
-
agentId: components["parameters"]["AgentId"];
|
|
463
|
-
};
|
|
464
|
-
};
|
|
465
|
-
requestBody: {
|
|
466
|
-
content: {
|
|
467
|
-
"application/json": components["schemas"]["UpdateAgentRequest"];
|
|
468
|
-
};
|
|
469
|
-
};
|
|
470
|
-
responses: {
|
|
471
|
-
200: {
|
|
472
|
-
content: {
|
|
473
|
-
"application/json": components["schemas"]["AgentDetail"];
|
|
474
|
-
};
|
|
475
|
-
};
|
|
476
|
-
400: {
|
|
477
|
-
content: {
|
|
478
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
479
|
-
};
|
|
480
|
-
};
|
|
481
|
-
404: {
|
|
482
|
-
content: {
|
|
483
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
484
|
-
};
|
|
485
|
-
};
|
|
486
|
-
409: {
|
|
487
|
-
content: {
|
|
488
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
489
|
-
};
|
|
490
|
-
};
|
|
491
|
-
};
|
|
492
|
-
};
|
|
493
|
-
uploadAgentKnowledge: {
|
|
494
|
-
parameters: {
|
|
495
|
-
header: {
|
|
496
|
-
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
497
|
-
};
|
|
498
|
-
path: {
|
|
499
|
-
agentId: components["parameters"]["AgentId"];
|
|
500
|
-
};
|
|
501
|
-
};
|
|
502
|
-
requestBody: {
|
|
503
|
-
content: {
|
|
504
|
-
"application/json": components["schemas"]["KnowledgeUploadRequest"];
|
|
505
|
-
};
|
|
506
|
-
};
|
|
507
|
-
responses: {
|
|
508
|
-
202: {
|
|
509
|
-
content: {
|
|
510
|
-
"application/json": components["schemas"]["KnowledgeUploadResponse"];
|
|
511
|
-
};
|
|
512
|
-
};
|
|
513
|
-
400: {
|
|
514
|
-
content: {
|
|
515
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
516
|
-
};
|
|
517
|
-
};
|
|
518
|
-
409: {
|
|
519
|
-
content: {
|
|
520
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
521
|
-
};
|
|
522
|
-
};
|
|
523
|
-
};
|
|
524
|
-
};
|
|
525
|
-
listAgentKnowledgeBases: {
|
|
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
|
-
};
|
|
537
|
-
header: {
|
|
538
|
-
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
539
|
-
};
|
|
540
|
-
path: {
|
|
541
|
-
agentId: components["parameters"]["AgentId"];
|
|
542
|
-
};
|
|
543
|
-
};
|
|
544
|
-
responses: {
|
|
545
|
-
200: {
|
|
546
|
-
content: {
|
|
547
|
-
"application/json": {
|
|
548
|
-
data?: components["schemas"]["KnowledgeBaseSummary"][];
|
|
549
|
-
agent_id?: string;
|
|
550
|
-
};
|
|
551
|
-
};
|
|
552
|
-
};
|
|
553
|
-
404: {
|
|
554
|
-
content: {
|
|
555
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
556
|
-
};
|
|
557
|
-
};
|
|
558
|
-
};
|
|
559
|
-
};
|
|
560
|
-
listAgentKnowledgeUploads: {
|
|
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
|
-
};
|
|
572
|
-
header: {
|
|
573
|
-
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
574
|
-
};
|
|
575
|
-
path: {
|
|
576
|
-
agentId: components["parameters"]["AgentId"];
|
|
577
|
-
};
|
|
578
|
-
};
|
|
579
|
-
responses: {
|
|
580
|
-
200: {
|
|
581
|
-
content: {
|
|
582
|
-
"application/json": components["schemas"]["KnowledgeUploadListResponse"];
|
|
583
|
-
};
|
|
584
|
-
};
|
|
585
|
-
};
|
|
586
|
-
};
|
|
587
|
-
listAgentInstructions: {
|
|
588
|
-
parameters: {
|
|
589
|
-
query?: {
|
|
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"];
|
|
598
|
-
};
|
|
599
|
-
header: {
|
|
600
|
-
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
601
|
-
};
|
|
602
|
-
path: {
|
|
603
|
-
agentId: components["parameters"]["AgentId"];
|
|
604
|
-
};
|
|
605
|
-
};
|
|
606
|
-
responses: {
|
|
607
|
-
200: {
|
|
608
|
-
content: {
|
|
609
|
-
"application/json": {
|
|
610
|
-
data: components["schemas"]["Instruction"][];
|
|
611
|
-
versionId?: string;
|
|
612
|
-
};
|
|
613
|
-
};
|
|
614
|
-
};
|
|
615
|
-
404: {
|
|
616
|
-
content: {
|
|
617
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
618
|
-
};
|
|
619
|
-
};
|
|
620
|
-
};
|
|
621
|
-
};
|
|
622
|
-
createAgentInstruction: {
|
|
623
|
-
parameters: {
|
|
624
|
-
header: {
|
|
625
|
-
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
626
|
-
};
|
|
627
|
-
path: {
|
|
628
|
-
agentId: components["parameters"]["AgentId"];
|
|
629
|
-
};
|
|
630
|
-
};
|
|
631
|
-
requestBody: {
|
|
632
|
-
content: {
|
|
633
|
-
"application/json": components["schemas"]["CreateInstructionRequest"];
|
|
634
|
-
};
|
|
635
|
-
};
|
|
636
|
-
responses: {
|
|
637
|
-
201: {
|
|
638
|
-
content: {
|
|
639
|
-
"application/json": components["schemas"]["InstructionCreatedResponse"];
|
|
640
|
-
};
|
|
641
|
-
};
|
|
642
|
-
400: {
|
|
643
|
-
content: {
|
|
644
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
645
|
-
};
|
|
646
|
-
};
|
|
647
|
-
409: {
|
|
648
|
-
content: {
|
|
649
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
650
|
-
};
|
|
651
|
-
};
|
|
652
|
-
};
|
|
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
|
-
};
|
|
873
|
-
connectAgentPhone: {
|
|
874
|
-
parameters: {
|
|
875
|
-
header: {
|
|
876
|
-
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
877
|
-
};
|
|
878
|
-
path: {
|
|
879
|
-
agentId: components["parameters"]["AgentId"];
|
|
880
|
-
};
|
|
881
|
-
};
|
|
882
|
-
requestBody: {
|
|
883
|
-
content: {
|
|
884
|
-
"application/json": components["schemas"]["ConnectPhoneRequest"];
|
|
885
|
-
};
|
|
886
|
-
};
|
|
887
|
-
responses: {
|
|
888
|
-
200: {
|
|
889
|
-
content: {
|
|
890
|
-
"application/json": components["schemas"]["PhoneAssignmentResponse"];
|
|
891
|
-
};
|
|
892
|
-
};
|
|
893
|
-
400: {
|
|
894
|
-
content: {
|
|
895
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
896
|
-
};
|
|
897
|
-
};
|
|
898
|
-
404: {
|
|
899
|
-
content: {
|
|
900
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
901
|
-
};
|
|
902
|
-
};
|
|
903
|
-
409: {
|
|
904
|
-
content: {
|
|
905
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
906
|
-
};
|
|
907
|
-
};
|
|
908
|
-
};
|
|
909
|
-
};
|
|
910
|
-
disconnectAgentPhone: {
|
|
911
|
-
parameters: {
|
|
912
|
-
header: {
|
|
913
|
-
"x-workspace-id": components["parameters"]["XWorkspaceId"];
|
|
914
|
-
};
|
|
915
|
-
path: {
|
|
916
|
-
agentId: components["parameters"]["AgentId"];
|
|
917
|
-
phoneId: components["parameters"]["PhoneId"];
|
|
918
|
-
};
|
|
919
|
-
};
|
|
920
|
-
responses: {
|
|
921
|
-
204: {
|
|
922
|
-
content: never;
|
|
923
|
-
};
|
|
924
|
-
404: {
|
|
925
|
-
content: {
|
|
926
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
927
|
-
};
|
|
928
|
-
};
|
|
929
|
-
409: {
|
|
930
|
-
content: {
|
|
931
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
932
|
-
};
|
|
933
|
-
};
|
|
934
|
-
};
|
|
935
|
-
};
|
|
936
|
-
listWorkspacePhones: {
|
|
937
|
-
parameters: {
|
|
938
|
-
query?: {
|
|
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"];
|
|
948
|
-
};
|
|
949
|
-
path: {
|
|
950
|
-
workspaceId: components["parameters"]["WorkspaceId"];
|
|
951
|
-
};
|
|
952
|
-
};
|
|
953
|
-
responses: {
|
|
954
|
-
200: {
|
|
955
|
-
content: {
|
|
956
|
-
"application/json": components["schemas"]["WorkspacePhonesResponse"];
|
|
957
|
-
};
|
|
958
|
-
};
|
|
959
|
-
};
|
|
960
|
-
};
|
|
961
|
-
enableWorkspace: {
|
|
962
|
-
parameters: {
|
|
963
|
-
path: {
|
|
964
|
-
workspaceId: components["parameters"]["WorkspaceId"];
|
|
965
|
-
};
|
|
966
|
-
};
|
|
967
|
-
requestBody: {
|
|
968
|
-
content: {
|
|
969
|
-
"application/json": components["schemas"]["WorkspaceEnableRequest"];
|
|
970
|
-
};
|
|
971
|
-
};
|
|
972
|
-
responses: {
|
|
973
|
-
200: {
|
|
974
|
-
content: {
|
|
975
|
-
"application/json": components["schemas"]["WorkspaceEnableResponse"];
|
|
976
|
-
};
|
|
977
|
-
};
|
|
978
|
-
400: {
|
|
979
|
-
content: {
|
|
980
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
981
|
-
};
|
|
982
|
-
};
|
|
983
|
-
502: {
|
|
984
|
-
content: {
|
|
985
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
986
|
-
};
|
|
987
|
-
};
|
|
988
|
-
};
|
|
989
|
-
};
|
|
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
|
-
};
|
|
1003
|
-
responses: {
|
|
1004
|
-
200: {
|
|
1005
|
-
content: {
|
|
1006
|
-
"application/json": {
|
|
1007
|
-
data?: components["schemas"]["ToolSummary"][];
|
|
1008
|
-
};
|
|
1009
|
-
};
|
|
1010
|
-
};
|
|
1011
|
-
};
|
|
1012
|
-
};
|
|
1013
|
-
executeTool: {
|
|
1014
|
-
parameters: {
|
|
1015
|
-
path: {
|
|
1016
|
-
toolId: components["parameters"]["ToolId"];
|
|
1017
|
-
};
|
|
1018
|
-
};
|
|
1019
|
-
requestBody: {
|
|
1020
|
-
content: {
|
|
1021
|
-
"application/json": components["schemas"]["ExecuteToolRequest"];
|
|
1022
|
-
};
|
|
1023
|
-
};
|
|
1024
|
-
responses: {
|
|
1025
|
-
200: {
|
|
1026
|
-
content: {
|
|
1027
|
-
"application/json": components["schemas"]["ExecuteToolResponse"];
|
|
1028
|
-
};
|
|
1029
|
-
};
|
|
1030
|
-
400: {
|
|
1031
|
-
content: {
|
|
1032
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
1033
|
-
};
|
|
1034
|
-
};
|
|
1035
|
-
404: {
|
|
1036
|
-
content: {
|
|
1037
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
1038
|
-
};
|
|
1039
|
-
};
|
|
1040
|
-
409: {
|
|
1041
|
-
content: {
|
|
1042
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
1043
|
-
};
|
|
1044
|
-
};
|
|
1045
|
-
};
|
|
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
|
-
};
|
|
1080
|
-
};
|
|
1081
358
|
|
|
1082
|
-
type QueryValue =
|
|
1083
|
-
type QueryFilterOperators =
|
|
1084
|
-
type QueryFilters = components['schemas']['QueryFilters']
|
|
1085
|
-
type QueryOrGroups = components['schemas']['QueryOrGroups']
|
|
359
|
+
type QueryValue = string | number | boolean | string[];
|
|
360
|
+
type QueryFilterOperators = Record<string, QueryValue>;
|
|
361
|
+
type QueryFilters = components['schemas']['QueryFilters'] | Record<string, QueryValue | QueryFilterOperators>;
|
|
362
|
+
type QueryOrGroups = components['schemas']['QueryOrGroups'] | Record<string, QueryFilters>;
|
|
1086
363
|
type PaginationMeta = components['schemas']['PaginationMeta'];
|
|
1087
364
|
type QueryBuilderSerializable = {
|
|
1088
365
|
build: () => string;
|
|
@@ -1099,6 +376,12 @@ type ListQueryOptions = Partial<{
|
|
|
1099
376
|
filter: QueryFilters | QueryBuilderInput;
|
|
1100
377
|
or: QueryOrGroups | QueryBuilderInput;
|
|
1101
378
|
}>;
|
|
379
|
+
type PaginatedResult<TResponse, TOptions extends ListQueryOptions> = TResponse & {
|
|
380
|
+
next(): Promise<PaginatedResult<TResponse, TOptions> | null>;
|
|
381
|
+
prev(): Promise<PaginatedResult<TResponse, TOptions> | null>;
|
|
382
|
+
page(page: number): Promise<PaginatedResult<TResponse, TOptions>>;
|
|
383
|
+
reload(): Promise<PaginatedResult<TResponse, TOptions>>;
|
|
384
|
+
};
|
|
1102
385
|
type ClientConfig = {
|
|
1103
386
|
baseUrl: string;
|
|
1104
387
|
headers?: Record<string, string>;
|
|
@@ -1116,15 +399,12 @@ type AgentSummary = components['schemas']['AgentSummary'];
|
|
|
1116
399
|
type AgentListResponse = components['schemas']['AgentListResponse'];
|
|
1117
400
|
type CreateAgentRequest = components['schemas']['CreateAgentRequest'];
|
|
1118
401
|
type UpdateAgentRequest = components['schemas']['UpdateAgentRequest'];
|
|
1119
|
-
type
|
|
1120
|
-
type
|
|
1121
|
-
type KnowledgeUploadListResponse = components['schemas']['KnowledgeUploadListResponse'];
|
|
1122
|
-
type AgentKnowledgeBasesResponse = paths['/v1/agents/{agentId}/knowledge/bases']['get']['responses'][200]['content']['application/json'];
|
|
1123
|
-
type AgentKnowledgeUploadsResponse = paths['/v1/agents/{agentId}/knowledge/uploads']['get']['responses'][200]['content']['application/json'];
|
|
402
|
+
type AgentTagRequest = components['schemas']['AgentTagRequest'];
|
|
403
|
+
type AgentTagsResponse = components['schemas']['AgentTagsResponse'];
|
|
1124
404
|
type Instruction = components['schemas']['Instruction'];
|
|
405
|
+
type InstructionListResponse = components['schemas']['InstructionListResponse'];
|
|
1125
406
|
type CreateInstructionRequest = components['schemas']['CreateInstructionRequest'];
|
|
1126
407
|
type InstructionCreatedResponse = components['schemas']['InstructionCreatedResponse'];
|
|
1127
|
-
type AgentInstructionsResponse = paths['/v1/agents/{agentId}/instructions']['get']['responses'][200]['content']['application/json'];
|
|
1128
408
|
type UpdateInstructionRequest = components['schemas']['UpdateInstructionRequest'];
|
|
1129
409
|
type ConnectPhoneRequest = components['schemas']['ConnectPhoneRequest'];
|
|
1130
410
|
type PhoneAssignmentResponse = components['schemas']['PhoneAssignmentResponse'];
|
|
@@ -1142,10 +422,17 @@ type AgentVersionDetail = components['schemas']['AgentVersionDetail'];
|
|
|
1142
422
|
type AgentVersionListResponse = components['schemas']['AgentVersionListResponse'];
|
|
1143
423
|
type CreateAgentVersionRequest = components['schemas']['CreateAgentVersionRequest'];
|
|
1144
424
|
type UpdateAgentVersionRequest = components['schemas']['UpdateAgentVersionRequest'];
|
|
1145
|
-
type ToolSummary = components['schemas']['ToolSummary'];
|
|
1146
425
|
type ExecuteToolRequest = components['schemas']['ExecuteToolRequest'];
|
|
1147
426
|
type ExecuteToolResponse = components['schemas']['ExecuteToolResponse'];
|
|
1148
|
-
type
|
|
427
|
+
type ToolSummary = components['schemas']['ToolSummary'];
|
|
428
|
+
type ToolListResponse = components['schemas']['ToolListResponse'];
|
|
429
|
+
type ToolResourceSummary = components['schemas']['ToolResourceSummary'];
|
|
430
|
+
type ToolResourceListResponse = components['schemas']['ToolResourceListResponse'];
|
|
431
|
+
type ToolResourceUploadRequest = components['schemas']['ToolResourceUploadRequest'];
|
|
432
|
+
type ToolResourceUploadResponse = components['schemas']['ToolResourceUploadResponse'];
|
|
433
|
+
type ToolResourceReloadResponse = components['schemas']['ToolResourceReloadResponse'];
|
|
434
|
+
type ToolConnectionRequest = components['schemas']['ToolConnectionRequest'];
|
|
435
|
+
type ToolConnectionResponse = components['schemas']['ToolConnectionResponse'];
|
|
1149
436
|
type ErrorResponse = components['schemas']['ErrorResponse'];
|
|
1150
437
|
|
|
1151
438
|
declare class HttpError extends Error {
|
|
@@ -1178,21 +465,12 @@ type ListAgentInstructionsOptions = ListQueryOptions & {
|
|
|
1178
465
|
declare function createAgentInstructionsApi(cfg: ClientConfig & {
|
|
1179
466
|
retry?: RetryPolicy;
|
|
1180
467
|
}): {
|
|
1181
|
-
list(agentId: string, opts?: ListAgentInstructionsOptions): Promise<
|
|
468
|
+
list(agentId: string, opts?: ListAgentInstructionsOptions): Promise<PaginatedResult<InstructionListResponse, ListAgentInstructionsOptions>>;
|
|
1182
469
|
create(agentId: string, payload: CreateInstructionRequest): Promise<InstructionCreatedResponse>;
|
|
1183
470
|
update(agentId: string, instructionId: string, payload: UpdateInstructionRequest): Promise<Instruction>;
|
|
1184
471
|
delete(agentId: string, instructionId: string): Promise<void>;
|
|
1185
472
|
};
|
|
1186
473
|
|
|
1187
|
-
type ListAgentKnowledgeOptions = ListQueryOptions;
|
|
1188
|
-
declare function createAgentKnowledgeApi(cfg: ClientConfig & {
|
|
1189
|
-
retry?: RetryPolicy;
|
|
1190
|
-
}): {
|
|
1191
|
-
upload(agentId: string, payload: KnowledgeUploadRequest): Promise<KnowledgeUploadResponse>;
|
|
1192
|
-
listBases(agentId: string, opts?: ListAgentKnowledgeOptions): Promise<AgentKnowledgeBasesResponse>;
|
|
1193
|
-
listUploads(agentId: string, opts?: ListAgentKnowledgeOptions): Promise<AgentKnowledgeUploadsResponse>;
|
|
1194
|
-
};
|
|
1195
|
-
|
|
1196
474
|
declare function createAgentPhonesApi(cfg: ClientConfig & {
|
|
1197
475
|
retry?: RetryPolicy;
|
|
1198
476
|
}): {
|
|
@@ -1207,50 +485,68 @@ declare function createAgentScheduleApi(cfg: ClientConfig & {
|
|
|
1207
485
|
update(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
|
|
1208
486
|
};
|
|
1209
487
|
|
|
488
|
+
declare function createAgentTagsApi(cfg: ClientConfig & {
|
|
489
|
+
retry?: RetryPolicy;
|
|
490
|
+
}): {
|
|
491
|
+
readonly add: (agentId: string, payload: AgentTagRequest) => Promise<AgentTagsResponse>;
|
|
492
|
+
readonly remove: (agentId: string, tagId: string) => Promise<void>;
|
|
493
|
+
};
|
|
494
|
+
|
|
1210
495
|
type ListAgentVersionsOptions = {
|
|
1211
496
|
status?: 'draft' | 'published' | 'archived';
|
|
1212
497
|
} & ListQueryOptions;
|
|
498
|
+
type ListAgentVersionInstructionsOptions = ListQueryOptions;
|
|
1213
499
|
declare function createAgentVersionsApi(cfg: ClientConfig & {
|
|
1214
500
|
retry?: RetryPolicy;
|
|
1215
501
|
}): {
|
|
1216
|
-
list(agentId: string, opts?: ListAgentVersionsOptions): Promise<AgentVersionListResponse
|
|
502
|
+
list(agentId: string, opts?: ListAgentVersionsOptions): Promise<PaginatedResult<AgentVersionListResponse, ListAgentVersionsOptions>>;
|
|
1217
503
|
get(agentId: string, versionId: string): Promise<AgentVersionDetail>;
|
|
1218
504
|
create(agentId: string, payload: CreateAgentVersionRequest): Promise<AgentVersionDetail>;
|
|
1219
505
|
update(agentId: string, versionId: string, payload: UpdateAgentVersionRequest): Promise<AgentVersionDetail>;
|
|
506
|
+
delete(agentId: string, versionId: string): Promise<void>;
|
|
507
|
+
listInstructions(agentId: string, versionId: string, opts?: ListAgentVersionInstructionsOptions): Promise<InstructionListResponse>;
|
|
508
|
+
createInstruction(agentId: string, versionId: string, payload: CreateInstructionRequest): Promise<InstructionCreatedResponse>;
|
|
509
|
+
updateInstruction(agentId: string, versionId: string, instructionId: string, payload: UpdateInstructionRequest): Promise<Instruction>;
|
|
510
|
+
deleteInstruction(agentId: string, versionId: string, instructionId: string): Promise<void>;
|
|
1220
511
|
};
|
|
1221
512
|
|
|
1222
513
|
type AgentInstructionsApi = ReturnType<typeof createAgentInstructionsApi>;
|
|
1223
|
-
type
|
|
514
|
+
type AgentTagsApi = ReturnType<typeof createAgentTagsApi>;
|
|
1224
515
|
type AgentPhonesApi = ReturnType<typeof createAgentPhonesApi>;
|
|
1225
516
|
type AgentScheduleApi = ReturnType<typeof createAgentScheduleApi>;
|
|
1226
517
|
type AgentVersionsApi = ReturnType<typeof createAgentVersionsApi>;
|
|
1227
518
|
type AgentInstructionsHelper = ReturnType<typeof bindAgentInstructions>;
|
|
1228
|
-
type
|
|
519
|
+
type AgentTagsHelper = ReturnType<typeof bindAgentTags>;
|
|
1229
520
|
type AgentPhonesHelper = ReturnType<typeof bindAgentPhones>;
|
|
1230
521
|
type AgentScheduleHelper = ReturnType<typeof bindAgentSchedule>;
|
|
1231
522
|
type AgentVersionsHelper = ReturnType<typeof bindAgentVersions>;
|
|
1232
523
|
type AgentBase = AgentSummary & Partial<Omit<AgentDetail, keyof AgentSummary>>;
|
|
1233
524
|
interface AgentEntity extends AgentBase {
|
|
1234
525
|
instructions: AgentInstructionsHelper;
|
|
1235
|
-
|
|
526
|
+
tagAssignments: AgentTagsHelper;
|
|
1236
527
|
phones: AgentPhonesHelper;
|
|
1237
528
|
schedule: AgentScheduleHelper;
|
|
1238
529
|
versions: AgentVersionsHelper;
|
|
530
|
+
save(patch: UpdateAgentRequest): Promise<AgentEntity>;
|
|
531
|
+
delete(): Promise<void>;
|
|
1239
532
|
refresh(): Promise<AgentEntity>;
|
|
1240
533
|
}
|
|
1241
534
|
type AgentEntityFactoryOptions = {
|
|
1242
535
|
instructionsApi: AgentInstructionsApi;
|
|
1243
|
-
|
|
536
|
+
tagsApi: AgentTagsApi;
|
|
1244
537
|
phonesApi: AgentPhonesApi;
|
|
1245
538
|
scheduleApi: AgentScheduleApi;
|
|
1246
539
|
versionsApi: AgentVersionsApi;
|
|
1247
540
|
reload(agentId: string): Promise<AgentEntity>;
|
|
541
|
+
updateAgent(agentId: string, payload: UpdateAgentRequest): Promise<AgentEntity>;
|
|
542
|
+
deleteAgent(agentId: string): Promise<void>;
|
|
1248
543
|
};
|
|
1249
544
|
declare const bindAgentInstructions: (api: AgentInstructionsApi, agentId: string) => {
|
|
1250
|
-
list(opts?: ListAgentInstructionsOptions): Promise<{
|
|
545
|
+
list(opts?: ListAgentInstructionsOptions): Promise<PaginatedResult<{
|
|
1251
546
|
data: components["schemas"]["Instruction"][];
|
|
1252
|
-
versionId?: string;
|
|
1253
|
-
|
|
547
|
+
versionId?: string | null;
|
|
548
|
+
meta?: components["schemas"]["PaginationMeta"];
|
|
549
|
+
}, ListAgentInstructionsOptions>>;
|
|
1254
550
|
create(payload: CreateInstructionRequest): Promise<{
|
|
1255
551
|
id: string;
|
|
1256
552
|
versionId: string;
|
|
@@ -1267,31 +563,9 @@ declare const bindAgentInstructions: (api: AgentInstructionsApi, agentId: string
|
|
|
1267
563
|
}>;
|
|
1268
564
|
delete(instructionId: string): Promise<void>;
|
|
1269
565
|
};
|
|
1270
|
-
declare const
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
file_path: string;
|
|
1274
|
-
file_name: string;
|
|
1275
|
-
source: string;
|
|
1276
|
-
drive_file_id?: string | null;
|
|
1277
|
-
user_id: string;
|
|
1278
|
-
status: "queued" | "processing" | "completed" | "failed";
|
|
1279
|
-
}>;
|
|
1280
|
-
listBases(opts?: ListAgentKnowledgeOptions): Promise<{
|
|
1281
|
-
data?: components["schemas"]["KnowledgeBaseSummary"][];
|
|
1282
|
-
agent_id?: string;
|
|
1283
|
-
}>;
|
|
1284
|
-
listUploads(opts?: ListAgentKnowledgeOptions): Promise<{
|
|
1285
|
-
data: ({
|
|
1286
|
-
document_id: string;
|
|
1287
|
-
file_path: string;
|
|
1288
|
-
file_name: string;
|
|
1289
|
-
source: string;
|
|
1290
|
-
drive_file_id?: string | null;
|
|
1291
|
-
user_id: string;
|
|
1292
|
-
status: "queued" | "processing" | "completed" | "failed";
|
|
1293
|
-
})[];
|
|
1294
|
-
}>;
|
|
566
|
+
declare const bindAgentTags: (api: AgentTagsApi, agentId: string) => {
|
|
567
|
+
add(tagId: string): Promise<AgentTagsResponse>;
|
|
568
|
+
remove(tagId: string): Promise<void>;
|
|
1295
569
|
};
|
|
1296
570
|
declare const bindAgentPhones: (api: AgentPhonesApi, agentId: string) => {
|
|
1297
571
|
connect(payload: ConnectPhoneRequest): Promise<{
|
|
@@ -1323,10 +597,10 @@ declare const bindAgentSchedule: (api: AgentScheduleApi, agentId: string) => {
|
|
|
1323
597
|
}>;
|
|
1324
598
|
};
|
|
1325
599
|
declare const bindAgentVersions: (api: AgentVersionsApi, agentId: string) => {
|
|
1326
|
-
list(opts?: ListAgentVersionsOptions): Promise<{
|
|
600
|
+
list(opts?: ListAgentVersionsOptions): Promise<PaginatedResult<{
|
|
1327
601
|
data: components["schemas"]["AgentVersionSummary"][];
|
|
1328
602
|
meta?: components["schemas"]["PaginationMeta"];
|
|
1329
|
-
}
|
|
603
|
+
}, ListAgentVersionsOptions>>;
|
|
1330
604
|
get(versionId: string): Promise<{
|
|
1331
605
|
versionId: string;
|
|
1332
606
|
agentId: string;
|
|
@@ -1375,30 +649,53 @@ declare const bindAgentVersions: (api: AgentVersionsApi, agentId: string) => {
|
|
|
1375
649
|
};
|
|
1376
650
|
instructionsVersionId?: string;
|
|
1377
651
|
}>;
|
|
652
|
+
delete(versionId: string): Promise<void>;
|
|
653
|
+
instructions(versionId: string): {
|
|
654
|
+
readonly list: (opts?: ListAgentVersionInstructionsOptions) => Promise<{
|
|
655
|
+
data: components["schemas"]["Instruction"][];
|
|
656
|
+
versionId?: string | null;
|
|
657
|
+
meta?: components["schemas"]["PaginationMeta"];
|
|
658
|
+
}>;
|
|
659
|
+
readonly create: (payload: CreateInstructionRequest) => Promise<{
|
|
660
|
+
id: string;
|
|
661
|
+
versionId: string;
|
|
662
|
+
order: number;
|
|
663
|
+
createdAt: string;
|
|
664
|
+
}>;
|
|
665
|
+
readonly update: (instructionId: string, payload: UpdateInstructionRequest) => Promise<{
|
|
666
|
+
id: string;
|
|
667
|
+
versionId: string;
|
|
668
|
+
order: number;
|
|
669
|
+
content: string;
|
|
670
|
+
createdAt?: string;
|
|
671
|
+
updatedAt?: string;
|
|
672
|
+
}>;
|
|
673
|
+
readonly delete: (instructionId: string) => Promise<void>;
|
|
674
|
+
};
|
|
1378
675
|
};
|
|
1379
676
|
type AgentSnapshot = AgentDetail | AgentSummary;
|
|
1380
677
|
declare const createAgentEntity: (dto: AgentSnapshot, options: AgentEntityFactoryOptions) => AgentEntity;
|
|
1381
678
|
|
|
1382
679
|
type AgentEntityDependencies = {
|
|
1383
680
|
instructionsApi: ReturnType<typeof createAgentInstructionsApi>;
|
|
1384
|
-
|
|
681
|
+
tagsApi: ReturnType<typeof createAgentTagsApi>;
|
|
1385
682
|
phonesApi: ReturnType<typeof createAgentPhonesApi>;
|
|
1386
683
|
scheduleApi: ReturnType<typeof createAgentScheduleApi>;
|
|
1387
684
|
versionsApi: ReturnType<typeof createAgentVersionsApi>;
|
|
1388
685
|
};
|
|
1389
686
|
type ListAgentsOptions = ListQueryOptions;
|
|
1390
687
|
type AgentsApi = {
|
|
1391
|
-
list(options?: ListAgentsOptions): Promise<AgentListResponse
|
|
688
|
+
list(options?: ListAgentsOptions): Promise<PaginatedResult<AgentListResponse, ListAgentsOptions>>;
|
|
1392
689
|
get(agentId: string): Promise<AgentDetail>;
|
|
1393
690
|
create(payload: CreateAgentRequest): Promise<AgentDetail>;
|
|
1394
691
|
update(agentId: string, payload: UpdateAgentRequest): Promise<AgentDetail>;
|
|
1395
|
-
delete(
|
|
692
|
+
delete(agent: string | AgentEntity): Promise<void>;
|
|
1396
693
|
};
|
|
1397
694
|
type AgentListResponseWithEntities = Omit<AgentListResponse, 'data'> & {
|
|
1398
695
|
data: AgentEntity[];
|
|
1399
696
|
};
|
|
1400
697
|
type AgentsApiWithEntities = Omit<AgentsApi, 'get' | 'create' | 'update' | 'list'> & {
|
|
1401
|
-
list(options?: ListAgentsOptions): Promise<AgentListResponseWithEntities
|
|
698
|
+
list(options?: ListAgentsOptions): Promise<PaginatedResult<AgentListResponseWithEntities, ListAgentsOptions>>;
|
|
1402
699
|
get(agentId: string): Promise<AgentEntity>;
|
|
1403
700
|
create(payload: CreateAgentRequest): Promise<AgentEntity>;
|
|
1404
701
|
update(agentId: string, payload: UpdateAgentRequest): Promise<AgentEntity>;
|
|
@@ -1407,12 +704,25 @@ declare function createAgentsApi(cfg: ClientConfig & {
|
|
|
1407
704
|
retry?: RetryPolicy;
|
|
1408
705
|
}, relatedApis?: AgentEntityDependencies): AgentsApi | AgentsApiWithEntities;
|
|
1409
706
|
|
|
1410
|
-
type ListToolsOptions = ListQueryOptions
|
|
707
|
+
type ListToolsOptions = ListQueryOptions & {
|
|
708
|
+
agentType?: 'chat' | 'voice';
|
|
709
|
+
};
|
|
710
|
+
type ListToolResourcesOptions = Pick<ListQueryOptions, 'page' | 'limit'> & {
|
|
711
|
+
type?: 'document' | 'media' | 'file';
|
|
712
|
+
};
|
|
713
|
+
type UploadToolResourcePayload = FormData | (Omit<ToolResourceUploadRequest, 'file'> & {
|
|
714
|
+
file: unknown;
|
|
715
|
+
});
|
|
1411
716
|
declare function createToolsApi(cfg: ClientConfig & {
|
|
1412
717
|
retry?: RetryPolicy;
|
|
1413
718
|
}): {
|
|
1414
|
-
list(options?: ListToolsOptions): Promise<
|
|
719
|
+
list(options?: ListToolsOptions): Promise<PaginatedResult<ToolListResponse, ListToolsOptions>>;
|
|
720
|
+
listResources(toolId: string, options?: ListToolResourcesOptions): Promise<PaginatedResult<ToolResourceListResponse, ListToolResourcesOptions>>;
|
|
721
|
+
uploadResource(toolId: string, payload: UploadToolResourcePayload): Promise<ToolResourceUploadResponse>;
|
|
722
|
+
deleteResource(toolId: string, resourceId: string): Promise<void>;
|
|
723
|
+
reloadResource(toolId: string, resourceId: string): Promise<ToolResourceReloadResponse>;
|
|
1415
724
|
execute(toolId: string, payload: ExecuteToolRequest): Promise<ExecuteToolResponse>;
|
|
725
|
+
connect(toolId: string, payload: ToolConnectionRequest): Promise<ToolConnectionResponse>;
|
|
1416
726
|
};
|
|
1417
727
|
|
|
1418
728
|
type ListVoicesOptions = ListQueryOptions & {
|
|
@@ -1426,7 +736,7 @@ type ListVoicesOptions = ListQueryOptions & {
|
|
|
1426
736
|
declare function createVoicesApi(cfg: ClientConfig & {
|
|
1427
737
|
retry?: RetryPolicy;
|
|
1428
738
|
}): {
|
|
1429
|
-
list(options?: ListVoicesOptions): Promise<VoiceListResponse
|
|
739
|
+
list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
|
|
1430
740
|
};
|
|
1431
741
|
|
|
1432
742
|
type ListWorkspacePhonesOptions = ListQueryOptions & {
|
|
@@ -1435,7 +745,7 @@ type ListWorkspacePhonesOptions = ListQueryOptions & {
|
|
|
1435
745
|
declare function createWorkspacesApi(cfg: ClientConfig & {
|
|
1436
746
|
retry?: RetryPolicy;
|
|
1437
747
|
}): {
|
|
1438
|
-
listPhones(workspaceId: string, opts?: ListWorkspacePhonesOptions): Promise<WorkspacePhonesResponse
|
|
748
|
+
listPhones(workspaceId: string, opts?: ListWorkspacePhonesOptions): Promise<PaginatedResult<WorkspacePhonesResponse, ListWorkspacePhonesOptions>>;
|
|
1439
749
|
enable(workspaceId: string, payload: WorkspaceEnableRequest): Promise<WorkspaceEnableResponse>;
|
|
1440
750
|
};
|
|
1441
751
|
|
|
@@ -1456,17 +766,16 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
1456
766
|
scoped(id: string): any;
|
|
1457
767
|
};
|
|
1458
768
|
agents: {
|
|
1459
|
-
knowledge: {
|
|
1460
|
-
upload(agentId: string, payload: KnowledgeUploadRequest): Promise<KnowledgeUploadResponse>;
|
|
1461
|
-
listBases(agentId: string, opts?: ListAgentKnowledgeOptions): Promise<AgentKnowledgeBasesResponse>;
|
|
1462
|
-
listUploads(agentId: string, opts?: ListAgentKnowledgeOptions): Promise<AgentKnowledgeUploadsResponse>;
|
|
1463
|
-
};
|
|
1464
769
|
instructions: {
|
|
1465
|
-
list(agentId: string, opts?: ListAgentInstructionsOptions): Promise<
|
|
770
|
+
list(agentId: string, opts?: ListAgentInstructionsOptions): Promise<PaginatedResult<InstructionListResponse, ListAgentInstructionsOptions>>;
|
|
1466
771
|
create(agentId: string, payload: CreateInstructionRequest): Promise<InstructionCreatedResponse>;
|
|
1467
772
|
update(agentId: string, instructionId: string, payload: UpdateInstructionRequest): Promise<Instruction>;
|
|
1468
773
|
delete(agentId: string, instructionId: string): Promise<void>;
|
|
1469
774
|
};
|
|
775
|
+
tags: {
|
|
776
|
+
readonly add: (agentId: string, payload: AgentTagRequest) => Promise<AgentTagsResponse>;
|
|
777
|
+
readonly remove: (agentId: string, tagId: string) => Promise<void>;
|
|
778
|
+
};
|
|
1470
779
|
phones: {
|
|
1471
780
|
connect(agentId: string, payload: ConnectPhoneRequest): Promise<PhoneAssignmentResponse>;
|
|
1472
781
|
disconnect(agentId: string, phoneId: string): Promise<void>;
|
|
@@ -1476,47 +785,65 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
1476
785
|
update(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
|
|
1477
786
|
};
|
|
1478
787
|
versions: {
|
|
1479
|
-
list(agentId: string, opts?: ListAgentVersionsOptions): Promise<AgentVersionListResponse
|
|
788
|
+
list(agentId: string, opts?: ListAgentVersionsOptions): Promise<PaginatedResult<AgentVersionListResponse, ListAgentVersionsOptions>>;
|
|
1480
789
|
get(agentId: string, versionId: string): Promise<AgentVersionDetail>;
|
|
1481
790
|
create(agentId: string, payload: CreateAgentVersionRequest): Promise<AgentVersionDetail>;
|
|
1482
791
|
update(agentId: string, versionId: string, payload: UpdateAgentVersionRequest): Promise<AgentVersionDetail>;
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
792
|
+
delete(agentId: string, versionId: string): Promise<void>;
|
|
793
|
+
listInstructions(agentId: string, versionId: string, opts?: ListAgentVersionInstructionsOptions): Promise<InstructionListResponse>;
|
|
794
|
+
createInstruction(agentId: string, versionId: string, payload: CreateInstructionRequest): Promise<InstructionCreatedResponse>;
|
|
795
|
+
updateInstruction(agentId: string, versionId: string, instructionId: string, payload: UpdateInstructionRequest): Promise<Instruction>;
|
|
796
|
+
deleteInstruction(agentId: string, versionId: string, instructionId: string): Promise<void>;
|
|
797
|
+
};
|
|
798
|
+
delete: (agent: string | AgentEntity) => Promise<void>;
|
|
799
|
+
list(options?: ListAgentsOptions): Promise<PaginatedResult<Omit<{
|
|
1486
800
|
data: components["schemas"]["AgentSummary"][];
|
|
1487
801
|
meta: components["schemas"]["PaginationMeta"];
|
|
1488
802
|
}, "data"> & {
|
|
1489
803
|
data: AgentEntity[];
|
|
1490
|
-
}
|
|
804
|
+
}, ListAgentsOptions>>;
|
|
1491
805
|
get(agentId: string): Promise<AgentEntity>;
|
|
1492
806
|
create(payload: CreateAgentRequest): Promise<AgentEntity>;
|
|
1493
807
|
update(agentId: string, payload: UpdateAgentRequest): Promise<AgentEntity>;
|
|
1494
808
|
};
|
|
1495
809
|
workspaces: {
|
|
1496
|
-
listPhones(workspaceId: string, opts?: ListWorkspacePhonesOptions): Promise<WorkspacePhonesResponse
|
|
810
|
+
listPhones(workspaceId: string, opts?: ListWorkspacePhonesOptions): Promise<PaginatedResult<WorkspacePhonesResponse, ListWorkspacePhonesOptions>>;
|
|
1497
811
|
enable(workspaceId: string, payload: WorkspaceEnableRequest): Promise<WorkspaceEnableResponse>;
|
|
1498
812
|
};
|
|
1499
813
|
tools: {
|
|
1500
|
-
list(options?: ListToolsOptions): Promise<
|
|
814
|
+
list(options?: ListToolsOptions): Promise<PaginatedResult<ToolListResponse, ListToolsOptions>>;
|
|
815
|
+
listResources(toolId: string, options?: ListToolResourcesOptions): Promise<PaginatedResult<ToolResourceListResponse, ListToolResourcesOptions>>;
|
|
816
|
+
uploadResource(toolId: string, payload: FormData | (Omit<{
|
|
817
|
+
file: string;
|
|
818
|
+
type?: "document" | "media" | "file";
|
|
819
|
+
title?: string;
|
|
820
|
+
metadata?: {
|
|
821
|
+
[key: string]: unknown;
|
|
822
|
+
};
|
|
823
|
+
}, "file"> & {
|
|
824
|
+
file: unknown;
|
|
825
|
+
})): Promise<ToolResourceUploadResponse>;
|
|
826
|
+
deleteResource(toolId: string, resourceId: string): Promise<void>;
|
|
827
|
+
reloadResource(toolId: string, resourceId: string): Promise<ToolResourceReloadResponse>;
|
|
1501
828
|
execute(toolId: string, payload: ExecuteToolRequest): Promise<ExecuteToolResponse>;
|
|
829
|
+
connect(toolId: string, payload: ToolConnectionRequest): Promise<ToolConnectionResponse>;
|
|
1502
830
|
};
|
|
1503
831
|
voices: {
|
|
1504
|
-
list(options?: ListVoicesOptions): Promise<VoiceListResponse
|
|
832
|
+
list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
|
|
1505
833
|
};
|
|
1506
834
|
};
|
|
1507
835
|
};
|
|
1508
836
|
agents: {
|
|
1509
|
-
knowledge: {
|
|
1510
|
-
upload(agentId: string, payload: KnowledgeUploadRequest): Promise<KnowledgeUploadResponse>;
|
|
1511
|
-
listBases(agentId: string, opts?: ListAgentKnowledgeOptions): Promise<AgentKnowledgeBasesResponse>;
|
|
1512
|
-
listUploads(agentId: string, opts?: ListAgentKnowledgeOptions): Promise<AgentKnowledgeUploadsResponse>;
|
|
1513
|
-
};
|
|
1514
837
|
instructions: {
|
|
1515
|
-
list(agentId: string, opts?: ListAgentInstructionsOptions): Promise<
|
|
838
|
+
list(agentId: string, opts?: ListAgentInstructionsOptions): Promise<PaginatedResult<InstructionListResponse, ListAgentInstructionsOptions>>;
|
|
1516
839
|
create(agentId: string, payload: CreateInstructionRequest): Promise<InstructionCreatedResponse>;
|
|
1517
840
|
update(agentId: string, instructionId: string, payload: UpdateInstructionRequest): Promise<Instruction>;
|
|
1518
841
|
delete(agentId: string, instructionId: string): Promise<void>;
|
|
1519
842
|
};
|
|
843
|
+
tags: {
|
|
844
|
+
readonly add: (agentId: string, payload: AgentTagRequest) => Promise<AgentTagsResponse>;
|
|
845
|
+
readonly remove: (agentId: string, tagId: string) => Promise<void>;
|
|
846
|
+
};
|
|
1520
847
|
phones: {
|
|
1521
848
|
connect(agentId: string, payload: ConnectPhoneRequest): Promise<PhoneAssignmentResponse>;
|
|
1522
849
|
disconnect(agentId: string, phoneId: string): Promise<void>;
|
|
@@ -1526,32 +853,51 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
1526
853
|
update(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
|
|
1527
854
|
};
|
|
1528
855
|
versions: {
|
|
1529
|
-
list(agentId: string, opts?: ListAgentVersionsOptions): Promise<AgentVersionListResponse
|
|
856
|
+
list(agentId: string, opts?: ListAgentVersionsOptions): Promise<PaginatedResult<AgentVersionListResponse, ListAgentVersionsOptions>>;
|
|
1530
857
|
get(agentId: string, versionId: string): Promise<AgentVersionDetail>;
|
|
1531
858
|
create(agentId: string, payload: CreateAgentVersionRequest): Promise<AgentVersionDetail>;
|
|
1532
859
|
update(agentId: string, versionId: string, payload: UpdateAgentVersionRequest): Promise<AgentVersionDetail>;
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
860
|
+
delete(agentId: string, versionId: string): Promise<void>;
|
|
861
|
+
listInstructions(agentId: string, versionId: string, opts?: ListAgentVersionInstructionsOptions): Promise<InstructionListResponse>;
|
|
862
|
+
createInstruction(agentId: string, versionId: string, payload: CreateInstructionRequest): Promise<InstructionCreatedResponse>;
|
|
863
|
+
updateInstruction(agentId: string, versionId: string, instructionId: string, payload: UpdateInstructionRequest): Promise<Instruction>;
|
|
864
|
+
deleteInstruction(agentId: string, versionId: string, instructionId: string): Promise<void>;
|
|
865
|
+
};
|
|
866
|
+
delete: (agent: string | AgentEntity) => Promise<void>;
|
|
867
|
+
list(options?: ListAgentsOptions): Promise<PaginatedResult<Omit<{
|
|
1536
868
|
data: components["schemas"]["AgentSummary"][];
|
|
1537
869
|
meta: components["schemas"]["PaginationMeta"];
|
|
1538
870
|
}, "data"> & {
|
|
1539
871
|
data: AgentEntity[];
|
|
1540
|
-
}
|
|
872
|
+
}, ListAgentsOptions>>;
|
|
1541
873
|
get(agentId: string): Promise<AgentEntity>;
|
|
1542
874
|
create(payload: CreateAgentRequest): Promise<AgentEntity>;
|
|
1543
875
|
update(agentId: string, payload: UpdateAgentRequest): Promise<AgentEntity>;
|
|
1544
876
|
};
|
|
1545
877
|
workspaces: {
|
|
1546
|
-
listPhones(workspaceId: string, opts?: ListWorkspacePhonesOptions): Promise<WorkspacePhonesResponse
|
|
878
|
+
listPhones(workspaceId: string, opts?: ListWorkspacePhonesOptions): Promise<PaginatedResult<WorkspacePhonesResponse, ListWorkspacePhonesOptions>>;
|
|
1547
879
|
enable(workspaceId: string, payload: WorkspaceEnableRequest): Promise<WorkspaceEnableResponse>;
|
|
1548
880
|
};
|
|
1549
881
|
tools: {
|
|
1550
|
-
list(options?: ListToolsOptions): Promise<
|
|
882
|
+
list(options?: ListToolsOptions): Promise<PaginatedResult<ToolListResponse, ListToolsOptions>>;
|
|
883
|
+
listResources(toolId: string, options?: ListToolResourcesOptions): Promise<PaginatedResult<ToolResourceListResponse, ListToolResourcesOptions>>;
|
|
884
|
+
uploadResource(toolId: string, payload: FormData | (Omit<{
|
|
885
|
+
file: string;
|
|
886
|
+
type?: "document" | "media" | "file";
|
|
887
|
+
title?: string;
|
|
888
|
+
metadata?: {
|
|
889
|
+
[key: string]: unknown;
|
|
890
|
+
};
|
|
891
|
+
}, "file"> & {
|
|
892
|
+
file: unknown;
|
|
893
|
+
})): Promise<ToolResourceUploadResponse>;
|
|
894
|
+
deleteResource(toolId: string, resourceId: string): Promise<void>;
|
|
895
|
+
reloadResource(toolId: string, resourceId: string): Promise<ToolResourceReloadResponse>;
|
|
1551
896
|
execute(toolId: string, payload: ExecuteToolRequest): Promise<ExecuteToolResponse>;
|
|
897
|
+
connect(toolId: string, payload: ToolConnectionRequest): Promise<ToolConnectionResponse>;
|
|
1552
898
|
};
|
|
1553
899
|
voices: {
|
|
1554
|
-
list(options?: ListVoicesOptions): Promise<VoiceListResponse
|
|
900
|
+
list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
|
|
1555
901
|
};
|
|
1556
902
|
};
|
|
1557
903
|
|
|
@@ -1576,4 +922,4 @@ declare function createHttp(cfg: ClientConfig & {
|
|
|
1576
922
|
resolveWorkspaceId: () => string;
|
|
1577
923
|
};
|
|
1578
924
|
|
|
1579
|
-
export { type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type
|
|
925
|
+
export { type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentListResponse, type AgentSchedule, type AgentSummary, type AgentTagRequest, type AgentTagsResponse, 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 InstructionListResponse, type ListAgentInstructionsOptions, type ListAgentVersionInstructionsOptions, type ListAgentVersionsOptions, type ListAgentsOptions, type ListQueryOptions, type ListToolResourcesOptions, 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 ToolConnectionRequest, type ToolConnectionResponse, type ToolListResponse, type ToolResourceListResponse, type ToolResourceReloadResponse, type ToolResourceSummary, type ToolResourceUploadRequest, type ToolResourceUploadResponse, type ToolSummary, type UpdateAgentRequest, type UpdateAgentScheduleRequest, type UpdateAgentVersionRequest, type UpdateInstructionRequest, type VoiceListResponse, type VoiceSummary, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, bindAgentInstructions, bindAgentPhones, bindAgentSchedule, bindAgentTags, bindAgentVersions, createAgentEntity, createAgentInstructionsApi, createAgentPhonesApi, createAgentScheduleApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createClient, createHttp, createToolsApi, createVoicesApi, createWorkspacesApi };
|