@adatechnology/meta-whatsapp-contracts 0.4.0 → 0.5.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.
@@ -537,21 +537,116 @@ declare const whatsAppMessageEchoSchema: z.ZodObject<{
537
537
  type WhatsAppMessageEcho = z.infer<typeof whatsAppMessageEchoSchema>;
538
538
  declare const whatsAppMessageStatusSchema: z.ZodEnum<["sent", "delivered", "read", "failed"]>;
539
539
  type WhatsAppMessageStatusValue = z.infer<typeof whatsAppMessageStatusSchema>;
540
+ /**
541
+ * Por que a Meta recusou a entrega. Só existe no webhook de status, e só quando `status` é
542
+ * `failed`.
543
+ *
544
+ * `code` é o que decide: 131030 é número fora da allowlist do ambiente de teste, 131047 é janela
545
+ * de 24h vencida, 130497 é conta barrada de mandar mensagem para o país. São três causas sem nada
546
+ * em comum — allowlist, tempo e restrição de conta — e todas chegam ao cliente como a mesma
547
+ * ausência de resposta. Sem o código, distinguir uma da outra custa uma investigação inteira.
548
+ */
549
+ declare const whatsAppStatusErrorSchema: z.ZodObject<{
550
+ code: z.ZodOptional<z.ZodNumber>;
551
+ title: z.ZodOptional<z.ZodString>;
552
+ message: z.ZodOptional<z.ZodString>;
553
+ href: z.ZodOptional<z.ZodString>;
554
+ error_data: z.ZodOptional<z.ZodObject<{
555
+ details: z.ZodOptional<z.ZodString>;
556
+ }, "strip", z.ZodTypeAny, {
557
+ details?: string | undefined;
558
+ }, {
559
+ details?: string | undefined;
560
+ }>>;
561
+ }, "strip", z.ZodTypeAny, {
562
+ code?: number | undefined;
563
+ message?: string | undefined;
564
+ title?: string | undefined;
565
+ href?: string | undefined;
566
+ error_data?: {
567
+ details?: string | undefined;
568
+ } | undefined;
569
+ }, {
570
+ code?: number | undefined;
571
+ message?: string | undefined;
572
+ title?: string | undefined;
573
+ href?: string | undefined;
574
+ error_data?: {
575
+ details?: string | undefined;
576
+ } | undefined;
577
+ }>;
578
+ type WhatsAppStatusError = z.infer<typeof whatsAppStatusErrorSchema>;
579
+ /**
580
+ * `errors` entra no schema porque `z.object` descarta o que não declara: enquanto o campo não
581
+ * existia aqui, o motivo da recusa era apagado na validação e nunca chegava a `onStatusUpdate` —
582
+ * o hook era chamado, mas com o único dado que importa já removido. Quem precisava do motivo
583
+ * tinha de reprocessar o corpo cru do webhook por fora do módulo.
584
+ *
585
+ * Tolerante de propósito: campo que a Meta parar de mandar não pode derrubar a validação do
586
+ * webhook inteiro, porque isso troca um envio sem explicação por todos os eventos perdidos.
587
+ */
540
588
  declare const whatsAppStatusSchema: z.ZodObject<{
541
589
  id: z.ZodString;
542
590
  status: z.ZodEnum<["sent", "delivered", "read", "failed"]>;
543
591
  timestamp: z.ZodString;
544
592
  recipient_id: z.ZodOptional<z.ZodString>;
593
+ errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
594
+ code: z.ZodOptional<z.ZodNumber>;
595
+ title: z.ZodOptional<z.ZodString>;
596
+ message: z.ZodOptional<z.ZodString>;
597
+ href: z.ZodOptional<z.ZodString>;
598
+ error_data: z.ZodOptional<z.ZodObject<{
599
+ details: z.ZodOptional<z.ZodString>;
600
+ }, "strip", z.ZodTypeAny, {
601
+ details?: string | undefined;
602
+ }, {
603
+ details?: string | undefined;
604
+ }>>;
605
+ }, "strip", z.ZodTypeAny, {
606
+ code?: number | undefined;
607
+ message?: string | undefined;
608
+ title?: string | undefined;
609
+ href?: string | undefined;
610
+ error_data?: {
611
+ details?: string | undefined;
612
+ } | undefined;
613
+ }, {
614
+ code?: number | undefined;
615
+ message?: string | undefined;
616
+ title?: string | undefined;
617
+ href?: string | undefined;
618
+ error_data?: {
619
+ details?: string | undefined;
620
+ } | undefined;
621
+ }>, "many">>;
545
622
  }, "strip", z.ZodTypeAny, {
546
623
  id: string;
547
624
  status: "sent" | "delivered" | "read" | "failed";
548
625
  timestamp: string;
549
626
  recipient_id?: string | undefined;
627
+ errors?: {
628
+ code?: number | undefined;
629
+ message?: string | undefined;
630
+ title?: string | undefined;
631
+ href?: string | undefined;
632
+ error_data?: {
633
+ details?: string | undefined;
634
+ } | undefined;
635
+ }[] | undefined;
550
636
  }, {
551
637
  id: string;
552
638
  status: "sent" | "delivered" | "read" | "failed";
553
639
  timestamp: string;
554
640
  recipient_id?: string | undefined;
641
+ errors?: {
642
+ code?: number | undefined;
643
+ message?: string | undefined;
644
+ title?: string | undefined;
645
+ href?: string | undefined;
646
+ error_data?: {
647
+ details?: string | undefined;
648
+ } | undefined;
649
+ }[] | undefined;
555
650
  }>;
