@fonoster/apiserver 0.8.26 → 0.8.28

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.
Files changed (36) hide show
  1. package/dist/applications/buildService.js +10 -10
  2. package/dist/applications/{createApplication.d.ts → createCreateApplication.d.ts} +2 -2
  3. package/dist/applications/{createApplication.js → createCreateApplication.js} +13 -5
  4. package/dist/applications/{getApplication.d.ts → createDeleteApplication.d.ts} +2 -2
  5. package/dist/applications/{deleteApplication.js → createDeleteApplication.js} +4 -4
  6. package/dist/applications/{updateApplication.d.ts → createGetApplication.d.ts} +2 -2
  7. package/dist/applications/{getApplication.js → createGetApplication.js} +4 -4
  8. package/dist/applications/createGetFnUtil.d.ts +3 -1
  9. package/dist/applications/{listApplications.d.ts → createListApplications.d.ts} +2 -2
  10. package/dist/applications/{listApplications.js → createListApplications.js} +4 -4
  11. package/dist/applications/{deleteApplication.d.ts → createUpdateApplication.d.ts} +2 -2
  12. package/dist/applications/{updateApplication.js → createUpdateApplication.js} +5 -5
  13. package/dist/applications/utils/applicationWithEncodedStruct.js +2 -0
  14. package/dist/applications/utils/convertToApplicationData.d.ts +2 -2
  15. package/dist/applications/validation/assistantWithoutApiKeySchema.d.ts +671 -0
  16. package/dist/applications/validation/assistantWithoutApiKeySchema.js +35 -0
  17. package/dist/applications/validation/createValidationSchema.d.ts +1107 -0
  18. package/dist/applications/validation/createValidationSchema.js +67 -0
  19. package/dist/applications/validation/speechValidators.d.ts +29 -0
  20. package/dist/applications/{utils/getApplicationValidationSchema.js → validation/speechValidators.js} +3 -28
  21. package/dist/applications/{utils → validation}/validOrThrow.js +3 -2
  22. package/dist/core/seed.js +11 -1
  23. package/dist/envs.d.ts +1 -0
  24. package/dist/envs.js +3 -2
  25. package/dist/utils/createCheckNumberPreconditions.js +2 -2
  26. package/dist/voice/VoiceClientImpl.js +13 -7
  27. package/dist/voice/integrations/createCreateContainer.js +1 -1
  28. package/dist/voice/integrations/getSttConfig.js +20 -2
  29. package/dist/voice/integrations/getTtsConfig.js +2 -2
  30. package/package.json +9 -9
  31. package/dist/applications/utils/getApplicationValidationSchema.d.ts +0 -64
  32. package/dist/voice/integrations/findIntegrationsCredentials.d.ts +0 -3
  33. package/dist/voice/integrations/findIntegrationsCredentials.js +0 -7
  34. /package/dist/applications/{utils → validation}/prepareForValidation.d.ts +0 -0
  35. /package/dist/applications/{utils → validation}/prepareForValidation.js +0 -0
  36. /package/dist/applications/{utils → validation}/validOrThrow.d.ts +0 -0
