telnyx 7.21.0 → 7.22.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.
Files changed (259) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/client.d.mts +7 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +7 -4
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/ai/ai.d.mts +2 -2
  12. package/resources/ai/ai.d.mts.map +1 -1
  13. package/resources/ai/ai.d.ts +2 -2
  14. package/resources/ai/ai.d.ts.map +1 -1
  15. package/resources/ai/ai.js.map +1 -1
  16. package/resources/ai/ai.mjs.map +1 -1
  17. package/resources/ai/assistants/assistants.d.mts +152 -1
  18. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  19. package/resources/ai/assistants/assistants.d.ts +152 -1
  20. package/resources/ai/assistants/assistants.d.ts.map +1 -1
  21. package/resources/ai/assistants/assistants.js.map +1 -1
  22. package/resources/ai/assistants/assistants.mjs.map +1 -1
  23. package/resources/ai/assistants/index.d.mts +1 -1
  24. package/resources/ai/assistants/index.d.mts.map +1 -1
  25. package/resources/ai/assistants/index.d.ts +1 -1
  26. package/resources/ai/assistants/index.d.ts.map +1 -1
  27. package/resources/ai/assistants/index.js.map +1 -1
  28. package/resources/ai/assistants/index.mjs.map +1 -1
  29. package/resources/ai/assistants/versions.d.mts +25 -0
  30. package/resources/ai/assistants/versions.d.mts.map +1 -1
  31. package/resources/ai/assistants/versions.d.ts +25 -0
  32. package/resources/ai/assistants/versions.d.ts.map +1 -1
  33. package/resources/ai/chat.d.mts +61 -22
  34. package/resources/ai/chat.d.mts.map +1 -1
  35. package/resources/ai/chat.d.ts +61 -22
  36. package/resources/ai/chat.d.ts.map +1 -1
  37. package/resources/ai/index.d.mts +1 -1
  38. package/resources/ai/index.d.mts.map +1 -1
  39. package/resources/ai/index.d.ts +1 -1
  40. package/resources/ai/index.d.ts.map +1 -1
  41. package/resources/ai/index.js.map +1 -1
  42. package/resources/ai/index.mjs.map +1 -1
  43. package/resources/ai/openai/chat.d.mts +61 -22
  44. package/resources/ai/openai/chat.d.mts.map +1 -1
  45. package/resources/ai/openai/chat.d.ts +61 -22
  46. package/resources/ai/openai/chat.d.ts.map +1 -1
  47. package/resources/compute/compute.d.mts +10 -0
  48. package/resources/compute/compute.d.mts.map +1 -0
  49. package/resources/compute/compute.d.ts +10 -0
  50. package/resources/compute/compute.d.ts.map +1 -0
  51. package/resources/compute/compute.js +17 -0
  52. package/resources/compute/compute.js.map +1 -0
  53. package/resources/compute/compute.mjs +12 -0
  54. package/resources/compute/compute.mjs.map +1 -0
  55. package/resources/compute/funcs.d.mts +179 -0
  56. package/resources/compute/funcs.d.mts.map +1 -0
  57. package/resources/compute/funcs.d.ts +179 -0
  58. package/resources/compute/funcs.d.ts.map +1 -0
  59. package/resources/compute/funcs.js +41 -0
  60. package/resources/compute/funcs.js.map +1 -0
  61. package/resources/compute/funcs.mjs +37 -0
  62. package/resources/compute/funcs.mjs.map +1 -0
  63. package/resources/compute/index.d.mts +3 -0
  64. package/resources/compute/index.d.mts.map +1 -0
  65. package/resources/compute/index.d.ts +3 -0
  66. package/resources/compute/index.d.ts.map +1 -0
  67. package/resources/compute/index.js +9 -0
  68. package/resources/compute/index.js.map +1 -0
  69. package/resources/compute/index.mjs +4 -0
  70. package/resources/compute/index.mjs.map +1 -0
  71. package/resources/compute.d.mts +2 -0
  72. package/resources/compute.d.mts.map +1 -0
  73. package/resources/compute.d.ts +2 -0
  74. package/resources/compute.d.ts.map +1 -0
  75. package/resources/compute.js +6 -0
  76. package/resources/compute.js.map +1 -0
  77. package/resources/compute.mjs +3 -0
  78. package/resources/compute.mjs.map +1 -0
  79. package/resources/credential-connections/credential-connections.d.mts +4 -1
  80. package/resources/credential-connections/credential-connections.d.mts.map +1 -1
  81. package/resources/credential-connections/credential-connections.d.ts +4 -1
  82. package/resources/credential-connections/credential-connections.d.ts.map +1 -1
  83. package/resources/credential-connections/credential-connections.js.map +1 -1
  84. package/resources/credential-connections/credential-connections.mjs.map +1 -1
  85. package/resources/email-inboxes/drafts.d.mts +7 -0
  86. package/resources/email-inboxes/drafts.d.mts.map +1 -1
  87. package/resources/email-inboxes/drafts.d.ts +7 -0
  88. package/resources/email-inboxes/drafts.d.ts.map +1 -1
  89. package/resources/email-messages/email-messages.d.mts +7 -3
  90. package/resources/email-messages/email-messages.d.mts.map +1 -1
  91. package/resources/email-messages/email-messages.d.ts +7 -3
  92. package/resources/email-messages/email-messages.d.ts.map +1 -1
  93. package/resources/email-messages/email-messages.js +3 -1
  94. package/resources/email-messages/email-messages.js.map +1 -1
  95. package/resources/email-messages/email-messages.mjs +3 -1
  96. package/resources/email-messages/email-messages.mjs.map +1 -1
  97. package/resources/fqdn-connections/fqdn-authentication.d.mts +4 -1
  98. package/resources/fqdn-connections/fqdn-authentication.d.mts.map +1 -1
  99. package/resources/fqdn-connections/fqdn-authentication.d.ts +4 -1
  100. package/resources/fqdn-connections/fqdn-authentication.d.ts.map +1 -1
  101. package/resources/fqdn-connections/fqdn-connections.d.mts +4 -1
  102. package/resources/fqdn-connections/fqdn-connections.d.mts.map +1 -1
  103. package/resources/fqdn-connections/fqdn-connections.d.ts +4 -1
  104. package/resources/fqdn-connections/fqdn-connections.d.ts.map +1 -1
  105. package/resources/fqdn-connections/fqdn-connections.js.map +1 -1
  106. package/resources/fqdn-connections/fqdn-connections.mjs.map +1 -1
  107. package/resources/index.d.mts +3 -2
  108. package/resources/index.d.mts.map +1 -1
  109. package/resources/index.d.ts +3 -2
  110. package/resources/index.d.ts.map +1 -1
  111. package/resources/index.js +6 -4
  112. package/resources/index.js.map +1 -1
  113. package/resources/index.mjs +1 -0
  114. package/resources/index.mjs.map +1 -1
  115. package/resources/messages/messages.d.mts +79 -6
  116. package/resources/messages/messages.d.mts.map +1 -1
  117. package/resources/messages/messages.d.ts +79 -6
  118. package/resources/messages/messages.d.ts.map +1 -1
  119. package/resources/messages/messages.js.map +1 -1
  120. package/resources/messages/messages.mjs.map +1 -1
  121. package/resources/messaging-profiles/index.d.mts +1 -1
  122. package/resources/messaging-profiles/index.d.mts.map +1 -1
  123. package/resources/messaging-profiles/index.d.ts +1 -1
  124. package/resources/messaging-profiles/index.d.ts.map +1 -1
  125. package/resources/messaging-profiles/index.js.map +1 -1
  126. package/resources/messaging-profiles/index.mjs.map +1 -1
  127. package/resources/messaging-profiles/messaging-profiles.d.mts +34 -1
  128. package/resources/messaging-profiles/messaging-profiles.d.mts.map +1 -1
  129. package/resources/messaging-profiles/messaging-profiles.d.ts +34 -1
  130. package/resources/messaging-profiles/messaging-profiles.d.ts.map +1 -1
  131. package/resources/messaging-profiles/messaging-profiles.js.map +1 -1
  132. package/resources/messaging-profiles/messaging-profiles.mjs.map +1 -1
  133. package/resources/uac-connections/uac-connections.d.mts +9 -2
  134. package/resources/uac-connections/uac-connections.d.mts.map +1 -1
  135. package/resources/uac-connections/uac-connections.d.ts +9 -2
  136. package/resources/uac-connections/uac-connections.d.ts.map +1 -1
  137. package/resources/uac-connections/uac-connections.js.map +1 -1
  138. package/resources/uac-connections/uac-connections.mjs.map +1 -1
  139. package/resources/webhooks.d.mts +129 -3
  140. package/resources/webhooks.d.mts.map +1 -1
  141. package/resources/webhooks.d.ts +129 -3
  142. package/resources/webhooks.d.ts.map +1 -1
  143. package/resources/whatsapp/business-accounts/phone-numbers.d.mts +33 -0
  144. package/resources/whatsapp/business-accounts/phone-numbers.d.mts.map +1 -1
  145. package/resources/whatsapp/business-accounts/phone-numbers.d.ts +33 -0
  146. package/resources/whatsapp/business-accounts/phone-numbers.d.ts.map +1 -1
  147. package/resources/whatsapp/index.d.mts +1 -1
  148. package/resources/whatsapp/index.d.mts.map +1 -1
  149. package/resources/whatsapp/index.d.ts +1 -1
  150. package/resources/whatsapp/index.d.ts.map +1 -1
  151. package/resources/whatsapp/index.js.map +1 -1
  152. package/resources/whatsapp/index.mjs.map +1 -1
  153. package/resources/whatsapp/phone-numbers/index.d.mts +1 -1
  154. package/resources/whatsapp/phone-numbers/index.d.mts.map +1 -1
  155. package/resources/whatsapp/phone-numbers/index.d.ts +1 -1
  156. package/resources/whatsapp/phone-numbers/index.d.ts.map +1 -1
  157. package/resources/whatsapp/phone-numbers/index.js.map +1 -1
  158. package/resources/whatsapp/phone-numbers/index.mjs.map +1 -1
  159. package/resources/whatsapp/phone-numbers/phone-numbers.d.mts +147 -1
  160. package/resources/whatsapp/phone-numbers/phone-numbers.d.mts.map +1 -1
  161. package/resources/whatsapp/phone-numbers/phone-numbers.d.ts +147 -1
  162. package/resources/whatsapp/phone-numbers/phone-numbers.d.ts.map +1 -1
  163. package/resources/whatsapp/phone-numbers/phone-numbers.js +16 -0
  164. package/resources/whatsapp/phone-numbers/phone-numbers.js.map +1 -1
  165. package/resources/whatsapp/phone-numbers/phone-numbers.mjs +16 -0
  166. package/resources/whatsapp/phone-numbers/phone-numbers.mjs.map +1 -1
  167. package/resources/whatsapp/whatsapp.d.mts +2 -2
  168. package/resources/whatsapp/whatsapp.d.mts.map +1 -1
  169. package/resources/whatsapp/whatsapp.d.ts +2 -2
  170. package/resources/whatsapp/whatsapp.d.ts.map +1 -1
  171. package/resources/whatsapp/whatsapp.js.map +1 -1
  172. package/resources/whatsapp/whatsapp.mjs.map +1 -1
  173. package/resources/x402/credit-account/credit-account.d.mts +226 -0
  174. package/resources/x402/credit-account/credit-account.d.mts.map +1 -0
  175. package/resources/x402/credit-account/credit-account.d.ts +226 -0
  176. package/resources/x402/credit-account/credit-account.d.ts.map +1 -0
  177. package/resources/x402/credit-account/credit-account.js +66 -0
  178. package/resources/x402/credit-account/credit-account.js.map +1 -0
  179. package/resources/x402/credit-account/credit-account.mjs +61 -0
  180. package/resources/x402/credit-account/credit-account.mjs.map +1 -0
  181. package/resources/x402/credit-account/index.d.mts +3 -0
  182. package/resources/x402/credit-account/index.d.mts.map +1 -0
  183. package/resources/x402/credit-account/index.d.ts +3 -0
  184. package/resources/x402/credit-account/index.d.ts.map +1 -0
  185. package/resources/x402/credit-account/index.js +9 -0
  186. package/resources/x402/credit-account/index.js.map +1 -0
  187. package/resources/x402/credit-account/index.mjs +4 -0
  188. package/resources/x402/credit-account/index.mjs.map +1 -0
  189. package/resources/x402/credit-account/payments.d.mts +90 -0
  190. package/resources/x402/credit-account/payments.d.mts.map +1 -0
  191. package/resources/x402/credit-account/payments.d.ts +90 -0
  192. package/resources/x402/credit-account/payments.d.ts.map +1 -0
  193. package/resources/x402/credit-account/payments.js +47 -0
  194. package/resources/x402/credit-account/payments.js.map +1 -0
  195. package/resources/x402/credit-account/payments.mjs +43 -0
  196. package/resources/x402/credit-account/payments.mjs.map +1 -0
  197. package/resources/x402/credit-account.d.mts +1 -221
  198. package/resources/x402/credit-account.d.mts.map +1 -1
  199. package/resources/x402/credit-account.d.ts +1 -221
  200. package/resources/x402/credit-account.d.ts.map +1 -1
  201. package/resources/x402/credit-account.js +2 -54
  202. package/resources/x402/credit-account.js.map +1 -1
  203. package/resources/x402/credit-account.mjs +1 -52
  204. package/resources/x402/credit-account.mjs.map +1 -1
  205. package/resources/x402/index.d.mts +1 -1
  206. package/resources/x402/index.d.mts.map +1 -1
  207. package/resources/x402/index.d.ts +1 -1
  208. package/resources/x402/index.d.ts.map +1 -1
  209. package/resources/x402/index.js +2 -2
  210. package/resources/x402/index.js.map +1 -1
  211. package/resources/x402/index.mjs +1 -1
  212. package/resources/x402/index.mjs.map +1 -1
  213. package/resources/x402/x402.d.mts +2 -2
  214. package/resources/x402/x402.d.mts.map +1 -1
  215. package/resources/x402/x402.d.ts +2 -2
  216. package/resources/x402/x402.d.ts.map +1 -1
  217. package/resources/x402/x402.js +2 -2
  218. package/resources/x402/x402.js.map +1 -1
  219. package/resources/x402/x402.mjs +2 -2
  220. package/resources/x402/x402.mjs.map +1 -1
  221. package/src/client.ts +11 -0
  222. package/src/resources/ai/ai.ts +2 -0
  223. package/src/resources/ai/assistants/assistants.ts +173 -0
  224. package/src/resources/ai/assistants/index.ts +1 -0
  225. package/src/resources/ai/assistants/versions.ts +27 -0
  226. package/src/resources/ai/chat.ts +69 -23
  227. package/src/resources/ai/index.ts +1 -0
  228. package/src/resources/ai/openai/chat.ts +69 -23
  229. package/src/resources/compute/compute.ts +37 -0
  230. package/src/resources/compute/funcs.ts +298 -0
  231. package/src/resources/compute/index.ts +15 -0
  232. package/src/resources/compute.ts +3 -0
  233. package/src/resources/credential-connections/credential-connections.ts +4 -1
  234. package/src/resources/email-inboxes/drafts.ts +8 -0
  235. package/src/resources/email-messages/email-messages.ts +7 -2
  236. package/src/resources/fqdn-connections/fqdn-authentication.ts +4 -1
  237. package/src/resources/fqdn-connections/fqdn-connections.ts +4 -1
  238. package/src/resources/index.ts +4 -0
  239. package/src/resources/messages/messages.ts +89 -6
  240. package/src/resources/messaging-profiles/index.ts +1 -0
  241. package/src/resources/messaging-profiles/messaging-profiles.ts +39 -0
  242. package/src/resources/uac-connections/uac-connections.ts +9 -2
  243. package/src/resources/webhooks.ts +177 -2
  244. package/src/resources/whatsapp/business-accounts/phone-numbers.ts +52 -0
  245. package/src/resources/whatsapp/index.ts +1 -0
  246. package/src/resources/whatsapp/phone-numbers/index.ts +1 -0
  247. package/src/resources/whatsapp/phone-numbers/phone-numbers.ts +222 -0
  248. package/src/resources/whatsapp/whatsapp.ts +2 -0
  249. package/src/resources/x402/credit-account/credit-account.ts +312 -0
  250. package/src/resources/x402/credit-account/index.ts +16 -0
  251. package/src/resources/x402/credit-account/payments.ts +126 -0
  252. package/src/resources/x402/credit-account.ts +1 -290
  253. package/src/resources/x402/index.ts +1 -1
  254. package/src/resources/x402/x402.ts +2 -2
  255. package/src/version.ts +1 -1
  256. package/version.d.mts +1 -1
  257. package/version.d.ts +1 -1
  258. package/version.js +1 -1
  259. package/version.mjs +1 -1