556
651
  type WhatsAppStatus = z.infer<typeof whatsAppStatusSchema>;
557
652
  declare const WHATSAPP_WEBHOOK_FIELDS: {
@@ -1070,16 +1165,63 @@ declare const whatsAppWebhookValueSchema: z.ZodObject<{
1070
1165
  status: z.ZodEnum<["sent", "delivered", "read", "failed"]>;
1071
1166
  timestamp: z.ZodString;
1072
1167
  recipient_id: z.ZodOptional<z.ZodString>;
1168
+ errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
1169
+ code: z.ZodOptional<z.ZodNumber>;
1170
+ title: z.ZodOptional<z.ZodString>;
1171
+ message: z.ZodOptional<z.ZodString>;
1172
+ href: z.ZodOptional<z.ZodString>;
1173
+ error_data: z.ZodOptional<z.ZodObject<{
1174
+ details: z.ZodOptional<z.ZodString>;
1175
+ }, "strip", z.ZodTypeAny, {
1176
+ details?: string | undefined;
1177
+ }, {
1178
+ details?: string | undefined;
1179
+ }>>;
1180
+ }, "strip", z.ZodTypeAny, {
1181
+ code?: number | undefined;
1182
+ message?: string | undefined;
1183
+ title?: string | undefined;
1184
+ href?: string | undefined;
1185
+ error_data?: {
1186
+ details?: string | undefined;
1187
+ } | undefined;
1188
+ }, {
1189
+ code?: number | undefined;
1190
+ message?: string | undefined;
1191
+ title?: string | undefined;
1192
+ href?: string | undefined;
1193
+ error_data?: {
1194
+ details?: string | undefined;
1195
+ } | undefined;
1196
+ }>, "many">>;
1073
1197
  }, "strip", z.ZodTypeAny, {
1074
1198
  id: string;
1075
1199
  status: "sent" | "delivered" | "read" | "failed";
1076
1200
  timestamp: string;
1077
1201
  recipient_id?: string | undefined;
1202
+ errors?: {
1203
+ code?: number | undefined;
1204
+ message?: string | undefined;
1205
+ title?: string | undefined;
1206
+ href?: string | undefined;
1207
+ error_data?: {
1208
+ details?: string | undefined;
1209
+ } | undefined;
1210
+ }[] | undefined;
1078
1211
  }, {
1079
1212
  id: string;
1080
1213
  status: "sent" | "delivered" | "read" | "failed";
1081
1214
  timestamp: string;
1082
1215
  recipient_id?: string | undefined;
1216
+ errors?: {
1217
+ code?: number | undefined;
1218
+ message?: string | undefined;
1219
+ title?: string | undefined;
1220
+ href?: string | undefined;
1221
+ error_data?: {
1222
+ details?: string | undefined;
1223
+ } | undefined;
1224
+ }[] | undefined;
1083
1225
  }>, "many">>;
1084
1226
  metadata: z.ZodOptional<z.ZodObject<{
1085
1227
  display_phone_number: z.ZodString;
@@ -1528,16 +1670,63 @@ declare const whatsAppWebhookValueSchema: z.ZodObject<{
1528
1670
  status: z.ZodEnum<["sent", "delivered", "read", "failed"]>;
1529
1671
  timestamp: z.ZodString;
1530
1672
  recipient_id: z.ZodOptional<z.ZodString>;
1673
+ errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
1674
+ code: z.ZodOptional<z.ZodNumber>;
1675
+ title: z.ZodOptional<z.ZodString>;
1676
+ message: z.ZodOptional<z.ZodString>;
1677
+ href: z.ZodOptional<z.ZodString>;
1678
+ error_data: z.ZodOptional<z.ZodObject<{
1679
+ details: z.ZodOptional<z.ZodString>;
1680
+ }, "strip", z.ZodTypeAny, {
1681
+ details?: string | undefined;
1682
+ }, {
1683
+ details?: string | undefined;
1684
+ }>>;
1685
+ }, "strip", z.ZodTypeAny, {
1686
+ code?: number | undefined;
1687
+ message?: string | undefined;
1688
+ title?: string | undefined;
1689
+ href?: string | undefined;
1690
+ error_data?: {
1691
+ details?: string | undefined;
1692
+ } | undefined;
1693
+ }, {
1694
+ code?: number | undefined;
1695
+ message?: string | undefined;
1696
+ title?: string | undefined;
1697
+ href?: string | undefined;
1698
+ error_data?: {
1699
+ details?: string | undefined;
1700
+ } | undefined;
1701
+ }>, "many">>;
1531
1702
  }, "strip", z.ZodTypeAny, {
1532
1703
  id: string;
1533
1704
  status: "sent" | "delivered" | "read" | "failed";
1534
1705
  timestamp: string;
1535
1706
  recipient_id?: string | undefined;
1707
+ errors?: {
1708
+ code?: number | undefined;
1709
+ message?: string | undefined;
1710
+ title?: string | undefined;
1711
+ href?: string | undefined;
1712
+ error_data?: {
1713
+ details?: string | undefined;
1714
+ } | undefined;
1715
+ }[] | undefined;
1536
1716
  }, {
1537
1717
  id: string;
1538
1718
  status: "sent" | "delivered" | "read" | "failed";
1539
1719
  timestamp: string;
1540
1720
  recipient_id?: string | undefined;
1721
+ errors?: {
1722
+ code?: number | undefined;
1723
+ message?: string | undefined;
1724
+ title?: string | undefined;
1725
+ href?: string | undefined;
1726
+ error_data?: {
1727
+ details?: string | undefined;
1728
+ } | undefined;
1729
+ }[] | undefined;
1541
1730
  }>, "many">>;
