@botpress/webchat 2.3.1 → 2.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/.eslintrc.js +11 -0
  2. package/.turbo/turbo-build.log +15 -14
  3. package/dist/adapters/index.d.ts +1 -6
  4. package/dist/adapters/target.d.ts +1 -6
  5. package/dist/adapters/typings.d.ts +1 -6
  6. package/dist/adapters/webchat-to-target.d.ts +8 -0
  7. package/dist/adapters/webchat.d.ts +3 -1986
  8. package/dist/client/state-machine.d.ts +1 -1
  9. package/dist/client/types.d.ts +1 -0
  10. package/dist/components/MessageList/MessageList.d.ts +1 -1
  11. package/dist/components/renderers/Audio/Audio.d.ts +1 -0
  12. package/dist/components/renderers/Carousel/Carousel.d.ts +1 -0
  13. package/dist/components/renderers/File/File.d.ts +1 -0
  14. package/dist/components/renderers/Image/Image.d.ts +1 -0
  15. package/dist/components/renderers/Location/Location.d.ts +1 -0
  16. package/dist/components/renderers/Video/Video.d.ts +1 -0
  17. package/dist/gen/signals/index.d.ts +34 -34
  18. package/dist/gen/signals/messageCreated.z.d.ts +34 -34
  19. package/dist/index.js +23994 -21803
  20. package/dist/index.umd.cjs +117 -113
  21. package/dist/schemas/init.d.ts +14 -14
  22. package/dist/schemas/theme.d.ts +8 -8
  23. package/dist/stores/offlineStore.d.ts +1 -1
  24. package/dist/stores/webchatStore.d.ts +2 -2
  25. package/dist/types/block-type.d.ts +2 -0
  26. package/package.json +21 -22
  27. package/dist/adapters/adapters/messaging-to-target.d.ts +0 -184
  28. package/dist/adapters/adapters/messaging-to-webchat.d.ts +0 -5
  29. package/dist/adapters/adapters/webchat-to-messaging.d.ts +0 -223
  30. package/dist/adapters/adapters/webchat-to-target.d.ts +0 -197
  31. package/dist/adapters/messaging.d.ts +0 -1455
  32. package/dist/adapters/sdk.d.ts +0 -472
  33. package/dist/client/inner-client/event-emitter.d.ts +0 -10
  34. package/dist/client/inner-client/eventsource.d.ts +0 -22
  35. package/dist/client/inner-client/index.d.ts +0 -42
  36. package/dist/client/inner-client/signal-listener.d.ts +0 -47
  37. package/openapi.ts +0 -35
@@ -1,1987 +1,4 @@
1
1
  import * as types from './typings';
