@avallon-labs/mcp 0.0.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.js ADDED
@@ -0,0 +1,3839 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/generated/server.ts
4
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
5
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
6
+
7
+ // src/generated/http-client.ts
8
+ var getListAgentsUrl = (params) => {
9
+ const normalizedParams = new URLSearchParams();
10
+ Object.entries(params || {}).forEach(([key, value]) => {
11
+ if (value !== void 0) {
12
+ normalizedParams.append(key, value === null ? "null" : value.toString());
13
+ }
14
+ });
15
+ const stringifiedParams = normalizedParams.toString();
16
+ return stringifiedParams.length > 0 ? `/v1/agents?${stringifiedParams}` : `/v1/agents`;
17
+ };
18
+ var listAgents = async (params, options) => {
19
+ return customFetch(getListAgentsUrl(params), {
20
+ ...options,
21
+ method: "GET"
22
+ });
23
+ };
24
+ var getCreateAgentUrl = () => {
25
+ return `/v1/agents`;
26
+ };
27
+ var createAgent = async (createAgentBody, options) => {
28
+ return customFetch(getCreateAgentUrl(), {
29
+ ...options,
30
+ method: "POST",
31
+ headers: { "Content-Type": "application/json", ...options?.headers },
32
+ body: JSON.stringify(createAgentBody)
33
+ });
34
+ };
35
+ var getGetAgentUrl = (id) => {
36
+ return `/v1/agents/${id}`;
37
+ };
38
+ var getAgent = async (id, options) => {
39
+ return customFetch(getGetAgentUrl(id), {
40
+ ...options,
41
+ method: "GET"
42
+ });
43
+ };
44
+ var getAddToolsToAgentUrl = (id) => {
45
+ return `/v1/agents/${id}/tools`;
46
+ };
47
+ var addToolsToAgent = async (id, addToolsToAgentBody, options) => {
48
+ return customFetch(getAddToolsToAgentUrl(id), {
49
+ ...options,
50
+ method: "POST",
51
+ headers: { "Content-Type": "application/json", ...options?.headers },
52
+ body: JSON.stringify(addToolsToAgentBody)
53
+ });
54
+ };
55
+ var getDeleteToolsFromAgentUrl = (id) => {
56
+ return `/v1/agents/${id}/tools`;
57
+ };
58
+ var deleteToolsFromAgent = async (id, deleteToolsFromAgentBody, options) => {
59
+ return customFetch(
60
+ getDeleteToolsFromAgentUrl(id),
61
+ {
62
+ ...options,
63
+ method: "DELETE",
64
+ headers: { "Content-Type": "application/json", ...options?.headers },
65
+ body: JSON.stringify(deleteToolsFromAgentBody)
66
+ }
67
+ );
68
+ };
69
+ var getGetAgentPromptUrl = (id) => {
70
+ return `/v1/agents/${id}/prompt`;
71
+ };
72
+ var getAgentPrompt = async (id, options) => {
73
+ return customFetch(getGetAgentPromptUrl(id), {
74
+ ...options,
75
+ method: "GET"
76
+ });
77
+ };
78
+ var getUpdateAgentModelsUrl = (id) => {
79
+ return `/v1/agents/${id}/models`;
80
+ };
81
+ var updateAgentModels = async (id, updateAgentModelsBody, options) => {
82
+ return customFetch(getUpdateAgentModelsUrl(id), {
83
+ ...options,
84
+ method: "PATCH",
85
+ headers: { "Content-Type": "application/json", ...options?.headers },
86
+ body: JSON.stringify(updateAgentModelsBody)
87
+ });
88
+ };
89
+ var getUpdateCallControlsUrl = (id) => {
90
+ return `/v1/agents/${id}/call-controls`;
91
+ };
92
+ var updateCallControls = async (id, updateCallControlsBody, options) => {
93
+ return customFetch(getUpdateCallControlsUrl(id), {
94
+ ...options,
95
+ method: "PUT",
96
+ headers: { "Content-Type": "application/json", ...options?.headers },
97
+ body: JSON.stringify(updateCallControlsBody)
98
+ });
99
+ };
100
+ var getScheduleJobUrl = (id) => {
101
+ return `/v1/agents/${id}/jobs`;
102
+ };
103
+ var scheduleJob = async (id, scheduleJobBody, options) => {
104
+ return customFetch(getScheduleJobUrl(id), {
105
+ ...options,
106
+ method: "POST",
107
+ headers: { "Content-Type": "application/json", ...options?.headers },
108
+ body: JSON.stringify(scheduleJobBody)
109
+ });
110
+ };
111
+ var getListJobsUrl = (params) => {
112
+ const normalizedParams = new URLSearchParams();
113
+ Object.entries(params || {}).forEach(([key, value]) => {
114
+ if (value !== void 0) {
115
+ normalizedParams.append(key, value === null ? "null" : value.toString());
116
+ }
117
+ });
118
+ const stringifiedParams = normalizedParams.toString();
119
+ return stringifiedParams.length > 0 ? `/v1/agents/jobs?${stringifiedParams}` : `/v1/agents/jobs`;
120
+ };
121
+ var listJobs = async (params, options) => {
122
+ return customFetch(getListJobsUrl(params), {
123
+ ...options,
124
+ method: "GET"
125
+ });
126
+ };
127
+ var getCancelJobUrl = (id) => {
128
+ return `/v1/agents/jobs/${id}/cancel`;
129
+ };
130
+ var cancelJob = async (id, options) => {
131
+ return customFetch(getCancelJobUrl(id), {
132
+ ...options,
133
+ method: "POST"
134
+ });
135
+ };
136
+ var getListApiKeysUrl = (params) => {
137
+ const normalizedParams = new URLSearchParams();
138
+ Object.entries(params || {}).forEach(([key, value]) => {
139
+ if (value !== void 0) {
140
+ normalizedParams.append(key, value === null ? "null" : value.toString());
141
+ }
142
+ });
143
+ const stringifiedParams = normalizedParams.toString();
144
+ return stringifiedParams.length > 0 ? `/platform/api-keys?${stringifiedParams}` : `/platform/api-keys`;
145
+ };
146
+ var listApiKeys = async (params, options) => {
147
+ return customFetch(getListApiKeysUrl(params), {
148
+ ...options,
149
+ method: "GET"
150
+ });
151
+ };
152
+ var getCreateApiKeyUrl = () => {
153
+ return `/platform/api-keys`;
154
+ };
155
+ var createApiKey = async (createApiKeyBody, options) => {
156
+ return customFetch(getCreateApiKeyUrl(), {
157
+ ...options,
158
+ method: "POST",
159
+ headers: { "Content-Type": "application/json", ...options?.headers },
160
+ body: JSON.stringify(createApiKeyBody)
161
+ });
162
+ };
163
+ var getRevokeApiKeyUrl = (id) => {
164
+ return `/platform/api-keys/${id}/revoke`;
165
+ };
166
+ var revokeApiKey = async (id, options) => {
167
+ return customFetch(getRevokeApiKeyUrl(id), {
168
+ ...options,
169
+ method: "POST"
170
+ });
171
+ };
172
+ var getCreateArtifactUrl = () => {
173
+ return `/v1/artifacts`;
174
+ };
175
+ var createArtifact = async (createArtifactBody, options) => {
176
+ return customFetch(getCreateArtifactUrl(), {
177
+ ...options,
178
+ method: "POST",
179
+ headers: { "Content-Type": "application/json", ...options?.headers },
180
+ body: JSON.stringify(createArtifactBody)
181
+ });
182
+ };
183
+ var getListArtifactsUrl = (params) => {
184
+ const normalizedParams = new URLSearchParams();
185
+ Object.entries(params || {}).forEach(([key, value]) => {
186
+ if (value !== void 0) {
187
+ normalizedParams.append(key, value === null ? "null" : value.toString());
188
+ }
189
+ });
190
+ const stringifiedParams = normalizedParams.toString();
191
+ return stringifiedParams.length > 0 ? `/v1/artifacts?${stringifiedParams}` : `/v1/artifacts`;
192
+ };
193
+ var listArtifacts = async (params, options) => {
194
+ return customFetch(getListArtifactsUrl(params), {
195
+ ...options,
196
+ method: "GET"
197
+ });
198
+ };
199
+ var getGetArtifactUrl = (id) => {
200
+ return `/v1/artifacts/${id}`;
201
+ };
202
+ var getArtifact = async (id, options) => {
203
+ return customFetch(getGetArtifactUrl(id), {
204
+ ...options,
205
+ method: "GET"
206
+ });
207
+ };
208
+ var getGetArtifactMetadataKeysUrl = (params) => {
209
+ const normalizedParams = new URLSearchParams();
210
+ Object.entries(params || {}).forEach(([key, value]) => {
211
+ if (value !== void 0) {
212
+ normalizedParams.append(key, value === null ? "null" : value.toString());
213
+ }
214
+ });
215
+ const stringifiedParams = normalizedParams.toString();
216
+ return stringifiedParams.length > 0 ? `/v1/artifacts/metadata/keys?${stringifiedParams}` : `/v1/artifacts/metadata/keys`;
217
+ };
218
+ var getArtifactMetadataKeys = async (params, options) => {
219
+ return customFetch(
220
+ getGetArtifactMetadataKeysUrl(params),
221
+ {
222
+ ...options,
223
+ method: "GET"
224
+ }
225
+ );
226
+ };
227
+ var getSignUpUrl = () => {
228
+ return `/v1/auth/sign-up`;
229
+ };
230
+ var signUp = async (signUpBody, options) => {
231
+ return customFetch(getSignUpUrl(), {
232
+ ...options,
233
+ method: "POST",
234
+ headers: { "Content-Type": "application/json", ...options?.headers },
235
+ body: JSON.stringify(signUpBody)
236
+ });
237
+ };
238
+ var getSignInUrl = () => {
239
+ return `/v1/auth/sign-in`;
240
+ };
241
+ var signIn = async (signInBody, options) => {
242
+ return customFetch(getSignInUrl(), {
243
+ ...options,
244
+ method: "POST",
245
+ headers: { "Content-Type": "application/json", ...options?.headers },
246
+ body: JSON.stringify(signInBody)
247
+ });
248
+ };
249
+ var getRefreshTokenUrl = () => {
250
+ return `/v1/auth/refresh-token`;
251
+ };
252
+ var refreshToken = async (refreshTokenBody, options) => {
253
+ return customFetch(getRefreshTokenUrl(), {
254
+ ...options,
255
+ method: "POST",
256
+ headers: { "Content-Type": "application/json", ...options?.headers },
257
+ body: JSON.stringify(refreshTokenBody)
258
+ });
259
+ };
260
+ var getGetOAuthUrlUrl = (params) => {
261
+ const normalizedParams = new URLSearchParams();
262
+ Object.entries(params || {}).forEach(([key, value]) => {
263
+ if (value !== void 0) {
264
+ normalizedParams.append(key, value === null ? "null" : value.toString());
265
+ }
266
+ });
267
+ const stringifiedParams = normalizedParams.toString();
268
+ return stringifiedParams.length > 0 ? `/v1/auth/oauth-url?${stringifiedParams}` : `/v1/auth/oauth-url`;
269
+ };
270
+ var getOAuthUrl = async (params, options) => {
271
+ return customFetch(getGetOAuthUrlUrl(params), {
272
+ ...options,
273
+ method: "GET"
274
+ });
275
+ };
276
+ var getListCallsUrl = (params) => {
277
+ const normalizedParams = new URLSearchParams();
278
+ Object.entries(params || {}).forEach(([key, value]) => {
279
+ if (value !== void 0) {
280
+ normalizedParams.append(key, value === null ? "null" : value.toString());
281
+ }
282
+ });
283
+ const stringifiedParams = normalizedParams.toString();
284
+ return stringifiedParams.length > 0 ? `/v1/calls?${stringifiedParams}` : `/v1/calls`;
285
+ };
286
+ var listCalls = async (params, options) => {
287
+ return customFetch(getListCallsUrl(params), {
288
+ ...options,
289
+ method: "GET"
290
+ });
291
+ };
292
+ var getGetCallUrl = (id, params) => {
293
+ const normalizedParams = new URLSearchParams();
294
+ Object.entries(params || {}).forEach(([key, value]) => {
295
+ if (value !== void 0) {
296
+ normalizedParams.append(key, value === null ? "null" : value.toString());
297
+ }
298
+ });
299
+ const stringifiedParams = normalizedParams.toString();
300
+ return stringifiedParams.length > 0 ? `/v1/calls/${id}?${stringifiedParams}` : `/v1/calls/${id}`;
301
+ };
302
+ var getCall = async (id, params, options) => {
303
+ return customFetch(getGetCallUrl(id, params), {
304
+ ...options,
305
+ method: "GET"
306
+ });
307
+ };
308
+ var getGetCallEvaluationUrl = (id) => {
309
+ return `/v1/calls/${id}/evaluation`;
310
+ };
311
+ var getCallEvaluation = async (id, options) => {
312
+ return customFetch(getGetCallEvaluationUrl(id), {
313
+ ...options,
314
+ method: "GET"
315
+ });
316
+ };
317
+ var getGetCallAnalyticsUrl = (params) => {
318
+ const normalizedParams = new URLSearchParams();
319
+ Object.entries(params || {}).forEach(([key, value]) => {
320
+ if (value !== void 0) {
321
+ normalizedParams.append(key, value === null ? "null" : value.toString());
322
+ }
323
+ });
324
+ const stringifiedParams = normalizedParams.toString();
325
+ return stringifiedParams.length > 0 ? `/v1/calls/analytics?${stringifiedParams}` : `/v1/calls/analytics`;
326
+ };
327
+ var getCallAnalytics = async (params, options) => {
328
+ return customFetch(getGetCallAnalyticsUrl(params), {
329
+ ...options,
330
+ method: "GET"
331
+ });
332
+ };
333
+ var getCreateCallFeedbackUrl = (id) => {
334
+ return `/v1/calls/${id}/feedback`;
335
+ };
336
+ var createCallFeedback = async (id, createFeedbackRequest, options) => {
337
+ return customFetch(getCreateCallFeedbackUrl(id), {
338
+ ...options,
339
+ method: "POST",
340
+ headers: { "Content-Type": "application/json", ...options?.headers },
341
+ body: JSON.stringify(createFeedbackRequest)
342
+ });
343
+ };
344
+ var getListCallFeedbackUrl = (id, params) => {
345
+ const normalizedParams = new URLSearchParams();
346
+ Object.entries(params || {}).forEach(([key, value]) => {
347
+ if (value !== void 0) {
348
+ normalizedParams.append(key, value === null ? "null" : value.toString());
349
+ }
350
+ });
351
+ const stringifiedParams = normalizedParams.toString();
352
+ return stringifiedParams.length > 0 ? `/v1/calls/${id}/feedback?${stringifiedParams}` : `/v1/calls/${id}/feedback`;
353
+ };
354
+ var listCallFeedback = async (id, params, options) => {
355
+ return customFetch(
356
+ getListCallFeedbackUrl(id, params),
357
+ {
358
+ ...options,
359
+ method: "GET"
360
+ }
361
+ );
362
+ };
363
+ var getDeleteCallFeedbackUrl = (id, feedbackId) => {
364
+ return `/v1/calls/${id}/feedback/${feedbackId}`;
365
+ };
366
+ var deleteCallFeedback = async (id, feedbackId, options) => {
367
+ return customFetch(
368
+ getDeleteCallFeedbackUrl(id, feedbackId),
369
+ {
370
+ ...options,
371
+ method: "DELETE"
372
+ }
373
+ );
374
+ };
375
+ var getCreateClaimUrl = () => {
376
+ return `/v1/claims`;
377
+ };
378
+ var createClaim = async (options) => {
379
+ return customFetch(getCreateClaimUrl(), {
380
+ ...options,
381
+ method: "POST"
382
+ });
383
+ };
384
+ var getListClaimsUrl = (params) => {
385
+ const normalizedParams = new URLSearchParams();
386
+ Object.entries(params || {}).forEach(([key, value]) => {
387
+ if (value !== void 0) {
388
+ normalizedParams.append(key, value === null ? "null" : value.toString());
389
+ }
390
+ });
391
+ const stringifiedParams = normalizedParams.toString();
392
+ return stringifiedParams.length > 0 ? `/v1/claims?${stringifiedParams}` : `/v1/claims`;
393
+ };
394
+ var listClaims = async (params, options) => {
395
+ return customFetch(getListClaimsUrl(params), {
396
+ ...options,
397
+ method: "GET"
398
+ });
399
+ };
400
+ var getGetClaimDetailUrl = (id) => {
401
+ return `/v1/claims/${id}`;
402
+ };
403
+ var getClaimDetail = async (id, options) => {
404
+ return customFetch(getGetClaimDetailUrl(id), {
405
+ ...options,
406
+ method: "GET"
407
+ });
408
+ };
409
+ var getCheckEmailUsernameAvailabilityUrl = (params) => {
410
+ const normalizedParams = new URLSearchParams();
411
+ Object.entries(params || {}).forEach(([key, value]) => {
412
+ if (value !== void 0) {
413
+ normalizedParams.append(key, value === null ? "null" : value.toString());
414
+ }
415
+ });
416
+ const stringifiedParams = normalizedParams.toString();
417
+ return stringifiedParams.length > 0 ? `/v1/email-agents/availability?${stringifiedParams}` : `/v1/email-agents/availability`;
418
+ };
419
+ var checkEmailUsernameAvailability = async (params, options) => {
420
+ return customFetch(
421
+ getCheckEmailUsernameAvailabilityUrl(params),
422
+ {
423
+ ...options,
424
+ method: "GET"
425
+ }
426
+ );
427
+ };
428
+ var getCreateEmailAgentUrl = () => {
429
+ return `/v1/email-agents`;
430
+ };
431
+ var createEmailAgent = async (createEmailAgentBody, options) => {
432
+ return customFetch(getCreateEmailAgentUrl(), {
433
+ ...options,
434
+ method: "POST",
435
+ headers: { "Content-Type": "application/json", ...options?.headers },
436
+ body: JSON.stringify(createEmailAgentBody)
437
+ });
438
+ };
439
+ var getListEmailAgentsUrl = (params) => {
440
+ const normalizedParams = new URLSearchParams();
441
+ Object.entries(params || {}).forEach(([key, value]) => {
442
+ if (value !== void 0) {
443
+ normalizedParams.append(key, value === null ? "null" : value.toString());
444
+ }
445
+ });
446
+ const stringifiedParams = normalizedParams.toString();
447
+ return stringifiedParams.length > 0 ? `/v1/email-agents?${stringifiedParams}` : `/v1/email-agents`;
448
+ };
449
+ var listEmailAgents = async (params, options) => {
450
+ return customFetch(getListEmailAgentsUrl(params), {
451
+ ...options,
452
+ method: "GET"
453
+ });
454
+ };
455
+ var getUpdateEmailAgentUrl = (id) => {
456
+ return `/v1/email-agents/${id}`;
457
+ };
458
+ var updateEmailAgent = async (id, updateEmailAgentBody, options) => {
459
+ return customFetch(getUpdateEmailAgentUrl(id), {
460
+ ...options,
461
+ method: "PATCH",
462
+ headers: { "Content-Type": "application/json", ...options?.headers },
463
+ body: JSON.stringify(updateEmailAgentBody)
464
+ });
465
+ };
466
+ var getCreateEmailUrl = () => {
467
+ return `/v1/emails`;
468
+ };
469
+ var createEmail = async (createEmailBody, options) => {
470
+ return customFetch(getCreateEmailUrl(), {
471
+ ...options,
472
+ method: "POST",
473
+ headers: { "Content-Type": "application/json", ...options?.headers },
474
+ body: JSON.stringify(createEmailBody)
475
+ });
476
+ };
477
+ var getListEmailsUrl = (params) => {
478
+ const normalizedParams = new URLSearchParams();
479
+ Object.entries(params || {}).forEach(([key, value]) => {
480
+ if (value !== void 0) {
481
+ normalizedParams.append(key, value === null ? "null" : value.toString());
482
+ }
483
+ });
484
+ const stringifiedParams = normalizedParams.toString();
485
+ return stringifiedParams.length > 0 ? `/v1/emails?${stringifiedParams}` : `/v1/emails`;
486
+ };
487
+ var listEmails = async (params, options) => {
488
+ return customFetch(getListEmailsUrl(params), {
489
+ ...options,
490
+ method: "GET"
491
+ });
492
+ };
493
+ var getGetEmailUrl = (emailId) => {
494
+ return `/v1/emails/${emailId}`;
495
+ };
496
+ var getEmail = async (emailId, options) => {
497
+ return customFetch(getGetEmailUrl(emailId), {
498
+ ...options,
499
+ method: "GET"
500
+ });
501
+ };
502
+ var getListExtractorJobsUrl = (params) => {
503
+ const normalizedParams = new URLSearchParams();
504
+ Object.entries(params || {}).forEach(([key, value]) => {
505
+ if (value !== void 0) {
506
+ normalizedParams.append(key, value === null ? "null" : value.toString());
507
+ }
508
+ });
509
+ const stringifiedParams = normalizedParams.toString();
510
+ return stringifiedParams.length > 0 ? `/v1/extractor-jobs?${stringifiedParams}` : `/v1/extractor-jobs`;
511
+ };
512
+ var listExtractorJobs = async (params, options) => {
513
+ return customFetch(
514
+ getListExtractorJobsUrl(params),
515
+ {
516
+ ...options,
517
+ method: "GET"
518
+ }
519
+ );
520
+ };
521
+ var getCreateExtractorJobUrl = () => {
522
+ return `/v1/extractor-jobs`;
523
+ };
524
+ var createExtractorJob = async (createExtractorJobBody, options) => {
525
+ return customFetch(getCreateExtractorJobUrl(), {
526
+ ...options,
527
+ method: "POST",
528
+ headers: { "Content-Type": "application/json", ...options?.headers },
529
+ body: JSON.stringify(createExtractorJobBody)
530
+ });
531
+ };
532
+ var getGetExtractorJobUrl = (id) => {
533
+ return `/v1/extractor-jobs/${id}`;
534
+ };
535
+ var getExtractorJob = async (id, options) => {
536
+ return customFetch(getGetExtractorJobUrl(id), {
537
+ ...options,
538
+ method: "GET"
539
+ });
540
+ };
541
+ var getCancelExtractorJobUrl = (id) => {
542
+ return `/v1/extractor-jobs/${id}/cancel`;
543
+ };
544
+ var cancelExtractorJob = async (id, options) => {
545
+ return customFetch(getCancelExtractorJobUrl(id), {
546
+ ...options,
547
+ method: "POST"
548
+ });
549
+ };
550
+ var getCreateExtractorUrl = () => {
551
+ return `/v1/extractors`;
552
+ };
553
+ var createExtractor = async (createExtractorBody, options) => {
554
+ return customFetch(getCreateExtractorUrl(), {
555
+ ...options,
556
+ method: "POST",
557
+ headers: { "Content-Type": "application/json", ...options?.headers },
558
+ body: JSON.stringify(createExtractorBody)
559
+ });
560
+ };
561
+ var getListExtractorsUrl = (params) => {
562
+ const normalizedParams = new URLSearchParams();
563
+ Object.entries(params || {}).forEach(([key, value]) => {
564
+ if (value !== void 0) {
565
+ normalizedParams.append(key, value === null ? "null" : value.toString());
566
+ }
567
+ });
568
+ const stringifiedParams = normalizedParams.toString();
569
+ return stringifiedParams.length > 0 ? `/v1/extractors?${stringifiedParams}` : `/v1/extractors`;
570
+ };
571
+ var listExtractors = async (params, options) => {
572
+ return customFetch(getListExtractorsUrl(params), {
573
+ ...options,
574
+ method: "GET"
575
+ });
576
+ };
577
+ var getGetExtractorUrl = (id) => {
578
+ return `/v1/extractors/${id}`;
579
+ };
580
+ var getExtractor = async (id, options) => {
581
+ return customFetch(getGetExtractorUrl(id), {
582
+ ...options,
583
+ method: "GET"
584
+ });
585
+ };
586
+ var getUpdateExtractorUrl = (id) => {
587
+ return `/v1/extractors/${id}`;
588
+ };
589
+ var updateExtractor = async (id, updateExtractorBody, options) => {
590
+ return customFetch(getUpdateExtractorUrl(id), {
591
+ ...options,
592
+ method: "PATCH",
593
+ headers: { "Content-Type": "application/json", ...options?.headers },
594
+ body: JSON.stringify(updateExtractorBody)
595
+ });
596
+ };
597
+ var getGetExtractUrl = (id) => {
598
+ return `/v1/extracts/${id}`;
599
+ };
600
+ var getExtract = async (id, options) => {
601
+ return customFetch(getGetExtractUrl(id), {
602
+ ...options,
603
+ method: "GET"
604
+ });
605
+ };
606
+ var getListExtractsUrl = (params) => {
607
+ const normalizedParams = new URLSearchParams();
608
+ Object.entries(params || {}).forEach(([key, value]) => {
609
+ if (value !== void 0) {
610
+ normalizedParams.append(key, value === null ? "null" : value.toString());
611
+ }
612
+ });
613
+ const stringifiedParams = normalizedParams.toString();
614
+ return stringifiedParams.length > 0 ? `/v1/extracts?${stringifiedParams}` : `/v1/extracts`;
615
+ };
616
+ var listExtracts = async (params, options) => {
617
+ return customFetch(getListExtractsUrl(params), {
618
+ ...options,
619
+ method: "GET"
620
+ });
621
+ };
622
+ var getGetProfileUrl = () => {
623
+ return `/v1/profile`;
624
+ };
625
+ var getProfile = async (options) => {
626
+ return customFetch(getGetProfileUrl(), {
627
+ ...options,
628
+ method: "GET"
629
+ });
630
+ };
631
+ var getCreateToolUrl = () => {
632
+ return `/v1/tools`;
633
+ };
634
+ var createTool = async (createToolBody, options) => {
635
+ return customFetch(getCreateToolUrl(), {
636
+ ...options,
637
+ method: "POST",
638
+ headers: { "Content-Type": "application/json", ...options?.headers },
639
+ body: JSON.stringify(createToolBody)
640
+ });
641
+ };
642
+ var getListToolsUrl = (params) => {
643
+ const normalizedParams = new URLSearchParams();
644
+ Object.entries(params || {}).forEach(([key, value]) => {
645
+ if (value !== void 0) {
646
+ normalizedParams.append(key, value === null ? "null" : value.toString());
647
+ }
648
+ });
649
+ const stringifiedParams = normalizedParams.toString();
650
+ return stringifiedParams.length > 0 ? `/v1/tools?${stringifiedParams}` : `/v1/tools`;
651
+ };
652
+ var listTools = async (params, options) => {
653
+ return customFetch(getListToolsUrl(params), {
654
+ ...options,
655
+ method: "GET"
656
+ });
657
+ };
658
+ var getExecuteCodeUrl = (id) => {
659
+ return `/v1/tools/${id}/execute`;
660
+ };
661
+ var executeCode = async (id, executeCodeBody, options) => {
662
+ return customFetch(getExecuteCodeUrl(id), {
663
+ ...options,
664
+ method: "POST",
665
+ headers: { "Content-Type": "application/json", ...options?.headers },
666
+ body: JSON.stringify(executeCodeBody)
667
+ });
668
+ };
669
+ var getGetToolUrl = (id) => {
670
+ return `/v1/tools/${id}`;
671
+ };
672
+ var getTool = async (id, options) => {
673
+ return customFetch(getGetToolUrl(id), {
674
+ ...options,
675
+ method: "GET"
676
+ });
677
+ };
678
+ var getUpdateToolUrl = (id) => {
679
+ return `/v1/tools/${id}`;
680
+ };
681
+ var updateTool = async (id, updateToolBody, options) => {
682
+ return customFetch(getUpdateToolUrl(id), {
683
+ ...options,
684
+ method: "PATCH",
685
+ headers: { "Content-Type": "application/json", ...options?.headers },
686
+ body: JSON.stringify(updateToolBody)
687
+ });
688
+ };
689
+ var getUploadFileUrl = () => {
690
+ return `/v1/upload-file`;
691
+ };
692
+ var uploadFile = async (uploadFileBody, options) => {
693
+ return customFetch(getUploadFileUrl(), {
694
+ ...options,
695
+ method: "POST",
696
+ headers: { "Content-Type": "application/json", ...options?.headers },
697
+ body: JSON.stringify(uploadFileBody)
698
+ });
699
+ };
700
+ var getCreateAgentWebhookUrl = (id) => {
701
+ return `/v1/agents/${id}/webhooks`;
702
+ };
703
+ var createAgentWebhook = async (id, createAgentWebhookBody, options) => {
704
+ return customFetch(getCreateAgentWebhookUrl(id), {
705
+ ...options,
706
+ method: "POST",
707
+ headers: { "Content-Type": "application/json", ...options?.headers },
708
+ body: JSON.stringify(createAgentWebhookBody)
709
+ });
710
+ };
711
+ var getListAgentWebhooksUrl = (id) => {
712
+ return `/v1/agents/${id}/webhooks`;
713
+ };
714
+ var listAgentWebhooks = async (id, options) => {
715
+ return customFetch(getListAgentWebhooksUrl(id), {
716
+ ...options,
717
+ method: "GET"
718
+ });
719
+ };
720
+ var getCreateEmailAgentWebhookUrl = (id) => {
721
+ return `/v1/email-agents/${id}/webhooks`;
722
+ };
723
+ var createEmailAgentWebhook = async (id, createEmailAgentWebhookBody, options) => {
724
+ return customFetch(
725
+ getCreateEmailAgentWebhookUrl(id),
726
+ {
727
+ ...options,
728
+ method: "POST",
729
+ headers: { "Content-Type": "application/json", ...options?.headers },
730
+ body: JSON.stringify(createEmailAgentWebhookBody)
731
+ }
732
+ );
733
+ };
734
+ var getListEmailAgentWebhooksUrl = (id) => {
735
+ return `/v1/email-agents/${id}/webhooks`;
736
+ };
737
+ var listEmailAgentWebhooks = async (id, options) => {
738
+ return customFetch(
739
+ getListEmailAgentWebhooksUrl(id),
740
+ {
741
+ ...options,
742
+ method: "GET"
743
+ }
744
+ );
745
+ };
746
+ var getCreateExtractorWebhookUrl = (id) => {
747
+ return `/v1/extractors/${id}/webhooks`;
748
+ };
749
+ var createExtractorWebhook = async (id, createExtractorWebhookBody, options) => {
750
+ return customFetch(
751
+ getCreateExtractorWebhookUrl(id),
752
+ {
753
+ ...options,
754
+ method: "POST",
755
+ headers: { "Content-Type": "application/json", ...options?.headers },
756
+ body: JSON.stringify(createExtractorWebhookBody)
757
+ }
758
+ );
759
+ };
760
+ var getListWebhooksUrl = (id) => {
761
+ return `/v1/extractors/${id}/webhooks`;
762
+ };
763
+ var listWebhooks = async (id, options) => {
764
+ return customFetch(getListWebhooksUrl(id), {
765
+ ...options,
766
+ method: "GET"
767
+ });
768
+ };
769
+ var getDeleteWebhookUrl = (id) => {
770
+ return `/v1/webhooks/${id}`;
771
+ };
772
+ var deleteWebhook = async (id, options) => {
773
+ return customFetch(getDeleteWebhookUrl(id), {
774
+ ...options,
775
+ method: "DELETE"
776
+ });
777
+ };
778
+ var getGetWebhookUrl = (id) => {
779
+ return `/v1/webhooks/${id}`;
780
+ };
781
+ var getWebhook = async (id, options) => {
782
+ return customFetch(getGetWebhookUrl(id), {
783
+ ...options,
784
+ method: "GET"
785
+ });
786
+ };
787
+ var getListWebhookDeliveriesUrl = (id, params) => {
788
+ const normalizedParams = new URLSearchParams();
789
+ Object.entries(params || {}).forEach(([key, value]) => {
790
+ if (value !== void 0) {
791
+ normalizedParams.append(key, value === null ? "null" : value.toString());
792
+ }
793
+ });
794
+ const stringifiedParams = normalizedParams.toString();
795
+ return stringifiedParams.length > 0 ? `/v1/webhooks/${id}/deliveries?${stringifiedParams}` : `/v1/webhooks/${id}/deliveries`;
796
+ };
797
+ var listWebhookDeliveries = async (id, params, options) => {
798
+ return customFetch(
799
+ getListWebhookDeliveriesUrl(id, params),
800
+ {
801
+ ...options,
802
+ method: "GET"
803
+ }
804
+ );
805
+ };
806
+ var getTestWebhookUrl = (id) => {
807
+ return `/v1/webhooks/${id}/test`;
808
+ };
809
+ var testWebhook = async (id, options) => {
810
+ return customFetch(getTestWebhookUrl(id), {
811
+ ...options,
812
+ method: "POST"
813
+ });
814
+ };
815
+
816
+ // src/generated/handlers.ts
817
+ var listAgentsHandler = async (args) => {
818
+ const res = await listAgents(args.queryParams);
819
+ return {
820
+ content: [
821
+ {
822
+ type: "text",
823
+ text: JSON.stringify(res)
824
+ }
825
+ ]
826
+ };
827
+ };
828
+ var createAgentHandler = async (args) => {
829
+ const res = await createAgent(args.bodyParams);
830
+ return {
831
+ content: [
832
+ {
833
+ type: "text",
834
+ text: JSON.stringify(res)
835
+ }
836
+ ]
837
+ };
838
+ };
839
+ var getAgentHandler = async (args) => {
840
+ const res = await getAgent(args.pathParams.id);
841
+ return {
842
+ content: [
843
+ {
844
+ type: "text",
845
+ text: JSON.stringify(res)
846
+ }
847
+ ]
848
+ };
849
+ };
850
+ var addToolsToAgentHandler = async (args) => {
851
+ const res = await addToolsToAgent(args.pathParams.id, args.bodyParams);
852
+ return {
853
+ content: [
854
+ {
855
+ type: "text",
856
+ text: JSON.stringify(res)
857
+ }
858
+ ]
859
+ };
860
+ };
861
+ var deleteToolsFromAgentHandler = async (args) => {
862
+ const res = await deleteToolsFromAgent(args.pathParams.id, args.bodyParams);
863
+ return {
864
+ content: [
865
+ {
866
+ type: "text",
867
+ text: JSON.stringify(res)
868
+ }
869
+ ]
870
+ };
871
+ };
872
+ var getAgentPromptHandler = async (args) => {
873
+ const res = await getAgentPrompt(args.pathParams.id);
874
+ return {
875
+ content: [
876
+ {
877
+ type: "text",
878
+ text: JSON.stringify(res)
879
+ }
880
+ ]
881
+ };
882
+ };
883
+ var updateAgentModelsHandler = async (args) => {
884
+ const res = await updateAgentModels(args.pathParams.id, args.bodyParams);
885
+ return {
886
+ content: [
887
+ {
888
+ type: "text",
889
+ text: JSON.stringify(res)
890
+ }
891
+ ]
892
+ };
893
+ };
894
+ var updateCallControlsHandler = async (args) => {
895
+ const res = await updateCallControls(args.pathParams.id, args.bodyParams);
896
+ return {
897
+ content: [
898
+ {
899
+ type: "text",
900
+ text: JSON.stringify(res)
901
+ }
902
+ ]
903
+ };
904
+ };
905
+ var scheduleJobHandler = async (args) => {
906
+ const res = await scheduleJob(args.pathParams.id, args.bodyParams);
907
+ return {
908
+ content: [
909
+ {
910
+ type: "text",
911
+ text: JSON.stringify(res)
912
+ }
913
+ ]
914
+ };
915
+ };
916
+ var listJobsHandler = async (args) => {
917
+ const res = await listJobs(args.queryParams);
918
+ return {
919
+ content: [
920
+ {
921
+ type: "text",
922
+ text: JSON.stringify(res)
923
+ }
924
+ ]
925
+ };
926
+ };
927
+ var cancelJobHandler = async (args) => {
928
+ const res = await cancelJob(args.pathParams.id);
929
+ return {
930
+ content: [
931
+ {
932
+ type: "text",
933
+ text: JSON.stringify(res)
934
+ }
935
+ ]
936
+ };
937
+ };
938
+ var listApiKeysHandler = async (args) => {
939
+ const res = await listApiKeys(args.queryParams);
940
+ return {
941
+ content: [
942
+ {
943
+ type: "text",
944
+ text: JSON.stringify(res)
945
+ }
946
+ ]
947
+ };
948
+ };
949
+ var createApiKeyHandler = async (args) => {
950
+ const res = await createApiKey(args.bodyParams);
951
+ return {
952
+ content: [
953
+ {
954
+ type: "text",
955
+ text: JSON.stringify(res)
956
+ }
957
+ ]
958
+ };
959
+ };
960
+ var revokeApiKeyHandler = async (args) => {
961
+ const res = await revokeApiKey(args.pathParams.id);
962
+ return {
963
+ content: [
964
+ {
965
+ type: "text",
966
+ text: JSON.stringify(res)
967
+ }
968
+ ]
969
+ };
970
+ };
971
+ var createArtifactHandler = async (args) => {
972
+ const res = await createArtifact(args.bodyParams);
973
+ return {
974
+ content: [
975
+ {
976
+ type: "text",
977
+ text: JSON.stringify(res)
978
+ }
979
+ ]
980
+ };
981
+ };
982
+ var listArtifactsHandler = async (args) => {
983
+ const res = await listArtifacts(args.queryParams);
984
+ return {
985
+ content: [
986
+ {
987
+ type: "text",
988
+ text: JSON.stringify(res)
989
+ }
990
+ ]
991
+ };
992
+ };
993
+ var getArtifactHandler = async (args) => {
994
+ const res = await getArtifact(args.pathParams.id);
995
+ return {
996
+ content: [
997
+ {
998
+ type: "text",
999
+ text: JSON.stringify(res)
1000
+ }
1001
+ ]
1002
+ };
1003
+ };
1004
+ var getArtifactMetadataKeysHandler = async (args) => {
1005
+ const res = await getArtifactMetadataKeys(args.queryParams);
1006
+ return {
1007
+ content: [
1008
+ {
1009
+ type: "text",
1010
+ text: JSON.stringify(res)
1011
+ }
1012
+ ]
1013
+ };
1014
+ };
1015
+ var signUpHandler = async (args) => {
1016
+ const res = await signUp(args.bodyParams);
1017
+ return {
1018
+ content: [
1019
+ {
1020
+ type: "text",
1021
+ text: JSON.stringify(res)
1022
+ }
1023
+ ]
1024
+ };
1025
+ };
1026
+ var signInHandler = async (args) => {
1027
+ const res = await signIn(args.bodyParams);
1028
+ return {
1029
+ content: [
1030
+ {
1031
+ type: "text",
1032
+ text: JSON.stringify(res)
1033
+ }
1034
+ ]
1035
+ };
1036
+ };
1037
+ var refreshTokenHandler = async (args) => {
1038
+ const res = await refreshToken(args.bodyParams);
1039
+ return {
1040
+ content: [
1041
+ {
1042
+ type: "text",
1043
+ text: JSON.stringify(res)
1044
+ }
1045
+ ]
1046
+ };
1047
+ };
1048
+ var getOAuthUrlHandler = async (args) => {
1049
+ const res = await getOAuthUrl(args.queryParams);
1050
+ return {
1051
+ content: [
1052
+ {
1053
+ type: "text",
1054
+ text: JSON.stringify(res)
1055
+ }
1056
+ ]
1057
+ };
1058
+ };
1059
+ var listCallsHandler = async (args) => {
1060
+ const res = await listCalls(args.queryParams);
1061
+ return {
1062
+ content: [
1063
+ {
1064
+ type: "text",
1065
+ text: JSON.stringify(res)
1066
+ }
1067
+ ]
1068
+ };
1069
+ };
1070
+ var getCallHandler = async (args) => {
1071
+ const res = await getCall(args.pathParams.id, args.queryParams);
1072
+ return {
1073
+ content: [
1074
+ {
1075
+ type: "text",
1076
+ text: JSON.stringify(res)
1077
+ }
1078
+ ]
1079
+ };
1080
+ };
1081
+ var getCallEvaluationHandler = async (args) => {
1082
+ const res = await getCallEvaluation(args.pathParams.id);
1083
+ return {
1084
+ content: [
1085
+ {
1086
+ type: "text",
1087
+ text: JSON.stringify(res)
1088
+ }
1089
+ ]
1090
+ };
1091
+ };
1092
+ var getCallAnalyticsHandler = async (args) => {
1093
+ const res = await getCallAnalytics(args.queryParams);
1094
+ return {
1095
+ content: [
1096
+ {
1097
+ type: "text",
1098
+ text: JSON.stringify(res)
1099
+ }
1100
+ ]
1101
+ };
1102
+ };
1103
+ var createCallFeedbackHandler = async (args) => {
1104
+ const res = await createCallFeedback(args.pathParams.id, args.bodyParams);
1105
+ return {
1106
+ content: [
1107
+ {
1108
+ type: "text",
1109
+ text: JSON.stringify(res)
1110
+ }
1111
+ ]
1112
+ };
1113
+ };
1114
+ var listCallFeedbackHandler = async (args) => {
1115
+ const res = await listCallFeedback(args.pathParams.id, args.queryParams);
1116
+ return {
1117
+ content: [
1118
+ {
1119
+ type: "text",
1120
+ text: JSON.stringify(res)
1121
+ }
1122
+ ]
1123
+ };
1124
+ };
1125
+ var deleteCallFeedbackHandler = async (args) => {
1126
+ const res = await deleteCallFeedback(
1127
+ args.pathParams.id,
1128
+ args.pathParams.feedbackId
1129
+ );
1130
+ return {
1131
+ content: [
1132
+ {
1133
+ type: "text",
1134
+ text: JSON.stringify(res)
1135
+ }
1136
+ ]
1137
+ };
1138
+ };
1139
+ var createClaimHandler = async () => {
1140
+ const res = await createClaim();
1141
+ return {
1142
+ content: [
1143
+ {
1144
+ type: "text",
1145
+ text: JSON.stringify(res)
1146
+ }
1147
+ ]
1148
+ };
1149
+ };
1150
+ var listClaimsHandler = async (args) => {
1151
+ const res = await listClaims(args.queryParams);
1152
+ return {
1153
+ content: [
1154
+ {
1155
+ type: "text",
1156
+ text: JSON.stringify(res)
1157
+ }
1158
+ ]
1159
+ };
1160
+ };
1161
+ var getClaimDetailHandler = async (args) => {
1162
+ const res = await getClaimDetail(args.pathParams.id);
1163
+ return {
1164
+ content: [
1165
+ {
1166
+ type: "text",
1167
+ text: JSON.stringify(res)
1168
+ }
1169
+ ]
1170
+ };
1171
+ };
1172
+ var checkEmailUsernameAvailabilityHandler = async (args) => {
1173
+ const res = await checkEmailUsernameAvailability(args.queryParams);
1174
+ return {
1175
+ content: [
1176
+ {
1177
+ type: "text",
1178
+ text: JSON.stringify(res)
1179
+ }
1180
+ ]
1181
+ };
1182
+ };
1183
+ var createEmailAgentHandler = async (args) => {
1184
+ const res = await createEmailAgent(args.bodyParams);
1185
+ return {
1186
+ content: [
1187
+ {
1188
+ type: "text",
1189
+ text: JSON.stringify(res)
1190
+ }
1191
+ ]
1192
+ };
1193
+ };
1194
+ var listEmailAgentsHandler = async (args) => {
1195
+ const res = await listEmailAgents(args.queryParams);
1196
+ return {
1197
+ content: [
1198
+ {
1199
+ type: "text",
1200
+ text: JSON.stringify(res)
1201
+ }
1202
+ ]
1203
+ };
1204
+ };
1205
+ var updateEmailAgentHandler = async (args) => {
1206
+ const res = await updateEmailAgent(args.pathParams.id, args.bodyParams);
1207
+ return {
1208
+ content: [
1209
+ {
1210
+ type: "text",
1211
+ text: JSON.stringify(res)
1212
+ }
1213
+ ]
1214
+ };
1215
+ };
1216
+ var createEmailHandler = async (args) => {
1217
+ const res = await createEmail(args.bodyParams);
1218
+ return {
1219
+ content: [
1220
+ {
1221
+ type: "text",
1222
+ text: JSON.stringify(res)
1223
+ }
1224
+ ]
1225
+ };
1226
+ };
1227
+ var listEmailsHandler = async (args) => {
1228
+ const res = await listEmails(args.queryParams);
1229
+ return {
1230
+ content: [
1231
+ {
1232
+ type: "text",
1233
+ text: JSON.stringify(res)
1234
+ }
1235
+ ]
1236
+ };
1237
+ };
1238
+ var getEmailHandler = async (args) => {
1239
+ const res = await getEmail(args.pathParams.emailId);
1240
+ return {
1241
+ content: [
1242
+ {
1243
+ type: "text",
1244
+ text: JSON.stringify(res)
1245
+ }
1246
+ ]
1247
+ };
1248
+ };
1249
+ var listExtractorJobsHandler = async (args) => {
1250
+ const res = await listExtractorJobs(args.queryParams);
1251
+ return {
1252
+ content: [
1253
+ {
1254
+ type: "text",
1255
+ text: JSON.stringify(res)
1256
+ }
1257
+ ]
1258
+ };
1259
+ };
1260
+ var createExtractorJobHandler = async (args) => {
1261
+ const res = await createExtractorJob(args.bodyParams);
1262
+ return {
1263
+ content: [
1264
+ {
1265
+ type: "text",
1266
+ text: JSON.stringify(res)
1267
+ }
1268
+ ]
1269
+ };
1270
+ };
1271
+ var getExtractorJobHandler = async (args) => {
1272
+ const res = await getExtractorJob(args.pathParams.id);
1273
+ return {
1274
+ content: [
1275
+ {
1276
+ type: "text",
1277
+ text: JSON.stringify(res)
1278
+ }
1279
+ ]
1280
+ };
1281
+ };
1282
+ var cancelExtractorJobHandler = async (args) => {
1283
+ const res = await cancelExtractorJob(args.pathParams.id);
1284
+ return {
1285
+ content: [
1286
+ {
1287
+ type: "text",
1288
+ text: JSON.stringify(res)
1289
+ }
1290
+ ]
1291
+ };
1292
+ };
1293
+ var createExtractorHandler = async (args) => {
1294
+ const res = await createExtractor(args.bodyParams);
1295
+ return {
1296
+ content: [
1297
+ {
1298
+ type: "text",
1299
+ text: JSON.stringify(res)
1300
+ }
1301
+ ]
1302
+ };
1303
+ };
1304
+ var listExtractorsHandler = async (args) => {
1305
+ const res = await listExtractors(args.queryParams);
1306
+ return {
1307
+ content: [
1308
+ {
1309
+ type: "text",
1310
+ text: JSON.stringify(res)
1311
+ }
1312
+ ]
1313
+ };
1314
+ };
1315
+ var getExtractorHandler = async (args) => {
1316
+ const res = await getExtractor(args.pathParams.id);
1317
+ return {
1318
+ content: [
1319
+ {
1320
+ type: "text",
1321
+ text: JSON.stringify(res)
1322
+ }
1323
+ ]
1324
+ };
1325
+ };
1326
+ var updateExtractorHandler = async (args) => {
1327
+ const res = await updateExtractor(args.pathParams.id, args.bodyParams);
1328
+ return {
1329
+ content: [
1330
+ {
1331
+ type: "text",
1332
+ text: JSON.stringify(res)
1333
+ }
1334
+ ]
1335
+ };
1336
+ };
1337
+ var getExtractHandler = async (args) => {
1338
+ const res = await getExtract(args.pathParams.id);
1339
+ return {
1340
+ content: [
1341
+ {
1342
+ type: "text",
1343
+ text: JSON.stringify(res)
1344
+ }
1345
+ ]
1346
+ };
1347
+ };
1348
+ var listExtractsHandler = async (args) => {
1349
+ const res = await listExtracts(args.queryParams);
1350
+ return {
1351
+ content: [
1352
+ {
1353
+ type: "text",
1354
+ text: JSON.stringify(res)
1355
+ }
1356
+ ]
1357
+ };
1358
+ };
1359
+ var getProfileHandler = async () => {
1360
+ const res = await getProfile();
1361
+ return {
1362
+ content: [
1363
+ {
1364
+ type: "text",
1365
+ text: JSON.stringify(res)
1366
+ }
1367
+ ]
1368
+ };
1369
+ };
1370
+ var createToolHandler = async (args) => {
1371
+ const res = await createTool(args.bodyParams);
1372
+ return {
1373
+ content: [
1374
+ {
1375
+ type: "text",
1376
+ text: JSON.stringify(res)
1377
+ }
1378
+ ]
1379
+ };
1380
+ };
1381
+ var listToolsHandler = async (args) => {
1382
+ const res = await listTools(args.queryParams);
1383
+ return {
1384
+ content: [
1385
+ {
1386
+ type: "text",
1387
+ text: JSON.stringify(res)
1388
+ }
1389
+ ]
1390
+ };
1391
+ };
1392
+ var executeCodeHandler = async (args) => {
1393
+ const res = await executeCode(args.pathParams.id, args.bodyParams);
1394
+ return {
1395
+ content: [
1396
+ {
1397
+ type: "text",
1398
+ text: JSON.stringify(res)
1399
+ }
1400
+ ]
1401
+ };
1402
+ };
1403
+ var getToolHandler = async (args) => {
1404
+ const res = await getTool(args.pathParams.id);
1405
+ return {
1406
+ content: [
1407
+ {
1408
+ type: "text",
1409
+ text: JSON.stringify(res)
1410
+ }
1411
+ ]
1412
+ };
1413
+ };
1414
+ var updateToolHandler = async (args) => {
1415
+ const res = await updateTool(args.pathParams.id, args.bodyParams);
1416
+ return {
1417
+ content: [
1418
+ {
1419
+ type: "text",
1420
+ text: JSON.stringify(res)
1421
+ }
1422
+ ]
1423
+ };
1424
+ };
1425
+ var uploadFileHandler = async (args) => {
1426
+ const res = await uploadFile(args.bodyParams);
1427
+ return {
1428
+ content: [
1429
+ {
1430
+ type: "text",
1431
+ text: JSON.stringify(res)
1432
+ }
1433
+ ]
1434
+ };
1435
+ };
1436
+ var createAgentWebhookHandler = async (args) => {
1437
+ const res = await createAgentWebhook(args.pathParams.id, args.bodyParams);
1438
+ return {
1439
+ content: [
1440
+ {
1441
+ type: "text",
1442
+ text: JSON.stringify(res)
1443
+ }
1444
+ ]
1445
+ };
1446
+ };
1447
+ var listAgentWebhooksHandler = async (args) => {
1448
+ const res = await listAgentWebhooks(args.pathParams.id);
1449
+ return {
1450
+ content: [
1451
+ {
1452
+ type: "text",
1453
+ text: JSON.stringify(res)
1454
+ }
1455
+ ]
1456
+ };
1457
+ };
1458
+ var createEmailAgentWebhookHandler = async (args) => {
1459
+ const res = await createEmailAgentWebhook(
1460
+ args.pathParams.id,
1461
+ args.bodyParams
1462
+ );
1463
+ return {
1464
+ content: [
1465
+ {
1466
+ type: "text",
1467
+ text: JSON.stringify(res)
1468
+ }
1469
+ ]
1470
+ };
1471
+ };
1472
+ var listEmailAgentWebhooksHandler = async (args) => {
1473
+ const res = await listEmailAgentWebhooks(args.pathParams.id);
1474
+ return {
1475
+ content: [
1476
+ {
1477
+ type: "text",
1478
+ text: JSON.stringify(res)
1479
+ }
1480
+ ]
1481
+ };
1482
+ };
1483
+ var createExtractorWebhookHandler = async (args) => {
1484
+ const res = await createExtractorWebhook(args.pathParams.id, args.bodyParams);
1485
+ return {
1486
+ content: [
1487
+ {
1488
+ type: "text",
1489
+ text: JSON.stringify(res)
1490
+ }
1491
+ ]
1492
+ };
1493
+ };
1494
+ var listWebhooksHandler = async (args) => {
1495
+ const res = await listWebhooks(args.pathParams.id);
1496
+ return {
1497
+ content: [
1498
+ {
1499
+ type: "text",
1500
+ text: JSON.stringify(res)
1501
+ }
1502
+ ]
1503
+ };
1504
+ };
1505
+ var deleteWebhookHandler = async (args) => {
1506
+ const res = await deleteWebhook(args.pathParams.id);
1507
+ return {
1508
+ content: [
1509
+ {
1510
+ type: "text",
1511
+ text: JSON.stringify(res)
1512
+ }
1513
+ ]
1514
+ };
1515
+ };
1516
+ var getWebhookHandler = async (args) => {
1517
+ const res = await getWebhook(args.pathParams.id);
1518
+ return {
1519
+ content: [
1520
+ {
1521
+ type: "text",
1522
+ text: JSON.stringify(res)
1523
+ }
1524
+ ]
1525
+ };
1526
+ };
1527
+ var listWebhookDeliveriesHandler = async (args) => {
1528
+ const res = await listWebhookDeliveries(args.pathParams.id, args.queryParams);
1529
+ return {
1530
+ content: [
1531
+ {
1532
+ type: "text",
1533
+ text: JSON.stringify(res)
1534
+ }
1535
+ ]
1536
+ };
1537
+ };
1538
+ var testWebhookHandler = async (args) => {
1539
+ const res = await testWebhook(args.pathParams.id);
1540
+ return {
1541
+ content: [
1542
+ {
1543
+ type: "text",
1544
+ text: JSON.stringify(res)
1545
+ }
1546
+ ]
1547
+ };
1548
+ };
1549
+
1550
+ // src/generated/tool-schemas.zod.ts
1551
+ import { z as zod } from "zod";
1552
+ var ListAgentsQueryParams = zod.object({
1553
+ agent_name: zod.string().optional().describe("Filter by exact agent name")
1554
+ });
1555
+ var listAgentsResponseTotalMin = -9007199254740991;
1556
+ var listAgentsResponseTotalMax = 9007199254740991;
1557
+ var ListAgentsResponse = zod.object({
1558
+ agents: zod.array(
1559
+ zod.object({
1560
+ id: zod.string(),
1561
+ tenant_id: zod.string(),
1562
+ agent_name: zod.string(),
1563
+ direction: zod.enum(["INBOUND", "OUTBOUND"]),
1564
+ llm_model: zod.enum([
1565
+ "GPT4.1",
1566
+ "AZURE-GPT4o",
1567
+ "AZURE-GPT4.1",
1568
+ "GPT-5",
1569
+ "GPT-5-low",
1570
+ "GPT-5-high",
1571
+ "GPT-5.1-chat-latest",
1572
+ "GPT-5.1-no-reasoning",
1573
+ "GEMINI-1.5-flash",
1574
+ "GEMINI-2.5-flash",
1575
+ "GEMINI-2.5-flash-lite",
1576
+ "GEMINI-3-flash",
1577
+ "CLAUDE-sonnet-4.6",
1578
+ "CLAUDE-haiku-4.5"
1579
+ ]),
1580
+ tts_provider: zod.enum(["elevenlabs", "cartesia", "google"]),
1581
+ tts_model: zod.enum([
1582
+ "eleven_flash_v2_5",
1583
+ "eleven_turbo_v2_5",
1584
+ "sonic-3",
1585
+ "chirp_3"
1586
+ ]),
1587
+ language: zod.enum(["en-US", "de-DE"]),
1588
+ tts_voice_id: zod.string().describe("Voice ID from the TTS provider"),
1589
+ stt_model: zod.enum([
1590
+ "DEEPGRAM-NOVA-2-GENERAL",
1591
+ "DEEPGRAM-NOVA-3-GENERAL",
1592
+ "AWS-TRANSCRIBE",
1593
+ "ELEVENLABS-SCRIBE-V2-REALTIME"
1594
+ ]),
1595
+ transfer_phone_number: zod.union([zod.string(), zod.null()]),
1596
+ background_sounds: zod.enum(["enabled", "disabled"]),
1597
+ created_at: zod.string().datetime({}),
1598
+ updated_at: zod.string().datetime({}),
1599
+ phone_number: zod.union([zod.string(), zod.null()]),
1600
+ dial_pad: zod.boolean(),
1601
+ end_call: zod.boolean()
1602
+ })
1603
+ ),
1604
+ total: zod.number().min(listAgentsResponseTotalMin).max(listAgentsResponseTotalMax).describe("Total number of agents")
1605
+ });
1606
+ var CreateAgentBody = zod.object({
1607
+ agent_name: zod.string().min(1).describe("Name for the agent"),
1608
+ direction: zod.enum(["OUTBOUND", "INBOUND"]).describe("Call direction the agent handles"),
1609
+ llm_model: zod.enum([
1610
+ "GPT4.1",
1611
+ "AZURE-GPT4o",
1612
+ "AZURE-GPT4.1",
1613
+ "GPT-5",
1614
+ "GPT-5-low",
1615
+ "GPT-5-high",
1616
+ "GPT-5.1-chat-latest",
1617
+ "GPT-5.1-no-reasoning",
1618
+ "GEMINI-1.5-flash",
1619
+ "GEMINI-2.5-flash",
1620
+ "GEMINI-2.5-flash-lite",
1621
+ "GEMINI-3-flash",
1622
+ "CLAUDE-sonnet-4.6",
1623
+ "CLAUDE-haiku-4.5"
1624
+ ]).describe("LLM model for conversation"),
1625
+ tts_provider: zod.enum(["elevenlabs", "cartesia", "google"]).describe("Text-to-speech provider"),
1626
+ tts_model: zod.enum(["eleven_flash_v2_5", "eleven_turbo_v2_5", "sonic-3", "chirp_3"]).describe("Text-to-speech model"),
1627
+ tts_voice_id: zod.union([
1628
+ zod.union([
1629
+ zod.enum(["Achernar", "Achird"]),
1630
+ zod.enum(["v3V1d2rk6528UrLKRuy8"])
1631
+ ]),
1632
+ zod.enum([
1633
+ "5c42302c-194b-4d0c-ba1a-8cb485c84ab9",
1634
+ "e8e5fffb-252c-436d-b842-8879b84445b6",
1635
+ "f786b574-daa5-4673-aa0c-cbe3e8534c02",
1636
+ "8d8ce8c9-44a4-46c4-b10f-9a927b99a853",
1637
+ "5ee9feff-1265-424a-9d7f-8e4d431a12c7",
1638
+ "b9de4a89-2257-424b-94c2-db18ba68c81a",
1639
+ "b0a1cdc7-e0d3-4d48-900d-7a936762c77b"
1640
+ ])
1641
+ ]).describe("Voice ID from the TTS provider"),
1642
+ stt_model: zod.enum([
1643
+ "DEEPGRAM-NOVA-2-GENERAL",
1644
+ "DEEPGRAM-NOVA-3-GENERAL",
1645
+ "AWS-TRANSCRIBE",
1646
+ "ELEVENLABS-SCRIBE-V2-REALTIME"
1647
+ ]).describe("Speech-to-text model"),
1648
+ transfer_phone_number: zod.union([zod.string(), zod.null()]).describe("Phone number to transfer calls to"),
1649
+ phone_number_id: zod.string().optional().describe("ID of phone number to assign to agent"),
1650
+ language: zod.enum(["en-US", "de-DE"]).describe("Language for the agent"),
1651
+ dial_pad: zod.boolean().optional().describe("Whether the agent supports DTMF dial pad input"),
1652
+ end_call: zod.boolean().optional().describe("Whether the agent can end the call")
1653
+ });
1654
+ var GetAgentParams = zod.object({
1655
+ id: zod.string().min(1).describe("Agent ID")
1656
+ });
1657
+ var GetAgentResponse = zod.object({
1658
+ agent: zod.object({
1659
+ id: zod.string(),
1660
+ tenant_id: zod.string(),
1661
+ agent_name: zod.string(),
1662
+ direction: zod.enum(["INBOUND", "OUTBOUND"]),
1663
+ llm_model: zod.enum([
1664
+ "GPT4.1",
1665
+ "AZURE-GPT4o",
1666
+ "AZURE-GPT4.1",
1667
+ "GPT-5",
1668
+ "GPT-5-low",
1669
+ "GPT-5-high",
1670
+ "GPT-5.1-chat-latest",
1671
+ "GPT-5.1-no-reasoning",
1672
+ "GEMINI-1.5-flash",
1673
+ "GEMINI-2.5-flash",
1674
+ "GEMINI-2.5-flash-lite",
1675
+ "GEMINI-3-flash",
1676
+ "CLAUDE-sonnet-4.6",
1677
+ "CLAUDE-haiku-4.5"
1678
+ ]),
1679
+ tts_provider: zod.enum(["elevenlabs", "cartesia", "google"]),
1680
+ tts_model: zod.enum([
1681
+ "eleven_flash_v2_5",
1682
+ "eleven_turbo_v2_5",
1683
+ "sonic-3",
1684
+ "chirp_3"
1685
+ ]),
1686
+ language: zod.enum(["en-US", "de-DE"]),
1687
+ tts_voice_id: zod.string().describe("Voice ID from the TTS provider"),
1688
+ stt_model: zod.enum([
1689
+ "DEEPGRAM-NOVA-2-GENERAL",
1690
+ "DEEPGRAM-NOVA-3-GENERAL",
1691
+ "AWS-TRANSCRIBE",
1692
+ "ELEVENLABS-SCRIBE-V2-REALTIME"
1693
+ ]),
1694
+ transfer_phone_number: zod.union([zod.string(), zod.null()]),
1695
+ background_sounds: zod.enum(["enabled", "disabled"]),
1696
+ created_at: zod.string().datetime({}),
1697
+ updated_at: zod.string().datetime({}),
1698
+ phone_number: zod.union([zod.string(), zod.null()]),
1699
+ dial_pad: zod.boolean(),
1700
+ end_call: zod.boolean()
1701
+ })
1702
+ });
1703
+ var addToolsToAgentPathIdRegExp = new RegExp(
1704
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
1705
+ );
1706
+ var AddToolsToAgentParams = zod.object({
1707
+ id: zod.string().uuid().regex(addToolsToAgentPathIdRegExp)
1708
+ });
1709
+ var addToolsToAgentBodyToolIdsItemRegExp = new RegExp(
1710
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
1711
+ );
1712
+ var AddToolsToAgentBody = zod.object({
1713
+ tool_ids: zod.array(
1714
+ zod.string().uuid().regex(addToolsToAgentBodyToolIdsItemRegExp)
1715
+ )
1716
+ });
1717
+ var AddToolsToAgentResponse = zod.object({
1718
+ agent: zod.object({
1719
+ id: zod.string(),
1720
+ tenant_id: zod.string(),
1721
+ agent_name: zod.string(),
1722
+ direction: zod.enum(["INBOUND", "OUTBOUND"]),
1723
+ llm_model: zod.enum([
1724
+ "GPT4.1",
1725
+ "AZURE-GPT4o",
1726
+ "AZURE-GPT4.1",
1727
+ "GPT-5",
1728
+ "GPT-5-low",
1729
+ "GPT-5-high",
1730
+ "GPT-5.1-chat-latest",
1731
+ "GPT-5.1-no-reasoning",
1732
+ "GEMINI-1.5-flash",
1733
+ "GEMINI-2.5-flash",
1734
+ "GEMINI-2.5-flash-lite",
1735
+ "GEMINI-3-flash",
1736
+ "CLAUDE-sonnet-4.6",
1737
+ "CLAUDE-haiku-4.5"
1738
+ ]),
1739
+ tts_provider: zod.enum(["elevenlabs", "cartesia", "google"]),
1740
+ tts_model: zod.enum([
1741
+ "eleven_flash_v2_5",
1742
+ "eleven_turbo_v2_5",
1743
+ "sonic-3",
1744
+ "chirp_3"
1745
+ ]),
1746
+ language: zod.enum(["en-US", "de-DE"]),
1747
+ tts_voice_id: zod.string().describe("Voice ID from the TTS provider"),
1748
+ stt_model: zod.enum([
1749
+ "DEEPGRAM-NOVA-2-GENERAL",
1750
+ "DEEPGRAM-NOVA-3-GENERAL",
1751
+ "AWS-TRANSCRIBE",
1752
+ "ELEVENLABS-SCRIBE-V2-REALTIME"
1753
+ ]),
1754
+ transfer_phone_number: zod.union([zod.string(), zod.null()]),
1755
+ background_sounds: zod.enum(["enabled", "disabled"]),
1756
+ created_at: zod.string().datetime({}),
1757
+ updated_at: zod.string().datetime({}),
1758
+ phone_number: zod.union([zod.string(), zod.null()]),
1759
+ dial_pad: zod.boolean(),
1760
+ end_call: zod.boolean()
1761
+ })
1762
+ });
1763
+ var deleteToolsFromAgentPathIdRegExp = new RegExp(
1764
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
1765
+ );
1766
+ var DeleteToolsFromAgentParams = zod.object({
1767
+ id: zod.string().uuid().regex(deleteToolsFromAgentPathIdRegExp)
1768
+ });
1769
+ var deleteToolsFromAgentBodyToolIdsItemRegExp = new RegExp(
1770
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
1771
+ );
1772
+ var DeleteToolsFromAgentBody = zod.object({
1773
+ tool_ids: zod.array(
1774
+ zod.string().uuid().regex(deleteToolsFromAgentBodyToolIdsItemRegExp)
1775
+ )
1776
+ });
1777
+ var DeleteToolsFromAgentResponse = zod.object({
1778
+ agent: zod.object({
1779
+ id: zod.string(),
1780
+ tenant_id: zod.string(),
1781
+ agent_name: zod.string(),
1782
+ direction: zod.enum(["INBOUND", "OUTBOUND"]),
1783
+ llm_model: zod.enum([
1784
+ "GPT4.1",
1785
+ "AZURE-GPT4o",
1786
+ "AZURE-GPT4.1",
1787
+ "GPT-5",
1788
+ "GPT-5-low",
1789
+ "GPT-5-high",
1790
+ "GPT-5.1-chat-latest",
1791
+ "GPT-5.1-no-reasoning",
1792
+ "GEMINI-1.5-flash",
1793
+ "GEMINI-2.5-flash",
1794
+ "GEMINI-2.5-flash-lite",
1795
+ "GEMINI-3-flash",
1796
+ "CLAUDE-sonnet-4.6",
1797
+ "CLAUDE-haiku-4.5"
1798
+ ]),
1799
+ tts_provider: zod.enum(["elevenlabs", "cartesia", "google"]),
1800
+ tts_model: zod.enum([
1801
+ "eleven_flash_v2_5",
1802
+ "eleven_turbo_v2_5",
1803
+ "sonic-3",
1804
+ "chirp_3"
1805
+ ]),
1806
+ language: zod.enum(["en-US", "de-DE"]),
1807
+ tts_voice_id: zod.string().describe("Voice ID from the TTS provider"),
1808
+ stt_model: zod.enum([
1809
+ "DEEPGRAM-NOVA-2-GENERAL",
1810
+ "DEEPGRAM-NOVA-3-GENERAL",
1811
+ "AWS-TRANSCRIBE",
1812
+ "ELEVENLABS-SCRIBE-V2-REALTIME"
1813
+ ]),
1814
+ transfer_phone_number: zod.union([zod.string(), zod.null()]),
1815
+ background_sounds: zod.enum(["enabled", "disabled"]),
1816
+ created_at: zod.string().datetime({}),
1817
+ updated_at: zod.string().datetime({}),
1818
+ phone_number: zod.union([zod.string(), zod.null()]),
1819
+ dial_pad: zod.boolean(),
1820
+ end_call: zod.boolean()
1821
+ })
1822
+ });
1823
+ var GetAgentPromptParams = zod.object({
1824
+ id: zod.string().min(1)
1825
+ });
1826
+ var GetAgentPromptResponse = zod.object({
1827
+ prompt: zod.string().describe("The agent system prompt"),
1828
+ placeholders: zod.array(zod.string()).describe("Available placeholder variables")
1829
+ });
1830
+ var UpdateAgentModelsParams = zod.object({
1831
+ id: zod.string().min(1)
1832
+ });
1833
+ var UpdateAgentModelsBody = zod.object({
1834
+ llm_model: zod.enum([
1835
+ "GPT4.1",
1836
+ "AZURE-GPT4o",
1837
+ "AZURE-GPT4.1",
1838
+ "GPT-5",
1839
+ "GPT-5-low",
1840
+ "GPT-5-high",
1841
+ "GPT-5.1-chat-latest",
1842
+ "GPT-5.1-no-reasoning",
1843
+ "GEMINI-1.5-flash",
1844
+ "GEMINI-2.5-flash",
1845
+ "GEMINI-2.5-flash-lite",
1846
+ "GEMINI-3-flash",
1847
+ "CLAUDE-sonnet-4.6",
1848
+ "CLAUDE-haiku-4.5"
1849
+ ]),
1850
+ tts_provider: zod.enum(["elevenlabs", "cartesia", "google"]),
1851
+ tts_model: zod.enum([
1852
+ "eleven_flash_v2_5",
1853
+ "eleven_turbo_v2_5",
1854
+ "sonic-3",
1855
+ "chirp_3"
1856
+ ]),
1857
+ tts_voice_id: zod.union([
1858
+ zod.union([
1859
+ zod.enum(["Achernar", "Achird"]),
1860
+ zod.enum(["v3V1d2rk6528UrLKRuy8"])
1861
+ ]),
1862
+ zod.enum([
1863
+ "5c42302c-194b-4d0c-ba1a-8cb485c84ab9",
1864
+ "e8e5fffb-252c-436d-b842-8879b84445b6",
1865
+ "f786b574-daa5-4673-aa0c-cbe3e8534c02",
1866
+ "8d8ce8c9-44a4-46c4-b10f-9a927b99a853",
1867
+ "5ee9feff-1265-424a-9d7f-8e4d431a12c7",
1868
+ "b9de4a89-2257-424b-94c2-db18ba68c81a",
1869
+ "b0a1cdc7-e0d3-4d48-900d-7a936762c77b"
1870
+ ])
1871
+ ]),
1872
+ stt_model: zod.enum([
1873
+ "DEEPGRAM-NOVA-2-GENERAL",
1874
+ "DEEPGRAM-NOVA-3-GENERAL",
1875
+ "AWS-TRANSCRIBE",
1876
+ "ELEVENLABS-SCRIBE-V2-REALTIME"
1877
+ ]),
1878
+ language: zod.enum(["en-US", "de-DE"])
1879
+ });
1880
+ var UpdateAgentModelsResponse = zod.object({
1881
+ agent: zod.object({
1882
+ id: zod.string(),
1883
+ tenant_id: zod.string(),
1884
+ agent_name: zod.string(),
1885
+ direction: zod.enum(["INBOUND", "OUTBOUND"]),
1886
+ llm_model: zod.enum([
1887
+ "GPT4.1",
1888
+ "AZURE-GPT4o",
1889
+ "AZURE-GPT4.1",
1890
+ "GPT-5",
1891
+ "GPT-5-low",
1892
+ "GPT-5-high",
1893
+ "GPT-5.1-chat-latest",
1894
+ "GPT-5.1-no-reasoning",
1895
+ "GEMINI-1.5-flash",
1896
+ "GEMINI-2.5-flash",
1897
+ "GEMINI-2.5-flash-lite",
1898
+ "GEMINI-3-flash",
1899
+ "CLAUDE-sonnet-4.6",
1900
+ "CLAUDE-haiku-4.5"
1901
+ ]),
1902
+ tts_provider: zod.enum(["elevenlabs", "cartesia", "google"]),
1903
+ tts_model: zod.enum([
1904
+ "eleven_flash_v2_5",
1905
+ "eleven_turbo_v2_5",
1906
+ "sonic-3",
1907
+ "chirp_3"
1908
+ ]),
1909
+ language: zod.enum(["en-US", "de-DE"]),
1910
+ tts_voice_id: zod.string().describe("Voice ID from the TTS provider"),
1911
+ stt_model: zod.enum([
1912
+ "DEEPGRAM-NOVA-2-GENERAL",
1913
+ "DEEPGRAM-NOVA-3-GENERAL",
1914
+ "AWS-TRANSCRIBE",
1915
+ "ELEVENLABS-SCRIBE-V2-REALTIME"
1916
+ ]),
1917
+ transfer_phone_number: zod.union([zod.string(), zod.null()]),
1918
+ background_sounds: zod.enum(["enabled", "disabled"]),
1919
+ created_at: zod.string().datetime({}),
1920
+ updated_at: zod.string().datetime({}),
1921
+ phone_number: zod.union([zod.string(), zod.null()]),
1922
+ dial_pad: zod.boolean(),
1923
+ end_call: zod.boolean()
1924
+ })
1925
+ });
1926
+ var updateCallControlsPathIdRegExp = new RegExp(
1927
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
1928
+ );
1929
+ var UpdateCallControlsParams = zod.object({
1930
+ id: zod.string().uuid().regex(updateCallControlsPathIdRegExp)
1931
+ });
1932
+ var UpdateCallControlsBody = zod.object({
1933
+ dial_pad: zod.boolean().optional(),
1934
+ end_call: zod.boolean().optional(),
1935
+ transfer_phone_number: zod.union([zod.string(), zod.null()]).optional()
1936
+ });
1937
+ var UpdateCallControlsResponse = zod.object({
1938
+ agent: zod.object({
1939
+ id: zod.string(),
1940
+ tenant_id: zod.string(),
1941
+ agent_name: zod.string(),
1942
+ direction: zod.enum(["INBOUND", "OUTBOUND"]),
1943
+ llm_model: zod.enum([
1944
+ "GPT4.1",
1945
+ "AZURE-GPT4o",
1946
+ "AZURE-GPT4.1",
1947
+ "GPT-5",
1948
+ "GPT-5-low",
1949
+ "GPT-5-high",
1950
+ "GPT-5.1-chat-latest",
1951
+ "GPT-5.1-no-reasoning",
1952
+ "GEMINI-1.5-flash",
1953
+ "GEMINI-2.5-flash",
1954
+ "GEMINI-2.5-flash-lite",
1955
+ "GEMINI-3-flash",
1956
+ "CLAUDE-sonnet-4.6",
1957
+ "CLAUDE-haiku-4.5"
1958
+ ]),
1959
+ tts_provider: zod.enum(["elevenlabs", "cartesia", "google"]),
1960
+ tts_model: zod.enum([
1961
+ "eleven_flash_v2_5",
1962
+ "eleven_turbo_v2_5",
1963
+ "sonic-3",
1964
+ "chirp_3"
1965
+ ]),
1966
+ language: zod.enum(["en-US", "de-DE"]),
1967
+ tts_voice_id: zod.string().describe("Voice ID from the TTS provider"),
1968
+ stt_model: zod.enum([
1969
+ "DEEPGRAM-NOVA-2-GENERAL",
1970
+ "DEEPGRAM-NOVA-3-GENERAL",
1971
+ "AWS-TRANSCRIBE",
1972
+ "ELEVENLABS-SCRIBE-V2-REALTIME"
1973
+ ]),
1974
+ transfer_phone_number: zod.union([zod.string(), zod.null()]),
1975
+ background_sounds: zod.enum(["enabled", "disabled"]),
1976
+ created_at: zod.string().datetime({}),
1977
+ updated_at: zod.string().datetime({}),
1978
+ phone_number: zod.union([zod.string(), zod.null()]),
1979
+ dial_pad: zod.boolean(),
1980
+ end_call: zod.boolean()
1981
+ })
1982
+ });
1983
+ var scheduleJobPathIdRegExp = new RegExp(
1984
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
1985
+ );
1986
+ var ScheduleJobParams = zod.object({
1987
+ id: zod.string().uuid().regex(scheduleJobPathIdRegExp)
1988
+ });
1989
+ var scheduleJobBodyScheduleWindowMinutesMin = 10;
1990
+ var scheduleJobBodyScheduleWindowMinutesMax = 9007199254740991;
1991
+ var scheduleJobBodyPayloadDefault = {};
1992
+ var scheduleJobBodyTriggerImmediatelyDefault = false;
1993
+ var ScheduleJobBody = zod.object({
1994
+ scheduled_at: zod.string(),
1995
+ schedule_window_minutes: zod.number().min(scheduleJobBodyScheduleWindowMinutesMin).max(scheduleJobBodyScheduleWindowMinutesMax).optional(),
1996
+ destination_phone_number: zod.string(),
1997
+ payload: zod.record(zod.string(), zod.unknown()).default(scheduleJobBodyPayloadDefault),
1998
+ metadata: zod.record(zod.string(), zod.unknown()).optional(),
1999
+ trigger_immediately: zod.boolean().default(scheduleJobBodyTriggerImmediatelyDefault)
2000
+ });
2001
+ var ScheduleJobResponse = zod.object({
2002
+ id: zod.string(),
2003
+ agent_id: zod.string(),
2004
+ tenant_id: zod.string(),
2005
+ scheduled_at: zod.string().datetime({}),
2006
+ schedule_window_minutes: zod.number(),
2007
+ destination_phone_number: zod.string(),
2008
+ payload: zod.record(zod.string(), zod.unknown()),
2009
+ metadata: zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]),
2010
+ status: zod.enum([
2011
+ "pending",
2012
+ "queued",
2013
+ "in_progress",
2014
+ "completed",
2015
+ "canceled"
2016
+ ]),
2017
+ created_at: zod.string().datetime({})
2018
+ });
2019
+ var listJobsQueryAgentRegExp = new RegExp(
2020
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2021
+ );
2022
+ var listJobsQueryCountDefault = 50;
2023
+ var listJobsQueryCountMax = 100;
2024
+ var listJobsQueryOffsetDefault = 0;
2025
+ var listJobsQueryOffsetMin = 0;
2026
+ var listJobsQueryOffsetMax = 9007199254740991;
2027
+ var ListJobsQueryParams = zod.object({
2028
+ agent: zod.string().uuid().regex(listJobsQueryAgentRegExp).optional(),
2029
+ count: zod.number().min(1).max(listJobsQueryCountMax).default(listJobsQueryCountDefault),
2030
+ offset: zod.number().min(listJobsQueryOffsetMin).max(listJobsQueryOffsetMax).default(listJobsQueryOffsetDefault),
2031
+ status: zod.array(
2032
+ zod.enum(["pending", "queued", "in_progress", "completed", "canceled"])
2033
+ ),
2034
+ scheduled_after: zod.string().datetime({}).optional(),
2035
+ scheduled_before: zod.string().datetime({}).optional()
2036
+ });
2037
+ var ListJobsResponseItem = zod.object({
2038
+ id: zod.string(),
2039
+ agent_id: zod.string(),
2040
+ tenant_id: zod.string(),
2041
+ scheduled_at: zod.string().datetime({}),
2042
+ schedule_window_minutes: zod.number(),
2043
+ destination_phone_number: zod.string(),
2044
+ payload: zod.record(zod.string(), zod.unknown()),
2045
+ metadata: zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]),
2046
+ status: zod.enum([
2047
+ "pending",
2048
+ "queued",
2049
+ "in_progress",
2050
+ "completed",
2051
+ "canceled"
2052
+ ]),
2053
+ created_at: zod.string().datetime({})
2054
+ });
2055
+ var ListJobsResponse = zod.array(ListJobsResponseItem);
2056
+ var CancelJobParams = zod.object({
2057
+ id: zod.string().min(1)
2058
+ });
2059
+ var CancelJobResponse = zod.object({
2060
+ id: zod.string(),
2061
+ agent_id: zod.string(),
2062
+ tenant_id: zod.string(),
2063
+ scheduled_at: zod.string().datetime({}),
2064
+ schedule_window_minutes: zod.number(),
2065
+ destination_phone_number: zod.string(),
2066
+ payload: zod.record(zod.string(), zod.unknown()),
2067
+ metadata: zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]),
2068
+ status: zod.enum([
2069
+ "pending",
2070
+ "queued",
2071
+ "in_progress",
2072
+ "completed",
2073
+ "canceled"
2074
+ ]),
2075
+ created_at: zod.string().datetime({})
2076
+ });
2077
+ var ListApiKeysQueryParams = zod.object({
2078
+ include_revoked: zod.enum(["true", "false"]).optional().describe("Include revoked keys in the response")
2079
+ });
2080
+ var ListApiKeysResponse = zod.object({
2081
+ data: zod.array(
2082
+ zod.object({
2083
+ id: zod.string().describe("Unique identifier for the API key"),
2084
+ name: zod.string().describe("Human-readable name for the API key"),
2085
+ key_prefix: zod.string().describe("First 12 characters of the key (e.g. ak_live_abc1)"),
2086
+ last_used_at: zod.string().datetime({}).optional().describe("Last usage timestamp, if ever used"),
2087
+ expires_at: zod.string().datetime({}).optional().describe("Expiration date, if set"),
2088
+ revoked_at: zod.string().datetime({}).optional().describe("Revocation timestamp, if revoked"),
2089
+ created_at: zod.string().datetime({}).describe("Creation timestamp"),
2090
+ updated_at: zod.string().datetime({}).describe("Last update timestamp")
2091
+ })
2092
+ ),
2093
+ count: zod.number().describe("Total number of keys returned")
2094
+ });
2095
+ var createApiKeyBodyNameMax = 100;
2096
+ var createApiKeyBodyEnvironmentDefault = `live`;
2097
+ var CreateApiKeyBody = zod.object({
2098
+ name: zod.string().min(1).max(createApiKeyBodyNameMax).describe("Human-readable name for the API key"),
2099
+ expires_at: zod.string().datetime({}).optional().describe("Optional expiration date (ISO 8601)"),
2100
+ environment: zod.enum(["test", "live"]).default(createApiKeyBodyEnvironmentDefault).describe("Target environment for the key")
2101
+ });
2102
+ var revokeApiKeyPathIdRegExp = new RegExp(
2103
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2104
+ );
2105
+ var RevokeApiKeyParams = zod.object({
2106
+ id: zod.string().uuid().regex(revokeApiKeyPathIdRegExp).describe("The API key ID to revoke")
2107
+ });
2108
+ var RevokeApiKeyResponse = zod.object({
2109
+ message: zod.string().describe("Confirmation message")
2110
+ });
2111
+ var createArtifactBodyFileBase64Max = 9e6;
2112
+ var CreateArtifactBody = zod.object({
2113
+ document_name: zod.string().min(1),
2114
+ file_base64: zod.string().min(1).max(createArtifactBodyFileBase64Max),
2115
+ processing_options: zod.object({
2116
+ file_password: zod.string().optional(),
2117
+ file_splitting_enabled: zod.boolean().optional()
2118
+ }).optional(),
2119
+ created_at_document: zod.string().datetime({}).optional(),
2120
+ metadata: zod.record(zod.string(), zod.unknown()).optional()
2121
+ });
2122
+ var CreateArtifactResponseItem = zod.object({
2123
+ artifact_id: zod.string(),
2124
+ message_id: zod.string().describe("Processing message identifier"),
2125
+ status: zod.string()
2126
+ });
2127
+ var CreateArtifactResponse = zod.array(CreateArtifactResponseItem);
2128
+ var listArtifactsQueryCountDefault = 50;
2129
+ var listArtifactsQueryCountMax = 100;
2130
+ var listArtifactsQueryOffsetDefault = 0;
2131
+ var listArtifactsQueryOffsetMin = 0;
2132
+ var listArtifactsQuerySortByDefault = `created_at`;
2133
+ var listArtifactsQuerySortOrderDefault = `desc`;
2134
+ var ListArtifactsQueryParams = zod.object({
2135
+ count: zod.number().min(1).max(listArtifactsQueryCountMax).default(listArtifactsQueryCountDefault),
2136
+ offset: zod.number().min(listArtifactsQueryOffsetMin).default(listArtifactsQueryOffsetDefault),
2137
+ sort_by: zod.enum(["created_at", "updated_at", "document_name"]).default(listArtifactsQuerySortByDefault),
2138
+ sort_order: zod.enum(["asc", "desc"]).default(listArtifactsQuerySortOrderDefault),
2139
+ document_name_query: zod.string().optional(),
2140
+ created_after: zod.string().datetime({}).optional(),
2141
+ created_before: zod.string().datetime({}).optional()
2142
+ });
2143
+ var ListArtifactsResponseItem = zod.object({
2144
+ id: zod.string(),
2145
+ document_name: zod.string(),
2146
+ metadata: zod.record(zod.string(), zod.unknown()),
2147
+ created_at: zod.string().datetime({}),
2148
+ created_at_document: zod.union([zod.string(), zod.null()]),
2149
+ updated_at: zod.string().datetime({}),
2150
+ has_content: zod.boolean()
2151
+ });
2152
+ var ListArtifactsResponse = zod.array(ListArtifactsResponseItem);
2153
+ var GetArtifactParams = zod.object({
2154
+ id: zod.string().min(1)
2155
+ });
2156
+ var GetArtifactResponse = zod.object({
2157
+ data: zod.object({
2158
+ id: zod.string(),
2159
+ document_name: zod.string(),
2160
+ file_url: zod.union([zod.string(), zod.null()]),
2161
+ metadata: zod.record(zod.string(), zod.unknown()),
2162
+ created_at: zod.string().datetime({}),
2163
+ created_at_document: zod.union([zod.string(), zod.null()]),
2164
+ updated_at: zod.string().datetime({}),
2165
+ content_md: zod.union([zod.string(), zod.null()])
2166
+ })
2167
+ });
2168
+ var getArtifactMetadataKeysQueryLimitDefault = 100;
2169
+ var getArtifactMetadataKeysQueryLimitMax = 500;
2170
+ var GetArtifactMetadataKeysQueryParams = zod.object({
2171
+ limit: zod.number().min(1).max(getArtifactMetadataKeysQueryLimitMax).default(getArtifactMetadataKeysQueryLimitDefault)
2172
+ });
2173
+ var GetArtifactMetadataKeysResponse = zod.object({
2174
+ data: zod.object({
2175
+ keys: zod.array(zod.string()),
2176
+ values: zod.record(zod.string(), zod.array(zod.unknown()))
2177
+ })
2178
+ });
2179
+ var signUpBodyEmailRegExp = new RegExp(
2180
+ "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
2181
+ );
2182
+ var SignUpBody = zod.object({
2183
+ email: zod.string().email().regex(signUpBodyEmailRegExp),
2184
+ password: zod.string()
2185
+ });
2186
+ var SignUpResponse = zod.object({});
2187
+ var signInBodyThreeEmailRegExp = new RegExp(
2188
+ "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
2189
+ );
2190
+ var SignInBody = zod.union([
2191
+ zod.object({
2192
+ type: zod.literal("password"),
2193
+ email: zod.string(),
2194
+ password: zod.string()
2195
+ }),
2196
+ zod.object({
2197
+ type: zod.literal("oauth"),
2198
+ code: zod.string(),
2199
+ verifier: zod.string()
2200
+ }),
2201
+ zod.object({
2202
+ type: zod.literal("email_otp"),
2203
+ email: zod.string().email().regex(signInBodyThreeEmailRegExp),
2204
+ token: zod.string().min(1)
2205
+ })
2206
+ ]);
2207
+ var SignInResponse = zod.object({
2208
+ access_token: zod.string(),
2209
+ refresh_token: zod.string(),
2210
+ expires_at: zod.string().datetime({})
2211
+ });
2212
+ var RefreshTokenBody = zod.object({
2213
+ access_token: zod.string(),
2214
+ refresh_token: zod.string()
2215
+ });
2216
+ var RefreshTokenResponse = zod.object({
2217
+ access_token: zod.string(),
2218
+ refresh_token: zod.string(),
2219
+ expires_at: zod.string().datetime({})
2220
+ });
2221
+ var GetOAuthUrlQueryParams = zod.object({
2222
+ provider: zod.enum(["google", "microsoft"]),
2223
+ redirect_uri: zod.string().url(),
2224
+ code_challenge_method: zod.enum(["plain", "s256"]),
2225
+ code_challenge: zod.string().min(1)
2226
+ });
2227
+ var GetOAuthUrlResponse = zod.object({
2228
+ url: zod.string().url()
2229
+ });
2230
+ var listCallsQueryCountDefault = 50;
2231
+ var listCallsQueryCountMax = 100;
2232
+ var listCallsQueryOffsetDefault = 0;
2233
+ var listCallsQueryOffsetMin = 0;
2234
+ var listCallsQuerySortByDefault = `started_at`;
2235
+ var listCallsQuerySortOrderDefault = `desc`;
2236
+ var listCallsQueryCallIdRegExp = new RegExp(
2237
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2238
+ );
2239
+ var listCallsQueryAgentIdRegExp = new RegExp(
2240
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2241
+ );
2242
+ var listCallsQueryJobIdRegExp = new RegExp(
2243
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2244
+ );
2245
+ var ListCallsQueryParams = zod.object({
2246
+ count: zod.number().min(1).max(listCallsQueryCountMax).default(listCallsQueryCountDefault),
2247
+ offset: zod.number().min(listCallsQueryOffsetMin).default(listCallsQueryOffsetDefault),
2248
+ sort_by: zod.enum(["started_at", "ended_at", "created_at"]).default(listCallsQuerySortByDefault),
2249
+ sort_order: zod.enum(["asc", "desc"]).default(listCallsQuerySortOrderDefault),
2250
+ call_id: zod.string().uuid().regex(listCallsQueryCallIdRegExp).optional(),
2251
+ agent_id: zod.string().uuid().regex(listCallsQueryAgentIdRegExp).optional(),
2252
+ agent_name: zod.string().min(1).optional(),
2253
+ job_id: zod.string().uuid().regex(listCallsQueryJobIdRegExp).optional(),
2254
+ direction: zod.enum(["INBOUND", "OUTBOUND"]).optional(),
2255
+ status: zod.enum(["COMPLETED", "TRANSFERRED", "DISCONNECTED", "UNEXPECTED_SHUTDOWN"]).optional(),
2256
+ started_after: zod.string().datetime({}).optional(),
2257
+ started_before: zod.string().datetime({}).optional(),
2258
+ phone_number: zod.string().min(1).optional()
2259
+ });
2260
+ var ListCallsResponseItem = zod.object({
2261
+ id: zod.string(),
2262
+ external_call_id: zod.union([zod.string(), zod.null()]),
2263
+ direction: zod.enum(["INBOUND", "OUTBOUND"]),
2264
+ agent_id: zod.string(),
2265
+ job_id: zod.union([zod.string(), zod.null()]),
2266
+ from_phone_number: zod.union([zod.string(), zod.null()]),
2267
+ to_phone_number: zod.union([zod.string(), zod.null()]),
2268
+ started_at: zod.string().datetime({}),
2269
+ ended_at: zod.string().datetime({}),
2270
+ duration_seconds: zod.union([zod.number(), zod.null()]),
2271
+ completion_status: zod.union([
2272
+ zod.string().describe("Call completion status"),
2273
+ zod.null()
2274
+ ]),
2275
+ termination_initiator: zod.union([zod.string(), zod.null()]),
2276
+ disconnect_reason: zod.union([zod.string(), zod.null()]),
2277
+ ended_reason: zod.string(),
2278
+ metadata: zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]),
2279
+ evaluation: zod.union([
2280
+ zod.object({
2281
+ status: zod.string(),
2282
+ score: zod.union([zod.number(), zod.null()]),
2283
+ passed: zod.union([zod.boolean(), zod.null()])
2284
+ }),
2285
+ zod.null()
2286
+ ]),
2287
+ created_at: zod.string().datetime({})
2288
+ });
2289
+ var ListCallsResponse = zod.array(ListCallsResponseItem);
2290
+ var getCallPathIdRegExp = new RegExp(
2291
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2292
+ );
2293
+ var GetCallParams = zod.object({
2294
+ id: zod.string().uuid().regex(getCallPathIdRegExp)
2295
+ });
2296
+ var GetCallQueryParams = zod.object({
2297
+ include_messages: zod.string().optional()
2298
+ });
2299
+ var GetCallResponse = zod.object({
2300
+ id: zod.string(),
2301
+ external_call_id: zod.union([zod.string(), zod.null()]),
2302
+ direction: zod.enum(["INBOUND", "OUTBOUND"]),
2303
+ agent_id: zod.string(),
2304
+ job_id: zod.union([zod.string(), zod.null()]),
2305
+ from_phone_number: zod.union([zod.string(), zod.null()]),
2306
+ to_phone_number: zod.union([zod.string(), zod.null()]),
2307
+ started_at: zod.string().datetime({}),
2308
+ ended_at: zod.string().datetime({}),
2309
+ duration_seconds: zod.union([zod.number(), zod.null()]),
2310
+ completion_status: zod.union([
2311
+ zod.string().describe("Call completion status"),
2312
+ zod.null()
2313
+ ]),
2314
+ termination_initiator: zod.union([zod.string(), zod.null()]),
2315
+ disconnect_reason: zod.union([zod.string(), zod.null()]),
2316
+ ended_reason: zod.string(),
2317
+ file_url: zod.union([zod.string(), zod.null()]),
2318
+ metadata: zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]),
2319
+ evaluation: zod.union([
2320
+ zod.object({
2321
+ status: zod.string(),
2322
+ score: zod.union([zod.number(), zod.null()]),
2323
+ passed: zod.union([zod.boolean(), zod.null()])
2324
+ }),
2325
+ zod.null()
2326
+ ]),
2327
+ created_at: zod.string().datetime({}),
2328
+ messages: zod.union([
2329
+ zod.array(
2330
+ zod.object({
2331
+ id: zod.string(),
2332
+ message_type: zod.string(),
2333
+ sequence_number: zod.number(),
2334
+ timestamp_seconds: zod.number(),
2335
+ occurred_at: zod.string(),
2336
+ role: zod.union([zod.string(), zod.null()]),
2337
+ message_text: zod.union([zod.string(), zod.null()]),
2338
+ tool_call_id: zod.union([zod.string(), zod.null()]),
2339
+ tool_name: zod.union([zod.string(), zod.null()]),
2340
+ tool_arguments: zod.union([
2341
+ zod.record(zod.string(), zod.unknown()),
2342
+ zod.null()
2343
+ ]),
2344
+ tool_result: zod.union([
2345
+ zod.record(zod.string(), zod.unknown()),
2346
+ zod.null()
2347
+ ]),
2348
+ metadata: zod.union([
2349
+ zod.record(zod.string(), zod.unknown()),
2350
+ zod.null()
2351
+ ])
2352
+ })
2353
+ ),
2354
+ zod.null()
2355
+ ])
2356
+ });
2357
+ var getCallEvaluationPathIdRegExp = new RegExp(
2358
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2359
+ );
2360
+ var GetCallEvaluationParams = zod.object({
2361
+ id: zod.string().uuid().regex(getCallEvaluationPathIdRegExp)
2362
+ });
2363
+ var GetCallEvaluationResponse = zod.object({
2364
+ id: zod.string(),
2365
+ evaluation_status: zod.union([
2366
+ zod.string().describe("Evaluation status"),
2367
+ zod.null()
2368
+ ]),
2369
+ score: zod.union([zod.number(), zod.null()]),
2370
+ passed: zod.union([zod.boolean(), zod.null()]),
2371
+ metrics: zod.array(
2372
+ zod.object({
2373
+ slug: zod.string(),
2374
+ name: zod.string(),
2375
+ question: zod.string(),
2376
+ pass: zod.union([zod.boolean(), zod.null()]),
2377
+ score: zod.union([zod.number(), zod.null()]),
2378
+ explanation: zod.union([zod.string(), zod.null()])
2379
+ })
2380
+ )
2381
+ });
2382
+ var getCallAnalyticsQueryTimezoneDefault = `UTC`;
2383
+ var GetCallAnalyticsQueryParams = zod.object({
2384
+ from: zod.string(),
2385
+ to: zod.string(),
2386
+ timezone: zod.string().default(getCallAnalyticsQueryTimezoneDefault)
2387
+ });
2388
+ var GetCallAnalyticsResponse = zod.object({
2389
+ summary: zod.object({
2390
+ total_calls: zod.number(),
2391
+ avg_evaluation_score: zod.number(),
2392
+ pass_rate: zod.number(),
2393
+ avg_call_duration: zod.number()
2394
+ }),
2395
+ calls_over_time: zod.array(
2396
+ zod.object({
2397
+ date: zod.string(),
2398
+ calls: zod.number()
2399
+ })
2400
+ ),
2401
+ evaluation_over_time: zod.array(
2402
+ zod.object({
2403
+ date: zod.string(),
2404
+ avg_score: zod.number()
2405
+ })
2406
+ ),
2407
+ score_distribution: zod.array(
2408
+ zod.object({
2409
+ label: zod.string(),
2410
+ count: zod.number()
2411
+ })
2412
+ ),
2413
+ duration_distribution: zod.array(
2414
+ zod.object({
2415
+ label: zod.string(),
2416
+ count: zod.number()
2417
+ })
2418
+ ),
2419
+ metric_performance: zod.array(
2420
+ zod.object({
2421
+ slug: zod.string(),
2422
+ title: zod.string(),
2423
+ avg_score: zod.number(),
2424
+ pass_rate: zod.number(),
2425
+ evaluated: zod.number()
2426
+ })
2427
+ )
2428
+ });
2429
+ var createCallFeedbackPathIdRegExp = new RegExp(
2430
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2431
+ );
2432
+ var CreateCallFeedbackParams = zod.object({
2433
+ id: zod.string().uuid().regex(createCallFeedbackPathIdRegExp).describe("The call ID")
2434
+ });
2435
+ var createCallFeedbackBodyMessageIdRegExp = new RegExp(
2436
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2437
+ );
2438
+ var createCallFeedbackBodyTextMax = 1e4;
2439
+ var CreateCallFeedbackBody = zod.object({
2440
+ message_id: zod.string().uuid().regex(createCallFeedbackBodyMessageIdRegExp).describe("The message ID to attach feedback to"),
2441
+ text: zod.string().min(1).max(createCallFeedbackBodyTextMax).describe("Feedback content")
2442
+ });
2443
+ var listCallFeedbackPathIdRegExp = new RegExp(
2444
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2445
+ );
2446
+ var ListCallFeedbackParams = zod.object({
2447
+ id: zod.string().uuid().regex(listCallFeedbackPathIdRegExp).describe("The call ID")
2448
+ });
2449
+ var listCallFeedbackQueryCountDefault = 50;
2450
+ var listCallFeedbackQueryCountMax = 100;
2451
+ var listCallFeedbackQueryOffsetDefault = 0;
2452
+ var listCallFeedbackQueryOffsetMin = 0;
2453
+ var listCallFeedbackQuerySortByDefault = `created_at`;
2454
+ var listCallFeedbackQuerySortOrderDefault = `asc`;
2455
+ var ListCallFeedbackQueryParams = zod.object({
2456
+ count: zod.number().min(1).max(listCallFeedbackQueryCountMax).default(listCallFeedbackQueryCountDefault),
2457
+ offset: zod.number().min(listCallFeedbackQueryOffsetMin).default(listCallFeedbackQueryOffsetDefault),
2458
+ sort_by: zod.enum(["created_at"]).default(listCallFeedbackQuerySortByDefault),
2459
+ sort_order: zod.enum(["asc", "desc"]).default(listCallFeedbackQuerySortOrderDefault)
2460
+ });
2461
+ var listCallFeedbackResponseIdRegExp = new RegExp(
2462
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2463
+ );
2464
+ var listCallFeedbackResponseCallIdRegExp = new RegExp(
2465
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2466
+ );
2467
+ var listCallFeedbackResponseMessageIdRegExp = new RegExp(
2468
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2469
+ );
2470
+ var ListCallFeedbackResponseItem = zod.object({
2471
+ id: zod.string().uuid().regex(listCallFeedbackResponseIdRegExp),
2472
+ call_id: zod.string().uuid().regex(listCallFeedbackResponseCallIdRegExp),
2473
+ message_id: zod.string().uuid().regex(listCallFeedbackResponseMessageIdRegExp),
2474
+ author_email: zod.string(),
2475
+ text: zod.string(),
2476
+ created_at: zod.string().datetime({}),
2477
+ updated_at: zod.string().datetime({})
2478
+ });
2479
+ var ListCallFeedbackResponse = zod.array(ListCallFeedbackResponseItem);
2480
+ var deleteCallFeedbackPathIdRegExp = new RegExp(
2481
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2482
+ );
2483
+ var deleteCallFeedbackPathFeedbackIdRegExp = new RegExp(
2484
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2485
+ );
2486
+ var DeleteCallFeedbackParams = zod.object({
2487
+ id: zod.string().uuid().regex(deleteCallFeedbackPathIdRegExp).describe("The call ID"),
2488
+ feedbackId: zod.string().uuid().regex(deleteCallFeedbackPathFeedbackIdRegExp).describe("The feedback ID to delete")
2489
+ });
2490
+ var DeleteCallFeedbackResponse = zod.null();
2491
+ var CreateClaimResponse = zod.object({
2492
+ claim_id: zod.string(),
2493
+ created_at: zod.string().datetime({})
2494
+ });
2495
+ var listClaimsQueryCountDefault = 20;
2496
+ var listClaimsQueryCountMax = 100;
2497
+ var listClaimsQueryOffsetDefault = 0;
2498
+ var listClaimsQueryOffsetMin = 0;
2499
+ var listClaimsQuerySortByDefault = `created_at`;
2500
+ var listClaimsQuerySortOrderDefault = `desc`;
2501
+ var ListClaimsQueryParams = zod.object({
2502
+ count: zod.number().min(1).max(listClaimsQueryCountMax).default(listClaimsQueryCountDefault),
2503
+ offset: zod.number().min(listClaimsQueryOffsetMin).default(listClaimsQueryOffsetDefault),
2504
+ sort_by: zod.enum(["created_at"]).default(listClaimsQuerySortByDefault),
2505
+ sort_order: zod.enum(["asc", "desc"]).default(listClaimsQuerySortOrderDefault)
2506
+ });
2507
+ var ListClaimsResponse = zod.object({
2508
+ claims: zod.array(
2509
+ zod.object({
2510
+ id: zod.string(),
2511
+ created_at: zod.string().datetime({}),
2512
+ latest_source: zod.union([zod.unknown(), zod.null()]),
2513
+ job_status: zod.union([
2514
+ zod.string().describe("Extractor job status"),
2515
+ zod.null()
2516
+ ])
2517
+ })
2518
+ ),
2519
+ total: zod.number().describe("do not use. use the property in the meta object instead.")
2520
+ });
2521
+ var GetClaimDetailParams = zod.object({
2522
+ id: zod.string().min(1)
2523
+ });
2524
+ var GetClaimDetailResponse = zod.object({
2525
+ claim: zod.object({
2526
+ id: zod.string(),
2527
+ created_at: zod.string().datetime({}),
2528
+ updated_at: zod.string().datetime({})
2529
+ }),
2530
+ sources: zod.array(
2531
+ zod.object({
2532
+ type: zod.string(),
2533
+ direction: zod.string(),
2534
+ id: zod.string(),
2535
+ from: zod.string(),
2536
+ to: zod.array(zod.string()),
2537
+ subject: zod.union([zod.string(), zod.null()]),
2538
+ body_html: zod.union([zod.string(), zod.null()]),
2539
+ received_at: zod.string()
2540
+ })
2541
+ ),
2542
+ artifacts: zod.array(
2543
+ zod.object({
2544
+ id: zod.string(),
2545
+ document_name: zod.string(),
2546
+ created_at: zod.string().datetime({})
2547
+ })
2548
+ ),
2549
+ extractor_job: zod.union([
2550
+ zod.object({
2551
+ id: zod.string(),
2552
+ status: zod.string(),
2553
+ extract_id: zod.union([zod.string(), zod.null()])
2554
+ }),
2555
+ zod.null()
2556
+ ]),
2557
+ extract: zod.union([zod.unknown(), zod.null()])
2558
+ });
2559
+ var CheckEmailUsernameAvailabilityQueryParams = zod.object({
2560
+ username: zod.string().describe("Email username")
2561
+ });
2562
+ var CheckEmailUsernameAvailabilityResponse = zod.object({
2563
+ available: zod.boolean().describe("Whether the username is available")
2564
+ });
2565
+ var createEmailAgentBodyNameMax = 256;
2566
+ var createEmailAgentBodyExtractorIdRegExp = new RegExp(
2567
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2568
+ );
2569
+ var createEmailAgentBodyAttachmentPasswordOneMax = 2048;
2570
+ var CreateEmailAgentBody = zod.object({
2571
+ name: zod.string().min(1).max(createEmailAgentBodyNameMax),
2572
+ extractor_id: zod.string().uuid().regex(createEmailAgentBodyExtractorIdRegExp),
2573
+ attachment_password: zod.union([
2574
+ zod.string().max(createEmailAgentBodyAttachmentPasswordOneMax),
2575
+ zod.null()
2576
+ ]).optional(),
2577
+ pdf_splitting_enabled: zod.boolean().optional(),
2578
+ username: zod.string().optional().describe("Email username")
2579
+ });
2580
+ var CreateEmailAgentResponse = zod.object({
2581
+ id: zod.string(),
2582
+ name: zod.string(),
2583
+ email_address: zod.string(),
2584
+ extractor_id: zod.string(),
2585
+ has_password: zod.boolean(),
2586
+ pdf_splitting_enabled: zod.boolean(),
2587
+ created_at: zod.string().datetime({}),
2588
+ updated_at: zod.string().datetime({})
2589
+ });
2590
+ var listEmailAgentsQueryCountDefault = 50;
2591
+ var listEmailAgentsQueryCountMax = 100;
2592
+ var listEmailAgentsQueryOffsetDefault = 0;
2593
+ var listEmailAgentsQueryOffsetMin = 0;
2594
+ var listEmailAgentsQuerySortByDefault = `created_at`;
2595
+ var listEmailAgentsQuerySortOrderDefault = `desc`;
2596
+ var ListEmailAgentsQueryParams = zod.object({
2597
+ count: zod.number().min(1).max(listEmailAgentsQueryCountMax).default(listEmailAgentsQueryCountDefault),
2598
+ offset: zod.number().min(listEmailAgentsQueryOffsetMin).default(listEmailAgentsQueryOffsetDefault),
2599
+ sort_by: zod.enum(["created_at"]).default(listEmailAgentsQuerySortByDefault),
2600
+ sort_order: zod.enum(["asc", "desc"]).default(listEmailAgentsQuerySortOrderDefault)
2601
+ });
2602
+ var ListEmailAgentsResponseItem = zod.object({
2603
+ id: zod.string(),
2604
+ name: zod.string(),
2605
+ email_address: zod.string(),
2606
+ extractor_id: zod.string(),
2607
+ has_password: zod.boolean(),
2608
+ pdf_splitting_enabled: zod.boolean(),
2609
+ created_at: zod.string().datetime({}),
2610
+ updated_at: zod.string().datetime({})
2611
+ });
2612
+ var ListEmailAgentsResponse = zod.array(ListEmailAgentsResponseItem);
2613
+ var updateEmailAgentPathIdRegExp = new RegExp(
2614
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2615
+ );
2616
+ var UpdateEmailAgentParams = zod.object({
2617
+ id: zod.string().uuid().regex(updateEmailAgentPathIdRegExp)
2618
+ });
2619
+ var UpdateEmailAgentBody = zod.object({
2620
+ pdf_splitting_enabled: zod.boolean().optional()
2621
+ });
2622
+ var UpdateEmailAgentResponse = zod.object({
2623
+ id: zod.string(),
2624
+ name: zod.string(),
2625
+ email_address: zod.string(),
2626
+ extractor_id: zod.string(),
2627
+ has_password: zod.boolean(),
2628
+ pdf_splitting_enabled: zod.boolean(),
2629
+ created_at: zod.string().datetime({}),
2630
+ updated_at: zod.string().datetime({})
2631
+ });
2632
+ var createEmailBodyClaimIdRegExp = new RegExp(
2633
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2634
+ );
2635
+ var createEmailBodyFromRegExp = new RegExp(
2636
+ "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
2637
+ );
2638
+ var createEmailBodyToItemRegExp = new RegExp(
2639
+ "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
2640
+ );
2641
+ var createEmailBodyCcItemRegExp = new RegExp(
2642
+ "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
2643
+ );
2644
+ var createEmailBodyBccItemRegExp = new RegExp(
2645
+ "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
2646
+ );
2647
+ var CreateEmailBody = zod.object({
2648
+ claim_id: zod.string().uuid().regex(createEmailBodyClaimIdRegExp).optional(),
2649
+ direction: zod.enum(["inbound", "outbound"]),
2650
+ from: zod.string().email().regex(createEmailBodyFromRegExp),
2651
+ to: zod.array(zod.string().email().regex(createEmailBodyToItemRegExp)).min(1),
2652
+ cc: zod.array(zod.string().email().regex(createEmailBodyCcItemRegExp)).optional(),
2653
+ bcc: zod.array(zod.string().email().regex(createEmailBodyBccItemRegExp)).optional(),
2654
+ subject: zod.string().optional(),
2655
+ body_text: zod.string().optional(),
2656
+ body_html: zod.string().optional(),
2657
+ received_at: zod.string()
2658
+ });
2659
+ var CreateEmailResponse = zod.object({
2660
+ email_id: zod.string(),
2661
+ claim_id: zod.union([zod.string(), zod.null()]),
2662
+ direction: zod.enum(["inbound", "outbound"]),
2663
+ from: zod.string(),
2664
+ to: zod.array(zod.string()),
2665
+ subject: zod.union([zod.string(), zod.null()]),
2666
+ received_at: zod.string(),
2667
+ created_at: zod.string().datetime({})
2668
+ });
2669
+ var listEmailsQueryAgentIdRegExp = new RegExp(
2670
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2671
+ );
2672
+ var listEmailsQuerySenderRegExp = new RegExp(
2673
+ "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
2674
+ );
2675
+ var listEmailsQueryRecipientRegExp = new RegExp(
2676
+ "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
2677
+ );
2678
+ var listEmailsQueryContentMax = 500;
2679
+ var listEmailsQueryCountDefault = 50;
2680
+ var listEmailsQueryCountMax = 100;
2681
+ var listEmailsQueryOffsetDefault = 0;
2682
+ var listEmailsQueryOffsetMin = 0;
2683
+ var listEmailsQuerySortByDefault = `created_at`;
2684
+ var listEmailsQuerySortOrderDefault = `desc`;
2685
+ var ListEmailsQueryParams = zod.object({
2686
+ agent_id: zod.string().uuid().regex(listEmailsQueryAgentIdRegExp).optional(),
2687
+ sender: zod.string().email().regex(listEmailsQuerySenderRegExp).optional(),
2688
+ recipient: zod.string().email().regex(listEmailsQueryRecipientRegExp).optional(),
2689
+ content: zod.string().min(1).max(listEmailsQueryContentMax).optional(),
2690
+ count: zod.number().min(1).max(listEmailsQueryCountMax).default(listEmailsQueryCountDefault),
2691
+ offset: zod.number().min(listEmailsQueryOffsetMin).default(listEmailsQueryOffsetDefault),
2692
+ sort_by: zod.enum(["created_at"]).default(listEmailsQuerySortByDefault),
2693
+ sort_order: zod.enum(["asc", "desc"]).default(listEmailsQuerySortOrderDefault)
2694
+ });
2695
+ var ListEmailsResponseItem = zod.object({
2696
+ id: zod.string(),
2697
+ email_agent_id: zod.union([zod.string(), zod.null()]),
2698
+ direction: zod.enum(["inbound", "outbound"]),
2699
+ from: zod.string(),
2700
+ to: zod.array(zod.string()),
2701
+ subject: zod.union([zod.string(), zod.null()]),
2702
+ preview: zod.union([zod.string(), zod.null()]),
2703
+ received_at: zod.string(),
2704
+ created_at: zod.string().datetime({})
2705
+ });
2706
+ var ListEmailsResponse = zod.array(ListEmailsResponseItem);
2707
+ var GetEmailParams = zod.object({
2708
+ emailId: zod.string().min(1)
2709
+ });
2710
+ var GetEmailResponse = zod.object({
2711
+ id: zod.string(),
2712
+ email_agent_id: zod.union([zod.string(), zod.null()]),
2713
+ claim_id: zod.union([zod.string(), zod.null()]),
2714
+ direction: zod.enum(["inbound", "outbound"]),
2715
+ from: zod.string(),
2716
+ to: zod.array(zod.string()),
2717
+ cc: zod.array(zod.string()),
2718
+ bcc: zod.array(zod.string()),
2719
+ subject: zod.union([zod.string(), zod.null()]),
2720
+ body_text: zod.union([zod.string(), zod.null()]),
2721
+ body_html: zod.union([zod.string(), zod.null()]),
2722
+ received_at: zod.string(),
2723
+ created_at: zod.string().datetime({})
2724
+ });
2725
+ var listExtractorJobsQueryCountDefault = 50;
2726
+ var listExtractorJobsQueryCountMax = 100;
2727
+ var listExtractorJobsQueryOffsetDefault = 0;
2728
+ var listExtractorJobsQueryOffsetMin = 0;
2729
+ var listExtractorJobsQuerySortByDefault = `created_at`;
2730
+ var listExtractorJobsQuerySortOrderDefault = `desc`;
2731
+ var listExtractorJobsQueryExtractorIdRegExp = new RegExp(
2732
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2733
+ );
2734
+ var ListExtractorJobsQueryParams = zod.object({
2735
+ count: zod.number().min(1).max(listExtractorJobsQueryCountMax).default(listExtractorJobsQueryCountDefault).describe("Number of results to return"),
2736
+ offset: zod.number().min(listExtractorJobsQueryOffsetMin).default(listExtractorJobsQueryOffsetDefault).describe("Number of results to skip for pagination"),
2737
+ sort_by: zod.enum(["created_at", "started_at", "completed_at"]).default(listExtractorJobsQuerySortByDefault).describe("Field to sort by"),
2738
+ sort_order: zod.enum(["asc", "desc"]).default(listExtractorJobsQuerySortOrderDefault).describe("Sort direction"),
2739
+ status: zod.enum(["queued", "in_progress", "completed", "failed", "canceled"]).optional().describe("Filter by job status"),
2740
+ extractor_type: zod.enum(["basic", "agentic"]).optional().describe("Filter by extractor type"),
2741
+ extractor_id: zod.string().uuid().regex(listExtractorJobsQueryExtractorIdRegExp).optional().describe("Filter by extractor ID"),
2742
+ created_after: zod.string().datetime({}).optional().describe("Filter jobs created after this date (ISO 8601)"),
2743
+ created_before: zod.string().datetime({}).optional().describe("Filter jobs created before this date (ISO 8601)")
2744
+ });
2745
+ var listExtractorJobsResponseExtractorVersionMin = -9007199254740991;
2746
+ var listExtractorJobsResponseExtractorVersionMax = 9007199254740991;
2747
+ var ListExtractorJobsResponseItem = zod.object({
2748
+ id: zod.string().describe("Unique job identifier"),
2749
+ extractor_id: zod.string().describe("ID of the extractor that created this job"),
2750
+ extractor_version: zod.number().min(listExtractorJobsResponseExtractorVersionMin).max(listExtractorJobsResponseExtractorVersionMax).describe("Version of the extractor at job creation time"),
2751
+ extractor_name: zod.string().describe("Name of the extractor"),
2752
+ extractor_type: zod.enum(["basic", "agentic"]).describe("Type of extractor"),
2753
+ status: zod.string().describe("Current job status"),
2754
+ scope: zod.record(zod.string(), zod.unknown()).describe("Job scope metadata (e.g. claim_id, email_id)"),
2755
+ created_at: zod.string().describe("ISO 8601 timestamp when the job was created"),
2756
+ started_at: zod.union([zod.string(), zod.null()]).describe("ISO 8601 timestamp when processing started"),
2757
+ completed_at: zod.union([zod.string(), zod.null()]).describe("ISO 8601 timestamp when processing finished"),
2758
+ processing_duration_ms: zod.union([zod.number(), zod.null()]).describe("Processing duration in milliseconds"),
2759
+ extract_id: zod.union([zod.string(), zod.null()]).describe("ID of the resulting extract, if completed"),
2760
+ error: zod.union([zod.string(), zod.null()])
2761
+ });
2762
+ var ListExtractorJobsResponse = zod.array(
2763
+ ListExtractorJobsResponseItem
2764
+ );
2765
+ var createExtractorJobBodyExtractorIdRegExp = new RegExp(
2766
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2767
+ );
2768
+ var CreateExtractorJobBody = zod.object({
2769
+ extractor_id: zod.string().uuid().regex(createExtractorJobBodyExtractorIdRegExp),
2770
+ scope: zod.record(
2771
+ zod.string(),
2772
+ zod.union([zod.string(), zod.number(), zod.boolean(), zod.null()])
2773
+ )
2774
+ });
2775
+ var CreateExtractorJobResponse = zod.object({
2776
+ id: zod.string(),
2777
+ extractor_id: zod.string(),
2778
+ extractor_version: zod.number(),
2779
+ scope: zod.record(zod.string(), zod.unknown()),
2780
+ status: zod.string(),
2781
+ created_at: zod.string().datetime({})
2782
+ });
2783
+ var GetExtractorJobParams = zod.object({
2784
+ id: zod.string().min(1)
2785
+ });
2786
+ var GetExtractorJobResponse = zod.object({
2787
+ data: zod.object({
2788
+ id: zod.string(),
2789
+ extractor_id: zod.string(),
2790
+ extractor_version: zod.number(),
2791
+ extractor_name: zod.string(),
2792
+ status: zod.string(),
2793
+ scope: zod.record(zod.string(), zod.unknown()),
2794
+ created_at: zod.string().datetime({}),
2795
+ started_at: zod.union([zod.string().datetime({}), zod.null()]),
2796
+ completed_at: zod.union([zod.string(), zod.null()]),
2797
+ processing_duration_ms: zod.union([zod.number(), zod.null()]),
2798
+ extract_id: zod.union([zod.string(), zod.null()]),
2799
+ error: zod.union([zod.string(), zod.null()])
2800
+ })
2801
+ });
2802
+ var CancelExtractorJobParams = zod.object({
2803
+ id: zod.string().min(1)
2804
+ });
2805
+ var CancelExtractorJobResponse = zod.object({
2806
+ id: zod.string(),
2807
+ extractor_id: zod.string(),
2808
+ extractor_version: zod.number(),
2809
+ extractor_name: zod.string(),
2810
+ status: zod.string(),
2811
+ scope: zod.record(zod.string(), zod.unknown()),
2812
+ created_at: zod.string().datetime({}),
2813
+ started_at: zod.union([zod.string().datetime({}), zod.null()]),
2814
+ completed_at: zod.union([zod.string(), zod.null()]),
2815
+ processing_duration_ms: zod.union([zod.number(), zod.null()]),
2816
+ extract_id: zod.union([zod.string(), zod.null()]),
2817
+ error: zod.union([zod.string(), zod.null()])
2818
+ });
2819
+ var CreateExtractorBody = zod.object({
2820
+ name: zod.string().min(1),
2821
+ schema: zod.record(zod.string(), zod.unknown())
2822
+ });
2823
+ var CreateExtractorResponse = zod.object({
2824
+ id: zod.string(),
2825
+ name: zod.string(),
2826
+ version: zod.number(),
2827
+ schema: zod.record(zod.string(), zod.unknown()),
2828
+ created_at: zod.string().datetime({})
2829
+ });
2830
+ var listExtractorsQueryCountDefault = 50;
2831
+ var listExtractorsQueryCountMax = 100;
2832
+ var listExtractorsQueryOffsetDefault = 0;
2833
+ var listExtractorsQueryOffsetMin = 0;
2834
+ var listExtractorsQuerySortByDefault = `created_at`;
2835
+ var listExtractorsQuerySortOrderDefault = `desc`;
2836
+ var ListExtractorsQueryParams = zod.object({
2837
+ count: zod.number().min(1).max(listExtractorsQueryCountMax).default(listExtractorsQueryCountDefault),
2838
+ offset: zod.number().min(listExtractorsQueryOffsetMin).default(listExtractorsQueryOffsetDefault),
2839
+ sort_by: zod.enum(["created_at", "name", "version"]).default(listExtractorsQuerySortByDefault),
2840
+ sort_order: zod.enum(["asc", "desc"]).default(listExtractorsQuerySortOrderDefault),
2841
+ name: zod.string().optional()
2842
+ });
2843
+ var ListExtractorsResponseItem = zod.object({
2844
+ id: zod.string(),
2845
+ name: zod.string(),
2846
+ version: zod.number(),
2847
+ created_at: zod.string().datetime({}),
2848
+ updated_at: zod.string().datetime({})
2849
+ });
2850
+ var ListExtractorsResponse = zod.array(ListExtractorsResponseItem);
2851
+ var GetExtractorParams = zod.object({
2852
+ id: zod.string().min(1)
2853
+ });
2854
+ var GetExtractorResponse = zod.object({
2855
+ data: zod.object({
2856
+ id: zod.string(),
2857
+ name: zod.string(),
2858
+ version: zod.number(),
2859
+ schema: zod.record(zod.string(), zod.unknown()),
2860
+ created_at: zod.string().datetime({}),
2861
+ updated_at: zod.string().datetime({})
2862
+ })
2863
+ });
2864
+ var UpdateExtractorParams = zod.object({
2865
+ id: zod.string().min(1)
2866
+ });
2867
+ var UpdateExtractorBody = zod.object({
2868
+ schema: zod.record(zod.string(), zod.unknown())
2869
+ });
2870
+ var UpdateExtractorResponse = zod.object({
2871
+ id: zod.string(),
2872
+ name: zod.string(),
2873
+ version: zod.number(),
2874
+ schema: zod.record(zod.string(), zod.unknown()),
2875
+ created_at: zod.string().datetime({})
2876
+ });
2877
+ var getExtractPathIdRegExp = new RegExp(
2878
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2879
+ );
2880
+ var GetExtractParams = zod.object({
2881
+ id: zod.string().uuid().regex(getExtractPathIdRegExp)
2882
+ });
2883
+ var GetExtractResponse = zod.object({
2884
+ id: zod.string(),
2885
+ extractor_id: zod.string(),
2886
+ extractor_version: zod.number(),
2887
+ job_id: zod.string(),
2888
+ scope: zod.record(zod.string(), zod.unknown()),
2889
+ result: zod.unknown(),
2890
+ created_at: zod.string().datetime({})
2891
+ });
2892
+ var listExtractsQueryCountDefault = 50;
2893
+ var listExtractsQueryCountMax = 100;
2894
+ var listExtractsQueryOffsetDefault = 0;
2895
+ var listExtractsQueryOffsetMin = 0;
2896
+ var listExtractsQuerySortByDefault = `created_at`;
2897
+ var listExtractsQuerySortOrderDefault = `desc`;
2898
+ var listExtractsQueryJobIdRegExp = new RegExp(
2899
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2900
+ );
2901
+ var listExtractsQueryExtractorIdRegExp = new RegExp(
2902
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2903
+ );
2904
+ var ListExtractsQueryParams = zod.object({
2905
+ count: zod.number().min(1).max(listExtractsQueryCountMax).default(listExtractsQueryCountDefault),
2906
+ offset: zod.number().min(listExtractsQueryOffsetMin).default(listExtractsQueryOffsetDefault),
2907
+ sort_by: zod.enum(["created_at"]).default(listExtractsQuerySortByDefault),
2908
+ sort_order: zod.enum(["asc", "desc"]).default(listExtractsQuerySortOrderDefault),
2909
+ job_id: zod.string().uuid().regex(listExtractsQueryJobIdRegExp).optional(),
2910
+ extractor_id: zod.string().uuid().regex(listExtractsQueryExtractorIdRegExp).optional(),
2911
+ created_after: zod.string().optional(),
2912
+ created_before: zod.string().optional()
2913
+ });
2914
+ var ListExtractsResponseItem = zod.object({
2915
+ id: zod.string(),
2916
+ job_id: zod.string(),
2917
+ extractor_id: zod.string(),
2918
+ extractor_version: zod.number(),
2919
+ extractor_name: zod.string(),
2920
+ scope: zod.record(zod.string(), zod.unknown()),
2921
+ result: zod.unknown(),
2922
+ created_at: zod.string().datetime({})
2923
+ });
2924
+ var ListExtractsResponse = zod.array(ListExtractsResponseItem);
2925
+ var GetProfileResponse = zod.object({
2926
+ id: zod.string(),
2927
+ first_name: zod.union([zod.string(), zod.null()]),
2928
+ last_name: zod.union([zod.string(), zod.null()]),
2929
+ email: zod.string()
2930
+ });
2931
+ var CreateToolBody = zod.object({
2932
+ name: zod.string().min(1),
2933
+ code: zod.string().min(1),
2934
+ description: zod.string().min(1),
2935
+ api_key: zod.string().min(1).optional()
2936
+ });
2937
+ var CreateToolResponse = zod.object({
2938
+ tool: zod.object({
2939
+ id: zod.string(),
2940
+ name: zod.string(),
2941
+ schema: zod.record(zod.string(), zod.unknown()).optional(),
2942
+ description: zod.string().optional(),
2943
+ code: zod.string().optional(),
2944
+ has_api_key: zod.boolean()
2945
+ })
2946
+ });
2947
+ var listToolsQuerySortByDefault = `created_at`;
2948
+ var listToolsQuerySortOrderDefault = `desc`;
2949
+ var listToolsQueryCallAgentIdRegExp = new RegExp(
2950
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2951
+ );
2952
+ var ListToolsQueryParams = zod.object({
2953
+ sort_by: zod.enum(["created_at", "updated_at", "name"]).default(listToolsQuerySortByDefault),
2954
+ sort_order: zod.enum(["asc", "desc"]).default(listToolsQuerySortOrderDefault),
2955
+ call_agent_id: zod.string().uuid().regex(listToolsQueryCallAgentIdRegExp).optional()
2956
+ });
2957
+ var ListToolsResponse = zod.object({
2958
+ tools: zod.array(
2959
+ zod.object({
2960
+ id: zod.string(),
2961
+ name: zod.string(),
2962
+ description: zod.string()
2963
+ })
2964
+ )
2965
+ });
2966
+ var executeCodePathIdRegExp = new RegExp(
2967
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2968
+ );
2969
+ var ExecuteCodeParams = zod.object({
2970
+ id: zod.string().uuid().regex(executeCodePathIdRegExp)
2971
+ });
2972
+ var executeCodeBodyParamsDefault = {};
2973
+ var ExecuteCodeBody = zod.object({
2974
+ params: zod.record(zod.string(), zod.unknown()).default(executeCodeBodyParamsDefault)
2975
+ });
2976
+ var ExecuteCodeResponse = zod.object({
2977
+ result: zod.string().optional(),
2978
+ error: zod.object({
2979
+ name: zod.string(),
2980
+ message: zod.string()
2981
+ }).optional(),
2982
+ traces: zod.array(
2983
+ zod.object({
2984
+ text: zod.string(),
2985
+ timestamp: zod.string()
2986
+ })
2987
+ )
2988
+ });
2989
+ var GetToolParams = zod.object({
2990
+ id: zod.string().min(1)
2991
+ });
2992
+ var GetToolResponse = zod.object({
2993
+ tool: zod.object({
2994
+ id: zod.string(),
2995
+ name: zod.string(),
2996
+ description: zod.string(),
2997
+ code: zod.string(),
2998
+ schema: zod.record(zod.string(), zod.unknown()),
2999
+ has_api_key: zod.boolean()
3000
+ })
3001
+ });
3002
+ var updateToolPathIdRegExp = new RegExp(
3003
+ "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
3004
+ );
3005
+ var UpdateToolParams = zod.object({
3006
+ id: zod.string().uuid().regex(updateToolPathIdRegExp)
3007
+ });
3008
+ var UpdateToolBody = zod.object({
3009
+ name: zod.string().min(1).optional(),
3010
+ api_key: zod.union([zod.string().min(1), zod.null()]).optional(),
3011
+ code: zod.string().min(1).optional(),
3012
+ description: zod.string().min(1).optional()
3013
+ });
3014
+ var UpdateToolResponse = zod.object({
3015
+ tool: zod.object({
3016
+ id: zod.string(),
3017
+ name: zod.string(),
3018
+ description: zod.string(),
3019
+ schema: zod.record(zod.string(), zod.unknown()),
3020
+ code: zod.string(),
3021
+ has_api_key: zod.boolean()
3022
+ })
3023
+ });
3024
+ var UploadFileBody = zod.object({
3025
+ source_url: zod.string().url(),
3026
+ document_name: zod.string().min(1),
3027
+ processing_options: zod.object({
3028
+ file_password: zod.string().optional(),
3029
+ file_splitting_enabled: zod.boolean().optional()
3030
+ }).optional(),
3031
+ created_at_document: zod.string().datetime({}).optional(),
3032
+ metadata: zod.record(zod.string(), zod.unknown()).optional()
3033
+ });
3034
+ var CreateAgentWebhookParams = zod.object({
3035
+ id: zod.string().min(1)
3036
+ });
3037
+ var createAgentWebhookBodyNameMax = 256;
3038
+ var createAgentWebhookBodyUrlMax = 2048;
3039
+ var createAgentWebhookBodyAuthHeaderNameOneMax = 256;
3040
+ var createAgentWebhookBodyAuthHeaderValueOneMax = 2048;
3041
+ var CreateAgentWebhookBody = zod.object({
3042
+ name: zod.string().min(1).max(createAgentWebhookBodyNameMax),
3043
+ url: zod.string().url().max(createAgentWebhookBodyUrlMax),
3044
+ auth_header_name: zod.union([
3045
+ zod.string().max(createAgentWebhookBodyAuthHeaderNameOneMax),
3046
+ zod.null()
3047
+ ]).optional(),
3048
+ auth_header_value: zod.union([
3049
+ zod.string().max(createAgentWebhookBodyAuthHeaderValueOneMax),
3050
+ zod.null()
3051
+ ]).optional(),
3052
+ enabled: zod.boolean().optional()
3053
+ });
3054
+ var CreateAgentWebhookResponse = zod.object({
3055
+ id: zod.string(),
3056
+ scope: zod.union([
3057
+ zod.object({
3058
+ extractor_id: zod.string()
3059
+ }),
3060
+ zod.object({
3061
+ call_agent_id: zod.string()
3062
+ }),
3063
+ zod.object({
3064
+ email_agent_id: zod.string()
3065
+ })
3066
+ ]),
3067
+ name: zod.string(),
3068
+ url: zod.string(),
3069
+ auth_header_name: zod.union([zod.string(), zod.null()]),
3070
+ has_auth: zod.boolean(),
3071
+ enabled: zod.boolean(),
3072
+ created_at: zod.string().datetime({}),
3073
+ updated_at: zod.string().datetime({})
3074
+ });
3075
+ var ListAgentWebhooksParams = zod.object({
3076
+ id: zod.string().min(1)
3077
+ });
3078
+ var ListAgentWebhooksResponseItem = zod.object({
3079
+ id: zod.string(),
3080
+ scope: zod.union([
3081
+ zod.object({
3082
+ extractor_id: zod.string()
3083
+ }),
3084
+ zod.object({
3085
+ call_agent_id: zod.string()
3086
+ }),
3087
+ zod.object({
3088
+ email_agent_id: zod.string()
3089
+ })
3090
+ ]),
3091
+ name: zod.string(),
3092
+ url: zod.string(),
3093
+ auth_header_name: zod.union([zod.string(), zod.null()]),
3094
+ has_auth: zod.boolean(),
3095
+ enabled: zod.boolean(),
3096
+ created_at: zod.string().datetime({}),
3097
+ updated_at: zod.string().datetime({})
3098
+ });
3099
+ var ListAgentWebhooksResponse = zod.array(
3100
+ ListAgentWebhooksResponseItem
3101
+ );
3102
+ var CreateEmailAgentWebhookParams = zod.object({
3103
+ id: zod.string().min(1)
3104
+ });
3105
+ var createEmailAgentWebhookBodyNameMax = 256;
3106
+ var createEmailAgentWebhookBodyUrlMax = 2048;
3107
+ var createEmailAgentWebhookBodyAuthHeaderNameOneMax = 256;
3108
+ var createEmailAgentWebhookBodyAuthHeaderValueOneMax = 2048;
3109
+ var CreateEmailAgentWebhookBody = zod.object({
3110
+ name: zod.string().min(1).max(createEmailAgentWebhookBodyNameMax),
3111
+ url: zod.string().url().max(createEmailAgentWebhookBodyUrlMax),
3112
+ auth_header_name: zod.union([
3113
+ zod.string().max(createEmailAgentWebhookBodyAuthHeaderNameOneMax),
3114
+ zod.null()
3115
+ ]).optional(),
3116
+ auth_header_value: zod.union([
3117
+ zod.string().max(createEmailAgentWebhookBodyAuthHeaderValueOneMax),
3118
+ zod.null()
3119
+ ]).optional(),
3120
+ enabled: zod.boolean().optional()
3121
+ });
3122
+ var CreateEmailAgentWebhookResponse = zod.object({
3123
+ id: zod.string(),
3124
+ scope: zod.union([
3125
+ zod.object({
3126
+ extractor_id: zod.string()
3127
+ }),
3128
+ zod.object({
3129
+ call_agent_id: zod.string()
3130
+ }),
3131
+ zod.object({
3132
+ email_agent_id: zod.string()
3133
+ })
3134
+ ]),
3135
+ name: zod.string(),
3136
+ url: zod.string(),
3137
+ auth_header_name: zod.union([zod.string(), zod.null()]),
3138
+ has_auth: zod.boolean(),
3139
+ enabled: zod.boolean(),
3140
+ created_at: zod.string().datetime({}),
3141
+ updated_at: zod.string().datetime({})
3142
+ });
3143
+ var ListEmailAgentWebhooksParams = zod.object({
3144
+ id: zod.string().min(1)
3145
+ });
3146
+ var ListEmailAgentWebhooksResponseItem = zod.object({
3147
+ id: zod.string(),
3148
+ scope: zod.union([
3149
+ zod.object({
3150
+ extractor_id: zod.string()
3151
+ }),
3152
+ zod.object({
3153
+ call_agent_id: zod.string()
3154
+ }),
3155
+ zod.object({
3156
+ email_agent_id: zod.string()
3157
+ })
3158
+ ]),
3159
+ name: zod.string(),
3160
+ url: zod.string(),
3161
+ auth_header_name: zod.union([zod.string(), zod.null()]),
3162
+ has_auth: zod.boolean(),
3163
+ enabled: zod.boolean(),
3164
+ created_at: zod.string().datetime({}),
3165
+ updated_at: zod.string().datetime({})
3166
+ });
3167
+ var ListEmailAgentWebhooksResponse = zod.array(
3168
+ ListEmailAgentWebhooksResponseItem
3169
+ );
3170
+ var CreateExtractorWebhookParams = zod.object({
3171
+ id: zod.string().min(1)
3172
+ });
3173
+ var createExtractorWebhookBodyNameMax = 256;
3174
+ var createExtractorWebhookBodyUrlMax = 2048;
3175
+ var createExtractorWebhookBodyAuthHeaderNameOneMax = 256;
3176
+ var createExtractorWebhookBodyAuthHeaderValueOneMax = 2048;
3177
+ var CreateExtractorWebhookBody = zod.object({
3178
+ name: zod.string().min(1).max(createExtractorWebhookBodyNameMax),
3179
+ url: zod.string().url().max(createExtractorWebhookBodyUrlMax),
3180
+ auth_header_name: zod.union([
3181
+ zod.string().max(createExtractorWebhookBodyAuthHeaderNameOneMax),
3182
+ zod.null()
3183
+ ]).optional(),
3184
+ auth_header_value: zod.union([
3185
+ zod.string().max(createExtractorWebhookBodyAuthHeaderValueOneMax),
3186
+ zod.null()
3187
+ ]).optional(),
3188
+ enabled: zod.boolean().optional()
3189
+ });
3190
+ var CreateExtractorWebhookResponse = zod.object({
3191
+ id: zod.string(),
3192
+ scope: zod.union([
3193
+ zod.object({
3194
+ extractor_id: zod.string()
3195
+ }),
3196
+ zod.object({
3197
+ call_agent_id: zod.string()
3198
+ }),
3199
+ zod.object({
3200
+ email_agent_id: zod.string()
3201
+ })
3202
+ ]),
3203
+ name: zod.string(),
3204
+ url: zod.string(),
3205
+ auth_header_name: zod.union([zod.string(), zod.null()]),
3206
+ has_auth: zod.boolean(),
3207
+ enabled: zod.boolean(),
3208
+ created_at: zod.string().datetime({}),
3209
+ updated_at: zod.string().datetime({})
3210
+ });
3211
+ var ListWebhooksParams = zod.object({
3212
+ id: zod.string().min(1)
3213
+ });
3214
+ var ListWebhooksResponseItem = zod.object({
3215
+ id: zod.string(),
3216
+ scope: zod.union([
3217
+ zod.object({
3218
+ extractor_id: zod.string()
3219
+ }),
3220
+ zod.object({
3221
+ call_agent_id: zod.string()
3222
+ }),
3223
+ zod.object({
3224
+ email_agent_id: zod.string()
3225
+ })
3226
+ ]),
3227
+ name: zod.string(),
3228
+ url: zod.string(),
3229
+ auth_header_name: zod.union([zod.string(), zod.null()]),
3230
+ has_auth: zod.boolean(),
3231
+ enabled: zod.boolean(),
3232
+ created_at: zod.string().datetime({}),
3233
+ updated_at: zod.string().datetime({})
3234
+ });
3235
+ var ListWebhooksResponse = zod.array(ListWebhooksResponseItem);
3236
+ var DeleteWebhookParams = zod.object({
3237
+ id: zod.string().min(1)
3238
+ });
3239
+ var DeleteWebhookResponse = zod.object({});
3240
+ var GetWebhookParams = zod.object({
3241
+ id: zod.string().min(1)
3242
+ });
3243
+ var GetWebhookResponse = zod.object({
3244
+ id: zod.string(),
3245
+ scope: zod.union([
3246
+ zod.object({
3247
+ extractor_id: zod.string()
3248
+ }),
3249
+ zod.object({
3250
+ call_agent_id: zod.string()
3251
+ }),
3252
+ zod.object({
3253
+ email_agent_id: zod.string()
3254
+ })
3255
+ ]),
3256
+ name: zod.string(),
3257
+ url: zod.string(),
3258
+ auth_header_name: zod.union([zod.string(), zod.null()]),
3259
+ has_auth: zod.boolean(),
3260
+ enabled: zod.boolean(),
3261
+ created_at: zod.string().datetime({}),
3262
+ updated_at: zod.string().datetime({})
3263
+ });
3264
+ var ListWebhookDeliveriesParams = zod.object({
3265
+ id: zod.string().min(1)
3266
+ });
3267
+ var listWebhookDeliveriesQueryCountDefault = 50;
3268
+ var listWebhookDeliveriesQueryCountMax = 100;
3269
+ var listWebhookDeliveriesQueryOffsetDefault = 0;
3270
+ var listWebhookDeliveriesQueryOffsetMin = 0;
3271
+ var listWebhookDeliveriesQuerySortOrderDefault = `desc`;
3272
+ var ListWebhookDeliveriesQueryParams = zod.object({
3273
+ count: zod.number().min(1).max(listWebhookDeliveriesQueryCountMax).default(listWebhookDeliveriesQueryCountDefault),
3274
+ offset: zod.number().min(listWebhookDeliveriesQueryOffsetMin).default(listWebhookDeliveriesQueryOffsetDefault),
3275
+ sort_order: zod.enum(["asc", "desc"]).default(listWebhookDeliveriesQuerySortOrderDefault)
3276
+ });
3277
+ var ListWebhookDeliveriesResponseItem = zod.object({
3278
+ id: zod.string(),
3279
+ webhook_id: zod.string(),
3280
+ event_type: zod.string(),
3281
+ event_id: zod.union([zod.string(), zod.null()]),
3282
+ status_code: zod.union([zod.number(), zod.null()]),
3283
+ duration_ms: zod.union([zod.number(), zod.null()]),
3284
+ error_message: zod.union([zod.string(), zod.null()]),
3285
+ created_at: zod.string().datetime({})
3286
+ });
3287
+ var ListWebhookDeliveriesResponse = zod.array(
3288
+ ListWebhookDeliveriesResponseItem
3289
+ );
3290
+ var TestWebhookParams = zod.object({
3291
+ id: zod.string().min(1)
3292
+ });
3293
+ var TestWebhookResponse = zod.object({
3294
+ success: zod.boolean(),
3295
+ status_code: zod.union([zod.number(), zod.null()]),
3296
+ duration_ms: zod.number(),
3297
+ error: zod.union([zod.string(), zod.null()])
3298
+ });
3299
+
3300
+ // src/generated/server.ts
3301
+ var server = new McpServer({
3302
+ name: "avallonAPIServer",
3303
+ version: "1.0.0"
3304
+ });
3305
+ server.tool(
3306
+ "listAgents",
3307
+ "List agents",
3308
+ {
3309
+ queryParams: ListAgentsQueryParams
3310
+ },
3311
+ listAgentsHandler
3312
+ );
3313
+ server.tool(
3314
+ "createAgent",
3315
+ "Create agent",
3316
+ {
3317
+ bodyParams: CreateAgentBody
3318
+ },
3319
+ createAgentHandler
3320
+ );
3321
+ server.tool(
3322
+ "getAgent",
3323
+ "Get agent",
3324
+ {
3325
+ pathParams: GetAgentParams
3326
+ },
3327
+ getAgentHandler
3328
+ );
3329
+ server.tool(
3330
+ "addToolsToAgent",
3331
+ "Add tools to agent",
3332
+ {
3333
+ pathParams: AddToolsToAgentParams,
3334
+ bodyParams: AddToolsToAgentBody
3335
+ },
3336
+ addToolsToAgentHandler
3337
+ );
3338
+ server.tool(
3339
+ "deleteToolsFromAgent",
3340
+ "Remove tools from agent",
3341
+ {
3342
+ pathParams: DeleteToolsFromAgentParams,
3343
+ bodyParams: DeleteToolsFromAgentBody
3344
+ },
3345
+ deleteToolsFromAgentHandler
3346
+ );
3347
+ server.tool(
3348
+ "getAgentPrompt",
3349
+ "Get agent prompt",
3350
+ {
3351
+ pathParams: GetAgentPromptParams
3352
+ },
3353
+ getAgentPromptHandler
3354
+ );
3355
+ server.tool(
3356
+ "updateAgentModels",
3357
+ "Update agent models",
3358
+ {
3359
+ pathParams: UpdateAgentModelsParams,
3360
+ bodyParams: UpdateAgentModelsBody
3361
+ },
3362
+ updateAgentModelsHandler
3363
+ );
3364
+ server.tool(
3365
+ "updateCallControls",
3366
+ "Update agent call controls",
3367
+ {
3368
+ pathParams: UpdateCallControlsParams,
3369
+ bodyParams: UpdateCallControlsBody
3370
+ },
3371
+ updateCallControlsHandler
3372
+ );
3373
+ server.tool(
3374
+ "scheduleJob",
3375
+ "Schedule an outbound job",
3376
+ {
3377
+ pathParams: ScheduleJobParams,
3378
+ bodyParams: ScheduleJobBody
3379
+ },
3380
+ scheduleJobHandler
3381
+ );
3382
+ server.tool(
3383
+ "listJobs",
3384
+ "List outbound jobs",
3385
+ {
3386
+ queryParams: ListJobsQueryParams
3387
+ },
3388
+ listJobsHandler
3389
+ );
3390
+ server.tool(
3391
+ "cancelJob",
3392
+ "Cancel an outbound job",
3393
+ {
3394
+ pathParams: CancelJobParams
3395
+ },
3396
+ cancelJobHandler
3397
+ );
3398
+ server.tool(
3399
+ "listApiKeys",
3400
+ "List API keys",
3401
+ {
3402
+ queryParams: ListApiKeysQueryParams
3403
+ },
3404
+ listApiKeysHandler
3405
+ );
3406
+ server.tool(
3407
+ "createApiKey",
3408
+ "Create an API key",
3409
+ {
3410
+ bodyParams: CreateApiKeyBody
3411
+ },
3412
+ createApiKeyHandler
3413
+ );
3414
+ server.tool(
3415
+ "revokeApiKey",
3416
+ "Revoke an API key",
3417
+ {
3418
+ pathParams: RevokeApiKeyParams
3419
+ },
3420
+ revokeApiKeyHandler
3421
+ );
3422
+ server.tool(
3423
+ "createArtifact",
3424
+ "Create artifact",
3425
+ {
3426
+ bodyParams: CreateArtifactBody
3427
+ },
3428
+ createArtifactHandler
3429
+ );
3430
+ server.tool(
3431
+ "listArtifacts",
3432
+ "List artifacts",
3433
+ {
3434
+ queryParams: ListArtifactsQueryParams
3435
+ },
3436
+ listArtifactsHandler
3437
+ );
3438
+ server.tool(
3439
+ "getArtifact",
3440
+ "Get artifact",
3441
+ {
3442
+ pathParams: GetArtifactParams
3443
+ },
3444
+ getArtifactHandler
3445
+ );
3446
+ server.tool(
3447
+ "getArtifactMetadataKeys",
3448
+ "Get artifact metadata keys",
3449
+ {
3450
+ queryParams: GetArtifactMetadataKeysQueryParams
3451
+ },
3452
+ getArtifactMetadataKeysHandler
3453
+ );
3454
+ server.tool(
3455
+ "signUp",
3456
+ "Sign up",
3457
+ {
3458
+ bodyParams: SignUpBody
3459
+ },
3460
+ signUpHandler
3461
+ );
3462
+ server.tool(
3463
+ "signIn",
3464
+ "Sign in",
3465
+ {
3466
+ bodyParams: SignInBody
3467
+ },
3468
+ signInHandler
3469
+ );
3470
+ server.tool(
3471
+ "refreshToken",
3472
+ "Refresh authentication token",
3473
+ {
3474
+ bodyParams: RefreshTokenBody
3475
+ },
3476
+ refreshTokenHandler
3477
+ );
3478
+ server.tool(
3479
+ "getOAuthUrl",
3480
+ "Get OAuth sign-in URL",
3481
+ {
3482
+ queryParams: GetOAuthUrlQueryParams
3483
+ },
3484
+ getOAuthUrlHandler
3485
+ );
3486
+ server.tool(
3487
+ "listCalls",
3488
+ "List calls",
3489
+ {
3490
+ queryParams: ListCallsQueryParams
3491
+ },
3492
+ listCallsHandler
3493
+ );
3494
+ server.tool(
3495
+ "getCall",
3496
+ "Get call",
3497
+ {
3498
+ pathParams: GetCallParams,
3499
+ queryParams: GetCallQueryParams
3500
+ },
3501
+ getCallHandler
3502
+ );
3503
+ server.tool(
3504
+ "getCallEvaluation",
3505
+ "Get call evaluation",
3506
+ {
3507
+ pathParams: GetCallEvaluationParams
3508
+ },
3509
+ getCallEvaluationHandler
3510
+ );
3511
+ server.tool(
3512
+ "getCallAnalytics",
3513
+ "Get call analytics",
3514
+ {
3515
+ queryParams: GetCallAnalyticsQueryParams
3516
+ },
3517
+ getCallAnalyticsHandler
3518
+ );
3519
+ server.tool(
3520
+ "createCallFeedback",
3521
+ "Create feedback on a call message",
3522
+ {
3523
+ pathParams: CreateCallFeedbackParams,
3524
+ bodyParams: CreateCallFeedbackBody
3525
+ },
3526
+ createCallFeedbackHandler
3527
+ );
3528
+ server.tool(
3529
+ "listCallFeedback",
3530
+ "List feedback for a call",
3531
+ {
3532
+ pathParams: ListCallFeedbackParams,
3533
+ queryParams: ListCallFeedbackQueryParams
3534
+ },
3535
+ listCallFeedbackHandler
3536
+ );
3537
+ server.tool(
3538
+ "deleteCallFeedback",
3539
+ "Delete feedback",
3540
+ {
3541
+ pathParams: DeleteCallFeedbackParams
3542
+ },
3543
+ deleteCallFeedbackHandler
3544
+ );
3545
+ server.tool("createClaim", "Create claim", createClaimHandler);
3546
+ server.tool(
3547
+ "listClaims",
3548
+ "List claims",
3549
+ {
3550
+ queryParams: ListClaimsQueryParams
3551
+ },
3552
+ listClaimsHandler
3553
+ );
3554
+ server.tool(
3555
+ "getClaimDetail",
3556
+ "Get claim detail",
3557
+ {
3558
+ pathParams: GetClaimDetailParams
3559
+ },
3560
+ getClaimDetailHandler
3561
+ );
3562
+ server.tool(
3563
+ "checkEmailUsernameAvailability",
3564
+ "Check email username availability",
3565
+ {
3566
+ queryParams: CheckEmailUsernameAvailabilityQueryParams
3567
+ },
3568
+ checkEmailUsernameAvailabilityHandler
3569
+ );
3570
+ server.tool(
3571
+ "createEmailAgent",
3572
+ "Create email agent",
3573
+ {
3574
+ bodyParams: CreateEmailAgentBody
3575
+ },
3576
+ createEmailAgentHandler
3577
+ );
3578
+ server.tool(
3579
+ "listEmailAgents",
3580
+ "List email agents",
3581
+ {
3582
+ queryParams: ListEmailAgentsQueryParams
3583
+ },
3584
+ listEmailAgentsHandler
3585
+ );
3586
+ server.tool(
3587
+ "updateEmailAgent",
3588
+ "Update email agent",
3589
+ {
3590
+ pathParams: UpdateEmailAgentParams,
3591
+ bodyParams: UpdateEmailAgentBody
3592
+ },
3593
+ updateEmailAgentHandler
3594
+ );
3595
+ server.tool(
3596
+ "createEmail",
3597
+ "Create email",
3598
+ {
3599
+ bodyParams: CreateEmailBody
3600
+ },
3601
+ createEmailHandler
3602
+ );
3603
+ server.tool(
3604
+ "listEmails",
3605
+ "List emails",
3606
+ {
3607
+ queryParams: ListEmailsQueryParams
3608
+ },
3609
+ listEmailsHandler
3610
+ );
3611
+ server.tool(
3612
+ "getEmail",
3613
+ "Get email",
3614
+ {
3615
+ pathParams: GetEmailParams
3616
+ },
3617
+ getEmailHandler
3618
+ );
3619
+ server.tool(
3620
+ "listExtractorJobs",
3621
+ "List extractor jobs",
3622
+ {
3623
+ queryParams: ListExtractorJobsQueryParams
3624
+ },
3625
+ listExtractorJobsHandler
3626
+ );
3627
+ server.tool(
3628
+ "createExtractorJob",
3629
+ "Create extractor job",
3630
+ {
3631
+ bodyParams: CreateExtractorJobBody
3632
+ },
3633
+ createExtractorJobHandler
3634
+ );
3635
+ server.tool(
3636
+ "getExtractorJob",
3637
+ "Get extractor job",
3638
+ {
3639
+ pathParams: GetExtractorJobParams
3640
+ },
3641
+ getExtractorJobHandler
3642
+ );
3643
+ server.tool(
3644
+ "cancelExtractorJob",
3645
+ "Cancel extractor job",
3646
+ {
3647
+ pathParams: CancelExtractorJobParams
3648
+ },
3649
+ cancelExtractorJobHandler
3650
+ );
3651
+ server.tool(
3652
+ "createExtractor",
3653
+ "Create extractor",
3654
+ {
3655
+ bodyParams: CreateExtractorBody
3656
+ },
3657
+ createExtractorHandler
3658
+ );
3659
+ server.tool(
3660
+ "listExtractors",
3661
+ "List extractors",
3662
+ {
3663
+ queryParams: ListExtractorsQueryParams
3664
+ },
3665
+ listExtractorsHandler
3666
+ );
3667
+ server.tool(
3668
+ "getExtractor",
3669
+ "Get extractor",
3670
+ {
3671
+ pathParams: GetExtractorParams
3672
+ },
3673
+ getExtractorHandler
3674
+ );
3675
+ server.tool(
3676
+ "updateExtractor",
3677
+ "Update extractor",
3678
+ {
3679
+ pathParams: UpdateExtractorParams,
3680
+ bodyParams: UpdateExtractorBody
3681
+ },
3682
+ updateExtractorHandler
3683
+ );
3684
+ server.tool(
3685
+ "getExtract",
3686
+ "Get extract",
3687
+ {
3688
+ pathParams: GetExtractParams
3689
+ },
3690
+ getExtractHandler
3691
+ );
3692
+ server.tool(
3693
+ "listExtracts",
3694
+ "List extracts",
3695
+ {
3696
+ queryParams: ListExtractsQueryParams
3697
+ },
3698
+ listExtractsHandler
3699
+ );
3700
+ server.tool("getProfile", "Get profile", getProfileHandler);
3701
+ server.tool(
3702
+ "createTool",
3703
+ "Create tool",
3704
+ {
3705
+ bodyParams: CreateToolBody
3706
+ },
3707
+ createToolHandler
3708
+ );
3709
+ server.tool(
3710
+ "listTools",
3711
+ "List tools",
3712
+ {
3713
+ queryParams: ListToolsQueryParams
3714
+ },
3715
+ listToolsHandler
3716
+ );
3717
+ server.tool(
3718
+ "executeCode",
3719
+ "Execute tool",
3720
+ {
3721
+ pathParams: ExecuteCodeParams,
3722
+ bodyParams: ExecuteCodeBody
3723
+ },
3724
+ executeCodeHandler
3725
+ );
3726
+ server.tool(
3727
+ "getTool",
3728
+ "Get tool",
3729
+ {
3730
+ pathParams: GetToolParams
3731
+ },
3732
+ getToolHandler
3733
+ );
3734
+ server.tool(
3735
+ "updateTool",
3736
+ "Update tool",
3737
+ {
3738
+ pathParams: UpdateToolParams,
3739
+ bodyParams: UpdateToolBody
3740
+ },
3741
+ updateToolHandler
3742
+ );
3743
+ server.tool(
3744
+ "uploadFile",
3745
+ "Upload a file for processing",
3746
+ {
3747
+ bodyParams: UploadFileBody
3748
+ },
3749
+ uploadFileHandler
3750
+ );
3751
+ server.tool(
3752
+ "createAgentWebhook",
3753
+ "Create agent webhook",
3754
+ {
3755
+ pathParams: CreateAgentWebhookParams,
3756
+ bodyParams: CreateAgentWebhookBody
3757
+ },
3758
+ createAgentWebhookHandler
3759
+ );
3760
+ server.tool(
3761
+ "listAgentWebhooks",
3762
+ "List agent webhooks",
3763
+ {
3764
+ pathParams: ListAgentWebhooksParams
3765
+ },
3766
+ listAgentWebhooksHandler
3767
+ );
3768
+ server.tool(
3769
+ "createEmailAgentWebhook",
3770
+ "Create email agent webhook",
3771
+ {
3772
+ pathParams: CreateEmailAgentWebhookParams,
3773
+ bodyParams: CreateEmailAgentWebhookBody
3774
+ },
3775
+ createEmailAgentWebhookHandler
3776
+ );
3777
+ server.tool(
3778
+ "listEmailAgentWebhooks",
3779
+ "List email agent webhooks",
3780
+ {
3781
+ pathParams: ListEmailAgentWebhooksParams
3782
+ },
3783
+ listEmailAgentWebhooksHandler
3784
+ );
3785
+ server.tool(
3786
+ "createExtractorWebhook",
3787
+ "Create extractor webhook",
3788
+ {
3789
+ pathParams: CreateExtractorWebhookParams,
3790
+ bodyParams: CreateExtractorWebhookBody
3791
+ },
3792
+ createExtractorWebhookHandler
3793
+ );
3794
+ server.tool(
3795
+ "listWebhooks",
3796
+ "List extractor webhooks",
3797
+ {
3798
+ pathParams: ListWebhooksParams
3799
+ },
3800
+ listWebhooksHandler
3801
+ );
3802
+ server.tool(
3803
+ "deleteWebhook",
3804
+ "Delete webhook",
3805
+ {
3806
+ pathParams: DeleteWebhookParams
3807
+ },
3808
+ deleteWebhookHandler
3809
+ );
3810
+ server.tool(
3811
+ "getWebhook",
3812
+ "Get webhook",
3813
+ {
3814
+ pathParams: GetWebhookParams
3815
+ },
3816
+ getWebhookHandler
3817
+ );
3818
+ server.tool(
3819
+ "listWebhookDeliveries",
3820
+ "List webhook deliveries",
3821
+ {
3822
+ pathParams: ListWebhookDeliveriesParams,
3823
+ queryParams: ListWebhookDeliveriesQueryParams
3824
+ },
3825
+ listWebhookDeliveriesHandler
3826
+ );
3827
+ server.tool(
3828
+ "testWebhook",
3829
+ "Test webhook",
3830
+ {
3831
+ pathParams: TestWebhookParams
3832
+ },
3833
+ testWebhookHandler
3834
+ );
3835
+ var transport = new StdioServerTransport();
3836
+ server.connect(transport).then(() => {
3837
+ console.error("MCP server running on stdio");
3838
+ }).catch(console.error);
3839
+ //# sourceMappingURL=index.js.map