1542
1731
  metadata: z.ZodOptional<z.ZodObject<{
1543
1732
  display_phone_number: z.ZodString;
@@ -1986,16 +2175,63 @@ declare const whatsAppWebhookValueSchema: z.ZodObject<{
1986
2175
  status: z.ZodEnum<["sent", "delivered", "read", "failed"]>;
1987
2176
  timestamp: z.ZodString;
1988
2177
  recipient_id: z.ZodOptional<z.ZodString>;
2178
+ errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
2179
+ code: z.ZodOptional<z.ZodNumber>;
2180
+ title: z.ZodOptional<z.ZodString>;
2181
+ message: z.ZodOptional<z.ZodString>;
2182
+ href: z.ZodOptional<z.ZodString>;
2183
+ error_data: z.ZodOptional<z.ZodObject<{
2184
+ details: z.ZodOptional<z.ZodString>;
2185
+ }, "strip", z.ZodTypeAny, {
2186
+ details?: string | undefined;
2187
+ }, {
2188
+ details?: string | undefined;
2189
+ }>>;
2190
+ }, "strip", z.ZodTypeAny, {
2191
+ code?: number | undefined;
2192
+ message?: string | undefined;
2193
+ title?: string | undefined;
2194
+ href?: string | undefined;
2195
+ error_data?: {
2196
+ details?: string | undefined;
2197
+ } | undefined;
2198
+ }, {
2199
+ code?: number | undefined;
2200
+ message?: string | undefined;
2201
+ title?: string | undefined;
2202
+ href?: string | undefined;
2203
+ error_data?: {
2204
+ details?: string | undefined;
2205
+ } | undefined;
2206
+ }>, "many">>;
1989
2207
  }, "strip", z.ZodTypeAny, {
1990
2208
  id: string;
1991
2209
  status: "sent" | "delivered" | "read" | "failed";
1992
2210
  timestamp: string;
1993
2211
  recipient_id?: string | undefined;
2212
+ errors?: {
2213
+ code?: number | undefined;
2214
+ message?: string | undefined;
2215
+ title?: string | undefined;
2216
+ href?: string | undefined;
2217
+ error_data?: {
2218
+ details?: string | undefined;
2219
+ } | undefined;
2220
+ }[] | undefined;
1994
2221
  }, {
1995
2222
  id: string;
1996
2223
  status: "sent" | "delivered" | "read" | "failed";
1997
2224
  timestamp: string;
1998
2225
  recipient_id?: string | undefined;
2226
+ errors?: {
2227
+ code?: number | undefined;
2228
+ message?: string | undefined;
2229
+ title?: string | undefined;
2230
+ href?: string | undefined;
2231
+ error_data?: {
2232
+ details?: string | undefined;
2233
+ } | undefined;
2234
+ }[] | undefined;
1999
2235
  }>, "many">>;
