@getsupervisor/agents-studio-sdk 1.22.2 → 1.24.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 +243 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1117 -275
- package/dist/index.d.ts +1117 -275
- package/dist/index.js +239 -27
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,249 +1,714 @@
|
|
|
1
|
+
type WithRequired<T, K extends keyof T> = T & {
|
|
2
|
+
[P in K]-?: T[P];
|
|
3
|
+
};
|
|
4
|
+
type Without<T, U> = {
|
|
5
|
+
[P in Exclude<keyof T, keyof U>]?: never;
|
|
6
|
+
};
|
|
7
|
+
type XOR<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
|
|
8
|
+
type OneOf<T extends any[]> = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? OneOf<[XOR<A, B>, ...Rest]> : never;
|
|
1
9
|
type components = {
|
|
2
10
|
schemas: {
|
|
3
|
-
AgentDetail:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
11
|
+
AgentDetail: {
|
|
12
|
+
agentId: string;
|
|
13
|
+
name: string;
|
|
14
|
+
agentType: 'chat' | 'voice';
|
|
15
|
+
workspaceId: string;
|
|
16
|
+
versionId?: string;
|
|
17
|
+
status: 'inactive' | 'training' | 'active' | 'archived';
|
|
18
|
+
description?: string | null;
|
|
19
|
+
avatarUrl?: string | null;
|
|
20
|
+
debounceDelayMs?: number | null;
|
|
21
|
+
toneId?: string | null;
|
|
22
|
+
messageStyleId?: string | null;
|
|
23
|
+
ownerUserId?: string | null;
|
|
24
|
+
knowledgeBaseIds?: string[];
|
|
25
|
+
tags?: string[];
|
|
26
|
+
tools?: {
|
|
27
|
+
identifier: string;
|
|
28
|
+
displayName: string;
|
|
29
|
+
enabled: boolean;
|
|
30
|
+
}[];
|
|
31
|
+
voiceConfig?: {
|
|
32
|
+
voiceId?: string;
|
|
33
|
+
webhookUrl?: string;
|
|
34
|
+
llmId?: string | null;
|
|
35
|
+
} | null;
|
|
36
|
+
createdAt: string;
|
|
37
|
+
updatedAt: string;
|
|
38
|
+
metadata?: {
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
PaginationMeta: {
|
|
43
|
+
total: number;
|
|
44
|
+
page: number;
|
|
45
|
+
limit: number;
|
|
46
|
+
hasNext: boolean;
|
|
47
|
+
hasPrevious: boolean;
|
|
48
|
+
};
|
|
49
|
+
QueryFilters: string;
|
|
50
|
+
QueryOrGroups: string;
|
|
51
|
+
AgentSummary: {
|
|
52
|
+
agentId: string;
|
|
53
|
+
name: string;
|
|
54
|
+
agentType: 'chat' | 'voice';
|
|
55
|
+
status: 'inactive' | 'training' | 'active' | 'archived';
|
|
56
|
+
workspaceId: string;
|
|
57
|
+
createdAt: string;
|
|
58
|
+
updatedAt: string;
|
|
59
|
+
};
|
|
60
|
+
AgentListResponse: {
|
|
61
|
+
data: components['schemas']['AgentSummary'][];
|
|
62
|
+
meta: components['schemas']['PaginationMeta'];
|
|
63
|
+
};
|
|
64
|
+
CreateAgentRequest: {
|
|
65
|
+
name: string;
|
|
66
|
+
description?: string | null;
|
|
67
|
+
agentType: 'chat' | 'voice';
|
|
68
|
+
status?: 'inactive' | 'training' | 'active';
|
|
69
|
+
avatarUrl?: string | null;
|
|
70
|
+
debounceDelayMs?: number | null;
|
|
71
|
+
metadata?: {
|
|
72
|
+
[key: string]: unknown;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
AgentTagRequest: {
|
|
76
|
+
tagId: string;
|
|
77
|
+
};
|
|
78
|
+
AgentTagsResponse: {
|
|
79
|
+
agentId: string;
|
|
80
|
+
tags: string[];
|
|
81
|
+
};
|
|
82
|
+
UpdateAgentRequest: {
|
|
83
|
+
name?: string;
|
|
84
|
+
status?: 'inactive' | 'training' | 'active' | 'archived';
|
|
85
|
+
description?: string | null;
|
|
86
|
+
toneId?: string | null;
|
|
87
|
+
messageStyleId?: string | null;
|
|
88
|
+
tags?: string[];
|
|
89
|
+
debounceDelayMs?: number | null;
|
|
90
|
+
ownerUserId?: string | null;
|
|
91
|
+
metadata?: {
|
|
92
|
+
[key: string]: unknown;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
Instruction: {
|
|
96
|
+
id: string;
|
|
97
|
+
versionId: string;
|
|
98
|
+
order: number;
|
|
99
|
+
content: string;
|
|
100
|
+
createdAt?: string;
|
|
101
|
+
updatedAt?: string;
|
|
102
|
+
};
|
|
103
|
+
InstructionListResponse: {
|
|
104
|
+
data: components['schemas']['Instruction'][];
|
|
105
|
+
meta?: components['schemas']['PaginationMeta'];
|
|
106
|
+
};
|
|
107
|
+
CreateInstructionRequest: {
|
|
108
|
+
order: number;
|
|
109
|
+
content: string;
|
|
110
|
+
};
|
|
111
|
+
InstructionCreatedResponse: {
|
|
112
|
+
id: string;
|
|
113
|
+
versionId: string;
|
|
114
|
+
order: number;
|
|
115
|
+
createdAt: string;
|
|
116
|
+
};
|
|
117
|
+
UpdateInstructionRequest: {
|
|
118
|
+
order?: number;
|
|
119
|
+
content?: string;
|
|
120
|
+
};
|
|
121
|
+
VoiceSummary: {
|
|
122
|
+
id: string;
|
|
123
|
+
providerVoiceId?: string;
|
|
124
|
+
name: string;
|
|
125
|
+
gender?: 'female' | 'male' | 'neutral';
|
|
126
|
+
locale: string;
|
|
127
|
+
tags?: string[];
|
|
128
|
+
previewUrl?: string;
|
|
129
|
+
provider: string;
|
|
130
|
+
};
|
|
131
|
+
VoiceListResponse: {
|
|
132
|
+
data: components['schemas']['VoiceSummary'][];
|
|
133
|
+
meta: components['schemas']['PaginationMeta'];
|
|
134
|
+
};
|
|
135
|
+
AgentScheduleSlot: {
|
|
136
|
+
startTime: string;
|
|
137
|
+
endTime: string;
|
|
138
|
+
};
|
|
139
|
+
AgentScheduleRule: {
|
|
140
|
+
dayOfWeek: 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
|
|
141
|
+
isEnabled: boolean;
|
|
142
|
+
slot?: components['schemas']['AgentScheduleSlot'] | null;
|
|
143
|
+
};
|
|
144
|
+
AgentSchedule: {
|
|
145
|
+
agentId: string;
|
|
146
|
+
isEnabled: boolean;
|
|
147
|
+
timezone: string;
|
|
148
|
+
outOfHoursBehavior: 'offline' | 'limited-service' | 'auto-message';
|
|
149
|
+
outOfHoursMessage?: string | null;
|
|
150
|
+
rules: components['schemas']['AgentScheduleRule'][];
|
|
151
|
+
metadata?: {
|
|
152
|
+
[key: string]: unknown;
|
|
153
|
+
};
|
|
154
|
+
createdAt: string;
|
|
155
|
+
updatedAt: string;
|
|
156
|
+
};
|
|
157
|
+
UpdateAgentScheduleRequest: {
|
|
158
|
+
isEnabled: boolean;
|
|
159
|
+
timezone: string;
|
|
160
|
+
outOfHoursBehavior: 'offline' | 'limited-service' | 'auto-message';
|
|
161
|
+
outOfHoursMessage?: string | null;
|
|
162
|
+
rules: components['schemas']['AgentScheduleRule'][];
|
|
163
|
+
metadata?: {
|
|
164
|
+
[key: string]: unknown;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
AgentScheduleException: {
|
|
168
|
+
id: string;
|
|
169
|
+
agentId: string;
|
|
170
|
+
exceptionDate: string;
|
|
171
|
+
isClosed: boolean;
|
|
172
|
+
startTime?: string | null;
|
|
173
|
+
endTime?: string | null;
|
|
174
|
+
reason?: string | null;
|
|
175
|
+
createdAt: string;
|
|
176
|
+
};
|
|
177
|
+
AgentScheduleExceptionListResponse: {
|
|
178
|
+
data: components['schemas']['AgentScheduleException'][];
|
|
179
|
+
meta: components['schemas']['PaginationMeta'];
|
|
180
|
+
};
|
|
181
|
+
CreateAgentScheduleExceptionRequest: {
|
|
182
|
+
exceptionDate: string;
|
|
183
|
+
isClosed: boolean;
|
|
184
|
+
startTime?: string | null;
|
|
185
|
+
endTime?: string | null;
|
|
186
|
+
reason?: string | null;
|
|
187
|
+
};
|
|
188
|
+
UpdateAgentScheduleExceptionRequest: {
|
|
189
|
+
exceptionDate?: string;
|
|
190
|
+
isClosed?: boolean;
|
|
191
|
+
startTime?: string | null;
|
|
192
|
+
endTime?: string | null;
|
|
193
|
+
reason?: string | null;
|
|
194
|
+
};
|
|
195
|
+
AgentVersionSummary: {
|
|
196
|
+
id: string;
|
|
197
|
+
agentId: string;
|
|
198
|
+
status: 'draft' | 'active' | 'archived';
|
|
199
|
+
versionNumber: number;
|
|
200
|
+
notes?: string | null;
|
|
201
|
+
createdAt: string;
|
|
202
|
+
updatedAt: string;
|
|
203
|
+
publishedAt?: string | null;
|
|
204
|
+
};
|
|
205
|
+
AgentVersionDetail: components['schemas']['AgentVersionSummary'] & {
|
|
206
|
+
versionHash: string;
|
|
207
|
+
createdBy: string;
|
|
208
|
+
};
|
|
209
|
+
AgentVersionListResponse: {
|
|
210
|
+
data: components['schemas']['AgentVersionSummary'][];
|
|
211
|
+
meta: components['schemas']['PaginationMeta'];
|
|
212
|
+
};
|
|
213
|
+
CreateAgentVersionRequest: {
|
|
214
|
+
notes?: string;
|
|
215
|
+
};
|
|
216
|
+
PublishAgentVersionRequest: {
|
|
217
|
+
publishedAt?: string;
|
|
218
|
+
notes?: string;
|
|
219
|
+
};
|
|
220
|
+
UpdateAgentVersionNotesRequest: {
|
|
221
|
+
notes?: string;
|
|
222
|
+
};
|
|
223
|
+
AgentBlueprint: {
|
|
224
|
+
id: string;
|
|
225
|
+
agentId: string;
|
|
226
|
+
versionId: string;
|
|
227
|
+
versionStatus: 'draft' | 'active' | 'archived';
|
|
228
|
+
languageId: string;
|
|
229
|
+
personalityName: string;
|
|
230
|
+
personalityRole: string;
|
|
231
|
+
targetAudience: string;
|
|
232
|
+
mainGoal: string;
|
|
233
|
+
personalityInitialGreeting: string;
|
|
234
|
+
personalityMessageStyleId: string;
|
|
235
|
+
personalityToneStyleId: string;
|
|
236
|
+
requiredData?: {
|
|
237
|
+
[key: string]: unknown;
|
|
238
|
+
}[];
|
|
239
|
+
criticalRules?: string[];
|
|
240
|
+
topicsAllowed?: string[];
|
|
241
|
+
topicsForbidden?: string[];
|
|
242
|
+
createdAt: string;
|
|
243
|
+
updatedAt: string;
|
|
244
|
+
};
|
|
245
|
+
AgentBlueprintListItem: {
|
|
246
|
+
versionId: string;
|
|
247
|
+
status: 'draft' | 'active' | 'archived';
|
|
248
|
+
createdAt: string;
|
|
249
|
+
updatedAt: string;
|
|
250
|
+
blueprint: components['schemas']['AgentBlueprint'];
|
|
251
|
+
};
|
|
252
|
+
AgentBlueprintListResponse: {
|
|
253
|
+
data: components['schemas']['AgentBlueprintListItem'][];
|
|
254
|
+
};
|
|
255
|
+
CreateAgentBlueprintRequest: {
|
|
256
|
+
languageId: string;
|
|
257
|
+
personalityName: string;
|
|
258
|
+
personalityRole: string;
|
|
259
|
+
targetAudience: string;
|
|
260
|
+
mainGoal: string;
|
|
261
|
+
personalityInitialGreeting: string;
|
|
262
|
+
personalityMessageStyleId: string;
|
|
263
|
+
personalityToneStyleId: string;
|
|
264
|
+
requiredData?: {
|
|
265
|
+
[key: string]: unknown;
|
|
266
|
+
}[];
|
|
267
|
+
criticalRules?: string[];
|
|
268
|
+
topicsAllowed?: string[];
|
|
269
|
+
topicsForbidden?: string[];
|
|
270
|
+
};
|
|
271
|
+
UpdateAgentBlueprintRequest: {
|
|
272
|
+
languageId?: string;
|
|
273
|
+
personalityName?: string;
|
|
274
|
+
personalityRole?: string;
|
|
275
|
+
targetAudience?: string;
|
|
276
|
+
mainGoal?: string;
|
|
277
|
+
personalityInitialGreeting?: string;
|
|
278
|
+
personalityMessageStyleId?: string;
|
|
279
|
+
personalityToneStyleId?: string;
|
|
280
|
+
requiredData?: {
|
|
281
|
+
[key: string]: unknown;
|
|
282
|
+
}[];
|
|
283
|
+
criticalRules?: string[];
|
|
284
|
+
topicsAllowed?: string[];
|
|
285
|
+
topicsForbidden?: string[];
|
|
286
|
+
};
|
|
287
|
+
BlueprintStage: {
|
|
288
|
+
id: string;
|
|
289
|
+
agentId: string;
|
|
290
|
+
blueprintId: string;
|
|
291
|
+
name: string;
|
|
292
|
+
title?: string | null;
|
|
293
|
+
prompt: string;
|
|
294
|
+
order: number;
|
|
295
|
+
triggers: components['schemas']['BlueprintStageTrigger'][];
|
|
296
|
+
metadata?: {
|
|
297
|
+
[key: string]: unknown;
|
|
298
|
+
} | null;
|
|
299
|
+
createdAt: string;
|
|
300
|
+
updatedAt: string;
|
|
301
|
+
};
|
|
302
|
+
BlueprintStageListResponse: {
|
|
303
|
+
data: components['schemas']['BlueprintStage'][];
|
|
304
|
+
meta: components['schemas']['PaginationMeta'];
|
|
305
|
+
};
|
|
306
|
+
CreateBlueprintStageRequest: {
|
|
307
|
+
name: string;
|
|
308
|
+
title?: string | null;
|
|
309
|
+
prompt: string;
|
|
310
|
+
order?: number | null;
|
|
311
|
+
triggers?: components['schemas']['BlueprintStageTriggerInput'][] | null;
|
|
312
|
+
metadata?: {
|
|
313
|
+
[key: string]: unknown;
|
|
314
|
+
} | null;
|
|
315
|
+
};
|
|
316
|
+
UpdateBlueprintStageRequest: {
|
|
317
|
+
name?: string;
|
|
318
|
+
title?: string | null;
|
|
319
|
+
prompt?: string;
|
|
320
|
+
order?: number | null;
|
|
321
|
+
metadata?: {
|
|
322
|
+
[key: string]: unknown;
|
|
323
|
+
} | null;
|
|
324
|
+
};
|
|
325
|
+
BlueprintStageReorderRequest: {
|
|
326
|
+
stageIds: string[];
|
|
327
|
+
startingStageName?: string | null;
|
|
328
|
+
};
|
|
329
|
+
BlueprintStageTrigger: {
|
|
330
|
+
id: string;
|
|
331
|
+
stageId: string;
|
|
332
|
+
blueprintId: string;
|
|
333
|
+
condition: components['schemas']['BlueprintStageTriggerCondition'];
|
|
334
|
+
nextStageName: string;
|
|
335
|
+
createdAt: string;
|
|
336
|
+
updatedAt: string;
|
|
337
|
+
};
|
|
338
|
+
BlueprintStageTriggerListResponse: {
|
|
339
|
+
data: components['schemas']['BlueprintStageTrigger'][];
|
|
340
|
+
meta: components['schemas']['PaginationMeta'];
|
|
341
|
+
};
|
|
342
|
+
CreateBlueprintStageTriggerRequest: components['schemas']['BlueprintStageTriggerInput'];
|
|
343
|
+
UpdateBlueprintStageTriggerRequest: {
|
|
344
|
+
condition?: components['schemas']['BlueprintStageTriggerCondition'];
|
|
345
|
+
nextStageName?: string | null;
|
|
346
|
+
};
|
|
347
|
+
BlueprintGraphDraft: {
|
|
348
|
+
startingStage: string;
|
|
349
|
+
stages: components['schemas']['BlueprintStageDraft'][];
|
|
350
|
+
};
|
|
351
|
+
BlueprintStageDraft: {
|
|
352
|
+
name: string;
|
|
353
|
+
title?: string | null;
|
|
354
|
+
prompt: string;
|
|
355
|
+
order?: number | null;
|
|
356
|
+
triggers?: components['schemas']['BlueprintStageTriggerInput'][] | null;
|
|
357
|
+
metadata?: {
|
|
358
|
+
[key: string]: unknown;
|
|
359
|
+
} | null;
|
|
360
|
+
};
|
|
361
|
+
ConnectPhoneRequest: {
|
|
362
|
+
agent_id: string;
|
|
363
|
+
phone_id: string;
|
|
364
|
+
test_phones?: string[];
|
|
365
|
+
allow_all?: boolean;
|
|
366
|
+
};
|
|
367
|
+
PhoneAssignmentResponse: {
|
|
368
|
+
agent_id: string;
|
|
369
|
+
phone_id: string;
|
|
370
|
+
allow_all: boolean;
|
|
371
|
+
test_phones?: string[];
|
|
372
|
+
channel?: string | null;
|
|
373
|
+
assigned_at?: string | null;
|
|
374
|
+
};
|
|
375
|
+
WorkspacePhone: {
|
|
376
|
+
id: string;
|
|
377
|
+
external_id: string;
|
|
378
|
+
channel?: 'voice';
|
|
379
|
+
supports_outbound?: boolean | null;
|
|
380
|
+
assigned_to?: string | null;
|
|
381
|
+
last_used_at?: string | null;
|
|
382
|
+
requires_qr_reauth?: boolean | null;
|
|
383
|
+
};
|
|
384
|
+
WorkspacePhonesResponse: {
|
|
385
|
+
data: components['schemas']['WorkspacePhone'][];
|
|
386
|
+
};
|
|
387
|
+
ToolSummary: {
|
|
388
|
+
id: string;
|
|
389
|
+
name: string;
|
|
390
|
+
identifier: string;
|
|
391
|
+
description?: string | null;
|
|
392
|
+
enabled: boolean;
|
|
393
|
+
category?: string | null;
|
|
394
|
+
auth: 'none' | 'oauth2' | 'api_key' | 'custom';
|
|
395
|
+
requiresUserAuth: boolean;
|
|
396
|
+
configSchema?: components['schemas']['ToolConfigSchema'] | null;
|
|
397
|
+
};
|
|
398
|
+
ToolListResponse: {
|
|
399
|
+
data: components['schemas']['ToolSummary'][];
|
|
400
|
+
meta: components['schemas']['PaginationMeta'];
|
|
401
|
+
};
|
|
402
|
+
ToolResourceSummary: {
|
|
403
|
+
id: string;
|
|
404
|
+
toolId: string;
|
|
405
|
+
type: 'document' | 'media' | 'file';
|
|
406
|
+
title?: string;
|
|
407
|
+
status: 'pending' | 'processing' | 'ready' | 'failed';
|
|
408
|
+
sizeBytes?: number | null;
|
|
409
|
+
createdAt: string;
|
|
410
|
+
updatedAt?: string | null;
|
|
411
|
+
metadata?: {
|
|
412
|
+
[key: string]: unknown;
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
ToolResourceListResponse: {
|
|
416
|
+
data: components['schemas']['ToolResourceSummary'][];
|
|
417
|
+
meta: components['schemas']['PaginationMeta'];
|
|
418
|
+
};
|
|
419
|
+
ToolResourceUploadRequest: {
|
|
420
|
+
file: string;
|
|
421
|
+
type?: 'document' | 'media' | 'file';
|
|
422
|
+
title?: string;
|
|
423
|
+
metadata?: {
|
|
424
|
+
[key: string]: unknown;
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
ToolResourceUploadResponse: {
|
|
428
|
+
resourceId: string;
|
|
429
|
+
status: 'queued' | 'processing' | 'completed' | 'failed';
|
|
430
|
+
message?: string;
|
|
431
|
+
toolId?: string;
|
|
432
|
+
};
|
|
433
|
+
ToolResourceReloadResponse: {
|
|
434
|
+
resourceId: string;
|
|
435
|
+
status: 'queued' | 'processing' | 'completed' | 'failed';
|
|
436
|
+
toolId?: string;
|
|
437
|
+
message?: string;
|
|
438
|
+
};
|
|
439
|
+
ToolConnectionRequest: {
|
|
440
|
+
workspaceId: string;
|
|
441
|
+
agentId: string;
|
|
442
|
+
metadata?: {
|
|
443
|
+
[key: string]: unknown;
|
|
444
|
+
};
|
|
445
|
+
auth?: components['schemas']['ToolConnectionAuth'];
|
|
446
|
+
};
|
|
447
|
+
ToolConnectionResponse: {
|
|
448
|
+
status: 'connected' | 'pending' | 'error';
|
|
449
|
+
toolAgentConnectionId?: string | null;
|
|
450
|
+
toolId: string;
|
|
451
|
+
workspaceId: string;
|
|
452
|
+
agentId: string;
|
|
453
|
+
providerRef?: string | null;
|
|
454
|
+
authorizationUrl?: string | null;
|
|
455
|
+
message?: string | null;
|
|
456
|
+
metadata?: {
|
|
457
|
+
[key: string]: unknown;
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
ToolConnectionAuth: {
|
|
461
|
+
type: 'none' | 'oauth2' | 'api_key';
|
|
462
|
+
data?: {
|
|
463
|
+
[key: string]: unknown;
|
|
464
|
+
};
|
|
465
|
+
};
|
|
466
|
+
ExecuteToolRequest: {
|
|
467
|
+
workspaceId: string;
|
|
468
|
+
agentId: string;
|
|
469
|
+
action: string;
|
|
470
|
+
args?: {
|
|
471
|
+
[key: string]: unknown;
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
ExecuteToolResponse: {
|
|
475
|
+
status: 'ok' | 'queued' | 'error';
|
|
476
|
+
result?: {
|
|
477
|
+
[key: string]: unknown;
|
|
478
|
+
};
|
|
479
|
+
metadata?: {
|
|
480
|
+
[key: string]: unknown;
|
|
481
|
+
};
|
|
482
|
+
toolId: string;
|
|
483
|
+
toolAgentConnectionId?: string | null;
|
|
484
|
+
providerRef?: string | null;
|
|
485
|
+
message?: string | null;
|
|
486
|
+
};
|
|
487
|
+
CatalogItemLinks: {
|
|
488
|
+
self: string;
|
|
489
|
+
catalog: string;
|
|
490
|
+
};
|
|
491
|
+
CatalogItemSummary: WithRequired<{
|
|
492
|
+
id: string;
|
|
493
|
+
type: 'language' | 'message_style' | 'tone_style' | 'tag' | 'voice';
|
|
494
|
+
systemIdentifier: string;
|
|
495
|
+
scope: 'global' | 'workspace';
|
|
496
|
+
workspaceId?: string | null;
|
|
497
|
+
name: string;
|
|
498
|
+
description: string;
|
|
499
|
+
isActive: boolean;
|
|
500
|
+
metadata: Record<string, never>;
|
|
501
|
+
createdAt: string;
|
|
502
|
+
updatedAt: string;
|
|
503
|
+
links: components['schemas']['CatalogItemLinks'];
|
|
504
|
+
}, 'id' | 'type' | 'systemIdentifier' | 'scope' | 'name' | 'description' | 'isActive' | 'metadata' | 'createdAt' | 'updatedAt' | 'links'>;
|
|
505
|
+
CatalogItemDetail: components['schemas']['CatalogItemSummary'];
|
|
506
|
+
CatalogItemListResponse: {
|
|
507
|
+
data: components['schemas']['CatalogItemSummary'][];
|
|
508
|
+
meta: components['schemas']['PaginationMeta'];
|
|
509
|
+
};
|
|
510
|
+
CatalogItemCreateRequest: WithRequired<{
|
|
511
|
+
type: 'language' | 'message_style' | 'tone_style' | 'tag' | 'voice';
|
|
512
|
+
scope: 'global' | 'workspace';
|
|
513
|
+
workspaceId?: string;
|
|
514
|
+
name: string;
|
|
515
|
+
description: string;
|
|
516
|
+
systemIdentifier?: string;
|
|
517
|
+
metadata: Record<string, never>;
|
|
518
|
+
isActive?: boolean;
|
|
519
|
+
}, 'type' | 'scope' | 'name' | 'description' | 'metadata'>;
|
|
520
|
+
WorkspaceEnableRequest: {
|
|
521
|
+
apiKey: string;
|
|
522
|
+
metadata?: {
|
|
523
|
+
[key: string]: unknown;
|
|
524
|
+
};
|
|
525
|
+
};
|
|
526
|
+
WorkspaceEnableResponse: {
|
|
527
|
+
status: 'enabled';
|
|
528
|
+
provider: string;
|
|
529
|
+
workspaceId: string;
|
|
530
|
+
};
|
|
531
|
+
ErrorResponse: {
|
|
532
|
+
code: string;
|
|
533
|
+
message: string;
|
|
534
|
+
details?: {
|
|
535
|
+
[key: string]: unknown;
|
|
536
|
+
};
|
|
537
|
+
};
|
|
538
|
+
WebhookSummary: {
|
|
539
|
+
id: string;
|
|
540
|
+
url: string;
|
|
541
|
+
agentId?: string | null;
|
|
542
|
+
description?: string | null;
|
|
543
|
+
isActive: boolean;
|
|
544
|
+
secretPreview?: string | null;
|
|
545
|
+
createdAt: string;
|
|
546
|
+
updatedAt: string;
|
|
547
|
+
lastDeliveryAt?: string | null;
|
|
548
|
+
};
|
|
549
|
+
WebhookDetail: components['schemas']['WebhookSummary'] & {
|
|
550
|
+
headers?: {
|
|
551
|
+
[key: string]: string;
|
|
552
|
+
};
|
|
553
|
+
successCount?: number;
|
|
554
|
+
failureCount?: number;
|
|
555
|
+
};
|
|
556
|
+
WebhookListResponse: {
|
|
557
|
+
data: components['schemas']['WebhookSummary'][];
|
|
558
|
+
meta: components['schemas']['PaginationMeta'];
|
|
559
|
+
};
|
|
560
|
+
CreateWebhookRequest: {
|
|
561
|
+
url: string;
|
|
562
|
+
agentId?: string | null;
|
|
563
|
+
description?: string | null;
|
|
564
|
+
isActive?: boolean;
|
|
565
|
+
headers?: {
|
|
566
|
+
[key: string]: string;
|
|
567
|
+
};
|
|
568
|
+
secret?: string;
|
|
569
|
+
};
|
|
570
|
+
UpdateWebhookRequest: {
|
|
571
|
+
url?: string;
|
|
572
|
+
agentId?: string | null;
|
|
573
|
+
description?: string | null;
|
|
574
|
+
isActive?: boolean;
|
|
575
|
+
headers?: {
|
|
576
|
+
[key: string]: string;
|
|
577
|
+
};
|
|
578
|
+
};
|
|
579
|
+
EventSubscriptionSummary: {
|
|
580
|
+
id: string;
|
|
581
|
+
webhookId: string;
|
|
582
|
+
eventKey: string;
|
|
583
|
+
isActive: boolean;
|
|
584
|
+
createdAt: string;
|
|
585
|
+
updatedAt: string;
|
|
586
|
+
};
|
|
587
|
+
EventSubscriptionDetail: components['schemas']['EventSubscriptionSummary'] & Record<string, never>;
|
|
588
|
+
EventSubscriptionListResponse: {
|
|
589
|
+
data: components['schemas']['EventSubscriptionDetail'][];
|
|
590
|
+
meta: components['schemas']['PaginationMeta'];
|
|
591
|
+
};
|
|
592
|
+
CreateEventSubscriptionRequest: {
|
|
593
|
+
eventKey: string;
|
|
594
|
+
isActive?: boolean;
|
|
595
|
+
};
|
|
596
|
+
UpdateEventSubscriptionRequest: {
|
|
597
|
+
isActive?: boolean;
|
|
598
|
+
};
|
|
599
|
+
BlueprintStageTriggerCondition: {
|
|
600
|
+
type: 'intent' | 'rule' | 'expression';
|
|
601
|
+
value: string;
|
|
602
|
+
metadata?: {
|
|
603
|
+
[key: string]: unknown;
|
|
604
|
+
} | null;
|
|
605
|
+
};
|
|
606
|
+
BlueprintStageTriggerInput: {
|
|
607
|
+
condition: components['schemas']['BlueprintStageTriggerCondition'];
|
|
608
|
+
nextStageName: string;
|
|
609
|
+
};
|
|
610
|
+
ApiKeySummary: {
|
|
611
|
+
id: string;
|
|
612
|
+
name: string;
|
|
613
|
+
description?: string | null;
|
|
614
|
+
scopes: string[];
|
|
615
|
+
environment: 'production' | 'sandbox' | 'staging' | 'development';
|
|
616
|
+
keyPreview: string;
|
|
617
|
+
createdAt: string;
|
|
618
|
+
updatedAt: string;
|
|
619
|
+
lastUsedAt?: string | null;
|
|
620
|
+
revokedAt?: string | null;
|
|
621
|
+
};
|
|
622
|
+
CreateApiKeyRequest: {
|
|
623
|
+
name: string;
|
|
624
|
+
description?: string | null;
|
|
625
|
+
environment?: 'production' | 'sandbox' | 'staging' | 'development';
|
|
626
|
+
scopes?: string[];
|
|
627
|
+
};
|
|
628
|
+
CreateApiKeyResponse: components['schemas']['ApiKeySummary'] & {
|
|
629
|
+
key: string;
|
|
630
|
+
};
|
|
631
|
+
ToolConfigSchemaActionPrompts: {
|
|
632
|
+
assistant?: string;
|
|
633
|
+
user?: string;
|
|
634
|
+
validationFailure?: string;
|
|
635
|
+
};
|
|
636
|
+
ToolConfigSchemaAction: {
|
|
637
|
+
summary?: string;
|
|
638
|
+
description?: string;
|
|
639
|
+
notes?: string[];
|
|
640
|
+
prompts?: components['schemas']['ToolConfigSchemaActionPrompts'];
|
|
641
|
+
schema: OneOf<[
|
|
642
|
+
{
|
|
643
|
+
[key: string]: unknown;
|
|
644
|
+
},
|
|
645
|
+
boolean
|
|
646
|
+
]>;
|
|
647
|
+
};
|
|
648
|
+
ToolConfigSchema: {
|
|
649
|
+
schemaVersion: 'json-schema/2020-12';
|
|
650
|
+
actions: {
|
|
651
|
+
[key: string]: components['schemas']['ToolConfigSchemaAction'];
|
|
652
|
+
};
|
|
653
|
+
};
|
|
654
|
+
CatalogItemLanguageMetadata: {
|
|
655
|
+
code: string;
|
|
656
|
+
locale?: string | null;
|
|
657
|
+
};
|
|
658
|
+
CatalogItemMessageStyleMetadata: {
|
|
659
|
+
register?: string | null;
|
|
660
|
+
sample?: string | null;
|
|
661
|
+
[key: string]: unknown;
|
|
662
|
+
};
|
|
663
|
+
CatalogItemToneStyleMetadata: {
|
|
664
|
+
mood?: string | null;
|
|
665
|
+
intensity?: string | null;
|
|
666
|
+
[key: string]: unknown;
|
|
667
|
+
};
|
|
668
|
+
CatalogItemTagMetadata: {
|
|
669
|
+
color?: string | null;
|
|
670
|
+
};
|
|
671
|
+
CatalogItemVoiceMetadata: {
|
|
672
|
+
language: string;
|
|
673
|
+
gender: 'female' | 'male' | 'neutral';
|
|
674
|
+
tone: string;
|
|
675
|
+
provider?: string | null;
|
|
676
|
+
previewUrl?: string | null;
|
|
677
|
+
};
|
|
73
678
|
};
|
|
74
679
|
responses: never;
|
|
75
680
|
parameters: {
|
|
76
|
-
XWorkspaceId:
|
|
77
|
-
AgentId:
|
|
78
|
-
PhoneId:
|
|
79
|
-
InstructionId:
|
|
80
|
-
ExceptionId:
|
|
81
|
-
VersionId:
|
|
82
|
-
TagId:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
681
|
+
XWorkspaceId: string;
|
|
682
|
+
AgentId: string;
|
|
683
|
+
PhoneId: string;
|
|
684
|
+
InstructionId: string;
|
|
685
|
+
ExceptionId: string;
|
|
686
|
+
VersionId: string;
|
|
687
|
+
TagId: string;
|
|
688
|
+
StageId: string;
|
|
689
|
+
TriggerId: string;
|
|
690
|
+
WorkspaceId: string;
|
|
691
|
+
ToolId: string;
|
|
692
|
+
ResourceId: string;
|
|
693
|
+
CatalogItemId: string;
|
|
694
|
+
PageParam?: number;
|
|
695
|
+
LimitParam?: number;
|
|
696
|
+
Page?: number;
|
|
697
|
+
Limit?: number;
|
|
698
|
+
SortParam?: string;
|
|
699
|
+
FieldsParam?: string;
|
|
700
|
+
IncludeParam?: string;
|
|
701
|
+
SearchParam?: string;
|
|
702
|
+
FilterParam?: components['schemas']['QueryFilters'];
|
|
703
|
+
WebhookId: string;
|
|
704
|
+
SubscriptionId: string;
|
|
705
|
+
ApiKeyId: string;
|
|
706
|
+
IdempotencyKey: string;
|
|
99
707
|
};
|
|
100
708
|
requestBodies: never;
|
|
101
709
|
headers: never;
|
|
102
710
|
pathItems: never;
|
|
103
711
|
};
|
|
104
|
-
type external = {
|
|
105
|
-
'components/parameters.yaml': any;
|
|
106
|
-
'components/schemas.yaml': any;
|
|
107
|
-
'components/securitySchemes.yaml': any;
|
|
108
|
-
'paths/agents/agent-blueprints.yaml': {
|
|
109
|
-
get: unknown;
|
|
110
|
-
};
|
|
111
|
-
'paths/agents/agent-by-id.yaml': {
|
|
112
|
-
get: unknown;
|
|
113
|
-
patch: unknown;
|
|
114
|
-
delete: unknown;
|
|
115
|
-
};
|
|
116
|
-
'paths/agents/agent-instruction-by-id.yaml': {
|
|
117
|
-
patch: unknown;
|
|
118
|
-
};
|
|
119
|
-
'paths/agents/agent-instructions.yaml': {
|
|
120
|
-
get: unknown;
|
|
121
|
-
post: unknown;
|
|
122
|
-
};
|
|
123
|
-
'paths/agents/agent-phone-by-id.yaml': {
|
|
124
|
-
delete: unknown;
|
|
125
|
-
};
|
|
126
|
-
'paths/agents/agent-phones.yaml': {
|
|
127
|
-
post: unknown;
|
|
128
|
-
};
|
|
129
|
-
'paths/agents/agent-schedule-exception-by-id.yaml': {
|
|
130
|
-
get: unknown;
|
|
131
|
-
patch: unknown;
|
|
132
|
-
delete: unknown;
|
|
133
|
-
};
|
|
134
|
-
'paths/agents/agent-schedule-exceptions.yaml': {
|
|
135
|
-
get: unknown;
|
|
136
|
-
post: unknown;
|
|
137
|
-
};
|
|
138
|
-
'paths/agents/agent-schedule.yaml': {
|
|
139
|
-
get: unknown;
|
|
140
|
-
put: unknown;
|
|
141
|
-
post: unknown;
|
|
142
|
-
};
|
|
143
|
-
'paths/agents/agent-tag-by-id.yaml': {
|
|
144
|
-
delete: unknown;
|
|
145
|
-
};
|
|
146
|
-
'paths/agents/agent-tags.yaml': {
|
|
147
|
-
post: unknown;
|
|
148
|
-
};
|
|
149
|
-
'paths/agents/agent-version-blueprint.yaml': {
|
|
150
|
-
get: unknown;
|
|
151
|
-
post: unknown;
|
|
152
|
-
patch: unknown;
|
|
153
|
-
};
|
|
154
|
-
'paths/agents/agent-version-by-id.yaml': {
|
|
155
|
-
get: unknown;
|
|
156
|
-
};
|
|
157
|
-
'paths/agents/agent-version-clone.yaml': {
|
|
158
|
-
post: unknown;
|
|
159
|
-
};
|
|
160
|
-
'paths/agents/agent-version-instruction-by-id.yaml': {
|
|
161
|
-
patch: unknown;
|
|
162
|
-
delete: unknown;
|
|
163
|
-
};
|
|
164
|
-
'paths/agents/agent-version-instructions.yaml': {
|
|
165
|
-
get: unknown;
|
|
166
|
-
post: unknown;
|
|
167
|
-
};
|
|
168
|
-
'paths/agents/agent-version-notes.yaml': {
|
|
169
|
-
patch: unknown;
|
|
170
|
-
};
|
|
171
|
-
'paths/agents/agent-version-publish.yaml': {
|
|
172
|
-
post: unknown;
|
|
173
|
-
};
|
|
174
|
-
'paths/agents/agent-versions.yaml': {
|
|
175
|
-
get: unknown;
|
|
176
|
-
post: unknown;
|
|
177
|
-
};
|
|
178
|
-
'paths/agents/agents.yaml': {
|
|
179
|
-
get: unknown;
|
|
180
|
-
post: unknown;
|
|
181
|
-
};
|
|
182
|
-
'paths/api-keys/api-key-by-id.yaml': {
|
|
183
|
-
delete: unknown;
|
|
184
|
-
};
|
|
185
|
-
'paths/api-keys/api-key-show.yaml': {
|
|
186
|
-
get: unknown;
|
|
187
|
-
};
|
|
188
|
-
'paths/api-keys/api-keys.yaml': {
|
|
189
|
-
get: unknown;
|
|
190
|
-
post: unknown;
|
|
191
|
-
};
|
|
192
|
-
'paths/catalogs/catalog-item-by-id.yaml': {
|
|
193
|
-
get: unknown;
|
|
194
|
-
delete: unknown;
|
|
195
|
-
};
|
|
196
|
-
'paths/catalogs/catalog-items.yaml': {
|
|
197
|
-
get: unknown;
|
|
198
|
-
post: unknown;
|
|
199
|
-
};
|
|
200
|
-
'paths/tools/tool-connect.yaml': {
|
|
201
|
-
post: unknown;
|
|
202
|
-
};
|
|
203
|
-
'paths/tools/tool-execute.yaml': {
|
|
204
|
-
post: unknown;
|
|
205
|
-
};
|
|
206
|
-
'paths/tools/tool-resource-by-id.yaml': {
|
|
207
|
-
delete: unknown;
|
|
208
|
-
};
|
|
209
|
-
'paths/tools/tool-resource-reload.yaml': {
|
|
210
|
-
post: unknown;
|
|
211
|
-
};
|
|
212
|
-
'paths/tools/tool-resources.yaml': {
|
|
213
|
-
get: unknown;
|
|
214
|
-
post: unknown;
|
|
215
|
-
};
|
|
216
|
-
'paths/tools/tools.yaml': {
|
|
217
|
-
get: unknown;
|
|
218
|
-
};
|
|
219
|
-
'paths/voices/voices.yaml': {
|
|
220
|
-
get: unknown;
|
|
221
|
-
};
|
|
222
|
-
'paths/webhooks/webhook-by-id.yaml': {
|
|
223
|
-
get: unknown;
|
|
224
|
-
patch: unknown;
|
|
225
|
-
delete: unknown;
|
|
226
|
-
};
|
|
227
|
-
'paths/webhooks/webhook-subscription-by-id.yaml': {
|
|
228
|
-
get: unknown;
|
|
229
|
-
patch: unknown;
|
|
230
|
-
delete: unknown;
|
|
231
|
-
};
|
|
232
|
-
'paths/webhooks/webhook-subscriptions.yaml': {
|
|
233
|
-
get: unknown;
|
|
234
|
-
post: unknown;
|
|
235
|
-
};
|
|
236
|
-
'paths/webhooks/webhooks.yaml': {
|
|
237
|
-
get: unknown;
|
|
238
|
-
post: unknown;
|
|
239
|
-
};
|
|
240
|
-
'paths/workspaces/workspace-enable.yaml': {
|
|
241
|
-
post: unknown;
|
|
242
|
-
};
|
|
243
|
-
'paths/workspaces/workspace-phones.yaml': {
|
|
244
|
-
get: unknown;
|
|
245
|
-
};
|
|
246
|
-
};
|
|
247
712
|
|
|
248
713
|
type QueryValue = string | number | boolean | string[];
|
|
249
714
|
type QueryFilterOperators = Record<string, QueryValue>;
|
|
@@ -309,10 +774,22 @@ type WorkspaceEnableResponse = components['schemas']['WorkspaceEnableResponse'];
|
|
|
309
774
|
type VoiceSummary = components['schemas']['VoiceSummary'];
|
|
310
775
|
type VoiceListResponse = components['schemas']['VoiceListResponse'];
|
|
311
776
|
type CatalogItemLinks = components['schemas']['CatalogItemLinks'];
|
|
312
|
-
type
|
|
313
|
-
type
|
|
314
|
-
|
|
315
|
-
|
|
777
|
+
type CatalogItemSummarySchema = components['schemas']['CatalogItemSummary'];
|
|
778
|
+
type CatalogItemSummary = Omit<CatalogItemSummarySchema, 'metadata'> & {
|
|
779
|
+
metadata: Record<string, unknown>;
|
|
780
|
+
};
|
|
781
|
+
type CatalogItemDetailSchema = components['schemas']['CatalogItemDetail'];
|
|
782
|
+
type CatalogItemDetail = Omit<CatalogItemDetailSchema, 'metadata'> & {
|
|
783
|
+
metadata: Record<string, unknown>;
|
|
784
|
+
};
|
|
785
|
+
type CatalogItemListResponseSchema = components['schemas']['CatalogItemListResponse'];
|
|
786
|
+
type CatalogItemListResponse = Omit<CatalogItemListResponseSchema, 'data'> & {
|
|
787
|
+
data: CatalogItemSummary[];
|
|
788
|
+
};
|
|
789
|
+
type CatalogItemCreateRequestSchema = components['schemas']['CatalogItemCreateRequest'];
|
|
790
|
+
type CatalogItemCreateRequest = Omit<CatalogItemCreateRequestSchema, 'metadata'> & {
|
|
791
|
+
metadata: Record<string, unknown>;
|
|
792
|
+
};
|
|
316
793
|
type ApiKeySummary = {
|
|
317
794
|
id: string;
|
|
318
795
|
name: string;
|
|
@@ -405,6 +882,15 @@ type UpdateAgentBlueprintRequest = {
|
|
|
405
882
|
topicsAllowed?: string[];
|
|
406
883
|
topicsForbidden?: string[];
|
|
407
884
|
};
|
|
885
|
+
type BlueprintStage = components['schemas']['BlueprintStage'];
|
|
886
|
+
type BlueprintStageListResponse = components['schemas']['BlueprintStageListResponse'];
|
|
887
|
+
type CreateBlueprintStageRequest = components['schemas']['CreateBlueprintStageRequest'];
|
|
888
|
+
type UpdateBlueprintStageRequest = components['schemas']['UpdateBlueprintStageRequest'];
|
|
889
|
+
type BlueprintStageReorderRequest = components['schemas']['BlueprintStageReorderRequest'];
|
|
890
|
+
type BlueprintStageTrigger = components['schemas']['BlueprintStageTrigger'];
|
|
891
|
+
type BlueprintStageTriggerListResponse = components['schemas']['BlueprintStageTriggerListResponse'];
|
|
892
|
+
type CreateBlueprintStageTriggerRequest = components['schemas']['CreateBlueprintStageTriggerRequest'];
|
|
893
|
+
type UpdateBlueprintStageTriggerRequest = components['schemas']['UpdateBlueprintStageTriggerRequest'];
|
|
408
894
|
type ExecuteToolRequest = components['schemas']['ExecuteToolRequest'];
|
|
409
895
|
type ExecuteToolResponse = components['schemas']['ExecuteToolResponse'];
|
|
410
896
|
type ToolSummary = components['schemas']['ToolSummary'];
|
|
@@ -483,14 +969,6 @@ declare function createAgentPhonesApi(cfg: ClientConfig & {
|
|
|
483
969
|
disconnect(agentId: string, phoneId: string): Promise<void>;
|
|
484
970
|
};
|
|
485
971
|
|
|
486
|
-
declare function createAgentScheduleApi(cfg: ClientConfig & {
|
|
487
|
-
retry?: RetryPolicy;
|
|
488
|
-
}): {
|
|
489
|
-
get(agentId: string): Promise<AgentSchedule>;
|
|
490
|
-
create(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
|
|
491
|
-
update(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
|
|
492
|
-
};
|
|
493
|
-
|
|
494
972
|
type ListAgentScheduleExceptionsOptions = ListQueryOptions;
|
|
495
973
|
declare function createAgentScheduleExceptionsApi(cfg: ClientConfig & {
|
|
496
974
|
retry?: RetryPolicy;
|
|
@@ -502,6 +980,39 @@ declare function createAgentScheduleExceptionsApi(cfg: ClientConfig & {
|
|
|
502
980
|
delete(agentId: string, exceptionId: string): Promise<void>;
|
|
503
981
|
};
|
|
504
982
|
|
|
983
|
+
declare function createAgentScheduleApi(cfg: ClientConfig & {
|
|
984
|
+
retry?: RetryPolicy;
|
|
985
|
+
}): {
|
|
986
|
+
get(agentId: string): Promise<AgentSchedule>;
|
|
987
|
+
create(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
|
|
988
|
+
update(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
|
|
989
|
+
};
|
|
990
|
+
|
|
991
|
+
type ListAgentStageTriggersOptions = ListQueryOptions;
|
|
992
|
+
type AgentStageTriggersApi$1 = {
|
|
993
|
+
list(agentId: string, stageId: string, options?: ListAgentStageTriggersOptions): Promise<PaginatedResult<BlueprintStageTriggerListResponse, ListAgentStageTriggersOptions>>;
|
|
994
|
+
get(agentId: string, stageId: string, triggerId: string): Promise<BlueprintStageTrigger>;
|
|
995
|
+
create(agentId: string, stageId: string, payload: CreateBlueprintStageTriggerRequest): Promise<BlueprintStageTrigger>;
|
|
996
|
+
update(agentId: string, stageId: string, triggerId: string, payload: UpdateBlueprintStageTriggerRequest): Promise<BlueprintStageTrigger>;
|
|
997
|
+
delete(agentId: string, stageId: string, triggerId: string): Promise<void>;
|
|
998
|
+
};
|
|
999
|
+
declare function createAgentStageTriggersApi(cfg: ClientConfig & {
|
|
1000
|
+
retry?: RetryPolicy;
|
|
1001
|
+
}): AgentStageTriggersApi$1;
|
|
1002
|
+
|
|
1003
|
+
type ListAgentStagesOptions = ListQueryOptions;
|
|
1004
|
+
type AgentStagesApi$1 = {
|
|
1005
|
+
list(agentId: string, options?: ListAgentStagesOptions): Promise<PaginatedResult<BlueprintStageListResponse, ListAgentStagesOptions>>;
|
|
1006
|
+
get(agentId: string, stageId: string): Promise<BlueprintStage>;
|
|
1007
|
+
create(agentId: string, payload: CreateBlueprintStageRequest): Promise<BlueprintStage>;
|
|
1008
|
+
update(agentId: string, stageId: string, payload: UpdateBlueprintStageRequest): Promise<BlueprintStage>;
|
|
1009
|
+
delete(agentId: string, stageId: string): Promise<void>;
|
|
1010
|
+
reorder(agentId: string, payload: BlueprintStageReorderRequest): Promise<BlueprintStageListResponse>;
|
|
1011
|
+
};
|
|
1012
|
+
declare function createAgentStagesApi(cfg: ClientConfig & {
|
|
1013
|
+
retry?: RetryPolicy;
|
|
1014
|
+
}): AgentStagesApi$1;
|
|
1015
|
+
|
|
505
1016
|
declare function createAgentTagsApi(cfg: ClientConfig & {
|
|
506
1017
|
retry?: RetryPolicy;
|
|
507
1018
|
}): {
|
|
@@ -533,20 +1044,26 @@ type AgentScheduleApi = ReturnType<typeof createAgentScheduleApi>;
|
|
|
533
1044
|
type AgentScheduleExceptionsApi = ReturnType<typeof createAgentScheduleExceptionsApi>;
|
|
534
1045
|
type AgentVersionsApi = ReturnType<typeof createAgentVersionsApi>;
|
|
535
1046
|
type AgentBlueprintsApi = ReturnType<typeof createAgentBlueprintsApi>;
|
|
1047
|
+
type AgentStagesApi = ReturnType<typeof createAgentStagesApi>;
|
|
1048
|
+
type AgentStageTriggersApi = ReturnType<typeof createAgentStageTriggersApi>;
|
|
536
1049
|
type AgentInstructionsHelper = ReturnType<typeof bindAgentInstructions>;
|
|
537
1050
|
type AgentTagsHelper = ReturnType<typeof bindAgentTags>;
|
|
538
1051
|
type AgentPhonesHelper = ReturnType<typeof bindAgentPhones>;
|
|
539
1052
|
type AgentScheduleHelper = ReturnType<typeof bindAgentSchedule>;
|
|
540
1053
|
type AgentVersionsHelper = ReturnType<typeof bindAgentVersions>;
|
|
541
1054
|
type AgentBlueprintsHelper = ReturnType<typeof bindAgentBlueprints>;
|
|
1055
|
+
type AgentStageTriggersHelper = ReturnType<typeof bindAgentStageTriggers>;
|
|
1056
|
+
type AgentStagesHelper = ReturnType<typeof bindAgentStages>;
|
|
542
1057
|
type AgentBase = AgentSummary & Partial<Omit<AgentDetail, keyof AgentSummary>>;
|
|
543
1058
|
interface AgentEntity extends AgentBase {
|
|
1059
|
+
agentId: string;
|
|
544
1060
|
instructions: AgentInstructionsHelper;
|
|
545
1061
|
tagAssignments: AgentTagsHelper;
|
|
546
1062
|
phones: AgentPhonesHelper;
|
|
547
1063
|
schedule: AgentScheduleHelper;
|
|
548
1064
|
versions: AgentVersionsHelper;
|
|
549
1065
|
blueprints: AgentBlueprintsHelper;
|
|
1066
|
+
stages: AgentStagesHelper;
|
|
550
1067
|
save(patch: UpdateAgentRequest): Promise<AgentEntity>;
|
|
551
1068
|
delete(): Promise<void>;
|
|
552
1069
|
refresh(): Promise<AgentEntity>;
|
|
@@ -559,54 +1076,357 @@ type AgentEntityFactoryOptions = {
|
|
|
559
1076
|
scheduleExceptionsApi: AgentScheduleExceptionsApi;
|
|
560
1077
|
versionsApi: AgentVersionsApi;
|
|
561
1078
|
blueprintsApi: AgentBlueprintsApi;
|
|
1079
|
+
stagesApi: AgentStagesApi;
|
|
1080
|
+
stageTriggersApi: AgentStageTriggersApi;
|
|
562
1081
|
reload(agentId: string): Promise<AgentEntity>;
|
|
563
1082
|
updateAgent(agentId: string, payload: UpdateAgentRequest): Promise<AgentEntity>;
|
|
564
1083
|
deleteAgent(agentId: string): Promise<void>;
|
|
565
1084
|
};
|
|
566
1085
|
declare const bindAgentInstructions: (api: AgentInstructionsApi, agentId: string) => {
|
|
567
|
-
list(opts?: ListAgentInstructionsOptions): Promise<
|
|
568
|
-
|
|
569
|
-
|
|
1086
|
+
list(opts?: ListAgentInstructionsOptions): Promise<PaginatedResult<{
|
|
1087
|
+
data: components["schemas"]["Instruction"][];
|
|
1088
|
+
meta?: components["schemas"]["PaginationMeta"];
|
|
1089
|
+
}, ListAgentInstructionsOptions>>;
|
|
1090
|
+
create(payload: CreateInstructionRequest): Promise<{
|
|
1091
|
+
id: string;
|
|
1092
|
+
versionId: string;
|
|
1093
|
+
order: number;
|
|
1094
|
+
createdAt: string;
|
|
1095
|
+
}>;
|
|
1096
|
+
update(instructionId: string, payload: UpdateInstructionRequest): Promise<{
|
|
1097
|
+
id: string;
|
|
1098
|
+
versionId: string;
|
|
1099
|
+
order: number;
|
|
1100
|
+
content: string;
|
|
1101
|
+
createdAt?: string;
|
|
1102
|
+
updatedAt?: string;
|
|
1103
|
+
}>;
|
|
570
1104
|
delete(instructionId: string): Promise<void>;
|
|
571
1105
|
};
|
|
1106
|
+
declare const bindAgentStageTriggers: (api: AgentStageTriggersApi, agentId: string, stageId: string) => {
|
|
1107
|
+
list(opts?: ListAgentStageTriggersOptions): Promise<PaginatedResult<{
|
|
1108
|
+
data: components["schemas"]["BlueprintStageTrigger"][];
|
|
1109
|
+
meta: components["schemas"]["PaginationMeta"];
|
|
1110
|
+
}, Partial<{
|
|
1111
|
+
page: number;
|
|
1112
|
+
limit: number;
|
|
1113
|
+
sort: string | string[];
|
|
1114
|
+
fields: string | string[];
|
|
1115
|
+
include: string | string[];
|
|
1116
|
+
search: string;
|
|
1117
|
+
filter: QueryFilters | QueryBuilderInput;
|
|
1118
|
+
or: QueryOrGroups | QueryBuilderInput;
|
|
1119
|
+
}>>>;
|
|
1120
|
+
get(triggerId: string): Promise<BlueprintStageTrigger>;
|
|
1121
|
+
create(payload: CreateBlueprintStageTriggerRequest): Promise<{
|
|
1122
|
+
id: string;
|
|
1123
|
+
stageId: string;
|
|
1124
|
+
blueprintId: string;
|
|
1125
|
+
condition: components["schemas"]["BlueprintStageTriggerCondition"];
|
|
1126
|
+
nextStageName: string;
|
|
1127
|
+
createdAt: string;
|
|
1128
|
+
updatedAt: string;
|
|
1129
|
+
}>;
|
|
1130
|
+
update(triggerId: string, payload: UpdateBlueprintStageTriggerRequest): Promise<{
|
|
1131
|
+
id: string;
|
|
1132
|
+
stageId: string;
|
|
1133
|
+
blueprintId: string;
|
|
1134
|
+
condition: components["schemas"]["BlueprintStageTriggerCondition"];
|
|
1135
|
+
nextStageName: string;
|
|
1136
|
+
createdAt: string;
|
|
1137
|
+
updatedAt: string;
|
|
1138
|
+
}>;
|
|
1139
|
+
delete(triggerId: string): Promise<void>;
|
|
1140
|
+
};
|
|
1141
|
+
declare const bindAgentStages: (stagesApi: AgentStagesApi, triggersApi: AgentStageTriggersApi, agentId: string) => {
|
|
1142
|
+
list(opts?: ListAgentStagesOptions): Promise<PaginatedResult<{
|
|
1143
|
+
data: components["schemas"]["BlueprintStage"][];
|
|
1144
|
+
meta: components["schemas"]["PaginationMeta"];
|
|
1145
|
+
}, Partial<{
|
|
1146
|
+
page: number;
|
|
1147
|
+
limit: number;
|
|
1148
|
+
sort: string | string[];
|
|
1149
|
+
fields: string | string[];
|
|
1150
|
+
include: string | string[];
|
|
1151
|
+
search: string;
|
|
1152
|
+
filter: QueryFilters | QueryBuilderInput;
|
|
1153
|
+
or: QueryOrGroups | QueryBuilderInput;
|
|
1154
|
+
}>>>;
|
|
1155
|
+
get(stageId: string): Promise<BlueprintStage>;
|
|
1156
|
+
create(payload: CreateBlueprintStageRequest): Promise<{
|
|
1157
|
+
id: string;
|
|
1158
|
+
agentId: string;
|
|
1159
|
+
blueprintId: string;
|
|
1160
|
+
name: string;
|
|
1161
|
+
title?: string | null;
|
|
1162
|
+
prompt: string;
|
|
1163
|
+
order: number;
|
|
1164
|
+
triggers: components["schemas"]["BlueprintStageTrigger"][];
|
|
1165
|
+
metadata?: {
|
|
1166
|
+
[key: string]: unknown;
|
|
1167
|
+
} | null;
|
|
1168
|
+
createdAt: string;
|
|
1169
|
+
updatedAt: string;
|
|
1170
|
+
}>;
|
|
1171
|
+
update(stageId: string, payload: UpdateBlueprintStageRequest): Promise<{
|
|
1172
|
+
id: string;
|
|
1173
|
+
agentId: string;
|
|
1174
|
+
blueprintId: string;
|
|
1175
|
+
name: string;
|
|
1176
|
+
title?: string | null;
|
|
1177
|
+
prompt: string;
|
|
1178
|
+
order: number;
|
|
1179
|
+
triggers: components["schemas"]["BlueprintStageTrigger"][];
|
|
1180
|
+
metadata?: {
|
|
1181
|
+
[key: string]: unknown;
|
|
1182
|
+
} | null;
|
|
1183
|
+
createdAt: string;
|
|
1184
|
+
updatedAt: string;
|
|
1185
|
+
}>;
|
|
1186
|
+
delete(stageId: string): Promise<void>;
|
|
1187
|
+
reorder(payload: BlueprintStageReorderRequest): Promise<{
|
|
1188
|
+
data: components["schemas"]["BlueprintStage"][];
|
|
1189
|
+
meta: components["schemas"]["PaginationMeta"];
|
|
1190
|
+
}>;
|
|
1191
|
+
triggers(stageId: string): AgentStageTriggersHelper;
|
|
1192
|
+
};
|
|
572
1193
|
declare const bindAgentTags: (api: AgentTagsApi, agentId: string) => {
|
|
573
1194
|
add(tagId: string): Promise<AgentTagsResponse>;
|
|
574
1195
|
remove(tagId: string): Promise<void>;
|
|
575
1196
|
};
|
|
576
1197
|
declare const bindAgentPhones: (api: AgentPhonesApi, agentId: string) => {
|
|
577
|
-
connect(payload: ConnectPhoneRequest): Promise<
|
|
1198
|
+
connect(payload: ConnectPhoneRequest): Promise<{
|
|
1199
|
+
agent_id: string;
|
|
1200
|
+
phone_id: string;
|
|
1201
|
+
allow_all: boolean;
|
|
1202
|
+
test_phones?: string[];
|
|
1203
|
+
channel?: string | null;
|
|
1204
|
+
assigned_at?: string | null;
|
|
1205
|
+
}>;
|
|
578
1206
|
disconnect(phoneId: string): Promise<void>;
|
|
579
1207
|
};
|
|
580
1208
|
declare const bindAgentScheduleExceptions: (api: AgentScheduleExceptionsApi, agentId: string) => {
|
|
581
|
-
list(opts?: ListAgentScheduleExceptionsOptions): Promise<
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
1209
|
+
list(opts?: ListAgentScheduleExceptionsOptions): Promise<PaginatedResult<{
|
|
1210
|
+
data: components["schemas"]["AgentScheduleException"][];
|
|
1211
|
+
meta: components["schemas"]["PaginationMeta"];
|
|
1212
|
+
}, Partial<{
|
|
1213
|
+
page: number;
|
|
1214
|
+
limit: number;
|
|
1215
|
+
sort: string | string[];
|
|
1216
|
+
fields: string | string[];
|
|
1217
|
+
include: string | string[];
|
|
1218
|
+
search: string;
|
|
1219
|
+
filter: QueryFilters | QueryBuilderInput;
|
|
1220
|
+
or: QueryOrGroups | QueryBuilderInput;
|
|
1221
|
+
}>>>;
|
|
1222
|
+
get(exceptionId: string): Promise<{
|
|
1223
|
+
id: string;
|
|
1224
|
+
agentId: string;
|
|
1225
|
+
exceptionDate: string;
|
|
1226
|
+
isClosed: boolean;
|
|
1227
|
+
startTime?: string | null;
|
|
1228
|
+
endTime?: string | null;
|
|
1229
|
+
reason?: string | null;
|
|
1230
|
+
createdAt: string;
|
|
1231
|
+
}>;
|
|
1232
|
+
create(payload: CreateAgentScheduleExceptionRequest): Promise<{
|
|
1233
|
+
id: string;
|
|
1234
|
+
agentId: string;
|
|
1235
|
+
exceptionDate: string;
|
|
1236
|
+
isClosed: boolean;
|
|
1237
|
+
startTime?: string | null;
|
|
1238
|
+
endTime?: string | null;
|
|
1239
|
+
reason?: string | null;
|
|
1240
|
+
createdAt: string;
|
|
1241
|
+
}>;
|
|
1242
|
+
update(exceptionId: string, payload: UpdateAgentScheduleExceptionRequest): Promise<{
|
|
1243
|
+
id: string;
|
|
1244
|
+
agentId: string;
|
|
1245
|
+
exceptionDate: string;
|
|
1246
|
+
isClosed: boolean;
|
|
1247
|
+
startTime?: string | null;
|
|
1248
|
+
endTime?: string | null;
|
|
1249
|
+
reason?: string | null;
|
|
1250
|
+
createdAt: string;
|
|
1251
|
+
}>;
|
|
585
1252
|
delete(exceptionId: string): Promise<void>;
|
|
586
1253
|
};
|
|
587
1254
|
declare const bindAgentSchedule: (scheduleApi: AgentScheduleApi, exceptionsApi: AgentScheduleExceptionsApi, agentId: string) => {
|
|
588
|
-
get(): Promise<
|
|
589
|
-
|
|
590
|
-
|
|
1255
|
+
get(): Promise<{
|
|
1256
|
+
agentId: string;
|
|
1257
|
+
isEnabled: boolean;
|
|
1258
|
+
timezone: string;
|
|
1259
|
+
outOfHoursBehavior: "offline" | "limited-service" | "auto-message";
|
|
1260
|
+
outOfHoursMessage?: string | null;
|
|
1261
|
+
rules: components["schemas"]["AgentScheduleRule"][];
|
|
1262
|
+
metadata?: {
|
|
1263
|
+
[key: string]: unknown;
|
|
1264
|
+
};
|
|
1265
|
+
createdAt: string;
|
|
1266
|
+
updatedAt: string;
|
|
1267
|
+
}>;
|
|
1268
|
+
create(payload: UpdateAgentScheduleRequest): Promise<{
|
|
1269
|
+
agentId: string;
|
|
1270
|
+
isEnabled: boolean;
|
|
1271
|
+
timezone: string;
|
|
1272
|
+
outOfHoursBehavior: "offline" | "limited-service" | "auto-message";
|
|
1273
|
+
outOfHoursMessage?: string | null;
|
|
1274
|
+
rules: components["schemas"]["AgentScheduleRule"][];
|
|
1275
|
+
metadata?: {
|
|
1276
|
+
[key: string]: unknown;
|
|
1277
|
+
};
|
|
1278
|
+
createdAt: string;
|
|
1279
|
+
updatedAt: string;
|
|
1280
|
+
}>;
|
|
1281
|
+
update(payload: UpdateAgentScheduleRequest): Promise<{
|
|
1282
|
+
agentId: string;
|
|
1283
|
+
isEnabled: boolean;
|
|
1284
|
+
timezone: string;
|
|
1285
|
+
outOfHoursBehavior: "offline" | "limited-service" | "auto-message";
|
|
1286
|
+
outOfHoursMessage?: string | null;
|
|
1287
|
+
rules: components["schemas"]["AgentScheduleRule"][];
|
|
1288
|
+
metadata?: {
|
|
1289
|
+
[key: string]: unknown;
|
|
1290
|
+
};
|
|
1291
|
+
createdAt: string;
|
|
1292
|
+
updatedAt: string;
|
|
1293
|
+
}>;
|
|
591
1294
|
exceptions: {
|
|
592
|
-
list(opts?: ListAgentScheduleExceptionsOptions): Promise<
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
1295
|
+
list(opts?: ListAgentScheduleExceptionsOptions): Promise<PaginatedResult<{
|
|
1296
|
+
data: components["schemas"]["AgentScheduleException"][];
|
|
1297
|
+
meta: components["schemas"]["PaginationMeta"];
|
|
1298
|
+
}, Partial<{
|
|
1299
|
+
page: number;
|
|
1300
|
+
limit: number;
|
|
1301
|
+
sort: string | string[];
|
|
1302
|
+
fields: string | string[];
|
|
1303
|
+
include: string | string[];
|
|
1304
|
+
search: string;
|
|
1305
|
+
filter: QueryFilters | QueryBuilderInput;
|
|
1306
|
+
or: QueryOrGroups | QueryBuilderInput;
|
|
1307
|
+
}>>>;
|
|
1308
|
+
get(exceptionId: string): Promise<{
|
|
1309
|
+
id: string;
|
|
1310
|
+
agentId: string;
|
|
1311
|
+
exceptionDate: string;
|
|
1312
|
+
isClosed: boolean;
|
|
1313
|
+
startTime?: string | null;
|
|
1314
|
+
endTime?: string | null;
|
|
1315
|
+
reason?: string | null;
|
|
1316
|
+
createdAt: string;
|
|
1317
|
+
}>;
|
|
1318
|
+
create(payload: CreateAgentScheduleExceptionRequest): Promise<{
|
|
1319
|
+
id: string;
|
|
1320
|
+
agentId: string;
|
|
1321
|
+
exceptionDate: string;
|
|
1322
|
+
isClosed: boolean;
|
|
1323
|
+
startTime?: string | null;
|
|
1324
|
+
endTime?: string | null;
|
|
1325
|
+
reason?: string | null;
|
|
1326
|
+
createdAt: string;
|
|
1327
|
+
}>;
|
|
1328
|
+
update(exceptionId: string, payload: UpdateAgentScheduleExceptionRequest): Promise<{
|
|
1329
|
+
id: string;
|
|
1330
|
+
agentId: string;
|
|
1331
|
+
exceptionDate: string;
|
|
1332
|
+
isClosed: boolean;
|
|
1333
|
+
startTime?: string | null;
|
|
1334
|
+
endTime?: string | null;
|
|
1335
|
+
reason?: string | null;
|
|
1336
|
+
createdAt: string;
|
|
1337
|
+
}>;
|
|
596
1338
|
delete(exceptionId: string): Promise<void>;
|
|
597
1339
|
};
|
|
598
1340
|
};
|
|
599
1341
|
declare const bindAgentVersions: (api: AgentVersionsApi, agentId: string) => {
|
|
600
|
-
list(opts?: ListAgentVersionsOptions): Promise<
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
1342
|
+
list(opts?: ListAgentVersionsOptions): Promise<PaginatedResult<{
|
|
1343
|
+
data: components["schemas"]["AgentVersionSummary"][];
|
|
1344
|
+
meta: components["schemas"]["PaginationMeta"];
|
|
1345
|
+
}, ListAgentVersionsOptions>>;
|
|
1346
|
+
get(versionId: string): Promise<{
|
|
1347
|
+
id: string;
|
|
1348
|
+
agentId: string;
|
|
1349
|
+
status: "draft" | "active" | "archived";
|
|
1350
|
+
versionNumber: number;
|
|
1351
|
+
notes?: string | null;
|
|
1352
|
+
createdAt: string;
|
|
1353
|
+
updatedAt: string;
|
|
1354
|
+
publishedAt?: string | null;
|
|
1355
|
+
} & {
|
|
1356
|
+
versionHash: string;
|
|
1357
|
+
createdBy: string;
|
|
1358
|
+
}>;
|
|
1359
|
+
create(payload?: CreateAgentVersionRequest): Promise<{
|
|
1360
|
+
id: string;
|
|
1361
|
+
agentId: string;
|
|
1362
|
+
status: "draft" | "active" | "archived";
|
|
1363
|
+
versionNumber: number;
|
|
1364
|
+
notes?: string | null;
|
|
1365
|
+
createdAt: string;
|
|
1366
|
+
updatedAt: string;
|
|
1367
|
+
publishedAt?: string | null;
|
|
1368
|
+
} & {
|
|
1369
|
+
versionHash: string;
|
|
1370
|
+
createdBy: string;
|
|
1371
|
+
}>;
|
|
1372
|
+
clone(versionId: string): Promise<{
|
|
1373
|
+
id: string;
|
|
1374
|
+
agentId: string;
|
|
1375
|
+
status: "draft" | "active" | "archived";
|
|
1376
|
+
versionNumber: number;
|
|
1377
|
+
notes?: string | null;
|
|
1378
|
+
createdAt: string;
|
|
1379
|
+
updatedAt: string;
|
|
1380
|
+
publishedAt?: string | null;
|
|
1381
|
+
} & {
|
|
1382
|
+
versionHash: string;
|
|
1383
|
+
createdBy: string;
|
|
1384
|
+
}>;
|
|
1385
|
+
publish(versionId: string, payload?: PublishAgentVersionRequest): Promise<{
|
|
1386
|
+
id: string;
|
|
1387
|
+
agentId: string;
|
|
1388
|
+
status: "draft" | "active" | "archived";
|
|
1389
|
+
versionNumber: number;
|
|
1390
|
+
notes?: string | null;
|
|
1391
|
+
createdAt: string;
|
|
1392
|
+
updatedAt: string;
|
|
1393
|
+
publishedAt?: string | null;
|
|
1394
|
+
} & {
|
|
1395
|
+
versionHash: string;
|
|
1396
|
+
createdBy: string;
|
|
1397
|
+
}>;
|
|
1398
|
+
updateNotes(versionId: string, payload: UpdateAgentVersionNotesRequest): Promise<{
|
|
1399
|
+
id: string;
|
|
1400
|
+
agentId: string;
|
|
1401
|
+
status: "draft" | "active" | "archived";
|
|
1402
|
+
versionNumber: number;
|
|
1403
|
+
notes?: string | null;
|
|
1404
|
+
createdAt: string;
|
|
1405
|
+
updatedAt: string;
|
|
1406
|
+
publishedAt?: string | null;
|
|
1407
|
+
} & {
|
|
1408
|
+
versionHash: string;
|
|
1409
|
+
createdBy: string;
|
|
1410
|
+
}>;
|
|
606
1411
|
instructions(versionId: string): {
|
|
607
|
-
readonly list: (opts?: ListAgentVersionInstructionsOptions) => Promise<
|
|
608
|
-
|
|
609
|
-
|
|
1412
|
+
readonly list: (opts?: ListAgentVersionInstructionsOptions) => Promise<{
|
|
1413
|
+
data: components["schemas"]["Instruction"][];
|
|
1414
|
+
meta?: components["schemas"]["PaginationMeta"];
|
|
1415
|
+
}>;
|
|
1416
|
+
readonly create: (payload: CreateInstructionRequest) => Promise<{
|
|
1417
|
+
id: string;
|
|
1418
|
+
versionId: string;
|
|
1419
|
+
order: number;
|
|
1420
|
+
createdAt: string;
|
|
1421
|
+
}>;
|
|
1422
|
+
readonly update: (instructionId: string, payload: UpdateInstructionRequest) => Promise<{
|
|
1423
|
+
id: string;
|
|
1424
|
+
versionId: string;
|
|
1425
|
+
order: number;
|
|
1426
|
+
content: string;
|
|
1427
|
+
createdAt?: string;
|
|
1428
|
+
updatedAt?: string;
|
|
1429
|
+
}>;
|
|
610
1430
|
readonly delete: (instructionId: string) => Promise<void>;
|
|
611
1431
|
};
|
|
612
1432
|
};
|
|
@@ -629,6 +1449,8 @@ type AgentEntityDependencies = {
|
|
|
629
1449
|
scheduleExceptionsApi: ReturnType<typeof createAgentScheduleExceptionsApi>;
|
|
630
1450
|
versionsApi: ReturnType<typeof createAgentVersionsApi>;
|
|
631
1451
|
blueprintsApi: ReturnType<typeof createAgentBlueprintsApi>;
|
|
1452
|
+
stagesApi: ReturnType<typeof createAgentStagesApi>;
|
|
1453
|
+
stageTriggersApi: ReturnType<typeof createAgentStageTriggersApi>;
|
|
632
1454
|
};
|
|
633
1455
|
type ListAgentsOptions = Pick<ListQueryOptions, 'page' | 'limit' | 'filter'>;
|
|
634
1456
|
type AgentsApi = {
|
|
@@ -813,6 +1635,9 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
813
1635
|
deleteInstruction(agentId: string, versionId: string, instructionId: string): Promise<void>;
|
|
814
1636
|
} & ((agentId: string) => ReturnType<typeof bindAgentVersions>);
|
|
815
1637
|
blueprints: AgentBlueprintsApi$1 & ((agentId: string) => ReturnType<typeof bindAgentBlueprints>);
|
|
1638
|
+
stages: AgentStagesApi$1 & ((agentId: string) => ReturnType<typeof bindAgentStages>) & {
|
|
1639
|
+
triggers: AgentStageTriggersApi$1 & ((agentId: string, stageId: string) => ReturnType<typeof bindAgentStageTriggers>);
|
|
1640
|
+
};
|
|
816
1641
|
delete: (agent: string | AgentEntity) => Promise<void>;
|
|
817
1642
|
list(options?: ListAgentsOptions): Promise<PaginatedResult<{
|
|
818
1643
|
data: AgentEntity[];
|
|
@@ -829,7 +1654,14 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
829
1654
|
tools: {
|
|
830
1655
|
list(options?: ListToolsOptions): Promise<PaginatedResult<ToolListResponse, ListToolsOptions>>;
|
|
831
1656
|
listResources(toolId: string, options?: ListToolResourcesOptions): Promise<PaginatedResult<ToolResourceListResponse, ListToolResourcesOptions>>;
|
|
832
|
-
uploadResource(toolId: string, payload: FormData | (Omit<
|
|
1657
|
+
uploadResource(toolId: string, payload: FormData | (Omit<{
|
|
1658
|
+
file: string;
|
|
1659
|
+
type?: "document" | "media" | "file";
|
|
1660
|
+
title?: string;
|
|
1661
|
+
metadata?: {
|
|
1662
|
+
[key: string]: unknown;
|
|
1663
|
+
};
|
|
1664
|
+
}, "file"> & {
|
|
833
1665
|
file: unknown;
|
|
834
1666
|
})): Promise<ToolResourceUploadResponse>;
|
|
835
1667
|
deleteResource(toolId: string, resourceId: string): Promise<void>;
|
|
@@ -906,6 +1738,9 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
906
1738
|
deleteInstruction(agentId: string, versionId: string, instructionId: string): Promise<void>;
|
|
907
1739
|
} & ((agentId: string) => ReturnType<typeof bindAgentVersions>);
|
|
908
1740
|
blueprints: AgentBlueprintsApi$1 & ((agentId: string) => ReturnType<typeof bindAgentBlueprints>);
|
|
1741
|
+
stages: AgentStagesApi$1 & ((agentId: string) => ReturnType<typeof bindAgentStages>) & {
|
|
1742
|
+
triggers: AgentStageTriggersApi$1 & ((agentId: string, stageId: string) => ReturnType<typeof bindAgentStageTriggers>);
|
|
1743
|
+
};
|
|
909
1744
|
delete: (agent: string | AgentEntity) => Promise<void>;
|
|
910
1745
|
list(options?: ListAgentsOptions): Promise<PaginatedResult<{
|
|
911
1746
|
data: AgentEntity[];
|
|
@@ -922,7 +1757,14 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
922
1757
|
tools: {
|
|
923
1758
|
list(options?: ListToolsOptions): Promise<PaginatedResult<ToolListResponse, ListToolsOptions>>;
|
|
924
1759
|
listResources(toolId: string, options?: ListToolResourcesOptions): Promise<PaginatedResult<ToolResourceListResponse, ListToolResourcesOptions>>;
|
|
925
|
-
uploadResource(toolId: string, payload: FormData | (Omit<
|
|
1760
|
+
uploadResource(toolId: string, payload: FormData | (Omit<{
|
|
1761
|
+
file: string;
|
|
1762
|
+
type?: "document" | "media" | "file";
|
|
1763
|
+
title?: string;
|
|
1764
|
+
metadata?: {
|
|
1765
|
+
[key: string]: unknown;
|
|
1766
|
+
};
|
|
1767
|
+
}, "file"> & {
|
|
926
1768
|
file: unknown;
|
|
927
1769
|
})): Promise<ToolResourceUploadResponse>;
|
|
928
1770
|
deleteResource(toolId: string, resourceId: string): Promise<void>;
|
|
@@ -981,4 +1823,4 @@ declare function createHttp(cfg: ClientConfig & {
|
|
|
981
1823
|
resolveAccessToken: () => string;
|
|
982
1824
|
};
|
|
983
1825
|
|
|
984
|
-
export { type AgentBlueprint, type AgentBlueprintListItem, type AgentBlueprintListResponse, type AgentBlueprintsApi$1 as AgentBlueprintsApi, type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentListResponse, type AgentSchedule, type AgentScheduleException, type AgentScheduleExceptionListResponse, type AgentSummary, type AgentTagRequest, type AgentTagsResponse, type AgentVersionDetail, type AgentVersionListResponse, type AgentVersionSummary, type AgentsApi, type AgentsApiWithEntities, type ApiKeyListResponse, type ApiKeySummary, type ApiKeysApi, type CatalogItemCreateRequest, type CatalogItemDetail, type CatalogItemLinks, type CatalogItemListResponse, type CatalogItemSummary, type ClientConfig, type ConnectPhoneRequest, type CreateAgentBlueprintRequest, type CreateAgentRequest, type CreateAgentScheduleExceptionRequest, type CreateAgentVersionRequest, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateEventSubscriptionRequest, type CreateInstructionRequest, type CreateWebhookRequest, type ErrorResponse, type EventSubscriptionDetail, type EventSubscriptionListResponse, type EventSubscriptionSummary, type ExecuteToolRequest, type ExecuteToolResponse, HttpError, type Instruction, type InstructionCreatedResponse, type InstructionListResponse, type ListAgentBlueprintsOptions, type ListAgentInstructionsOptions, type ListAgentScheduleExceptionsOptions, type ListAgentVersionInstructionsOptions, type ListAgentVersionsOptions, type ListAgentsOptions, type ListCatalogItemsOptions, type ListQueryOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListVoicesOptions, type ListWebhooksOptions, type ListWorkspacePhonesOptions, NetworkError, type PaginatedResult, type PaginationMeta, type PhoneAssignmentResponse, type PublishAgentVersionRequest, type QueryBuilderInput, type QueryBuilderSerializable, type QueryFilterOperators, type QueryFilters, type QueryOrGroups, type QueryValue, type RetryPolicy, TimeoutError, type ToolConnectionAuth, type ToolConnectionRequest, type ToolConnectionResponse, type ToolListResponse, type ToolResourceListResponse, type ToolResourceReloadResponse, type ToolResourceSummary, type ToolResourceUploadRequest, type ToolResourceUploadResponse, type ToolSummary, type UpdateAgentBlueprintRequest, type UpdateAgentRequest, type UpdateAgentScheduleExceptionRequest, type UpdateAgentScheduleRequest, type UpdateAgentVersionNotesRequest, type UpdateEventSubscriptionRequest, type UpdateInstructionRequest, type UpdateWebhookRequest, type VoiceListResponse, type VoiceSummary, type WebhookDetail, type WebhookListResponse, type WebhookSummary, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, bindAgentBlueprints, bindAgentInstructions, bindAgentPhones, bindAgentSchedule, bindAgentScheduleExceptions, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentInstructionsApi, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createCatalogsApi, createClient, createHttp, createToolsApi, createVoicesApi, createWebhooksApi, createWorkspacesApi };
|
|
1826
|
+
export { type AgentBlueprint, type AgentBlueprintListItem, type AgentBlueprintListResponse, type AgentBlueprintsApi$1 as AgentBlueprintsApi, type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentListResponse, type AgentSchedule, type AgentScheduleException, type AgentScheduleExceptionListResponse, type AgentStageTriggersApi$1 as AgentStageTriggersApi, type AgentStagesApi$1 as AgentStagesApi, type AgentSummary, type AgentTagRequest, type AgentTagsResponse, type AgentVersionDetail, type AgentVersionListResponse, type AgentVersionSummary, type AgentsApi, type AgentsApiWithEntities, type ApiKeyListResponse, type ApiKeySummary, type ApiKeysApi, type BlueprintStage, type BlueprintStageListResponse, type BlueprintStageReorderRequest, type BlueprintStageTrigger, type BlueprintStageTriggerListResponse, type CatalogItemCreateRequest, type CatalogItemDetail, type CatalogItemLinks, type CatalogItemListResponse, type CatalogItemSummary, type ClientConfig, type ConnectPhoneRequest, type CreateAgentBlueprintRequest, type CreateAgentRequest, type CreateAgentScheduleExceptionRequest, type CreateAgentVersionRequest, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateBlueprintStageRequest, type CreateBlueprintStageTriggerRequest, type CreateEventSubscriptionRequest, type CreateInstructionRequest, type CreateWebhookRequest, type ErrorResponse, type EventSubscriptionDetail, type EventSubscriptionListResponse, type EventSubscriptionSummary, type ExecuteToolRequest, type ExecuteToolResponse, HttpError, type Instruction, type InstructionCreatedResponse, type InstructionListResponse, type ListAgentBlueprintsOptions, type ListAgentInstructionsOptions, type ListAgentScheduleExceptionsOptions, type ListAgentStageTriggersOptions, type ListAgentStagesOptions, type ListAgentVersionInstructionsOptions, type ListAgentVersionsOptions, type ListAgentsOptions, type ListCatalogItemsOptions, type ListQueryOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListVoicesOptions, type ListWebhooksOptions, type ListWorkspacePhonesOptions, NetworkError, type PaginatedResult, type PaginationMeta, type PhoneAssignmentResponse, type PublishAgentVersionRequest, type QueryBuilderInput, type QueryBuilderSerializable, type QueryFilterOperators, type QueryFilters, type QueryOrGroups, type QueryValue, type RetryPolicy, TimeoutError, type ToolConnectionAuth, type ToolConnectionRequest, type ToolConnectionResponse, type ToolListResponse, type ToolResourceListResponse, type ToolResourceReloadResponse, type ToolResourceSummary, type ToolResourceUploadRequest, type ToolResourceUploadResponse, type ToolSummary, type UpdateAgentBlueprintRequest, type UpdateAgentRequest, type UpdateAgentScheduleExceptionRequest, type UpdateAgentScheduleRequest, type UpdateAgentVersionNotesRequest, type UpdateBlueprintStageRequest, type UpdateBlueprintStageTriggerRequest, type UpdateEventSubscriptionRequest, type UpdateInstructionRequest, type UpdateWebhookRequest, type VoiceListResponse, type VoiceSummary, type WebhookDetail, type WebhookListResponse, type WebhookSummary, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, bindAgentBlueprints, bindAgentInstructions, bindAgentPhones, bindAgentSchedule, bindAgentScheduleExceptions, bindAgentStageTriggers, bindAgentStages, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentInstructionsApi, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentStageTriggersApi, createAgentStagesApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createCatalogsApi, createClient, createHttp, createToolsApi, createVoicesApi, createWebhooksApi, createWorkspacesApi };
|