@kirimdev/sdk 3.8.0 → 3.10.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.
@@ -260,7 +260,7 @@ export interface paths {
260
260
  "application/json": components["schemas"]["ApiErrorEnvelope"];
261
261
  };
262
262
  };
263
- /** @description Semantic failure (e.g. idempotency key reuse) */
263
+ /** @description Semantic failure (e.g. idempotency key reuse, pre-send compliance guard, media not found) */
264
264
  422: {
265
265
  headers: {
266
266
  [name: string]: unknown;
@@ -320,7 +320,16 @@ export interface paths {
320
320
  messaging_product: "whatsapp";
321
321
  /** @enum {string} */
322
322
  recipient_type?: "individual";
323
- to: string;
323
+ /**
324
+ * @description Recipient's WhatsApp phone number in E.164 (e.g. `628123456789`). Either `to` or `recipient` is required; if both are supplied, Meta uses `to` (documented precedence).
325
+ * @example 628123456789
326
+ */
327
+ to?: string;
328
+ /**
329
+ * @description Recipient's Business-Scoped User ID (e.g. `US.13491208655302741918`) or parent BSUID. Alternative to `to`. Auth OTP templates (one-tap / zero-tap / copy-code) do NOT support BSUID recipients — Meta rejects with error 131062.
330
+ * @example US.13491208655302741918
331
+ */
332
+ recipient?: string;
324
333
  /** Reply context */
325
334
  context?: {
326
335
  /**
@@ -340,7 +349,16 @@ export interface paths {
340
349
  messaging_product: "whatsapp";
341
350
  /** @enum {string} */
342
351
  recipient_type?: "individual";
343
- to: string;
352
+ /**
353
+ * @description Recipient's WhatsApp phone number in E.164 (e.g. `628123456789`). Either `to` or `recipient` is required; if both are supplied, Meta uses `to` (documented precedence).
354
+ * @example 628123456789
355
+ */
356
+ to?: string;
357
+ /**
358
+ * @description Recipient's Business-Scoped User ID (e.g. `US.13491208655302741918`) or parent BSUID. Alternative to `to`. Auth OTP templates (one-tap / zero-tap / copy-code) do NOT support BSUID recipients — Meta rejects with error 131062.
359
+ * @example US.13491208655302741918
360
+ */
361
+ recipient?: string;
344
362
  /** Reply context */
345
363
  context?: {
346
364
  /**
@@ -363,7 +381,16 @@ export interface paths {
363
381
  messaging_product: "whatsapp";
364
382
  /** @enum {string} */
365
383
  recipient_type?: "individual";
366
- to: string;
384
+ /**
385
+ * @description Recipient's WhatsApp phone number in E.164 (e.g. `628123456789`). Either `to` or `recipient` is required; if both are supplied, Meta uses `to` (documented precedence).
386
+ * @example 628123456789
387
+ */
388
+ to?: string;
389
+ /**
390
+ * @description Recipient's Business-Scoped User ID (e.g. `US.13491208655302741918`) or parent BSUID. Alternative to `to`. Auth OTP templates (one-tap / zero-tap / copy-code) do NOT support BSUID recipients — Meta rejects with error 131062.
391
+ * @example US.13491208655302741918
392
+ */
393
+ recipient?: string;
367
394
  /** Reply context */
368
395
  context?: {
369
396
  /**
@@ -386,7 +413,16 @@ export interface paths {
386
413
  messaging_product: "whatsapp";
387
414
  /** @enum {string} */
388
415
  recipient_type?: "individual";
389
- to: string;
416
+ /**
417
+ * @description Recipient's WhatsApp phone number in E.164 (e.g. `628123456789`). Either `to` or `recipient` is required; if both are supplied, Meta uses `to` (documented precedence).
418
+ * @example 628123456789
419
+ */
420
+ to?: string;
421
+ /**
422
+ * @description Recipient's Business-Scoped User ID (e.g. `US.13491208655302741918`) or parent BSUID. Alternative to `to`. Auth OTP templates (one-tap / zero-tap / copy-code) do NOT support BSUID recipients — Meta rejects with error 131062.
423
+ * @example US.13491208655302741918
424
+ */
425
+ recipient?: string;
390
426
  /** Reply context */
391
427
  context?: {
392
428
  /**
@@ -409,7 +445,16 @@ export interface paths {
409
445
  messaging_product: "whatsapp";
410
446
  /** @enum {string} */
411
447
  recipient_type?: "individual";
412
- to: string;
448
+ /**
449
+ * @description Recipient's WhatsApp phone number in E.164 (e.g. `628123456789`). Either `to` or `recipient` is required; if both are supplied, Meta uses `to` (documented precedence).
450
+ * @example 628123456789
451
+ */
452
+ to?: string;
453
+ /**
454
+ * @description Recipient's Business-Scoped User ID (e.g. `US.13491208655302741918`) or parent BSUID. Alternative to `to`. Auth OTP templates (one-tap / zero-tap / copy-code) do NOT support BSUID recipients — Meta rejects with error 131062.
455
+ * @example US.13491208655302741918
456
+ */
457
+ recipient?: string;
413
458
  /** Reply context */
414
459
  context?: {
415
460
  /**
@@ -433,7 +478,16 @@ export interface paths {
433
478
  messaging_product: "whatsapp";
434
479
  /** @enum {string} */
435
480
  recipient_type?: "individual";
436
- to: string;
481
+ /**
482
+ * @description Recipient's WhatsApp phone number in E.164 (e.g. `628123456789`). Either `to` or `recipient` is required; if both are supplied, Meta uses `to` (documented precedence).
483
+ * @example 628123456789
484
+ */
485
+ to?: string;
486
+ /**
487
+ * @description Recipient's Business-Scoped User ID (e.g. `US.13491208655302741918`) or parent BSUID. Alternative to `to`. Auth OTP templates (one-tap / zero-tap / copy-code) do NOT support BSUID recipients — Meta rejects with error 131062.
488
+ * @example US.13491208655302741918
489
+ */
490
+ recipient?: string;
437
491
  /** Reply context */
438
492
  context?: {
439
493
  /**
@@ -468,7 +522,16 @@ export interface paths {
468
522
  messaging_product: "whatsapp";
469
523
  /** @enum {string} */
470
524
  recipient_type?: "individual";
471
- to: string;
525
+ /**
526
+ * @description Recipient's WhatsApp phone number in E.164 (e.g. `628123456789`). Either `to` or `recipient` is required; if both are supplied, Meta uses `to` (documented precedence).
527
+ * @example 628123456789
528
+ */
529
+ to?: string;
530
+ /**
531
+ * @description Recipient's Business-Scoped User ID (e.g. `US.13491208655302741918`) or parent BSUID. Alternative to `to`. Auth OTP templates (one-tap / zero-tap / copy-code) do NOT support BSUID recipients — Meta rejects with error 131062.
532
+ * @example US.13491208655302741918
533
+ */
534
+ recipient?: string;
472
535
  /** Reply context */
473
536
  context?: {
474
537
  /**
@@ -669,7 +732,7 @@ export interface paths {
669
732
  "application/json": components["schemas"]["ApiErrorEnvelope"];
670
733
  };
671
734
  };
672
- /** @description Semantic failure (e.g. idempotency key reuse) */
735
+ /** @description Semantic failure (e.g. idempotency key reuse, pre-send compliance guard, media not found) */
673
736
  422: {
674
737
  headers: {
675
738
  [name: string]: unknown;
@@ -720,7 +783,10 @@ export interface paths {
720
783
  path?: never;
721
784
  cookie?: never;
722
785
  };
723
- /** Fetch a sent message by id */
786
+ /**
787
+ * Fetch a sent message by id
788
+ * @description Retrieve a single message by `msg_*` id. Supports short-lived server-side caching for high-frequency status polling, and `ETag`/`If-None-Match` for unchanged responses.
789
+ */
724
790
  get: {
725
791
  parameters: {
726
792
  query?: never;
@@ -737,12 +803,23 @@ export interface paths {
737
803
  /** @description Message resource */
738
804
  200: {
739
805
  headers: {
806
+ /** @description Weak entity tag derived from `status` and error fields. Send as `If-None-Match` on the next poll — unchanged messages return `304`. */
807
+ ETag?: string;
740
808
  [name: string]: unknown;
741
809
  };
742
810
  content: {
743
811
  "application/json": components["schemas"]["GetMessageResponse"];
744
812
  };
745
813
  };
814
+ /** @description Not modified — request carried a matching `If-None-Match` ETag. */
815
+ 304: {
816
+ headers: {
817
+ /** @description Same weak entity tag as the cached representation. */
818
+ ETag?: string;
819
+ [name: string]: unknown;
820
+ };
821
+ content?: never;
822
+ };
746
823
  /** @description Validation failure */
747
824
  400: {
748
825
  headers: {
@@ -770,7 +847,7 @@ export interface paths {
770
847
  "application/json": components["schemas"]["ApiErrorEnvelope"];
771
848
  };
772
849
  };
773
- /** @description Semantic failure (e.g. idempotency key reuse) */
850
+ /** @description Semantic failure (e.g. idempotency key reuse, pre-send compliance guard, media not found) */
774
851
  422: {
775
852
  headers: {
776
853
  [name: string]: unknown;
@@ -871,7 +948,7 @@ export interface paths {
871
948
  "application/json": components["schemas"]["ApiErrorEnvelope"];
872
949
  };
873
950
  };
874
- /** @description Semantic failure (e.g. idempotency key reuse) */
951
+ /** @description Semantic failure (e.g. idempotency key reuse, pre-send compliance guard, media not found) */
875
952
  422: {
876
953
  headers: {
877
954
  [name: string]: unknown;
@@ -903,7 +980,7 @@ export interface paths {
903
980
  put?: never;
904
981
  /**
905
982
  * Create a template
906
- * @description Create a new message template and submit it to Meta for review. The request body is components-only (mirrors Meta's `message_templates` create shape). On success the template is persisted with `status: "pending"`; Meta reviews asynchronously, so poll `GET /{phone_number_id}/templates/{name}` (or re-run `POST .../templates/sync`) for the eventual `approved` / `rejected` transition. A `name`+`language` pair that already exists for the account returns `400 invalid_field_value`.
983
+ * @description Create a new message template and submit it to Meta for review. The request body is components-only (mirrors Meta's `message_templates` create shape). For IMAGE/VIDEO/DOCUMENT headers, supply `example.header_url` with a public https:// URL — Kirimdev uploads the sample to Meta on your behalf — or a Meta asset handle in `example.header_handle`. On success the template is persisted with `status: "pending"`; Meta reviews asynchronously, so poll `GET /{phone_number_id}/templates/{name}` (or re-run `POST .../templates/sync`) for the eventual `approved` / `rejected` transition. A duplicate `name`+`language` pair returns `409 template_already_exists`.
907
984
  */
908
985
  post: {
909
986
  parameters: {
@@ -1012,7 +1089,7 @@ export interface paths {
1012
1089
  "application/json": components["schemas"]["ApiErrorEnvelope"];
1013
1090
  };
1014
1091
  };
1015
- /** @description Semantic failure (e.g. idempotency key reuse) */
1092
+ /** @description Semantic failure (e.g. idempotency key reuse, pre-send compliance guard, media not found) */
1016
1093
  422: {
1017
1094
  headers: {
1018
1095
  [name: string]: unknown;
@@ -1115,7 +1192,7 @@ export interface paths {
1115
1192
  "application/json": components["schemas"]["ApiErrorEnvelope"];
1116
1193
  };
1117
1194
  };
1118
- /** @description Semantic failure (e.g. idempotency key reuse) */
1195
+ /** @description Semantic failure (e.g. idempotency key reuse, pre-send compliance guard, media not found) */
1119
1196
  422: {
1120
1197
  headers: {
1121
1198
  [name: string]: unknown;
@@ -1213,7 +1290,7 @@ export interface paths {
1213
1290
  "application/json": components["schemas"]["ApiErrorEnvelope"];
1214
1291
  };
1215
1292
  };
1216
- /** @description Semantic failure (e.g. idempotency key reuse) */
1293
+ /** @description Semantic failure (e.g. idempotency key reuse, pre-send compliance guard, media not found) */
1217
1294
  422: {
1218
1295
  headers: {
1219
1296
  [name: string]: unknown;
@@ -1343,7 +1420,7 @@ export interface paths {
1343
1420
  /** Format: uri */
1344
1421
  url: string;
1345
1422
  description?: string;
1346
- events: ("message.received" | "message.status" | "conversation.assigned" | "conversation.closed" | "contact.created" | "contact.updated" | "customer.created" | "customer.updated" | "customer.archived" | "customer.onboarded" | "customer.setup_link.created" | "customer.setup_link.consumed")[];
1423
+ events: ("message.received" | "message.status" | "message.sent" | "conversation.assigned" | "conversation.closed" | "contact.created" | "contact.updated" | "customer.created" | "customer.updated" | "customer.archived" | "customer.onboarded" | "customer.setup_link.created" | "customer.setup_link.consumed")[];
1347
1424
  };
1348
1425
  };
1349
1426
  };
@@ -1576,7 +1653,7 @@ export interface paths {
1576
1653
  /** Format: uri */
1577
1654
  url?: string;
1578
1655
  description?: string | null;
1579
- events?: ("message.received" | "message.status" | "conversation.assigned" | "conversation.closed" | "contact.created" | "contact.updated" | "customer.created" | "customer.updated" | "customer.archived" | "customer.onboarded" | "customer.setup_link.created" | "customer.setup_link.consumed")[];
1656
+ events?: ("message.received" | "message.status" | "message.sent" | "conversation.assigned" | "conversation.closed" | "contact.created" | "contact.updated" | "customer.created" | "customer.updated" | "customer.archived" | "customer.onboarded" | "customer.setup_link.created" | "customer.setup_link.consumed")[];
1580
1657
  /** @enum {string} */
1581
1658
  status?: "active" | "paused";
1582
1659
  };
@@ -1810,7 +1887,7 @@ export interface paths {
1810
1887
  "application/json": components["schemas"]["ApiErrorEnvelope"];
1811
1888
  };
1812
1889
  };
1813
- /** @description Semantic failure (e.g. idempotency key reuse) */
1890
+ /** @description Semantic failure (e.g. idempotency key reuse, pre-send compliance guard, media not found) */
1814
1891
  422: {
1815
1892
  headers: {
1816
1893
  [name: string]: unknown;
@@ -2220,13 +2297,14 @@ export interface paths {
2220
2297
  };
2221
2298
  /**
2222
2299
  * List conversations
2223
- * @description List conversations for the WhatsApp account identified by `phone_number_id`. Ordered newest-active first by `last_message_at` (NULLS LAST).
2300
+ * @description List conversations for the WhatsApp account identified by `phone_number_id`. Default order: newest-active first by `last_message_at` (NULLS LAST). With `updated_since`, order switches to `updated_at DESC` so assignment/status changes are not buried. Supports short-lived server-side caching, and `ETag`/`If-None-Match` for unchanged responses.
2224
2301
  */
2225
2302
  get: {
2226
2303
  parameters: {
2227
2304
  query?: {
2228
2305
  status?: "open" | "resolved" | "pending";
2229
2306
  contact_id?: string;
2307
+ updated_since?: string;
2230
2308
  limit?: string;
2231
2309
  cursor?: string;
2232
2310
  };
@@ -2242,12 +2320,23 @@ export interface paths {
2242
2320
  /** @description Conversation list */
2243
2321
  200: {
2244
2322
  headers: {
2323
+ /** @description Weak entity tag derived from the newest `updated_at` in the page. Send as `If-None-Match` on the next poll — unchanged lists return `304`. */
2324
+ ETag?: string;
2245
2325
  [name: string]: unknown;
2246
2326
  };
2247
2327
  content: {
2248
2328
  "application/json": components["schemas"]["ListConversationsResponse"];
2249
2329
  };
2250
2330
  };
2331
+ /** @description Not modified — request carried a matching `If-None-Match` ETag. */
2332
+ 304: {
2333
+ headers: {
2334
+ /** @description Same weak entity tag as the prior response. */
2335
+ ETag?: string;
2336
+ [name: string]: unknown;
2337
+ };
2338
+ content?: never;
2339
+ };
2251
2340
  /** @description Validation failure */
2252
2341
  400: {
2253
2342
  headers: {
@@ -2275,7 +2364,7 @@ export interface paths {
2275
2364
  "application/json": components["schemas"]["ApiErrorEnvelope"];
2276
2365
  };
2277
2366
  };
2278
- /** @description Semantic failure (e.g. idempotency key reuse) */
2367
+ /** @description Semantic failure (e.g. idempotency key reuse, pre-send compliance guard, media not found) */
2279
2368
  422: {
2280
2369
  headers: {
2281
2370
  [name: string]: unknown;
@@ -2369,7 +2458,7 @@ export interface paths {
2369
2458
  "application/json": components["schemas"]["ApiErrorEnvelope"];
2370
2459
  };
2371
2460
  };
2372
- /** @description Semantic failure (e.g. idempotency key reuse) */
2461
+ /** @description Semantic failure (e.g. idempotency key reuse, pre-send compliance guard, media not found) */
2373
2462
  422: {
2374
2463
  headers: {
2375
2464
  [name: string]: unknown;
@@ -2464,7 +2553,7 @@ export interface paths {
2464
2553
  "application/json": components["schemas"]["ApiErrorEnvelope"];
2465
2554
  };
2466
2555
  };
2467
- /** @description Semantic failure (e.g. idempotency key reuse) */
2556
+ /** @description Semantic failure (e.g. idempotency key reuse, pre-send compliance guard, media not found) */
2468
2557
  422: {
2469
2558
  headers: {
2470
2559
  [name: string]: unknown;
@@ -2510,6 +2599,8 @@ export interface paths {
2510
2599
  parameters: {
2511
2600
  query?: {
2512
2601
  phone?: string;
2602
+ bsuid?: string;
2603
+ username?: string;
2513
2604
  search?: string;
2514
2605
  limit?: string;
2515
2606
  cursor?: string;
@@ -2559,7 +2650,7 @@ export interface paths {
2559
2650
  "application/json": components["schemas"]["ApiErrorEnvelope"];
2560
2651
  };
2561
2652
  };
2562
- /** @description Semantic failure (e.g. idempotency key reuse) */
2653
+ /** @description Semantic failure (e.g. idempotency key reuse, pre-send compliance guard, media not found) */
2563
2654
  422: {
2564
2655
  headers: {
2565
2656
  [name: string]: unknown;
@@ -2606,7 +2697,9 @@ export interface paths {
2606
2697
  requestBody?: {
2607
2698
  content: {
2608
2699
  "application/json": {
2609
- phone_number: string;
2700
+ phone_number?: string;
2701
+ bsuid?: string;
2702
+ username?: string;
2610
2703
  name?: string;
2611
2704
  /** Format: email */
2612
2705
  email?: string | null;
@@ -2653,7 +2746,7 @@ export interface paths {
2653
2746
  "application/json": components["schemas"]["ApiErrorEnvelope"];
2654
2747
  };
2655
2748
  };
2656
- /** @description Semantic failure (e.g. idempotency key reuse) */
2749
+ /** @description Semantic failure (e.g. idempotency key reuse, pre-send compliance guard, media not found) */
2657
2750
  422: {
2658
2751
  headers: {
2659
2752
  [name: string]: unknown;
@@ -2745,7 +2838,7 @@ export interface paths {
2745
2838
  "application/json": components["schemas"]["ApiErrorEnvelope"];
2746
2839
  };
2747
2840
  };
2748
- /** @description Semantic failure (e.g. idempotency key reuse) */
2841
+ /** @description Semantic failure (e.g. idempotency key reuse, pre-send compliance guard, media not found) */
2749
2842
  422: {
2750
2843
  headers: {
2751
2844
  [name: string]: unknown;
@@ -2829,7 +2922,7 @@ export interface paths {
2829
2922
  "application/json": components["schemas"]["ApiErrorEnvelope"];
2830
2923
  };
2831
2924
  };
2832
- /** @description Semantic failure (e.g. idempotency key reuse) */
2925
+ /** @description Semantic failure (e.g. idempotency key reuse, pre-send compliance guard, media not found) */
2833
2926
  422: {
2834
2927
  headers: {
2835
2928
  [name: string]: unknown;
@@ -2879,6 +2972,7 @@ export interface paths {
2879
2972
  content: {
2880
2973
  "application/json": {
2881
2974
  name?: string | null;
2975
+ username?: string | null;
2882
2976
  email?: string | "" | null;
2883
2977
  metadata?: {
2884
2978
  [key: string]: unknown;
@@ -2923,7 +3017,7 @@ export interface paths {
2923
3017
  "application/json": components["schemas"]["ApiErrorEnvelope"];
2924
3018
  };
2925
3019
  };
2926
- /** @description Semantic failure (e.g. idempotency key reuse) */
3020
+ /** @description Semantic failure (e.g. idempotency key reuse, pre-send compliance guard, media not found) */
2927
3021
  422: {
2928
3022
  headers: {
2929
3023
  [name: string]: unknown;
@@ -3014,7 +3108,7 @@ export interface paths {
3014
3108
  "application/json": components["schemas"]["ApiErrorEnvelope"];
3015
3109
  };
3016
3110
  };
3017
- /** @description Semantic failure (e.g. idempotency key reuse) */
3111
+ /** @description Semantic failure (e.g. idempotency key reuse, pre-send compliance guard, media not found) */
3018
3112
  422: {
3019
3113
  headers: {
3020
3114
  [name: string]: unknown;
@@ -3119,7 +3213,7 @@ export interface paths {
3119
3213
  "application/json": components["schemas"]["ApiErrorEnvelope"];
3120
3214
  };
3121
3215
  };
3122
- /** @description Semantic failure (e.g. idempotency key reuse) */
3216
+ /** @description Semantic failure (e.g. idempotency key reuse, pre-send compliance guard, media not found) */
3123
3217
  422: {
3124
3218
  headers: {
3125
3219
  [name: string]: unknown;
@@ -3215,7 +3309,7 @@ export interface paths {
3215
3309
  "application/json": components["schemas"]["ApiErrorEnvelope"];
3216
3310
  };
3217
3311
  };
3218
- /** @description Semantic failure (e.g. idempotency key reuse) */
3312
+ /** @description Semantic failure (e.g. idempotency key reuse, pre-send compliance guard, media not found) */
3219
3313
  422: {
3220
3314
  headers: {
3221
3315
  [name: string]: unknown;
@@ -3319,7 +3413,7 @@ export interface paths {
3319
3413
  "application/json": components["schemas"]["ApiErrorEnvelope"];
3320
3414
  };
3321
3415
  };
3322
- /** @description Semantic failure (e.g. idempotency key reuse) */
3416
+ /** @description Semantic failure (e.g. idempotency key reuse, pre-send compliance guard, media not found) */
3323
3417
  422: {
3324
3418
  headers: {
3325
3419
  [name: string]: unknown;
@@ -3419,7 +3513,7 @@ export interface paths {
3419
3513
  "application/json": components["schemas"]["ApiErrorEnvelope"];
3420
3514
  };
3421
3515
  };
3422
- /** @description Semantic failure (e.g. idempotency key reuse) */
3516
+ /** @description Semantic failure (e.g. idempotency key reuse, pre-send compliance guard, media not found) */
3423
3517
  422: {
3424
3518
  headers: {
3425
3519
  [name: string]: unknown;
@@ -3515,7 +3609,7 @@ export interface paths {
3515
3609
  "application/json": components["schemas"]["ApiErrorEnvelope"];
3516
3610
  };
3517
3611
  };
3518
- /** @description Semantic failure (e.g. idempotency key reuse) */
3612
+ /** @description Semantic failure (e.g. idempotency key reuse, pre-send compliance guard, media not found) */
3519
3613
  422: {
3520
3614
  headers: {
3521
3615
  [name: string]: unknown;
@@ -3978,7 +4072,7 @@ export interface paths {
3978
4072
  "application/json": components["schemas"]["ApiErrorEnvelope"];
3979
4073
  };
3980
4074
  };
3981
- /** @description Plan / quota / subscription gate (e.g. feature_not_entitled, quota_exceeded, subscription_inactive) */
4075
+ /** @description Billing / entitlement gate subscription inactive, quota exceeded, or plan tier missing a feature (feature_not_entitled). Upgrade to continue. */
3982
4076
  402: {
3983
4077
  headers: {
3984
4078
  [name: string]: unknown;
@@ -4060,7 +4154,7 @@ export interface paths {
4060
4154
  "application/json": components["schemas"]["ApiErrorEnvelope"];
4061
4155
  };
4062
4156
  };
4063
- /** @description Plan / quota / subscription gate (e.g. feature_not_entitled, quota_exceeded, subscription_inactive) */
4157
+ /** @description Billing / entitlement gate subscription inactive, quota exceeded, or plan tier missing a feature (feature_not_entitled). Upgrade to continue. */
4064
4158
  402: {
4065
4159
  headers: {
4066
4160
  [name: string]: unknown;
@@ -4141,7 +4235,7 @@ export interface paths {
4141
4235
  "application/json": components["schemas"]["ApiErrorEnvelope"];
4142
4236
  };
4143
4237
  };
4144
- /** @description Plan / quota / subscription gate (e.g. feature_not_entitled, quota_exceeded, subscription_inactive) */
4238
+ /** @description Billing / entitlement gate subscription inactive, quota exceeded, or plan tier missing a feature (feature_not_entitled). Upgrade to continue. */
4145
4239
  402: {
4146
4240
  headers: {
4147
4241
  [name: string]: unknown;
@@ -4223,7 +4317,7 @@ export interface paths {
4223
4317
  "application/json": components["schemas"]["ApiErrorEnvelope"];
4224
4318
  };
4225
4319
  };
4226
- /** @description Plan / quota / subscription gate (e.g. feature_not_entitled, quota_exceeded, subscription_inactive) */
4320
+ /** @description Billing / entitlement gate subscription inactive, quota exceeded, or plan tier missing a feature (feature_not_entitled). Upgrade to continue. */
4227
4321
  402: {
4228
4322
  headers: {
4229
4323
  [name: string]: unknown;
@@ -4315,7 +4409,7 @@ export interface paths {
4315
4409
  "application/json": components["schemas"]["ApiErrorEnvelope"];
4316
4410
  };
4317
4411
  };
4318
- /** @description Plan / quota / subscription gate (e.g. feature_not_entitled, quota_exceeded, subscription_inactive) */
4412
+ /** @description Billing / entitlement gate subscription inactive, quota exceeded, or plan tier missing a feature (feature_not_entitled). Upgrade to continue. */
4319
4413
  402: {
4320
4414
  headers: {
4321
4415
  [name: string]: unknown;
@@ -4406,7 +4500,7 @@ export interface paths {
4406
4500
  "application/json": components["schemas"]["ApiErrorEnvelope"];
4407
4501
  };
4408
4502
  };
4409
- /** @description Plan / quota / subscription gate (e.g. feature_not_entitled, quota_exceeded, subscription_inactive) */
4503
+ /** @description Billing / entitlement gate subscription inactive, quota exceeded, or plan tier missing a feature (feature_not_entitled). Upgrade to continue. */
4410
4504
  402: {
4411
4505
  headers: {
4412
4506
  [name: string]: unknown;
@@ -4497,7 +4591,7 @@ export interface paths {
4497
4591
  "application/json": components["schemas"]["ApiErrorEnvelope"];
4498
4592
  };
4499
4593
  };
4500
- /** @description Plan / quota / subscription gate (e.g. feature_not_entitled, quota_exceeded, subscription_inactive) */
4594
+ /** @description Billing / entitlement gate subscription inactive, quota exceeded, or plan tier missing a feature (feature_not_entitled). Upgrade to continue. */
4501
4595
  402: {
4502
4596
  headers: {
4503
4597
  [name: string]: unknown;
@@ -4594,7 +4688,7 @@ export interface paths {
4594
4688
  "application/json": components["schemas"]["ApiErrorEnvelope"];
4595
4689
  };
4596
4690
  };
4597
- /** @description Plan / quota / subscription gate (e.g. feature_not_entitled, quota_exceeded, subscription_inactive) */
4691
+ /** @description Billing / entitlement gate subscription inactive, quota exceeded, or plan tier missing a feature (feature_not_entitled). Upgrade to continue. */
4598
4692
  402: {
4599
4693
  headers: {
4600
4694
  [name: string]: unknown;
@@ -4693,7 +4787,7 @@ export interface paths {
4693
4787
  "application/json": components["schemas"]["ApiErrorEnvelope"];
4694
4788
  };
4695
4789
  };
4696
- /** @description Plan / quota / subscription gate (e.g. feature_not_entitled, quota_exceeded, subscription_inactive) */
4790
+ /** @description Billing / entitlement gate subscription inactive, quota exceeded, or plan tier missing a feature (feature_not_entitled). Upgrade to continue. */
4697
4791
  402: {
4698
4792
  headers: {
4699
4793
  [name: string]: unknown;
@@ -4748,8 +4842,11 @@ export interface components {
4748
4842
  schemas: {
4749
4843
  ApiErrorEnvelope: {
4750
4844
  error: {
4751
- /** @example invalid_request_error */
4752
- type: string;
4845
+ /**
4846
+ * @example invalid_request_error
4847
+ * @enum {string}
4848
+ */
4849
+ type: "invalid_request_error" | "authentication_error" | "permission_error" | "not_found" | "conflict" | "rate_limit_error" | "api_error";
4753
4850
  /** @example invalid_phone_number */
4754
4851
  code: string;
4755
4852
  message: string;
@@ -4777,12 +4874,36 @@ export interface components {
4777
4874
  id: string;
4778
4875
  /** @enum {string} */
4779
4876
  object: "message";
4780
- to?: string;
4877
+ /**
4878
+ * @description Recipient's phone number in E.164 (with leading `+`). NULL when the message targeted a Business-Scoped User ID (BSUID) recipient and the contact has no known phone number. See docs/meta-docs/bsuid.md.
4879
+ * @example +628123456789
4880
+ */
4881
+ to?: string | null;
4882
+ /**
4883
+ * @description Recipient contact's Business-Scoped User ID. Present when the contact has been enriched with a BSUID from a Meta webhook (or from a BSUID-first send). NULL for phone-only contacts.
4884
+ * @example US.13491208655302741918
4885
+ */
4886
+ bsuid?: string | null;
4887
+ /**
4888
+ * @description Parent BSUID for managed businesses with linked business portfolios. NULL for regular accounts.
4889
+ * @example US.ENT.11815799212886844830
4890
+ */
4891
+ parent_bsuid?: string | null;
4892
+ /**
4893
+ * @description Recipient contact's WhatsApp username (case-insensitive comparison; case-preserving in storage). NULL when the contact has not adopted the WhatsApp username feature.
4894
+ * @example pablomorales
4895
+ */
4896
+ username?: string | null;
4781
4897
  type?: string;
4782
4898
  /** @enum {string} */
4783
4899
  status: "queued" | "pending" | "sent" | "delivered" | "read" | "failed";
4784
4900
  /** Format: date-time */
4785
4901
  created_at?: string;
4902
+ /**
4903
+ * Format: date-time
4904
+ * @description ISO-8601 timestamp when the recipient first played an outbound voice note. Populated from Meta's `played` status webhook; omitted on non-voice messages and until playback occurs.
4905
+ */
4906
+ played_at?: string;
4786
4907
  conversation_id?: string;
4787
4908
  message_id?: string;
4788
4909
  error?: {
@@ -4917,7 +5038,26 @@ export interface components {
4917
5038
  id: string;
4918
5039
  /** @enum {string} */
4919
5040
  object: "contact";
5041
+ /**
5042
+ * @description Phone number in E.164. NULL when the contact was created via BSUID (username-adopted user with no shared phone number). See docs/meta-docs/bsuid.md.
5043
+ * @example +628123456789
5044
+ */
4920
5045
  phone_number: string | null;
5046
+ /**
5047
+ * @description Business-Scoped User ID. Populated by inbound webhooks or when the contact was created via BSUID. Format: `{ISO alpha-2 country}.{alphanumeric ≤128}`.
5048
+ * @example US.13491208655302741918
5049
+ */
5050
+ bsuid: string | null;
5051
+ /**
5052
+ * @description Parent BSUID (managed businesses only). Format: `{ISO alpha-2 country}.ENT.{alphanumeric ≤128}`.
5053
+ * @example US.ENT.11815799212886844830
5054
+ */
5055
+ parent_bsuid: string | null;
5056
+ /**
5057
+ * @description WhatsApp username of the contact, if the user has adopted the username feature. Case-insensitive when comparing per Meta rules; `.` and `_` are significant.
5058
+ * @example pablomorales
5059
+ */
5060
+ username: string | null;
4921
5061
  name: string | null;
4922
5062
  email: string | null;
4923
5063
  metadata: {
@@ -1,2 +1,2 @@
1
- export declare const SDK_VERSION: "3.8.0";
1
+ export declare const SDK_VERSION: "3.10.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/generated/version.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,EAAG,OAAgB,CAAA"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/generated/version.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,EAAG,QAAiB,CAAA"}
@@ -2,5 +2,5 @@
2
2
  // Regenerated on every prebuild / pretypecheck / pretest from
3
3
  // package.json so the User-Agent header stays in sync with the
4
4
  // published version.
5
- export const SDK_VERSION = "3.8.0";
5
+ export const SDK_VERSION = "3.10.0";
6
6
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/generated/version.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,8DAA8D;AAC9D,+DAA+D;AAC/D,qBAAqB;AAErB,MAAM,CAAC,MAAM,WAAW,GAAG,OAAgB,CAAA"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/generated/version.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,8DAA8D;AAC9D,+DAA+D;AAC/D,qBAAqB;AAErB,MAAM,CAAC,MAAM,WAAW,GAAG,QAAiB,CAAA"}
@@ -3,4 +3,4 @@
3
3
  // package.json so the User-Agent header stays in sync with the
4
4
  // published version.
5
5
 
6
- export const SDK_VERSION = "3.8.0" as const
6
+ export const SDK_VERSION = "3.10.0" as const