2000
2236
  metadata: z.ZodOptional<z.ZodObject<{
2001
2237
  display_phone_number: z.ZodString;
@@ -2448,16 +2684,63 @@ declare const whatsAppWebhookChangeSchema: z.ZodObject<{
2448
2684
  status: z.ZodEnum<["sent", "delivered", "read", "failed"]>;
2449
2685
  timestamp: z.ZodString;
2450
2686
  recipient_id: z.ZodOptional<z.ZodString>;
2687
+ errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
2688
+ code: z.ZodOptional<z.ZodNumber>;
2689
+ title: z.ZodOptional<z.ZodString>;
2690
+ message: z.ZodOptional<z.ZodString>;
2691
+ href: z.ZodOptional<z.ZodString>;
2692
+ error_data: z.ZodOptional<z.ZodObject<{
2693
+ details: z.ZodOptional<z.ZodString>;
2694
+ }, "strip", z.ZodTypeAny, {
2695
+ details?: string | undefined;
2696
+ }, {
2697
+ details?: string | undefined;
2698
+ }>>;
2699
+ }, "strip", z.ZodTypeAny, {
2700
+ code?: number | undefined;
2701
+ message?: string | undefined;
2702
+ title?: string | undefined;
2703
+ href?: string | undefined;
2704
+ error_data?: {
2705
+ details?: string | undefined;
2706
+ } | undefined;
2707
+ }, {
2708
+ code?: number | undefined;
2709
+ message?: string | undefined;
2710
+ title?: string | undefined;
2711
+ href?: string | undefined;
2712
+ error_data?: {
2713
+ details?: string | undefined;
2714
+ } | undefined;
2715
+ }>, "many">>;
2451
2716
  }, "strip", z.ZodTypeAny, {
2452
2717
  id: string;
2453
2718
  status: "sent" | "delivered" | "read" | "failed";
2454
2719
  timestamp: string;
2455
2720
  recipient_id?: string | undefined;
2721
+ errors?: {
2722
+ code?: number | undefined;
2723
+ message?: string | undefined;
2724
+ title?: string | undefined;
2725
+ href?: string | undefined;
2726
+ error_data?: {
2727
+ details?: string | undefined;
2728
+ } | undefined;
2729
+ }[] | undefined;
2456
2730
  }, {
2457
2731
  id: string;
2458
2732
  status: "sent" | "delivered" | "read" | "failed";
2459
2733
  timestamp: string;
2460
2734
  recipient_id?: string | undefined;
2735
+ errors?: {
2736
+ code?: number | undefined;
2737
+ message?: string | undefined;
2738
+ title?: string | undefined;
2739
+ href?: string | undefined;
2740
+ error_data?: {
2741
+ details?: string | undefined;
2742
+ } | undefined;
2743
+ }[] | undefined;
2461
2744
  }>, "many">>;
2462
2745
  metadata: z.ZodOptional<z.ZodObject<{
2463
2746
  display_phone_number: z.ZodString;
@@ -2906,16 +3189,63 @@ declare const whatsAppWebhookChangeSchema: z.ZodObject<{
2906
3189
  status: z.ZodEnum<["sent", "delivered", "read", "failed"]>;
2907
3190
  timestamp: z.ZodString;
2908
3191
  recipient_id: z.ZodOptional<z.ZodString>;
3192
+ errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
3193
+ code: z.ZodOptional<z.ZodNumber>;
3194
+ title: z.ZodOptional<z.ZodString>;
3195
+ message: z.ZodOptional<z.ZodString>;
3196
+ href: z.ZodOptional<z.ZodString>;
3197
+ error_data: z.ZodOptional<z.ZodObject<{
3198
+ details: z.ZodOptional<z.ZodString>;
3199
+ }, "strip", z.ZodTypeAny, {
3200
+ details?: string | undefined;
3201
+ }, {
3202
+ details?: string | undefined;
3203
+ }>>;
3204
+ }, "strip", z.ZodTypeAny, {
3205
+ code?: number | undefined;
3206
+ message?: string | undefined;
3207
+ title?: string | undefined;
3208
+ href?: string | undefined;
3209
+ error_data?: {
3210
+ details?: string | undefined;
3211
+ } | undefined;
3212
+ }, {
3213
+ code?: number | undefined;
3214
+ message?: string | undefined;
3215
+ title?: string | undefined;
3216
+ href?: string | undefined;
3217
+ error_data?: {
3218
+ details?: string | undefined;
3219
+ } | undefined;
3220
+ }>, "many">>;
2909
3221
  }, "strip", z.ZodTypeAny, {
2910
3222
  id: string;
2911
3223
  status: "sent" | "delivered" | "read" | "failed";
2912
3224
  timestamp: string;
2913
3225
  recipient_id?: string | undefined;
3226
+ errors?: {
3227
+ code?: number | undefined;
3228
+ message?: string | undefined;
3229
+ title?: string | undefined;
3230
+ href?: string | undefined;
3231
+ error_data?: {
3232
+ details?: string | undefined;
3233
+ } | undefined;
3234
+ }[] | undefined;
2914
3235
  }, {
2915
3236
  id: string;
2916
3237
  status: "sent" | "delivered" | "read" | "failed";
2917
3238
  timestamp: string;
2918
3239
  recipient_id?: string | undefined;
3240
+ errors?: {
3241
+ code?: number | undefined;
3242
+ message?: string | undefined;
3243
+ title?: string | undefined;
3244
+ href?: string | undefined;
3245
+ error_data?: {
3246
+ details?: string | undefined;
3247
+ } | undefined;
3248
+ }[] | undefined;
2919
3249
  }>, "many">>;