@@ -0,0 +1,1107 @@
1
+ import { ApplicationType } from "@prisma/client";
2
+ import { z } from "zod";
3
+ declare function createValidationSchema(request: {
4
+ applicationType: ApplicationType;
5
+ ttsEngineName: string;
6
+ sttEngineName: string;
7
+ }): z.ZodObject<{
8
+ name: z.ZodString;
9
+ type: z.ZodNativeEnum<{
10
+ EXTERNAL: "EXTERNAL";
11
+ AUTOPILOT: "AUTOPILOT";
12
+ }>;
13
+ endpoint: z.ZodEffects<z.ZodString, string, string>;
14
+ textToSpeech: z.ZodObject<{
15
+ productRef: z.ZodString;
16
+ config: any;
17
+ }, "strip", z.ZodTypeAny, {
18
+ [x: string]: any;
19
+ productRef?: unknown;
20
+ config?: unknown;
21
+ }, {
22
+ [x: string]: any;
23
+ productRef?: unknown;
24
+ config?: unknown;
25
+ }> | z.ZodUndefined;
26
+ speechToText: z.ZodUndefined | z.ZodObject<{
27
+ productRef: z.ZodString;
28
+ config: any;
29
+ }, "strip", z.ZodTypeAny, {
30
+ [x: string]: any;
31
+ productRef?: unknown;
32
+ config?: unknown;
33
+ }, {
34
+ [x: string]: any;
35
+ productRef?: unknown;
36
+ config?: unknown;
37
+ }>;
38
+ intelligence: z.ZodUndefined | z.ZodEffects<z.ZodObject<{
39
+ productRef: z.ZodString;
40
+ config: z.ZodObject<z.objectUtil.extendShape<{
41
+ conversationSettings: z.ZodObject<{
42
+ firstMessage: z.ZodOptional<z.ZodString>;
43
+ systemTemplate: z.ZodString;
44
+ goodbyeMessage: z.ZodString;
45
+ systemErrorMessage: z.ZodString;
46
+ initialDtmf: z.ZodOptional<z.ZodString>;
47
+ maxSpeechWaitTimeout: z.ZodNumber;
48
+ transferOptions: z.ZodOptional<z.ZodObject<{
49
+ phoneNumber: z.ZodString;
50
+ message: z.ZodString;
51
+ timeout: z.ZodOptional<z.ZodNumber>;
52
+ }, "strip", z.ZodTypeAny, {
53
+ message?: string;
54
+ phoneNumber?: string;
55
+ timeout?: number;
56
+ }, {
57
+ message?: string;
58
+ phoneNumber?: string;
59
+ timeout?: number;
60
+ }>>;
61
+ idleOptions: z.ZodOptional<z.ZodObject<{
62
+ message: z.ZodString;
63
+ timeout: z.ZodNumber;
64
+ maxTimeoutCount: z.ZodNumber;
65
+ }, "strip", z.ZodTypeAny, {
66
+ message?: string;
67
+ timeout?: number;
68
+ maxTimeoutCount?: number;
69
+ }, {
70
+ message?: string;
71
+ timeout?: number;
72
+ maxTimeoutCount?: number;
73
+ }>>;
74
+ vad: z.ZodObject<{
75
+ pathToModel: z.ZodOptional<z.ZodString>;
76
+ activationThreshold: z.ZodNumber;
77
+ deactivationThreshold: z.ZodNumber;
78
+ debounceFrames: z.ZodNumber;
79
+ }, "strip", z.ZodTypeAny, {
80
+ pathToModel?: string;
81
+ activationThreshold?: number;
82
+ deactivationThreshold?: number;
83
+ debounceFrames?: number;
84
+ }, {
85
+ pathToModel?: string;
86
+ activationThreshold?: number;
87
+ deactivationThreshold?: number;
88
+ debounceFrames?: number;
89
+ }>;
90
+ }, "strip", z.ZodTypeAny, {
91
+ firstMessage?: string;
92
+ systemTemplate?: string;
93
+ goodbyeMessage?: string;
94
+ systemErrorMessage?: string;
95
+ initialDtmf?: string;
96
+ maxSpeechWaitTimeout?: number;
97
+ transferOptions?: {
98
+ message?: string;
99
+ phoneNumber?: string;
100
+ timeout?: number;
101
+ };
102
+ idleOptions?: {
103
+ message?: string;
104
+ timeout?: number;
105
+ maxTimeoutCount?: number;
106
+ };
107
+ vad?: {
108
+ pathToModel?: string;
109
+ activationThreshold?: number;
110
+ deactivationThreshold?: number;
111
+ debounceFrames?: number;
112
+ };
113
+ }, {
114
+ firstMessage?: string;
115
+ systemTemplate?: string;
116
+ goodbyeMessage?: string;
117
+ systemErrorMessage?: string;
118
+ initialDtmf?: string;
119
+ maxSpeechWaitTimeout?: number;
120
+ transferOptions?: {
121
+ message?: string;
122
+ phoneNumber?: string;
123
+ timeout?: number;
124
+ };
125
+ idleOptions?: {
126
+ message?: string;
127
+ timeout?: number;
128
+ maxTimeoutCount?: number;
129
+ };
130
+ vad?: {
131
+ pathToModel?: string;
132
+ activationThreshold?: number;
133
+ deactivationThreshold?: number;
134
+ debounceFrames?: number;
135
+ };
136
+ }>;
137
+ languageModel: z.ZodObject<{
138
+ provider: z.ZodNativeEnum<typeof import("@fonoster/common").LanguageModelProvider>;
139
+ apiKey: z.ZodOptional<z.ZodString>;
140
+ model: z.ZodString;
141
+ temperature: z.ZodNumber;
142
+ maxTokens: z.ZodNumber;
143
+ baseUrl: z.ZodOptional<z.ZodString>;
144
+ knowledgeBase: z.ZodArray<z.ZodObject<{
145
+ type: z.ZodEnum<["s3"]>;
146
+ title: z.ZodString;
147
+ document: z.ZodString;
148
+ }, "strip", z.ZodTypeAny, {
149
+ type?: "s3";
150
+ title?: string;
151
+ document?: string;
152
+ }, {
153
+ type?: "s3";
154
+ title?: string;
155
+ document?: string;
156
+ }>, "many">;
157
+ tools: z.ZodArray<z.ZodObject<{
158
+ name: z.ZodString;
159
+ description: z.ZodString;
160
+ parameters: z.ZodObject<{
161
+ type: z.ZodEnum<["object", "array"]>;
162
+ properties: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
163
+ type: z.ZodString;
164
+ format: z.ZodOptional<z.ZodString>;
165
+ pattern: z.ZodOptional<z.ZodString>;
166
+ }, "strip", z.ZodTypeAny, {
167
+ type?: string;
168
+ format?: string;
169
+ pattern?: string;
170
+ }, {
171
+ type?: string;
172
+ format?: string;
173
+ pattern?: string;
174
+ }>, {
175
+ type?: string;
176
+ format?: string;
177
+ pattern?: string;
178
+ }, {
179
+ type?: string;
180
+ format?: string;
181
+ pattern?: string;
182
+ }>>;
183
+ required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
184
+ }, "strip", z.ZodTypeAny, {
185
+ type?: "object" | "array";
186
+ properties?: Record<string, {
187
+ type?: string;
188
+ format?: string;
189
+ pattern?: string;
190
+ }>;
191
+ required?: string[];
192
+ }, {
193
+ type?: "object" | "array";
194
+ properties?: Record<string, {
195
+ type?: string;
196
+ format?: string;
197
+ pattern?: string;
198
+ }>;
199
+ required?: string[];
200
+ }>;
201
+ requestStartMessage: z.ZodOptional<z.ZodString>;
202
+ operation: z.ZodEffects<z.ZodObject<{
203
+ type: z.ZodNativeEnum<typeof import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations>;
204
+ url: z.ZodOptional<z.ZodString>;
205
+ waitForResponse: z.ZodOptional<z.ZodBoolean>;
206
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
207
+ }, "strip", z.ZodTypeAny, {
208
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
209
+ url?: string;
210
+ waitForResponse?: boolean;
211
+ headers?: Record<string, string>;
212
+ }, {
213
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
214
+ url?: string;
215
+ waitForResponse?: boolean;
216
+ headers?: Record<string, string>;
217
+ }>, {
218
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
219
+ url?: string;
220
+ waitForResponse?: boolean;
221
+ headers?: Record<string, string>;
222
+ }, {
223
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
224
+ url?: string;
225
+ waitForResponse?: boolean;
226
+ headers?: Record<string, string>;
227
+ }>;
228
+ }, "strip", z.ZodTypeAny, {
229
+ name?: string;
230
+ description?: string;
231
+ parameters?: {
232
+ type?: "object" | "array";
233
+ properties?: Record<string, {
234
+ type?: string;
235
+ format?: string;
236
+ pattern?: string;
237
+ }>;
238
+ required?: string[];
239
+ };
240
+ requestStartMessage?: string;
241
+ operation?: {
242
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
243
+ url?: string;
244
+ waitForResponse?: boolean;
245
+ headers?: Record<string, string>;
246
+ };
247
+ }, {
248
+ name?: string;
249
+ description?: string;
250
+ parameters?: {
251
+ type?: "object" | "array";
252
+ properties?: Record<string, {
253
+ type?: string;
254
+ format?: string;
255
+ pattern?: string;
256
+ }>;
257
+ required?: string[];
258
+ };
259
+ requestStartMessage?: string;
260
+ operation?: {
261
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
262
+ url?: string;
263
+ waitForResponse?: boolean;
264
+ headers?: Record<string, string>;
265
+ };
266
+ }>, "many">;
267
+ }, "strip", z.ZodTypeAny, {
268
+ provider?: import("@fonoster/common").LanguageModelProvider;
269
+ apiKey?: string;
270
+ model?: string;
271
+ temperature?: number;
272
+ maxTokens?: number;
273
+ baseUrl?: string;
274
+ knowledgeBase?: {
275
+ type?: "s3";
276
+ title?: string;
277
+ document?: string;
278
+ }[];
279
+ tools?: {
280
+ name?: string;
281
+ description?: string;
282
+ parameters?: {
283
+ type?: "object" | "array";
284
+ properties?: Record<string, {
285
+ type?: string;
286
+ format?: string;
287
+ pattern?: string;
288
+ }>;
289
+ required?: string[];
290
+ };
291
+ requestStartMessage?: string;
292
+ operation?: {
293
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
294
+ url?: string;
295
+ waitForResponse?: boolean;
296
+ headers?: Record<string, string>;
297
+ };
298
+ }[];
299
+ }, {
300
+ provider?: import("@fonoster/common").LanguageModelProvider;
301
+ apiKey?: string;
302
+ model?: string;
303
+ temperature?: number;
304
+ maxTokens?: number;
305
+ baseUrl?: string;
306
+ knowledgeBase?: {
307
+ type?: "s3";
308
+ title?: string;
309
+ document?: string;
310
+ }[];
311
+ tools?: {
312
+ name?: string;
313
+ description?: string;
314
+ parameters?: {
315
+ type?: "object" | "array";
316
+ properties?: Record<string, {
317
+ type?: string;
318
+ format?: string;
319
+ pattern?: string;
320
+ }>;
321
+ required?: string[];
322
+ };
323
+ requestStartMessage?: string;
324
+ operation?: {
325
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
326
+ url?: string;
327
+ waitForResponse?: boolean;
328
+ headers?: Record<string, string>;
329
+ };
330
+ }[];
331
+ }>;
332
+ }, {
333
+ languageModel: z.ZodEffects<z.ZodObject<{
334
+ provider: z.ZodNativeEnum<typeof import("@fonoster/common").LanguageModelProvider>;
335
+ apiKey: z.ZodOptional<z.ZodString>;
336
+ model: z.ZodString;
337
+ temperature: z.ZodNumber;
338
+ maxTokens: z.ZodNumber;
339
+ baseUrl: z.ZodOptional<z.ZodString>;
340
+ knowledgeBase: z.ZodArray<z.ZodObject<{
341
+ type: z.ZodEnum<["s3"]>;
342
+ title: z.ZodString;
343
+ document: z.ZodString;
344
+ }, "strip", z.ZodTypeAny, {
345
+ type?: "s3";
346
+ title?: string;
347
+ document?: string;
348
+ }, {
349
+ type?: "s3";
350
+ title?: string;
351
+ document?: string;
352
+ }>, "many">;
353
+ tools: z.ZodArray<z.ZodObject<{
354
+ name: z.ZodString;
355
+ description: z.ZodString;
356
+ parameters: z.ZodObject<{
357
+ type: z.ZodEnum<["object", "array"]>;
358
+ properties: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
359
+ type: z.ZodString;
360
+ format: z.ZodOptional<z.ZodString>;
361
+ pattern: z.ZodOptional<z.ZodString>;
362
+ }, "strip", z.ZodTypeAny, {
363
+ type?: string;
364
+ format?: string;
365
+ pattern?: string;
366
+ }, {
367
+ type?: string;
368
+ format?: string;
369
+ pattern?: string;
370
+ }>, {
371
+ type?: string;
372
+ format?: string;
373
+ pattern?: string;
374
+ }, {
375
+ type?: string;
376
+ format?: string;
377
+ pattern?: string;
378
+ }>>;
379
+ required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
380
+ }, "strip", z.ZodTypeAny, {
381
+ type?: "object" | "array";
382
+ properties?: Record<string, {
383
+ type?: string;
384
+ format?: string;
385
+ pattern?: string;
386
+ }>;
387
+ required?: string[];
388
+ }, {
389
+ type?: "object" | "array";
390
+ properties?: Record<string, {
391
+ type?: string;
392
+ format?: string;
393
+ pattern?: string;
394
+ }>;
395
+ required?: string[];
396
+ }>;
397
+ requestStartMessage: z.ZodOptional<z.ZodString>;
398
+ operation: z.ZodEffects<z.ZodObject<{
399
+ type: z.ZodNativeEnum<typeof import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations>;
400
+ url: z.ZodOptional<z.ZodString>;
401
+ waitForResponse: z.ZodOptional<z.ZodBoolean>;
402
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
403
+ }, "strip", z.ZodTypeAny, {
404
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
405
+ url?: string;
406
+ waitForResponse?: boolean;
407
+ headers?: Record<string, string>;
408
+ }, {
409
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
410
+ url?: string;
411
+ waitForResponse?: boolean;
412
+ headers?: Record<string, string>;
413
+ }>, {
414
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
415
+ url?: string;
416
+ waitForResponse?: boolean;
417
+ headers?: Record<string, string>;
418
+ }, {
419
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
420
+ url?: string;
421
+ waitForResponse?: boolean;
422
+ headers?: Record<string, string>;
423
+ }>;
424
+ }, "strip", z.ZodTypeAny, {
425
+ name?: string;
426
+ description?: string;
427
+ parameters?: {
428
+ type?: "object" | "array";
429
+ properties?: Record<string, {
430
+ type?: string;
431
+ format?: string;
432
+ pattern?: string;
433
+ }>;
434
+ required?: string[];
435
+ };
436
+ requestStartMessage?: string;
437
+ operation?: {
438
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
439
+ url?: string;
440
+ waitForResponse?: boolean;
441
+ headers?: Record<string, string>;
442
+ };
443
+ }, {
444
+ name?: string;
445
+ description?: string;
446
+ parameters?: {
447
+ type?: "object" | "array";
448
+ properties?: Record<string, {
449
+ type?: string;
450
+ format?: string;
451
+ pattern?: string;
452
+ }>;
453
+ required?: string[];
454
+ };
455
+ requestStartMessage?: string;
456
+ operation?: {
457
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
458
+ url?: string;
459
+ waitForResponse?: boolean;
460
+ headers?: Record<string, string>;
461
+ };
462
+ }>, "many">;
463
+ }, "strip", z.ZodTypeAny, {
464
+ provider?: import("@fonoster/common").LanguageModelProvider;
465
+ apiKey?: string;
466
+ model?: string;
467
+ temperature?: number;
468
+ maxTokens?: number;
469
+ baseUrl?: string;
470
+ knowledgeBase?: {
471
+ type?: "s3";
472
+ title?: string;
473
+ document?: string;
474
+ }[];
475
+ tools?: {
476
+ name?: string;
477
+ description?: string;
478
+ parameters?: {
479
+ type?: "object" | "array";
480
+ properties?: Record<string, {
481
+ type?: string;
482
+ format?: string;
483
+ pattern?: string;
484
+ }>;
485
+ required?: string[];
486
+ };
487
+ requestStartMessage?: string;
488
+ operation?: {
489
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
490
+ url?: string;
491
+ waitForResponse?: boolean;
492
+ headers?: Record<string, string>;
493
+ };
494
+ }[];
495
+ }, {
496
+ provider?: import("@fonoster/common").LanguageModelProvider;
497
+ apiKey?: string;
498
+ model?: string;
499
+ temperature?: number;
500
+ maxTokens?: number;
501
+ baseUrl?: string;
502
+ knowledgeBase?: {
503
+ type?: "s3";
504
+ title?: string;
505
+ document?: string;
506
+ }[];
507
+ tools?: {
508
+ name?: string;
509
+ description?: string;
510
+ parameters?: {
511
+ type?: "object" | "array";
512
+ properties?: Record<string, {
513
+ type?: string;
514
+ format?: string;
515
+ pattern?: string;
516
+ }>;
517
+ required?: string[];
518
+ };
519
+ requestStartMessage?: string;
520
+ operation?: {
521
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
522
+ url?: string;
523
+ waitForResponse?: boolean;
524
+ headers?: Record<string, string>;
525
+ };
526
+ }[];
527
+ }>, {
528
+ provider?: import("@fonoster/common").LanguageModelProvider;
529
+ apiKey?: string;
530
+ model?: string;
531
+ temperature?: number;
532
+ maxTokens?: number;
533
+ baseUrl?: string;
534
+ knowledgeBase?: {
535
+ type?: "s3";
536
+ title?: string;
537
+ document?: string;
538
+ }[];
539
+ tools?: {
540
+ name?: string;
541
+ description?: string;
542
+ parameters?: {
543
+ type?: "object" | "array";
544
+ properties?: Record<string, {
545
+ type?: string;
546
+ format?: string;
547
+ pattern?: string;
548
+ }>;
549
+ required?: string[];
550
+ };
551
+ requestStartMessage?: string;
552
+ operation?: {
553
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
554
+ url?: string;
555
+ waitForResponse?: boolean;
556
+ headers?: Record<string, string>;
557
+ };
558
+ }[];
559
+ }, {
560
+ provider?: import("@fonoster/common").LanguageModelProvider;
561
+ apiKey?: string;
562
+ model?: string;
563
+ temperature?: number;
564
+ maxTokens?: number;
565
+ baseUrl?: string;
566
+ knowledgeBase?: {
567
+ type?: "s3";
568
+ title?: string;
569
+ document?: string;
570
+ }[];
571
+ tools?: {
572
+ name?: string;
573
+ description?: string;
574
+ parameters?: {
575
+ type?: "object" | "array";
576
+ properties?: Record<string, {
577
+ type?: string;
578
+ format?: string;
579
+ pattern?: string;
580
+ }>;
581
+ required?: string[];
582
+ };
583
+ requestStartMessage?: string;
584
+ operation?: {
585
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
586
+ url?: string;
587
+ waitForResponse?: boolean;
588
+ headers?: Record<string, string>;
589
+ };
590
+ }[];
591
+ }>;
592
+ }>, "strip", z.ZodTypeAny, {
593
+ languageModel?: {
594
+ provider?: import("@fonoster/common").LanguageModelProvider;
595
+ apiKey?: string;
596
+ model?: string;
597
+ temperature?: number;
598
+ maxTokens?: number;
599
+ baseUrl?: string;
600
+ knowledgeBase?: {
601
+ type?: "s3";
602
+ title?: string;
603
+ document?: string;
604
+ }[];
605
+ tools?: {
606
+ name?: string;
607
+ description?: string;
608
+ parameters?: {
609
+ type?: "object" | "array";
610
+ properties?: Record<string, {
611
+ type?: string;
612
+ format?: string;
613
+ pattern?: string;
614
+ }>;
615
+ required?: string[];
616
+ };
617
+ requestStartMessage?: string;
618
+ operation?: {
619
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
620
+ url?: string;
621
+ waitForResponse?: boolean;
622
+ headers?: Record<string, string>;
623
+ };
624
+ }[];
625
+ };
626
+ conversationSettings?: {
627
+ firstMessage?: string;
628
+ systemTemplate?: string;
629
+ goodbyeMessage?: string;
630
+ systemErrorMessage?: string;
631
+ initialDtmf?: string;
632
+ maxSpeechWaitTimeout?: number;
633
+ transferOptions?: {
634
+ message?: string;
635
+ phoneNumber?: string;
636
+ timeout?: number;
637
+ };
638
+ idleOptions?: {
639
+ message?: string;
640
+ timeout?: number;
641
+ maxTimeoutCount?: number;
642
+ };
643
+ vad?: {
644
+ pathToModel?: string;
645
+ activationThreshold?: number;
646
+ deactivationThreshold?: number;
647
+ debounceFrames?: number;
648
+ };
649
+ };
650
+ }, {
651
+ languageModel?: {
652
+ provider?: import("@fonoster/common").LanguageModelProvider;
653
+ apiKey?: string;
654
+ model?: string;
655
+ temperature?: number;
656
+ maxTokens?: number;
657
+ baseUrl?: string;
658
+ knowledgeBase?: {
659
+ type?: "s3";
660
+ title?: string;
661
+ document?: string;
662
+ }[];
663
+ tools?: {
664
+ name?: string;
665
+ description?: string;
666
+ parameters?: {
667
+ type?: "object" | "array";
668
+ properties?: Record<string, {
669
+ type?: string;
670
+ format?: string;
671
+ pattern?: string;
672
+ }>;
673
+ required?: string[];
674
+ };
675
+ requestStartMessage?: string;
676
+ operation?: {
677
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
678
+ url?: string;
679
+ waitForResponse?: boolean;
680
+ headers?: Record<string, string>;
681
+ };
682
+ }[];
683
+ };
684
+ conversationSettings?: {
685
+ firstMessage?: string;
686
+ systemTemplate?: string;
687
+ goodbyeMessage?: string;
688
+ systemErrorMessage?: string;
689
+ initialDtmf?: string;
690
+ maxSpeechWaitTimeout?: number;
691
+ transferOptions?: {
692
+ message?: string;
693
+ phoneNumber?: string;
694
+ timeout?: number;
695
+ };
696
+ idleOptions?: {
697
+ message?: string;
698
+ timeout?: number;
699
+ maxTimeoutCount?: number;
700
+ };
701
+ vad?: {
702
+ pathToModel?: string;
703
+ activationThreshold?: number;
704
+ deactivationThreshold?: number;
705
+ debounceFrames?: number;
706
+ };
707
+ };
708
+ }>;
709
+ }, "strip", z.ZodTypeAny, {
710
+ config?: {
711
+ languageModel?: {
712
+ provider?: import("@fonoster/common").LanguageModelProvider;
713
+ apiKey?: string;
714
+ model?: string;
715
+ temperature?: number;
716
+ maxTokens?: number;
717
+ baseUrl?: string;
718
+ knowledgeBase?: {
719
+ type?: "s3";
720
+ title?: string;
721
+ document?: string;
722
+ }[];
723
+ tools?: {
724
+ name?: string;
725
+ description?: string;
726
+ parameters?: {
727
+ type?: "object" | "array";
728
+ properties?: Record<string, {
729
+ type?: string;
730
+ format?: string;
731
+ pattern?: string;
732
+ }>;
733
+ required?: string[];
734
+ };
735
+ requestStartMessage?: string;
736
+ operation?: {
737
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
738
+ url?: string;
739
+ waitForResponse?: boolean;
740
+ headers?: Record<string, string>;
741
+ };
742
+ }[];
743
+ };
744
+ conversationSettings?: {
745
+ firstMessage?: string;
746
+ systemTemplate?: string;
747
+ goodbyeMessage?: string;
748
+ systemErrorMessage?: string;
749
+ initialDtmf?: string;
750
+ maxSpeechWaitTimeout?: number;
751
+ transferOptions?: {
752
+ message?: string;
753
+ phoneNumber?: string;
754
+ timeout?: number;
755
+ };
756
+ idleOptions?: {
757
+ message?: string;
758
+ timeout?: number;
759
+ maxTimeoutCount?: number;
760
+ };
761
+ vad?: {
762
+ pathToModel?: string;
763
+ activationThreshold?: number;
764
+ deactivationThreshold?: number;
765
+ debounceFrames?: number;
766
+ };
767
+ };
768
+ };
769
+ productRef?: string;
770
+ }, {
771
+ config?: {
772
+ languageModel?: {
773
+ provider?: import("@fonoster/common").LanguageModelProvider;
774
+ apiKey?: string;
775
+ model?: string;
776
+ temperature?: number;
777
+ maxTokens?: number;
778
+ baseUrl?: string;
779
+ knowledgeBase?: {
780
+ type?: "s3";
781
+ title?: string;
782
+ document?: string;
783
+ }[];
784
+ tools?: {
785
+ name?: string;
786
+ description?: string;
787
+ parameters?: {
788
+ type?: "object" | "array";
789
+ properties?: Record<string, {
790
+ type?: string;
791
+ format?: string;
792
+ pattern?: string;
793
+ }>;
794
+ required?: string[];
795
+ };
796
+ requestStartMessage?: string;
797
+ operation?: {
798
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
799
+ url?: string;
800
+ waitForResponse?: boolean;
801
+ headers?: Record<string, string>;
802
+ };
803
+ }[];
804
+ };
805
+ conversationSettings?: {
806
+ firstMessage?: string;
807
+ systemTemplate?: string;
808
+ goodbyeMessage?: string;
809
+ systemErrorMessage?: string;
810
+ initialDtmf?: string;
811
+ maxSpeechWaitTimeout?: number;
812
+ transferOptions?: {
813
+ message?: string;
814
+ phoneNumber?: string;
815
+ timeout?: number;
816
+ };
817
+ idleOptions?: {
818
+ message?: string;
819
+ timeout?: number;
820
+ maxTimeoutCount?: number;
821
+ };
822
+ vad?: {
823
+ pathToModel?: string;
824
+ activationThreshold?: number;
825
+ deactivationThreshold?: number;
826
+ debounceFrames?: number;
827
+ };
828
+ };
829
+ };
830
+ productRef?: string;
831
+ }>, {
832
+ config?: {
833
+ languageModel?: {
834
+ provider?: import("@fonoster/common").LanguageModelProvider;
835
+ apiKey?: string;
836
+ model?: string;
837
+ temperature?: number;
838
+ maxTokens?: number;
839
+ baseUrl?: string;
840
+ knowledgeBase?: {
841
+ type?: "s3";
842
+ title?: string;
843
+ document?: string;
844
+ }[];
845
+ tools?: {
846
+ name?: string;
847
+ description?: string;
848
+ parameters?: {
849
+ type?: "object" | "array";
850
+ properties?: Record<string, {
851
+ type?: string;
852
+ format?: string;
853
+ pattern?: string;
854
+ }>;
855
+ required?: string[];
856
+ };
857
+ requestStartMessage?: string;
858
+ operation?: {
859
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
860
+ url?: string;
861
+ waitForResponse?: boolean;
862
+ headers?: Record<string, string>;
863
+ };
864
+ }[];
865
+ };
866
+ conversationSettings?: {
867
+ firstMessage?: string;
868
+ systemTemplate?: string;
869
+ goodbyeMessage?: string;
870
+ systemErrorMessage?: string;
871
+ initialDtmf?: string;
872
+ maxSpeechWaitTimeout?: number;
873
+ transferOptions?: {
874
+ message?: string;
875
+ phoneNumber?: string;
876
+ timeout?: number;
877
+ };
878
+ idleOptions?: {
879
+ message?: string;
880
+ timeout?: number;
881
+ maxTimeoutCount?: number;
882
+ };
883
+ vad?: {
884
+ pathToModel?: string;
885
+ activationThreshold?: number;
886
+ deactivationThreshold?: number;
887
+ debounceFrames?: number;
888
+ };
889
+ };
890
+ };
891
+ productRef?: string;
892
+ }, {
893
+ config?: {
894
+ languageModel?: {
895
+ provider?: import("@fonoster/common").LanguageModelProvider;
896
+ apiKey?: string;
897
+ model?: string;
898
+ temperature?: number;
899
+ maxTokens?: number;
900
+ baseUrl?: string;
901
+ knowledgeBase?: {
902
+ type?: "s3";
903
+ title?: string;
904
+ document?: string;
905
+ }[];
906
+ tools?: {
907
+ name?: string;
908
+ description?: string;
909
+ parameters?: {
910
+ type?: "object" | "array";
911
+ properties?: Record<string, {
912
+ type?: string;
913
+ format?: string;
914
+ pattern?: string;
915
+ }>;
916
+ required?: string[];
917
+ };
918
+ requestStartMessage?: string;
919
+ operation?: {
920
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
921
+ url?: string;
922
+ waitForResponse?: boolean;
923
+ headers?: Record<string, string>;
924
+ };
925
+ }[];
926
+ };
927
+ conversationSettings?: {
928
+ firstMessage?: string;
929
+ systemTemplate?: string;
930
+ goodbyeMessage?: string;
931
+ systemErrorMessage?: string;
932
+ initialDtmf?: string;
933
+ maxSpeechWaitTimeout?: number;
934
+ transferOptions?: {
935
+ message?: string;
936
+ phoneNumber?: string;
937
+ timeout?: number;
938
+ };
939
+ idleOptions?: {
940
+ message?: string;
941
+ timeout?: number;
942
+ maxTimeoutCount?: number;
943
+ };
944
+ vad?: {
945
+ pathToModel?: string;
946
+ activationThreshold?: number;
947
+ deactivationThreshold?: number;
948
+ debounceFrames?: number;
949
+ };
950
+ };
951
+ };
952
+ productRef?: string;
953
+ }>;
954
+ }, "strip", z.ZodTypeAny, {
955
+ textToSpeech?: {
956
+ [x: string]: any;
957
+ productRef?: unknown;
958
+ config?: unknown;
959
+ };
960
+ speechToText?: {
961
+ [x: string]: any;
962
+ productRef?: unknown;
963
+ config?: unknown;
964
+ };
965
+ intelligence?: {
966
+ config?: {
967
+ languageModel?: {
968
+ provider?: import("@fonoster/common").LanguageModelProvider;
969
+ apiKey?: string;
970
+ model?: string;
971
+ temperature?: number;
972
+ maxTokens?: number;
973
+ baseUrl?: string;
974
+ knowledgeBase?: {
975
+ type?: "s3";
976
+ title?: string;
977
+ document?: string;
978
+ }[];
979
+ tools?: {
980
+ name?: string;
981
+ description?: string;
982
+ parameters?: {
983
+ type?: "object" | "array";
984
+ properties?: Record<string, {
985
+ type?: string;
986
+ format?: string;
987
+ pattern?: string;
988
+ }>;
989
+ required?: string[];
990
+ };
991
+ requestStartMessage?: string;
992
+ operation?: {
993
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
994
+ url?: string;
995
+ waitForResponse?: boolean;
996
+ headers?: Record<string, string>;
997
+ };
998
+ }[];
999
+ };
1000
+ conversationSettings?: {
1001
+ firstMessage?: string;
1002
+ systemTemplate?: string;
1003
+ goodbyeMessage?: string;
1004
+ systemErrorMessage?: string;
1005
+ initialDtmf?: string;
1006
+ maxSpeechWaitTimeout?: number;
1007
+ transferOptions?: {
1008
+ message?: string;
1009
+ phoneNumber?: string;
1010
+ timeout?: number;
1011
+ };
1012
+ idleOptions?: {
1013
+ message?: string;
1014
+ timeout?: number;
1015
+ maxTimeoutCount?: number;
1016
+ };
1017
+ vad?: {
1018
+ pathToModel?: string;
1019
+ activationThreshold?: number;
1020
+ deactivationThreshold?: number;
1021
+ debounceFrames?: number;
1022
+ };
1023
+ };
1024
+ };
1025
+ productRef?: string;
1026
+ };
1027
+ name?: string;
1028
+ type?: "EXTERNAL" | "AUTOPILOT";
1029
+ endpoint?: string;
1030
+ }, {
1031
+ textToSpeech?: {
1032
+ [x: string]: any;
1033
+ productRef?: unknown;
1034
+ config?: unknown;
1035
+ };
1036
+ speechToText?: {
1037
+ [x: string]: any;
1038
+ productRef?: unknown;
1039
+ config?: unknown;
1040
+ };
1041
+ intelligence?: {
1042
+ config?: {
1043
+ languageModel?: {
1044
+ provider?: import("@fonoster/common").LanguageModelProvider;
1045
+ apiKey?: string;
1046
+ model?: string;
1047
+ temperature?: number;
1048
+ maxTokens?: number;
1049
+ baseUrl?: string;
1050
+ knowledgeBase?: {
1051
+ type?: "s3";
1052
+ title?: string;
1053
+ document?: string;
1054
+ }[];
1055
+ tools?: {
1056
+ name?: string;
1057
+ description?: string;
1058
+ parameters?: {
1059
+ type?: "object" | "array";
1060
+ properties?: Record<string, {
1061
+ type?: string;
1062
+ format?: string;
1063
+ pattern?: string;
1064
+ }>;
1065
+ required?: string[];
1066
+ };
1067
+ requestStartMessage?: string;
1068
+ operation?: {
1069
+ type?: import("@fonoster/common/dist/assistants/tools/AllowedOperations").AllowedOperations;
1070
+ url?: string;
1071
+ waitForResponse?: boolean;
1072
+ headers?: Record<string, string>;
1073
+ };
1074
+ }[];
1075
+ };
1076
+ conversationSettings?: {
1077
+ firstMessage?: string;
1078
+ systemTemplate?: string;
1079
+ goodbyeMessage?: string;
1080
+ systemErrorMessage?: string;
1081
+ initialDtmf?: string;
1082
+ maxSpeechWaitTimeout?: number;
1083
+ transferOptions?: {
1084
+ message?: string;
1085
+ phoneNumber?: string;
1086
+ timeout?: number;
1087
+ };
1088
+ idleOptions?: {
1089
+ message?: string;
1090
+ timeout?: number;
1091
+ maxTimeoutCount?: number;
1092
+ };
1093
+ vad?: {
1094
+ pathToModel?: string;
1095
+ activationThreshold?: number;
1096
+ deactivationThreshold?: number;
1097
+ debounceFrames?: number;
1098
+ };
1099
+ };
1100
+ };
1101
+ productRef?: string;
1102
+ };
1103
+ name?: string;
1104
+ type?: "EXTERNAL" | "AUTOPILOT";
1105
+ endpoint?: string;
1106
+ }>;
1107
+ export { createValidationSchema };