2
- import { z } from 'zod';
3
- export declare const audioSchema: z.ZodObject<{
4
- audioUrl: z.ZodString;
5
- type: z.ZodLiteral<"audio">;
6
- className: z.ZodOptional<z.ZodString>;
7
- }, "strip", z.ZodTypeAny, {
8
- type: "audio";
9
- audioUrl: string;
10
- className?: string | undefined;
11
- }, {
12
- type: "audio";
13
- audioUrl: string;
14
- className?: string | undefined;
15
- }>;
16
- export declare const cardSchema: z.ZodObject<{
17
- title: z.ZodString;
18
- actions: z.ZodArray<z.ZodObject<{
19
- action: z.ZodEnum<["postback", "url", "say"]>;
20
- label: z.ZodString;
21
- value: z.ZodString;
22
- }, "strip", z.ZodTypeAny, {
23
- value: string;
24
- action: "postback" | "url" | "say";
25
- label: string;
26
- }, {
27
- value: string;
28
- action: "postback" | "url" | "say";
29
- label: string;
30
- }>, "many">;
31
- className: z.ZodOptional<z.ZodString>;
32
- type: z.ZodLiteral<"card">;
33
- subtitle: z.ZodOptional<z.ZodString>;
34
- imageUrl: z.ZodOptional<z.ZodString>;
35
- }, "strip", z.ZodTypeAny, {
36
- type: "card";
37
- title: string;
38
- actions: {
39
- value: string;
40
- action: "postback" | "url" | "say";
41
- label: string;
42
- }[];
43
- className?: string | undefined;
44
- subtitle?: string | undefined;
45
- imageUrl?: string | undefined;
46
- }, {
47
- type: "card";
48
- title: string;
49
- actions: {
50
- value: string;
51
- action: "postback" | "url" | "say";
52
- label: string;
53
- }[];
54
- className?: string | undefined;
55
- subtitle?: string | undefined;
56
- imageUrl?: string | undefined;
57
- }>;
58
- export declare const carouselSchema: z.ZodObject<{
59
- type: z.ZodLiteral<"carousel">;
60
- className: z.ZodOptional<z.ZodString>;
61
- items: z.ZodArray<z.ZodObject<Omit<{
62
- title: z.ZodString;
63
- actions: z.ZodArray<z.ZodObject<{
64
- action: z.ZodEnum<["postback", "url", "say"]>;
65
- label: z.ZodString;
66
- value: z.ZodString;
67
- }, "strip", z.ZodTypeAny, {
68
- value: string;
69
- action: "postback" | "url" | "say";
70
- label: string;
71
- }, {
72
- value: string;
73
- action: "postback" | "url" | "say";
74
- label: string;
75
- }>, "many">;
76
- className: z.ZodOptional<z.ZodString>;
77
- type: z.ZodLiteral<"card">;
78
- subtitle: z.ZodOptional<z.ZodString>;
79
- imageUrl: z.ZodOptional<z.ZodString>;
80
- }, "type">, "strip", z.ZodTypeAny, {
81
- title: string;
82
- actions: {
83
- value: string;
84
- action: "postback" | "url" | "say";
85
- label: string;
86
- }[];
87
- imageUrl?: string | undefined;
88
- subtitle?: string | undefined;
89
- className?: string | undefined;
90
- }, {
91
- title: string;
92
- actions: {
93
- value: string;
94
- action: "postback" | "url" | "say";
95
- label: string;
96
- }[];
97
- imageUrl?: string | undefined;
98
- subtitle?: string | undefined;
99
- className?: string | undefined;
100
- }>, "many">;
101
- }, "strip", z.ZodTypeAny, {
102
- type: "carousel";
103
- items: {
104
- title: string;
105
- actions: {
106
- value: string;
107
- action: "postback" | "url" | "say";
108
- label: string;
109
- }[];
110
- imageUrl?: string | undefined;
111
- subtitle?: string | undefined;
112
- className?: string | undefined;
113
- }[];
114
- className?: string | undefined;
115
- }, {
116
- type: "carousel";
117
- items: {
118
- title: string;
119
- actions: {
120
- value: string;
121
- action: "postback" | "url" | "say";
122
- label: string;
123
- }[];
124
- imageUrl?: string | undefined;
125
- subtitle?: string | undefined;
126
- className?: string | undefined;
127
- }[];
128
- className?: string | undefined;
129
- }>;
130
- export declare const choiceSchema: z.ZodObject<{
131
- options: z.ZodArray<z.ZodObject<{
132
- label: z.ZodString;
133
- value: z.ZodString;
134
- }, "strip", z.ZodTypeAny, {
135
- value: string;
136
- label: string;
137
- }, {
138
- value: string;
139
- label: string;
140
- }>, "many">;
141
- type: z.ZodLiteral<"choice">;
142
- disableFreeText: z.ZodOptional<z.ZodBoolean>;
143
- className: z.ZodOptional<z.ZodString>;
144
- text: z.ZodString;
145
- }, "strip", z.ZodTypeAny, {
146
- type: "choice";
147
- text: string;
148
- options: {
149
- value: string;
150
- label: string;
151
- }[];
152
- disableFreeText?: boolean | undefined;
153
- className?: string | undefined;
154
- }, {
155
- type: "choice";
156
- text: string;
157
- options: {
158
- value: string;
159
- label: string;
160
- }[];
161
- disableFreeText?: boolean | undefined;
162
- className?: string | undefined;
163
- }>;
164
- export declare const dropdownSchema: z.ZodObject<{
165
- options: z.ZodArray<z.ZodObject<{
166
- label: z.ZodString;
167
- value: z.ZodString;
168
- }, "strip", z.ZodTypeAny, {
169
- value: string;
170
- label: string;
171
- }, {
172
- value: string;
173
- label: string;
174
- }>, "many">;
175
- type: z.ZodLiteral<"dropdown">;
176
- className: z.ZodOptional<z.ZodString>;
177
- text: z.ZodString;
178
- }, "strip", z.ZodTypeAny, {
179
- type: "dropdown";
180
- text: string;
181
- options: {
182
- value: string;
183
- label: string;
184
- }[];
185
- className?: string | undefined;
186
- }, {
187
- type: "dropdown";
188
- text: string;
189
- options: {
190
- value: string;
191
- label: string;
192
- }[];
193
- className?: string | undefined;
194
- }>;
195
- export declare const fileSchema: z.ZodObject<{
196
- fileUrl: z.ZodString;
197
- title: z.ZodOptional<z.ZodString>;
198
- type: z.ZodLiteral<"file">;
199
- className: z.ZodOptional<z.ZodString>;
200
- }, "strip", z.ZodTypeAny, {
201
- type: "file";
202
- fileUrl: string;
203
- title?: string | undefined;
204
- className?: string | undefined;
205
- }, {
206
- type: "file";
207
- fileUrl: string;
208
- title?: string | undefined;
209
- className?: string | undefined;
210
- }>;
211
- export declare const imageSchema: z.ZodObject<{
212
- imageUrl: z.ZodString;
213
- type: z.ZodLiteral<"image">;
214
- className: z.ZodOptional<z.ZodString>;
215
- }, "strip", z.ZodTypeAny, {
216
- type: "image";
217
- imageUrl: string;
218
- className?: string | undefined;
219
- }, {
220
- type: "image";
221
- imageUrl: string;
222
- className?: string | undefined;
223
- }>;
224
- export declare const locationSchema: z.ZodObject<{
225
- title: z.ZodOptional<z.ZodString>;
226
- latitude: z.ZodNumber;
227
- longitude: z.ZodNumber;
228
- address: z.ZodOptional<z.ZodString>;
229
- type: z.ZodLiteral<"location">;
230
- className: z.ZodOptional<z.ZodString>;
231
- }, "strip", z.ZodTypeAny, {
232
- type: "location";
233
- latitude: number;
234
- longitude: number;
235
- title?: string | undefined;
236
- address?: string | undefined;
237
- className?: string | undefined;
238
- }, {
239
- type: "location";
240
- latitude: number;
241
- longitude: number;
242
- title?: string | undefined;
243
- address?: string | undefined;
244
- className?: string | undefined;
245
- }>;
246
- export declare const markdownSchema: z.ZodObject<{
247
- markdown: z.ZodString;
248
- type: z.ZodLiteral<"markdown">;
249
- className: z.ZodOptional<z.ZodString>;
250
- }, "strip", z.ZodTypeAny, {
251
- type: "markdown";
252
- markdown: string;
253
- className?: string | undefined;
254
- }, {
255
- type: "markdown";
256
- markdown: string;
257
- className?: string | undefined;
258
- }>;
259
- export declare const textSchema: z.ZodObject<{
260
- text: z.ZodString;
261
- type: z.ZodLiteral<"text">;
262
- className: z.ZodOptional<z.ZodString>;
263
- }, "strip", z.ZodTypeAny, {
264
- type: "text";
265
- text: string;
266
- className?: string | undefined;
267
- }, {
268
- type: "text";
269
- text: string;
270
- className?: string | undefined;
271
- }>;
272
- export declare const videoSchema: z.ZodObject<{
273
- videoUrl: z.ZodString;
274
- type: z.ZodLiteral<"video">;
275
- className: z.ZodOptional<z.ZodString>;
276
- }, "strip", z.ZodTypeAny, {
277
- type: "video";
278
- videoUrl: string;
279
- className?: string | undefined;
280
- }, {
281
- type: "video";
282
- videoUrl: string;
283
- className?: string | undefined;
284
- }>;
285
- export declare const blocSchema: z.ZodObject<{
286
- items: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
287
- type: z.ZodLiteral<"text">;
288
- payload: z.ZodObject<{
289
- text: z.ZodString;
290
- }, "strip", z.ZodTypeAny, {
291
- text: string;
292
- }, {
293
- text: string;
294
- }>;
295
- }, "strip", z.ZodTypeAny, {
296
- type: "text";
297
- payload: {
298
- text: string;
299
- };
300
- }, {
301
- type: "text";
302
- payload: {
303
- text: string;
304
- };
305
- }>, z.ZodObject<{
306
- type: z.ZodLiteral<"markdown">;
307
- payload: z.ZodObject<{
308
- markdown: z.ZodString;
309
- }, "strip", z.ZodTypeAny, {
310
- markdown: string;
311
- }, {
312
- markdown: string;
313
- }>;
314
- }, "strip", z.ZodTypeAny, {
315
- type: "markdown";
316
- payload: {
317
- markdown: string;
318
- };
319
- }, {
320
- type: "markdown";
321
- payload: {
322
- markdown: string;
323
- };
324
- }>, z.ZodObject<{
325
- type: z.ZodLiteral<"image">;
326
- payload: z.ZodObject<{
327
- imageUrl: z.ZodString;
328
- }, "strip", z.ZodTypeAny, {
329
- imageUrl: string;
330
- }, {
331
- imageUrl: string;
332
- }>;
333
- }, "strip", z.ZodTypeAny, {
334
- type: "image";
335
- payload: {
336
- imageUrl: string;
337
- };
338
- }, {
339
- type: "image";
340
- payload: {
341
- imageUrl: string;
342
- };
343
- }>, z.ZodObject<{
344
- type: z.ZodLiteral<"audio">;
345
- payload: z.ZodObject<{
346
- audioUrl: z.ZodString;
347
- }, "strip", z.ZodTypeAny, {
348
- audioUrl: string;
349
- }, {
350
- audioUrl: string;
351
- }>;
352
- }, "strip", z.ZodTypeAny, {
353
- type: "audio";
354
- payload: {
355
- audioUrl: string;
356
- };
357
- }, {
358
- type: "audio";
359
- payload: {
360
- audioUrl: string;
361
- };
362
- }>, z.ZodObject<{
363
- type: z.ZodLiteral<"video">;
364
- payload: z.ZodObject<{
365
- videoUrl: z.ZodString;
366
- }, "strip", z.ZodTypeAny, {
367
- videoUrl: string;
368
- }, {
369
- videoUrl: string;
370
- }>;
371
- }, "strip", z.ZodTypeAny, {
372
- type: "video";
373
- payload: {
374
- videoUrl: string;
375
- };
376
- }, {
377
- type: "video";
378
- payload: {
379
- videoUrl: string;
380
- };
381
- }>, z.ZodObject<{
382
- type: z.ZodLiteral<"file">;
383
- payload: z.ZodObject<{
384
- fileUrl: z.ZodString;
385
- title: z.ZodOptional<z.ZodString>;
386
- }, "strip", z.ZodTypeAny, {
387
- fileUrl: string;
388
- title?: string | undefined;
389
- }, {
390
- fileUrl: string;
391
- title?: string | undefined;
392
- }>;
393
- }, "strip", z.ZodTypeAny, {
394
- type: "file";
395
- payload: {
396
- fileUrl: string;
397
- title?: string | undefined;
398
- };
399
- }, {
400
- type: "file";
401
- payload: {
402
- fileUrl: string;
403
- title?: string | undefined;
404
- };
405
- }>, z.ZodObject<{
406
- type: z.ZodLiteral<"location">;
407
- payload: z.ZodObject<{
408
- latitude: z.ZodNumber;
409
- longitude: z.ZodNumber;
410
- address: z.ZodOptional<z.ZodString>;
411
- title: z.ZodOptional<z.ZodString>;
412
- }, "strip", z.ZodTypeAny, {
413
- latitude: number;
414
- longitude: number;
415
- address?: string | undefined;
416
- title?: string | undefined;
417
- }, {
418
- latitude: number;
419
- longitude: number;
420
- address?: string | undefined;
421
- title?: string | undefined;
422
- }>;
423
- }, "strip", z.ZodTypeAny, {
424
- type: "location";
425
- payload: {
426
- latitude: number;
427
- longitude: number;
428
- address?: string | undefined;
429
- title?: string | undefined;
430
- };
431
- }, {
432
- type: "location";
433
- payload: {
434
- latitude: number;
435
- longitude: number;
436
- address?: string | undefined;
437
- title?: string | undefined;
438
- };
439
- }>]>, "many">;
440
- type: z.ZodLiteral<"bloc">;
441
- className: z.ZodOptional<z.ZodString>;
442
- }, "strip", z.ZodTypeAny, {
443
- type: "bloc";
444
- items: ({
445
- type: "text";
446
- payload: {
447
- text: string;
448
- };
449
- } | {
450
- type: "markdown";
451
- payload: {
452
- markdown: string;
453
- };
454
- } | {
455
- type: "image";
456
- payload: {
457
- imageUrl: string;
458
- };
459
- } | {
460
- type: "audio";
461
- payload: {
462
- audioUrl: string;
463
- };
464
- } | {
465
- type: "video";
466
- payload: {
467
- videoUrl: string;
468
- };
469
- } | {
470
- type: "file";
471
- payload: {
472
- fileUrl: string;
473
- title?: string | undefined;
474
- };
475
- } | {
476
- type: "location";
477
- payload: {
478
- latitude: number;
479
- longitude: number;
480
- address?: string | undefined;
481
- title?: string | undefined;
482
- };
483
- })[];
484
- className?: string | undefined;
485
- }, {
486
- type: "bloc";
487
- items: ({
488
- type: "text";
489
- payload: {
490
- text: string;
491
- };
492
- } | {
493
- type: "markdown";
494
- payload: {
495
- markdown: string;
496
- };
497
- } | {
498
- type: "image";
499
- payload: {
500
- imageUrl: string;
501
- };
502
- } | {
503
- type: "audio";
504
- payload: {
505
- audioUrl: string;
506
- };
507
- } | {
508
- type: "video";
509
- payload: {
510
- videoUrl: string;
511
- };
512
- } | {
513
- type: "file";
514
- payload: {
515
- fileUrl: string;
516
- title?: string | undefined;
517
- };
518
- } | {
519
- type: "location";
520
- payload: {
521
- latitude: number;
522
- longitude: number;
523
- address?: string | undefined;
524
- title?: string | undefined;
525
- };
526
- })[];
527
- className?: string | undefined;
528
- }>;
529
- export declare const messageSchema: z.ZodUnion<[z.ZodObject<{
530
- audioUrl: z.ZodString;
531
- type: z.ZodLiteral<"audio">;
532
- className: z.ZodOptional<z.ZodString>;
533
- }, "strip", z.ZodTypeAny, {
534
- type: "audio";
535
- audioUrl: string;
536
- className?: string | undefined;
537
- }, {
538
- type: "audio";
539
- audioUrl: string;
540
- className?: string | undefined;
541
- }>, z.ZodObject<{
542
- title: z.ZodString;
543
- actions: z.ZodArray<z.ZodObject<{
544
- action: z.ZodEnum<["postback", "url", "say"]>;
545
- label: z.ZodString;
546
- value: z.ZodString;
547
- }, "strip", z.ZodTypeAny, {
548
- value: string;
549
- action: "postback" | "url" | "say";
550
- label: string;
551
- }, {
552
- value: string;
553
- action: "postback" | "url" | "say";
554
- label: string;
555
- }>, "many">;
556
- className: z.ZodOptional<z.ZodString>;
557
- type: z.ZodLiteral<"card">;
558
- subtitle: z.ZodOptional<z.ZodString>;
559
- imageUrl: z.ZodOptional<z.ZodString>;
560
- }, "strip", z.ZodTypeAny, {
561
- type: "card";
562
- title: string;
563
- actions: {
564
- value: string;
565
- action: "postback" | "url" | "say";
566
- label: string;
567
- }[];
568
- className?: string | undefined;
569
- subtitle?: string | undefined;
570
- imageUrl?: string | undefined;
571
- }, {
572
- type: "card";
573
- title: string;
574
- actions: {
575
- value: string;
576
- action: "postback" | "url" | "say";
577
- label: string;
578
- }[];
579
- className?: string | undefined;
580
- subtitle?: string | undefined;
581
- imageUrl?: string | undefined;
582
- }>, z.ZodObject<{
583
- type: z.ZodLiteral<"carousel">;
584
- className: z.ZodOptional<z.ZodString>;
585
- items: z.ZodArray<z.ZodObject<Omit<{
586
- title: z.ZodString;
587
- actions: z.ZodArray<z.ZodObject<{
588
- action: z.ZodEnum<["postback", "url", "say"]>;
589
- label: z.ZodString;
590
- value: z.ZodString;
591
- }, "strip", z.ZodTypeAny, {
592
- value: string;
593
- action: "postback" | "url" | "say";
594
- label: string;
595
- }, {
596
- value: string;
597
- action: "postback" | "url" | "say";
598
- label: string;
599
- }>, "many">;
600
- className: z.ZodOptional<z.ZodString>;
601
- type: z.ZodLiteral<"card">;
602
- subtitle: z.ZodOptional<z.ZodString>;
603
- imageUrl: z.ZodOptional<z.ZodString>;
604
- }, "type">, "strip", z.ZodTypeAny, {
605
- title: string;
606
- actions: {
607
- value: string;
608
- action: "postback" | "url" | "say";
609
- label: string;
610
- }[];
611
- imageUrl?: string | undefined;
612
- subtitle?: string | undefined;
613
- className?: string | undefined;
614
- }, {
615
- title: string;
616
- actions: {
617
- value: string;
618
- action: "postback" | "url" | "say";
619
- label: string;
620
- }[];
621
- imageUrl?: string | undefined;
622
- subtitle?: string | undefined;
623
- className?: string | undefined;
624
- }>, "many">;
625
- }, "strip", z.ZodTypeAny, {
626
- type: "carousel";
627
- items: {
628
- title: string;
629
- actions: {
630
- value: string;
631
- action: "postback" | "url" | "say";
632
- label: string;
633
- }[];
634
- imageUrl?: string | undefined;
635
- subtitle?: string | undefined;
636
- className?: string | undefined;
637
- }[];
638
- className?: string | undefined;
639
- }, {
640
- type: "carousel";
641
- items: {
642
- title: string;
643
- actions: {
644
- value: string;
645
- action: "postback" | "url" | "say";
646
- label: string;
647
- }[];
648
- imageUrl?: string | undefined;
649
- subtitle?: string | undefined;
650
- className?: string | undefined;
651
- }[];
652
- className?: string | undefined;
653
- }>, z.ZodObject<{
654
- options: z.ZodArray<z.ZodObject<{
655
- label: z.ZodString;
656
- value: z.ZodString;
657
- }, "strip", z.ZodTypeAny, {
658
- value: string;
659
- label: string;
660
- }, {
661
- value: string;
662
- label: string;
663
- }>, "many">;
664
- type: z.ZodLiteral<"choice">;
665
- disableFreeText: z.ZodOptional<z.ZodBoolean>;
666
- className: z.ZodOptional<z.ZodString>;
667
- text: z.ZodString;
668
- }, "strip", z.ZodTypeAny, {
669
- type: "choice";
670
- text: string;
671
- options: {
672
- value: string;
673
- label: string;
674
- }[];
675
- disableFreeText?: boolean | undefined;
676
- className?: string | undefined;
677
- }, {
678
- type: "choice";
679
- text: string;
680
- options: {
681
- value: string;
682
- label: string;
683
- }[];
684
- disableFreeText?: boolean | undefined;
685
- className?: string | undefined;
686
- }>, z.ZodObject<{
687
- options: z.ZodArray<z.ZodObject<{
688
- label: z.ZodString;
689
- value: z.ZodString;
690
- }, "strip", z.ZodTypeAny, {
691
- value: string;
692
- label: string;
693
- }, {
694
- value: string;
695
- label: string;
696
- }>, "many">;
697
- type: z.ZodLiteral<"dropdown">;
698
- className: z.ZodOptional<z.ZodString>;
699
- text: z.ZodString;
700
- }, "strip", z.ZodTypeAny, {
701
- type: "dropdown";
702
- text: string;
703
- options: {
704
- value: string;
705
- label: string;
706
- }[];
707
- className?: string | undefined;
708
- }, {
709
- type: "dropdown";
710
- text: string;
711
- options: {
712
- value: string;
713
- label: string;
714
- }[];
715
- className?: string | undefined;
716
- }>, z.ZodObject<{
717
- fileUrl: z.ZodString;
718
- title: z.ZodOptional<z.ZodString>;
719
- type: z.ZodLiteral<"file">;
720
- className: z.ZodOptional<z.ZodString>;
721
- }, "strip", z.ZodTypeAny, {
722
- type: "file";
723
- fileUrl: string;
724
- title?: string | undefined;
725
- className?: string | undefined;
726
- }, {
727
- type: "file";
728
- fileUrl: string;
729
- title?: string | undefined;
730
- className?: string | undefined;
731
- }>, z.ZodObject<{
732
- imageUrl: z.ZodString;
733
- type: z.ZodLiteral<"image">;
734
- className: z.ZodOptional<z.ZodString>;
735
- }, "strip", z.ZodTypeAny, {
736
- type: "image";
737
- imageUrl: string;
738
- className?: string | undefined;
739
- }, {
740
- type: "image";
741
- imageUrl: string;
742
- className?: string | undefined;
743
- }>, z.ZodObject<{
744
- title: z.ZodOptional<z.ZodString>;
745
- latitude: z.ZodNumber;
746
- longitude: z.ZodNumber;
747
- address: z.ZodOptional<z.ZodString>;
748
- type: z.ZodLiteral<"location">;
749
- className: z.ZodOptional<z.ZodString>;
750
- }, "strip", z.ZodTypeAny, {
751
- type: "location";
752
- latitude: number;
753
- longitude: number;
754
- title?: string | undefined;
755
- address?: string | undefined;
756
- className?: string | undefined;
757
- }, {
758
- type: "location";
759
- latitude: number;
760
- longitude: number;
761
- title?: string | undefined;
762
- address?: string | undefined;
763
- className?: string | undefined;
764
- }>, z.ZodObject<{
765
- markdown: z.ZodString;
766
- type: z.ZodLiteral<"markdown">;
767
- className: z.ZodOptional<z.ZodString>;
768
- }, "strip", z.ZodTypeAny, {
769
- type: "markdown";
770
- markdown: string;
771
- className?: string | undefined;
772
- }, {
773
- type: "markdown";
774
- markdown: string;
775
- className?: string | undefined;
776
- }>, z.ZodObject<{
777
- text: z.ZodString;
778
- type: z.ZodLiteral<"text">;
779
- className: z.ZodOptional<z.ZodString>;
780
- }, "strip", z.ZodTypeAny, {
781
- type: "text";
782
- text: string;
783
- className?: string | undefined;
784
- }, {
785
- type: "text";
786
- text: string;
787
- className?: string | undefined;
788
- }>, z.ZodObject<{
789
- videoUrl: z.ZodString;
790
- type: z.ZodLiteral<"video">;
791
- className: z.ZodOptional<z.ZodString>;
792
- }, "strip", z.ZodTypeAny, {
793
- type: "video";
794
- videoUrl: string;
795
- className?: string | undefined;
796
- }, {
797
- type: "video";
798
- videoUrl: string;
799
- className?: string | undefined;
800
- }>, z.ZodObject<{
801
- items: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
802
- type: z.ZodLiteral<"text">;
803
- payload: z.ZodObject<{
804
- text: z.ZodString;
805
- }, "strip", z.ZodTypeAny, {
806
- text: string;
807
- }, {
808
- text: string;
809
- }>;
810
- }, "strip", z.ZodTypeAny, {
811
- type: "text";
812
- payload: {
813
- text: string;
814
- };
815
- }, {
816
- type: "text";
817
- payload: {
818
- text: string;
819
- };
820
- }>, z.ZodObject<{
821
- type: z.ZodLiteral<"markdown">;
822
- payload: z.ZodObject<{
823
- markdown: z.ZodString;
824
- }, "strip", z.ZodTypeAny, {
825
- markdown: string;
826
- }, {
827
- markdown: string;
828
- }>;
829
- }, "strip", z.ZodTypeAny, {
830
- type: "markdown";
831
- payload: {
832
- markdown: string;
833
- };
834
- }, {
835
- type: "markdown";
836
- payload: {
837
- markdown: string;
838
- };
839
- }>, z.ZodObject<{
840
- type: z.ZodLiteral<"image">;
841
- payload: z.ZodObject<{
842
- imageUrl: z.ZodString;
843
- }, "strip", z.ZodTypeAny, {
844
- imageUrl: string;
845
- }, {
846
- imageUrl: string;
847
- }>;
848
- }, "strip", z.ZodTypeAny, {
849
- type: "image";
850
- payload: {
851
- imageUrl: string;
852
- };
853
- }, {
854
- type: "image";
855
- payload: {
856
- imageUrl: string;
857
- };
858
- }>, z.ZodObject<{
859
- type: z.ZodLiteral<"audio">;
860
- payload: z.ZodObject<{
861
- audioUrl: z.ZodString;
862
- }, "strip", z.ZodTypeAny, {
863
- audioUrl: string;
864
- }, {
865
- audioUrl: string;
866
- }>;
867
- }, "strip", z.ZodTypeAny, {
868
- type: "audio";
869
- payload: {
870
- audioUrl: string;
871
- };
872
- }, {
873
- type: "audio";
874
- payload: {
875
- audioUrl: string;
876
- };
877
- }>, z.ZodObject<{
878
- type: z.ZodLiteral<"video">;
879
- payload: z.ZodObject<{
880
- videoUrl: z.ZodString;
881
- }, "strip", z.ZodTypeAny, {
882
- videoUrl: string;
883
- }, {
884
- videoUrl: string;
885
- }>;
886
- }, "strip", z.ZodTypeAny, {
887
- type: "video";
888
- payload: {
889
- videoUrl: string;
890
- };
891
- }, {
892
- type: "video";
893
- payload: {
894
- videoUrl: string;
895
- };
896
- }>, z.ZodObject<{
897
- type: z.ZodLiteral<"file">;
898
- payload: z.ZodObject<{
899
- fileUrl: z.ZodString;
900
- title: z.ZodOptional<z.ZodString>;
901
- }, "strip", z.ZodTypeAny, {
902
- fileUrl: string;
903
- title?: string | undefined;
904
- }, {
905
- fileUrl: string;
906
- title?: string | undefined;
907
- }>;
908
- }, "strip", z.ZodTypeAny, {
909
- type: "file";
910
- payload: {
911
- fileUrl: string;
912
- title?: string | undefined;
913
- };
914
- }, {
915
- type: "file";
916
- payload: {
917
- fileUrl: string;
918
- title?: string | undefined;
919
- };
920
- }>, z.ZodObject<{
921
- type: z.ZodLiteral<"location">;
922
- payload: z.ZodObject<{
923
- latitude: z.ZodNumber;
924
- longitude: z.ZodNumber;
925
- address: z.ZodOptional<z.ZodString>;
926
- title: z.ZodOptional<z.ZodString>;
927
- }, "strip", z.ZodTypeAny, {
928
- latitude: number;
929
- longitude: number;
930
- address?: string | undefined;
931
- title?: string | undefined;
932
- }, {
933
- latitude: number;
934
- longitude: number;
935
- address?: string | undefined;
936
- title?: string | undefined;
937
- }>;
938
- }, "strip", z.ZodTypeAny, {
939
- type: "location";
940
- payload: {
941
- latitude: number;
942
- longitude: number;
943
- address?: string | undefined;
944
- title?: string | undefined;
945
- };
946
- }, {
947
- type: "location";
948
- payload: {
949
- latitude: number;
950
- longitude: number;
951
- address?: string | undefined;
952
- title?: string | undefined;
953
- };
954
- }>]>, "many">;
955
- type: z.ZodLiteral<"bloc">;
956
- className: z.ZodOptional<z.ZodString>;
957
- }, "strip", z.ZodTypeAny, {
958
- type: "bloc";
959
- items: ({
960
- type: "text";
961
- payload: {
962
- text: string;
963
- };
964
- } | {
965
- type: "markdown";
966
- payload: {
967
- markdown: string;
968
- };
969
- } | {
970
- type: "image";
971
- payload: {
972
- imageUrl: string;
973
- };
974
- } | {
975
- type: "audio";
976
- payload: {
977
- audioUrl: string;
978
- };
979
- } | {
980
- type: "video";
981
- payload: {
982
- videoUrl: string;
983
- };
984
- } | {
985
- type: "file";
986
- payload: {
987
- fileUrl: string;
988
- title?: string | undefined;
989
- };
990
- } | {
991
- type: "location";
992
- payload: {
993
- latitude: number;
994
- longitude: number;
995
- address?: string | undefined;
996
- title?: string | undefined;
997
- };
998
- })[];
999
- className?: string | undefined;
1000
- }, {
1001
- type: "bloc";
1002
- items: ({
1003
- type: "text";
1004
- payload: {
1005
- text: string;
1006
- };
1007
- } | {
1008
- type: "markdown";
1009
- payload: {
1010
- markdown: string;
1011
- };
1012
- } | {
1013
- type: "image";
1014
- payload: {
1015
- imageUrl: string;
1016
- };
1017
- } | {
1018
- type: "audio";
1019
- payload: {
1020
- audioUrl: string;
1021
- };
1022
- } | {
1023
- type: "video";
1024
- payload: {
1025
- videoUrl: string;
1026
- };
1027
- } | {
1028
- type: "file";
1029
- payload: {
1030
- fileUrl: string;
1031
- title?: string | undefined;
1032
- };
1033
- } | {
1034
- type: "location";
1035
- payload: {
1036
- latitude: number;
1037
- longitude: number;
1038
- address?: string | undefined;
1039
- title?: string | undefined;
1040
- };
1041
- })[];
1042
- className?: string | undefined;
1043
- }>]>;
1044
- export type Message = z.infer<typeof messageSchema>;
1045
- /**
1046
- * ###############
1047
- * ### Signals ###
1048
- * ###############
1049
- */
1050
- export declare const webchatVisibilitySchema: z.ZodObject<{
1051
- type: z.ZodLiteral<"webchat_visibility">;
1052
- data: z.ZodObject<{
1053
- visibility: z.ZodUnion<[z.ZodLiteral<"show">, z.ZodLiteral<"hide">, z.ZodLiteral<"toggle">]>;
1054
- }, "strip", z.ZodTypeAny, {
1055
- visibility: "show" | "hide" | "toggle";
1056
- }, {
1057
- visibility: "show" | "hide" | "toggle";
1058
- }>;
1059
- }, "strip", z.ZodTypeAny, {
1060
- type: "webchat_visibility";
1061
- data: {
1062
- visibility: "show" | "hide" | "toggle";
1063
- };
1064
- }, {
1065
- type: "webchat_visibility";
1066
- data: {
1067
- visibility: "show" | "hide" | "toggle";
1068
- };
1069
- }>;
1070
- export declare const webchatConfigSchema: z.ZodObject<{
1071
- type: z.ZodLiteral<"webchat_config">;
1072
- data: z.ZodObject<{
1073
- config: z.ZodRecord<z.ZodString, z.ZodAny>;
1074
- }, "strip", z.ZodTypeAny, {
1075
- config: Record<string, any>;
1076
- }, {
1077
- config: Record<string, any>;
1078
- }>;
1079
- }, "strip", z.ZodTypeAny, {
1080
- type: "webchat_config";
1081
- data: {
1082
- config: Record<string, any>;
1083
- };
1084
- }, {
1085
- type: "webchat_config";
1086
- data: {
1087
- config: Record<string, any>;
1088
- };
1089
- }>;
1090
- export declare const customSchema: z.ZodObject<{
1091
- type: z.ZodLiteral<"custom">;
1092
- data: z.ZodObject<{
1093
- event: z.ZodRecord<z.ZodString, z.ZodAny>;
1094
- }, "strip", z.ZodTypeAny, {
1095
- event: Record<string, any>;
1096
- }, {
1097
- event: Record<string, any>;
1098
- }>;
1099
- }, "strip", z.ZodTypeAny, {
1100
- type: "custom";
1101
- data: {
1102
- event: Record<string, any>;
1103
- };
1104
- }, {
1105
- type: "custom";
1106
- data: {
1107
- event: Record<string, any>;
1108
- };
1109
- }>;
1110
- export declare const triggerSchema: z.ZodUnion<[z.ZodObject<{
1111
- type: z.ZodLiteral<"webchat_visibility">;
1112
- data: z.ZodObject<{
1113
- visibility: z.ZodUnion<[z.ZodLiteral<"show">, z.ZodLiteral<"hide">, z.ZodLiteral<"toggle">]>;
1114
- }, "strip", z.ZodTypeAny, {
1115
- visibility: "show" | "hide" | "toggle";
1116
- }, {
1117
- visibility: "show" | "hide" | "toggle";
1118
- }>;
1119
- }, "strip", z.ZodTypeAny, {
1120
- type: "webchat_visibility";
1121
- data: {
1122
- visibility: "show" | "hide" | "toggle";
1123
- };
1124
- }, {
1125
- type: "webchat_visibility";
1126
- data: {
1127
- visibility: "show" | "hide" | "toggle";
1128
- };
1129
- }>, z.ZodObject<{
1130
- type: z.ZodLiteral<"webchat_config">;
1131
- data: z.ZodObject<{
1132
- config: z.ZodRecord<z.ZodString, z.ZodAny>;
1133
- }, "strip", z.ZodTypeAny, {
1134
- config: Record<string, any>;
1135
- }, {
1136
- config: Record<string, any>;
1137
- }>;
1138
- }, "strip", z.ZodTypeAny, {
1139
- type: "webchat_config";
1140
- data: {
1141
- config: Record<string, any>;
1142
- };
1143
- }, {
1144
- type: "webchat_config";
1145
- data: {
1146
- config: Record<string, any>;
1147
- };
1148
- }>, z.ZodObject<{
1149
- type: z.ZodLiteral<"custom">;
1150
- data: z.ZodObject<{
1151
- event: z.ZodRecord<z.ZodString, z.ZodAny>;
1152
- }, "strip", z.ZodTypeAny, {
1153
- event: Record<string, any>;
1154
- }, {
1155
- event: Record<string, any>;
1156
- }>;
1157
- }, "strip", z.ZodTypeAny, {
1158
- type: "custom";
1159
- data: {
1160
- event: Record<string, any>;
1161
- };
1162
- }, {
1163
- type: "custom";
1164
- data: {
1165
- event: Record<string, any>;
1166
- };
1167
- }>]>;
1168
- export type Trigger = z.infer<typeof triggerSchema>;
1169
- export declare const triggerSignalSchema: z.ZodUnion<[z.ZodObject<{
1170
- type: z.ZodLiteral<"webchat_visibility">;
1171
- data: z.ZodObject<{
1172
- visibility: z.ZodUnion<[z.ZodLiteral<"show">, z.ZodLiteral<"hide">, z.ZodLiteral<"toggle">]>;
1173
- }, "strip", z.ZodTypeAny, {
1174
- visibility: "show" | "hide" | "toggle";
1175
- }, {
1176
- visibility: "show" | "hide" | "toggle";
1177
- }>;
1178
- }, "strip", z.ZodTypeAny, {
1179
- type: "webchat_visibility";
1180
- data: {
1181
- visibility: "show" | "hide" | "toggle";
1182
- };
1183
- }, {
1184
- type: "webchat_visibility";
1185
- data: {
1186
- visibility: "show" | "hide" | "toggle";
1187
- };
1188
- }>, z.ZodObject<{
1189
- type: z.ZodLiteral<"webchat_config">;
1190
- data: z.ZodObject<{
1191
- config: z.ZodRecord<z.ZodString, z.ZodAny>;
1192
- }, "strip", z.ZodTypeAny, {
1193
- config: Record<string, any>;
1194
- }, {
1195
- config: Record<string, any>;
1196
- }>;
1197
- }, "strip", z.ZodTypeAny, {
1198
- type: "webchat_config";
1199
- data: {
1200
- config: Record<string, any>;
1201
- };
1202
- }, {
1203
- type: "webchat_config";
1204
- data: {
1205
- config: Record<string, any>;
1206
- };
1207
- }>, z.ZodObject<{
1208
- type: z.ZodLiteral<"custom">;
1209
- data: z.ZodObject<{
1210
- event: z.ZodRecord<z.ZodString, z.ZodAny>;
1211
- }, "strip", z.ZodTypeAny, {
1212
- event: Record<string, any>;
1213
- }, {
1214
- event: Record<string, any>;
1215
- }>;
1216
- }, "strip", z.ZodTypeAny, {
1217
- type: "custom";
1218
- data: {
1219
- event: Record<string, any>;
1220
- };
1221
- }, {
1222
- type: "custom";
1223
- data: {
1224
- event: Record<string, any>;
1225
- };
1226
- }>]>;
1227
- export declare const messageCreatedSchema: z.ZodObject<{
1228
- type: z.ZodLiteral<"message_created">;
1229
- data: z.ZodUnion<[z.ZodObject<{
1230
- audioUrl: z.ZodString;
1231
- type: z.ZodLiteral<"audio">;
1232
- className: z.ZodOptional<z.ZodString>;
1233
- }, "strip", z.ZodTypeAny, {
1234
- type: "audio";
1235
- audioUrl: string;
1236
- className?: string | undefined;
1237
- }, {
1238
- type: "audio";
1239
- audioUrl: string;
1240
- className?: string | undefined;
1241
- }>, z.ZodObject<{
1242
- title: z.ZodString;
1243
- actions: z.ZodArray<z.ZodObject<{
1244
- action: z.ZodEnum<["postback", "url", "say"]>;
1245
- label: z.ZodString;
1246
- value: z.ZodString;
1247
- }, "strip", z.ZodTypeAny, {
1248
- value: string;
1249
- action: "postback" | "url" | "say";
1250
- label: string;
1251
- }, {
1252
- value: string;
1253
- action: "postback" | "url" | "say";
1254
- label: string;
1255
- }>, "many">;
1256
- className: z.ZodOptional<z.ZodString>;
1257
- type: z.ZodLiteral<"card">;
1258
- subtitle: z.ZodOptional<z.ZodString>;
1259
- imageUrl: z.ZodOptional<z.ZodString>;
1260
- }, "strip", z.ZodTypeAny, {
1261
- type: "card";
1262
- title: string;
1263
- actions: {
1264
- value: string;
1265
- action: "postback" | "url" | "say";
1266
- label: string;
1267
- }[];
1268
- className?: string | undefined;
1269
- subtitle?: string | undefined;
1270
- imageUrl?: string | undefined;
1271
- }, {
1272
- type: "card";
1273
- title: string;
1274
- actions: {
1275
- value: string;
1276
- action: "postback" | "url" | "say";
1277
- label: string;
1278
- }[];
1279
- className?: string | undefined;
1280
- subtitle?: string | undefined;
1281
- imageUrl?: string | undefined;
1282
- }>, z.ZodObject<{
1283
- type: z.ZodLiteral<"carousel">;
1284
- className: z.ZodOptional<z.ZodString>;
1285
- items: z.ZodArray<z.ZodObject<Omit<{
1286
- title: z.ZodString;
1287
- actions: z.ZodArray<z.ZodObject<{
1288
- action: z.ZodEnum<["postback", "url", "say"]>;
1289
- label: z.ZodString;
1290
- value: z.ZodString;
1291
- }, "strip", z.ZodTypeAny, {
1292
- value: string;
1293
- action: "postback" | "url" | "say";
1294
- label: string;
1295
- }, {
1296
- value: string;
1297
- action: "postback" | "url" | "say";
1298
- label: string;
1299
- }>, "many">;
1300
- className: z.ZodOptional<z.ZodString>;
1301
- type: z.ZodLiteral<"card">;
1302
- subtitle: z.ZodOptional<z.ZodString>;
1303
- imageUrl: z.ZodOptional<z.ZodString>;
1304
- }, "type">, "strip", z.ZodTypeAny, {
1305
- title: string;
1306
- actions: {
1307
- value: string;
1308
- action: "postback" | "url" | "say";
1309
- label: string;
1310
- }[];
1311
- imageUrl?: string | undefined;
1312
- subtitle?: string | undefined;
1313
- className?: string | undefined;
1314
- }, {
1315
- title: string;
1316
- actions: {
1317
- value: string;
1318
- action: "postback" | "url" | "say";
1319
- label: string;
1320
- }[];
1321
- imageUrl?: string | undefined;
1322
- subtitle?: string | undefined;
1323
- className?: string | undefined;
1324
- }>, "many">;
1325
- }, "strip", z.ZodTypeAny, {
1326
- type: "carousel";
1327
- items: {
1328
- title: string;
1329
- actions: {
1330
- value: string;
1331
- action: "postback" | "url" | "say";
1332
- label: string;
1333
- }[];
1334
- imageUrl?: string | undefined;
1335
- subtitle?: string | undefined;
1336
- className?: string | undefined;
1337
- }[];
1338
- className?: string | undefined;
1339
- }, {
1340
- type: "carousel";
1341
- items: {
1342
- title: string;
1343
- actions: {
1344
- value: string;
1345
- action: "postback" | "url" | "say";
1346
- label: string;
1347
- }[];
1348
- imageUrl?: string | undefined;
1349
- subtitle?: string | undefined;
1350
- className?: string | undefined;
1351
- }[];
1352
- className?: string | undefined;
1353
- }>, z.ZodObject<{
1354
- options: z.ZodArray<z.ZodObject<{
1355
- label: z.ZodString;
1356
- value: z.ZodString;
1357
- }, "strip", z.ZodTypeAny, {
1358
- value: string;
1359
- label: string;
1360
- }, {
1361
- value: string;
1362
- label: string;
1363
- }>, "many">;
1364
- type: z.ZodLiteral<"choice">;
1365
- disableFreeText: z.ZodOptional<z.ZodBoolean>;
1366
- className: z.ZodOptional<z.ZodString>;
1367
- text: z.ZodString;
1368
- }, "strip", z.ZodTypeAny, {
1369
- type: "choice";
1370
- text: string;
1371
- options: {
1372
- value: string;
1373
- label: string;
1374
- }[];
1375
- disableFreeText?: boolean | undefined;
1376
- className?: string | undefined;
1377
- }, {
1378
- type: "choice";
1379
- text: string;
1380
- options: {
1381
- value: string;
1382
- label: string;
1383
- }[];
1384
- disableFreeText?: boolean | undefined;
1385
- className?: string | undefined;
1386
- }>, z.ZodObject<{
1387
- options: z.ZodArray<z.ZodObject<{
1388
- label: z.ZodString;
1389
- value: z.ZodString;
1390
- }, "strip", z.ZodTypeAny, {
1391
- value: string;
1392
- label: string;
1393
- }, {
1394
- value: string;
1395
- label: string;
1396
- }>, "many">;
1397
- type: z.ZodLiteral<"dropdown">;
1398
- className: z.ZodOptional<z.ZodString>;
1399
- text: z.ZodString;
1400
- }, "strip", z.ZodTypeAny, {
1401
- type: "dropdown";
1402
- text: string;
1403
- options: {
1404
- value: string;
1405
- label: string;
1406
- }[];
1407
- className?: string | undefined;
1408
- }, {
1409
- type: "dropdown";
1410
- text: string;
1411
- options: {
1412
- value: string;
1413
- label: string;
1414
- }[];
1415
- className?: string | undefined;
1416
- }>, z.ZodObject<{
1417
- fileUrl: z.ZodString;
1418
- title: z.ZodOptional<z.ZodString>;
1419
- type: z.ZodLiteral<"file">;
1420
- className: z.ZodOptional<z.ZodString>;
1421
- }, "strip", z.ZodTypeAny, {
1422
- type: "file";
1423
- fileUrl: string;
1424
- title?: string | undefined;
1425
- className?: string | undefined;
1426
- }, {
1427
- type: "file";
1428
- fileUrl: string;
1429
- title?: string | undefined;
1430
- className?: string | undefined;
1431
- }>, z.ZodObject<{
1432
- imageUrl: z.ZodString;
1433
- type: z.ZodLiteral<"image">;
1434
- className: z.ZodOptional<z.ZodString>;
1435
- }, "strip", z.ZodTypeAny, {
1436
- type: "image";
1437
- imageUrl: string;
1438
- className?: string | undefined;
1439
- }, {
1440
- type: "image";
1441
- imageUrl: string;
1442
- className?: string | undefined;
1443
- }>, z.ZodObject<{
1444
- title: z.ZodOptional<z.ZodString>;
1445
- latitude: z.ZodNumber;
1446
- longitude: z.ZodNumber;
1447
- address: z.ZodOptional<z.ZodString>;
1448
- type: z.ZodLiteral<"location">;
1449
- className: z.ZodOptional<z.ZodString>;
1450
- }, "strip", z.ZodTypeAny, {
1451
- type: "location";
1452
- latitude: number;
1453
- longitude: number;
1454
- title?: string | undefined;
1455
- address?: string | undefined;
1456
- className?: string | undefined;
1457
- }, {
1458
- type: "location";
1459
- latitude: number;
1460
- longitude: number;
1461
- title?: string | undefined;
1462
- address?: string | undefined;
1463
- className?: string | undefined;
1464
- }>, z.ZodObject<{
1465
- markdown: z.ZodString;
1466
- type: z.ZodLiteral<"markdown">;
1467
- className: z.ZodOptional<z.ZodString>;
1468
- }, "strip", z.ZodTypeAny, {
1469
- type: "markdown";
1470
- markdown: string;
1471
- className?: string | undefined;
1472
- }, {
1473
- type: "markdown";
1474
- markdown: string;
1475
- className?: string | undefined;
1476
- }>, z.ZodObject<{
1477
- text: z.ZodString;
1478
- type: z.ZodLiteral<"text">;
1479
- className: z.ZodOptional<z.ZodString>;
1480
- }, "strip", z.ZodTypeAny, {
1481
- type: "text";
1482
- text: string;
1483
- className?: string | undefined;
1484
- }, {
1485
- type: "text";
1486
- text: string;
1487
- className?: string | undefined;
1488
- }>, z.ZodObject<{
1489
- videoUrl: z.ZodString;
1490
- type: z.ZodLiteral<"video">;
1491
- className: z.ZodOptional<z.ZodString>;
1492
- }, "strip", z.ZodTypeAny, {
1493
- type: "video";
1494
- videoUrl: string;
1495
- className?: string | undefined;
1496
- }, {
1497
- type: "video";
1498
- videoUrl: string;
1499
- className?: string | undefined;
1500
- }>, z.ZodObject<{
1501
- items: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1502
- type: z.ZodLiteral<"text">;
1503
- payload: z.ZodObject<{
1504
- text: z.ZodString;
1505
- }, "strip", z.ZodTypeAny, {
1506
- text: string;
1507
- }, {
1508
- text: string;
1509
- }>;
1510
- }, "strip", z.ZodTypeAny, {
1511
- type: "text";
1512
- payload: {
1513
- text: string;
1514
- };
1515
- }, {
1516
- type: "text";
1517
- payload: {
1518
- text: string;
1519
- };
1520
- }>, z.ZodObject<{
1521
- type: z.ZodLiteral<"markdown">;
1522
- payload: z.ZodObject<{
1523
- markdown: z.ZodString;
1524
- }, "strip", z.ZodTypeAny, {
1525
- markdown: string;
1526
- }, {
1527
- markdown: string;
1528
- }>;
1529
- }, "strip", z.ZodTypeAny, {
1530
- type: "markdown";
1531
- payload: {
1532
- markdown: string;
1533
- };
1534
- }, {
1535
- type: "markdown";
1536
- payload: {
1537
- markdown: string;
1538
- };
1539
- }>, z.ZodObject<{
1540
- type: z.ZodLiteral<"image">;
1541
- payload: z.ZodObject<{
1542
- imageUrl: z.ZodString;
1543
- }, "strip", z.ZodTypeAny, {
1544
- imageUrl: string;
1545
- }, {
1546
- imageUrl: string;
1547
- }>;
1548
- }, "strip", z.ZodTypeAny, {
1549
- type: "image";
1550
- payload: {
1551
- imageUrl: string;
1552
- };
1553
- }, {
1554
- type: "image";
1555
- payload: {
1556
- imageUrl: string;
1557
- };
1558
- }>, z.ZodObject<{
1559
- type: z.ZodLiteral<"audio">;
1560
- payload: z.ZodObject<{
1561
- audioUrl: z.ZodString;
1562
- }, "strip", z.ZodTypeAny, {
1563
- audioUrl: string;
1564
- }, {
1565
- audioUrl: string;
1566
- }>;
1567
- }, "strip", z.ZodTypeAny, {
1568
- type: "audio";
1569
- payload: {
1570
- audioUrl: string;
1571
- };
1572
- }, {
1573
- type: "audio";
1574
- payload: {
1575
- audioUrl: string;
1576
- };
1577
- }>, z.ZodObject<{
1578
- type: z.ZodLiteral<"video">;
1579
- payload: z.ZodObject<{
1580
- videoUrl: z.ZodString;
1581
- }, "strip", z.ZodTypeAny, {
1582
- videoUrl: string;
1583
- }, {
1584
- videoUrl: string;
1585
- }>;
1586
- }, "strip", z.ZodTypeAny, {
1587
- type: "video";
1588
- payload: {
1589
- videoUrl: string;
1590
- };
1591
- }, {
1592
- type: "video";
1593
- payload: {
1594
- videoUrl: string;
1595
- };
1596
- }>, z.ZodObject<{
1597
- type: z.ZodLiteral<"file">;
1598
- payload: z.ZodObject<{
1599
- fileUrl: z.ZodString;
1600
- title: z.ZodOptional<z.ZodString>;
1601
- }, "strip", z.ZodTypeAny, {
1602
- fileUrl: string;
1603
- title?: string | undefined;
1604
- }, {
1605
- fileUrl: string;
1606
- title?: string | undefined;
1607
- }>;
1608
- }, "strip", z.ZodTypeAny, {
1609
- type: "file";
1610
- payload: {
1611
- fileUrl: string;
1612
- title?: string | undefined;
1613
- };
1614
- }, {
1615
- type: "file";
1616
- payload: {
1617
- fileUrl: string;
1618
- title?: string | undefined;
1619
- };
1620
- }>, z.ZodObject<{
1621
- type: z.ZodLiteral<"location">;
1622
- payload: z.ZodObject<{
1623
- latitude: z.ZodNumber;
1624
- longitude: z.ZodNumber;
1625
- address: z.ZodOptional<z.ZodString>;
1626
- title: z.ZodOptional<z.ZodString>;
1627
- }, "strip", z.ZodTypeAny, {
1628
- latitude: number;
1629
- longitude: number;
1630
- address?: string | undefined;
1631
- title?: string | undefined;
1632
- }, {
1633
- latitude: number;
1634
- longitude: number;
1635
- address?: string | undefined;
1636
- title?: string | undefined;
1637
- }>;
1638
- }, "strip", z.ZodTypeAny, {
1639
- type: "location";
1640
- payload: {
1641
- latitude: number;
1642
- longitude: number;
1643
- address?: string | undefined;
1644
- title?: string | undefined;
1645
- };
1646
- }, {
1647
- type: "location";
1648
- payload: {
1649
- latitude: number;
1650
- longitude: number;
1651
- address?: string | undefined;
1652
- title?: string | undefined;
1653
- };
1654
- }>]>, "many">;
1655
- type: z.ZodLiteral<"bloc">;
1656
- className: z.ZodOptional<z.ZodString>;
1657
- }, "strip", z.ZodTypeAny, {
1658
- type: "bloc";
1659
- items: ({
1660
- type: "text";
1661
- payload: {
1662
- text: string;
1663
- };
1664
- } | {
1665
- type: "markdown";
1666
- payload: {
1667
- markdown: string;
1668
- };
1669
- } | {
1670
- type: "image";
1671
- payload: {
1672
- imageUrl: string;
1673
- };
1674
- } | {
1675
- type: "audio";
1676
- payload: {
1677
- audioUrl: string;
1678
- };
1679
- } | {
1680
- type: "video";
1681
- payload: {
1682
- videoUrl: string;
1683
- };
1684
- } | {
1685
- type: "file";
1686
- payload: {
1687
- fileUrl: string;
1688
- title?: string | undefined;
1689
- };
1690
- } | {
1691
- type: "location";
1692
- payload: {
1693
- latitude: number;
1694
- longitude: number;
1695
- address?: string | undefined;
1696
- title?: string | undefined;
1697
- };
1698
- })[];
1699
- className?: string | undefined;
1700
- }, {
1701
- type: "bloc";
1702
- items: ({
1703
- type: "text";
1704
- payload: {
1705
- text: string;
1706
- };
1707
- } | {
1708
- type: "markdown";
1709
- payload: {
1710
- markdown: string;
1711
- };
1712
- } | {
1713
- type: "image";
1714
- payload: {
1715
- imageUrl: string;
1716
- };
1717
- } | {
1718
- type: "audio";
1719
- payload: {
1720
- audioUrl: string;
1721
- };
1722
- } | {
1723
- type: "video";
1724
- payload: {
1725
- videoUrl: string;
1726
- };
1727
- } | {
1728
- type: "file";
1729
- payload: {
1730
- fileUrl: string;
1731
- title?: string | undefined;
1732
- };
1733
- } | {
1734
- type: "location";
1735
- payload: {
1736
- latitude: number;
1737
- longitude: number;
1738
- address?: string | undefined;
1739
- title?: string | undefined;
1740
- };
1741
- })[];
1742
- className?: string | undefined;
1743
- }>]>;
1744
- }, "strip", z.ZodTypeAny, {
1745
- type: "message_created";
1746
- data: {
1747
- type: "audio";
1748
- audioUrl: string;
1749
- className?: string | undefined;
1750
- } | {
1751
- type: "card";
1752
- title: string;
1753
- actions: {
1754
- value: string;
1755
- action: "postback" | "url" | "say";
1756
- label: string;
1757
- }[];
1758
- className?: string | undefined;
1759
- subtitle?: string | undefined;
1760
- imageUrl?: string | undefined;
1761
- } | {
1762
- type: "carousel";
1763
- items: {
1764
- title: string;
1765
- actions: {
1766
- value: string;
1767
- action: "postback" | "url" | "say";
1768
- label: string;
1769
- }[];
1770
- imageUrl?: string | undefined;
1771
- subtitle?: string | undefined;
1772
- className?: string | undefined;
1773
- }[];
1774
- className?: string | undefined;
1775
- } | {
1776
- type: "choice";
1777
- text: string;
1778
- options: {
1779
- value: string;
1780
- label: string;
1781
- }[];
1782
- disableFreeText?: boolean | undefined;
1783
- className?: string | undefined;
1784
- } | {
1785
- type: "dropdown";
1786
- text: string;
1787
- options: {
1788
- value: string;
1789
- label: string;
1790
- }[];
1791
- className?: string | undefined;
1792
- } | {
1793
- type: "file";
1794
- fileUrl: string;
1795
- title?: string | undefined;
1796
- className?: string | undefined;
1797
- } | {
1798
- type: "image";
1799
- imageUrl: string;
1800
- className?: string | undefined;
1801
- } | {
1802
- type: "location";
1803
- latitude: number;
1804
- longitude: number;
1805
- title?: string | undefined;
1806
- address?: string | undefined;
1807
- className?: string | undefined;
1808
- } | {
1809
- type: "markdown";
1810
- markdown: string;
1811
- className?: string | undefined;
1812
- } | {
1813
- type: "text";
1814
- text: string;
1815
- className?: string | undefined;
1816
- } | {
1817
- type: "video";
1818
- videoUrl: string;
1819
- className?: string | undefined;
1820
- } | {
1821
- type: "bloc";
1822
- items: ({
1823
- type: "text";
1824
- payload: {
1825
- text: string;
1826
- };
1827
- } | {
1828
- type: "markdown";
1829
- payload: {
1830
- markdown: string;
1831
- };
1832
- } | {
1833
- type: "image";
1834
- payload: {
1835
- imageUrl: string;
1836
- };
1837
- } | {
1838
- type: "audio";
1839
- payload: {
1840
- audioUrl: string;
1841
- };
1842
- } | {
1843
- type: "video";
1844
- payload: {
1845
- videoUrl: string;
1846
- };
1847
- } | {
1848
- type: "file";
1849
- payload: {
1850
- fileUrl: string;
1851
- title?: string | undefined;
1852
- };
1853
- } | {
1854
- type: "location";
1855
- payload: {
1856
- latitude: number;
1857
- longitude: number;
1858
- address?: string | undefined;
1859
- title?: string | undefined;
1860
- };
1861
- })[];
1862
- className?: string | undefined;
1863
- };
1864
- }, {
1865
- type: "message_created";
1866
- data: {
1867
- type: "audio";
1868
- audioUrl: string;
1869
- className?: string | undefined;
1870
- } | {
1871
- type: "card";
1872
- title: string;
1873
- actions: {
1874
- value: string;
1875
- action: "postback" | "url" | "say";
1876
- label: string;
1877
- }[];
1878
- className?: string | undefined;
1879
- subtitle?: string | undefined;
1880
- imageUrl?: string | undefined;
1881
- } | {
1882
- type: "carousel";
1883
- items: {
1884
- title: string;
1885
- actions: {
1886
- value: string;
1887
- action: "postback" | "url" | "say";
1888
- label: string;
1889
- }[];
1890
- imageUrl?: string | undefined;
1891
- subtitle?: string | undefined;
1892
- className?: string | undefined;
1893
- }[];
1894
- className?: string | undefined;
1895
- } | {
1896
- type: "choice";
1897
- text: string;
1898
- options: {
1899
- value: string;
1900
- label: string;
1901
- }[];
1902
- disableFreeText?: boolean | undefined;
1903
- className?: string | undefined;
1904
- } | {
1905
- type: "dropdown";
1906
- text: string;
1907
- options: {
1908
- value: string;
1909
- label: string;
1910
- }[];
1911
- className?: string | undefined;
1912
- } | {
1913
- type: "file";
1914
- fileUrl: string;
1915
- title?: string | undefined;
1916
- className?: string | undefined;
1917
- } | {
1918
- type: "image";
1919
- imageUrl: string;
1920
- className?: string | undefined;
1921
- } | {
1922
- type: "location";
1923
- latitude: number;
1924
- longitude: number;
1925
- title?: string | undefined;
1926
- address?: string | undefined;
1927
- className?: string | undefined;
1928
- } | {
1929
- type: "markdown";
1930
- markdown: string;
1931
- className?: string | undefined;
1932
- } | {
1933
- type: "text";
1934
- text: string;
1935
- className?: string | undefined;
1936
- } | {
1937
- type: "video";
1938
- videoUrl: string;
1939
- className?: string | undefined;
1940
- } | {
1941
- type: "bloc";
1942
- items: ({
1943
- type: "text";
1944
- payload: {
1945
- text: string;
1946
- };
1947
- } | {
1948
- type: "markdown";
1949
- payload: {
1950
- markdown: string;
1951
- };
1952
- } | {
1953
- type: "image";
1954
- payload: {
1955
- imageUrl: string;
1956
- };
1957
- } | {
1958
- type: "audio";
1959
- payload: {
1960
- audioUrl: string;
1961
- };
1962
- } | {
1963
- type: "video";
1964
- payload: {
1965
- videoUrl: string;
1966
- };
1967
- } | {
1968
- type: "file";
1969
- payload: {
1970
- fileUrl: string;
1971
- title?: string | undefined;
1972
- };
1973
- } | {
1974
- type: "location";
1975
- payload: {
1976
- latitude: number;
1977
- longitude: number;
1978
- address?: string | undefined;
1979
- title?: string | undefined;
1980
- };
1981
- })[];
1982
- className?: string | undefined;
1983
- };
1984
- }>;
1985
- export type Signal = z.infer<typeof triggerSignalSchema> | z.infer<typeof messageCreatedSchema>;
1986
- export type Messages = types.MessagesOf<Message>;
1987
- export type Triggers = types.MessagesOf<Trigger>;
2
+ import * as models from '../gen/client/models';
3
+ export type Message = models.Message['payload'];
4
+ export type Messages = types.ByType<Message>;