2920
3250
  metadata: z.ZodOptional<z.ZodObject<{
2921
3251
  display_phone_number: z.ZodString;
@@ -3364,16 +3694,63 @@ declare const whatsAppWebhookChangeSchema: z.ZodObject<{
3364
3694
  status: z.ZodEnum<["sent", "delivered", "read", "failed"]>;
3365
3695
  timestamp: z.ZodString;
3366
3696
  recipient_id: z.ZodOptional<z.ZodString>;
3697
+ errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
3698
+ code: z.ZodOptional<z.ZodNumber>;
3699
+ title: z.ZodOptional<z.ZodString>;
3700
+ message: z.ZodOptional<z.ZodString>;
3701
+ href: z.ZodOptional<z.ZodString>;
3702
+ error_data: z.ZodOptional<z.ZodObject<{
3703
+ details: z.ZodOptional<z.ZodString>;
3704
+ }, "strip", z.ZodTypeAny, {
3705
+ details?: string | undefined;
3706
+ }, {
3707
+ details?: string | undefined;
3708
+ }>>;
3709
+ }, "strip", z.ZodTypeAny, {
3710
+ code?: number | undefined;
3711
+ message?: string | undefined;
3712
+ title?: string | undefined;
3713
+ href?: string | undefined;
3714
+ error_data?: {
3715
+ details?: string | undefined;
3716
+ } | undefined;
3717
+ }, {
3718
+ code?: number | undefined;
3719
+ message?: string | undefined;
3720
+ title?: string | undefined;
3721
+ href?: string | undefined;
3722
+ error_data?: {
3723
+ details?: string | undefined;
3724
+ } | undefined;
3725
+ }>, "many">>;
3367
3726
  }, "strip", z.ZodTypeAny, {
3368
3727
  id: string;
3369
3728
  status: "sent" | "delivered" | "read" | "failed";
3370
3729
  timestamp: string;
3371
3730
  recipient_id?: string | undefined;
3731
+ errors?: {
3732
+ code?: number | undefined;
3733
+ message?: string | undefined;
3734
+ title?: string | undefined;
3735
+ href?: string | undefined;
3736
+ error_data?: {
3737
+ details?: string | undefined;
3738
+ } | undefined;
3739
+ }[] | undefined;
3372
3740
  }, {
3373
3741
  id: string;
3374
3742
  status: "sent" | "delivered" | "read" | "failed";
3375
3743
  timestamp: string;
3376
3744
  recipient_id?: string | undefined;
3745
+ errors?: {
3746
+ code?: number | undefined;
3747
+ message?: string | undefined;
3748
+ title?: string | undefined;
3749
+ href?: string | undefined;
3750
+ error_data?: {
3751
+ details?: string | undefined;
3752
+ } | undefined;
3753
+ }[] | undefined;
3377
3754
  }>, "many">>;
