@getsupervisor/agents-studio-sdk 1.6.0 → 1.8.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 +25 -0
- package/README.md +18 -0
- package/dist/index.cjs +6 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +51 -89
- package/dist/index.d.ts +51 -89
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,71 +1,40 @@
|
|
|
1
1
|
type components = {
|
|
2
2
|
schemas: {
|
|
3
|
-
AgentDetail: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
provider?: string;
|
|
9
|
-
versionId?: string;
|
|
10
|
-
status: "inactive" | "training" | "active" | "archived";
|
|
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?: ({
|
|
24
|
-
voiceId?: string;
|
|
25
|
-
webhookUrl?: string;
|
|
26
|
-
llmId?: string | null;
|
|
27
|
-
}) | null;
|
|
28
|
-
createdAt: string;
|
|
29
|
-
updatedAt: string;
|
|
30
|
-
metadata?: {
|
|
31
|
-
[key: string]: unknown;
|
|
32
|
-
};
|
|
3
|
+
AgentDetail: components['schemas']['AgentSummary'] & {
|
|
4
|
+
description?: string;
|
|
5
|
+
avatarUrl?: string;
|
|
6
|
+
ownerUserId: string;
|
|
7
|
+
debounceDelayMs: number;
|
|
33
8
|
};
|
|
34
9
|
PaginationMeta: {
|
|
35
10
|
total: number;
|
|
36
11
|
page: number;
|
|
37
12
|
limit: number;
|
|
38
13
|
hasNext: boolean;
|
|
39
|
-
hasPrevious
|
|
14
|
+
hasPrevious: boolean;
|
|
40
15
|
};
|
|
41
16
|
QueryFilters: string;
|
|
42
17
|
QueryOrGroups: string;
|
|
43
18
|
AgentSummary: {
|
|
44
19
|
agentId: string;
|
|
45
20
|
name: string;
|
|
46
|
-
agentType:
|
|
47
|
-
status:
|
|
21
|
+
agentType: 'chat' | 'voice';
|
|
22
|
+
status: 'inactive' | 'training' | 'active' | 'archived';
|
|
48
23
|
workspaceId: string;
|
|
49
|
-
provider?: string | null;
|
|
50
24
|
createdAt: string;
|
|
51
25
|
updatedAt: string;
|
|
52
26
|
};
|
|
53
27
|
AgentListResponse: {
|
|
54
|
-
data: components[
|
|
55
|
-
meta: components[
|
|
28
|
+
data: components['schemas']['AgentSummary'][];
|
|
29
|
+
meta: components['schemas']['PaginationMeta'];
|
|
56
30
|
};
|
|
57
31
|
CreateAgentRequest: {
|
|
58
32
|
name: string;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
avatarUrl?: string | null;
|
|
65
|
-
debounceDelayMs?: number | null;
|
|
66
|
-
metadata?: {
|
|
67
|
-
[key: string]: unknown;
|
|
68
|
-
};
|
|
33
|
+
agentType: 'chat' | 'voice';
|
|
34
|
+
description?: string;
|
|
35
|
+
status: 'inactive' | 'training' | 'active';
|
|
36
|
+
avatarUrl?: string;
|
|
37
|
+
debounceDelayMs: number;
|
|
69
38
|
};
|
|
70
39
|
AgentTagRequest: {
|
|
71
40
|
tagId: string;
|
|
@@ -76,17 +45,10 @@ type components = {
|
|
|
76
45
|
};
|
|
77
46
|
UpdateAgentRequest: {
|
|
78
47
|
name?: string;
|
|
79
|
-
status?:
|
|
80
|
-
description?: string
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
tags?: string[];
|
|
84
|
-
debounceDelayMs?: number | null;
|
|
85
|
-
ownerUserId?: string | null;
|
|
86
|
-
metadata?: {
|
|
87
|
-
[key: string]: unknown;
|
|
88
|
-
};
|
|
89
|
-
provider?: string | null;
|
|
48
|
+
status?: 'inactive' | 'training' | 'active' | 'archived';
|
|
49
|
+
description?: string;
|
|
50
|
+
avatarUrl?: string;
|
|
51
|
+
debounceDelayMs?: number;
|
|
90
52
|
};
|
|
91
53
|
Instruction: {
|
|
92
54
|
id: string;
|
|
@@ -97,9 +59,9 @@ type components = {
|
|
|
97
59
|
updatedAt?: string;
|
|
98
60
|
};
|
|
99
61
|
InstructionListResponse: {
|
|
100
|
-
data: components[
|
|
62
|
+
data: components['schemas']['Instruction'][];
|
|
101
63
|
versionId?: string | null;
|
|
102
|
-
meta?: components[
|
|
64
|
+
meta?: components['schemas']['PaginationMeta'];
|
|
103
65
|
};
|
|
104
66
|
CreateInstructionRequest: {
|
|
105
67
|
order: number;
|
|
@@ -125,36 +87,36 @@ type components = {
|
|
|
125
87
|
id: string;
|
|
126
88
|
providerVoiceId?: string;
|
|
127
89
|
name: string;
|
|
128
|
-
gender?:
|
|
90
|
+
gender?: 'female' | 'male' | 'neutral';
|
|
129
91
|
locale: string;
|
|
130
92
|
tags?: string[];
|
|
131
93
|
previewUrl?: string;
|
|
132
94
|
provider: string;
|
|
133
95
|
};
|
|
134
96
|
VoiceListResponse: {
|
|
135
|
-
data: components[
|
|
136
|
-
meta: components[
|
|
97
|
+
data: components['schemas']['VoiceSummary'][];
|
|
98
|
+
meta: components['schemas']['PaginationMeta'];
|
|
137
99
|
};
|
|
138
100
|
AgentScheduleSlot: {
|
|
139
101
|
startTime: string;
|
|
140
102
|
endTime: string;
|
|
141
103
|
};
|
|
142
104
|
AgentScheduleRule: {
|
|
143
|
-
dayOfWeek:
|
|
144
|
-
slots: components[
|
|
105
|
+
dayOfWeek: 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
|
|
106
|
+
slots: components['schemas']['AgentScheduleSlot'][];
|
|
145
107
|
isClosed?: boolean;
|
|
146
108
|
};
|
|
147
109
|
AgentSchedule: {
|
|
148
110
|
agentId: string;
|
|
149
111
|
timezone: string;
|
|
150
|
-
rules: components[
|
|
112
|
+
rules: components['schemas']['AgentScheduleRule'][];
|
|
151
113
|
metadata?: {
|
|
152
114
|
[key: string]: unknown;
|
|
153
115
|
};
|
|
154
116
|
};
|
|
155
117
|
UpdateAgentScheduleRequest: {
|
|
156
118
|
timezone: string;
|
|
157
|
-
rules: components[
|
|
119
|
+
rules: components['schemas']['AgentScheduleRule'][];
|
|
158
120
|
metadata?: {
|
|
159
121
|
[key: string]: unknown;
|
|
160
122
|
};
|
|
@@ -163,13 +125,13 @@ type components = {
|
|
|
163
125
|
versionId: string;
|
|
164
126
|
agentId: string;
|
|
165
127
|
label: string;
|
|
166
|
-
status:
|
|
128
|
+
status: 'draft' | 'published' | 'archived';
|
|
167
129
|
isActive?: boolean;
|
|
168
130
|
createdAt: string;
|
|
169
131
|
updatedAt?: string;
|
|
170
132
|
publishedAt?: string | null;
|
|
171
133
|
};
|
|
172
|
-
AgentVersionDetail: components[
|
|
134
|
+
AgentVersionDetail: components['schemas']['AgentVersionSummary'] & {
|
|
173
135
|
description?: string;
|
|
174
136
|
metadata?: {
|
|
175
137
|
[key: string]: unknown;
|
|
@@ -177,8 +139,8 @@ type components = {
|
|
|
177
139
|
instructionsVersionId?: string;
|
|
178
140
|
};
|
|
179
141
|
AgentVersionListResponse: {
|
|
180
|
-
data: components[
|
|
181
|
-
meta?: components[
|
|
142
|
+
data: components['schemas']['AgentVersionSummary'][];
|
|
143
|
+
meta?: components['schemas']['PaginationMeta'];
|
|
182
144
|
};
|
|
183
145
|
CreateAgentVersionRequest: {
|
|
184
146
|
label: string;
|
|
@@ -191,7 +153,7 @@ type components = {
|
|
|
191
153
|
UpdateAgentVersionRequest: {
|
|
192
154
|
label?: string;
|
|
193
155
|
description?: string;
|
|
194
|
-
status?:
|
|
156
|
+
status?: 'draft' | 'published' | 'archived';
|
|
195
157
|
metadata?: {
|
|
196
158
|
[key: string]: unknown;
|
|
197
159
|
};
|
|
@@ -213,14 +175,14 @@ type components = {
|
|
|
213
175
|
WorkspacePhone: {
|
|
214
176
|
id: string;
|
|
215
177
|
external_id: string;
|
|
216
|
-
channel?:
|
|
178
|
+
channel?: 'voice';
|
|
217
179
|
supports_outbound?: boolean | null;
|
|
218
180
|
assigned_to?: string | null;
|
|
219
181
|
last_used_at?: string | null;
|
|
220
182
|
requires_qr_reauth?: boolean | null;
|
|
221
183
|
};
|
|
222
184
|
WorkspacePhonesResponse: {
|
|
223
|
-
data: components[
|
|
185
|
+
data: components['schemas']['WorkspacePhone'][];
|
|
224
186
|
};
|
|
225
187
|
ToolSummary: {
|
|
226
188
|
id: string;
|
|
@@ -230,15 +192,15 @@ type components = {
|
|
|
230
192
|
enabled: boolean;
|
|
231
193
|
};
|
|
232
194
|
ToolListResponse: {
|
|
233
|
-
data: components[
|
|
234
|
-
meta: components[
|
|
195
|
+
data: components['schemas']['ToolSummary'][];
|
|
196
|
+
meta: components['schemas']['PaginationMeta'];
|
|
235
197
|
};
|
|
236
198
|
ToolResourceSummary: {
|
|
237
199
|
id: string;
|
|
238
200
|
toolId: string;
|
|
239
|
-
type:
|
|
201
|
+
type: 'document' | 'media' | 'file';
|
|
240
202
|
title?: string;
|
|
241
|
-
status:
|
|
203
|
+
status: 'pending' | 'processing' | 'ready' | 'failed';
|
|
242
204
|
sizeBytes?: number | null;
|
|
243
205
|
createdAt: string;
|
|
244
206
|
updatedAt?: string | null;
|
|
@@ -247,12 +209,12 @@ type components = {
|
|
|
247
209
|
};
|
|
248
210
|
};
|
|
249
211
|
ToolResourceListResponse: {
|
|
250
|
-
data: components[
|
|
251
|
-
meta: components[
|
|
212
|
+
data: components['schemas']['ToolResourceSummary'][];
|
|
213
|
+
meta: components['schemas']['PaginationMeta'];
|
|
252
214
|
};
|
|
253
215
|
ToolResourceUploadRequest: {
|
|
254
216
|
file: string;
|
|
255
|
-
type?:
|
|
217
|
+
type?: 'document' | 'media' | 'file';
|
|
256
218
|
title?: string;
|
|
257
219
|
metadata?: {
|
|
258
220
|
[key: string]: unknown;
|
|
@@ -260,18 +222,18 @@ type components = {
|
|
|
260
222
|
};
|
|
261
223
|
ToolResourceUploadResponse: {
|
|
262
224
|
resourceId: string;
|
|
263
|
-
status:
|
|
225
|
+
status: 'queued' | 'processing' | 'completed' | 'failed';
|
|
264
226
|
message?: string;
|
|
265
227
|
toolId?: string;
|
|
266
228
|
};
|
|
267
229
|
ToolResourceReloadResponse: {
|
|
268
230
|
resourceId: string;
|
|
269
|
-
status:
|
|
231
|
+
status: 'queued' | 'processing' | 'completed' | 'failed';
|
|
270
232
|
toolId?: string;
|
|
271
233
|
message?: string;
|
|
272
234
|
};
|
|
273
235
|
ToolConnectionRequest: {
|
|
274
|
-
type?:
|
|
236
|
+
type?: 'oauth2' | 'api_key' | 'credentials';
|
|
275
237
|
authorizationCode?: string | null;
|
|
276
238
|
redirectUri?: string | null;
|
|
277
239
|
credentials?: {
|
|
@@ -282,7 +244,7 @@ type components = {
|
|
|
282
244
|
};
|
|
283
245
|
};
|
|
284
246
|
ToolConnectionResponse: {
|
|
285
|
-
status:
|
|
247
|
+
status: 'connected' | 'pending' | 'requires_action';
|
|
286
248
|
toolId?: string | null;
|
|
287
249
|
connectionId?: string | null;
|
|
288
250
|
authorizationUrl?: string | null;
|
|
@@ -310,14 +272,14 @@ type components = {
|
|
|
310
272
|
toolId: string;
|
|
311
273
|
};
|
|
312
274
|
WorkspaceEnableRequest: {
|
|
313
|
-
provider:
|
|
275
|
+
provider: 'provider';
|
|
314
276
|
apiKey: string;
|
|
315
277
|
metadata?: {
|
|
316
278
|
[key: string]: unknown;
|
|
317
279
|
};
|
|
318
280
|
};
|
|
319
281
|
WorkspaceEnableResponse: {
|
|
320
|
-
status:
|
|
282
|
+
status: 'enabled';
|
|
321
283
|
provider: string;
|
|
322
284
|
workspaceId: string;
|
|
323
285
|
};
|
|
@@ -348,8 +310,8 @@ type components = {
|
|
|
348
310
|
FieldsParam?: string;
|
|
349
311
|
IncludeParam?: string;
|
|
350
312
|
SearchParam?: string;
|
|
351
|
-
FilterParam?: components[
|
|
352
|
-
OrParam?: components[
|
|
313
|
+
FilterParam?: components['schemas']['QueryFilters'];
|
|
314
|
+
OrParam?: components['schemas']['QueryOrGroups'];
|
|
353
315
|
};
|
|
354
316
|
requestBodies: never;
|
|
355
317
|
headers: never;
|
|
@@ -683,7 +645,7 @@ type AgentEntityDependencies = {
|
|
|
683
645
|
scheduleApi: ReturnType<typeof createAgentScheduleApi>;
|
|
684
646
|
versionsApi: ReturnType<typeof createAgentVersionsApi>;
|
|
685
647
|
};
|
|
686
|
-
type ListAgentsOptions = ListQueryOptions
|
|
648
|
+
type ListAgentsOptions = Pick<ListQueryOptions, 'page' | 'limit' | 'filter'>;
|
|
687
649
|
type AgentsApi = {
|
|
688
650
|
list(options?: ListAgentsOptions): Promise<PaginatedResult<AgentListResponse, ListAgentsOptions>>;
|
|
689
651
|
get(agentId: string): Promise<AgentDetail>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,71 +1,40 @@
|
|
|
1
1
|
type components = {
|
|
2
2
|
schemas: {
|
|
3
|
-
AgentDetail: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
provider?: string;
|
|
9
|
-
versionId?: string;
|
|
10
|
-
status: "inactive" | "training" | "active" | "archived";
|
|
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?: ({
|
|
24
|
-
voiceId?: string;
|
|
25
|
-
webhookUrl?: string;
|
|
26
|
-
llmId?: string | null;
|
|
27
|
-
}) | null;
|
|
28
|
-
createdAt: string;
|
|
29
|
-
updatedAt: string;
|
|
30
|
-
metadata?: {
|
|
31
|
-
[key: string]: unknown;
|
|
32
|
-
};
|
|
3
|
+
AgentDetail: components['schemas']['AgentSummary'] & {
|
|
4
|
+
description?: string;
|
|
5
|
+
avatarUrl?: string;
|
|
6
|
+
ownerUserId: string;
|
|
7
|
+
debounceDelayMs: number;
|
|
33
8
|
};
|
|
34
9
|
PaginationMeta: {
|
|
35
10
|
total: number;
|
|
36
11
|
page: number;
|
|
37
12
|
limit: number;
|
|
38
13
|
hasNext: boolean;
|
|
39
|
-
hasPrevious
|
|
14
|
+
hasPrevious: boolean;
|
|
40
15
|
};
|
|
41
16
|
QueryFilters: string;
|
|
42
17
|
QueryOrGroups: string;
|
|
43
18
|
AgentSummary: {
|
|
44
19
|
agentId: string;
|
|
45
20
|
name: string;
|
|
46
|
-
agentType:
|
|
47
|
-
status:
|
|
21
|
+
agentType: 'chat' | 'voice';
|
|
22
|
+
status: 'inactive' | 'training' | 'active' | 'archived';
|
|
48
23
|
workspaceId: string;
|
|
49
|
-
provider?: string | null;
|
|
50
24
|
createdAt: string;
|
|
51
25
|
updatedAt: string;
|
|
52
26
|
};
|
|
53
27
|
AgentListResponse: {
|
|
54
|
-
data: components[
|
|
55
|
-
meta: components[
|
|
28
|
+
data: components['schemas']['AgentSummary'][];
|
|
29
|
+
meta: components['schemas']['PaginationMeta'];
|
|
56
30
|
};
|
|
57
31
|
CreateAgentRequest: {
|
|
58
32
|
name: string;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
avatarUrl?: string | null;
|
|
65
|
-
debounceDelayMs?: number | null;
|
|
66
|
-
metadata?: {
|
|
67
|
-
[key: string]: unknown;
|
|
68
|
-
};
|
|
33
|
+
agentType: 'chat' | 'voice';
|
|
34
|
+
description?: string;
|
|
35
|
+
status: 'inactive' | 'training' | 'active';
|
|
36
|
+
avatarUrl?: string;
|
|
37
|
+
debounceDelayMs: number;
|
|
69
38
|
};
|
|
70
39
|
AgentTagRequest: {
|
|
71
40
|
tagId: string;
|
|
@@ -76,17 +45,10 @@ type components = {
|
|
|
76
45
|
};
|
|
77
46
|
UpdateAgentRequest: {
|
|
78
47
|
name?: string;
|
|
79
|
-
status?:
|
|
80
|
-
description?: string
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
tags?: string[];
|
|
84
|
-
debounceDelayMs?: number | null;
|
|
85
|
-
ownerUserId?: string | null;
|
|
86
|
-
metadata?: {
|
|
87
|
-
[key: string]: unknown;
|
|
88
|
-
};
|
|
89
|
-
provider?: string | null;
|
|
48
|
+
status?: 'inactive' | 'training' | 'active' | 'archived';
|
|
49
|
+
description?: string;
|
|
50
|
+
avatarUrl?: string;
|
|
51
|
+
debounceDelayMs?: number;
|
|
90
52
|
};
|
|
91
53
|
Instruction: {
|
|
92
54
|
id: string;
|
|
@@ -97,9 +59,9 @@ type components = {
|
|
|
97
59
|
updatedAt?: string;
|
|
98
60
|
};
|
|
99
61
|
InstructionListResponse: {
|
|
100
|
-
data: components[
|
|
62
|
+
data: components['schemas']['Instruction'][];
|
|
101
63
|
versionId?: string | null;
|
|
102
|
-
meta?: components[
|
|
64
|
+
meta?: components['schemas']['PaginationMeta'];
|
|
103
65
|
};
|
|
104
66
|
CreateInstructionRequest: {
|
|
105
67
|
order: number;
|
|
@@ -125,36 +87,36 @@ type components = {
|
|
|
125
87
|
id: string;
|
|
126
88
|
providerVoiceId?: string;
|
|
127
89
|
name: string;
|
|
128
|
-
gender?:
|
|
90
|
+
gender?: 'female' | 'male' | 'neutral';
|
|
129
91
|
locale: string;
|
|
130
92
|
tags?: string[];
|
|
131
93
|
previewUrl?: string;
|
|
132
94
|
provider: string;
|
|
133
95
|
};
|
|
134
96
|
VoiceListResponse: {
|
|
135
|
-
data: components[
|
|
136
|
-
meta: components[
|
|
97
|
+
data: components['schemas']['VoiceSummary'][];
|
|
98
|
+
meta: components['schemas']['PaginationMeta'];
|
|
137
99
|
};
|
|
138
100
|
AgentScheduleSlot: {
|
|
139
101
|
startTime: string;
|
|
140
102
|
endTime: string;
|
|
141
103
|
};
|
|
142
104
|
AgentScheduleRule: {
|
|
143
|
-
dayOfWeek:
|
|
144
|
-
slots: components[
|
|
105
|
+
dayOfWeek: 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
|
|
106
|
+
slots: components['schemas']['AgentScheduleSlot'][];
|
|
145
107
|
isClosed?: boolean;
|
|
146
108
|
};
|
|
147
109
|
AgentSchedule: {
|
|
148
110
|
agentId: string;
|
|
149
111
|
timezone: string;
|
|
150
|
-
rules: components[
|
|
112
|
+
rules: components['schemas']['AgentScheduleRule'][];
|
|
151
113
|
metadata?: {
|
|
152
114
|
[key: string]: unknown;
|
|
153
115
|
};
|
|
154
116
|
};
|
|
155
117
|
UpdateAgentScheduleRequest: {
|
|
156
118
|
timezone: string;
|
|
157
|
-
rules: components[
|
|
119
|
+
rules: components['schemas']['AgentScheduleRule'][];
|
|
158
120
|
metadata?: {
|
|
159
121
|
[key: string]: unknown;
|
|
160
122
|
};
|
|
@@ -163,13 +125,13 @@ type components = {
|
|
|
163
125
|
versionId: string;
|
|
164
126
|
agentId: string;
|
|
165
127
|
label: string;
|
|
166
|
-
status:
|
|
128
|
+
status: 'draft' | 'published' | 'archived';
|
|
167
129
|
isActive?: boolean;
|
|
168
130
|
createdAt: string;
|
|
169
131
|
updatedAt?: string;
|
|
170
132
|
publishedAt?: string | null;
|
|
171
133
|
};
|
|
172
|
-
AgentVersionDetail: components[
|
|
134
|
+
AgentVersionDetail: components['schemas']['AgentVersionSummary'] & {
|
|
173
135
|
description?: string;
|
|
174
136
|
metadata?: {
|
|
175
137
|
[key: string]: unknown;
|
|
@@ -177,8 +139,8 @@ type components = {
|
|
|
177
139
|
instructionsVersionId?: string;
|
|
178
140
|
};
|
|
179
141
|
AgentVersionListResponse: {
|
|
180
|
-
data: components[
|
|
181
|
-
meta?: components[
|
|
142
|
+
data: components['schemas']['AgentVersionSummary'][];
|
|
143
|
+
meta?: components['schemas']['PaginationMeta'];
|
|
182
144
|
};
|
|
183
145
|
CreateAgentVersionRequest: {
|
|
184
146
|
label: string;
|
|
@@ -191,7 +153,7 @@ type components = {
|
|
|
191
153
|
UpdateAgentVersionRequest: {
|
|
192
154
|
label?: string;
|
|
193
155
|
description?: string;
|
|
194
|
-
status?:
|
|
156
|
+
status?: 'draft' | 'published' | 'archived';
|
|
195
157
|
metadata?: {
|
|
196
158
|
[key: string]: unknown;
|
|
197
159
|
};
|
|
@@ -213,14 +175,14 @@ type components = {
|
|
|
213
175
|
WorkspacePhone: {
|
|
214
176
|
id: string;
|
|
215
177
|
external_id: string;
|
|
216
|
-
channel?:
|
|
178
|
+
channel?: 'voice';
|
|
217
179
|
supports_outbound?: boolean | null;
|
|
218
180
|
assigned_to?: string | null;
|
|
219
181
|
last_used_at?: string | null;
|
|
220
182
|
requires_qr_reauth?: boolean | null;
|
|
221
183
|
};
|
|
222
184
|
WorkspacePhonesResponse: {
|
|
223
|
-
data: components[
|
|
185
|
+
data: components['schemas']['WorkspacePhone'][];
|
|
224
186
|
};
|
|
225
187
|
ToolSummary: {
|
|
226
188
|
id: string;
|
|
@@ -230,15 +192,15 @@ type components = {
|
|
|
230
192
|
enabled: boolean;
|
|
231
193
|
};
|
|
232
194
|
ToolListResponse: {
|
|
233
|
-
data: components[
|
|
234
|
-
meta: components[
|
|
195
|
+
data: components['schemas']['ToolSummary'][];
|
|
196
|
+
meta: components['schemas']['PaginationMeta'];
|
|
235
197
|
};
|
|
236
198
|
ToolResourceSummary: {
|
|
237
199
|
id: string;
|
|
238
200
|
toolId: string;
|
|
239
|
-
type:
|
|
201
|
+
type: 'document' | 'media' | 'file';
|
|
240
202
|
title?: string;
|
|
241
|
-
status:
|
|
203
|
+
status: 'pending' | 'processing' | 'ready' | 'failed';
|
|
242
204
|
sizeBytes?: number | null;
|
|
243
205
|
createdAt: string;
|
|
244
206
|
updatedAt?: string | null;
|
|
@@ -247,12 +209,12 @@ type components = {
|
|
|
247
209
|
};
|
|
248
210
|
};
|
|
249
211
|
ToolResourceListResponse: {
|
|
250
|
-
data: components[
|
|
251
|
-
meta: components[
|
|
212
|
+
data: components['schemas']['ToolResourceSummary'][];
|
|
213
|
+
meta: components['schemas']['PaginationMeta'];
|
|
252
214
|
};
|
|
253
215
|
ToolResourceUploadRequest: {
|
|
254
216
|
file: string;
|
|
255
|
-
type?:
|
|
217
|
+
type?: 'document' | 'media' | 'file';
|
|
256
218
|
title?: string;
|
|
257
219
|
metadata?: {
|
|
258
220
|
[key: string]: unknown;
|
|
@@ -260,18 +222,18 @@ type components = {
|
|
|
260
222
|
};
|
|
261
223
|
ToolResourceUploadResponse: {
|
|
262
224
|
resourceId: string;
|
|
263
|
-
status:
|
|
225
|
+
status: 'queued' | 'processing' | 'completed' | 'failed';
|
|
264
226
|
message?: string;
|
|
265
227
|
toolId?: string;
|
|
266
228
|
};
|
|
267
229
|
ToolResourceReloadResponse: {
|
|
268
230
|
resourceId: string;
|
|
269
|
-
status:
|
|
231
|
+
status: 'queued' | 'processing' | 'completed' | 'failed';
|
|
270
232
|
toolId?: string;
|
|
271
233
|
message?: string;
|
|
272
234
|
};
|
|
273
235
|
ToolConnectionRequest: {
|
|
274
|
-
type?:
|
|
236
|
+
type?: 'oauth2' | 'api_key' | 'credentials';
|
|
275
237
|
authorizationCode?: string | null;
|
|
276
238
|
redirectUri?: string | null;
|
|
277
239
|
credentials?: {
|
|
@@ -282,7 +244,7 @@ type components = {
|
|
|
282
244
|
};
|
|
283
245
|
};
|
|
284
246
|
ToolConnectionResponse: {
|
|
285
|
-
status:
|
|
247
|
+
status: 'connected' | 'pending' | 'requires_action';
|
|
286
248
|
toolId?: string | null;
|
|
287
249
|
connectionId?: string | null;
|
|
288
250
|
authorizationUrl?: string | null;
|
|
@@ -310,14 +272,14 @@ type components = {
|
|
|
310
272
|
toolId: string;
|
|
311
273
|
};
|
|
312
274
|
WorkspaceEnableRequest: {
|
|
313
|
-
provider:
|
|
275
|
+
provider: 'provider';
|
|
314
276
|
apiKey: string;
|
|
315
277
|
metadata?: {
|
|
316
278
|
[key: string]: unknown;
|
|
317
279
|
};
|
|
318
280
|
};
|
|
319
281
|
WorkspaceEnableResponse: {
|
|
320
|
-
status:
|
|
282
|
+
status: 'enabled';
|
|
321
283
|
provider: string;
|
|
322
284
|
workspaceId: string;
|
|
323
285
|
};
|
|
@@ -348,8 +310,8 @@ type components = {
|
|
|
348
310
|
FieldsParam?: string;
|
|
349
311
|
IncludeParam?: string;
|
|
350
312
|
SearchParam?: string;
|
|
351
|
-
FilterParam?: components[
|
|
352
|
-
OrParam?: components[
|
|
313
|
+
FilterParam?: components['schemas']['QueryFilters'];
|
|
314
|
+
OrParam?: components['schemas']['QueryOrGroups'];
|
|
353
315
|
};
|
|
354
316
|
requestBodies: never;
|
|
355
317
|
headers: never;
|
|
@@ -683,7 +645,7 @@ type AgentEntityDependencies = {
|
|
|
683
645
|
scheduleApi: ReturnType<typeof createAgentScheduleApi>;
|
|
684
646
|
versionsApi: ReturnType<typeof createAgentVersionsApi>;
|
|
685
647
|
};
|
|
686
|
-
type ListAgentsOptions = ListQueryOptions
|
|
648
|
+
type ListAgentsOptions = Pick<ListQueryOptions, 'page' | 'limit' | 'filter'>;
|
|
687
649
|
type AgentsApi = {
|
|
688
650
|
list(options?: ListAgentsOptions): Promise<PaginatedResult<AgentListResponse, ListAgentsOptions>>;
|
|
689
651
|
get(agentId: string): Promise<AgentDetail>;
|
package/dist/index.js
CHANGED
|
@@ -700,7 +700,12 @@ function createAgentsApi(cfg, relatedApis) {
|
|
|
700
700
|
const { base, doFetch } = createHttp(cfg);
|
|
701
701
|
const jsonHeaders = { "content-type": "application/json" };
|
|
702
702
|
const fetchAgentsPage = async (options = {}) => {
|
|
703
|
-
const
|
|
703
|
+
const sanitizedOptions = {
|
|
704
|
+
page: options.page,
|
|
705
|
+
limit: options.limit,
|
|
706
|
+
filter: options.filter
|
|
707
|
+
};
|
|
708
|
+
const query = serializeListOptions(sanitizedOptions);
|
|
704
709
|
const res = await doFetch(`${base}/v1/agents`, {
|
|
705
710
|
method: "GET",
|
|
706
711
|
query
|