@@ -257,6 +257,12 @@ export interface MessagingInboundMessagePayload {
257
257
  */
258
258
  id?: string;
259
259
 
260
+ /**
261
+ * WhatsApp message body. For message edits and revocations, inspect `type` and the
262
+ * corresponding `edit` or `revoke` object.
263
+ */
264
+ body?: MessagingInboundMessagePayload.Body;
265
+
260
266
  cc?: Array<MessagingInboundMessagePayload.Cc>;
261
267
 
262
268
  /**
@@ -359,12 +365,16 @@ export interface MessagingInboundMessagePayload {
359
365
  */
360
366
  text?: string;
361
367
 
362
- to?: Array<MessagingInboundMessagePayload.To>;
368
+ /**
369
+ * Receiving address. SMS and MMS webhooks use an array of recipients. WhatsApp
370
+ * webhooks use one E.164 phone number.
371
+ */
372
+ to?: Array<MessagingInboundMessagePayload.UnionMember0> | string;
363
373
 
364
374
  /**
365
- * The type of message. This value can be either 'sms' or 'mms'.
375
+ * The messaging channel used for the message.
366
376
  */
367
- type?: 'SMS' | 'MMS';
377
+ type?: 'SMS' | 'MMS' | 'WHATSAPP';
368
378
 
369
379
  /**
370
380
  * Not used for inbound messages.
@@ -384,6 +394,79 @@ export interface MessagingInboundMessagePayload {
384
394
  }
385
395
 
386
396
  export namespace MessagingInboundMessagePayload {
397
+ /**
398
+ * WhatsApp message body. For message edits and revocations, inspect `type` and the
399
+ * corresponding `edit` or `revoke` object.
400
+ */
401
+ export interface Body {
402
+ /**
403
+ * Telnyx identifier for this webhook message.
404
+ */
405
+ id?: string;
406
+
407
+ /**
408
+ * Details for an edited WhatsApp message.
409
+ */
410
+ edit?: Body.Edit;
411
+
412
+ /**
413
+ * Meta WhatsApp message identifier for this webhook event.
414
+ */
415
+ foreign_id?: string;
416
+
417
+ /**
418
+ * WhatsApp sender in E.164 format.
419
+ */
420
+ from?: string;
421
+
422
+ /**
423
+ * Details for a revoked WhatsApp message.
424
+ */
425
+ revoke?: Body.Revoke;
426
+
427
+ /**
428
+ * Unix timestamp supplied by Meta.
429
+ */
430
+ timestamp?: string;
431
+
432
+ /**
433
+ * WhatsApp message body type. Edit and revoke events use `edit` and `revoke`,
434
+ * respectively.
435
+ */
436
+ type?: string;
437
+
438
+ [k: string]: unknown;
439
+ }
440
+
441
+ export namespace Body {
442
+ /**
443
+ * Details for an edited WhatsApp message.
444
+ */
445
+ export interface Edit {
446
+ /**
447
+ * Replacement WhatsApp message content. Its shape depends on the message type.
448
+ */
449
+ message: { [key: string]: unknown };
450
+
451
+ /**
452
+ * Telnyx message ID when a mapping exists, otherwise the original Meta WhatsApp
453
+ * message ID. Treat this value as opaque.
454
+ */
455
+ original_message_id: string;
456
+ }
457
+
458
+ /**
459
+ * Details for a revoked WhatsApp message.
460
+ */
461
+ export interface Revoke {
462
+ /**
463
+ * Telnyx message ID when a mapping exists, otherwise the original Meta WhatsApp
464
+ * message ID. Treat this value as opaque.
465
+ */
466
+ original_message_id: string;
467
+ }
468
+ }
469
+
387
470
  export interface Cc {
388
471
  /**
389
472
  * The carrier of the receiver.
@@ -414,12 +497,12 @@ export namespace MessagingInboundMessagePayload {
414
497
  /**
415
498
  * The amount deducted from your account.
416
499
  */
417
- amount?: string;
500
+ amount?: string | null;
418
501
 
419
502
  /**
420
503
  * The ISO 4217 currency identifier.
421
504
  */
422
- currency?: string;
505
+ currency?: string | null;
423
506
  }
424
507
 
425
508
  /**
@@ -499,7 +582,7 @@ export namespace MessagingInboundMessagePayload {
499
582
  url?: string;
500
583
  }
501
584
 
502
- export interface To {
585
+ export interface UnionMember0 {
503
586
  /**
504
587
  * The carrier of the receiver.
505
588
  */
@@ -18,6 +18,7 @@ export {
18
18
  MessagingProfiles,
19
19
  type MessagingMessagingProfile,
20
20
  type MessagingProfile,
21
+ type MessagingProfileFeatures,
21
22
  type NumberPoolSettings,
22
23
  type URLShortenerSettings,
23
24
  type MessagingProfileCreateResponse,
@@ -273,6 +273,13 @@ export interface MessagingMessagingProfile {
273
273
  */
274
274
  enabled?: boolean;
275
275
 
276
+ /**
277
+ * Telnyx product features the messaging customer can enable on the messaging
278
+ * profile. Keys map to individual feature flags; unknown keys are accepted and
279
+ * preserved for forward compatibility with rolling deployments.
280
+ */
281
+ features?: MessagingProfileFeatures | null;
282
+
276
283
  /**
277
284
  * DEPRECATED: health check url service checking
278
285
  */
@@ -543,6 +550,23 @@ export interface MessagingProfile {
543
550
  whitelisted_destinations?: Array<string>;
544
551
  }
545
552
 
553
+ /**
554
+ * Telnyx product features the messaging customer can enable on the messaging
555
+ * profile. Keys map to individual feature flags; unknown keys are accepted and
556
+ * preserved for forward compatibility with rolling deployments.
557
+ */
558
+ export interface MessagingProfileFeatures {
559
+ /**
560
+ * Enables AI detection of inbound opt-out messages that do not follow the standard
561
+ * STOP/UNSTOP/HELP opt-out keyword pattern. When enabled, the messaging platform
562
+ * applies an AI model to identify non-standard opt-out requests (e.g.
563
+ * natural-language phrases) and treats them as opt-outs.
564
+ */
565
+ ai_opt_out_detection_enabled?: boolean;
566
+
567
+ [k: string]: unknown;
568
+ }
569
+
546
570
  /**
547
571
  * Number Pool allows you to send messages from a pool of numbers of different
548
572
  * types, assigning weights to each type. The pool consists of all the long code
@@ -720,6 +744,13 @@ export interface MessagingProfileCreateParams {
720
744
  */
721
745
  enabled?: boolean;
722
746
 
747
+ /**
748
+ * Telnyx product features the messaging customer can enable on the messaging
749
+ * profile. Keys map to individual feature flags; unknown keys are accepted and
750
+ * preserved for forward compatibility with rolling deployments.
751
+ */
752
+ features?: MessagingProfileFeatures | null;
753
+
723
754
  /**
724
755
  * A URL to receive health check webhooks for numbers in this profile.
725
756
  */
@@ -818,6 +849,13 @@ export interface MessagingProfileUpdateParams {
818
849
  */
819
850
  enabled?: boolean;
820
851
 
852
+ /**
853
+ * Telnyx product features the messaging customer can enable on the messaging
854
+ * profile. Keys map to individual feature flags; unknown keys are accepted and
855
+ * preserved for forward compatibility with rolling deployments.
856
+ */
857
+ features?: MessagingProfileFeatures | null;
858
+
821
859
  /**
822
860
  * enables SMS fallback for MMS messages.
823
861
  */
@@ -932,6 +970,7 @@ export declare namespace MessagingProfiles {
932
970
  export {
933
971
  type MessagingMessagingProfile as MessagingMessagingProfile,
934
972
  type MessagingProfile as MessagingProfile,
973
+ type MessagingProfileFeatures as MessagingProfileFeatures,
935
974
  type NumberPoolSettings as NumberPoolSettings,
936
975
  type URLShortenerSettings as URLShortenerSettings,
937
976
  type MessagingProfileCreateResponse as MessagingProfileCreateResponse,
@@ -247,7 +247,10 @@ export interface UacConnection {
247
247
 
248
248
  /**
249
249
  * The password to be used as part of the credentials. Must be 8 to 128 characters
250
- * long.
250
+ * long. For primary accounts created on or after September 8, 2026, this password
251
+ * is returned as `********`. The password is returned in full on create, and on
252
+ * update only when that update changed the password. Accounts created before
253
+ * September 8, 2026 are unaffected.
251
254
  */
252
255
  password?: string;
253
256
 
@@ -348,7 +351,11 @@ export interface UacExternalSettings {
348
351
  outbound_proxy?: string | null;
349
352
 
350
353
  /**
351
- * The SIP password used for digest authentication with the external SIP peer.
354
+ * The SIP password used for digest authentication with the external SIP peer. For
355
+ * primary accounts created on or after September 8, 2026, this password is
356
+ * returned as `********`. The password is returned in full on create, and on
357
+ * update only when that update changed the password. Accounts created before
358
+ * September 8, 2026 are unaffected.
352
359
  */
353
360
  password?: string;
354
361
 
@@ -4500,6 +4500,175 @@ export namespace Transcription {
4500
4500
  }
4501
4501
  }
4502
4502
 
4503
+ export interface WhatsappAccountUpdate {
4504
+ data: WhatsappAccountUpdate.Data;
4505
+ }
4506
+
4507
+ export namespace WhatsappAccountUpdate {
4508
+ export interface Data {
4509
+ id: string;
4510
+
4511
+ event_type: 'whatsapp.account.update';
4512
+
4513
+ occurred_at: string;
4514
+
4515
+ payload: Data.Payload;
4516
+
4517
+ record_type: 'event';
4518
+ }
4519
+
4520
+ export namespace Data {
4521
+ export interface Payload {
4522
+ /**
4523
+ * Account event reported by Meta. Coexistence lifecycle values include
4524
+ * `ACCOUNT_OFFBOARDED`, `ACCOUNT_RECONNECTED`, and `PARTNER_REMOVED`. Preserve
4525
+ * unknown values for forward compatibility.
4526
+ */
4527
+ event: string;
4528
+
4529
+ record_type: 'whatsapp_account';
4530
+
4531
+ /**
4532
+ * Meta WhatsApp Business Account identifier.
4533
+ */
4534
+ waba_id: string;
4535
+ }
4536
+ }
4537
+ }
4538
+
4539
+ export interface WhatsappMessageEcho {
4540
+ data: WhatsappMessageEcho.Data;
4541
+ }
4542
+
4543
+ export namespace WhatsappMessageEcho {
4544
+ export interface Data {
4545
+ id: string;
4546
+
4547
+ event_type: 'message.echo';
4548
+
4549
+ occurred_at: string;
4550
+
4551
+ payload: Data.Payload;
4552
+
4553
+ record_type: 'event';
4554
+ }
4555
+
4556
+ export namespace Data {
4557
+ export interface Payload {
4558
+ /**
4559
+ * Telnyx identifier for the mirrored message.
4560
+ */
4561
+ id: string;
4562
+
4563
+ /**
4564
+ * Mirrored WhatsApp message content. The content property matches the value of
4565
+ * `type`.
4566
+ */
4567
+ body: Payload.Body;
4568
+
4569
+ /**
4570
+ * No charge is created for a Business app message echo.
4571
+ */
4572
+ cost: Payload.Cost;
4573
+
4574
+ /**
4575
+ * Indicates that the business sent the message to the WhatsApp user.
4576
+ */
4577
+ direction: 'outbound';
4578
+
4579
+ errors: Array<MessagesAPI.MessagingError0b38e7044b>;
4580
+
4581
+ from: Payload.From;
4582
+
4583
+ messaging_profile_id: string;
4584
+
4585
+ organization_id: string;
4586
+
4587
+ /**
4588
+ * Identifies the WhatsApp Business app as the source of the message.
4589
+ */
4590
+ origin: 'whatsapp_business_app';
4591
+
4592
+ record_type: 'message';
4593
+
4594
+ /**
4595
+ * WhatsApp user who received the Business app message.
4596
+ */
4597
+ to: string;
4598
+
4599
+ type: 'WHATSAPP';
4600
+
4601
+ received_at?: string;
4602
+
4603
+ tags?: Array<string>;
4604
+
4605
+ webhook_failover_url?: string | null;
4606
+
4607
+ webhook_url?: string | null;
4608
+ }
4609
+
4610
+ export namespace Payload {
4611
+ /**
4612
+ * Mirrored WhatsApp message content. The content property matches the value of
4613
+ * `type`.
4614
+ */
4615
+ export interface Body {
4616
+ /**
4617
+ * Telnyx identifier for the mirrored message.
4618
+ */
4619
+ id: string;
4620
+
4621
+ /**
4622
+ * Meta WhatsApp message identifier, also known as a wamid.
4623
+ */
4624
+ foreign_id: string;
4625
+
4626
+ /**
4627
+ * Unix timestamp supplied by Meta.
4628
+ */
4629
+ timestamp: string;
4630
+
4631
+ /**
4632
+ * WhatsApp message content type.
4633
+ */
4634
+ type: string;
4635
+
4636
+ /**
4637
+ * WhatsApp user who received the message.
4638
+ */
4639
+ from?: string;
4640
+
4641
+ /**
4642
+ * Opaque recipient identifier when Meta does not supply a phone number.
4643
+ */
4644
+ from_user_id?: string;
4645
+
4646
+ [k: string]: unknown;
4647
+ }
4648
+
4649
+ /**
4650
+ * No charge is created for a Business app message echo.
4651
+ */
4652
+ export interface Cost {
4653
+ amount?: string | null;
4654
+
4655
+ currency?: string | null;
4656
+ }
4657
+
4658
+ export interface From {
4659
+ /**
4660
+ * Coexistence-enabled business phone number in E.164 format.
4661
+ */
4662
+ phone_number: string;
4663
+
4664
+ carrier?: string;
4665
+
4666
+ line_type?: string;
4667
+ }
4668
+ }
4669
+ }
4670
+ }
4671
+
4503
4672
  export interface CallAIGatherEndedWebhookEvent {
4504
4673
  data?: CallAIGatherEnded;
4505
4674
  }
@@ -7751,7 +7920,9 @@ export type UnsafeUnwrapWebhookEvent =
7751
7920
  | ReplacedLinkClickWebhookEvent
7752
7921
  | SessionStatusChangedWebhookEvent
7753
7922
  | TranscriptCompletedWebhookEvent
7754
- | TranscriptionWebhookEvent;
7923
+ | TranscriptionWebhookEvent
7924
+ | WhatsappAccountUpdate
7925
+ | WhatsappMessageEcho;
7755
7926
 
7756
7927
  export type UnwrapWebhookEvent =
7757
7928
  | CallAIGatherEndedWebhookEvent
@@ -7826,7 +7997,9 @@ export type UnwrapWebhookEvent =
7826
7997
  | ReplacedLinkClickWebhookEvent
7827
7998
  | SessionStatusChangedWebhookEvent
7828
7999
  | TranscriptCompletedWebhookEvent
7829
- | TranscriptionWebhookEvent;
8000
+ | TranscriptionWebhookEvent
8001
+ | WhatsappAccountUpdate
8002
+ | WhatsappMessageEcho;
7830
8003
 
7831
8004
  export declare namespace Webhooks {
7832
8005
  export {
@@ -7891,6 +8064,8 @@ export declare namespace Webhooks {
7891
8064
  type OutboundMessage as OutboundMessage,
7892
8065
  type ReplacedLinkClick as ReplacedLinkClick,
7893
8066
  type Transcription as Transcription,
8067
+ type WhatsappAccountUpdate as WhatsappAccountUpdate,
8068
+ type WhatsappMessageEcho as WhatsappMessageEcho,
7894
8069
  type CallAIGatherEndedWebhookEvent as CallAIGatherEndedWebhookEvent,
7895
8070
  type CallAIGatherMessageHistoryUpdatedWebhookEvent as CallAIGatherMessageHistoryUpdatedWebhookEvent,
7896
8071
  type CallAIGatherPartialResultsWebhookEvent as CallAIGatherPartialResultsWebhookEvent,
@@ -72,12 +72,34 @@ export type PhoneNumberListResponsesDefaultFlatPagination = DefaultFlatPaginatio
72
72
  export interface PhoneNumberListResponse {
73
73
  calling_enabled?: boolean;
74
74
 
75
+ /**
76
+ * Current lifecycle state for a coexistence number. This is null for a standard
77
+ * Cloud API number.
78
+ */
79
+ coexistence_state?:
80
+ | 'pending_onboarding'
81
+ | 'sync_pending'
82
+ | 'syncing'
83
+ | 'sync_complete'
84
+ | 'active'
85
+ | 'history_declined'
86
+ | 'sync_deadline_expired'
87
+ | 'offboarded'
88
+ | 'disconnected'
89
+ | null;
90
+
75
91
  created_at?: string;
76
92
 
77
93
  display_name?: string;
78
94
 
79
95
  enabled?: boolean;
80
96
 
97
+ /**
98
+ * Indicates whether the number is connected to both the WhatsApp Business app and
99
+ * Cloud API through WhatsApp Coexistence.
100
+ */
101
+ is_on_biz_app?: boolean;
102
+
81
103
  /**
82
104
  * Phone number in E164 format
83
105
  */
@@ -97,6 +119,18 @@ export interface PhoneNumberListResponse {
97
119
 
98
120
  status?: string;
99
121
 
122
+ /**
123
+ * Deadline for initiating the current coexistence synchronization cycle. This is
124
+ * null when no deadline applies.
125
+ */
126
+ sync_deadline?: string | null;
127
+
128
+ /**
129
+ * Synchronization progress. This object is returned only while a coexistence
130
+ * number is synchronizing.
131
+ */
132
+ sync_progress?: PhoneNumberListResponse.SyncProgress | null;
133
+
100
134
  /**
101
135
  * User ID
102
136
  */
@@ -108,6 +142,24 @@ export interface PhoneNumberListResponse {
108
142
  waba_id?: string;
109
143
  }
110
144
 
145
+ export namespace PhoneNumberListResponse {
146
+ /**
147
+ * Synchronization progress. This object is returned only while a coexistence
148
+ * number is synchronizing.
149
+ */
150
+ export interface SyncProgress {
151
+ contacts_status?: string;
152
+
153
+ history_chunk_order?: number | null;
154
+
155
+ history_phase?: number | null;
156
+
157
+ history_progress?: number | null;
158
+
159
+ history_status?: string;
160
+ }
161
+ }
162
+
111
163
  export interface PhoneNumberListParams extends DefaultFlatPaginationParams {}
112
164
 
113
165
  export interface PhoneNumberInitializeVerificationParams {
@@ -12,6 +12,7 @@ export {
12
12
  type PhoneNumberListResponse,
13
13
  type PhoneNumberGetResponse,
14
14
  type PhoneNumberRetrieveConversationWindowResponse,
15
+ type PhoneNumberRetrievePhoneNumberResponse,
15
16
  type PhoneNumberListParams,
16
17
  type PhoneNumberResendVerificationParams,
17
18
  type PhoneNumberVerifyParams,
@@ -19,6 +19,7 @@ export {
19
19
  type PhoneNumberListResponse,
20
20
  type PhoneNumberGetResponse,
21
21
  type PhoneNumberRetrieveConversationWindowResponse,
22
+ type PhoneNumberRetrievePhoneNumberResponse,
22
23
  type PhoneNumberListParams,
23
24
  type PhoneNumberResendVerificationParams,
24
25
  type PhoneNumberVerifyParams,