3378
3755
  metadata: z.ZodOptional<z.ZodObject<{
3379
3756
  display_phone_number: z.ZodString;
@@ -3486,6 +3863,15 @@ declare const whatsAppWebhookChangeSchema: z.ZodObject<{
3486
3863
  status: "sent" | "delivered" | "read" | "failed";
3487
3864
  timestamp: string;
3488
3865
  recipient_id?: string | undefined;
3866
+ errors?: {
3867
+ code?: number | undefined;
3868
+ message?: string | undefined;
3869
+ title?: string | undefined;
3870
+ href?: string | undefined;
3871
+ error_data?: {
3872
+ details?: string | undefined;
3873
+ } | undefined;
3874
+ }[] | undefined;
3489
3875
  }[] | undefined;
3490
3876
  metadata?: {
3491
3877
  display_phone_number: string;
@@ -3595,6 +3981,15 @@ declare const whatsAppWebhookChangeSchema: z.ZodObject<{
3595
3981
  status: "sent" | "delivered" | "read" | "failed";
3596
3982
  timestamp: string;
3597
3983
  recipient_id?: string | undefined;
3984
+ errors?: {
3985
+ code?: number | undefined;
3986
+ message?: string | undefined;
3987
+ title?: string | undefined;
3988
+ href?: string | undefined;
3989
+ error_data?: {
3990
+ details?: string | undefined;
3991
+ } | undefined;
3992
+ }[] | undefined;
3598
3993
  }[] | undefined;
3599
3994
  metadata?: {
3600
3995
  display_phone_number: string;
@@ -4049,16 +4444,63 @@ declare const whatsAppWebhookPayloadSchema: z.ZodObject<{
4049
4444
  status: z.ZodEnum<["sent", "delivered", "read", "failed"]>;
4050
4445
  timestamp: z.ZodString;
4051
4446
  recipient_id: z.ZodOptional<z.ZodString>;
4447
+ errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
4448
+ code: z.ZodOptional<z.ZodNumber>;
4449
+ title: z.ZodOptional<z.ZodString>;
4450
+ message: z.ZodOptional<z.ZodString>;
4451
+ href: z.ZodOptional<z.ZodString>;
4452
+ error_data: z.ZodOptional<z.ZodObject<{
4453
+ details: z.ZodOptional<z.ZodString>;
4454
+ }, "strip", z.ZodTypeAny, {
4455
+ details?: string | undefined;
4456
+ }, {
4457
+ details?: string | undefined;
4458
+ }>>;
4459
+ }, "strip", z.ZodTypeAny, {
4460
+ code?: number | undefined;
4461
+ message?: string | undefined;
4462
+ title?: string | undefined;
4463
+ href?: string | undefined;
4464
+ error_data?: {
4465
+ details?: string | undefined;
4466
+ } | undefined;
4467
+ }, {
4468
+ code?: number | undefined;
4469
+ message?: string | undefined;
4470
+ title?: string | undefined;
4471
+ href?: string | undefined;
4472
+ error_data?: {
4473
+ details?: string | undefined;
4474
+ } | undefined;
4475
+ }>, "many">>;
4052
4476
  }, "strip", z.ZodTypeAny, {
4053
4477
  id: string;
4054
4478
  status: "sent" | "delivered" | "read" | "failed";
4055
4479
  timestamp: string;
4056
4480
  recipient_id?: string | undefined;
4481
+ errors?: {
4482
+ code?: number | undefined;
4483
+ message?: string | undefined;
4484
+ title?: string | undefined;
4485
+ href?: string | undefined;
4486
+ error_data?: {
4487
+ details?: string | undefined;
4488
+ } | undefined;
4489
+ }[] | undefined;
4057
4490
  }, {
4058
4491
  id: string;
4059
4492
  status: "sent" | "delivered" | "read" | "failed";
4060
4493
  timestamp: string;
4061
4494
  recipient_id?: string | undefined;
4495
+ errors?: {
4496
+ code?: number | undefined;
4497
+ message?: string | undefined;
4498
+ title?: string | undefined;
4499
+ href?: string | undefined;
4500
+ error_data?: {
4501
+ details?: string | undefined;
4502
+ } | undefined;
4503
+ }[] | undefined;
4062
4504
  }>, "many">>;
4063
4505
  metadata: z.ZodOptional<z.ZodObject<{
4064
4506
  display_phone_number: z.ZodString;
@@ -4507,16 +4949,63 @@ declare const whatsAppWebhookPayloadSchema: z.ZodObject<{
4507
4949
  status: z.ZodEnum<["sent", "delivered", "read", "failed"]>;
4508
4950
  timestamp: z.ZodString;
4509
4951
  recipient_id: z.ZodOptional<z.ZodString>;
4952
+ errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
4953
+ code: z.ZodOptional<z.ZodNumber>;
4954
+ title: z.ZodOptional<z.ZodString>;
4955
+ message: z.ZodOptional<z.ZodString>;
4956
+ href: z.ZodOptional<z.ZodString>;
4957
+ error_data: z.ZodOptional<z.ZodObject<{
4958
+ details: z.ZodOptional<z.ZodString>;
4959
+ }, "strip", z.ZodTypeAny, {
4960
+ details?: string | undefined;
4961
+ }, {
4962
+ details?: string | undefined;
4963
+ }>>;
4964
+ }, "strip", z.ZodTypeAny, {
4965
+ code?: number | undefined;
4966
+ message?: string | undefined;
4967
+ title?: string | undefined;
4968
+ href?: string | undefined;
4969
+ error_data?: {
4970
+ details?: string | undefined;
4971
+ } | undefined;
4972
+ }, {
4973
+ code?: number | undefined;
4974
+ message?: string | undefined;
4975
+ title?: string | undefined;
4976
+ href?: string | undefined;
4977
+ error_data?: {
4978
+ details?: string | undefined;
4979
+ } | undefined;
4980
+ }>, "many">>;
4510
4981
  }, "strip", z.ZodTypeAny, {
4511
4982
  id: string;
4512
4983
  status: "sent" | "delivered" | "read" | "failed";
4513
4984
  timestamp: string;
4514
4985
  recipient_id?: string | undefined;
4986
+ errors?: {
4987
+ code?: number | undefined;
4988
+ message?: string | undefined;
4989
+ title?: string | undefined;
4990
+ href?: string | undefined;
4991
+ error_data?: {
4992
+ details?: string | undefined;
4993
+ } | undefined;
4994
+ }[] | undefined;
4515
4995
  }, {
4516
4996
  id: string;
4517
4997
  status: "sent" | "delivered" | "read" | "failed";
4518
4998
  timestamp: string;
4519
4999
  recipient_id?: string | undefined;
5000
+ errors?: {
5001
+ code?: number | undefined;
5002
+ message?: string | undefined;
5003
+ title?: string | undefined;
5004
+ href?: string | undefined;
5005
+ error_data?: {
5006
+ details?: string | undefined;
5007
+ } | undefined;
5008
+ }[] | undefined;
4520
5009
  }>, "many">>;
4521
5010
  metadata: z.ZodOptional<z.ZodObject<{
4522
5011
  display_phone_number: z.ZodString;
@@ -4965,16 +5454,63 @@ declare const whatsAppWebhookPayloadSchema: z.ZodObject<{
4965
5454
  status: z.ZodEnum<["sent", "delivered", "read", "failed"]>;
4966
5455
  timestamp: z.ZodString;
4967
5456
  recipient_id: z.ZodOptional<z.ZodString>;
5457
+ errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
5458
+ code: z.ZodOptional<z.ZodNumber>;
5459
+ title: z.ZodOptional<z.ZodString>;
5460
+ message: z.ZodOptional<z.ZodString>;
5461
+ href: z.ZodOptional<z.ZodString>;
5462
+ error_data: z.ZodOptional<z.ZodObject<{
5463
+ details: z.ZodOptional<z.ZodString>;
5464
+ }, "strip", z.ZodTypeAny, {
5465
+ details?: string | undefined;
5466
+ }, {
5467
+ details?: string | undefined;
5468
+ }>>;
5469
+ }, "strip", z.ZodTypeAny, {
5470
+ code?: number | undefined;
5471
+ message?: string | undefined;
5472
+ title?: string | undefined;
5473
+ href?: string | undefined;
5474
+ error_data?: {
5475
+ details?: string | undefined;
5476
+ } | undefined;
5477
+ }, {
5478
+ code?: number | undefined;
5479
+ message?: string | undefined;
5480
+ title?: string | undefined;
5481
+ href?: string | undefined;
5482
+ error_data?: {
5483
+ details?: string | undefined;
5484
+ } | undefined;
5485
+ }>, "many">>;
4968
5486
  }, "strip", z.ZodTypeAny, {
4969
5487
  id: string;
4970
5488
  status: "sent" | "delivered" | "read" | "failed";
4971
5489
  timestamp: string;
4972
5490
  recipient_id?: string | undefined;
5491
+ errors?: {
5492
+ code?: number | undefined;
5493
+ message?: string | undefined;
5494
+ title?: string | undefined;
5495
+ href?: string | undefined;
5496
+ error_data?: {
5497
+ details?: string | undefined;
5498
+ } | undefined;
5499
+ }[] | undefined;
4973
5500
  }, {
4974
5501
  id: string;
4975
5502
  status: "sent" | "delivered" | "read" | "failed";
4976
5503
  timestamp: string;
4977
5504
  recipient_id?: string | undefined;
5505
+ errors?: {
5506
+ code?: number | undefined;
5507
+ message?: string | undefined;
5508
+ title?: string | undefined;
5509
+ href?: string | undefined;
5510
+ error_data?: {
5511
+ details?: string | undefined;
5512
+ } | undefined;
5513
+ }[] | undefined;
4978
5514
  }>, "many">>;
4979
5515
  metadata: z.ZodOptional<z.ZodObject<{
4980
5516
  display_phone_number: z.ZodString;
@@ -5087,6 +5623,15 @@ declare const whatsAppWebhookPayloadSchema: z.ZodObject<{
5087
5623
  status: "sent" | "delivered" | "read" | "failed";
5088
5624
  timestamp: string;
5089
5625
  recipient_id?: string | undefined;
5626
+ errors?: {
5627
+ code?: number | undefined;
5628
+ message?: string | undefined;
5629
+ title?: string | undefined;
5630
+ href?: string | undefined;
5631
+ error_data?: {
5632
+ details?: string | undefined;
5633
+ } | undefined;
5634
+ }[] | undefined;
5090
5635
  }[] | undefined;
5091
5636
  metadata?: {
5092
5637
  display_phone_number: string;
@@ -5196,6 +5741,15 @@ declare const whatsAppWebhookPayloadSchema: z.ZodObject<{
5196
5741
  status: "sent" | "delivered" | "read" | "failed";
5197
5742
  timestamp: string;
5198
5743
  recipient_id?: string | undefined;
5744
+ errors?: {
5745
+ code?: number | undefined;
5746
+ message?: string | undefined;
5747
+ title?: string | undefined;
5748
+ href?: string | undefined;
5749
+ error_data?: {
5750
+ details?: string | undefined;
5751
+ } | undefined;
5752
+ }[] | undefined;
5199
5753
  }[] | undefined;
5200
5754
  metadata?: {
5201
5755
  display_phone_number: string;
@@ -5308,6 +5862,15 @@ declare const whatsAppWebhookPayloadSchema: z.ZodObject<{
5308
5862
  status: "sent" | "delivered" | "read" | "failed";
5309
5863
  timestamp: string;
5310
5864
  recipient_id?: string | undefined;
5865
+ errors?: {
5866
+ code?: number | undefined;
5867
+ message?: string | undefined;
5868
+ title?: string | undefined;
5869
+ href?: string | undefined;
5870
+ error_data?: {
5871
+ details?: string | undefined;
5872
+ } | undefined;
5873
+ }[] | undefined;
5311
5874
  }[] | undefined;
5312
5875
  metadata?: {
5313
5876
  display_phone_number: string;
@@ -5420,6 +5983,15 @@ declare const whatsAppWebhookPayloadSchema: z.ZodObject<{
5420
5983
  status: "sent" | "delivered" | "read" | "failed";
5421
5984
  timestamp: string;
5422
5985
  recipient_id?: string | undefined;
5986
+ errors?: {
5987
+ code?: number | undefined;
5988
+ message?: string | undefined;
5989
+ title?: string | undefined;
5990
+ href?: string | undefined;
5991
+ error_data?: {
5992
+ details?: string | undefined;
5993
+ } | undefined;
5994
+ }[] | undefined;
5423
5995
  }[] | undefined;
5424
5996
  metadata?: {
5425
5997
  display_phone_number: string;
@@ -5535,6 +6107,15 @@ declare const whatsAppWebhookPayloadSchema: z.ZodObject<{
5535
6107
  status: "sent" | "delivered" | "read" | "failed";
5536
6108
  timestamp: string;
5537
6109
  recipient_id?: string | undefined;
6110
+ errors?: {
6111
+ code?: number | undefined;
6112
+ message?: string | undefined;
6113
+ title?: string | undefined;
6114
+ href?: string | undefined;
6115
+ error_data?: {
6116
+ details?: string | undefined;
6117
+ } | undefined;
6118
+ }[] | undefined;
5538
6119
  }[] | undefined;
5539
6120
  metadata?: {
5540
6121
  display_phone_number: string;
@@ -5650,6 +6231,15 @@ declare const whatsAppWebhookPayloadSchema: z.ZodObject<{
5650
6231
  status: "sent" | "delivered" | "read" | "failed";
5651
6232
  timestamp: string;
5652
6233
  recipient_id?: string | undefined;
6234
+ errors?: {
6235
+ code?: number | undefined;
6236
+ message?: string | undefined;
6237
+ title?: string | undefined;
6238
+ href?: string | undefined;
6239
+ error_data?: {
6240
+ details?: string | undefined;
6241
+ } | undefined;
6242
+ }[] | undefined;
5653
6243
  }[] | undefined;
5654
6244
  metadata?: {
5655
6245
  display_phone_number: string;
@@ -5678,4 +6268,4 @@ declare function resolveContactProfileName(params: {
5678
6268
  readonly from: string;
5679
6269
  }): string | undefined;
5680
6270
 
5681
- export { whatsAppPhoneNumberQualityUpdateSchema as A, whatsAppQualityEventSchema as B, whatsAppStatusSchema as C, whatsAppTemplateStatusEventSchema as D, whatsAppTemplateStatusUpdateSchema as E, whatsAppWebhookChangeSchema as F, whatsAppWebhookPayloadSchema as G, whatsAppWebhookValueSchema as H, type WhatsAppMessage as W, type WhatsAppStatus as a, type WhatsAppTemplateStatusUpdate as b, type WhatsAppPhoneNumberQualityUpdate as c, WHATSAPP_WEBHOOK_FIELDS as d, type WhatsAppContact as e, type WhatsAppInteractive as f, type WhatsAppLocation as g, type WhatsAppMedia as h, type WhatsAppMessageEcho as i, type WhatsAppMessageStatusValue as j, type WhatsAppOrder as k, type WhatsAppQualityEvent as l, type WhatsAppTemplateStatusEvent as m, type WhatsAppWebhookChange as n, type WhatsAppWebhookField as o, type WhatsAppWebhookPayload as p, type WhatsAppWebhookValue as q, resolveContactProfileName as r, whatsAppInteractiveSchema as s, whatsAppLocationSchema as t, whatsAppMediaSchema as u, whatsAppMessageEchoSchema as v, whatsAppContactSchema as w, whatsAppMessageSchema as x, whatsAppMessageStatusSchema as y, whatsAppOrderSchema as z };
6271
+ export { whatsAppOrderSchema as A, whatsAppPhoneNumberQualityUpdateSchema as B, whatsAppQualityEventSchema as C, whatsAppStatusErrorSchema as D, whatsAppStatusSchema as E, whatsAppTemplateStatusEventSchema as F, whatsAppTemplateStatusUpdateSchema as G, whatsAppWebhookChangeSchema as H, whatsAppWebhookPayloadSchema as I, whatsAppWebhookValueSchema as J, type WhatsAppMessage as W, type WhatsAppStatus as a, type WhatsAppTemplateStatusUpdate as b, type WhatsAppPhoneNumberQualityUpdate as c, WHATSAPP_WEBHOOK_FIELDS as d, type WhatsAppContact as e, type WhatsAppInteractive as f, type WhatsAppLocation as g, type WhatsAppMedia as h, type WhatsAppMessageEcho as i, type WhatsAppMessageStatusValue as j, type WhatsAppOrder as k, type WhatsAppQualityEvent as l, type WhatsAppStatusError as m, type WhatsAppTemplateStatusEvent as n, type WhatsAppWebhookChange as o, type WhatsAppWebhookField as p, type WhatsAppWebhookPayload as q, type WhatsAppWebhookValue as r, resolveContactProfileName as s, whatsAppInteractiveSchema as t, whatsAppLocationSchema as u, whatsAppMediaSchema as v, whatsAppContactSchema as w, whatsAppMessageEchoSchema as x, whatsAppMessageSchema as y, whatsAppMessageStatusSchema as z };