@scout9/app 1.0.0-alpha.0.1.85 → 1.0.0-alpha.0.1.87

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/types/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  declare module '@scout9/app' {
2
2
  /**
3
3
  * Represents the configuration provided in src/index.{js | ts} in a project
4
+ * @deprecated use IScout9ProjectConfig
4
5
  */
5
6
  export interface Scout9ProjectConfig {
6
7
 
@@ -64,6 +65,7 @@ declare module '@scout9/app' {
64
65
 
65
66
  /**
66
67
  * Entity config the user provides
68
+ * @deprecated use IEntityConfiguration
67
69
  */
68
70
  export interface EntityBuildConfig {
69
71
  definitions?: {
@@ -85,6 +87,7 @@ declare module '@scout9/app' {
85
87
 
86
88
  /**
87
89
  * What gets exported to the scout9 backend, properties are constructed by @scout/app build
90
+ * @deprecated use IEntityRootProjectConfiguration instead
88
91
  */
89
92
  export interface ExportedEntityBuildConfig extends EntityBuildConfig {
90
93
  entities: string[];
@@ -100,15 +103,27 @@ declare module '@scout9/app' {
100
103
  } | null;
101
104
  }
102
105
 
106
+ /**
107
+ * @deprecated use IEntitiesRootProjectConfiguration instead
108
+ */
103
109
  export type EntitiesBuildConfig = ExportedEntityBuildConfig[];
104
110
 
111
+ /**
112
+ * @deprecated use IWorkflowConfiguration instead
113
+ */
105
114
  export type WorkflowBuildConfig = {
106
115
  entities: string[];
107
116
  entity: string;
108
117
  }
118
+
119
+ /**
120
+ * @deprecated use IWorkflowsConfiguration instead
121
+ */
109
122
  export type WorkflowsBuildConfig = WorkflowBuildConfig[];
123
+
110
124
  /**
111
125
  * Including the provided project config, this is the manifest for all entities and workflows to be managed in build
126
+ * @deprecated IScout9ProjectBuildConfig
112
127
  */
113
128
  export interface Scout9ProjectBuildConfig extends Scout9ProjectConfig {
114
129
  agents: Agent[];
@@ -131,6 +146,9 @@ declare module '@scout9/app' {
131
146
  mode?: 'remote' | 'local';
132
147
  }
133
148
 
149
+ /**
150
+ * @deprecated use IConversation
151
+ */
134
152
  export interface Conversation {
135
153
  $agent: string;
136
154
  $customer: string;
@@ -158,6 +176,9 @@ declare module '@scout9/app' {
158
176
  intentScore?: number | null;
159
177
  }
160
178
 
179
+ /**
180
+ * @deprecated use IMessage
181
+ */
161
182
  export interface Message {
162
183
  id: string;
163
184
 
@@ -185,6 +206,9 @@ declare module '@scout9/app' {
185
206
  intentScore?: number | null;
186
207
  }
187
208
 
209
+ /**
210
+ * @deprecated use ICustomer
211
+ */
188
212
  export interface Customer {
189
213
  id: string;
190
214
  name: string;
@@ -205,6 +229,9 @@ declare module '@scout9/app' {
205
229
  [key: string]: any;
206
230
  }
207
231
 
232
+ /**
233
+ * @deprecated use IAgent
234
+ */
208
235
  export interface Agent {
209
236
  // Generated Info
210
237
  id: string;
@@ -236,10 +263,14 @@ declare module '@scout9/app' {
236
263
  audios?: any[];
237
264
  }
238
265
 
266
+ /**
267
+ * @deprecated use IPersona
268
+ */
239
269
  export type Persona = Agent;
240
270
 
241
271
  /**
242
272
  * The input event provided to the application
273
+ * @deprecated use IWorkflowEvent
243
274
  */
244
275
  export interface WorkflowEvent<Type = any> {
245
276
  messages: Message[];
@@ -256,11 +287,17 @@ declare module '@scout9/app' {
256
287
  stagnationCount: number;
257
288
  }
258
289
 
290
+ /**
291
+ * @deprecated use IInstruction
292
+ */
259
293
  export interface Instruction {
260
294
  id: string;
261
295
  content: string;
262
296
  }
263
297
 
298
+ /**
299
+ * @deprecated use IWorkflowResponseSlot
300
+ */
264
301
  export interface WorkflowResponseSlot<Type = any> {
265
302
  forward?: string | boolean | {
266
303
  to?: string;
@@ -281,89 +318,15 @@ declare module '@scout9/app' {
281
318
  resetIntent?: boolean;
282
319
  }
283
320
 
321
+ /**
322
+ * @deprecated use IWorkflowResponse
323
+ */
284
324
  export type WorkflowResponse<Type = any> = WorkflowResponseSlot<Type> | WorkflowResponseSlot<Type>[];
285
325
 
326
+ /**
327
+ * @deprecated use IWorkflowFunction
328
+ */
286
329
  export type WorkflowFunction<Type = any> = (event: WorkflowEvent) => Promise<WorkflowResponse<Type>> | WorkflowResponse<Type>;
287
-
288
- export function json<Type = any>(data: Type, init?: ResponseInit): Promise<EventResponse<Type>>;
289
-
290
- export function run<Type = any>(event: WorkflowEvent, options?: RunOptions): Promise<WorkflowResponse<Type>>;
291
-
292
- export function sendEvent<Type = any>(event: WorkflowEvent, options?: RunOptions): Promise<WorkflowResponse<Type>>;
293
-
294
- export function build(options?: BuildOptions): Promise<Scout9ProjectBuildConfig>;
295
-
296
- export function deploy(options?: DeployOptions): Promise<Scout9ProjectBuildConfig>;
297
-
298
- export class EventResponse<Type = any> {
299
- /**
300
- * Static method to create an EventResponse object.
301
- * @param body The body of the response, expected to be an object.
302
- * @param options Additional options for the response.
303
- */
304
- static json<Type = any>(body: object, options?: ResponseInit): EventResponse<Type>;
305
-
306
- /**
307
- * The body of the response.
308
- */
309
- body: object;
310
-
311
- // Alias to body
312
- readonly data: object;
313
-
314
- /**
315
- * Initialization options for the response.
316
- */
317
- init?: ResponseInit;
318
-
319
- /**
320
- * Creates an instance of EventResponse.
321
- * @param body The body of the response, expected to be an object.
322
- * @param init Initialization options for the response.
323
- */
324
- constructor(body: Type, init?: ResponseInit);
325
-
326
- /**
327
- * Returns a Response object with JSON body.
328
- */
329
- readonly response: Response;
330
- }
331
-
332
- export type ApiFunctionParams<Params = Record<string, string>> = {
333
- searchParams: {[key: string]: string | string[] };
334
- params: Params;
335
- }
336
- // export type ApiEntityFunctionParams<Params = Record<string, string>> = ApiFunctionParams<Params> & {id: string};
337
- export type ApiFunction<Params = Record<string, string>, Response = any> = (params: ApiFunctionParams<Params>) => Promise<EventResponse<Response>>;
338
- export type QueryApiFunction<Params = Record<string, string>, Response = any> = (params: ApiFunctionParams<Params>) => Promise<EventResponse<Response>>;
339
- export type GetApiFunction<Params = Record<string, string>, Response = any> = (params: ApiFunctionParams<Params>) => Promise<EventResponse<Response>>;
340
- export type PostApiFunction<Params = Record<string, string>, RequestBody = any, Response = any> = (params: ApiFunctionParams<Params> & {body: Partial<RequestBody>}) => Promise<EventResponse<Response>>;
341
- export type PutApiFunction<Params = Record<string, string>, RequestBody = any, Response = any> = (params: ApiFunctionParams<Params> & {body: Partial<RequestBody>}) => Promise<EventResponse<Response>>;
342
- export type PatchApiFunction<Params = Record<string, string>, RequestBody = any, Response = any> = (params: ApiFunctionParams<Params> & {body: Partial<RequestBody>}) => Promise<EventResponse<Response>>;
343
- export type DeleteApiFunction<Params = Record<string, string>, Response = any> = (params: ApiFunctionParams<Params>) => Promise<EventResponse<Response>>;
344
-
345
-
346
- export type mimicCustomerMessage = (input: {
347
- message: string;
348
- messages?: Message[];
349
- workflowFn: WorkflowFunction;
350
- customer?: Customer;
351
- context?: any;
352
- /**
353
- * Agent or persona id
354
- */
355
- persona?: string;
356
-
357
- conversation?: Conversation;
358
-
359
- cwd?: string;
360
- src?: string;
361
- mode?: 'development' | 'production';
362
- }) => Promise<{
363
- messages: Message[];
364
- conversation: Conversation;
365
- context: any;
366
- }>
367
330
  }
368
331
 
369
332
  declare module '@scout9/app/testing-tools' {
@@ -539,312 +502,672 @@ declare module '@scout9/app/testing-tools' {
539
502
 
540
503
  declare module '@scout9/app/types' {
541
504
  import type { z } from 'zod';
542
- export const Scout9ProjectBuildConfigSchema: z.ZodObject<{
543
- tag: z.ZodOptional<z.ZodString>;
544
- agents: z.ZodArray<z.ZodObject<{
545
- deployed: z.ZodOptional<z.ZodObject<{
546
- web: z.ZodOptional<z.ZodString>;
547
- phone: z.ZodOptional<z.ZodString>;
548
- email: z.ZodOptional<z.ZodString>;
549
- }, "strip", z.ZodTypeAny, {
550
- web?: string | undefined;
551
- phone?: string | undefined;
552
- email?: string | undefined;
553
- }, {
554
- web?: string | undefined;
555
- phone?: string | undefined;
556
- email?: string | undefined;
557
- }>>;
558
- firstName: z.ZodOptional<z.ZodString>;
559
- lastName: z.ZodOptional<z.ZodString>;
560
- inactive: z.ZodOptional<z.ZodBoolean>;
561
- programmablePhoneNumber: z.ZodOptional<z.ZodString>;
562
- programmablePhoneNumberSid: z.ZodOptional<z.ZodString>;
563
- programmableEmail: z.ZodOptional<z.ZodString>;
564
- forwardEmail: z.ZodOptional<z.ZodString>;
565
- forwardPhone: z.ZodOptional<z.ZodString>;
566
- title: z.ZodDefault<z.ZodOptional<z.ZodString>>;
567
- context: z.ZodDefault<z.ZodOptional<z.ZodString>>;
568
- includedLocations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
569
- excludedLocations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
570
- model: z.ZodDefault<z.ZodOptional<z.ZodEnum<["Scout9", "bard", "openai"]>>>;
571
- transcripts: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
572
- content: z.ZodString;
573
- role: z.ZodEnum<["agent", "customer", "system"]>;
574
- time: z.ZodString;
575
- name: z.ZodOptional<z.ZodString>;
576
- }, "strip", z.ZodTypeAny, {
577
- time: string;
578
- content: string;
579
- role: "agent" | "customer" | "system";
580
- name?: string | undefined;
581
- }, {
582
- time: string;
583
- content: string;
584
- role: "agent" | "customer" | "system";
585
- name?: string | undefined;
586
- }>, "many">, "many">>;
587
- audios: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
505
+ export const customerValueSchema: z.ZodUnion<[z.ZodBoolean, z.ZodNumber, z.ZodString]>;
506
+
507
+ export const customerSchema: z.ZodObject<{
508
+ firstName: z.ZodOptional<z.ZodString>;
509
+ lastName: z.ZodOptional<z.ZodString>;
510
+ name: z.ZodString;
511
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
512
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
513
+ img: z.ZodOptional<z.ZodNullable<z.ZodString>>;
514
+ neighborhood: z.ZodOptional<z.ZodNullable<z.ZodString>>;
515
+ city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
516
+ country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
517
+ line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
518
+ line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
519
+ postal_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
520
+ state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
521
+ town: z.ZodOptional<z.ZodNullable<z.ZodString>>;
522
+ joined: z.ZodOptional<z.ZodNullable<z.ZodString>>;
523
+ stripe: z.ZodOptional<z.ZodNullable<z.ZodString>>;
524
+ stripeDev: z.ZodOptional<z.ZodNullable<z.ZodString>>;
525
+ }, "strip", z.ZodUnion<[z.ZodBoolean, z.ZodNumber, z.ZodString]>, z.objectOutputType<{
526
+ firstName: z.ZodOptional<z.ZodString>;
527
+ lastName: z.ZodOptional<z.ZodString>;
528
+ name: z.ZodString;
529
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
530
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
531
+ img: z.ZodOptional<z.ZodNullable<z.ZodString>>;
532
+ neighborhood: z.ZodOptional<z.ZodNullable<z.ZodString>>;
533
+ city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
534
+ country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
535
+ line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
536
+ line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
537
+ postal_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
538
+ state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
539
+ town: z.ZodOptional<z.ZodNullable<z.ZodString>>;
540
+ joined: z.ZodOptional<z.ZodNullable<z.ZodString>>;
541
+ stripe: z.ZodOptional<z.ZodNullable<z.ZodString>>;
542
+ stripeDev: z.ZodOptional<z.ZodNullable<z.ZodString>>;
543
+ }, z.ZodUnion<[z.ZodBoolean, z.ZodNumber, z.ZodString]>, "strip">, z.objectInputType<{
544
+ firstName: z.ZodOptional<z.ZodString>;
545
+ lastName: z.ZodOptional<z.ZodString>;
546
+ name: z.ZodString;
547
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
548
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
549
+ img: z.ZodOptional<z.ZodNullable<z.ZodString>>;
550
+ neighborhood: z.ZodOptional<z.ZodNullable<z.ZodString>>;
551
+ city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
552
+ country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
553
+ line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
554
+ line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
555
+ postal_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
556
+ state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
557
+ town: z.ZodOptional<z.ZodNullable<z.ZodString>>;
558
+ joined: z.ZodOptional<z.ZodNullable<z.ZodString>>;
559
+ stripe: z.ZodOptional<z.ZodNullable<z.ZodString>>;
560
+ stripeDev: z.ZodOptional<z.ZodNullable<z.ZodString>>;
561
+ }, z.ZodUnion<[z.ZodBoolean, z.ZodNumber, z.ZodString]>, "strip">>;
562
+
563
+ export const agentBaseConfigurationSchema: z.ZodObject<{
564
+ deployed: z.ZodOptional<z.ZodObject<{
565
+ web: z.ZodOptional<z.ZodString>;
566
+ phone: z.ZodOptional<z.ZodString>;
567
+ email: z.ZodOptional<z.ZodString>;
588
568
  }, "strip", z.ZodTypeAny, {
589
- title: string;
590
- context: string;
591
- model: "openai" | "bard" | "Scout9";
592
- deployed?: {
593
- web?: string | undefined;
594
- phone?: string | undefined;
595
- email?: string | undefined;
596
- } | undefined;
597
- firstName?: string | undefined;
598
- lastName?: string | undefined;
599
- inactive?: boolean | undefined;
600
- programmablePhoneNumber?: string | undefined;
601
- programmablePhoneNumberSid?: string | undefined;
602
- programmableEmail?: string | undefined;
603
- forwardEmail?: string | undefined;
604
- forwardPhone?: string | undefined;
605
- includedLocations?: string[] | undefined;
606
- excludedLocations?: string[] | undefined;
607
- transcripts?: {
608
- time: string;
609
- content: string;
610
- role: "agent" | "customer" | "system";
611
- name?: string | undefined;
612
- }[][] | undefined;
613
- audios?: any[] | undefined;
569
+ web?: string | undefined;
570
+ phone?: string | undefined;
571
+ email?: string | undefined;
614
572
  }, {
615
- deployed?: {
616
- web?: string | undefined;
617
- phone?: string | undefined;
618
- email?: string | undefined;
619
- } | undefined;
620
- firstName?: string | undefined;
621
- lastName?: string | undefined;
622
- inactive?: boolean | undefined;
623
- programmablePhoneNumber?: string | undefined;
624
- programmablePhoneNumberSid?: string | undefined;
625
- programmableEmail?: string | undefined;
626
- forwardEmail?: string | undefined;
627
- forwardPhone?: string | undefined;
628
- title?: string | undefined;
629
- context?: string | undefined;
630
- includedLocations?: string[] | undefined;
631
- excludedLocations?: string[] | undefined;
632
- model?: "openai" | "bard" | "Scout9" | undefined;
633
- transcripts?: {
634
- time: string;
635
- content: string;
636
- role: "agent" | "customer" | "system";
637
- name?: string | undefined;
638
- }[][] | undefined;
639
- audios?: any[] | undefined;
640
- }>, "many">;
641
- entities: z.ZodArray<z.ZodEffects<z.ZodObject<{
642
- id: any;
643
- training: z.ZodOptional<z.ZodArray<z.ZodObject<{
644
- intent: ZodString;
645
- text: z.ZodString;
646
- }, "strip", z.ZodTypeAny, {
647
- text: string;
648
- intent?: any;
649
- }, {
650
- text: string;
651
- intent?: any;
652
- }>, "many">>;
653
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
654
- text: z.ZodString;
655
- expected: z.ZodObject<{
656
- intent: ZodString;
657
- context: z.ZodAny;
658
- }, "strip", z.ZodTypeAny, {
659
- intent?: any;
660
- context?: any;
661
- }, {
662
- intent?: any;
663
- context?: any;
664
- }>;
665
- }, "strip", z.ZodTypeAny, {
666
- text: string;
667
- expected: {
668
- intent?: any;
669
- context?: any;
670
- };
671
- }, {
672
- text: string;
673
- expected: {
674
- intent?: any;
675
- context?: any;
676
- };
677
- }>, "many">>;
678
- definitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
679
- utterance: any;
680
- value: z.ZodString;
681
- text: z.ZodArray<z.ZodString, "many">;
682
- }, "strip", z.ZodTypeAny, {
683
- [x: string]: any;
684
- utterance?: any;
685
- value?: string | undefined;
686
- text?: string[] | undefined;
687
- }, {
688
- [x: string]: any;
689
- utterance?: any;
690
- value?: string | undefined;
691
- text?: string[] | undefined;
692
- }>, "many">>;
693
- entities: z.ZodArray<ZodString, "many">;
694
- entity: ZodString;
695
- api: z.ZodNullable<z.ZodObject<{
696
- GET: z.ZodOptional<z.ZodBoolean>;
697
- UPDATE: z.ZodOptional<z.ZodBoolean>;
698
- QUERY: z.ZodOptional<z.ZodBoolean>;
699
- PUT: z.ZodOptional<z.ZodBoolean>;
700
- PATCH: z.ZodOptional<z.ZodBoolean>;
701
- DELETE: z.ZodOptional<z.ZodBoolean>;
702
- }, "strip", z.ZodTypeAny, {
703
- GET?: boolean | undefined;
704
- UPDATE?: boolean | undefined;
705
- QUERY?: boolean | undefined;
706
- PUT?: boolean | undefined;
707
- PATCH?: boolean | undefined;
708
- DELETE?: boolean | undefined;
709
- }, {
710
- GET?: boolean | undefined;
711
- UPDATE?: boolean | undefined;
712
- QUERY?: boolean | undefined;
713
- PUT?: boolean | undefined;
714
- PATCH?: boolean | undefined;
715
- DELETE?: boolean | undefined;
716
- }>>;
717
- }, "strict", z.ZodTypeAny, {
718
- [x: string]: any;
719
- id?: any;
720
- training?: {
721
- text: string;
722
- intent?: any;
723
- }[] | undefined;
724
- tests?: {
725
- text: string;
726
- expected: {
727
- intent?: any;
728
- context?: any;
729
- };
730
- }[] | undefined;
731
- definitions?: {
732
- [x: string]: any;
733
- utterance?: any;
734
- value?: string | undefined;
735
- text?: string[] | undefined;
736
- }[] | undefined;
737
- entities?: ZodString[] | undefined;
738
- entity?: any;
739
- api?: {
740
- GET?: boolean | undefined;
741
- UPDATE?: boolean | undefined;
742
- QUERY?: boolean | undefined;
743
- PUT?: boolean | undefined;
744
- PATCH?: boolean | undefined;
745
- DELETE?: boolean | undefined;
746
- } | null | undefined;
573
+ web?: string | undefined;
574
+ phone?: string | undefined;
575
+ email?: string | undefined;
576
+ }>>;
577
+ img: z.ZodOptional<z.ZodNullable<z.ZodString>>;
578
+ firstName: z.ZodOptional<z.ZodString>;
579
+ lastName: z.ZodOptional<z.ZodString>;
580
+ inactive: z.ZodOptional<z.ZodBoolean>;
581
+ programmablePhoneNumber: z.ZodOptional<z.ZodString>;
582
+ programmablePhoneNumberSid: z.ZodOptional<z.ZodString>;
583
+ programmableEmail: z.ZodOptional<z.ZodString>;
584
+ forwardEmail: z.ZodOptional<z.ZodString>;
585
+ forwardPhone: z.ZodOptional<z.ZodString>;
586
+ title: z.ZodDefault<z.ZodOptional<z.ZodString>>;
587
+ context: z.ZodDefault<z.ZodOptional<z.ZodString>>;
588
+ includedLocations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
589
+ excludedLocations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
590
+ model: z.ZodDefault<z.ZodOptional<z.ZodEnum<["Scout9", "bard", "openai"]>>>;
591
+ transcripts: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
592
+ id: z.ZodString;
593
+ role: z.ZodEnum<["agent", "customer", "system"]>;
594
+ content: z.ZodString;
595
+ time: z.ZodString;
596
+ name: z.ZodOptional<z.ZodString>;
597
+ scheduled: z.ZodOptional<z.ZodString>;
598
+ context: z.ZodOptional<z.ZodAny>;
599
+ intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
600
+ intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
601
+ }, "strip", z.ZodTypeAny, {
602
+ time: string;
603
+ id: string;
604
+ content: string;
605
+ role: "agent" | "customer" | "system";
606
+ name?: string | undefined;
607
+ scheduled?: string | undefined;
608
+ context?: any;
609
+ intent?: string | null | undefined;
610
+ intentScore?: number | null | undefined;
747
611
  }, {
748
- [x: string]: any;
749
- id?: any;
750
- training?: {
751
- text: string;
752
- intent?: any;
753
- }[] | undefined;
754
- tests?: {
755
- text: string;
756
- expected: {
757
- intent?: any;
758
- context?: any;
759
- };
760
- }[] | undefined;
761
- definitions?: {
762
- [x: string]: any;
763
- utterance?: any;
764
- value?: string | undefined;
765
- text?: string[] | undefined;
766
- }[] | undefined;
767
- entities?: ZodString[] | undefined;
768
- entity?: any;
769
- api?: {
770
- GET?: boolean | undefined;
771
- UPDATE?: boolean | undefined;
772
- QUERY?: boolean | undefined;
773
- PUT?: boolean | undefined;
774
- PATCH?: boolean | undefined;
775
- DELETE?: boolean | undefined;
776
- } | null | undefined;
777
- }>, {
778
- [x: string]: any;
779
- id?: any;
780
- training?: {
781
- text: string;
782
- intent?: any;
783
- }[] | undefined;
784
- tests?: {
785
- text: string;
786
- expected: {
787
- intent?: any;
788
- context?: any;
789
- };
790
- }[] | undefined;
791
- definitions?: {
792
- [x: string]: any;
793
- utterance?: any;
794
- value?: string | undefined;
795
- text?: string[] | undefined;
796
- }[] | undefined;
797
- entities?: ZodString[] | undefined;
798
- entity?: any;
799
- api?: {
800
- GET?: boolean | undefined;
801
- UPDATE?: boolean | undefined;
802
- QUERY?: boolean | undefined;
803
- PUT?: boolean | undefined;
804
- PATCH?: boolean | undefined;
805
- DELETE?: boolean | undefined;
806
- } | null | undefined;
612
+ time: string;
613
+ id: string;
614
+ content: string;
615
+ role: "agent" | "customer" | "system";
616
+ name?: string | undefined;
617
+ scheduled?: string | undefined;
618
+ context?: any;
619
+ intent?: string | null | undefined;
620
+ intentScore?: number | null | undefined;
621
+ }>, "many">, "many">>;
622
+ audios: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
623
+ }, "strip", z.ZodTypeAny, {
624
+ title: string;
625
+ context: string;
626
+ model: "openai" | "bard" | "Scout9";
627
+ deployed?: {
628
+ web?: string | undefined;
629
+ phone?: string | undefined;
630
+ email?: string | undefined;
631
+ } | undefined;
632
+ img?: string | null | undefined;
633
+ firstName?: string | undefined;
634
+ lastName?: string | undefined;
635
+ inactive?: boolean | undefined;
636
+ programmablePhoneNumber?: string | undefined;
637
+ programmablePhoneNumberSid?: string | undefined;
638
+ programmableEmail?: string | undefined;
639
+ forwardEmail?: string | undefined;
640
+ forwardPhone?: string | undefined;
641
+ includedLocations?: string[] | undefined;
642
+ excludedLocations?: string[] | undefined;
643
+ transcripts?: {
644
+ time: string;
645
+ id: string;
646
+ content: string;
647
+ role: "agent" | "customer" | "system";
648
+ name?: string | undefined;
649
+ scheduled?: string | undefined;
650
+ context?: any;
651
+ intent?: string | null | undefined;
652
+ intentScore?: number | null | undefined;
653
+ }[][] | undefined;
654
+ audios?: any[] | undefined;
655
+ }, {
656
+ deployed?: {
657
+ web?: string | undefined;
658
+ phone?: string | undefined;
659
+ email?: string | undefined;
660
+ } | undefined;
661
+ img?: string | null | undefined;
662
+ firstName?: string | undefined;
663
+ lastName?: string | undefined;
664
+ inactive?: boolean | undefined;
665
+ programmablePhoneNumber?: string | undefined;
666
+ programmablePhoneNumberSid?: string | undefined;
667
+ programmableEmail?: string | undefined;
668
+ forwardEmail?: string | undefined;
669
+ forwardPhone?: string | undefined;
670
+ title?: string | undefined;
671
+ context?: string | undefined;
672
+ includedLocations?: string[] | undefined;
673
+ excludedLocations?: string[] | undefined;
674
+ model?: "openai" | "bard" | "Scout9" | undefined;
675
+ transcripts?: {
676
+ time: string;
677
+ id: string;
678
+ content: string;
679
+ role: "agent" | "customer" | "system";
680
+ name?: string | undefined;
681
+ scheduled?: string | undefined;
682
+ context?: any;
683
+ intent?: string | null | undefined;
684
+ intentScore?: number | null | undefined;
685
+ }[][] | undefined;
686
+ audios?: any[] | undefined;
687
+ }>;
688
+
689
+ export const agentConfigurationSchema: z.ZodObject<{
690
+ inactive: z.ZodOptional<z.ZodBoolean>;
691
+ img: z.ZodOptional<z.ZodNullable<z.ZodString>>;
692
+ title: z.ZodDefault<z.ZodOptional<z.ZodString>>;
693
+ context: z.ZodDefault<z.ZodOptional<z.ZodString>>;
694
+ firstName: z.ZodOptional<z.ZodString>;
695
+ lastName: z.ZodOptional<z.ZodString>;
696
+ transcripts: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
697
+ id: z.ZodString;
698
+ role: z.ZodEnum<["agent", "customer", "system"]>;
699
+ content: z.ZodString;
700
+ time: z.ZodString;
701
+ name: z.ZodOptional<z.ZodString>;
702
+ scheduled: z.ZodOptional<z.ZodString>;
703
+ context: z.ZodOptional<z.ZodAny>;
704
+ intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
705
+ intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
706
+ }, "strip", z.ZodTypeAny, {
707
+ time: string;
708
+ id: string;
709
+ content: string;
710
+ role: "agent" | "customer" | "system";
711
+ name?: string | undefined;
712
+ scheduled?: string | undefined;
713
+ context?: any;
714
+ intent?: string | null | undefined;
715
+ intentScore?: number | null | undefined;
807
716
  }, {
808
- [x: string]: any;
809
- id?: any;
810
- training?: {
811
- text: string;
812
- intent?: any;
813
- }[] | undefined;
814
- tests?: {
815
- text: string;
816
- expected: {
817
- intent?: any;
818
- context?: any;
819
- };
820
- }[] | undefined;
821
- definitions?: {
822
- [x: string]: any;
823
- utterance?: any;
824
- value?: string | undefined;
825
- text?: string[] | undefined;
826
- }[] | undefined;
827
- entities?: ZodString[] | undefined;
828
- entity?: any;
829
- api?: {
830
- GET?: boolean | undefined;
831
- UPDATE?: boolean | undefined;
832
- QUERY?: boolean | undefined;
833
- PUT?: boolean | undefined;
834
- PATCH?: boolean | undefined;
835
- DELETE?: boolean | undefined;
836
- } | null | undefined;
837
- }>, "many">;
838
- workflows: z.ZodArray<z.ZodObject<{
839
- entities: z.ZodArray<ZodString, "many">;
840
- entity: ZodString;
717
+ time: string;
718
+ id: string;
719
+ content: string;
720
+ role: "agent" | "customer" | "system";
721
+ name?: string | undefined;
722
+ scheduled?: string | undefined;
723
+ context?: any;
724
+ intent?: string | null | undefined;
725
+ intentScore?: number | null | undefined;
726
+ }>, "many">, "many">>;
727
+ audios: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
728
+ includedLocations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
729
+ excludedLocations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
730
+ model: z.ZodDefault<z.ZodOptional<z.ZodEnum<["Scout9", "bard", "openai"]>>>;
731
+ deployed: z.ZodOptional<z.ZodObject<{
732
+ web: z.ZodOptional<z.ZodString>;
733
+ phone: z.ZodOptional<z.ZodString>;
734
+ email: z.ZodOptional<z.ZodString>;
841
735
  }, "strip", z.ZodTypeAny, {
842
- entities: ZodString[];
843
- entity?: any;
736
+ web?: string | undefined;
737
+ phone?: string | undefined;
738
+ email?: string | undefined;
844
739
  }, {
845
- entities: ZodString[];
846
- entity?: any;
847
- }>, "many">;
740
+ web?: string | undefined;
741
+ phone?: string | undefined;
742
+ email?: string | undefined;
743
+ }>>;
744
+ programmablePhoneNumber: z.ZodOptional<z.ZodString>;
745
+ programmablePhoneNumberSid: z.ZodOptional<z.ZodString>;
746
+ programmableEmail: z.ZodOptional<z.ZodString>;
747
+ forwardEmail: z.ZodOptional<z.ZodString>;
748
+ forwardPhone: z.ZodOptional<z.ZodString>;
749
+ id: z.ZodString;
750
+ }, "strip", z.ZodTypeAny, {
751
+ id: string;
752
+ title: string;
753
+ context: string;
754
+ model: "openai" | "bard" | "Scout9";
755
+ inactive?: boolean | undefined;
756
+ img?: string | null | undefined;
757
+ firstName?: string | undefined;
758
+ lastName?: string | undefined;
759
+ transcripts?: {
760
+ time: string;
761
+ id: string;
762
+ content: string;
763
+ role: "agent" | "customer" | "system";
764
+ name?: string | undefined;
765
+ scheduled?: string | undefined;
766
+ context?: any;
767
+ intent?: string | null | undefined;
768
+ intentScore?: number | null | undefined;
769
+ }[][] | undefined;
770
+ audios?: any[] | undefined;
771
+ includedLocations?: string[] | undefined;
772
+ excludedLocations?: string[] | undefined;
773
+ deployed?: {
774
+ web?: string | undefined;
775
+ phone?: string | undefined;
776
+ email?: string | undefined;
777
+ } | undefined;
778
+ programmablePhoneNumber?: string | undefined;
779
+ programmablePhoneNumberSid?: string | undefined;
780
+ programmableEmail?: string | undefined;
781
+ forwardEmail?: string | undefined;
782
+ forwardPhone?: string | undefined;
783
+ }, {
784
+ id: string;
785
+ inactive?: boolean | undefined;
786
+ img?: string | null | undefined;
787
+ title?: string | undefined;
788
+ context?: string | undefined;
789
+ firstName?: string | undefined;
790
+ lastName?: string | undefined;
791
+ transcripts?: {
792
+ time: string;
793
+ id: string;
794
+ content: string;
795
+ role: "agent" | "customer" | "system";
796
+ name?: string | undefined;
797
+ scheduled?: string | undefined;
798
+ context?: any;
799
+ intent?: string | null | undefined;
800
+ intentScore?: number | null | undefined;
801
+ }[][] | undefined;
802
+ audios?: any[] | undefined;
803
+ includedLocations?: string[] | undefined;
804
+ excludedLocations?: string[] | undefined;
805
+ model?: "openai" | "bard" | "Scout9" | undefined;
806
+ deployed?: {
807
+ web?: string | undefined;
808
+ phone?: string | undefined;
809
+ email?: string | undefined;
810
+ } | undefined;
811
+ programmablePhoneNumber?: string | undefined;
812
+ programmablePhoneNumberSid?: string | undefined;
813
+ programmableEmail?: string | undefined;
814
+ forwardEmail?: string | undefined;
815
+ forwardPhone?: string | undefined;
816
+ }>;
817
+
818
+ export const agentsConfigurationSchema: z.ZodArray<z.ZodObject<{
819
+ inactive: z.ZodOptional<z.ZodBoolean>;
820
+ img: z.ZodOptional<z.ZodNullable<z.ZodString>>;
821
+ title: z.ZodDefault<z.ZodOptional<z.ZodString>>;
822
+ context: z.ZodDefault<z.ZodOptional<z.ZodString>>;
823
+ firstName: z.ZodOptional<z.ZodString>;
824
+ lastName: z.ZodOptional<z.ZodString>;
825
+ transcripts: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
826
+ id: z.ZodString;
827
+ role: z.ZodEnum<["agent", "customer", "system"]>;
828
+ content: z.ZodString;
829
+ time: z.ZodString;
830
+ name: z.ZodOptional<z.ZodString>;
831
+ scheduled: z.ZodOptional<z.ZodString>;
832
+ context: z.ZodOptional<z.ZodAny>;
833
+ intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
834
+ intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
835
+ }, "strip", z.ZodTypeAny, {
836
+ time: string;
837
+ id: string;
838
+ content: string;
839
+ role: "agent" | "customer" | "system";
840
+ name?: string | undefined;
841
+ scheduled?: string | undefined;
842
+ context?: any;
843
+ intent?: string | null | undefined;
844
+ intentScore?: number | null | undefined;
845
+ }, {
846
+ time: string;
847
+ id: string;
848
+ content: string;
849
+ role: "agent" | "customer" | "system";
850
+ name?: string | undefined;
851
+ scheduled?: string | undefined;
852
+ context?: any;
853
+ intent?: string | null | undefined;
854
+ intentScore?: number | null | undefined;
855
+ }>, "many">, "many">>;
856
+ audios: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
857
+ includedLocations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
858
+ excludedLocations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
859
+ model: z.ZodDefault<z.ZodOptional<z.ZodEnum<["Scout9", "bard", "openai"]>>>;
860
+ deployed: z.ZodOptional<z.ZodObject<{
861
+ web: z.ZodOptional<z.ZodString>;
862
+ phone: z.ZodOptional<z.ZodString>;
863
+ email: z.ZodOptional<z.ZodString>;
864
+ }, "strip", z.ZodTypeAny, {
865
+ web?: string | undefined;
866
+ phone?: string | undefined;
867
+ email?: string | undefined;
868
+ }, {
869
+ web?: string | undefined;
870
+ phone?: string | undefined;
871
+ email?: string | undefined;
872
+ }>>;
873
+ programmablePhoneNumber: z.ZodOptional<z.ZodString>;
874
+ programmablePhoneNumberSid: z.ZodOptional<z.ZodString>;
875
+ programmableEmail: z.ZodOptional<z.ZodString>;
876
+ forwardEmail: z.ZodOptional<z.ZodString>;
877
+ forwardPhone: z.ZodOptional<z.ZodString>;
878
+ id: z.ZodString;
879
+ }, "strip", z.ZodTypeAny, {
880
+ id: string;
881
+ title: string;
882
+ context: string;
883
+ model: "openai" | "bard" | "Scout9";
884
+ inactive?: boolean | undefined;
885
+ img?: string | null | undefined;
886
+ firstName?: string | undefined;
887
+ lastName?: string | undefined;
888
+ transcripts?: {
889
+ time: string;
890
+ id: string;
891
+ content: string;
892
+ role: "agent" | "customer" | "system";
893
+ name?: string | undefined;
894
+ scheduled?: string | undefined;
895
+ context?: any;
896
+ intent?: string | null | undefined;
897
+ intentScore?: number | null | undefined;
898
+ }[][] | undefined;
899
+ audios?: any[] | undefined;
900
+ includedLocations?: string[] | undefined;
901
+ excludedLocations?: string[] | undefined;
902
+ deployed?: {
903
+ web?: string | undefined;
904
+ phone?: string | undefined;
905
+ email?: string | undefined;
906
+ } | undefined;
907
+ programmablePhoneNumber?: string | undefined;
908
+ programmablePhoneNumberSid?: string | undefined;
909
+ programmableEmail?: string | undefined;
910
+ forwardEmail?: string | undefined;
911
+ forwardPhone?: string | undefined;
912
+ }, {
913
+ id: string;
914
+ inactive?: boolean | undefined;
915
+ img?: string | null | undefined;
916
+ title?: string | undefined;
917
+ context?: string | undefined;
918
+ firstName?: string | undefined;
919
+ lastName?: string | undefined;
920
+ transcripts?: {
921
+ time: string;
922
+ id: string;
923
+ content: string;
924
+ role: "agent" | "customer" | "system";
925
+ name?: string | undefined;
926
+ scheduled?: string | undefined;
927
+ context?: any;
928
+ intent?: string | null | undefined;
929
+ intentScore?: number | null | undefined;
930
+ }[][] | undefined;
931
+ audios?: any[] | undefined;
932
+ includedLocations?: string[] | undefined;
933
+ excludedLocations?: string[] | undefined;
934
+ model?: "openai" | "bard" | "Scout9" | undefined;
935
+ deployed?: {
936
+ web?: string | undefined;
937
+ phone?: string | undefined;
938
+ email?: string | undefined;
939
+ } | undefined;
940
+ programmablePhoneNumber?: string | undefined;
941
+ programmablePhoneNumberSid?: string | undefined;
942
+ programmableEmail?: string | undefined;
943
+ forwardEmail?: string | undefined;
944
+ forwardPhone?: string | undefined;
945
+ }>, "many">;
946
+
947
+ export const agentsBaseConfigurationSchema: z.ZodArray<z.ZodObject<{
948
+ deployed: z.ZodOptional<z.ZodObject<{
949
+ web: z.ZodOptional<z.ZodString>;
950
+ phone: z.ZodOptional<z.ZodString>;
951
+ email: z.ZodOptional<z.ZodString>;
952
+ }, "strip", z.ZodTypeAny, {
953
+ web?: string | undefined;
954
+ phone?: string | undefined;
955
+ email?: string | undefined;
956
+ }, {
957
+ web?: string | undefined;
958
+ phone?: string | undefined;
959
+ email?: string | undefined;
960
+ }>>;
961
+ img: z.ZodOptional<z.ZodNullable<z.ZodString>>;
962
+ firstName: z.ZodOptional<z.ZodString>;
963
+ lastName: z.ZodOptional<z.ZodString>;
964
+ inactive: z.ZodOptional<z.ZodBoolean>;
965
+ programmablePhoneNumber: z.ZodOptional<z.ZodString>;
966
+ programmablePhoneNumberSid: z.ZodOptional<z.ZodString>;
967
+ programmableEmail: z.ZodOptional<z.ZodString>;
968
+ forwardEmail: z.ZodOptional<z.ZodString>;
969
+ forwardPhone: z.ZodOptional<z.ZodString>;
970
+ title: z.ZodDefault<z.ZodOptional<z.ZodString>>;
971
+ context: z.ZodDefault<z.ZodOptional<z.ZodString>>;
972
+ includedLocations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
973
+ excludedLocations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
974
+ model: z.ZodDefault<z.ZodOptional<z.ZodEnum<["Scout9", "bard", "openai"]>>>;
975
+ transcripts: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
976
+ id: z.ZodString;
977
+ role: z.ZodEnum<["agent", "customer", "system"]>;
978
+ content: z.ZodString;
979
+ time: z.ZodString;
980
+ name: z.ZodOptional<z.ZodString>;
981
+ scheduled: z.ZodOptional<z.ZodString>;
982
+ context: z.ZodOptional<z.ZodAny>;
983
+ intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
984
+ intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
985
+ }, "strip", z.ZodTypeAny, {
986
+ time: string;
987
+ id: string;
988
+ content: string;
989
+ role: "agent" | "customer" | "system";
990
+ name?: string | undefined;
991
+ scheduled?: string | undefined;
992
+ context?: any;
993
+ intent?: string | null | undefined;
994
+ intentScore?: number | null | undefined;
995
+ }, {
996
+ time: string;
997
+ id: string;
998
+ content: string;
999
+ role: "agent" | "customer" | "system";
1000
+ name?: string | undefined;
1001
+ scheduled?: string | undefined;
1002
+ context?: any;
1003
+ intent?: string | null | undefined;
1004
+ intentScore?: number | null | undefined;
1005
+ }>, "many">, "many">>;
1006
+ audios: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
1007
+ }, "strip", z.ZodTypeAny, {
1008
+ title: string;
1009
+ context: string;
1010
+ model: "openai" | "bard" | "Scout9";
1011
+ deployed?: {
1012
+ web?: string | undefined;
1013
+ phone?: string | undefined;
1014
+ email?: string | undefined;
1015
+ } | undefined;
1016
+ img?: string | null | undefined;
1017
+ firstName?: string | undefined;
1018
+ lastName?: string | undefined;
1019
+ inactive?: boolean | undefined;
1020
+ programmablePhoneNumber?: string | undefined;
1021
+ programmablePhoneNumberSid?: string | undefined;
1022
+ programmableEmail?: string | undefined;
1023
+ forwardEmail?: string | undefined;
1024
+ forwardPhone?: string | undefined;
1025
+ includedLocations?: string[] | undefined;
1026
+ excludedLocations?: string[] | undefined;
1027
+ transcripts?: {
1028
+ time: string;
1029
+ id: string;
1030
+ content: string;
1031
+ role: "agent" | "customer" | "system";
1032
+ name?: string | undefined;
1033
+ scheduled?: string | undefined;
1034
+ context?: any;
1035
+ intent?: string | null | undefined;
1036
+ intentScore?: number | null | undefined;
1037
+ }[][] | undefined;
1038
+ audios?: any[] | undefined;
1039
+ }, {
1040
+ deployed?: {
1041
+ web?: string | undefined;
1042
+ phone?: string | undefined;
1043
+ email?: string | undefined;
1044
+ } | undefined;
1045
+ img?: string | null | undefined;
1046
+ firstName?: string | undefined;
1047
+ lastName?: string | undefined;
1048
+ inactive?: boolean | undefined;
1049
+ programmablePhoneNumber?: string | undefined;
1050
+ programmablePhoneNumberSid?: string | undefined;
1051
+ programmableEmail?: string | undefined;
1052
+ forwardEmail?: string | undefined;
1053
+ forwardPhone?: string | undefined;
1054
+ title?: string | undefined;
1055
+ context?: string | undefined;
1056
+ includedLocations?: string[] | undefined;
1057
+ excludedLocations?: string[] | undefined;
1058
+ model?: "openai" | "bard" | "Scout9" | undefined;
1059
+ transcripts?: {
1060
+ time: string;
1061
+ id: string;
1062
+ content: string;
1063
+ role: "agent" | "customer" | "system";
1064
+ name?: string | undefined;
1065
+ scheduled?: string | undefined;
1066
+ context?: any;
1067
+ intent?: string | null | undefined;
1068
+ intentScore?: number | null | undefined;
1069
+ }[][] | undefined;
1070
+ audios?: any[] | undefined;
1071
+ }>, "many">;
1072
+ export type ICustomerValue = import('zod').infer<typeof customerValueSchema>;
1073
+ export type ICustomer = import('zod').infer<typeof customerSchema>;
1074
+ export type IAgentBase = import('zod').infer<typeof agentBaseConfigurationSchema>;
1075
+ export type IAgent = import('zod').infer<typeof agentBaseConfigurationSchema>;
1076
+ export type IPersona = import('zod').infer<typeof agentBaseConfigurationSchema>;
1077
+ export type IAgentsConfiguration = import('zod').infer<typeof agentsConfigurationSchema>;
1078
+ export type IAgentsBaseConfiguration = import('zod').infer<typeof agentsBaseConfigurationSchema>;
1079
+ /**
1080
+ * Utility runtime class used to guide event output
1081
+ * */
1082
+ export class EventResponse<T> {
1083
+ /**
1084
+ * Create a new EventResponse instance with a JSON body.
1085
+ * @param body - The body of the response.
1086
+ * @param options - Additional options for the response.
1087
+ * @returns A new EventResponse instance.
1088
+ */
1089
+ static json<T_1>(body: T_1, options?: ResponseInit | undefined): EventResponse<T_1>;
1090
+ /**
1091
+ * Create an EventResponse.
1092
+ * @param body - The body of the response.
1093
+ * @param init - Additional options for the response.
1094
+ * @throws {Error} If the body is not a valid object.
1095
+ */
1096
+ constructor(body: T, init?: ResponseInit | undefined);
1097
+
1098
+ private body;
1099
+
1100
+ private init;
1101
+ /**
1102
+ * Get the response object.
1103
+ * @returns The response object.
1104
+ */
1105
+ get response(): Response;
1106
+ /**
1107
+ * Get the data of the response.
1108
+ * @returns The body of the response.
1109
+ */
1110
+ get data(): T;
1111
+ }
1112
+
1113
+ export const eventResponseSchema: z.ZodObject<{
1114
+ body: z.ZodAny;
1115
+ init: z.ZodOptional<z.ZodObject<{
1116
+ status: z.ZodOptional<z.ZodNumber>;
1117
+ statusText: z.ZodOptional<z.ZodString>;
1118
+ headers: z.ZodOptional<z.ZodAny>;
1119
+ }, "strip", z.ZodTypeAny, {
1120
+ status?: number | undefined;
1121
+ statusText?: string | undefined;
1122
+ headers?: any;
1123
+ }, {
1124
+ status?: number | undefined;
1125
+ statusText?: string | undefined;
1126
+ headers?: any;
1127
+ }>>;
1128
+ }, "strip", z.ZodTypeAny, {
1129
+ body?: any;
1130
+ init?: {
1131
+ status?: number | undefined;
1132
+ statusText?: string | undefined;
1133
+ headers?: any;
1134
+ } | undefined;
1135
+ }, {
1136
+ body?: any;
1137
+ init?: {
1138
+ status?: number | undefined;
1139
+ statusText?: string | undefined;
1140
+ headers?: any;
1141
+ } | undefined;
1142
+ }>;
1143
+ export type IEventResponse<T> = {
1144
+ /**
1145
+ * - The body of the response.
1146
+ */
1147
+ body: T;
1148
+ /**
1149
+ * - Additional options for the response.
1150
+ */
1151
+ init?: ResponseInit | undefined;
1152
+ /**
1153
+ * - The response object.
1154
+ */
1155
+ response: Response;
1156
+ /**
1157
+ * - The body of the response.
1158
+ */
1159
+ data: T;
1160
+ };
1161
+ /**
1162
+ * Represents the configuration provided in src/index.{js | ts} in a project
1163
+ *
1164
+ */
1165
+ export const Scout9ProjectConfigSchema: z.ZodObject<{
1166
+ /**
1167
+ * Tag to reference this application
1168
+ * @defaut your local package.json name + version, or scout9-app-v1.0.0
1169
+ */
1170
+ tag: z.ZodOptional<z.ZodString>;
848
1171
  llm: z.ZodUnion<[z.ZodObject<{
849
1172
  engine: z.ZodLiteral<"openai">;
850
1173
  model: z.ZodUnion<[z.ZodLiteral<"gpt-4-1106-preview">, z.ZodLiteral<"gpt-4-vision-preview">, z.ZodLiteral<"gpt-4">, z.ZodLiteral<"gpt-4-0314">, z.ZodLiteral<"gpt-4-0613">, z.ZodLiteral<"gpt-4-32k">, z.ZodLiteral<"gpt-4-32k-0314">, z.ZodLiteral<"gpt-4-32k-0613">, z.ZodLiteral<"gpt-3.5-turbo">, z.ZodLiteral<"gpt-3.5-turbo-16k">, z.ZodLiteral<"gpt-3.5-turbo-0301">, z.ZodLiteral<"gpt-3.5-turbo-0613">, z.ZodLiteral<"gpt-3.5-turbo-16k-0613">, z.ZodString]>;
@@ -873,6 +1196,9 @@ declare module '@scout9/app/types' {
873
1196
  model: string;
874
1197
  engine: "bard";
875
1198
  }>]>;
1199
+ /**
1200
+ * Configure personal model transformer (PMT) settings to align auto replies the agent's tone
1201
+ */
876
1202
  pmt: z.ZodObject<{
877
1203
  engine: z.ZodLiteral<"scout9">;
878
1204
  model: z.ZodString;
@@ -883,8 +1209,13 @@ declare module '@scout9/app/types' {
883
1209
  model: string;
884
1210
  engine: "scout9";
885
1211
  }>;
1212
+ /**
1213
+ * Determines the max auto replies without further conversation progression (defined by new context data gathered)
1214
+ * before the conversation is locked and requires manual intervention
1215
+ * @default 3
1216
+ */
1217
+ maxLockAttempts: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
886
1218
  initialContext: z.ZodArray<z.ZodString, "many">;
887
- maxLockAttempts: z.ZodOptional<z.ZodNumber>;
888
1219
  organization: z.ZodOptional<z.ZodObject<{
889
1220
  name: z.ZodString;
890
1221
  description: z.ZodString;
@@ -917,69 +1248,7 @@ declare module '@scout9/app/types' {
917
1248
  phone?: string | undefined;
918
1249
  }>>;
919
1250
  }, "strip", z.ZodTypeAny, {
920
- agents: {
921
- title: string;
922
- context: string;
923
- model: "openai" | "bard" | "Scout9";
924
- deployed?: {
925
- web?: string | undefined;
926
- phone?: string | undefined;
927
- email?: string | undefined;
928
- } | undefined;
929
- firstName?: string | undefined;
930
- lastName?: string | undefined;
931
- inactive?: boolean | undefined;
932
- programmablePhoneNumber?: string | undefined;
933
- programmablePhoneNumberSid?: string | undefined;
934
- programmableEmail?: string | undefined;
935
- forwardEmail?: string | undefined;
936
- forwardPhone?: string | undefined;
937
- includedLocations?: string[] | undefined;
938
- excludedLocations?: string[] | undefined;
939
- transcripts?: {
940
- time: string;
941
- content: string;
942
- role: "agent" | "customer" | "system";
943
- name?: string | undefined;
944
- }[][] | undefined;
945
- audios?: any[] | undefined;
946
- }[];
947
- entities: {
948
- [x: string]: any;
949
- id?: any;
950
- training?: {
951
- text: string;
952
- intent?: any;
953
- }[] | undefined;
954
- tests?: {
955
- text: string;
956
- expected: {
957
- intent?: any;
958
- context?: any;
959
- };
960
- }[] | undefined;
961
- definitions?: {
962
- [x: string]: any;
963
- utterance?: any;
964
- value?: string | undefined;
965
- text?: string[] | undefined;
966
- }[] | undefined;
967
- entities?: ZodString[] | undefined;
968
- entity?: any;
969
- api?: {
970
- GET?: boolean | undefined;
971
- UPDATE?: boolean | undefined;
972
- QUERY?: boolean | undefined;
973
- PUT?: boolean | undefined;
974
- PATCH?: boolean | undefined;
975
- DELETE?: boolean | undefined;
976
- } | null | undefined;
977
- }[];
978
1251
  initialContext: string[];
979
- workflows: {
980
- entities: ZodString[];
981
- entity?: any;
982
- }[];
983
1252
  llm: {
984
1253
  model: string;
985
1254
  engine: "openai";
@@ -1008,69 +1277,7 @@ declare module '@scout9/app/types' {
1008
1277
  phone?: string | undefined;
1009
1278
  } | undefined;
1010
1279
  }, {
1011
- agents: {
1012
- deployed?: {
1013
- web?: string | undefined;
1014
- phone?: string | undefined;
1015
- email?: string | undefined;
1016
- } | undefined;
1017
- firstName?: string | undefined;
1018
- lastName?: string | undefined;
1019
- inactive?: boolean | undefined;
1020
- programmablePhoneNumber?: string | undefined;
1021
- programmablePhoneNumberSid?: string | undefined;
1022
- programmableEmail?: string | undefined;
1023
- forwardEmail?: string | undefined;
1024
- forwardPhone?: string | undefined;
1025
- title?: string | undefined;
1026
- context?: string | undefined;
1027
- includedLocations?: string[] | undefined;
1028
- excludedLocations?: string[] | undefined;
1029
- model?: "openai" | "bard" | "Scout9" | undefined;
1030
- transcripts?: {
1031
- time: string;
1032
- content: string;
1033
- role: "agent" | "customer" | "system";
1034
- name?: string | undefined;
1035
- }[][] | undefined;
1036
- audios?: any[] | undefined;
1037
- }[];
1038
- entities: {
1039
- [x: string]: any;
1040
- id?: any;
1041
- training?: {
1042
- text: string;
1043
- intent?: any;
1044
- }[] | undefined;
1045
- tests?: {
1046
- text: string;
1047
- expected: {
1048
- intent?: any;
1049
- context?: any;
1050
- };
1051
- }[] | undefined;
1052
- definitions?: {
1053
- [x: string]: any;
1054
- utterance?: any;
1055
- value?: string | undefined;
1056
- text?: string[] | undefined;
1057
- }[] | undefined;
1058
- entities?: ZodString[] | undefined;
1059
- entity?: any;
1060
- api?: {
1061
- GET?: boolean | undefined;
1062
- UPDATE?: boolean | undefined;
1063
- QUERY?: boolean | undefined;
1064
- PUT?: boolean | undefined;
1065
- PATCH?: boolean | undefined;
1066
- DELETE?: boolean | undefined;
1067
- } | null | undefined;
1068
- }[];
1069
1280
  initialContext: string[];
1070
- workflows: {
1071
- entities: ZodString[];
1072
- entity?: any;
1073
- }[];
1074
1281
  llm: {
1075
1282
  model: string;
1076
1283
  engine: "openai";
@@ -1099,6 +1306,3362 @@ declare module '@scout9/app/types' {
1099
1306
  phone?: string | undefined;
1100
1307
  } | undefined;
1101
1308
  }>;
1309
+
1310
+ export const Scout9ProjectBuildConfigSchema: z.ZodObject<{
1311
+ organization: z.ZodOptional<z.ZodObject<{
1312
+ name: z.ZodString;
1313
+ description: z.ZodString;
1314
+ dashboard: z.ZodOptional<z.ZodString>;
1315
+ logo: z.ZodOptional<z.ZodString>;
1316
+ icon: z.ZodOptional<z.ZodString>;
1317
+ logos: z.ZodOptional<z.ZodString>;
1318
+ website: z.ZodOptional<z.ZodString>;
1319
+ email: z.ZodOptional<z.ZodString>;
1320
+ phone: z.ZodOptional<z.ZodString>;
1321
+ }, "strip", z.ZodTypeAny, {
1322
+ name: string;
1323
+ description: string;
1324
+ dashboard?: string | undefined;
1325
+ logo?: string | undefined;
1326
+ icon?: string | undefined;
1327
+ logos?: string | undefined;
1328
+ website?: string | undefined;
1329
+ email?: string | undefined;
1330
+ phone?: string | undefined;
1331
+ }, {
1332
+ name: string;
1333
+ description: string;
1334
+ dashboard?: string | undefined;
1335
+ logo?: string | undefined;
1336
+ icon?: string | undefined;
1337
+ logos?: string | undefined;
1338
+ website?: string | undefined;
1339
+ email?: string | undefined;
1340
+ phone?: string | undefined;
1341
+ }>>;
1342
+ initialContext: z.ZodArray<z.ZodString, "many">;
1343
+ tag: z.ZodOptional<z.ZodString>;
1344
+ llm: z.ZodUnion<[z.ZodObject<{
1345
+ engine: z.ZodLiteral<"openai">;
1346
+ model: z.ZodUnion<[z.ZodLiteral<"gpt-4-1106-preview">, z.ZodLiteral<"gpt-4-vision-preview">, z.ZodLiteral<"gpt-4">, z.ZodLiteral<"gpt-4-0314">, z.ZodLiteral<"gpt-4-0613">, z.ZodLiteral<"gpt-4-32k">, z.ZodLiteral<"gpt-4-32k-0314">, z.ZodLiteral<"gpt-4-32k-0613">, z.ZodLiteral<"gpt-3.5-turbo">, z.ZodLiteral<"gpt-3.5-turbo-16k">, z.ZodLiteral<"gpt-3.5-turbo-0301">, z.ZodLiteral<"gpt-3.5-turbo-0613">, z.ZodLiteral<"gpt-3.5-turbo-16k-0613">, z.ZodString]>;
1347
+ }, "strip", z.ZodTypeAny, {
1348
+ model: string;
1349
+ engine: "openai";
1350
+ }, {
1351
+ model: string;
1352
+ engine: "openai";
1353
+ }>, z.ZodObject<{
1354
+ engine: z.ZodLiteral<"llama">;
1355
+ model: z.ZodString;
1356
+ }, "strip", z.ZodTypeAny, {
1357
+ model: string;
1358
+ engine: "llama";
1359
+ }, {
1360
+ model: string;
1361
+ engine: "llama";
1362
+ }>, z.ZodObject<{
1363
+ engine: z.ZodLiteral<"bard">;
1364
+ model: z.ZodString;
1365
+ }, "strip", z.ZodTypeAny, {
1366
+ model: string;
1367
+ engine: "bard";
1368
+ }, {
1369
+ model: string;
1370
+ engine: "bard";
1371
+ }>]>;
1372
+ pmt: z.ZodObject<{
1373
+ engine: z.ZodLiteral<"scout9">;
1374
+ model: z.ZodString;
1375
+ }, "strip", z.ZodTypeAny, {
1376
+ model: string;
1377
+ engine: "scout9";
1378
+ }, {
1379
+ model: string;
1380
+ engine: "scout9";
1381
+ }>;
1382
+ maxLockAttempts: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
1383
+ agents: z.ZodArray<z.ZodObject<{
1384
+ deployed: z.ZodOptional<z.ZodObject<{
1385
+ web: z.ZodOptional<z.ZodString>;
1386
+ phone: z.ZodOptional<z.ZodString>;
1387
+ email: z.ZodOptional<z.ZodString>;
1388
+ }, "strip", z.ZodTypeAny, {
1389
+ web?: string | undefined;
1390
+ phone?: string | undefined;
1391
+ email?: string | undefined;
1392
+ }, {
1393
+ web?: string | undefined;
1394
+ phone?: string | undefined;
1395
+ email?: string | undefined;
1396
+ }>>;
1397
+ img: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1398
+ firstName: z.ZodOptional<z.ZodString>;
1399
+ lastName: z.ZodOptional<z.ZodString>;
1400
+ inactive: z.ZodOptional<z.ZodBoolean>;
1401
+ programmablePhoneNumber: z.ZodOptional<z.ZodString>;
1402
+ programmablePhoneNumberSid: z.ZodOptional<z.ZodString>;
1403
+ programmableEmail: z.ZodOptional<z.ZodString>;
1404
+ forwardEmail: z.ZodOptional<z.ZodString>;
1405
+ forwardPhone: z.ZodOptional<z.ZodString>;
1406
+ title: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1407
+ context: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1408
+ includedLocations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1409
+ excludedLocations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1410
+ model: z.ZodDefault<z.ZodOptional<z.ZodEnum<["Scout9", "bard", "openai"]>>>;
1411
+ transcripts: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
1412
+ id: z.ZodString;
1413
+ role: z.ZodEnum<["agent", "customer", "system"]>;
1414
+ content: z.ZodString;
1415
+ time: z.ZodString;
1416
+ name: z.ZodOptional<z.ZodString>;
1417
+ scheduled: z.ZodOptional<z.ZodString>;
1418
+ context: z.ZodOptional<z.ZodAny>;
1419
+ intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1420
+ intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1421
+ }, "strip", z.ZodTypeAny, {
1422
+ time: string;
1423
+ id: string;
1424
+ content: string;
1425
+ role: "agent" | "customer" | "system";
1426
+ name?: string | undefined;
1427
+ scheduled?: string | undefined;
1428
+ context?: any;
1429
+ intent?: string | null | undefined;
1430
+ intentScore?: number | null | undefined;
1431
+ }, {
1432
+ time: string;
1433
+ id: string;
1434
+ content: string;
1435
+ role: "agent" | "customer" | "system";
1436
+ name?: string | undefined;
1437
+ scheduled?: string | undefined;
1438
+ context?: any;
1439
+ intent?: string | null | undefined;
1440
+ intentScore?: number | null | undefined;
1441
+ }>, "many">, "many">>;
1442
+ audios: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
1443
+ }, "strip", z.ZodTypeAny, {
1444
+ title: string;
1445
+ context: string;
1446
+ model: "openai" | "bard" | "Scout9";
1447
+ deployed?: {
1448
+ web?: string | undefined;
1449
+ phone?: string | undefined;
1450
+ email?: string | undefined;
1451
+ } | undefined;
1452
+ img?: string | null | undefined;
1453
+ firstName?: string | undefined;
1454
+ lastName?: string | undefined;
1455
+ inactive?: boolean | undefined;
1456
+ programmablePhoneNumber?: string | undefined;
1457
+ programmablePhoneNumberSid?: string | undefined;
1458
+ programmableEmail?: string | undefined;
1459
+ forwardEmail?: string | undefined;
1460
+ forwardPhone?: string | undefined;
1461
+ includedLocations?: string[] | undefined;
1462
+ excludedLocations?: string[] | undefined;
1463
+ transcripts?: {
1464
+ time: string;
1465
+ id: string;
1466
+ content: string;
1467
+ role: "agent" | "customer" | "system";
1468
+ name?: string | undefined;
1469
+ scheduled?: string | undefined;
1470
+ context?: any;
1471
+ intent?: string | null | undefined;
1472
+ intentScore?: number | null | undefined;
1473
+ }[][] | undefined;
1474
+ audios?: any[] | undefined;
1475
+ }, {
1476
+ deployed?: {
1477
+ web?: string | undefined;
1478
+ phone?: string | undefined;
1479
+ email?: string | undefined;
1480
+ } | undefined;
1481
+ img?: string | null | undefined;
1482
+ firstName?: string | undefined;
1483
+ lastName?: string | undefined;
1484
+ inactive?: boolean | undefined;
1485
+ programmablePhoneNumber?: string | undefined;
1486
+ programmablePhoneNumberSid?: string | undefined;
1487
+ programmableEmail?: string | undefined;
1488
+ forwardEmail?: string | undefined;
1489
+ forwardPhone?: string | undefined;
1490
+ title?: string | undefined;
1491
+ context?: string | undefined;
1492
+ includedLocations?: string[] | undefined;
1493
+ excludedLocations?: string[] | undefined;
1494
+ model?: "openai" | "bard" | "Scout9" | undefined;
1495
+ transcripts?: {
1496
+ time: string;
1497
+ id: string;
1498
+ content: string;
1499
+ role: "agent" | "customer" | "system";
1500
+ name?: string | undefined;
1501
+ scheduled?: string | undefined;
1502
+ context?: any;
1503
+ intent?: string | null | undefined;
1504
+ intentScore?: number | null | undefined;
1505
+ }[][] | undefined;
1506
+ audios?: any[] | undefined;
1507
+ }>, "many">;
1508
+ entities: z.ZodArray<z.ZodEffects<z.ZodObject<{
1509
+ id: z.ZodOptional<z.ZodString>;
1510
+ training: z.ZodOptional<z.ZodArray<z.ZodObject<{
1511
+ intent: z.ZodString;
1512
+ text: z.ZodString;
1513
+ }, "strip", z.ZodTypeAny, {
1514
+ text: string;
1515
+ intent: string;
1516
+ }, {
1517
+ text: string;
1518
+ intent: string;
1519
+ }>, "many">>;
1520
+ tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
1521
+ text: z.ZodString;
1522
+ expected: z.ZodObject<{
1523
+ intent: z.ZodString;
1524
+ context: z.ZodAny;
1525
+ }, "strip", z.ZodTypeAny, {
1526
+ intent: string;
1527
+ context?: any;
1528
+ }, {
1529
+ intent: string;
1530
+ context?: any;
1531
+ }>;
1532
+ }, "strip", z.ZodTypeAny, {
1533
+ text: string;
1534
+ expected: {
1535
+ intent: string;
1536
+ context?: any;
1537
+ };
1538
+ }, {
1539
+ text: string;
1540
+ expected: {
1541
+ intent: string;
1542
+ context?: any;
1543
+ };
1544
+ }>, "many">>;
1545
+ definitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1546
+ utterance: z.ZodOptional<z.ZodString>;
1547
+ value: z.ZodString;
1548
+ text: z.ZodArray<z.ZodString, "many">;
1549
+ }, "strip", z.ZodTypeAny, {
1550
+ value: string;
1551
+ text: string[];
1552
+ utterance?: string | undefined;
1553
+ }, {
1554
+ value: string;
1555
+ text: string[];
1556
+ utterance?: string | undefined;
1557
+ }>, "many">>;
1558
+ entities: z.ZodArray<z.ZodString, "many">;
1559
+ entity: z.ZodString;
1560
+ api: z.ZodNullable<z.ZodObject<{
1561
+ GET: z.ZodOptional<z.ZodBoolean>;
1562
+ UPDATE: z.ZodOptional<z.ZodBoolean>;
1563
+ QUERY: z.ZodOptional<z.ZodBoolean>;
1564
+ PUT: z.ZodOptional<z.ZodBoolean>;
1565
+ PATCH: z.ZodOptional<z.ZodBoolean>;
1566
+ DELETE: z.ZodOptional<z.ZodBoolean>;
1567
+ }, "strip", z.ZodTypeAny, {
1568
+ GET?: boolean | undefined;
1569
+ UPDATE?: boolean | undefined;
1570
+ QUERY?: boolean | undefined;
1571
+ PUT?: boolean | undefined;
1572
+ PATCH?: boolean | undefined;
1573
+ DELETE?: boolean | undefined;
1574
+ }, {
1575
+ GET?: boolean | undefined;
1576
+ UPDATE?: boolean | undefined;
1577
+ QUERY?: boolean | undefined;
1578
+ PUT?: boolean | undefined;
1579
+ PATCH?: boolean | undefined;
1580
+ DELETE?: boolean | undefined;
1581
+ }>>;
1582
+ }, "strict", z.ZodTypeAny, {
1583
+ entity: string;
1584
+ entities: string[];
1585
+ api: {
1586
+ GET?: boolean | undefined;
1587
+ UPDATE?: boolean | undefined;
1588
+ QUERY?: boolean | undefined;
1589
+ PUT?: boolean | undefined;
1590
+ PATCH?: boolean | undefined;
1591
+ DELETE?: boolean | undefined;
1592
+ } | null;
1593
+ id?: string | undefined;
1594
+ training?: {
1595
+ text: string;
1596
+ intent: string;
1597
+ }[] | undefined;
1598
+ tests?: {
1599
+ text: string;
1600
+ expected: {
1601
+ intent: string;
1602
+ context?: any;
1603
+ };
1604
+ }[] | undefined;
1605
+ definitions?: {
1606
+ value: string;
1607
+ text: string[];
1608
+ utterance?: string | undefined;
1609
+ }[] | undefined;
1610
+ }, {
1611
+ entity: string;
1612
+ entities: string[];
1613
+ api: {
1614
+ GET?: boolean | undefined;
1615
+ UPDATE?: boolean | undefined;
1616
+ QUERY?: boolean | undefined;
1617
+ PUT?: boolean | undefined;
1618
+ PATCH?: boolean | undefined;
1619
+ DELETE?: boolean | undefined;
1620
+ } | null;
1621
+ id?: string | undefined;
1622
+ training?: {
1623
+ text: string;
1624
+ intent: string;
1625
+ }[] | undefined;
1626
+ tests?: {
1627
+ text: string;
1628
+ expected: {
1629
+ intent: string;
1630
+ context?: any;
1631
+ };
1632
+ }[] | undefined;
1633
+ definitions?: {
1634
+ value: string;
1635
+ text: string[];
1636
+ utterance?: string | undefined;
1637
+ }[] | undefined;
1638
+ }>, {
1639
+ entity: string;
1640
+ entities: string[];
1641
+ api: {
1642
+ GET?: boolean | undefined;
1643
+ UPDATE?: boolean | undefined;
1644
+ QUERY?: boolean | undefined;
1645
+ PUT?: boolean | undefined;
1646
+ PATCH?: boolean | undefined;
1647
+ DELETE?: boolean | undefined;
1648
+ } | null;
1649
+ id?: string | undefined;
1650
+ training?: {
1651
+ text: string;
1652
+ intent: string;
1653
+ }[] | undefined;
1654
+ tests?: {
1655
+ text: string;
1656
+ expected: {
1657
+ intent: string;
1658
+ context?: any;
1659
+ };
1660
+ }[] | undefined;
1661
+ definitions?: {
1662
+ value: string;
1663
+ text: string[];
1664
+ utterance?: string | undefined;
1665
+ }[] | undefined;
1666
+ }, {
1667
+ entity: string;
1668
+ entities: string[];
1669
+ api: {
1670
+ GET?: boolean | undefined;
1671
+ UPDATE?: boolean | undefined;
1672
+ QUERY?: boolean | undefined;
1673
+ PUT?: boolean | undefined;
1674
+ PATCH?: boolean | undefined;
1675
+ DELETE?: boolean | undefined;
1676
+ } | null;
1677
+ id?: string | undefined;
1678
+ training?: {
1679
+ text: string;
1680
+ intent: string;
1681
+ }[] | undefined;
1682
+ tests?: {
1683
+ text: string;
1684
+ expected: {
1685
+ intent: string;
1686
+ context?: any;
1687
+ };
1688
+ }[] | undefined;
1689
+ definitions?: {
1690
+ value: string;
1691
+ text: string[];
1692
+ utterance?: string | undefined;
1693
+ }[] | undefined;
1694
+ }>, "many">;
1695
+ workflows: z.ZodArray<z.ZodObject<{
1696
+ entities: z.ZodArray<z.ZodString, "many">;
1697
+ entity: z.ZodString;
1698
+ }, "strip", z.ZodTypeAny, {
1699
+ entity: string;
1700
+ entities: string[];
1701
+ }, {
1702
+ entity: string;
1703
+ entities: string[];
1704
+ }>, "many">;
1705
+ }, "strip", z.ZodTypeAny, {
1706
+ agents: {
1707
+ title: string;
1708
+ context: string;
1709
+ model: "openai" | "bard" | "Scout9";
1710
+ deployed?: {
1711
+ web?: string | undefined;
1712
+ phone?: string | undefined;
1713
+ email?: string | undefined;
1714
+ } | undefined;
1715
+ img?: string | null | undefined;
1716
+ firstName?: string | undefined;
1717
+ lastName?: string | undefined;
1718
+ inactive?: boolean | undefined;
1719
+ programmablePhoneNumber?: string | undefined;
1720
+ programmablePhoneNumberSid?: string | undefined;
1721
+ programmableEmail?: string | undefined;
1722
+ forwardEmail?: string | undefined;
1723
+ forwardPhone?: string | undefined;
1724
+ includedLocations?: string[] | undefined;
1725
+ excludedLocations?: string[] | undefined;
1726
+ transcripts?: {
1727
+ time: string;
1728
+ id: string;
1729
+ content: string;
1730
+ role: "agent" | "customer" | "system";
1731
+ name?: string | undefined;
1732
+ scheduled?: string | undefined;
1733
+ context?: any;
1734
+ intent?: string | null | undefined;
1735
+ intentScore?: number | null | undefined;
1736
+ }[][] | undefined;
1737
+ audios?: any[] | undefined;
1738
+ }[];
1739
+ entities: {
1740
+ entity: string;
1741
+ entities: string[];
1742
+ api: {
1743
+ GET?: boolean | undefined;
1744
+ UPDATE?: boolean | undefined;
1745
+ QUERY?: boolean | undefined;
1746
+ PUT?: boolean | undefined;
1747
+ PATCH?: boolean | undefined;
1748
+ DELETE?: boolean | undefined;
1749
+ } | null;
1750
+ id?: string | undefined;
1751
+ training?: {
1752
+ text: string;
1753
+ intent: string;
1754
+ }[] | undefined;
1755
+ tests?: {
1756
+ text: string;
1757
+ expected: {
1758
+ intent: string;
1759
+ context?: any;
1760
+ };
1761
+ }[] | undefined;
1762
+ definitions?: {
1763
+ value: string;
1764
+ text: string[];
1765
+ utterance?: string | undefined;
1766
+ }[] | undefined;
1767
+ }[];
1768
+ initialContext: string[];
1769
+ llm: {
1770
+ model: string;
1771
+ engine: "openai";
1772
+ } | {
1773
+ model: string;
1774
+ engine: "llama";
1775
+ } | {
1776
+ model: string;
1777
+ engine: "bard";
1778
+ };
1779
+ pmt: {
1780
+ model: string;
1781
+ engine: "scout9";
1782
+ };
1783
+ workflows: {
1784
+ entity: string;
1785
+ entities: string[];
1786
+ }[];
1787
+ organization?: {
1788
+ name: string;
1789
+ description: string;
1790
+ dashboard?: string | undefined;
1791
+ logo?: string | undefined;
1792
+ icon?: string | undefined;
1793
+ logos?: string | undefined;
1794
+ website?: string | undefined;
1795
+ email?: string | undefined;
1796
+ phone?: string | undefined;
1797
+ } | undefined;
1798
+ tag?: string | undefined;
1799
+ maxLockAttempts?: number | undefined;
1800
+ }, {
1801
+ agents: {
1802
+ deployed?: {
1803
+ web?: string | undefined;
1804
+ phone?: string | undefined;
1805
+ email?: string | undefined;
1806
+ } | undefined;
1807
+ img?: string | null | undefined;
1808
+ firstName?: string | undefined;
1809
+ lastName?: string | undefined;
1810
+ inactive?: boolean | undefined;
1811
+ programmablePhoneNumber?: string | undefined;
1812
+ programmablePhoneNumberSid?: string | undefined;
1813
+ programmableEmail?: string | undefined;
1814
+ forwardEmail?: string | undefined;
1815
+ forwardPhone?: string | undefined;
1816
+ title?: string | undefined;
1817
+ context?: string | undefined;
1818
+ includedLocations?: string[] | undefined;
1819
+ excludedLocations?: string[] | undefined;
1820
+ model?: "openai" | "bard" | "Scout9" | undefined;
1821
+ transcripts?: {
1822
+ time: string;
1823
+ id: string;
1824
+ content: string;
1825
+ role: "agent" | "customer" | "system";
1826
+ name?: string | undefined;
1827
+ scheduled?: string | undefined;
1828
+ context?: any;
1829
+ intent?: string | null | undefined;
1830
+ intentScore?: number | null | undefined;
1831
+ }[][] | undefined;
1832
+ audios?: any[] | undefined;
1833
+ }[];
1834
+ entities: {
1835
+ entity: string;
1836
+ entities: string[];
1837
+ api: {
1838
+ GET?: boolean | undefined;
1839
+ UPDATE?: boolean | undefined;
1840
+ QUERY?: boolean | undefined;
1841
+ PUT?: boolean | undefined;
1842
+ PATCH?: boolean | undefined;
1843
+ DELETE?: boolean | undefined;
1844
+ } | null;
1845
+ id?: string | undefined;
1846
+ training?: {
1847
+ text: string;
1848
+ intent: string;
1849
+ }[] | undefined;
1850
+ tests?: {
1851
+ text: string;
1852
+ expected: {
1853
+ intent: string;
1854
+ context?: any;
1855
+ };
1856
+ }[] | undefined;
1857
+ definitions?: {
1858
+ value: string;
1859
+ text: string[];
1860
+ utterance?: string | undefined;
1861
+ }[] | undefined;
1862
+ }[];
1863
+ initialContext: string[];
1864
+ llm: {
1865
+ model: string;
1866
+ engine: "openai";
1867
+ } | {
1868
+ model: string;
1869
+ engine: "llama";
1870
+ } | {
1871
+ model: string;
1872
+ engine: "bard";
1873
+ };
1874
+ pmt: {
1875
+ model: string;
1876
+ engine: "scout9";
1877
+ };
1878
+ workflows: {
1879
+ entity: string;
1880
+ entities: string[];
1881
+ }[];
1882
+ organization?: {
1883
+ name: string;
1884
+ description: string;
1885
+ dashboard?: string | undefined;
1886
+ logo?: string | undefined;
1887
+ icon?: string | undefined;
1888
+ logos?: string | undefined;
1889
+ website?: string | undefined;
1890
+ email?: string | undefined;
1891
+ phone?: string | undefined;
1892
+ } | undefined;
1893
+ tag?: string | undefined;
1894
+ maxLockAttempts?: number | undefined;
1895
+ }>;
1896
+ /**
1897
+ * Represents the configuration provided in src/index.{js | ts} in a project
1898
+ */
1899
+ export type IScout9ProjectConfig = import('zod').infer<typeof Scout9ProjectConfigSchema>;
1900
+ export type IScout9ProjectBuildConfig = import('zod').infer<typeof Scout9ProjectBuildConfigSchema>;
1901
+ export const entityApiConfigurationSchema: z.ZodNullable<z.ZodObject<{
1902
+ GET: z.ZodOptional<z.ZodBoolean>;
1903
+ UPDATE: z.ZodOptional<z.ZodBoolean>;
1904
+ QUERY: z.ZodOptional<z.ZodBoolean>;
1905
+ PUT: z.ZodOptional<z.ZodBoolean>;
1906
+ PATCH: z.ZodOptional<z.ZodBoolean>;
1907
+ DELETE: z.ZodOptional<z.ZodBoolean>;
1908
+ }, "strip", z.ZodTypeAny, {
1909
+ GET?: boolean | undefined;
1910
+ UPDATE?: boolean | undefined;
1911
+ QUERY?: boolean | undefined;
1912
+ PUT?: boolean | undefined;
1913
+ PATCH?: boolean | undefined;
1914
+ DELETE?: boolean | undefined;
1915
+ }, {
1916
+ GET?: boolean | undefined;
1917
+ UPDATE?: boolean | undefined;
1918
+ QUERY?: boolean | undefined;
1919
+ PUT?: boolean | undefined;
1920
+ PATCH?: boolean | undefined;
1921
+ DELETE?: boolean | undefined;
1922
+ }>>;
1923
+
1924
+ export const entityConfigurationSchema: z.ZodEffects<z.ZodObject<{
1925
+ id: z.ZodOptional<z.ZodString>;
1926
+ definitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1927
+ utterance: z.ZodOptional<z.ZodString>;
1928
+ value: z.ZodString;
1929
+ text: z.ZodArray<z.ZodString, "many">;
1930
+ }, "strip", z.ZodTypeAny, {
1931
+ value: string;
1932
+ text: string[];
1933
+ utterance?: string | undefined;
1934
+ }, {
1935
+ value: string;
1936
+ text: string[];
1937
+ utterance?: string | undefined;
1938
+ }>, "many">>;
1939
+ training: z.ZodOptional<z.ZodArray<z.ZodObject<{
1940
+ intent: z.ZodString;
1941
+ text: z.ZodString;
1942
+ }, "strip", z.ZodTypeAny, {
1943
+ text: string;
1944
+ intent: string;
1945
+ }, {
1946
+ text: string;
1947
+ intent: string;
1948
+ }>, "many">>;
1949
+ tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
1950
+ text: z.ZodString;
1951
+ expected: z.ZodObject<{
1952
+ intent: z.ZodString;
1953
+ context: z.ZodAny;
1954
+ }, "strip", z.ZodTypeAny, {
1955
+ intent: string;
1956
+ context?: any;
1957
+ }, {
1958
+ intent: string;
1959
+ context?: any;
1960
+ }>;
1961
+ }, "strip", z.ZodTypeAny, {
1962
+ text: string;
1963
+ expected: {
1964
+ intent: string;
1965
+ context?: any;
1966
+ };
1967
+ }, {
1968
+ text: string;
1969
+ expected: {
1970
+ intent: string;
1971
+ context?: any;
1972
+ };
1973
+ }>, "many">>;
1974
+ }, "strict", z.ZodTypeAny, {
1975
+ id?: string | undefined;
1976
+ definitions?: {
1977
+ value: string;
1978
+ text: string[];
1979
+ utterance?: string | undefined;
1980
+ }[] | undefined;
1981
+ training?: {
1982
+ text: string;
1983
+ intent: string;
1984
+ }[] | undefined;
1985
+ tests?: {
1986
+ text: string;
1987
+ expected: {
1988
+ intent: string;
1989
+ context?: any;
1990
+ };
1991
+ }[] | undefined;
1992
+ }, {
1993
+ id?: string | undefined;
1994
+ definitions?: {
1995
+ value: string;
1996
+ text: string[];
1997
+ utterance?: string | undefined;
1998
+ }[] | undefined;
1999
+ training?: {
2000
+ text: string;
2001
+ intent: string;
2002
+ }[] | undefined;
2003
+ tests?: {
2004
+ text: string;
2005
+ expected: {
2006
+ intent: string;
2007
+ context?: any;
2008
+ };
2009
+ }[] | undefined;
2010
+ }>, {
2011
+ id?: string | undefined;
2012
+ definitions?: {
2013
+ value: string;
2014
+ text: string[];
2015
+ utterance?: string | undefined;
2016
+ }[] | undefined;
2017
+ training?: {
2018
+ text: string;
2019
+ intent: string;
2020
+ }[] | undefined;
2021
+ tests?: {
2022
+ text: string;
2023
+ expected: {
2024
+ intent: string;
2025
+ context?: any;
2026
+ };
2027
+ }[] | undefined;
2028
+ }, {
2029
+ id?: string | undefined;
2030
+ definitions?: {
2031
+ value: string;
2032
+ text: string[];
2033
+ utterance?: string | undefined;
2034
+ }[] | undefined;
2035
+ training?: {
2036
+ text: string;
2037
+ intent: string;
2038
+ }[] | undefined;
2039
+ tests?: {
2040
+ text: string;
2041
+ expected: {
2042
+ intent: string;
2043
+ context?: any;
2044
+ };
2045
+ }[] | undefined;
2046
+ }>;
2047
+
2048
+ export const entitiesRootConfigurationSchema: z.ZodArray<z.ZodEffects<z.ZodObject<{
2049
+ id: z.ZodOptional<z.ZodString>;
2050
+ definitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2051
+ utterance: z.ZodOptional<z.ZodString>;
2052
+ value: z.ZodString;
2053
+ text: z.ZodArray<z.ZodString, "many">;
2054
+ }, "strip", z.ZodTypeAny, {
2055
+ value: string;
2056
+ text: string[];
2057
+ utterance?: string | undefined;
2058
+ }, {
2059
+ value: string;
2060
+ text: string[];
2061
+ utterance?: string | undefined;
2062
+ }>, "many">>;
2063
+ training: z.ZodOptional<z.ZodArray<z.ZodObject<{
2064
+ intent: z.ZodString;
2065
+ text: z.ZodString;
2066
+ }, "strip", z.ZodTypeAny, {
2067
+ text: string;
2068
+ intent: string;
2069
+ }, {
2070
+ text: string;
2071
+ intent: string;
2072
+ }>, "many">>;
2073
+ tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
2074
+ text: z.ZodString;
2075
+ expected: z.ZodObject<{
2076
+ intent: z.ZodString;
2077
+ context: z.ZodAny;
2078
+ }, "strip", z.ZodTypeAny, {
2079
+ intent: string;
2080
+ context?: any;
2081
+ }, {
2082
+ intent: string;
2083
+ context?: any;
2084
+ }>;
2085
+ }, "strip", z.ZodTypeAny, {
2086
+ text: string;
2087
+ expected: {
2088
+ intent: string;
2089
+ context?: any;
2090
+ };
2091
+ }, {
2092
+ text: string;
2093
+ expected: {
2094
+ intent: string;
2095
+ context?: any;
2096
+ };
2097
+ }>, "many">>;
2098
+ }, "strict", z.ZodTypeAny, {
2099
+ id?: string | undefined;
2100
+ definitions?: {
2101
+ value: string;
2102
+ text: string[];
2103
+ utterance?: string | undefined;
2104
+ }[] | undefined;
2105
+ training?: {
2106
+ text: string;
2107
+ intent: string;
2108
+ }[] | undefined;
2109
+ tests?: {
2110
+ text: string;
2111
+ expected: {
2112
+ intent: string;
2113
+ context?: any;
2114
+ };
2115
+ }[] | undefined;
2116
+ }, {
2117
+ id?: string | undefined;
2118
+ definitions?: {
2119
+ value: string;
2120
+ text: string[];
2121
+ utterance?: string | undefined;
2122
+ }[] | undefined;
2123
+ training?: {
2124
+ text: string;
2125
+ intent: string;
2126
+ }[] | undefined;
2127
+ tests?: {
2128
+ text: string;
2129
+ expected: {
2130
+ intent: string;
2131
+ context?: any;
2132
+ };
2133
+ }[] | undefined;
2134
+ }>, {
2135
+ id?: string | undefined;
2136
+ definitions?: {
2137
+ value: string;
2138
+ text: string[];
2139
+ utterance?: string | undefined;
2140
+ }[] | undefined;
2141
+ training?: {
2142
+ text: string;
2143
+ intent: string;
2144
+ }[] | undefined;
2145
+ tests?: {
2146
+ text: string;
2147
+ expected: {
2148
+ intent: string;
2149
+ context?: any;
2150
+ };
2151
+ }[] | undefined;
2152
+ }, {
2153
+ id?: string | undefined;
2154
+ definitions?: {
2155
+ value: string;
2156
+ text: string[];
2157
+ utterance?: string | undefined;
2158
+ }[] | undefined;
2159
+ training?: {
2160
+ text: string;
2161
+ intent: string;
2162
+ }[] | undefined;
2163
+ tests?: {
2164
+ text: string;
2165
+ expected: {
2166
+ intent: string;
2167
+ context?: any;
2168
+ };
2169
+ }[] | undefined;
2170
+ }>, "many">;
2171
+ /**
2172
+ * @TODO why type extend not valid?
2173
+ *
2174
+ */
2175
+ export const entityRootProjectConfigurationSchema: z.ZodEffects<z.ZodObject<{
2176
+ id: z.ZodOptional<z.ZodString>;
2177
+ training: z.ZodOptional<z.ZodArray<z.ZodObject<{
2178
+ intent: z.ZodString;
2179
+ text: z.ZodString;
2180
+ }, "strip", z.ZodTypeAny, {
2181
+ text: string;
2182
+ intent: string;
2183
+ }, {
2184
+ text: string;
2185
+ intent: string;
2186
+ }>, "many">>;
2187
+ tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
2188
+ text: z.ZodString;
2189
+ expected: z.ZodObject<{
2190
+ intent: z.ZodString;
2191
+ context: z.ZodAny;
2192
+ }, "strip", z.ZodTypeAny, {
2193
+ intent: string;
2194
+ context?: any;
2195
+ }, {
2196
+ intent: string;
2197
+ context?: any;
2198
+ }>;
2199
+ }, "strip", z.ZodTypeAny, {
2200
+ text: string;
2201
+ expected: {
2202
+ intent: string;
2203
+ context?: any;
2204
+ };
2205
+ }, {
2206
+ text: string;
2207
+ expected: {
2208
+ intent: string;
2209
+ context?: any;
2210
+ };
2211
+ }>, "many">>;
2212
+ definitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2213
+ utterance: z.ZodOptional<z.ZodString>;
2214
+ value: z.ZodString;
2215
+ text: z.ZodArray<z.ZodString, "many">;
2216
+ }, "strip", z.ZodTypeAny, {
2217
+ value: string;
2218
+ text: string[];
2219
+ utterance?: string | undefined;
2220
+ }, {
2221
+ value: string;
2222
+ text: string[];
2223
+ utterance?: string | undefined;
2224
+ }>, "many">>;
2225
+ entities: z.ZodArray<z.ZodString, "many">;
2226
+ entity: z.ZodString;
2227
+ api: z.ZodNullable<z.ZodObject<{
2228
+ GET: z.ZodOptional<z.ZodBoolean>;
2229
+ UPDATE: z.ZodOptional<z.ZodBoolean>;
2230
+ QUERY: z.ZodOptional<z.ZodBoolean>;
2231
+ PUT: z.ZodOptional<z.ZodBoolean>;
2232
+ PATCH: z.ZodOptional<z.ZodBoolean>;
2233
+ DELETE: z.ZodOptional<z.ZodBoolean>;
2234
+ }, "strip", z.ZodTypeAny, {
2235
+ GET?: boolean | undefined;
2236
+ UPDATE?: boolean | undefined;
2237
+ QUERY?: boolean | undefined;
2238
+ PUT?: boolean | undefined;
2239
+ PATCH?: boolean | undefined;
2240
+ DELETE?: boolean | undefined;
2241
+ }, {
2242
+ GET?: boolean | undefined;
2243
+ UPDATE?: boolean | undefined;
2244
+ QUERY?: boolean | undefined;
2245
+ PUT?: boolean | undefined;
2246
+ PATCH?: boolean | undefined;
2247
+ DELETE?: boolean | undefined;
2248
+ }>>;
2249
+ }, "strict", z.ZodTypeAny, {
2250
+ entity: string;
2251
+ entities: string[];
2252
+ api: {
2253
+ GET?: boolean | undefined;
2254
+ UPDATE?: boolean | undefined;
2255
+ QUERY?: boolean | undefined;
2256
+ PUT?: boolean | undefined;
2257
+ PATCH?: boolean | undefined;
2258
+ DELETE?: boolean | undefined;
2259
+ } | null;
2260
+ id?: string | undefined;
2261
+ training?: {
2262
+ text: string;
2263
+ intent: string;
2264
+ }[] | undefined;
2265
+ tests?: {
2266
+ text: string;
2267
+ expected: {
2268
+ intent: string;
2269
+ context?: any;
2270
+ };
2271
+ }[] | undefined;
2272
+ definitions?: {
2273
+ value: string;
2274
+ text: string[];
2275
+ utterance?: string | undefined;
2276
+ }[] | undefined;
2277
+ }, {
2278
+ entity: string;
2279
+ entities: string[];
2280
+ api: {
2281
+ GET?: boolean | undefined;
2282
+ UPDATE?: boolean | undefined;
2283
+ QUERY?: boolean | undefined;
2284
+ PUT?: boolean | undefined;
2285
+ PATCH?: boolean | undefined;
2286
+ DELETE?: boolean | undefined;
2287
+ } | null;
2288
+ id?: string | undefined;
2289
+ training?: {
2290
+ text: string;
2291
+ intent: string;
2292
+ }[] | undefined;
2293
+ tests?: {
2294
+ text: string;
2295
+ expected: {
2296
+ intent: string;
2297
+ context?: any;
2298
+ };
2299
+ }[] | undefined;
2300
+ definitions?: {
2301
+ value: string;
2302
+ text: string[];
2303
+ utterance?: string | undefined;
2304
+ }[] | undefined;
2305
+ }>, {
2306
+ entity: string;
2307
+ entities: string[];
2308
+ api: {
2309
+ GET?: boolean | undefined;
2310
+ UPDATE?: boolean | undefined;
2311
+ QUERY?: boolean | undefined;
2312
+ PUT?: boolean | undefined;
2313
+ PATCH?: boolean | undefined;
2314
+ DELETE?: boolean | undefined;
2315
+ } | null;
2316
+ id?: string | undefined;
2317
+ training?: {
2318
+ text: string;
2319
+ intent: string;
2320
+ }[] | undefined;
2321
+ tests?: {
2322
+ text: string;
2323
+ expected: {
2324
+ intent: string;
2325
+ context?: any;
2326
+ };
2327
+ }[] | undefined;
2328
+ definitions?: {
2329
+ value: string;
2330
+ text: string[];
2331
+ utterance?: string | undefined;
2332
+ }[] | undefined;
2333
+ }, {
2334
+ entity: string;
2335
+ entities: string[];
2336
+ api: {
2337
+ GET?: boolean | undefined;
2338
+ UPDATE?: boolean | undefined;
2339
+ QUERY?: boolean | undefined;
2340
+ PUT?: boolean | undefined;
2341
+ PATCH?: boolean | undefined;
2342
+ DELETE?: boolean | undefined;
2343
+ } | null;
2344
+ id?: string | undefined;
2345
+ training?: {
2346
+ text: string;
2347
+ intent: string;
2348
+ }[] | undefined;
2349
+ tests?: {
2350
+ text: string;
2351
+ expected: {
2352
+ intent: string;
2353
+ context?: any;
2354
+ };
2355
+ }[] | undefined;
2356
+ definitions?: {
2357
+ value: string;
2358
+ text: string[];
2359
+ utterance?: string | undefined;
2360
+ }[] | undefined;
2361
+ }>;
2362
+
2363
+ export const entitiesRootProjectConfigurationSchema: z.ZodArray<z.ZodEffects<z.ZodObject<{
2364
+ id: z.ZodOptional<z.ZodString>;
2365
+ training: z.ZodOptional<z.ZodArray<z.ZodObject<{
2366
+ intent: z.ZodString;
2367
+ text: z.ZodString;
2368
+ }, "strip", z.ZodTypeAny, {
2369
+ text: string;
2370
+ intent: string;
2371
+ }, {
2372
+ text: string;
2373
+ intent: string;
2374
+ }>, "many">>;
2375
+ tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
2376
+ text: z.ZodString;
2377
+ expected: z.ZodObject<{
2378
+ intent: z.ZodString;
2379
+ context: z.ZodAny;
2380
+ }, "strip", z.ZodTypeAny, {
2381
+ intent: string;
2382
+ context?: any;
2383
+ }, {
2384
+ intent: string;
2385
+ context?: any;
2386
+ }>;
2387
+ }, "strip", z.ZodTypeAny, {
2388
+ text: string;
2389
+ expected: {
2390
+ intent: string;
2391
+ context?: any;
2392
+ };
2393
+ }, {
2394
+ text: string;
2395
+ expected: {
2396
+ intent: string;
2397
+ context?: any;
2398
+ };
2399
+ }>, "many">>;
2400
+ definitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2401
+ utterance: z.ZodOptional<z.ZodString>;
2402
+ value: z.ZodString;
2403
+ text: z.ZodArray<z.ZodString, "many">;
2404
+ }, "strip", z.ZodTypeAny, {
2405
+ value: string;
2406
+ text: string[];
2407
+ utterance?: string | undefined;
2408
+ }, {
2409
+ value: string;
2410
+ text: string[];
2411
+ utterance?: string | undefined;
2412
+ }>, "many">>;
2413
+ entities: z.ZodArray<z.ZodString, "many">;
2414
+ entity: z.ZodString;
2415
+ api: z.ZodNullable<z.ZodObject<{
2416
+ GET: z.ZodOptional<z.ZodBoolean>;
2417
+ UPDATE: z.ZodOptional<z.ZodBoolean>;
2418
+ QUERY: z.ZodOptional<z.ZodBoolean>;
2419
+ PUT: z.ZodOptional<z.ZodBoolean>;
2420
+ PATCH: z.ZodOptional<z.ZodBoolean>;
2421
+ DELETE: z.ZodOptional<z.ZodBoolean>;
2422
+ }, "strip", z.ZodTypeAny, {
2423
+ GET?: boolean | undefined;
2424
+ UPDATE?: boolean | undefined;
2425
+ QUERY?: boolean | undefined;
2426
+ PUT?: boolean | undefined;
2427
+ PATCH?: boolean | undefined;
2428
+ DELETE?: boolean | undefined;
2429
+ }, {
2430
+ GET?: boolean | undefined;
2431
+ UPDATE?: boolean | undefined;
2432
+ QUERY?: boolean | undefined;
2433
+ PUT?: boolean | undefined;
2434
+ PATCH?: boolean | undefined;
2435
+ DELETE?: boolean | undefined;
2436
+ }>>;
2437
+ }, "strict", z.ZodTypeAny, {
2438
+ entity: string;
2439
+ entities: string[];
2440
+ api: {
2441
+ GET?: boolean | undefined;
2442
+ UPDATE?: boolean | undefined;
2443
+ QUERY?: boolean | undefined;
2444
+ PUT?: boolean | undefined;
2445
+ PATCH?: boolean | undefined;
2446
+ DELETE?: boolean | undefined;
2447
+ } | null;
2448
+ id?: string | undefined;
2449
+ training?: {
2450
+ text: string;
2451
+ intent: string;
2452
+ }[] | undefined;
2453
+ tests?: {
2454
+ text: string;
2455
+ expected: {
2456
+ intent: string;
2457
+ context?: any;
2458
+ };
2459
+ }[] | undefined;
2460
+ definitions?: {
2461
+ value: string;
2462
+ text: string[];
2463
+ utterance?: string | undefined;
2464
+ }[] | undefined;
2465
+ }, {
2466
+ entity: string;
2467
+ entities: string[];
2468
+ api: {
2469
+ GET?: boolean | undefined;
2470
+ UPDATE?: boolean | undefined;
2471
+ QUERY?: boolean | undefined;
2472
+ PUT?: boolean | undefined;
2473
+ PATCH?: boolean | undefined;
2474
+ DELETE?: boolean | undefined;
2475
+ } | null;
2476
+ id?: string | undefined;
2477
+ training?: {
2478
+ text: string;
2479
+ intent: string;
2480
+ }[] | undefined;
2481
+ tests?: {
2482
+ text: string;
2483
+ expected: {
2484
+ intent: string;
2485
+ context?: any;
2486
+ };
2487
+ }[] | undefined;
2488
+ definitions?: {
2489
+ value: string;
2490
+ text: string[];
2491
+ utterance?: string | undefined;
2492
+ }[] | undefined;
2493
+ }>, {
2494
+ entity: string;
2495
+ entities: string[];
2496
+ api: {
2497
+ GET?: boolean | undefined;
2498
+ UPDATE?: boolean | undefined;
2499
+ QUERY?: boolean | undefined;
2500
+ PUT?: boolean | undefined;
2501
+ PATCH?: boolean | undefined;
2502
+ DELETE?: boolean | undefined;
2503
+ } | null;
2504
+ id?: string | undefined;
2505
+ training?: {
2506
+ text: string;
2507
+ intent: string;
2508
+ }[] | undefined;
2509
+ tests?: {
2510
+ text: string;
2511
+ expected: {
2512
+ intent: string;
2513
+ context?: any;
2514
+ };
2515
+ }[] | undefined;
2516
+ definitions?: {
2517
+ value: string;
2518
+ text: string[];
2519
+ utterance?: string | undefined;
2520
+ }[] | undefined;
2521
+ }, {
2522
+ entity: string;
2523
+ entities: string[];
2524
+ api: {
2525
+ GET?: boolean | undefined;
2526
+ UPDATE?: boolean | undefined;
2527
+ QUERY?: boolean | undefined;
2528
+ PUT?: boolean | undefined;
2529
+ PATCH?: boolean | undefined;
2530
+ DELETE?: boolean | undefined;
2531
+ } | null;
2532
+ id?: string | undefined;
2533
+ training?: {
2534
+ text: string;
2535
+ intent: string;
2536
+ }[] | undefined;
2537
+ tests?: {
2538
+ text: string;
2539
+ expected: {
2540
+ intent: string;
2541
+ context?: any;
2542
+ };
2543
+ }[] | undefined;
2544
+ definitions?: {
2545
+ value: string;
2546
+ text: string[];
2547
+ utterance?: string | undefined;
2548
+ }[] | undefined;
2549
+ }>, "many">;
2550
+ export type IEntityApiConfiguration = import('zod').infer<typeof entityApiConfigurationSchema>;
2551
+ export type IEntityConfiguration = import('zod').infer<typeof entityConfigurationSchema>;
2552
+ export type IEntitiesRootConfiguration = import('zod').infer<typeof entitiesRootConfigurationSchema>;
2553
+ export type IEntityRootProjectConfiguration = import('zod').infer<typeof entityRootProjectConfigurationSchema>;
2554
+ export type IEntitiesRootProjectConfiguration = import('zod').infer<typeof entitiesRootProjectConfigurationSchema>;
2555
+ export const MessageSchema: z.ZodObject<{
2556
+ id: z.ZodString;
2557
+ role: z.ZodEnum<["agent", "customer", "system"]>;
2558
+ content: z.ZodString;
2559
+ time: z.ZodString;
2560
+ name: z.ZodOptional<z.ZodString>;
2561
+ scheduled: z.ZodOptional<z.ZodString>;
2562
+ context: z.ZodOptional<z.ZodAny>;
2563
+ intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2564
+ intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2565
+ }, "strip", z.ZodTypeAny, {
2566
+ time: string;
2567
+ id: string;
2568
+ content: string;
2569
+ role: "agent" | "customer" | "system";
2570
+ name?: string | undefined;
2571
+ scheduled?: string | undefined;
2572
+ context?: any;
2573
+ intent?: string | null | undefined;
2574
+ intentScore?: number | null | undefined;
2575
+ }, {
2576
+ time: string;
2577
+ id: string;
2578
+ content: string;
2579
+ role: "agent" | "customer" | "system";
2580
+ name?: string | undefined;
2581
+ scheduled?: string | undefined;
2582
+ context?: any;
2583
+ intent?: string | null | undefined;
2584
+ intentScore?: number | null | undefined;
2585
+ }>;
2586
+ export type IMessage = import('zod').infer<typeof MessageSchema>;
2587
+ export const WorkflowConfigurationSchema: z.ZodObject<{
2588
+ entities: z.ZodArray<z.ZodString, "many">;
2589
+ entity: z.ZodString;
2590
+ }, "strip", z.ZodTypeAny, {
2591
+ entity: string;
2592
+ entities: string[];
2593
+ }, {
2594
+ entity: string;
2595
+ entities: string[];
2596
+ }>;
2597
+
2598
+ export const WorkflowsConfigurationSchema: z.ZodArray<z.ZodObject<{
2599
+ entities: z.ZodArray<z.ZodString, "many">;
2600
+ entity: z.ZodString;
2601
+ }, "strip", z.ZodTypeAny, {
2602
+ entity: string;
2603
+ entities: string[];
2604
+ }, {
2605
+ entity: string;
2606
+ entities: string[];
2607
+ }>, "many">;
2608
+
2609
+ export const ConversationSchema: z.ZodObject<{
2610
+ $agent: z.ZodString;
2611
+ $customer: z.ZodString;
2612
+ initialContexts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2613
+ environment: z.ZodEnum<["phone", "email", "web"]>;
2614
+ environmentProps: z.ZodOptional<z.ZodObject<{
2615
+ subject: z.ZodOptional<z.ZodString>;
2616
+ platformEmailThreadId: z.ZodOptional<z.ZodString>;
2617
+ }, "strip", z.ZodTypeAny, {
2618
+ subject?: string | undefined;
2619
+ platformEmailThreadId?: string | undefined;
2620
+ }, {
2621
+ subject?: string | undefined;
2622
+ platformEmailThreadId?: string | undefined;
2623
+ }>>;
2624
+ locked: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
2625
+ lockedReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2626
+ lockAttempts: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
2627
+ forwardedTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2628
+ forwarded: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2629
+ forwardNote: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2630
+ intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2631
+ intentScore: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
2632
+ }, "strip", z.ZodTypeAny, {
2633
+ environment: "email" | "phone" | "web";
2634
+ $agent: string;
2635
+ $customer: string;
2636
+ initialContexts?: string[] | undefined;
2637
+ environmentProps?: {
2638
+ subject?: string | undefined;
2639
+ platformEmailThreadId?: string | undefined;
2640
+ } | undefined;
2641
+ locked?: boolean | null | undefined;
2642
+ lockedReason?: string | null | undefined;
2643
+ lockAttempts?: number | null | undefined;
2644
+ forwardedTo?: string | null | undefined;
2645
+ forwarded?: string | null | undefined;
2646
+ forwardNote?: string | null | undefined;
2647
+ intent?: string | null | undefined;
2648
+ intentScore?: number | null | undefined;
2649
+ }, {
2650
+ environment: "email" | "phone" | "web";
2651
+ $agent: string;
2652
+ $customer: string;
2653
+ initialContexts?: string[] | undefined;
2654
+ environmentProps?: {
2655
+ subject?: string | undefined;
2656
+ platformEmailThreadId?: string | undefined;
2657
+ } | undefined;
2658
+ locked?: boolean | null | undefined;
2659
+ lockedReason?: string | null | undefined;
2660
+ lockAttempts?: number | null | undefined;
2661
+ forwardedTo?: string | null | undefined;
2662
+ forwarded?: string | null | undefined;
2663
+ forwardNote?: string | null | undefined;
2664
+ intent?: string | null | undefined;
2665
+ intentScore?: number | null | undefined;
2666
+ }>;
2667
+
2668
+ export const IntentWorkflowEventSchema: z.ZodObject<{
2669
+ current: z.ZodNullable<z.ZodString>;
2670
+ flow: z.ZodArray<z.ZodString, "many">;
2671
+ initial: z.ZodNullable<z.ZodString>;
2672
+ }, "strip", z.ZodTypeAny, {
2673
+ current: string | null;
2674
+ flow: string[];
2675
+ initial: string | null;
2676
+ }, {
2677
+ current: string | null;
2678
+ flow: string[];
2679
+ initial: string | null;
2680
+ }>;
2681
+
2682
+ export const WorkflowEventSchema: z.ZodObject<{
2683
+ messages: z.ZodArray<z.ZodObject<{
2684
+ id: z.ZodString;
2685
+ role: z.ZodEnum<["agent", "customer", "system"]>;
2686
+ content: z.ZodString;
2687
+ time: z.ZodString;
2688
+ name: z.ZodOptional<z.ZodString>;
2689
+ scheduled: z.ZodOptional<z.ZodString>;
2690
+ context: z.ZodOptional<z.ZodAny>;
2691
+ intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2692
+ intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2693
+ }, "strip", z.ZodTypeAny, {
2694
+ time: string;
2695
+ id: string;
2696
+ content: string;
2697
+ role: "agent" | "customer" | "system";
2698
+ name?: string | undefined;
2699
+ scheduled?: string | undefined;
2700
+ context?: any;
2701
+ intent?: string | null | undefined;
2702
+ intentScore?: number | null | undefined;
2703
+ }, {
2704
+ time: string;
2705
+ id: string;
2706
+ content: string;
2707
+ role: "agent" | "customer" | "system";
2708
+ name?: string | undefined;
2709
+ scheduled?: string | undefined;
2710
+ context?: any;
2711
+ intent?: string | null | undefined;
2712
+ intentScore?: number | null | undefined;
2713
+ }>, "many">;
2714
+ conversation: z.ZodObject<{
2715
+ $agent: z.ZodString;
2716
+ $customer: z.ZodString;
2717
+ initialContexts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2718
+ environment: z.ZodEnum<["phone", "email", "web"]>;
2719
+ environmentProps: z.ZodOptional<z.ZodObject<{
2720
+ subject: z.ZodOptional<z.ZodString>;
2721
+ platformEmailThreadId: z.ZodOptional<z.ZodString>;
2722
+ }, "strip", z.ZodTypeAny, {
2723
+ subject?: string | undefined;
2724
+ platformEmailThreadId?: string | undefined;
2725
+ }, {
2726
+ subject?: string | undefined;
2727
+ platformEmailThreadId?: string | undefined;
2728
+ }>>;
2729
+ locked: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
2730
+ lockedReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2731
+ lockAttempts: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
2732
+ forwardedTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2733
+ forwarded: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2734
+ forwardNote: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2735
+ intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2736
+ intentScore: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
2737
+ }, "strip", z.ZodTypeAny, {
2738
+ environment: "email" | "phone" | "web";
2739
+ $agent: string;
2740
+ $customer: string;
2741
+ initialContexts?: string[] | undefined;
2742
+ environmentProps?: {
2743
+ subject?: string | undefined;
2744
+ platformEmailThreadId?: string | undefined;
2745
+ } | undefined;
2746
+ locked?: boolean | null | undefined;
2747
+ lockedReason?: string | null | undefined;
2748
+ lockAttempts?: number | null | undefined;
2749
+ forwardedTo?: string | null | undefined;
2750
+ forwarded?: string | null | undefined;
2751
+ forwardNote?: string | null | undefined;
2752
+ intent?: string | null | undefined;
2753
+ intentScore?: number | null | undefined;
2754
+ }, {
2755
+ environment: "email" | "phone" | "web";
2756
+ $agent: string;
2757
+ $customer: string;
2758
+ initialContexts?: string[] | undefined;
2759
+ environmentProps?: {
2760
+ subject?: string | undefined;
2761
+ platformEmailThreadId?: string | undefined;
2762
+ } | undefined;
2763
+ locked?: boolean | null | undefined;
2764
+ lockedReason?: string | null | undefined;
2765
+ lockAttempts?: number | null | undefined;
2766
+ forwardedTo?: string | null | undefined;
2767
+ forwarded?: string | null | undefined;
2768
+ forwardNote?: string | null | undefined;
2769
+ intent?: string | null | undefined;
2770
+ intentScore?: number | null | undefined;
2771
+ }>;
2772
+ context: z.ZodAny;
2773
+ message: z.ZodObject<{
2774
+ id: z.ZodString;
2775
+ role: z.ZodEnum<["agent", "customer", "system"]>;
2776
+ content: z.ZodString;
2777
+ time: z.ZodString;
2778
+ name: z.ZodOptional<z.ZodString>;
2779
+ scheduled: z.ZodOptional<z.ZodString>;
2780
+ context: z.ZodOptional<z.ZodAny>;
2781
+ intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2782
+ intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2783
+ }, "strip", z.ZodTypeAny, {
2784
+ time: string;
2785
+ id: string;
2786
+ content: string;
2787
+ role: "agent" | "customer" | "system";
2788
+ name?: string | undefined;
2789
+ scheduled?: string | undefined;
2790
+ context?: any;
2791
+ intent?: string | null | undefined;
2792
+ intentScore?: number | null | undefined;
2793
+ }, {
2794
+ time: string;
2795
+ id: string;
2796
+ content: string;
2797
+ role: "agent" | "customer" | "system";
2798
+ name?: string | undefined;
2799
+ scheduled?: string | undefined;
2800
+ context?: any;
2801
+ intent?: string | null | undefined;
2802
+ intentScore?: number | null | undefined;
2803
+ }>;
2804
+ agent: z.ZodObject<Omit<{
2805
+ inactive: z.ZodOptional<z.ZodBoolean>;
2806
+ img: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2807
+ title: z.ZodDefault<z.ZodOptional<z.ZodString>>;
2808
+ context: z.ZodDefault<z.ZodOptional<z.ZodString>>;
2809
+ firstName: z.ZodOptional<z.ZodString>;
2810
+ lastName: z.ZodOptional<z.ZodString>;
2811
+ transcripts: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
2812
+ id: z.ZodString;
2813
+ role: z.ZodEnum<["agent", "customer", "system"]>;
2814
+ content: z.ZodString;
2815
+ time: z.ZodString;
2816
+ name: z.ZodOptional<z.ZodString>;
2817
+ scheduled: z.ZodOptional<z.ZodString>;
2818
+ context: z.ZodOptional<z.ZodAny>;
2819
+ intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2820
+ intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2821
+ }, "strip", z.ZodTypeAny, {
2822
+ time: string;
2823
+ id: string;
2824
+ content: string;
2825
+ role: "agent" | "customer" | "system";
2826
+ name?: string | undefined;
2827
+ scheduled?: string | undefined;
2828
+ context?: any;
2829
+ intent?: string | null | undefined;
2830
+ intentScore?: number | null | undefined;
2831
+ }, {
2832
+ time: string;
2833
+ id: string;
2834
+ content: string;
2835
+ role: "agent" | "customer" | "system";
2836
+ name?: string | undefined;
2837
+ scheduled?: string | undefined;
2838
+ context?: any;
2839
+ intent?: string | null | undefined;
2840
+ intentScore?: number | null | undefined;
2841
+ }>, "many">, "many">>;
2842
+ audios: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
2843
+ includedLocations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2844
+ excludedLocations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2845
+ model: z.ZodDefault<z.ZodOptional<z.ZodEnum<["Scout9", "bard", "openai"]>>>;
2846
+ deployed: z.ZodOptional<z.ZodObject<{
2847
+ web: z.ZodOptional<z.ZodString>;
2848
+ phone: z.ZodOptional<z.ZodString>;
2849
+ email: z.ZodOptional<z.ZodString>;
2850
+ }, "strip", z.ZodTypeAny, {
2851
+ web?: string | undefined;
2852
+ phone?: string | undefined;
2853
+ email?: string | undefined;
2854
+ }, {
2855
+ web?: string | undefined;
2856
+ phone?: string | undefined;
2857
+ email?: string | undefined;
2858
+ }>>;
2859
+ programmablePhoneNumber: z.ZodOptional<z.ZodString>;
2860
+ programmablePhoneNumberSid: z.ZodOptional<z.ZodString>;
2861
+ programmableEmail: z.ZodOptional<z.ZodString>;
2862
+ forwardEmail: z.ZodOptional<z.ZodString>;
2863
+ forwardPhone: z.ZodOptional<z.ZodString>;
2864
+ id: z.ZodString;
2865
+ }, "context" | "transcripts" | "audios" | "includedLocations" | "excludedLocations" | "model">, "strip", z.ZodTypeAny, {
2866
+ id: string;
2867
+ title: string;
2868
+ inactive?: boolean | undefined;
2869
+ img?: string | null | undefined;
2870
+ firstName?: string | undefined;
2871
+ lastName?: string | undefined;
2872
+ deployed?: {
2873
+ web?: string | undefined;
2874
+ phone?: string | undefined;
2875
+ email?: string | undefined;
2876
+ } | undefined;
2877
+ programmablePhoneNumber?: string | undefined;
2878
+ programmablePhoneNumberSid?: string | undefined;
2879
+ programmableEmail?: string | undefined;
2880
+ forwardEmail?: string | undefined;
2881
+ forwardPhone?: string | undefined;
2882
+ }, {
2883
+ id: string;
2884
+ inactive?: boolean | undefined;
2885
+ img?: string | null | undefined;
2886
+ title?: string | undefined;
2887
+ firstName?: string | undefined;
2888
+ lastName?: string | undefined;
2889
+ deployed?: {
2890
+ web?: string | undefined;
2891
+ phone?: string | undefined;
2892
+ email?: string | undefined;
2893
+ } | undefined;
2894
+ programmablePhoneNumber?: string | undefined;
2895
+ programmablePhoneNumberSid?: string | undefined;
2896
+ programmableEmail?: string | undefined;
2897
+ forwardEmail?: string | undefined;
2898
+ forwardPhone?: string | undefined;
2899
+ }>;
2900
+ customer: z.ZodObject<{
2901
+ firstName: z.ZodOptional<z.ZodString>;
2902
+ lastName: z.ZodOptional<z.ZodString>;
2903
+ name: z.ZodString;
2904
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2905
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2906
+ img: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2907
+ neighborhood: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2908
+ city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2909
+ country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2910
+ line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2911
+ line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2912
+ postal_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2913
+ state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2914
+ town: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2915
+ joined: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2916
+ stripe: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2917
+ stripeDev: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2918
+ }, "strip", z.ZodUnion<[z.ZodBoolean, z.ZodNumber, z.ZodString]>, z.objectOutputType<{
2919
+ firstName: z.ZodOptional<z.ZodString>;
2920
+ lastName: z.ZodOptional<z.ZodString>;
2921
+ name: z.ZodString;
2922
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2923
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2924
+ img: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2925
+ neighborhood: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2926
+ city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2927
+ country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2928
+ line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2929
+ line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2930
+ postal_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2931
+ state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2932
+ town: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2933
+ joined: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2934
+ stripe: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2935
+ stripeDev: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2936
+ }, z.ZodUnion<[z.ZodBoolean, z.ZodNumber, z.ZodString]>, "strip">, z.objectInputType<{
2937
+ firstName: z.ZodOptional<z.ZodString>;
2938
+ lastName: z.ZodOptional<z.ZodString>;
2939
+ name: z.ZodString;
2940
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2941
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2942
+ img: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2943
+ neighborhood: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2944
+ city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2945
+ country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2946
+ line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2947
+ line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2948
+ postal_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2949
+ state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2950
+ town: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2951
+ joined: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2952
+ stripe: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2953
+ stripeDev: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2954
+ }, z.ZodUnion<[z.ZodBoolean, z.ZodNumber, z.ZodString]>, "strip">>;
2955
+ intent: z.ZodObject<{
2956
+ current: z.ZodNullable<z.ZodString>;
2957
+ flow: z.ZodArray<z.ZodString, "many">;
2958
+ initial: z.ZodNullable<z.ZodString>;
2959
+ }, "strip", z.ZodTypeAny, {
2960
+ current: string | null;
2961
+ flow: string[];
2962
+ initial: string | null;
2963
+ }, {
2964
+ current: string | null;
2965
+ flow: string[];
2966
+ initial: string | null;
2967
+ }>;
2968
+ stagnationCount: z.ZodNumber;
2969
+ note: z.ZodOptional<z.ZodString>;
2970
+ }, "strip", z.ZodTypeAny, {
2971
+ message: {
2972
+ time: string;
2973
+ id: string;
2974
+ content: string;
2975
+ role: "agent" | "customer" | "system";
2976
+ name?: string | undefined;
2977
+ scheduled?: string | undefined;
2978
+ context?: any;
2979
+ intent?: string | null | undefined;
2980
+ intentScore?: number | null | undefined;
2981
+ };
2982
+ agent: {
2983
+ id: string;
2984
+ title: string;
2985
+ inactive?: boolean | undefined;
2986
+ img?: string | null | undefined;
2987
+ firstName?: string | undefined;
2988
+ lastName?: string | undefined;
2989
+ deployed?: {
2990
+ web?: string | undefined;
2991
+ phone?: string | undefined;
2992
+ email?: string | undefined;
2993
+ } | undefined;
2994
+ programmablePhoneNumber?: string | undefined;
2995
+ programmablePhoneNumberSid?: string | undefined;
2996
+ programmableEmail?: string | undefined;
2997
+ forwardEmail?: string | undefined;
2998
+ forwardPhone?: string | undefined;
2999
+ };
3000
+ customer: {
3001
+ name: string;
3002
+ firstName?: string | undefined;
3003
+ lastName?: string | undefined;
3004
+ email?: string | null | undefined;
3005
+ phone?: string | null | undefined;
3006
+ img?: string | null | undefined;
3007
+ neighborhood?: string | null | undefined;
3008
+ city?: string | null | undefined;
3009
+ country?: string | null | undefined;
3010
+ line1?: string | null | undefined;
3011
+ line2?: string | null | undefined;
3012
+ postal_code?: string | null | undefined;
3013
+ state?: string | null | undefined;
3014
+ town?: string | null | undefined;
3015
+ joined?: string | null | undefined;
3016
+ stripe?: string | null | undefined;
3017
+ stripeDev?: string | null | undefined;
3018
+ } & {
3019
+ [k: string]: string | number | boolean;
3020
+ };
3021
+ intent: {
3022
+ current: string | null;
3023
+ flow: string[];
3024
+ initial: string | null;
3025
+ };
3026
+ conversation: {
3027
+ environment: "email" | "phone" | "web";
3028
+ $agent: string;
3029
+ $customer: string;
3030
+ initialContexts?: string[] | undefined;
3031
+ environmentProps?: {
3032
+ subject?: string | undefined;
3033
+ platformEmailThreadId?: string | undefined;
3034
+ } | undefined;
3035
+ locked?: boolean | null | undefined;
3036
+ lockedReason?: string | null | undefined;
3037
+ lockAttempts?: number | null | undefined;
3038
+ forwardedTo?: string | null | undefined;
3039
+ forwarded?: string | null | undefined;
3040
+ forwardNote?: string | null | undefined;
3041
+ intent?: string | null | undefined;
3042
+ intentScore?: number | null | undefined;
3043
+ };
3044
+ messages: {
3045
+ time: string;
3046
+ id: string;
3047
+ content: string;
3048
+ role: "agent" | "customer" | "system";
3049
+ name?: string | undefined;
3050
+ scheduled?: string | undefined;
3051
+ context?: any;
3052
+ intent?: string | null | undefined;
3053
+ intentScore?: number | null | undefined;
3054
+ }[];
3055
+ stagnationCount: number;
3056
+ context?: any;
3057
+ note?: string | undefined;
3058
+ }, {
3059
+ message: {
3060
+ time: string;
3061
+ id: string;
3062
+ content: string;
3063
+ role: "agent" | "customer" | "system";
3064
+ name?: string | undefined;
3065
+ scheduled?: string | undefined;
3066
+ context?: any;
3067
+ intent?: string | null | undefined;
3068
+ intentScore?: number | null | undefined;
3069
+ };
3070
+ agent: {
3071
+ id: string;
3072
+ inactive?: boolean | undefined;
3073
+ img?: string | null | undefined;
3074
+ title?: string | undefined;
3075
+ firstName?: string | undefined;
3076
+ lastName?: string | undefined;
3077
+ deployed?: {
3078
+ web?: string | undefined;
3079
+ phone?: string | undefined;
3080
+ email?: string | undefined;
3081
+ } | undefined;
3082
+ programmablePhoneNumber?: string | undefined;
3083
+ programmablePhoneNumberSid?: string | undefined;
3084
+ programmableEmail?: string | undefined;
3085
+ forwardEmail?: string | undefined;
3086
+ forwardPhone?: string | undefined;
3087
+ };
3088
+ customer: {
3089
+ name: string;
3090
+ firstName?: string | undefined;
3091
+ lastName?: string | undefined;
3092
+ email?: string | null | undefined;
3093
+ phone?: string | null | undefined;
3094
+ img?: string | null | undefined;
3095
+ neighborhood?: string | null | undefined;
3096
+ city?: string | null | undefined;
3097
+ country?: string | null | undefined;
3098
+ line1?: string | null | undefined;
3099
+ line2?: string | null | undefined;
3100
+ postal_code?: string | null | undefined;
3101
+ state?: string | null | undefined;
3102
+ town?: string | null | undefined;
3103
+ joined?: string | null | undefined;
3104
+ stripe?: string | null | undefined;
3105
+ stripeDev?: string | null | undefined;
3106
+ } & {
3107
+ [k: string]: string | number | boolean;
3108
+ };
3109
+ intent: {
3110
+ current: string | null;
3111
+ flow: string[];
3112
+ initial: string | null;
3113
+ };
3114
+ conversation: {
3115
+ environment: "email" | "phone" | "web";
3116
+ $agent: string;
3117
+ $customer: string;
3118
+ initialContexts?: string[] | undefined;
3119
+ environmentProps?: {
3120
+ subject?: string | undefined;
3121
+ platformEmailThreadId?: string | undefined;
3122
+ } | undefined;
3123
+ locked?: boolean | null | undefined;
3124
+ lockedReason?: string | null | undefined;
3125
+ lockAttempts?: number | null | undefined;
3126
+ forwardedTo?: string | null | undefined;
3127
+ forwarded?: string | null | undefined;
3128
+ forwardNote?: string | null | undefined;
3129
+ intent?: string | null | undefined;
3130
+ intentScore?: number | null | undefined;
3131
+ };
3132
+ messages: {
3133
+ time: string;
3134
+ id: string;
3135
+ content: string;
3136
+ role: "agent" | "customer" | "system";
3137
+ name?: string | undefined;
3138
+ scheduled?: string | undefined;
3139
+ context?: any;
3140
+ intent?: string | null | undefined;
3141
+ intentScore?: number | null | undefined;
3142
+ }[];
3143
+ stagnationCount: number;
3144
+ context?: any;
3145
+ note?: string | undefined;
3146
+ }>;
3147
+ /**
3148
+ * Lazy is used to handle recursive types.
3149
+ *
3150
+ */
3151
+ export const ConversationContext: any;
3152
+ /**
3153
+ * Forward input information of a conversation
3154
+ *
3155
+ */
3156
+ export const ForwardSchema: z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodObject<{
3157
+ to: z.ZodOptional<z.ZodString>;
3158
+ mode: z.ZodOptional<z.ZodEnum<["after-reply", "immediately"]>>;
3159
+ note: z.ZodOptional<z.ZodString>;
3160
+ }, "strip", z.ZodTypeAny, {
3161
+ to?: string | undefined;
3162
+ mode?: "after-reply" | "immediately" | undefined;
3163
+ note?: string | undefined;
3164
+ }, {
3165
+ to?: string | undefined;
3166
+ mode?: "after-reply" | "immediately" | undefined;
3167
+ note?: string | undefined;
3168
+ }>]>;
3169
+ /**
3170
+ * Instruction object schema used to send context to guide conversations
3171
+ *
3172
+ */
3173
+ export const InstructionSchema: z.ZodObject<{
3174
+ id: z.ZodString;
3175
+ content: z.ZodString;
3176
+ }, "strip", z.ZodTypeAny, {
3177
+ id: string;
3178
+ content: string;
3179
+ }, {
3180
+ id: string;
3181
+ content: string;
3182
+ }>;
3183
+ /**
3184
+ * If its a string, it will be sent as a static string.
3185
+ * If it's a object or WorkflowResponseMessageAPI - it will use
3186
+ *
3187
+ */
3188
+ export const WorkflowResponseMessage: z.ZodUnion<readonly [z.ZodTypeAny, z.ZodTypeAny, ...z.ZodTypeAny[]]>;
3189
+
3190
+ export const WorkflowResponseMessageApiRequest: z.ZodObject<{
3191
+ uri: z.ZodString;
3192
+ data: z.ZodOptional<z.ZodAny>;
3193
+ headers: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
3194
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST", "PUT"]>>;
3195
+ }, "strip", z.ZodTypeAny, {
3196
+ uri: string;
3197
+ data?: any;
3198
+ headers?: {} | undefined;
3199
+ method?: "GET" | "POST" | "PUT" | undefined;
3200
+ }, {
3201
+ uri: string;
3202
+ data?: any;
3203
+ headers?: {} | undefined;
3204
+ method?: "GET" | "POST" | "PUT" | undefined;
3205
+ }>;
3206
+ /**
3207
+ * The intended response provided by the WorkflowResponseMessageApiRequest
3208
+ *
3209
+ */
3210
+ export const WorkflowResponseMessageApiResponse: z.ZodUnion<[z.ZodString, z.ZodObject<{
3211
+ message: z.ZodString;
3212
+ }, "strip", z.ZodTypeAny, {
3213
+ message: string;
3214
+ }, {
3215
+ message: string;
3216
+ }>, z.ZodObject<{
3217
+ text: z.ZodString;
3218
+ }, "strip", z.ZodTypeAny, {
3219
+ text: string;
3220
+ }, {
3221
+ text: string;
3222
+ }>, z.ZodObject<{
3223
+ data: z.ZodObject<{
3224
+ message: z.ZodString;
3225
+ }, "strip", z.ZodTypeAny, {
3226
+ message: string;
3227
+ }, {
3228
+ message: string;
3229
+ }>;
3230
+ }, "strip", z.ZodTypeAny, {
3231
+ data: {
3232
+ message: string;
3233
+ };
3234
+ }, {
3235
+ data: {
3236
+ message: string;
3237
+ };
3238
+ }>, z.ZodObject<{
3239
+ data: z.ZodObject<{
3240
+ text: z.ZodString;
3241
+ }, "strip", z.ZodTypeAny, {
3242
+ text: string;
3243
+ }, {
3244
+ text: string;
3245
+ }>;
3246
+ }, "strip", z.ZodTypeAny, {
3247
+ data: {
3248
+ text: string;
3249
+ };
3250
+ }, {
3251
+ data: {
3252
+ text: string;
3253
+ };
3254
+ }>]>;
3255
+ /**
3256
+ * The workflow response object slot
3257
+ *
3258
+ */
3259
+ export const WorkflowResponseSlotSchema: z.ZodObject<{
3260
+ forward: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodObject<{
3261
+ to: z.ZodOptional<z.ZodString>;
3262
+ mode: z.ZodOptional<z.ZodEnum<["after-reply", "immediately"]>>;
3263
+ note: z.ZodOptional<z.ZodString>;
3264
+ }, "strip", z.ZodTypeAny, {
3265
+ to?: string | undefined;
3266
+ mode?: "after-reply" | "immediately" | undefined;
3267
+ note?: string | undefined;
3268
+ }, {
3269
+ to?: string | undefined;
3270
+ mode?: "after-reply" | "immediately" | undefined;
3271
+ note?: string | undefined;
3272
+ }>]>>;
3273
+ forwardNote: z.ZodOptional<z.ZodString>;
3274
+ instructions: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
3275
+ id: z.ZodString;
3276
+ content: z.ZodString;
3277
+ }, "strip", z.ZodTypeAny, {
3278
+ id: string;
3279
+ content: string;
3280
+ }, {
3281
+ id: string;
3282
+ content: string;
3283
+ }>, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodObject<{
3284
+ id: z.ZodString;
3285
+ content: z.ZodString;
3286
+ }, "strip", z.ZodTypeAny, {
3287
+ id: string;
3288
+ content: string;
3289
+ }, {
3290
+ id: string;
3291
+ content: string;
3292
+ }>, "many">]>>;
3293
+ removeInstructions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3294
+ message: z.ZodOptional<z.ZodString>;
3295
+ secondsDelay: z.ZodOptional<z.ZodNumber>;
3296
+ scheduled: z.ZodOptional<z.ZodNumber>;
3297
+ contextUpsert: any;
3298
+ resetIntent: z.ZodOptional<z.ZodBoolean>;
3299
+ }, "strip", z.ZodTypeAny, {
3300
+ forward?: string | boolean | {
3301
+ to?: string | undefined;
3302
+ mode?: "after-reply" | "immediately" | undefined;
3303
+ note?: string | undefined;
3304
+ } | undefined;
3305
+ forwardNote?: string | undefined;
3306
+ instructions?: string | string[] | {
3307
+ id: string;
3308
+ content: string;
3309
+ } | {
3310
+ id: string;
3311
+ content: string;
3312
+ }[] | undefined;
3313
+ removeInstructions?: string[] | undefined;
3314
+ message?: string | undefined;
3315
+ secondsDelay?: number | undefined;
3316
+ scheduled?: number | undefined;
3317
+ contextUpsert?: any;
3318
+ resetIntent?: boolean | undefined;
3319
+ }, {
3320
+ forward?: string | boolean | {
3321
+ to?: string | undefined;
3322
+ mode?: "after-reply" | "immediately" | undefined;
3323
+ note?: string | undefined;
3324
+ } | undefined;
3325
+ forwardNote?: string | undefined;
3326
+ instructions?: string | string[] | {
3327
+ id: string;
3328
+ content: string;
3329
+ } | {
3330
+ id: string;
3331
+ content: string;
3332
+ }[] | undefined;
3333
+ removeInstructions?: string[] | undefined;
3334
+ message?: string | undefined;
3335
+ secondsDelay?: number | undefined;
3336
+ scheduled?: number | undefined;
3337
+ contextUpsert?: any;
3338
+ resetIntent?: boolean | undefined;
3339
+ }>;
3340
+ /**
3341
+ * The workflow response to send in any given workflow
3342
+ *
3343
+ */
3344
+ export const WorkflowResponseSchema: z.ZodUnion<[z.ZodObject<{
3345
+ forward: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodObject<{
3346
+ to: z.ZodOptional<z.ZodString>;
3347
+ mode: z.ZodOptional<z.ZodEnum<["after-reply", "immediately"]>>;
3348
+ note: z.ZodOptional<z.ZodString>;
3349
+ }, "strip", z.ZodTypeAny, {
3350
+ to?: string | undefined;
3351
+ mode?: "after-reply" | "immediately" | undefined;
3352
+ note?: string | undefined;
3353
+ }, {
3354
+ to?: string | undefined;
3355
+ mode?: "after-reply" | "immediately" | undefined;
3356
+ note?: string | undefined;
3357
+ }>]>>;
3358
+ forwardNote: z.ZodOptional<z.ZodString>;
3359
+ instructions: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
3360
+ id: z.ZodString;
3361
+ content: z.ZodString;
3362
+ }, "strip", z.ZodTypeAny, {
3363
+ id: string;
3364
+ content: string;
3365
+ }, {
3366
+ id: string;
3367
+ content: string;
3368
+ }>, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodObject<{
3369
+ id: z.ZodString;
3370
+ content: z.ZodString;
3371
+ }, "strip", z.ZodTypeAny, {
3372
+ id: string;
3373
+ content: string;
3374
+ }, {
3375
+ id: string;
3376
+ content: string;
3377
+ }>, "many">]>>;
3378
+ removeInstructions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3379
+ message: z.ZodOptional<z.ZodString>;
3380
+ secondsDelay: z.ZodOptional<z.ZodNumber>;
3381
+ scheduled: z.ZodOptional<z.ZodNumber>;
3382
+ contextUpsert: any;
3383
+ resetIntent: z.ZodOptional<z.ZodBoolean>;
3384
+ }, "strip", z.ZodTypeAny, {
3385
+ forward?: string | boolean | {
3386
+ to?: string | undefined;
3387
+ mode?: "after-reply" | "immediately" | undefined;
3388
+ note?: string | undefined;
3389
+ } | undefined;
3390
+ forwardNote?: string | undefined;
3391
+ instructions?: string | string[] | {
3392
+ id: string;
3393
+ content: string;
3394
+ } | {
3395
+ id: string;
3396
+ content: string;
3397
+ }[] | undefined;
3398
+ removeInstructions?: string[] | undefined;
3399
+ message?: string | undefined;
3400
+ secondsDelay?: number | undefined;
3401
+ scheduled?: number | undefined;
3402
+ contextUpsert?: any;
3403
+ resetIntent?: boolean | undefined;
3404
+ }, {
3405
+ forward?: string | boolean | {
3406
+ to?: string | undefined;
3407
+ mode?: "after-reply" | "immediately" | undefined;
3408
+ note?: string | undefined;
3409
+ } | undefined;
3410
+ forwardNote?: string | undefined;
3411
+ instructions?: string | string[] | {
3412
+ id: string;
3413
+ content: string;
3414
+ } | {
3415
+ id: string;
3416
+ content: string;
3417
+ }[] | undefined;
3418
+ removeInstructions?: string[] | undefined;
3419
+ message?: string | undefined;
3420
+ secondsDelay?: number | undefined;
3421
+ scheduled?: number | undefined;
3422
+ contextUpsert?: any;
3423
+ resetIntent?: boolean | undefined;
3424
+ }>, z.ZodArray<z.ZodObject<{
3425
+ forward: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodObject<{
3426
+ to: z.ZodOptional<z.ZodString>;
3427
+ mode: z.ZodOptional<z.ZodEnum<["after-reply", "immediately"]>>;
3428
+ note: z.ZodOptional<z.ZodString>;
3429
+ }, "strip", z.ZodTypeAny, {
3430
+ to?: string | undefined;
3431
+ mode?: "after-reply" | "immediately" | undefined;
3432
+ note?: string | undefined;
3433
+ }, {
3434
+ to?: string | undefined;
3435
+ mode?: "after-reply" | "immediately" | undefined;
3436
+ note?: string | undefined;
3437
+ }>]>>;
3438
+ forwardNote: z.ZodOptional<z.ZodString>;
3439
+ instructions: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
3440
+ id: z.ZodString;
3441
+ content: z.ZodString;
3442
+ }, "strip", z.ZodTypeAny, {
3443
+ id: string;
3444
+ content: string;
3445
+ }, {
3446
+ id: string;
3447
+ content: string;
3448
+ }>, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodObject<{
3449
+ id: z.ZodString;
3450
+ content: z.ZodString;
3451
+ }, "strip", z.ZodTypeAny, {
3452
+ id: string;
3453
+ content: string;
3454
+ }, {
3455
+ id: string;
3456
+ content: string;
3457
+ }>, "many">]>>;
3458
+ removeInstructions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3459
+ message: z.ZodOptional<z.ZodString>;
3460
+ secondsDelay: z.ZodOptional<z.ZodNumber>;
3461
+ scheduled: z.ZodOptional<z.ZodNumber>;
3462
+ contextUpsert: any;
3463
+ resetIntent: z.ZodOptional<z.ZodBoolean>;
3464
+ }, "strip", z.ZodTypeAny, {
3465
+ forward?: string | boolean | {
3466
+ to?: string | undefined;
3467
+ mode?: "after-reply" | "immediately" | undefined;
3468
+ note?: string | undefined;
3469
+ } | undefined;
3470
+ forwardNote?: string | undefined;
3471
+ instructions?: string | string[] | {
3472
+ id: string;
3473
+ content: string;
3474
+ } | {
3475
+ id: string;
3476
+ content: string;
3477
+ }[] | undefined;
3478
+ removeInstructions?: string[] | undefined;
3479
+ message?: string | undefined;
3480
+ secondsDelay?: number | undefined;
3481
+ scheduled?: number | undefined;
3482
+ contextUpsert?: any;
3483
+ resetIntent?: boolean | undefined;
3484
+ }, {
3485
+ forward?: string | boolean | {
3486
+ to?: string | undefined;
3487
+ mode?: "after-reply" | "immediately" | undefined;
3488
+ note?: string | undefined;
3489
+ } | undefined;
3490
+ forwardNote?: string | undefined;
3491
+ instructions?: string | string[] | {
3492
+ id: string;
3493
+ content: string;
3494
+ } | {
3495
+ id: string;
3496
+ content: string;
3497
+ }[] | undefined;
3498
+ removeInstructions?: string[] | undefined;
3499
+ message?: string | undefined;
3500
+ secondsDelay?: number | undefined;
3501
+ scheduled?: number | undefined;
3502
+ contextUpsert?: any;
3503
+ resetIntent?: boolean | undefined;
3504
+ }>, "many">]>;
3505
+
3506
+ export const WorkflowFunctionSchema: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
3507
+ messages: z.ZodArray<z.ZodObject<{
3508
+ id: z.ZodString;
3509
+ role: z.ZodEnum<["agent", "customer", "system"]>;
3510
+ content: z.ZodString;
3511
+ time: z.ZodString;
3512
+ name: z.ZodOptional<z.ZodString>;
3513
+ scheduled: z.ZodOptional<z.ZodString>;
3514
+ context: z.ZodOptional<z.ZodAny>;
3515
+ intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
3516
+ intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3517
+ }, "strip", z.ZodTypeAny, {
3518
+ time: string;
3519
+ id: string;
3520
+ content: string;
3521
+ role: "agent" | "customer" | "system";
3522
+ name?: string | undefined;
3523
+ scheduled?: string | undefined;
3524
+ context?: any;
3525
+ intent?: string | null | undefined;
3526
+ intentScore?: number | null | undefined;
3527
+ }, {
3528
+ time: string;
3529
+ id: string;
3530
+ content: string;
3531
+ role: "agent" | "customer" | "system";
3532
+ name?: string | undefined;
3533
+ scheduled?: string | undefined;
3534
+ context?: any;
3535
+ intent?: string | null | undefined;
3536
+ intentScore?: number | null | undefined;
3537
+ }>, "many">;
3538
+ conversation: z.ZodObject<{
3539
+ $agent: z.ZodString;
3540
+ $customer: z.ZodString;
3541
+ initialContexts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3542
+ environment: z.ZodEnum<["phone", "email", "web"]>;
3543
+ environmentProps: z.ZodOptional<z.ZodObject<{
3544
+ subject: z.ZodOptional<z.ZodString>;
3545
+ platformEmailThreadId: z.ZodOptional<z.ZodString>;
3546
+ }, "strip", z.ZodTypeAny, {
3547
+ subject?: string | undefined;
3548
+ platformEmailThreadId?: string | undefined;
3549
+ }, {
3550
+ subject?: string | undefined;
3551
+ platformEmailThreadId?: string | undefined;
3552
+ }>>;
3553
+ locked: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
3554
+ lockedReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
3555
+ lockAttempts: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
3556
+ forwardedTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
3557
+ forwarded: z.ZodNullable<z.ZodOptional<z.ZodString>>;
3558
+ forwardNote: z.ZodNullable<z.ZodOptional<z.ZodString>>;
3559
+ intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
3560
+ intentScore: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
3561
+ }, "strip", z.ZodTypeAny, {
3562
+ environment: "email" | "phone" | "web";
3563
+ $agent: string;
3564
+ $customer: string;
3565
+ initialContexts?: string[] | undefined;
3566
+ environmentProps?: {
3567
+ subject?: string | undefined;
3568
+ platformEmailThreadId?: string | undefined;
3569
+ } | undefined;
3570
+ locked?: boolean | null | undefined;
3571
+ lockedReason?: string | null | undefined;
3572
+ lockAttempts?: number | null | undefined;
3573
+ forwardedTo?: string | null | undefined;
3574
+ forwarded?: string | null | undefined;
3575
+ forwardNote?: string | null | undefined;
3576
+ intent?: string | null | undefined;
3577
+ intentScore?: number | null | undefined;
3578
+ }, {
3579
+ environment: "email" | "phone" | "web";
3580
+ $agent: string;
3581
+ $customer: string;
3582
+ initialContexts?: string[] | undefined;
3583
+ environmentProps?: {
3584
+ subject?: string | undefined;
3585
+ platformEmailThreadId?: string | undefined;
3586
+ } | undefined;
3587
+ locked?: boolean | null | undefined;
3588
+ lockedReason?: string | null | undefined;
3589
+ lockAttempts?: number | null | undefined;
3590
+ forwardedTo?: string | null | undefined;
3591
+ forwarded?: string | null | undefined;
3592
+ forwardNote?: string | null | undefined;
3593
+ intent?: string | null | undefined;
3594
+ intentScore?: number | null | undefined;
3595
+ }>;
3596
+ context: z.ZodAny;
3597
+ message: z.ZodObject<{
3598
+ id: z.ZodString;
3599
+ role: z.ZodEnum<["agent", "customer", "system"]>;
3600
+ content: z.ZodString;
3601
+ time: z.ZodString;
3602
+ name: z.ZodOptional<z.ZodString>;
3603
+ scheduled: z.ZodOptional<z.ZodString>;
3604
+ context: z.ZodOptional<z.ZodAny>;
3605
+ intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
3606
+ intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3607
+ }, "strip", z.ZodTypeAny, {
3608
+ time: string;
3609
+ id: string;
3610
+ content: string;
3611
+ role: "agent" | "customer" | "system";
3612
+ name?: string | undefined;
3613
+ scheduled?: string | undefined;
3614
+ context?: any;
3615
+ intent?: string | null | undefined;
3616
+ intentScore?: number | null | undefined;
3617
+ }, {
3618
+ time: string;
3619
+ id: string;
3620
+ content: string;
3621
+ role: "agent" | "customer" | "system";
3622
+ name?: string | undefined;
3623
+ scheduled?: string | undefined;
3624
+ context?: any;
3625
+ intent?: string | null | undefined;
3626
+ intentScore?: number | null | undefined;
3627
+ }>;
3628
+ agent: z.ZodObject<Omit<{
3629
+ inactive: z.ZodOptional<z.ZodBoolean>;
3630
+ img: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3631
+ title: z.ZodDefault<z.ZodOptional<z.ZodString>>;
3632
+ context: z.ZodDefault<z.ZodOptional<z.ZodString>>;
3633
+ firstName: z.ZodOptional<z.ZodString>;
3634
+ lastName: z.ZodOptional<z.ZodString>;
3635
+ transcripts: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
3636
+ id: z.ZodString;
3637
+ role: z.ZodEnum<["agent", "customer", "system"]>;
3638
+ content: z.ZodString;
3639
+ time: z.ZodString;
3640
+ name: z.ZodOptional<z.ZodString>;
3641
+ scheduled: z.ZodOptional<z.ZodString>;
3642
+ context: z.ZodOptional<z.ZodAny>;
3643
+ intent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
3644
+ intentScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3645
+ }, "strip", z.ZodTypeAny, {
3646
+ time: string;
3647
+ id: string;
3648
+ content: string;
3649
+ role: "agent" | "customer" | "system";
3650
+ name?: string | undefined;
3651
+ scheduled?: string | undefined;
3652
+ context?: any;
3653
+ intent?: string | null | undefined;
3654
+ intentScore?: number | null | undefined;
3655
+ }, {
3656
+ time: string;
3657
+ id: string;
3658
+ content: string;
3659
+ role: "agent" | "customer" | "system";
3660
+ name?: string | undefined;
3661
+ scheduled?: string | undefined;
3662
+ context?: any;
3663
+ intent?: string | null | undefined;
3664
+ intentScore?: number | null | undefined;
3665
+ }>, "many">, "many">>;
3666
+ audios: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
3667
+ includedLocations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3668
+ excludedLocations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3669
+ model: z.ZodDefault<z.ZodOptional<z.ZodEnum<["Scout9", "bard", "openai"]>>>;
3670
+ deployed: z.ZodOptional<z.ZodObject<{
3671
+ web: z.ZodOptional<z.ZodString>;
3672
+ phone: z.ZodOptional<z.ZodString>;
3673
+ email: z.ZodOptional<z.ZodString>;
3674
+ }, "strip", z.ZodTypeAny, {
3675
+ web?: string | undefined;
3676
+ phone?: string | undefined;
3677
+ email?: string | undefined;
3678
+ }, {
3679
+ web?: string | undefined;
3680
+ phone?: string | undefined;
3681
+ email?: string | undefined;
3682
+ }>>;
3683
+ programmablePhoneNumber: z.ZodOptional<z.ZodString>;
3684
+ programmablePhoneNumberSid: z.ZodOptional<z.ZodString>;
3685
+ programmableEmail: z.ZodOptional<z.ZodString>;
3686
+ forwardEmail: z.ZodOptional<z.ZodString>;
3687
+ forwardPhone: z.ZodOptional<z.ZodString>;
3688
+ id: z.ZodString;
3689
+ }, "context" | "transcripts" | "audios" | "includedLocations" | "excludedLocations" | "model">, "strip", z.ZodTypeAny, {
3690
+ id: string;
3691
+ title: string;
3692
+ inactive?: boolean | undefined;
3693
+ img?: string | null | undefined;
3694
+ firstName?: string | undefined;
3695
+ lastName?: string | undefined;
3696
+ deployed?: {
3697
+ web?: string | undefined;
3698
+ phone?: string | undefined;
3699
+ email?: string | undefined;
3700
+ } | undefined;
3701
+ programmablePhoneNumber?: string | undefined;
3702
+ programmablePhoneNumberSid?: string | undefined;
3703
+ programmableEmail?: string | undefined;
3704
+ forwardEmail?: string | undefined;
3705
+ forwardPhone?: string | undefined;
3706
+ }, {
3707
+ id: string;
3708
+ inactive?: boolean | undefined;
3709
+ img?: string | null | undefined;
3710
+ title?: string | undefined;
3711
+ firstName?: string | undefined;
3712
+ lastName?: string | undefined;
3713
+ deployed?: {
3714
+ web?: string | undefined;
3715
+ phone?: string | undefined;
3716
+ email?: string | undefined;
3717
+ } | undefined;
3718
+ programmablePhoneNumber?: string | undefined;
3719
+ programmablePhoneNumberSid?: string | undefined;
3720
+ programmableEmail?: string | undefined;
3721
+ forwardEmail?: string | undefined;
3722
+ forwardPhone?: string | undefined;
3723
+ }>;
3724
+ customer: z.ZodObject<{
3725
+ firstName: z.ZodOptional<z.ZodString>;
3726
+ lastName: z.ZodOptional<z.ZodString>;
3727
+ name: z.ZodString;
3728
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3729
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3730
+ img: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3731
+ neighborhood: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3732
+ city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3733
+ country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3734
+ line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3735
+ line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3736
+ postal_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3737
+ state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3738
+ town: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3739
+ joined: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3740
+ stripe: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3741
+ stripeDev: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3742
+ }, "strip", z.ZodUnion<[z.ZodBoolean, z.ZodNumber, z.ZodString]>, z.objectOutputType<{
3743
+ firstName: z.ZodOptional<z.ZodString>;
3744
+ lastName: z.ZodOptional<z.ZodString>;
3745
+ name: z.ZodString;
3746
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3747
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3748
+ img: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3749
+ neighborhood: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3750
+ city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3751
+ country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3752
+ line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3753
+ line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3754
+ postal_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3755
+ state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3756
+ town: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3757
+ joined: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3758
+ stripe: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3759
+ stripeDev: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3760
+ }, z.ZodUnion<[z.ZodBoolean, z.ZodNumber, z.ZodString]>, "strip">, z.objectInputType<{
3761
+ firstName: z.ZodOptional<z.ZodString>;
3762
+ lastName: z.ZodOptional<z.ZodString>;
3763
+ name: z.ZodString;
3764
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3765
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3766
+ img: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3767
+ neighborhood: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3768
+ city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3769
+ country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3770
+ line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3771
+ line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3772
+ postal_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3773
+ state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3774
+ town: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3775
+ joined: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3776
+ stripe: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3777
+ stripeDev: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3778
+ }, z.ZodUnion<[z.ZodBoolean, z.ZodNumber, z.ZodString]>, "strip">>;
3779
+ intent: z.ZodObject<{
3780
+ current: z.ZodNullable<z.ZodString>;
3781
+ flow: z.ZodArray<z.ZodString, "many">;
3782
+ initial: z.ZodNullable<z.ZodString>;
3783
+ }, "strip", z.ZodTypeAny, {
3784
+ current: string | null;
3785
+ flow: string[];
3786
+ initial: string | null;
3787
+ }, {
3788
+ current: string | null;
3789
+ flow: string[];
3790
+ initial: string | null;
3791
+ }>;
3792
+ stagnationCount: z.ZodNumber;
3793
+ note: z.ZodOptional<z.ZodString>;
3794
+ }, "strip", z.ZodTypeAny, {
3795
+ message: {
3796
+ time: string;
3797
+ id: string;
3798
+ content: string;
3799
+ role: "agent" | "customer" | "system";
3800
+ name?: string | undefined;
3801
+ scheduled?: string | undefined;
3802
+ context?: any;
3803
+ intent?: string | null | undefined;
3804
+ intentScore?: number | null | undefined;
3805
+ };
3806
+ agent: {
3807
+ id: string;
3808
+ title: string;
3809
+ inactive?: boolean | undefined;
3810
+ img?: string | null | undefined;
3811
+ firstName?: string | undefined;
3812
+ lastName?: string | undefined;
3813
+ deployed?: {
3814
+ web?: string | undefined;
3815
+ phone?: string | undefined;
3816
+ email?: string | undefined;
3817
+ } | undefined;
3818
+ programmablePhoneNumber?: string | undefined;
3819
+ programmablePhoneNumberSid?: string | undefined;
3820
+ programmableEmail?: string | undefined;
3821
+ forwardEmail?: string | undefined;
3822
+ forwardPhone?: string | undefined;
3823
+ };
3824
+ customer: {
3825
+ name: string;
3826
+ firstName?: string | undefined;
3827
+ lastName?: string | undefined;
3828
+ email?: string | null | undefined;
3829
+ phone?: string | null | undefined;
3830
+ img?: string | null | undefined;
3831
+ neighborhood?: string | null | undefined;
3832
+ city?: string | null | undefined;
3833
+ country?: string | null | undefined;
3834
+ line1?: string | null | undefined;
3835
+ line2?: string | null | undefined;
3836
+ postal_code?: string | null | undefined;
3837
+ state?: string | null | undefined;
3838
+ town?: string | null | undefined;
3839
+ joined?: string | null | undefined;
3840
+ stripe?: string | null | undefined;
3841
+ stripeDev?: string | null | undefined;
3842
+ } & {
3843
+ [k: string]: string | number | boolean;
3844
+ };
3845
+ intent: {
3846
+ current: string | null;
3847
+ flow: string[];
3848
+ initial: string | null;
3849
+ };
3850
+ conversation: {
3851
+ environment: "email" | "phone" | "web";
3852
+ $agent: string;
3853
+ $customer: string;
3854
+ initialContexts?: string[] | undefined;
3855
+ environmentProps?: {
3856
+ subject?: string | undefined;
3857
+ platformEmailThreadId?: string | undefined;
3858
+ } | undefined;
3859
+ locked?: boolean | null | undefined;
3860
+ lockedReason?: string | null | undefined;
3861
+ lockAttempts?: number | null | undefined;
3862
+ forwardedTo?: string | null | undefined;
3863
+ forwarded?: string | null | undefined;
3864
+ forwardNote?: string | null | undefined;
3865
+ intent?: string | null | undefined;
3866
+ intentScore?: number | null | undefined;
3867
+ };
3868
+ messages: {
3869
+ time: string;
3870
+ id: string;
3871
+ content: string;
3872
+ role: "agent" | "customer" | "system";
3873
+ name?: string | undefined;
3874
+ scheduled?: string | undefined;
3875
+ context?: any;
3876
+ intent?: string | null | undefined;
3877
+ intentScore?: number | null | undefined;
3878
+ }[];
3879
+ stagnationCount: number;
3880
+ context?: any;
3881
+ note?: string | undefined;
3882
+ }, {
3883
+ message: {
3884
+ time: string;
3885
+ id: string;
3886
+ content: string;
3887
+ role: "agent" | "customer" | "system";
3888
+ name?: string | undefined;
3889
+ scheduled?: string | undefined;
3890
+ context?: any;
3891
+ intent?: string | null | undefined;
3892
+ intentScore?: number | null | undefined;
3893
+ };
3894
+ agent: {
3895
+ id: string;
3896
+ inactive?: boolean | undefined;
3897
+ img?: string | null | undefined;
3898
+ title?: string | undefined;
3899
+ firstName?: string | undefined;
3900
+ lastName?: string | undefined;
3901
+ deployed?: {
3902
+ web?: string | undefined;
3903
+ phone?: string | undefined;
3904
+ email?: string | undefined;
3905
+ } | undefined;
3906
+ programmablePhoneNumber?: string | undefined;
3907
+ programmablePhoneNumberSid?: string | undefined;
3908
+ programmableEmail?: string | undefined;
3909
+ forwardEmail?: string | undefined;
3910
+ forwardPhone?: string | undefined;
3911
+ };
3912
+ customer: {
3913
+ name: string;
3914
+ firstName?: string | undefined;
3915
+ lastName?: string | undefined;
3916
+ email?: string | null | undefined;
3917
+ phone?: string | null | undefined;
3918
+ img?: string | null | undefined;
3919
+ neighborhood?: string | null | undefined;
3920
+ city?: string | null | undefined;
3921
+ country?: string | null | undefined;
3922
+ line1?: string | null | undefined;
3923
+ line2?: string | null | undefined;
3924
+ postal_code?: string | null | undefined;
3925
+ state?: string | null | undefined;
3926
+ town?: string | null | undefined;
3927
+ joined?: string | null | undefined;
3928
+ stripe?: string | null | undefined;
3929
+ stripeDev?: string | null | undefined;
3930
+ } & {
3931
+ [k: string]: string | number | boolean;
3932
+ };
3933
+ intent: {
3934
+ current: string | null;
3935
+ flow: string[];
3936
+ initial: string | null;
3937
+ };
3938
+ conversation: {
3939
+ environment: "email" | "phone" | "web";
3940
+ $agent: string;
3941
+ $customer: string;
3942
+ initialContexts?: string[] | undefined;
3943
+ environmentProps?: {
3944
+ subject?: string | undefined;
3945
+ platformEmailThreadId?: string | undefined;
3946
+ } | undefined;
3947
+ locked?: boolean | null | undefined;
3948
+ lockedReason?: string | null | undefined;
3949
+ lockAttempts?: number | null | undefined;
3950
+ forwardedTo?: string | null | undefined;
3951
+ forwarded?: string | null | undefined;
3952
+ forwardNote?: string | null | undefined;
3953
+ intent?: string | null | undefined;
3954
+ intentScore?: number | null | undefined;
3955
+ };
3956
+ messages: {
3957
+ time: string;
3958
+ id: string;
3959
+ content: string;
3960
+ role: "agent" | "customer" | "system";
3961
+ name?: string | undefined;
3962
+ scheduled?: string | undefined;
3963
+ context?: any;
3964
+ intent?: string | null | undefined;
3965
+ intentScore?: number | null | undefined;
3966
+ }[];
3967
+ stagnationCount: number;
3968
+ context?: any;
3969
+ note?: string | undefined;
3970
+ }>], z.ZodUnknown>, z.ZodUnion<[z.ZodPromise<z.ZodUnion<[z.ZodObject<{
3971
+ forward: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodObject<{
3972
+ to: z.ZodOptional<z.ZodString>;
3973
+ mode: z.ZodOptional<z.ZodEnum<["after-reply", "immediately"]>>;
3974
+ note: z.ZodOptional<z.ZodString>;
3975
+ }, "strip", z.ZodTypeAny, {
3976
+ to?: string | undefined;
3977
+ mode?: "after-reply" | "immediately" | undefined;
3978
+ note?: string | undefined;
3979
+ }, {
3980
+ to?: string | undefined;
3981
+ mode?: "after-reply" | "immediately" | undefined;
3982
+ note?: string | undefined;
3983
+ }>]>>;
3984
+ forwardNote: z.ZodOptional<z.ZodString>;
3985
+ instructions: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
3986
+ id: z.ZodString;
3987
+ content: z.ZodString;
3988
+ }, "strip", z.ZodTypeAny, {
3989
+ id: string;
3990
+ content: string;
3991
+ }, {
3992
+ id: string;
3993
+ content: string;
3994
+ }>, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodObject<{
3995
+ id: z.ZodString;
3996
+ content: z.ZodString;
3997
+ }, "strip", z.ZodTypeAny, {
3998
+ id: string;
3999
+ content: string;
4000
+ }, {
4001
+ id: string;
4002
+ content: string;
4003
+ }>, "many">]>>;
4004
+ removeInstructions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4005
+ message: z.ZodOptional<z.ZodString>;
4006
+ secondsDelay: z.ZodOptional<z.ZodNumber>;
4007
+ scheduled: z.ZodOptional<z.ZodNumber>;
4008
+ contextUpsert: any;
4009
+ resetIntent: z.ZodOptional<z.ZodBoolean>;
4010
+ }, "strip", z.ZodTypeAny, {
4011
+ forward?: string | boolean | {
4012
+ to?: string | undefined;
4013
+ mode?: "after-reply" | "immediately" | undefined;
4014
+ note?: string | undefined;
4015
+ } | undefined;
4016
+ forwardNote?: string | undefined;
4017
+ instructions?: string | string[] | {
4018
+ id: string;
4019
+ content: string;
4020
+ } | {
4021
+ id: string;
4022
+ content: string;
4023
+ }[] | undefined;
4024
+ removeInstructions?: string[] | undefined;
4025
+ message?: string | undefined;
4026
+ secondsDelay?: number | undefined;
4027
+ scheduled?: number | undefined;
4028
+ contextUpsert?: any;
4029
+ resetIntent?: boolean | undefined;
4030
+ }, {
4031
+ forward?: string | boolean | {
4032
+ to?: string | undefined;
4033
+ mode?: "after-reply" | "immediately" | undefined;
4034
+ note?: string | undefined;
4035
+ } | undefined;
4036
+ forwardNote?: string | undefined;
4037
+ instructions?: string | string[] | {
4038
+ id: string;
4039
+ content: string;
4040
+ } | {
4041
+ id: string;
4042
+ content: string;
4043
+ }[] | undefined;
4044
+ removeInstructions?: string[] | undefined;
4045
+ message?: string | undefined;
4046
+ secondsDelay?: number | undefined;
4047
+ scheduled?: number | undefined;
4048
+ contextUpsert?: any;
4049
+ resetIntent?: boolean | undefined;
4050
+ }>, z.ZodArray<z.ZodObject<{
4051
+ forward: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodObject<{
4052
+ to: z.ZodOptional<z.ZodString>;
4053
+ mode: z.ZodOptional<z.ZodEnum<["after-reply", "immediately"]>>;
4054
+ note: z.ZodOptional<z.ZodString>;
4055
+ }, "strip", z.ZodTypeAny, {
4056
+ to?: string | undefined;
4057
+ mode?: "after-reply" | "immediately" | undefined;
4058
+ note?: string | undefined;
4059
+ }, {
4060
+ to?: string | undefined;
4061
+ mode?: "after-reply" | "immediately" | undefined;
4062
+ note?: string | undefined;
4063
+ }>]>>;
4064
+ forwardNote: z.ZodOptional<z.ZodString>;
4065
+ instructions: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
4066
+ id: z.ZodString;
4067
+ content: z.ZodString;
4068
+ }, "strip", z.ZodTypeAny, {
4069
+ id: string;
4070
+ content: string;
4071
+ }, {
4072
+ id: string;
4073
+ content: string;
4074
+ }>, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodObject<{
4075
+ id: z.ZodString;
4076
+ content: z.ZodString;
4077
+ }, "strip", z.ZodTypeAny, {
4078
+ id: string;
4079
+ content: string;
4080
+ }, {
4081
+ id: string;
4082
+ content: string;
4083
+ }>, "many">]>>;
4084
+ removeInstructions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4085
+ message: z.ZodOptional<z.ZodString>;
4086
+ secondsDelay: z.ZodOptional<z.ZodNumber>;
4087
+ scheduled: z.ZodOptional<z.ZodNumber>;
4088
+ contextUpsert: any;
4089
+ resetIntent: z.ZodOptional<z.ZodBoolean>;
4090
+ }, "strip", z.ZodTypeAny, {
4091
+ forward?: string | boolean | {
4092
+ to?: string | undefined;
4093
+ mode?: "after-reply" | "immediately" | undefined;
4094
+ note?: string | undefined;
4095
+ } | undefined;
4096
+ forwardNote?: string | undefined;
4097
+ instructions?: string | string[] | {
4098
+ id: string;
4099
+ content: string;
4100
+ } | {
4101
+ id: string;
4102
+ content: string;
4103
+ }[] | undefined;
4104
+ removeInstructions?: string[] | undefined;
4105
+ message?: string | undefined;
4106
+ secondsDelay?: number | undefined;
4107
+ scheduled?: number | undefined;
4108
+ contextUpsert?: any;
4109
+ resetIntent?: boolean | undefined;
4110
+ }, {
4111
+ forward?: string | boolean | {
4112
+ to?: string | undefined;
4113
+ mode?: "after-reply" | "immediately" | undefined;
4114
+ note?: string | undefined;
4115
+ } | undefined;
4116
+ forwardNote?: string | undefined;
4117
+ instructions?: string | string[] | {
4118
+ id: string;
4119
+ content: string;
4120
+ } | {
4121
+ id: string;
4122
+ content: string;
4123
+ }[] | undefined;
4124
+ removeInstructions?: string[] | undefined;
4125
+ message?: string | undefined;
4126
+ secondsDelay?: number | undefined;
4127
+ scheduled?: number | undefined;
4128
+ contextUpsert?: any;
4129
+ resetIntent?: boolean | undefined;
4130
+ }>, "many">]>>, z.ZodUnion<[z.ZodObject<{
4131
+ forward: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodObject<{
4132
+ to: z.ZodOptional<z.ZodString>;
4133
+ mode: z.ZodOptional<z.ZodEnum<["after-reply", "immediately"]>>;
4134
+ note: z.ZodOptional<z.ZodString>;
4135
+ }, "strip", z.ZodTypeAny, {
4136
+ to?: string | undefined;
4137
+ mode?: "after-reply" | "immediately" | undefined;
4138
+ note?: string | undefined;
4139
+ }, {
4140
+ to?: string | undefined;
4141
+ mode?: "after-reply" | "immediately" | undefined;
4142
+ note?: string | undefined;
4143
+ }>]>>;
4144
+ forwardNote: z.ZodOptional<z.ZodString>;
4145
+ instructions: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
4146
+ id: z.ZodString;
4147
+ content: z.ZodString;
4148
+ }, "strip", z.ZodTypeAny, {
4149
+ id: string;
4150
+ content: string;
4151
+ }, {
4152
+ id: string;
4153
+ content: string;
4154
+ }>, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodObject<{
4155
+ id: z.ZodString;
4156
+ content: z.ZodString;
4157
+ }, "strip", z.ZodTypeAny, {
4158
+ id: string;
4159
+ content: string;
4160
+ }, {
4161
+ id: string;
4162
+ content: string;
4163
+ }>, "many">]>>;
4164
+ removeInstructions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4165
+ message: z.ZodOptional<z.ZodString>;
4166
+ secondsDelay: z.ZodOptional<z.ZodNumber>;
4167
+ scheduled: z.ZodOptional<z.ZodNumber>;
4168
+ contextUpsert: any;
4169
+ resetIntent: z.ZodOptional<z.ZodBoolean>;
4170
+ }, "strip", z.ZodTypeAny, {
4171
+ forward?: string | boolean | {
4172
+ to?: string | undefined;
4173
+ mode?: "after-reply" | "immediately" | undefined;
4174
+ note?: string | undefined;
4175
+ } | undefined;
4176
+ forwardNote?: string | undefined;
4177
+ instructions?: string | string[] | {
4178
+ id: string;
4179
+ content: string;
4180
+ } | {
4181
+ id: string;
4182
+ content: string;
4183
+ }[] | undefined;
4184
+ removeInstructions?: string[] | undefined;
4185
+ message?: string | undefined;
4186
+ secondsDelay?: number | undefined;
4187
+ scheduled?: number | undefined;
4188
+ contextUpsert?: any;
4189
+ resetIntent?: boolean | undefined;
4190
+ }, {
4191
+ forward?: string | boolean | {
4192
+ to?: string | undefined;
4193
+ mode?: "after-reply" | "immediately" | undefined;
4194
+ note?: string | undefined;
4195
+ } | undefined;
4196
+ forwardNote?: string | undefined;
4197
+ instructions?: string | string[] | {
4198
+ id: string;
4199
+ content: string;
4200
+ } | {
4201
+ id: string;
4202
+ content: string;
4203
+ }[] | undefined;
4204
+ removeInstructions?: string[] | undefined;
4205
+ message?: string | undefined;
4206
+ secondsDelay?: number | undefined;
4207
+ scheduled?: number | undefined;
4208
+ contextUpsert?: any;
4209
+ resetIntent?: boolean | undefined;
4210
+ }>, z.ZodArray<z.ZodObject<{
4211
+ forward: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodObject<{
4212
+ to: z.ZodOptional<z.ZodString>;
4213
+ mode: z.ZodOptional<z.ZodEnum<["after-reply", "immediately"]>>;
4214
+ note: z.ZodOptional<z.ZodString>;
4215
+ }, "strip", z.ZodTypeAny, {
4216
+ to?: string | undefined;
4217
+ mode?: "after-reply" | "immediately" | undefined;
4218
+ note?: string | undefined;
4219
+ }, {
4220
+ to?: string | undefined;
4221
+ mode?: "after-reply" | "immediately" | undefined;
4222
+ note?: string | undefined;
4223
+ }>]>>;
4224
+ forwardNote: z.ZodOptional<z.ZodString>;
4225
+ instructions: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
4226
+ id: z.ZodString;
4227
+ content: z.ZodString;
4228
+ }, "strip", z.ZodTypeAny, {
4229
+ id: string;
4230
+ content: string;
4231
+ }, {
4232
+ id: string;
4233
+ content: string;
4234
+ }>, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodObject<{
4235
+ id: z.ZodString;
4236
+ content: z.ZodString;
4237
+ }, "strip", z.ZodTypeAny, {
4238
+ id: string;
4239
+ content: string;
4240
+ }, {
4241
+ id: string;
4242
+ content: string;
4243
+ }>, "many">]>>;
4244
+ removeInstructions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4245
+ message: z.ZodOptional<z.ZodString>;
4246
+ secondsDelay: z.ZodOptional<z.ZodNumber>;
4247
+ scheduled: z.ZodOptional<z.ZodNumber>;
4248
+ contextUpsert: any;
4249
+ resetIntent: z.ZodOptional<z.ZodBoolean>;
4250
+ }, "strip", z.ZodTypeAny, {
4251
+ forward?: string | boolean | {
4252
+ to?: string | undefined;
4253
+ mode?: "after-reply" | "immediately" | undefined;
4254
+ note?: string | undefined;
4255
+ } | undefined;
4256
+ forwardNote?: string | undefined;
4257
+ instructions?: string | string[] | {
4258
+ id: string;
4259
+ content: string;
4260
+ } | {
4261
+ id: string;
4262
+ content: string;
4263
+ }[] | undefined;
4264
+ removeInstructions?: string[] | undefined;
4265
+ message?: string | undefined;
4266
+ secondsDelay?: number | undefined;
4267
+ scheduled?: number | undefined;
4268
+ contextUpsert?: any;
4269
+ resetIntent?: boolean | undefined;
4270
+ }, {
4271
+ forward?: string | boolean | {
4272
+ to?: string | undefined;
4273
+ mode?: "after-reply" | "immediately" | undefined;
4274
+ note?: string | undefined;
4275
+ } | undefined;
4276
+ forwardNote?: string | undefined;
4277
+ instructions?: string | string[] | {
4278
+ id: string;
4279
+ content: string;
4280
+ } | {
4281
+ id: string;
4282
+ content: string;
4283
+ }[] | undefined;
4284
+ removeInstructions?: string[] | undefined;
4285
+ message?: string | undefined;
4286
+ secondsDelay?: number | undefined;
4287
+ scheduled?: number | undefined;
4288
+ contextUpsert?: any;
4289
+ resetIntent?: boolean | undefined;
4290
+ }>, "many">]>]>>;
4291
+ export type IWorkflowConfiguration = import('zod').infer<typeof WorkflowConfigurationSchema>;
4292
+ export type IWorkflowsConfiguration = import('zod').infer<typeof WorkflowsConfigurationSchema>;
4293
+ export type IConversation = import('zod').infer<typeof ConversationSchema>;
4294
+ export type IIntentWorkflowEvent = import('zod').infer<typeof IntentWorkflowEventSchema>;
4295
+ export type IWorkflowEvent = import('zod').infer<typeof WorkflowEventSchema>;
4296
+ /**
4297
+ * Forward input information of a conversation
4298
+ */
4299
+ export type IForward = import('zod').infer<typeof ForwardSchema>;
4300
+ /**
4301
+ * Instruction object schema used to send context to guide conversations
4302
+ */
4303
+ export type IInstruction = import('zod').infer<typeof InstructionSchema>;
4304
+ /**
4305
+ * If its a string, it will be sent as a static string.
4306
+ * If it's a object or WorkflowResponseMessageAPI - it will use
4307
+ */
4308
+ export type IWorkflowResponseMessage = import('zod').infer<typeof WorkflowResponseMessage>;
4309
+ export type IWorkflowResponseMessageApiRequest = import('zod').infer<typeof WorkflowResponseMessageApiRequest>;
4310
+ /**
4311
+ * The intended response provided by the WorkflowResponseMessageApiRequest
4312
+ */
4313
+ export type IWorkflowResponseMessageApiResponse = import('zod').infer<typeof WorkflowResponseMessageApiResponse>;
4314
+ /**
4315
+ * The workflow response object slot
4316
+ */
4317
+ export type IWorkflowResponseSlot = import('zod').infer<typeof WorkflowResponseSlotSchema>;
4318
+ /**
4319
+ * The workflow response to send in any given workflow
4320
+ */
4321
+ export type IWorkflowResponse = import('zod').infer<typeof WorkflowResponseSchema>;
4322
+ export type IWorkflowFunction = import('zod').infer<typeof WorkflowFunctionSchema>;
4323
+ export const apiFunctionSchema: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
4324
+ searchParams: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
4325
+ params: z.ZodRecord<z.ZodString, z.ZodString>;
4326
+ }, "strip", z.ZodTypeAny, {
4327
+ params: Record<string, string>;
4328
+ searchParams: Record<string, string | string[]>;
4329
+ }, {
4330
+ params: Record<string, string>;
4331
+ searchParams: Record<string, string | string[]>;
4332
+ }>], z.ZodUnknown>, z.ZodPromise<z.ZodObject<{
4333
+ body: z.ZodAny;
4334
+ init: z.ZodOptional<z.ZodObject<{
4335
+ status: z.ZodOptional<z.ZodNumber>;
4336
+ statusText: z.ZodOptional<z.ZodString>;
4337
+ headers: z.ZodOptional<z.ZodAny>;
4338
+ }, "strip", z.ZodTypeAny, {
4339
+ status?: number | undefined;
4340
+ statusText?: string | undefined;
4341
+ headers?: any;
4342
+ }, {
4343
+ status?: number | undefined;
4344
+ statusText?: string | undefined;
4345
+ headers?: any;
4346
+ }>>; /**
4347
+ * @template Params
4348
+ * @template RequestBody
4349
+ * @template Response
4350
+ * @typedef {function(IApiFunctionParams & {body: Partial<RequestBody>}): Promise<EventResponse<Response>>} IPatchApiFunction
4351
+ */
4352
+ }, "strip", z.ZodTypeAny, {
4353
+ body?: any;
4354
+ init?: {
4355
+ status?: number | undefined;
4356
+ statusText?: string | undefined;
4357
+ headers?: any;
4358
+ } | undefined;
4359
+ }, {
4360
+ body?: any;
4361
+ init?: {
4362
+ status?: number | undefined;
4363
+ statusText?: string | undefined;
4364
+ headers?: any;
4365
+ } | undefined;
4366
+ }>>>;
4367
+
4368
+ export const queryApiFunctionSchema: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
4369
+ searchParams: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
4370
+ params: z.ZodRecord<z.ZodString, z.ZodString>;
4371
+ }, "strip", z.ZodTypeAny, {
4372
+ params: Record<string, string>;
4373
+ searchParams: Record<string, string | string[]>;
4374
+ }, {
4375
+ params: Record<string, string>;
4376
+ searchParams: Record<string, string | string[]>;
4377
+ }>], z.ZodUnknown>, z.ZodPromise<z.ZodObject<{
4378
+ body: z.ZodAny;
4379
+ init: z.ZodOptional<z.ZodObject<{
4380
+ status: z.ZodOptional<z.ZodNumber>;
4381
+ statusText: z.ZodOptional<z.ZodString>;
4382
+ headers: z.ZodOptional<z.ZodAny>;
4383
+ }, "strip", z.ZodTypeAny, {
4384
+ status?: number | undefined;
4385
+ statusText?: string | undefined;
4386
+ headers?: any;
4387
+ }, {
4388
+ status?: number | undefined;
4389
+ statusText?: string | undefined;
4390
+ headers?: any;
4391
+ }>>; /**
4392
+ * @template Params
4393
+ * @template RequestBody
4394
+ * @template Response
4395
+ * @typedef {function(IApiFunctionParams & {body: Partial<RequestBody>}): Promise<EventResponse<Response>>} IPatchApiFunction
4396
+ */
4397
+ }, "strip", z.ZodTypeAny, {
4398
+ body?: any;
4399
+ init?: {
4400
+ status?: number | undefined;
4401
+ statusText?: string | undefined;
4402
+ headers?: any;
4403
+ } | undefined;
4404
+ }, {
4405
+ body?: any;
4406
+ init?: {
4407
+ status?: number | undefined;
4408
+ statusText?: string | undefined;
4409
+ headers?: any;
4410
+ } | undefined;
4411
+ }>>>;
4412
+
4413
+ export const getApiFunctionSchema: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
4414
+ searchParams: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
4415
+ params: z.ZodRecord<z.ZodString, z.ZodString>;
4416
+ }, "strip", z.ZodTypeAny, {
4417
+ params: Record<string, string>;
4418
+ searchParams: Record<string, string | string[]>;
4419
+ }, {
4420
+ params: Record<string, string>;
4421
+ searchParams: Record<string, string | string[]>;
4422
+ }>], z.ZodUnknown>, z.ZodPromise<z.ZodObject<{
4423
+ body: z.ZodAny;
4424
+ init: z.ZodOptional<z.ZodObject<{
4425
+ status: z.ZodOptional<z.ZodNumber>;
4426
+ statusText: z.ZodOptional<z.ZodString>;
4427
+ headers: z.ZodOptional<z.ZodAny>;
4428
+ }, "strip", z.ZodTypeAny, {
4429
+ status?: number | undefined;
4430
+ statusText?: string | undefined;
4431
+ headers?: any;
4432
+ }, {
4433
+ status?: number | undefined;
4434
+ statusText?: string | undefined;
4435
+ headers?: any;
4436
+ }>>; /**
4437
+ * @template Params
4438
+ * @template RequestBody
4439
+ * @template Response
4440
+ * @typedef {function(IApiFunctionParams & {body: Partial<RequestBody>}): Promise<EventResponse<Response>>} IPatchApiFunction
4441
+ */
4442
+ }, "strip", z.ZodTypeAny, {
4443
+ body?: any;
4444
+ init?: {
4445
+ status?: number | undefined;
4446
+ statusText?: string | undefined;
4447
+ headers?: any;
4448
+ } | undefined;
4449
+ }, {
4450
+ body?: any;
4451
+ init?: {
4452
+ status?: number | undefined;
4453
+ statusText?: string | undefined;
4454
+ headers?: any;
4455
+ } | undefined;
4456
+ }>>>;
4457
+ export function postApiFunctionSchema(requestBodySchema: any): z.ZodFunction<z.ZodTuple<[z.ZodObject<{
4458
+ params: z.ZodRecord<z.ZodString, z.ZodString>;
4459
+ searchParams: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
4460
+ body: any;
4461
+ }, "strip", z.ZodTypeAny, {
4462
+ params: Record<string, string>;
4463
+ searchParams: Record<string, string | string[]>;
4464
+ body?: any;
4465
+ }, {
4466
+ params: Record<string, string>;
4467
+ searchParams: Record<string, string | string[]>;
4468
+ body?: any;
4469
+ }>], z.ZodUnknown>, z.ZodPromise<z.ZodObject<{
4470
+ body: z.ZodAny;
4471
+ init: z.ZodOptional<z.ZodObject<{
4472
+ status: z.ZodOptional<z.ZodNumber>;
4473
+ statusText: z.ZodOptional<z.ZodString>;
4474
+ headers: z.ZodOptional<z.ZodAny>;
4475
+ }, "strip", z.ZodTypeAny, {
4476
+ status?: number | undefined;
4477
+ statusText?: string | undefined;
4478
+ headers?: any;
4479
+ }, {
4480
+ status?: number | undefined;
4481
+ statusText?: string | undefined;
4482
+ headers?: any;
4483
+ }>>; /**
4484
+ * @template Params
4485
+ * @template RequestBody
4486
+ * @template Response
4487
+ * @typedef {function(IApiFunctionParams & {body: Partial<RequestBody>}): Promise<EventResponse<Response>>} IPatchApiFunction
4488
+ */
4489
+ }, "strip", z.ZodTypeAny, {
4490
+ body?: any;
4491
+ init?: {
4492
+ status?: number | undefined;
4493
+ statusText?: string | undefined;
4494
+ headers?: any;
4495
+ } | undefined;
4496
+ }, {
4497
+ body?: any;
4498
+ init?: {
4499
+ status?: number | undefined;
4500
+ statusText?: string | undefined;
4501
+ headers?: any;
4502
+ } | undefined;
4503
+ }>>>;
4504
+ export function putApiFunctionSchema(requestBodySchema: any): z.ZodFunction<z.ZodTuple<[z.ZodObject<{
4505
+ params: z.ZodRecord<z.ZodString, z.ZodString>;
4506
+ searchParams: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
4507
+ body: any;
4508
+ }, "strip", z.ZodTypeAny, {
4509
+ params: Record<string, string>;
4510
+ searchParams: Record<string, string | string[]>;
4511
+ body?: any;
4512
+ }, {
4513
+ params: Record<string, string>;
4514
+ searchParams: Record<string, string | string[]>;
4515
+ body?: any;
4516
+ }>], z.ZodUnknown>, z.ZodPromise<z.ZodObject<{
4517
+ body: z.ZodAny;
4518
+ init: z.ZodOptional<z.ZodObject<{
4519
+ status: z.ZodOptional<z.ZodNumber>;
4520
+ statusText: z.ZodOptional<z.ZodString>;
4521
+ headers: z.ZodOptional<z.ZodAny>;
4522
+ }, "strip", z.ZodTypeAny, {
4523
+ status?: number | undefined;
4524
+ statusText?: string | undefined;
4525
+ headers?: any;
4526
+ }, {
4527
+ status?: number | undefined;
4528
+ statusText?: string | undefined;
4529
+ headers?: any;
4530
+ }>>; /**
4531
+ * @template Params
4532
+ * @template RequestBody
4533
+ * @template Response
4534
+ * @typedef {function(IApiFunctionParams & {body: Partial<RequestBody>}): Promise<EventResponse<Response>>} IPatchApiFunction
4535
+ */
4536
+ }, "strip", z.ZodTypeAny, {
4537
+ body?: any;
4538
+ init?: {
4539
+ status?: number | undefined;
4540
+ statusText?: string | undefined;
4541
+ headers?: any;
4542
+ } | undefined;
4543
+ }, {
4544
+ body?: any;
4545
+ init?: {
4546
+ status?: number | undefined;
4547
+ statusText?: string | undefined;
4548
+ headers?: any;
4549
+ } | undefined;
4550
+ }>>>;
4551
+ export function patchApiFunctionSchema(requestBodySchema: any): z.ZodFunction<z.ZodTuple<[z.ZodObject<{
4552
+ params: z.ZodRecord<z.ZodString, z.ZodString>;
4553
+ searchParams: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
4554
+ body: any;
4555
+ }, "strip", z.ZodTypeAny, {
4556
+ params: Record<string, string>;
4557
+ searchParams: Record<string, string | string[]>;
4558
+ body?: any;
4559
+ }, {
4560
+ params: Record<string, string>;
4561
+ searchParams: Record<string, string | string[]>;
4562
+ body?: any;
4563
+ }>], z.ZodUnknown>, z.ZodPromise<z.ZodObject<{
4564
+ body: z.ZodAny;
4565
+ init: z.ZodOptional<z.ZodObject<{
4566
+ status: z.ZodOptional<z.ZodNumber>;
4567
+ statusText: z.ZodOptional<z.ZodString>;
4568
+ headers: z.ZodOptional<z.ZodAny>;
4569
+ }, "strip", z.ZodTypeAny, {
4570
+ status?: number | undefined;
4571
+ statusText?: string | undefined;
4572
+ headers?: any;
4573
+ }, {
4574
+ status?: number | undefined;
4575
+ statusText?: string | undefined;
4576
+ headers?: any;
4577
+ }>>; /**
4578
+ * @template Params
4579
+ * @template RequestBody
4580
+ * @template Response
4581
+ * @typedef {function(IApiFunctionParams & {body: Partial<RequestBody>}): Promise<EventResponse<Response>>} IPatchApiFunction
4582
+ */
4583
+ }, "strip", z.ZodTypeAny, {
4584
+ body?: any;
4585
+ init?: {
4586
+ status?: number | undefined;
4587
+ statusText?: string | undefined;
4588
+ headers?: any;
4589
+ } | undefined;
4590
+ }, {
4591
+ body?: any;
4592
+ init?: {
4593
+ status?: number | undefined;
4594
+ statusText?: string | undefined;
4595
+ headers?: any;
4596
+ } | undefined;
4597
+ }>>>;
4598
+
4599
+ export const deleteApiFunctionSchema: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
4600
+ searchParams: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
4601
+ params: z.ZodRecord<z.ZodString, z.ZodString>;
4602
+ }, "strip", z.ZodTypeAny, {
4603
+ params: Record<string, string>;
4604
+ searchParams: Record<string, string | string[]>;
4605
+ }, {
4606
+ params: Record<string, string>;
4607
+ searchParams: Record<string, string | string[]>;
4608
+ }>], z.ZodUnknown>, z.ZodPromise<z.ZodObject<{
4609
+ body: z.ZodAny;
4610
+ init: z.ZodOptional<z.ZodObject<{
4611
+ status: z.ZodOptional<z.ZodNumber>;
4612
+ statusText: z.ZodOptional<z.ZodString>;
4613
+ headers: z.ZodOptional<z.ZodAny>;
4614
+ }, "strip", z.ZodTypeAny, {
4615
+ status?: number | undefined;
4616
+ statusText?: string | undefined;
4617
+ headers?: any;
4618
+ }, {
4619
+ status?: number | undefined;
4620
+ statusText?: string | undefined;
4621
+ headers?: any;
4622
+ }>>; /**
4623
+ * @template Params
4624
+ * @template RequestBody
4625
+ * @template Response
4626
+ * @typedef {function(IApiFunctionParams & {body: Partial<RequestBody>}): Promise<EventResponse<Response>>} IPatchApiFunction
4627
+ */
4628
+ }, "strip", z.ZodTypeAny, {
4629
+ body?: any;
4630
+ init?: {
4631
+ status?: number | undefined;
4632
+ statusText?: string | undefined;
4633
+ headers?: any;
4634
+ } | undefined;
4635
+ }, {
4636
+ body?: any;
4637
+ init?: {
4638
+ status?: number | undefined;
4639
+ statusText?: string | undefined;
4640
+ headers?: any;
4641
+ } | undefined;
4642
+ }>>>;
4643
+ export type IApiFunctionParams = {
4644
+ searchParams: {
4645
+ [x: string]: string | string[];
4646
+ };
4647
+ params: Record<string, string>;
4648
+ };
4649
+ export type IApiEntityFunctionParams = IApiFunctionParams & {
4650
+ id: string;
4651
+ };
4652
+ export type IApiFunction<Params, Response_1> = (arg0: IApiFunctionParams) => Promise<EventResponse<any>>;
4653
+ export type IQueryApiFunction<Params, Response_1> = IApiFunction<Params, Response>;
4654
+ export type GetApiFunction<Params, Response_1> = IApiFunction<Params, Response>;
4655
+ export type IPostApiFunction<Params, RequestBody, Response_1> = (arg0: IApiFunctionParams & {
4656
+ body: Partial<RequestBody>;
4657
+ }) => Promise<EventResponse<Response>>;
4658
+ export type IPutApiFunction<Params, RequestBody, Response_1> = (arg0: IApiFunctionParams & {
4659
+ body: Partial<RequestBody>;
4660
+ }) => Promise<EventResponse<Response>>;
4661
+ export type IPatchApiFunction<Params, RequestBody, Response_1> = (arg0: IApiFunctionParams & {
4662
+ body: Partial<RequestBody>;
4663
+ }) => Promise<EventResponse<Response>>;
4664
+ export type IDeleteApiFunction<Params, Response_1> = IApiFunction<Params, Response>;
1102
4665
  }
1103
4666
 
1104
4667
  declare module '@scout9/app/spirits' {