@adatechnology/meta-whatsapp-contracts 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2177 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const whatsAppMediaSchema: z.ZodObject<{
4
+ id: z.ZodString;
5
+ mime_type: z.ZodString;
6
+ sha256: z.ZodOptional<z.ZodString>;
7
+ caption: z.ZodOptional<z.ZodString>;
8
+ filename: z.ZodOptional<z.ZodString>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ id?: string;
11
+ mime_type?: string;
12
+ sha256?: string;
13
+ caption?: string;
14
+ filename?: string;
15
+ }, {
16
+ id?: string;
17
+ mime_type?: string;
18
+ sha256?: string;
19
+ caption?: string;
20
+ filename?: string;
21
+ }>;
22
+ type WhatsAppMedia = z.infer<typeof whatsAppMediaSchema>;
23
+ declare const whatsAppInteractiveSchema: z.ZodObject<{
24
+ type: z.ZodString;
25
+ button_reply: z.ZodOptional<z.ZodObject<{
26
+ id: z.ZodString;
27
+ title: z.ZodString;
28
+ }, "strip", z.ZodTypeAny, {
29
+ id?: string;
30
+ title?: string;
31
+ }, {
32
+ id?: string;
33
+ title?: string;
34
+ }>>;
35
+ list_reply: z.ZodOptional<z.ZodObject<{
36
+ id: z.ZodString;
37
+ title: z.ZodString;
38
+ }, "strip", z.ZodTypeAny, {
39
+ id?: string;
40
+ title?: string;
41
+ }, {
42
+ id?: string;
43
+ title?: string;
44
+ }>>;
45
+ }, "strip", z.ZodTypeAny, {
46
+ type?: string;
47
+ button_reply?: {
48
+ id?: string;
49
+ title?: string;
50
+ };
51
+ list_reply?: {
52
+ id?: string;
53
+ title?: string;
54
+ };
55
+ }, {
56
+ type?: string;
57
+ button_reply?: {
58
+ id?: string;
59
+ title?: string;
60
+ };
61
+ list_reply?: {
62
+ id?: string;
63
+ title?: string;
64
+ };
65
+ }>;
66
+ type WhatsAppInteractive = z.infer<typeof whatsAppInteractiveSchema>;
67
+ declare const whatsAppOrderSchema: z.ZodObject<{
68
+ catalog_id: z.ZodString;
69
+ text: z.ZodOptional<z.ZodString>;
70
+ product_items: z.ZodArray<z.ZodObject<{
71
+ product_retailer_id: z.ZodString;
72
+ quantity: z.ZodNumber;
73
+ item_price: z.ZodNumber;
74
+ currency: z.ZodString;
75
+ }, "strip", z.ZodTypeAny, {
76
+ product_retailer_id?: string;
77
+ quantity?: number;
78
+ item_price?: number;
79
+ currency?: string;
80
+ }, {
81
+ product_retailer_id?: string;
82
+ quantity?: number;
83
+ item_price?: number;
84
+ currency?: string;
85
+ }>, "many">;
86
+ }, "strip", z.ZodTypeAny, {
87
+ catalog_id?: string;
88
+ text?: string;
89
+ product_items?: {
90
+ product_retailer_id?: string;
91
+ quantity?: number;
92
+ item_price?: number;
93
+ currency?: string;
94
+ }[];
95
+ }, {
96
+ catalog_id?: string;
97
+ text?: string;
98
+ product_items?: {
99
+ product_retailer_id?: string;
100
+ quantity?: number;
101
+ item_price?: number;
102
+ currency?: string;
103
+ }[];
104
+ }>;
105
+ type WhatsAppOrder = z.infer<typeof whatsAppOrderSchema>;
106
+ declare const whatsAppMessageSchema: z.ZodObject<{
107
+ id: z.ZodString;
108
+ from: z.ZodString;
109
+ type: z.ZodString;
110
+ text: z.ZodOptional<z.ZodObject<{
111
+ body: z.ZodString;
112
+ }, "strip", z.ZodTypeAny, {
113
+ body?: string;
114
+ }, {
115
+ body?: string;
116
+ }>>;
117
+ image: z.ZodOptional<z.ZodObject<{
118
+ id: z.ZodString;
119
+ mime_type: z.ZodString;
120
+ sha256: z.ZodOptional<z.ZodString>;
121
+ caption: z.ZodOptional<z.ZodString>;
122
+ filename: z.ZodOptional<z.ZodString>;
123
+ }, "strip", z.ZodTypeAny, {
124
+ id?: string;
125
+ mime_type?: string;
126
+ sha256?: string;
127
+ caption?: string;
128
+ filename?: string;
129
+ }, {
130
+ id?: string;
131
+ mime_type?: string;
132
+ sha256?: string;
133
+ caption?: string;
134
+ filename?: string;
135
+ }>>;
136
+ audio: z.ZodOptional<z.ZodObject<{
137
+ id: z.ZodString;
138
+ mime_type: z.ZodString;
139
+ sha256: z.ZodOptional<z.ZodString>;
140
+ caption: z.ZodOptional<z.ZodString>;
141
+ filename: z.ZodOptional<z.ZodString>;
142
+ }, "strip", z.ZodTypeAny, {
143
+ id?: string;
144
+ mime_type?: string;
145
+ sha256?: string;
146
+ caption?: string;
147
+ filename?: string;
148
+ }, {
149
+ id?: string;
150
+ mime_type?: string;
151
+ sha256?: string;
152
+ caption?: string;
153
+ filename?: string;
154
+ }>>;
155
+ video: z.ZodOptional<z.ZodObject<{
156
+ id: z.ZodString;
157
+ mime_type: z.ZodString;
158
+ sha256: z.ZodOptional<z.ZodString>;
159
+ caption: z.ZodOptional<z.ZodString>;
160
+ filename: z.ZodOptional<z.ZodString>;
161
+ }, "strip", z.ZodTypeAny, {
162
+ id?: string;
163
+ mime_type?: string;
164
+ sha256?: string;
165
+ caption?: string;
166
+ filename?: string;
167
+ }, {
168
+ id?: string;
169
+ mime_type?: string;
170
+ sha256?: string;
171
+ caption?: string;
172
+ filename?: string;
173
+ }>>;
174
+ document: z.ZodOptional<z.ZodObject<{
175
+ id: z.ZodString;
176
+ mime_type: z.ZodString;
177
+ sha256: z.ZodOptional<z.ZodString>;
178
+ caption: z.ZodOptional<z.ZodString>;
179
+ filename: z.ZodOptional<z.ZodString>;
180
+ }, "strip", z.ZodTypeAny, {
181
+ id?: string;
182
+ mime_type?: string;
183
+ sha256?: string;
184
+ caption?: string;
185
+ filename?: string;
186
+ }, {
187
+ id?: string;
188
+ mime_type?: string;
189
+ sha256?: string;
190
+ caption?: string;
191
+ filename?: string;
192
+ }>>;
193
+ sticker: z.ZodOptional<z.ZodObject<{
194
+ id: z.ZodString;
195
+ mime_type: z.ZodString;
196
+ sha256: z.ZodOptional<z.ZodString>;
197
+ caption: z.ZodOptional<z.ZodString>;
198
+ filename: z.ZodOptional<z.ZodString>;
199
+ }, "strip", z.ZodTypeAny, {
200
+ id?: string;
201
+ mime_type?: string;
202
+ sha256?: string;
203
+ caption?: string;
204
+ filename?: string;
205
+ }, {
206
+ id?: string;
207
+ mime_type?: string;
208
+ sha256?: string;
209
+ caption?: string;
210
+ filename?: string;
211
+ }>>;
212
+ interactive: z.ZodOptional<z.ZodObject<{
213
+ type: z.ZodString;
214
+ button_reply: z.ZodOptional<z.ZodObject<{
215
+ id: z.ZodString;
216
+ title: z.ZodString;
217
+ }, "strip", z.ZodTypeAny, {
218
+ id?: string;
219
+ title?: string;
220
+ }, {
221
+ id?: string;
222
+ title?: string;
223
+ }>>;
224
+ list_reply: z.ZodOptional<z.ZodObject<{
225
+ id: z.ZodString;
226
+ title: z.ZodString;
227
+ }, "strip", z.ZodTypeAny, {
228
+ id?: string;
229
+ title?: string;
230
+ }, {
231
+ id?: string;
232
+ title?: string;
233
+ }>>;
234
+ }, "strip", z.ZodTypeAny, {
235
+ type?: string;
236
+ button_reply?: {
237
+ id?: string;
238
+ title?: string;
239
+ };
240
+ list_reply?: {
241
+ id?: string;
242
+ title?: string;
243
+ };
244
+ }, {
245
+ type?: string;
246
+ button_reply?: {
247
+ id?: string;
248
+ title?: string;
249
+ };
250
+ list_reply?: {
251
+ id?: string;
252
+ title?: string;
253
+ };
254
+ }>>;
255
+ order: z.ZodOptional<z.ZodObject<{
256
+ catalog_id: z.ZodString;
257
+ text: z.ZodOptional<z.ZodString>;
258
+ product_items: z.ZodArray<z.ZodObject<{
259
+ product_retailer_id: z.ZodString;
260
+ quantity: z.ZodNumber;
261
+ item_price: z.ZodNumber;
262
+ currency: z.ZodString;
263
+ }, "strip", z.ZodTypeAny, {
264
+ product_retailer_id?: string;
265
+ quantity?: number;
266
+ item_price?: number;
267
+ currency?: string;
268
+ }, {
269
+ product_retailer_id?: string;
270
+ quantity?: number;
271
+ item_price?: number;
272
+ currency?: string;
273
+ }>, "many">;
274
+ }, "strip", z.ZodTypeAny, {
275
+ catalog_id?: string;
276
+ text?: string;
277
+ product_items?: {
278
+ product_retailer_id?: string;
279
+ quantity?: number;
280
+ item_price?: number;
281
+ currency?: string;
282
+ }[];
283
+ }, {
284
+ catalog_id?: string;
285
+ text?: string;
286
+ product_items?: {
287
+ product_retailer_id?: string;
288
+ quantity?: number;
289
+ item_price?: number;
290
+ currency?: string;
291
+ }[];
292
+ }>>;
293
+ context: z.ZodOptional<z.ZodObject<{
294
+ from: z.ZodOptional<z.ZodString>;
295
+ id: z.ZodOptional<z.ZodString>;
296
+ referred_product: z.ZodOptional<z.ZodObject<{
297
+ catalog_id: z.ZodString;
298
+ product_retailer_id: z.ZodString;
299
+ }, "strip", z.ZodTypeAny, {
300
+ catalog_id?: string;
301
+ product_retailer_id?: string;
302
+ }, {
303
+ catalog_id?: string;
304
+ product_retailer_id?: string;
305
+ }>>;
306
+ }, "strip", z.ZodTypeAny, {
307
+ id?: string;
308
+ from?: string;
309
+ referred_product?: {
310
+ catalog_id?: string;
311
+ product_retailer_id?: string;
312
+ };
313
+ }, {
314
+ id?: string;
315
+ from?: string;
316
+ referred_product?: {
317
+ catalog_id?: string;
318
+ product_retailer_id?: string;
319
+ };
320
+ }>>;
321
+ timestamp: z.ZodString;
322
+ }, "strip", z.ZodTypeAny, {
323
+ id?: string;
324
+ type?: string;
325
+ text?: {
326
+ body?: string;
327
+ };
328
+ from?: string;
329
+ image?: {
330
+ id?: string;
331
+ mime_type?: string;
332
+ sha256?: string;
333
+ caption?: string;
334
+ filename?: string;
335
+ };
336
+ audio?: {
337
+ id?: string;
338
+ mime_type?: string;
339
+ sha256?: string;
340
+ caption?: string;
341
+ filename?: string;
342
+ };
343
+ video?: {
344
+ id?: string;
345
+ mime_type?: string;
346
+ sha256?: string;
347
+ caption?: string;
348
+ filename?: string;
349
+ };
350
+ document?: {
351
+ id?: string;
352
+ mime_type?: string;
353
+ sha256?: string;
354
+ caption?: string;
355
+ filename?: string;
356
+ };
357
+ sticker?: {
358
+ id?: string;
359
+ mime_type?: string;
360
+ sha256?: string;
361
+ caption?: string;
362
+ filename?: string;
363
+ };
364
+ interactive?: {
365
+ type?: string;
366
+ button_reply?: {
367
+ id?: string;
368
+ title?: string;
369
+ };
370
+ list_reply?: {
371
+ id?: string;
372
+ title?: string;
373
+ };
374
+ };
375
+ order?: {
376
+ catalog_id?: string;
377
+ text?: string;
378
+ product_items?: {
379
+ product_retailer_id?: string;
380
+ quantity?: number;
381
+ item_price?: number;
382
+ currency?: string;
383
+ }[];
384
+ };
385
+ context?: {
386
+ id?: string;
387
+ from?: string;
388
+ referred_product?: {
389
+ catalog_id?: string;
390
+ product_retailer_id?: string;
391
+ };
392
+ };
393
+ timestamp?: string;
394
+ }, {
395
+ id?: string;
396
+ type?: string;
397
+ text?: {
398
+ body?: string;
399
+ };
400
+ from?: string;
401
+ image?: {
402
+ id?: string;
403
+ mime_type?: string;
404
+ sha256?: string;
405
+ caption?: string;
406
+ filename?: string;
407
+ };
408
+ audio?: {
409
+ id?: string;
410
+ mime_type?: string;
411
+ sha256?: string;
412
+ caption?: string;
413
+ filename?: string;
414
+ };
415
+ video?: {
416
+ id?: string;
417
+ mime_type?: string;
418
+ sha256?: string;
419
+ caption?: string;
420
+ filename?: string;
421
+ };
422
+ document?: {
423
+ id?: string;
424
+ mime_type?: string;
425
+ sha256?: string;
426
+ caption?: string;
427
+ filename?: string;
428
+ };
429
+ sticker?: {
430
+ id?: string;
431
+ mime_type?: string;
432
+ sha256?: string;
433
+ caption?: string;
434
+ filename?: string;
435
+ };
436
+ interactive?: {
437
+ type?: string;
438
+ button_reply?: {
439
+ id?: string;
440
+ title?: string;
441
+ };
442
+ list_reply?: {
443
+ id?: string;
444
+ title?: string;
445
+ };
446
+ };
447
+ order?: {
448
+ catalog_id?: string;
449
+ text?: string;
450
+ product_items?: {
451
+ product_retailer_id?: string;
452
+ quantity?: number;
453
+ item_price?: number;
454
+ currency?: string;
455
+ }[];
456
+ };
457
+ context?: {
458
+ id?: string;
459
+ from?: string;
460
+ referred_product?: {
461
+ catalog_id?: string;
462
+ product_retailer_id?: string;
463
+ };
464
+ };
465
+ timestamp?: string;
466
+ }>;
467
+ type WhatsAppMessage = z.infer<typeof whatsAppMessageSchema>;
468
+ declare const whatsAppMessageEchoSchema: z.ZodObject<{
469
+ id: z.ZodString;
470
+ from: z.ZodString;
471
+ timestamp: z.ZodString;
472
+ type: z.ZodString;
473
+ }, "strip", z.ZodTypeAny, {
474
+ id?: string;
475
+ type?: string;
476
+ from?: string;
477
+ timestamp?: string;
478
+ }, {
479
+ id?: string;
480
+ type?: string;
481
+ from?: string;
482
+ timestamp?: string;
483
+ }>;
484
+ type WhatsAppMessageEcho = z.infer<typeof whatsAppMessageEchoSchema>;
485
+ declare const whatsAppMessageStatusSchema: z.ZodEnum<["sent", "delivered", "read", "failed"]>;
486
+ type WhatsAppMessageStatusValue = z.infer<typeof whatsAppMessageStatusSchema>;
487
+ declare const whatsAppStatusSchema: z.ZodObject<{
488
+ id: z.ZodString;
489
+ status: z.ZodEnum<["sent", "delivered", "read", "failed"]>;
490
+ timestamp: z.ZodString;
491
+ recipient_id: z.ZodOptional<z.ZodString>;
492
+ }, "strip", z.ZodTypeAny, {
493
+ id?: string;
494
+ status?: "sent" | "delivered" | "read" | "failed";
495
+ timestamp?: string;
496
+ recipient_id?: string;
497
+ }, {
498
+ id?: string;
499
+ status?: "sent" | "delivered" | "read" | "failed";
500
+ timestamp?: string;
501
+ recipient_id?: string;
502
+ }>;
503
+ type WhatsAppStatus = z.infer<typeof whatsAppStatusSchema>;
504
+ declare const whatsAppWebhookPayloadSchema: z.ZodObject<{
505
+ object: z.ZodString;
506
+ entry: z.ZodArray<z.ZodObject<{
507
+ id: z.ZodString;
508
+ changes: z.ZodArray<z.ZodObject<{
509
+ value: z.ZodObject<{
510
+ messaging_product: z.ZodString;
511
+ messages: z.ZodOptional<z.ZodArray<z.ZodObject<{
512
+ id: z.ZodString;
513
+ from: z.ZodString;
514
+ type: z.ZodString;
515
+ text: z.ZodOptional<z.ZodObject<{
516
+ body: z.ZodString;
517
+ }, "strip", z.ZodTypeAny, {
518
+ body?: string;
519
+ }, {
520
+ body?: string;
521
+ }>>;
522
+ image: z.ZodOptional<z.ZodObject<{
523
+ id: z.ZodString;
524
+ mime_type: z.ZodString;
525
+ sha256: z.ZodOptional<z.ZodString>;
526
+ caption: z.ZodOptional<z.ZodString>;
527
+ filename: z.ZodOptional<z.ZodString>;
528
+ }, "strip", z.ZodTypeAny, {
529
+ id?: string;
530
+ mime_type?: string;
531
+ sha256?: string;
532
+ caption?: string;
533
+ filename?: string;
534
+ }, {
535
+ id?: string;
536
+ mime_type?: string;
537
+ sha256?: string;
538
+ caption?: string;
539
+ filename?: string;
540
+ }>>;
541
+ audio: z.ZodOptional<z.ZodObject<{
542
+ id: z.ZodString;
543
+ mime_type: z.ZodString;
544
+ sha256: z.ZodOptional<z.ZodString>;
545
+ caption: z.ZodOptional<z.ZodString>;
546
+ filename: z.ZodOptional<z.ZodString>;
547
+ }, "strip", z.ZodTypeAny, {
548
+ id?: string;
549
+ mime_type?: string;
550
+ sha256?: string;
551
+ caption?: string;
552
+ filename?: string;
553
+ }, {
554
+ id?: string;
555
+ mime_type?: string;
556
+ sha256?: string;
557
+ caption?: string;
558
+ filename?: string;
559
+ }>>;
560
+ video: z.ZodOptional<z.ZodObject<{
561
+ id: z.ZodString;
562
+ mime_type: z.ZodString;
563
+ sha256: z.ZodOptional<z.ZodString>;
564
+ caption: z.ZodOptional<z.ZodString>;
565
+ filename: z.ZodOptional<z.ZodString>;
566
+ }, "strip", z.ZodTypeAny, {
567
+ id?: string;
568
+ mime_type?: string;
569
+ sha256?: string;
570
+ caption?: string;
571
+ filename?: string;
572
+ }, {
573
+ id?: string;
574
+ mime_type?: string;
575
+ sha256?: string;
576
+ caption?: string;
577
+ filename?: string;
578
+ }>>;
579
+ document: z.ZodOptional<z.ZodObject<{
580
+ id: z.ZodString;
581
+ mime_type: z.ZodString;
582
+ sha256: z.ZodOptional<z.ZodString>;
583
+ caption: z.ZodOptional<z.ZodString>;
584
+ filename: z.ZodOptional<z.ZodString>;
585
+ }, "strip", z.ZodTypeAny, {
586
+ id?: string;
587
+ mime_type?: string;
588
+ sha256?: string;
589
+ caption?: string;
590
+ filename?: string;
591
+ }, {
592
+ id?: string;
593
+ mime_type?: string;
594
+ sha256?: string;
595
+ caption?: string;
596
+ filename?: string;
597
+ }>>;
598
+ sticker: z.ZodOptional<z.ZodObject<{
599
+ id: z.ZodString;
600
+ mime_type: z.ZodString;
601
+ sha256: z.ZodOptional<z.ZodString>;
602
+ caption: z.ZodOptional<z.ZodString>;
603
+ filename: z.ZodOptional<z.ZodString>;
604
+ }, "strip", z.ZodTypeAny, {
605
+ id?: string;
606
+ mime_type?: string;
607
+ sha256?: string;
608
+ caption?: string;
609
+ filename?: string;
610
+ }, {
611
+ id?: string;
612
+ mime_type?: string;
613
+ sha256?: string;
614
+ caption?: string;
615
+ filename?: string;
616
+ }>>;
617
+ interactive: z.ZodOptional<z.ZodObject<{
618
+ type: z.ZodString;
619
+ button_reply: z.ZodOptional<z.ZodObject<{
620
+ id: z.ZodString;
621
+ title: z.ZodString;
622
+ }, "strip", z.ZodTypeAny, {
623
+ id?: string;
624
+ title?: string;
625
+ }, {
626
+ id?: string;
627
+ title?: string;
628
+ }>>;
629
+ list_reply: z.ZodOptional<z.ZodObject<{
630
+ id: z.ZodString;
631
+ title: z.ZodString;
632
+ }, "strip", z.ZodTypeAny, {
633
+ id?: string;
634
+ title?: string;
635
+ }, {
636
+ id?: string;
637
+ title?: string;
638
+ }>>;
639
+ }, "strip", z.ZodTypeAny, {
640
+ type?: string;
641
+ button_reply?: {
642
+ id?: string;
643
+ title?: string;
644
+ };
645
+ list_reply?: {
646
+ id?: string;
647
+ title?: string;
648
+ };
649
+ }, {
650
+ type?: string;
651
+ button_reply?: {
652
+ id?: string;
653
+ title?: string;
654
+ };
655
+ list_reply?: {
656
+ id?: string;
657
+ title?: string;
658
+ };
659
+ }>>;
660
+ order: z.ZodOptional<z.ZodObject<{
661
+ catalog_id: z.ZodString;
662
+ text: z.ZodOptional<z.ZodString>;
663
+ product_items: z.ZodArray<z.ZodObject<{
664
+ product_retailer_id: z.ZodString;
665
+ quantity: z.ZodNumber;
666
+ item_price: z.ZodNumber;
667
+ currency: z.ZodString;
668
+ }, "strip", z.ZodTypeAny, {
669
+ product_retailer_id?: string;
670
+ quantity?: number;
671
+ item_price?: number;
672
+ currency?: string;
673
+ }, {
674
+ product_retailer_id?: string;
675
+ quantity?: number;
676
+ item_price?: number;
677
+ currency?: string;
678
+ }>, "many">;
679
+ }, "strip", z.ZodTypeAny, {
680
+ catalog_id?: string;
681
+ text?: string;
682
+ product_items?: {
683
+ product_retailer_id?: string;
684
+ quantity?: number;
685
+ item_price?: number;
686
+ currency?: string;
687
+ }[];
688
+ }, {
689
+ catalog_id?: string;
690
+ text?: string;
691
+ product_items?: {
692
+ product_retailer_id?: string;
693
+ quantity?: number;
694
+ item_price?: number;
695
+ currency?: string;
696
+ }[];
697
+ }>>;
698
+ context: z.ZodOptional<z.ZodObject<{
699
+ from: z.ZodOptional<z.ZodString>;
700
+ id: z.ZodOptional<z.ZodString>;
701
+ referred_product: z.ZodOptional<z.ZodObject<{
702
+ catalog_id: z.ZodString;
703
+ product_retailer_id: z.ZodString;
704
+ }, "strip", z.ZodTypeAny, {
705
+ catalog_id?: string;
706
+ product_retailer_id?: string;
707
+ }, {
708
+ catalog_id?: string;
709
+ product_retailer_id?: string;
710
+ }>>;
711
+ }, "strip", z.ZodTypeAny, {
712
+ id?: string;
713
+ from?: string;
714
+ referred_product?: {
715
+ catalog_id?: string;
716
+ product_retailer_id?: string;
717
+ };
718
+ }, {
719
+ id?: string;
720
+ from?: string;
721
+ referred_product?: {
722
+ catalog_id?: string;
723
+ product_retailer_id?: string;
724
+ };
725
+ }>>;
726
+ timestamp: z.ZodString;
727
+ }, "strip", z.ZodTypeAny, {
728
+ id?: string;
729
+ type?: string;
730
+ text?: {
731
+ body?: string;
732
+ };
733
+ from?: string;
734
+ image?: {
735
+ id?: string;
736
+ mime_type?: string;
737
+ sha256?: string;
738
+ caption?: string;
739
+ filename?: string;
740
+ };
741
+ audio?: {
742
+ id?: string;
743
+ mime_type?: string;
744
+ sha256?: string;
745
+ caption?: string;
746
+ filename?: string;
747
+ };
748
+ video?: {
749
+ id?: string;
750
+ mime_type?: string;
751
+ sha256?: string;
752
+ caption?: string;
753
+ filename?: string;
754
+ };
755
+ document?: {
756
+ id?: string;
757
+ mime_type?: string;
758
+ sha256?: string;
759
+ caption?: string;
760
+ filename?: string;
761
+ };
762
+ sticker?: {
763
+ id?: string;
764
+ mime_type?: string;
765
+ sha256?: string;
766
+ caption?: string;
767
+ filename?: string;
768
+ };
769
+ interactive?: {
770
+ type?: string;
771
+ button_reply?: {
772
+ id?: string;
773
+ title?: string;
774
+ };
775
+ list_reply?: {
776
+ id?: string;
777
+ title?: string;
778
+ };
779
+ };
780
+ order?: {
781
+ catalog_id?: string;
782
+ text?: string;
783
+ product_items?: {
784
+ product_retailer_id?: string;
785
+ quantity?: number;
786
+ item_price?: number;
787
+ currency?: string;
788
+ }[];
789
+ };
790
+ context?: {
791
+ id?: string;
792
+ from?: string;
793
+ referred_product?: {
794
+ catalog_id?: string;
795
+ product_retailer_id?: string;
796
+ };
797
+ };
798
+ timestamp?: string;
799
+ }, {
800
+ id?: string;
801
+ type?: string;
802
+ text?: {
803
+ body?: string;
804
+ };
805
+ from?: string;
806
+ image?: {
807
+ id?: string;
808
+ mime_type?: string;
809
+ sha256?: string;
810
+ caption?: string;
811
+ filename?: string;
812
+ };
813
+ audio?: {
814
+ id?: string;
815
+ mime_type?: string;
816
+ sha256?: string;
817
+ caption?: string;
818
+ filename?: string;
819
+ };
820
+ video?: {
821
+ id?: string;
822
+ mime_type?: string;
823
+ sha256?: string;
824
+ caption?: string;
825
+ filename?: string;
826
+ };
827
+ document?: {
828
+ id?: string;
829
+ mime_type?: string;
830
+ sha256?: string;
831
+ caption?: string;
832
+ filename?: string;
833
+ };
834
+ sticker?: {
835
+ id?: string;
836
+ mime_type?: string;
837
+ sha256?: string;
838
+ caption?: string;
839
+ filename?: string;
840
+ };
841
+ interactive?: {
842
+ type?: string;
843
+ button_reply?: {
844
+ id?: string;
845
+ title?: string;
846
+ };
847
+ list_reply?: {
848
+ id?: string;
849
+ title?: string;
850
+ };
851
+ };
852
+ order?: {
853
+ catalog_id?: string;
854
+ text?: string;
855
+ product_items?: {
856
+ product_retailer_id?: string;
857
+ quantity?: number;
858
+ item_price?: number;
859
+ currency?: string;
860
+ }[];
861
+ };
862
+ context?: {
863
+ id?: string;
864
+ from?: string;
865
+ referred_product?: {
866
+ catalog_id?: string;
867
+ product_retailer_id?: string;
868
+ };
869
+ };
870
+ timestamp?: string;
871
+ }>, "many">>;
872
+ message_echoes: z.ZodOptional<z.ZodArray<z.ZodObject<{
873
+ id: z.ZodString;
874
+ from: z.ZodString;
875
+ timestamp: z.ZodString;
876
+ type: z.ZodString;
877
+ }, "strip", z.ZodTypeAny, {
878
+ id?: string;
879
+ type?: string;
880
+ from?: string;
881
+ timestamp?: string;
882
+ }, {
883
+ id?: string;
884
+ type?: string;
885
+ from?: string;
886
+ timestamp?: string;
887
+ }>, "many">>;
888
+ statuses: z.ZodOptional<z.ZodArray<z.ZodObject<{
889
+ id: z.ZodString;
890
+ status: z.ZodEnum<["sent", "delivered", "read", "failed"]>;
891
+ timestamp: z.ZodString;
892
+ recipient_id: z.ZodOptional<z.ZodString>;
893
+ }, "strip", z.ZodTypeAny, {
894
+ id?: string;
895
+ status?: "sent" | "delivered" | "read" | "failed";
896
+ timestamp?: string;
897
+ recipient_id?: string;
898
+ }, {
899
+ id?: string;
900
+ status?: "sent" | "delivered" | "read" | "failed";
901
+ timestamp?: string;
902
+ recipient_id?: string;
903
+ }>, "many">>;
904
+ metadata: z.ZodOptional<z.ZodObject<{
905
+ display_phone_number: z.ZodString;
906
+ phone_number_id: z.ZodString;
907
+ }, "strip", z.ZodTypeAny, {
908
+ display_phone_number?: string;
909
+ phone_number_id?: string;
910
+ }, {
911
+ display_phone_number?: string;
912
+ phone_number_id?: string;
913
+ }>>;
914
+ }, "strip", z.ZodTypeAny, {
915
+ messaging_product?: string;
916
+ messages?: {
917
+ id?: string;
918
+ type?: string;
919
+ text?: {
920
+ body?: string;
921
+ };
922
+ from?: string;
923
+ image?: {
924
+ id?: string;
925
+ mime_type?: string;
926
+ sha256?: string;
927
+ caption?: string;
928
+ filename?: string;
929
+ };
930
+ audio?: {
931
+ id?: string;
932
+ mime_type?: string;
933
+ sha256?: string;
934
+ caption?: string;
935
+ filename?: string;
936
+ };
937
+ video?: {
938
+ id?: string;
939
+ mime_type?: string;
940
+ sha256?: string;
941
+ caption?: string;
942
+ filename?: string;
943
+ };
944
+ document?: {
945
+ id?: string;
946
+ mime_type?: string;
947
+ sha256?: string;
948
+ caption?: string;
949
+ filename?: string;
950
+ };
951
+ sticker?: {
952
+ id?: string;
953
+ mime_type?: string;
954
+ sha256?: string;
955
+ caption?: string;
956
+ filename?: string;
957
+ };
958
+ interactive?: {
959
+ type?: string;
960
+ button_reply?: {
961
+ id?: string;
962
+ title?: string;
963
+ };
964
+ list_reply?: {
965
+ id?: string;
966
+ title?: string;
967
+ };
968
+ };
969
+ order?: {
970
+ catalog_id?: string;
971
+ text?: string;
972
+ product_items?: {
973
+ product_retailer_id?: string;
974
+ quantity?: number;
975
+ item_price?: number;
976
+ currency?: string;
977
+ }[];
978
+ };
979
+ context?: {
980
+ id?: string;
981
+ from?: string;
982
+ referred_product?: {
983
+ catalog_id?: string;
984
+ product_retailer_id?: string;
985
+ };
986
+ };
987
+ timestamp?: string;
988
+ }[];
989
+ message_echoes?: {
990
+ id?: string;
991
+ type?: string;
992
+ from?: string;
993
+ timestamp?: string;
994
+ }[];
995
+ statuses?: {
996
+ id?: string;
997
+ status?: "sent" | "delivered" | "read" | "failed";
998
+ timestamp?: string;
999
+ recipient_id?: string;
1000
+ }[];
1001
+ metadata?: {
1002
+ display_phone_number?: string;
1003
+ phone_number_id?: string;
1004
+ };
1005
+ }, {
1006
+ messaging_product?: string;
1007
+ messages?: {
1008
+ id?: string;
1009
+ type?: string;
1010
+ text?: {
1011
+ body?: string;
1012
+ };
1013
+ from?: string;
1014
+ image?: {
1015
+ id?: string;
1016
+ mime_type?: string;
1017
+ sha256?: string;
1018
+ caption?: string;
1019
+ filename?: string;
1020
+ };
1021
+ audio?: {
1022
+ id?: string;
1023
+ mime_type?: string;
1024
+ sha256?: string;
1025
+ caption?: string;
1026
+ filename?: string;
1027
+ };
1028
+ video?: {
1029
+ id?: string;
1030
+ mime_type?: string;
1031
+ sha256?: string;
1032
+ caption?: string;
1033
+ filename?: string;
1034
+ };
1035
+ document?: {
1036
+ id?: string;
1037
+ mime_type?: string;
1038
+ sha256?: string;
1039
+ caption?: string;
1040
+ filename?: string;
1041
+ };
1042
+ sticker?: {
1043
+ id?: string;
1044
+ mime_type?: string;
1045
+ sha256?: string;
1046
+ caption?: string;
1047
+ filename?: string;
1048
+ };
1049
+ interactive?: {
1050
+ type?: string;
1051
+ button_reply?: {
1052
+ id?: string;
1053
+ title?: string;
1054
+ };
1055
+ list_reply?: {
1056
+ id?: string;
1057
+ title?: string;
1058
+ };
1059
+ };
1060
+ order?: {
1061
+ catalog_id?: string;
1062
+ text?: string;
1063
+ product_items?: {
1064
+ product_retailer_id?: string;
1065
+ quantity?: number;
1066
+ item_price?: number;
1067
+ currency?: string;
1068
+ }[];
1069
+ };
1070
+ context?: {
1071
+ id?: string;
1072
+ from?: string;
1073
+ referred_product?: {
1074
+ catalog_id?: string;
1075
+ product_retailer_id?: string;
1076
+ };
1077
+ };
1078
+ timestamp?: string;
1079
+ }[];
1080
+ message_echoes?: {
1081
+ id?: string;
1082
+ type?: string;
1083
+ from?: string;
1084
+ timestamp?: string;
1085
+ }[];
1086
+ statuses?: {
1087
+ id?: string;
1088
+ status?: "sent" | "delivered" | "read" | "failed";
1089
+ timestamp?: string;
1090
+ recipient_id?: string;
1091
+ }[];
1092
+ metadata?: {
1093
+ display_phone_number?: string;
1094
+ phone_number_id?: string;
1095
+ };
1096
+ }>;
1097
+ }, "strip", z.ZodTypeAny, {
1098
+ value?: {
1099
+ messaging_product?: string;
1100
+ messages?: {
1101
+ id?: string;
1102
+ type?: string;
1103
+ text?: {
1104
+ body?: string;
1105
+ };
1106
+ from?: string;
1107
+ image?: {
1108
+ id?: string;
1109
+ mime_type?: string;
1110
+ sha256?: string;
1111
+ caption?: string;
1112
+ filename?: string;
1113
+ };
1114
+ audio?: {
1115
+ id?: string;
1116
+ mime_type?: string;
1117
+ sha256?: string;
1118
+ caption?: string;
1119
+ filename?: string;
1120
+ };
1121
+ video?: {
1122
+ id?: string;
1123
+ mime_type?: string;
1124
+ sha256?: string;
1125
+ caption?: string;
1126
+ filename?: string;
1127
+ };
1128
+ document?: {
1129
+ id?: string;
1130
+ mime_type?: string;
1131
+ sha256?: string;
1132
+ caption?: string;
1133
+ filename?: string;
1134
+ };
1135
+ sticker?: {
1136
+ id?: string;
1137
+ mime_type?: string;
1138
+ sha256?: string;
1139
+ caption?: string;
1140
+ filename?: string;
1141
+ };
1142
+ interactive?: {
1143
+ type?: string;
1144
+ button_reply?: {
1145
+ id?: string;
1146
+ title?: string;
1147
+ };
1148
+ list_reply?: {
1149
+ id?: string;
1150
+ title?: string;
1151
+ };
1152
+ };
1153
+ order?: {
1154
+ catalog_id?: string;
1155
+ text?: string;
1156
+ product_items?: {
1157
+ product_retailer_id?: string;
1158
+ quantity?: number;
1159
+ item_price?: number;
1160
+ currency?: string;
1161
+ }[];
1162
+ };
1163
+ context?: {
1164
+ id?: string;
1165
+ from?: string;
1166
+ referred_product?: {
1167
+ catalog_id?: string;
1168
+ product_retailer_id?: string;
1169
+ };
1170
+ };
1171
+ timestamp?: string;
1172
+ }[];
1173
+ message_echoes?: {
1174
+ id?: string;
1175
+ type?: string;
1176
+ from?: string;
1177
+ timestamp?: string;
1178
+ }[];
1179
+ statuses?: {
1180
+ id?: string;
1181
+ status?: "sent" | "delivered" | "read" | "failed";
1182
+ timestamp?: string;
1183
+ recipient_id?: string;
1184
+ }[];
1185
+ metadata?: {
1186
+ display_phone_number?: string;
1187
+ phone_number_id?: string;
1188
+ };
1189
+ };
1190
+ }, {
1191
+ value?: {
1192
+ messaging_product?: string;
1193
+ messages?: {
1194
+ id?: string;
1195
+ type?: string;
1196
+ text?: {
1197
+ body?: string;
1198
+ };
1199
+ from?: string;
1200
+ image?: {
1201
+ id?: string;
1202
+ mime_type?: string;
1203
+ sha256?: string;
1204
+ caption?: string;
1205
+ filename?: string;
1206
+ };
1207
+ audio?: {
1208
+ id?: string;
1209
+ mime_type?: string;
1210
+ sha256?: string;
1211
+ caption?: string;
1212
+ filename?: string;
1213
+ };
1214
+ video?: {
1215
+ id?: string;
1216
+ mime_type?: string;
1217
+ sha256?: string;
1218
+ caption?: string;
1219
+ filename?: string;
1220
+ };
1221
+ document?: {
1222
+ id?: string;
1223
+ mime_type?: string;
1224
+ sha256?: string;
1225
+ caption?: string;
1226
+ filename?: string;
1227
+ };
1228
+ sticker?: {
1229
+ id?: string;
1230
+ mime_type?: string;
1231
+ sha256?: string;
1232
+ caption?: string;
1233
+ filename?: string;
1234
+ };
1235
+ interactive?: {
1236
+ type?: string;
1237
+ button_reply?: {
1238
+ id?: string;
1239
+ title?: string;
1240
+ };
1241
+ list_reply?: {
1242
+ id?: string;
1243
+ title?: string;
1244
+ };
1245
+ };
1246
+ order?: {
1247
+ catalog_id?: string;
1248
+ text?: string;
1249
+ product_items?: {
1250
+ product_retailer_id?: string;
1251
+ quantity?: number;
1252
+ item_price?: number;
1253
+ currency?: string;
1254
+ }[];
1255
+ };
1256
+ context?: {
1257
+ id?: string;
1258
+ from?: string;
1259
+ referred_product?: {
1260
+ catalog_id?: string;
1261
+ product_retailer_id?: string;
1262
+ };
1263
+ };
1264
+ timestamp?: string;
1265
+ }[];
1266
+ message_echoes?: {
1267
+ id?: string;
1268
+ type?: string;
1269
+ from?: string;
1270
+ timestamp?: string;
1271
+ }[];
1272
+ statuses?: {
1273
+ id?: string;
1274
+ status?: "sent" | "delivered" | "read" | "failed";
1275
+ timestamp?: string;
1276
+ recipient_id?: string;
1277
+ }[];
1278
+ metadata?: {
1279
+ display_phone_number?: string;
1280
+ phone_number_id?: string;
1281
+ };
1282
+ };
1283
+ }>, "many">;
1284
+ }, "strip", z.ZodTypeAny, {
1285
+ id?: string;
1286
+ changes?: {
1287
+ value?: {
1288
+ messaging_product?: string;
1289
+ messages?: {
1290
+ id?: string;
1291
+ type?: string;
1292
+ text?: {
1293
+ body?: string;
1294
+ };
1295
+ from?: string;
1296
+ image?: {
1297
+ id?: string;
1298
+ mime_type?: string;
1299
+ sha256?: string;
1300
+ caption?: string;
1301
+ filename?: string;
1302
+ };
1303
+ audio?: {
1304
+ id?: string;
1305
+ mime_type?: string;
1306
+ sha256?: string;
1307
+ caption?: string;
1308
+ filename?: string;
1309
+ };
1310
+ video?: {
1311
+ id?: string;
1312
+ mime_type?: string;
1313
+ sha256?: string;
1314
+ caption?: string;
1315
+ filename?: string;
1316
+ };
1317
+ document?: {
1318
+ id?: string;
1319
+ mime_type?: string;
1320
+ sha256?: string;
1321
+ caption?: string;
1322
+ filename?: string;
1323
+ };
1324
+ sticker?: {
1325
+ id?: string;
1326
+ mime_type?: string;
1327
+ sha256?: string;
1328
+ caption?: string;
1329
+ filename?: string;
1330
+ };
1331
+ interactive?: {
1332
+ type?: string;
1333
+ button_reply?: {
1334
+ id?: string;
1335
+ title?: string;
1336
+ };
1337
+ list_reply?: {
1338
+ id?: string;
1339
+ title?: string;
1340
+ };
1341
+ };
1342
+ order?: {
1343
+ catalog_id?: string;
1344
+ text?: string;
1345
+ product_items?: {
1346
+ product_retailer_id?: string;
1347
+ quantity?: number;
1348
+ item_price?: number;
1349
+ currency?: string;
1350
+ }[];
1351
+ };
1352
+ context?: {
1353
+ id?: string;
1354
+ from?: string;
1355
+ referred_product?: {
1356
+ catalog_id?: string;
1357
+ product_retailer_id?: string;
1358
+ };
1359
+ };
1360
+ timestamp?: string;
1361
+ }[];
1362
+ message_echoes?: {
1363
+ id?: string;
1364
+ type?: string;
1365
+ from?: string;
1366
+ timestamp?: string;
1367
+ }[];
1368
+ statuses?: {
1369
+ id?: string;
1370
+ status?: "sent" | "delivered" | "read" | "failed";
1371
+ timestamp?: string;
1372
+ recipient_id?: string;
1373
+ }[];
1374
+ metadata?: {
1375
+ display_phone_number?: string;
1376
+ phone_number_id?: string;
1377
+ };
1378
+ };
1379
+ }[];
1380
+ }, {
1381
+ id?: string;
1382
+ changes?: {
1383
+ value?: {
1384
+ messaging_product?: string;
1385
+ messages?: {
1386
+ id?: string;
1387
+ type?: string;
1388
+ text?: {
1389
+ body?: string;
1390
+ };
1391
+ from?: string;
1392
+ image?: {
1393
+ id?: string;
1394
+ mime_type?: string;
1395
+ sha256?: string;
1396
+ caption?: string;
1397
+ filename?: string;
1398
+ };
1399
+ audio?: {
1400
+ id?: string;
1401
+ mime_type?: string;
1402
+ sha256?: string;
1403
+ caption?: string;
1404
+ filename?: string;
1405
+ };
1406
+ video?: {
1407
+ id?: string;
1408
+ mime_type?: string;
1409
+ sha256?: string;
1410
+ caption?: string;
1411
+ filename?: string;
1412
+ };
1413
+ document?: {
1414
+ id?: string;
1415
+ mime_type?: string;
1416
+ sha256?: string;
1417
+ caption?: string;
1418
+ filename?: string;
1419
+ };
1420
+ sticker?: {
1421
+ id?: string;
1422
+ mime_type?: string;
1423
+ sha256?: string;
1424
+ caption?: string;
1425
+ filename?: string;
1426
+ };
1427
+ interactive?: {
1428
+ type?: string;
1429
+ button_reply?: {
1430
+ id?: string;
1431
+ title?: string;
1432
+ };
1433
+ list_reply?: {
1434
+ id?: string;
1435
+ title?: string;
1436
+ };
1437
+ };
1438
+ order?: {
1439
+ catalog_id?: string;
1440
+ text?: string;
1441
+ product_items?: {
1442
+ product_retailer_id?: string;
1443
+ quantity?: number;
1444
+ item_price?: number;
1445
+ currency?: string;
1446
+ }[];
1447
+ };
1448
+ context?: {
1449
+ id?: string;
1450
+ from?: string;
1451
+ referred_product?: {
1452
+ catalog_id?: string;
1453
+ product_retailer_id?: string;
1454
+ };
1455
+ };
1456
+ timestamp?: string;
1457
+ }[];
1458
+ message_echoes?: {
1459
+ id?: string;
1460
+ type?: string;
1461
+ from?: string;
1462
+ timestamp?: string;
1463
+ }[];
1464
+ statuses?: {
1465
+ id?: string;
1466
+ status?: "sent" | "delivered" | "read" | "failed";
1467
+ timestamp?: string;
1468
+ recipient_id?: string;
1469
+ }[];
1470
+ metadata?: {
1471
+ display_phone_number?: string;
1472
+ phone_number_id?: string;
1473
+ };
1474
+ };
1475
+ }[];
1476
+ }>, "many">;
1477
+ }, "strip", z.ZodTypeAny, {
1478
+ object?: string;
1479
+ entry?: {
1480
+ id?: string;
1481
+ changes?: {
1482
+ value?: {
1483
+ messaging_product?: string;
1484
+ messages?: {
1485
+ id?: string;
1486
+ type?: string;
1487
+ text?: {
1488
+ body?: string;
1489
+ };
1490
+ from?: string;
1491
+ image?: {
1492
+ id?: string;
1493
+ mime_type?: string;
1494
+ sha256?: string;
1495
+ caption?: string;
1496
+ filename?: string;
1497
+ };
1498
+ audio?: {
1499
+ id?: string;
1500
+ mime_type?: string;
1501
+ sha256?: string;
1502
+ caption?: string;
1503
+ filename?: string;
1504
+ };
1505
+ video?: {
1506
+ id?: string;
1507
+ mime_type?: string;
1508
+ sha256?: string;
1509
+ caption?: string;
1510
+ filename?: string;
1511
+ };
1512
+ document?: {
1513
+ id?: string;
1514
+ mime_type?: string;
1515
+ sha256?: string;
1516
+ caption?: string;
1517
+ filename?: string;
1518
+ };
1519
+ sticker?: {
1520
+ id?: string;
1521
+ mime_type?: string;
1522
+ sha256?: string;
1523
+ caption?: string;
1524
+ filename?: string;
1525
+ };
1526
+ interactive?: {
1527
+ type?: string;
1528
+ button_reply?: {
1529
+ id?: string;
1530
+ title?: string;
1531
+ };
1532
+ list_reply?: {
1533
+ id?: string;
1534
+ title?: string;
1535
+ };
1536
+ };
1537
+ order?: {
1538
+ catalog_id?: string;
1539
+ text?: string;
1540
+ product_items?: {
1541
+ product_retailer_id?: string;
1542
+ quantity?: number;
1543
+ item_price?: number;
1544
+ currency?: string;
1545
+ }[];
1546
+ };
1547
+ context?: {
1548
+ id?: string;
1549
+ from?: string;
1550
+ referred_product?: {
1551
+ catalog_id?: string;
1552
+ product_retailer_id?: string;
1553
+ };
1554
+ };
1555
+ timestamp?: string;
1556
+ }[];
1557
+ message_echoes?: {
1558
+ id?: string;
1559
+ type?: string;
1560
+ from?: string;
1561
+ timestamp?: string;
1562
+ }[];
1563
+ statuses?: {
1564
+ id?: string;
1565
+ status?: "sent" | "delivered" | "read" | "failed";
1566
+ timestamp?: string;
1567
+ recipient_id?: string;
1568
+ }[];
1569
+ metadata?: {
1570
+ display_phone_number?: string;
1571
+ phone_number_id?: string;
1572
+ };
1573
+ };
1574
+ }[];
1575
+ }[];
1576
+ }, {
1577
+ object?: string;
1578
+ entry?: {
1579
+ id?: string;
1580
+ changes?: {
1581
+ value?: {
1582
+ messaging_product?: string;
1583
+ messages?: {
1584
+ id?: string;
1585
+ type?: string;
1586
+ text?: {
1587
+ body?: string;
1588
+ };
1589
+ from?: string;
1590
+ image?: {
1591
+ id?: string;
1592
+ mime_type?: string;
1593
+ sha256?: string;
1594
+ caption?: string;
1595
+ filename?: string;
1596
+ };
1597
+ audio?: {
1598
+ id?: string;
1599
+ mime_type?: string;
1600
+ sha256?: string;
1601
+ caption?: string;
1602
+ filename?: string;
1603
+ };
1604
+ video?: {
1605
+ id?: string;
1606
+ mime_type?: string;
1607
+ sha256?: string;
1608
+ caption?: string;
1609
+ filename?: string;
1610
+ };
1611
+ document?: {
1612
+ id?: string;
1613
+ mime_type?: string;
1614
+ sha256?: string;
1615
+ caption?: string;
1616
+ filename?: string;
1617
+ };
1618
+ sticker?: {
1619
+ id?: string;
1620
+ mime_type?: string;
1621
+ sha256?: string;
1622
+ caption?: string;
1623
+ filename?: string;
1624
+ };
1625
+ interactive?: {
1626
+ type?: string;
1627
+ button_reply?: {
1628
+ id?: string;
1629
+ title?: string;
1630
+ };
1631
+ list_reply?: {
1632
+ id?: string;
1633
+ title?: string;
1634
+ };
1635
+ };
1636
+ order?: {
1637
+ catalog_id?: string;
1638
+ text?: string;
1639
+ product_items?: {
1640
+ product_retailer_id?: string;
1641
+ quantity?: number;
1642
+ item_price?: number;
1643
+ currency?: string;
1644
+ }[];
1645
+ };
1646
+ context?: {
1647
+ id?: string;
1648
+ from?: string;
1649
+ referred_product?: {
1650
+ catalog_id?: string;
1651
+ product_retailer_id?: string;
1652
+ };
1653
+ };
1654
+ timestamp?: string;
1655
+ }[];
1656
+ message_echoes?: {
1657
+ id?: string;
1658
+ type?: string;
1659
+ from?: string;
1660
+ timestamp?: string;
1661
+ }[];
1662
+ statuses?: {
1663
+ id?: string;
1664
+ status?: "sent" | "delivered" | "read" | "failed";
1665
+ timestamp?: string;
1666
+ recipient_id?: string;
1667
+ }[];
1668
+ metadata?: {
1669
+ display_phone_number?: string;
1670
+ phone_number_id?: string;
1671
+ };
1672
+ };
1673
+ }[];
1674
+ }[];
1675
+ }>;
1676
+ type WhatsAppWebhookPayload = z.infer<typeof whatsAppWebhookPayloadSchema>;
1677
+
1678
+ type SessionState = string;
1679
+ type SessionMode = 'bot' | 'human';
1680
+ type MessageDirection = 'inbound' | 'outbound';
1681
+ type MessageSender = 'customer' | 'bot' | 'agent';
1682
+ type MessageStatus = 'received' | 'sent' | 'delivered' | 'read' | 'failed';
1683
+ interface ConversationSession {
1684
+ id: string;
1685
+ companyId: string;
1686
+ whatsappNumber: string;
1687
+ currentState: SessionState;
1688
+ context: Record<string, unknown>;
1689
+ mode: SessionMode;
1690
+ assignedUserId: string | null;
1691
+ humanRequestedAt: string | null;
1692
+ lastInboundAt: string | null;
1693
+ lastAgentReadAt: string | null;
1694
+ lastActivity: string;
1695
+ createdAt: string;
1696
+ updatedAt: string;
1697
+ }
1698
+ interface ConversationMessage {
1699
+ id: string;
1700
+ companyId: string;
1701
+ whatsappNumber: string;
1702
+ direction: MessageDirection;
1703
+ sender: MessageSender;
1704
+ agentUserId: string | null;
1705
+ type: string;
1706
+ content: string | null;
1707
+ payload: Record<string, unknown> | null;
1708
+ waMessageId: string | null;
1709
+ status: MessageStatus | null;
1710
+ readAt: string | null;
1711
+ createdAt: string;
1712
+ }
1713
+ interface ConversationSummary {
1714
+ id: string;
1715
+ whatsappNumber: string;
1716
+ clientName?: string;
1717
+ lastContent?: string;
1718
+ lastDirection?: MessageDirection;
1719
+ lastAt: string;
1720
+ lastInboundAt: string | null;
1721
+ mode: SessionMode;
1722
+ assignedUserId: string | null;
1723
+ waitingHuman: boolean;
1724
+ unread: number;
1725
+ currentState: SessionState;
1726
+ }
1727
+ interface ListConversationsParams {
1728
+ page?: number;
1729
+ limit?: number;
1730
+ waitingHuman?: boolean;
1731
+ search?: string;
1732
+ }
1733
+ interface ListMessagesParams {
1734
+ limit?: number;
1735
+ before?: string;
1736
+ }
1737
+
1738
+ type FlowNodeType = 'question' | 'entrada_choice' | 'action' | 'menu' | 'condition';
1739
+ type FlowQuestionType = 'text' | 'money' | 'date' | 'int' | 'cpf' | 'choice';
1740
+ type FlowActionKind = string;
1741
+ type FlowConditionOperator = '>' | '>=' | '<' | '<=' | '==' | '!=' | 'contains';
1742
+ type FlowNodeNext = string | {
1743
+ byAnswer: Record<string, string>;
1744
+ default: string;
1745
+ };
1746
+ declare const CROSS_FLOW_PREFIX = "flow:";
1747
+ declare const isCrossFlowTarget: (target: string) => boolean;
1748
+ declare const crossFlowKey: (target: string) => string;
1749
+ type FlowNodeData = {
1750
+ id: string;
1751
+ type: FlowNodeType;
1752
+ contextKey?: string;
1753
+ questionType?: FlowQuestionType;
1754
+ question?: string;
1755
+ options?: [string, string][];
1756
+ actionKind?: FlowActionKind;
1757
+ simulationTemplate?: Record<string, string>;
1758
+ directMessage?: string;
1759
+ fallbackMessage?: string;
1760
+ conditionContextKey?: string;
1761
+ conditionOperator?: FlowConditionOperator;
1762
+ conditionValue?: string;
1763
+ position?: {
1764
+ x: number;
1765
+ y: number;
1766
+ };
1767
+ next?: FlowNodeNext;
1768
+ };
1769
+ interface FlowGraphData {
1770
+ key: string;
1771
+ label: string;
1772
+ startNodeId: string;
1773
+ version: number;
1774
+ nodes: Record<string, FlowNodeData>;
1775
+ }
1776
+ interface FlowGraphSummary {
1777
+ key: string;
1778
+ label: string;
1779
+ nodeCount: number;
1780
+ showInMenu: boolean;
1781
+ menuOptionLabel?: string;
1782
+ updatedAt: string;
1783
+ }
1784
+ interface LiveFlowPosition {
1785
+ flowKey: string;
1786
+ nodeId: string;
1787
+ count: number;
1788
+ }
1789
+ declare const flowNodeNextSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
1790
+ byAnswer: z.ZodRecord<z.ZodString, z.ZodString>;
1791
+ default: z.ZodString;
1792
+ }, "strip", z.ZodTypeAny, {
1793
+ byAnswer?: Record<string, string>;
1794
+ default?: string;
1795
+ }, {
1796
+ byAnswer?: Record<string, string>;
1797
+ default?: string;
1798
+ }>]>;
1799
+ declare const flowNodeDataSchema: z.ZodObject<{
1800
+ id: z.ZodString;
1801
+ type: z.ZodEnum<["question", "entrada_choice", "action", "menu", "condition"]>;
1802
+ contextKey: z.ZodOptional<z.ZodString>;
1803
+ questionType: z.ZodOptional<z.ZodEnum<["text", "money", "date", "int", "cpf", "choice"]>>;
1804
+ question: z.ZodOptional<z.ZodString>;
1805
+ options: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">>;
1806
+ actionKind: z.ZodOptional<z.ZodString>;
1807
+ simulationTemplate: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1808
+ directMessage: z.ZodOptional<z.ZodString>;
1809
+ fallbackMessage: z.ZodOptional<z.ZodString>;
1810
+ conditionContextKey: z.ZodOptional<z.ZodString>;
1811
+ conditionOperator: z.ZodOptional<z.ZodEnum<[">", ">=", "<", "<=", "==", "!=", "contains"]>>;
1812
+ conditionValue: z.ZodOptional<z.ZodString>;
1813
+ position: z.ZodOptional<z.ZodObject<{
1814
+ x: z.ZodNumber;
1815
+ y: z.ZodNumber;
1816
+ }, "strip", z.ZodTypeAny, {
1817
+ x?: number;
1818
+ y?: number;
1819
+ }, {
1820
+ x?: number;
1821
+ y?: number;
1822
+ }>>;
1823
+ next: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
1824
+ byAnswer: z.ZodRecord<z.ZodString, z.ZodString>;
1825
+ default: z.ZodString;
1826
+ }, "strip", z.ZodTypeAny, {
1827
+ byAnswer?: Record<string, string>;
1828
+ default?: string;
1829
+ }, {
1830
+ byAnswer?: Record<string, string>;
1831
+ default?: string;
1832
+ }>]>>;
1833
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1834
+ id: z.ZodString;
1835
+ type: z.ZodEnum<["question", "entrada_choice", "action", "menu", "condition"]>;
1836
+ contextKey: z.ZodOptional<z.ZodString>;
1837
+ questionType: z.ZodOptional<z.ZodEnum<["text", "money", "date", "int", "cpf", "choice"]>>;
1838
+ question: z.ZodOptional<z.ZodString>;
1839
+ options: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">>;
1840
+ actionKind: z.ZodOptional<z.ZodString>;
1841
+ simulationTemplate: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1842
+ directMessage: z.ZodOptional<z.ZodString>;
1843
+ fallbackMessage: z.ZodOptional<z.ZodString>;
1844
+ conditionContextKey: z.ZodOptional<z.ZodString>;
1845
+ conditionOperator: z.ZodOptional<z.ZodEnum<[">", ">=", "<", "<=", "==", "!=", "contains"]>>;
1846
+ conditionValue: z.ZodOptional<z.ZodString>;
1847
+ position: z.ZodOptional<z.ZodObject<{
1848
+ x: z.ZodNumber;
1849
+ y: z.ZodNumber;
1850
+ }, "strip", z.ZodTypeAny, {
1851
+ x?: number;
1852
+ y?: number;
1853
+ }, {
1854
+ x?: number;
1855
+ y?: number;
1856
+ }>>;
1857
+ next: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
1858
+ byAnswer: z.ZodRecord<z.ZodString, z.ZodString>;
1859
+ default: z.ZodString;
1860
+ }, "strip", z.ZodTypeAny, {
1861
+ byAnswer?: Record<string, string>;
1862
+ default?: string;
1863
+ }, {
1864
+ byAnswer?: Record<string, string>;
1865
+ default?: string;
1866
+ }>]>>;
1867
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1868
+ id: z.ZodString;
1869
+ type: z.ZodEnum<["question", "entrada_choice", "action", "menu", "condition"]>;
1870
+ contextKey: z.ZodOptional<z.ZodString>;
1871
+ questionType: z.ZodOptional<z.ZodEnum<["text", "money", "date", "int", "cpf", "choice"]>>;
1872
+ question: z.ZodOptional<z.ZodString>;
1873
+ options: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">>;
1874
+ actionKind: z.ZodOptional<z.ZodString>;
1875
+ simulationTemplate: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1876
+ directMessage: z.ZodOptional<z.ZodString>;
1877
+ fallbackMessage: z.ZodOptional<z.ZodString>;
1878
+ conditionContextKey: z.ZodOptional<z.ZodString>;
1879
+ conditionOperator: z.ZodOptional<z.ZodEnum<[">", ">=", "<", "<=", "==", "!=", "contains"]>>;
1880
+ conditionValue: z.ZodOptional<z.ZodString>;
1881
+ position: z.ZodOptional<z.ZodObject<{
1882
+ x: z.ZodNumber;
1883
+ y: z.ZodNumber;
1884
+ }, "strip", z.ZodTypeAny, {
1885
+ x?: number;
1886
+ y?: number;
1887
+ }, {
1888
+ x?: number;
1889
+ y?: number;
1890
+ }>>;
1891
+ next: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
1892
+ byAnswer: z.ZodRecord<z.ZodString, z.ZodString>;
1893
+ default: z.ZodString;
1894
+ }, "strip", z.ZodTypeAny, {
1895
+ byAnswer?: Record<string, string>;
1896
+ default?: string;
1897
+ }, {
1898
+ byAnswer?: Record<string, string>;
1899
+ default?: string;
1900
+ }>]>>;
1901
+ }, z.ZodTypeAny, "passthrough">>;
1902
+ declare const flowGraphNodesSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
1903
+ id: z.ZodString;
1904
+ type: z.ZodEnum<["question", "entrada_choice", "action", "menu", "condition"]>;
1905
+ contextKey: z.ZodOptional<z.ZodString>;
1906
+ questionType: z.ZodOptional<z.ZodEnum<["text", "money", "date", "int", "cpf", "choice"]>>;
1907
+ question: z.ZodOptional<z.ZodString>;
1908
+ options: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">>;
1909
+ actionKind: z.ZodOptional<z.ZodString>;
1910
+ simulationTemplate: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1911
+ directMessage: z.ZodOptional<z.ZodString>;
1912
+ fallbackMessage: z.ZodOptional<z.ZodString>;
1913
+ conditionContextKey: z.ZodOptional<z.ZodString>;
1914
+ conditionOperator: z.ZodOptional<z.ZodEnum<[">", ">=", "<", "<=", "==", "!=", "contains"]>>;
1915
+ conditionValue: z.ZodOptional<z.ZodString>;
1916
+ position: z.ZodOptional<z.ZodObject<{
1917
+ x: z.ZodNumber;
1918
+ y: z.ZodNumber;
1919
+ }, "strip", z.ZodTypeAny, {
1920
+ x?: number;
1921
+ y?: number;
1922
+ }, {
1923
+ x?: number;
1924
+ y?: number;
1925
+ }>>;
1926
+ next: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
1927
+ byAnswer: z.ZodRecord<z.ZodString, z.ZodString>;
1928
+ default: z.ZodString;
1929
+ }, "strip", z.ZodTypeAny, {
1930
+ byAnswer?: Record<string, string>;
1931
+ default?: string;
1932
+ }, {
1933
+ byAnswer?: Record<string, string>;
1934
+ default?: string;
1935
+ }>]>>;
1936
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1937
+ id: z.ZodString;
1938
+ type: z.ZodEnum<["question", "entrada_choice", "action", "menu", "condition"]>;
1939
+ contextKey: z.ZodOptional<z.ZodString>;
1940
+ questionType: z.ZodOptional<z.ZodEnum<["text", "money", "date", "int", "cpf", "choice"]>>;
1941
+ question: z.ZodOptional<z.ZodString>;
1942
+ options: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">>;
1943
+ actionKind: z.ZodOptional<z.ZodString>;
1944
+ simulationTemplate: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1945
+ directMessage: z.ZodOptional<z.ZodString>;
1946
+ fallbackMessage: z.ZodOptional<z.ZodString>;
1947
+ conditionContextKey: z.ZodOptional<z.ZodString>;
1948
+ conditionOperator: z.ZodOptional<z.ZodEnum<[">", ">=", "<", "<=", "==", "!=", "contains"]>>;
1949
+ conditionValue: z.ZodOptional<z.ZodString>;
1950
+ position: z.ZodOptional<z.ZodObject<{
1951
+ x: z.ZodNumber;
1952
+ y: z.ZodNumber;
1953
+ }, "strip", z.ZodTypeAny, {
1954
+ x?: number;
1955
+ y?: number;
1956
+ }, {
1957
+ x?: number;
1958
+ y?: number;
1959
+ }>>;
1960
+ next: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
1961
+ byAnswer: z.ZodRecord<z.ZodString, z.ZodString>;
1962
+ default: z.ZodString;
1963
+ }, "strip", z.ZodTypeAny, {
1964
+ byAnswer?: Record<string, string>;
1965
+ default?: string;
1966
+ }, {
1967
+ byAnswer?: Record<string, string>;
1968
+ default?: string;
1969
+ }>]>>;
1970
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1971
+ id: z.ZodString;
1972
+ type: z.ZodEnum<["question", "entrada_choice", "action", "menu", "condition"]>;
1973
+ contextKey: z.ZodOptional<z.ZodString>;
1974
+ questionType: z.ZodOptional<z.ZodEnum<["text", "money", "date", "int", "cpf", "choice"]>>;
1975
+ question: z.ZodOptional<z.ZodString>;
1976
+ options: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">>;
1977
+ actionKind: z.ZodOptional<z.ZodString>;
1978
+ simulationTemplate: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1979
+ directMessage: z.ZodOptional<z.ZodString>;
1980
+ fallbackMessage: z.ZodOptional<z.ZodString>;
1981
+ conditionContextKey: z.ZodOptional<z.ZodString>;
1982
+ conditionOperator: z.ZodOptional<z.ZodEnum<[">", ">=", "<", "<=", "==", "!=", "contains"]>>;
1983
+ conditionValue: z.ZodOptional<z.ZodString>;
1984
+ position: z.ZodOptional<z.ZodObject<{
1985
+ x: z.ZodNumber;
1986
+ y: z.ZodNumber;
1987
+ }, "strip", z.ZodTypeAny, {
1988
+ x?: number;
1989
+ y?: number;
1990
+ }, {
1991
+ x?: number;
1992
+ y?: number;
1993
+ }>>;
1994
+ next: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
1995
+ byAnswer: z.ZodRecord<z.ZodString, z.ZodString>;
1996
+ default: z.ZodString;
1997
+ }, "strip", z.ZodTypeAny, {
1998
+ byAnswer?: Record<string, string>;
1999
+ default?: string;
2000
+ }, {
2001
+ byAnswer?: Record<string, string>;
2002
+ default?: string;
2003
+ }>]>>;
2004
+ }, z.ZodTypeAny, "passthrough">>>;
2005
+
2006
+ interface WhatsAppSettings {
2007
+ templateName: string;
2008
+ templateLanguage: string;
2009
+ templateVariables: string[];
2010
+ welcomeMessage: string;
2011
+ farewellMessage: string;
2012
+ }
2013
+ interface TemplateVariablesMap {
2014
+ [index: number]: string;
2015
+ }
2016
+ interface TemplateConfig {
2017
+ name: string;
2018
+ category: 'UTILITY' | 'MARKETING';
2019
+ language: string;
2020
+ headerType: 'NONE' | 'TEXT';
2021
+ headerText?: string;
2022
+ bodyText: string;
2023
+ footerText?: string;
2024
+ }
2025
+ interface WhatsAppTemplateSummary {
2026
+ id: string;
2027
+ name: string;
2028
+ shortId: string;
2029
+ displayName: string;
2030
+ status: string;
2031
+ category: string;
2032
+ language: string;
2033
+ bodyText: string | null;
2034
+ variableCount: number;
2035
+ }
2036
+ interface CreateTemplateResult {
2037
+ ok: boolean;
2038
+ message: string;
2039
+ status?: string;
2040
+ }
2041
+
2042
+ type MessageHookOutcome = {
2043
+ outcome: 'handled';
2044
+ } | {
2045
+ outcome: 'continue';
2046
+ };
2047
+ interface MetaWhatsAppHooks {
2048
+ onMessageReceived?: (message: WhatsAppMessage, session: ConversationSession) => Promise<MessageHookOutcome>;
2049
+ onStatusUpdate?: (status: WhatsAppStatus, session: ConversationSession | null) => Promise<void>;
2050
+ onSessionExpired?: (session: ConversationSession) => Promise<void>;
2051
+ onHumanRequested?: (session: ConversationSession) => Promise<void>;
2052
+ }
2053
+
2054
+ interface ChannelAdapterInterface {
2055
+ sendText(to: string, body: string): Promise<{
2056
+ externalMessageId: string | null;
2057
+ }>;
2058
+ sendMedia(params: {
2059
+ to: string;
2060
+ buffer: Buffer;
2061
+ mimeType: string;
2062
+ filename: string;
2063
+ caption?: string;
2064
+ }): Promise<{
2065
+ externalMessageId: string | null;
2066
+ }>;
2067
+ sendTemplate(params: {
2068
+ to: string;
2069
+ templateName: string;
2070
+ languageCode: string;
2071
+ bodyParameters?: string[];
2072
+ }): Promise<{
2073
+ externalMessageId: string | null;
2074
+ }>;
2075
+ sendInteractiveList(params: {
2076
+ to: string;
2077
+ body: string;
2078
+ buttonLabel: string;
2079
+ rows: {
2080
+ id: string;
2081
+ title: string;
2082
+ }[];
2083
+ }): Promise<{
2084
+ externalMessageId: string | null;
2085
+ }>;
2086
+ fetchMediaAsBase64(mediaId: string): Promise<{
2087
+ data: string;
2088
+ mimeType: string;
2089
+ }>;
2090
+ }
2091
+ interface SubjectResolverInterface {
2092
+ resolve(whatsappNumber: string): Promise<{
2093
+ displayName?: string;
2094
+ companyId: string;
2095
+ } | null>;
2096
+ }
2097
+ interface CatalogProduct {
2098
+ retailerId: string;
2099
+ name: string;
2100
+ priceInCents: number;
2101
+ currency: string;
2102
+ imageUrl?: string;
2103
+ availability: 'in stock' | 'out of stock';
2104
+ }
2105
+ interface CatalogPort {
2106
+ listProducts(params: {
2107
+ catalogId: string;
2108
+ search?: string;
2109
+ }): Promise<CatalogProduct[]>;
2110
+ findProductByRetailerId(retailerId: string): Promise<CatalogProduct | undefined>;
2111
+ consumeInventory(params: {
2112
+ retailerId: string;
2113
+ quantity: number;
2114
+ }): Promise<void>;
2115
+ }
2116
+ interface ObjectStorageInterface {
2117
+ upload(params: {
2118
+ buffer: Buffer;
2119
+ mimeType: string;
2120
+ key: string;
2121
+ }): Promise<{
2122
+ uploadId: string;
2123
+ }>;
2124
+ getDownloadUrl(uploadId: string, expiresInSeconds?: number): Promise<string>;
2125
+ }
2126
+ interface RealtimeNotifierInterface {
2127
+ emit(channel: string, event: string, payload: Record<string, unknown>): void;
2128
+ }
2129
+ type FlowActionResult = {
2130
+ next?: string;
2131
+ context?: Record<string, unknown>;
2132
+ };
2133
+ type FlowActionHandler = (params: {
2134
+ node: FlowNodeData;
2135
+ session: ConversationSession;
2136
+ channel: ChannelAdapterInterface;
2137
+ context: Record<string, unknown>;
2138
+ }) => Promise<FlowActionResult | void>;
2139
+ interface FlowActionRegistry {
2140
+ registerFlowAction(kind: FlowActionKind, handler: FlowActionHandler): void;
2141
+ }
2142
+
2143
+ declare class MetaWhatsAppError extends Error {
2144
+ readonly statusCode: number;
2145
+ readonly code: string;
2146
+ readonly details?: Record<string, unknown>;
2147
+ constructor(message: string, statusCode: number, code: string, details?: Record<string, unknown>);
2148
+ }
2149
+ declare const META_WHATSAPP_ERROR_CODES: {
2150
+ readonly WINDOW_EXPIRED: "META_WHATSAPP_WINDOW_EXPIRED";
2151
+ readonly INVALID_SIGNATURE: "META_WHATSAPP_INVALID_SIGNATURE";
2152
+ readonly DUPLICATE_DELIVERY: "META_WHATSAPP_DUPLICATE_DELIVERY";
2153
+ readonly CONFIG_MISSING: "META_WHATSAPP_CONFIG_MISSING";
2154
+ readonly TEMPLATE_NOT_CONFIGURED: "META_WHATSAPP_TEMPLATE_NOT_CONFIGURED";
2155
+ readonly SESSION_NOT_FOUND: "META_WHATSAPP_SESSION_NOT_FOUND";
2156
+ };
2157
+ declare class WindowExpiredError extends MetaWhatsAppError {
2158
+ readonly hoursSinceLastMessage?: number;
2159
+ constructor(hoursSinceLastMessage?: number);
2160
+ }
2161
+ declare class InvalidWebhookSignatureError extends MetaWhatsAppError {
2162
+ constructor();
2163
+ }
2164
+ declare class DuplicateWebhookDeliveryError extends MetaWhatsAppError {
2165
+ constructor(nonce: string);
2166
+ }
2167
+ declare class ConfigMissingError extends MetaWhatsAppError {
2168
+ constructor(missingField: string);
2169
+ }
2170
+ declare class TemplateNotConfiguredError extends MetaWhatsAppError {
2171
+ constructor();
2172
+ }
2173
+ declare class SessionNotFoundError extends MetaWhatsAppError {
2174
+ constructor(whatsappNumber: string);
2175
+ }
2176
+
2177
+ export { CROSS_FLOW_PREFIX, type CatalogPort, type CatalogProduct, type ChannelAdapterInterface, ConfigMissingError, type ConversationMessage, type ConversationSession, type ConversationSummary, type CreateTemplateResult, DuplicateWebhookDeliveryError, type FlowActionHandler, type FlowActionKind, type FlowActionRegistry, type FlowActionResult, type FlowConditionOperator, type FlowGraphData, type FlowGraphSummary, type FlowNodeData, type FlowNodeNext, type FlowNodeType, type FlowQuestionType, InvalidWebhookSignatureError, type ListConversationsParams, type ListMessagesParams, type LiveFlowPosition, META_WHATSAPP_ERROR_CODES, type MessageDirection, type MessageHookOutcome, type MessageSender, type MessageStatus, MetaWhatsAppError, type MetaWhatsAppHooks, type ObjectStorageInterface, type RealtimeNotifierInterface, type SessionMode, SessionNotFoundError, type SessionState, type SubjectResolverInterface, type TemplateConfig, TemplateNotConfiguredError, type TemplateVariablesMap, type WhatsAppInteractive, type WhatsAppMedia, type WhatsAppMessage, type WhatsAppMessageEcho, type WhatsAppMessageStatusValue, type WhatsAppOrder, type WhatsAppSettings, type WhatsAppStatus, type WhatsAppTemplateSummary, type WhatsAppWebhookPayload, WindowExpiredError, crossFlowKey, flowGraphNodesSchema, flowNodeDataSchema, flowNodeNextSchema, isCrossFlowTarget, whatsAppInteractiveSchema, whatsAppMediaSchema, whatsAppMessageEchoSchema, whatsAppMessageSchema, whatsAppMessageStatusSchema, whatsAppOrderSchema, whatsAppStatusSchema, whatsAppWebhookPayloadSchema };