telnyx 7.20.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 (278) hide show
  1. package/CHANGELOG.md +14 -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/anthropic/v1.d.mts +16 -0
  18. package/resources/ai/anthropic/v1.d.mts.map +1 -1
  19. package/resources/ai/anthropic/v1.d.ts +16 -0
  20. package/resources/ai/anthropic/v1.d.ts.map +1 -1
  21. package/resources/ai/assistants/assistants.d.mts +152 -1
  22. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  23. package/resources/ai/assistants/assistants.d.ts +152 -1
  24. package/resources/ai/assistants/assistants.d.ts.map +1 -1
  25. package/resources/ai/assistants/assistants.js.map +1 -1
  26. package/resources/ai/assistants/assistants.mjs.map +1 -1
  27. package/resources/ai/assistants/index.d.mts +1 -1
  28. package/resources/ai/assistants/index.d.mts.map +1 -1
  29. package/resources/ai/assistants/index.d.ts +1 -1
  30. package/resources/ai/assistants/index.d.ts.map +1 -1
  31. package/resources/ai/assistants/index.js.map +1 -1
  32. package/resources/ai/assistants/index.mjs.map +1 -1
  33. package/resources/ai/assistants/versions.d.mts +25 -0
  34. package/resources/ai/assistants/versions.d.mts.map +1 -1
  35. package/resources/ai/assistants/versions.d.ts +25 -0
  36. package/resources/ai/assistants/versions.d.ts.map +1 -1
  37. package/resources/ai/chat.d.mts +77 -22
  38. package/resources/ai/chat.d.mts.map +1 -1
  39. package/resources/ai/chat.d.ts +77 -22
  40. package/resources/ai/chat.d.ts.map +1 -1
  41. package/resources/ai/index.d.mts +1 -1
  42. package/resources/ai/index.d.mts.map +1 -1
  43. package/resources/ai/index.d.ts +1 -1
  44. package/resources/ai/index.d.ts.map +1 -1
  45. package/resources/ai/index.js.map +1 -1
  46. package/resources/ai/index.mjs.map +1 -1
  47. package/resources/ai/openai/chat.d.mts +77 -22
  48. package/resources/ai/openai/chat.d.mts.map +1 -1
  49. package/resources/ai/openai/chat.d.ts +77 -22
  50. package/resources/ai/openai/chat.d.ts.map +1 -1
  51. package/resources/ai/openai/openai.d.mts +16 -0
  52. package/resources/ai/openai/openai.d.mts.map +1 -1
  53. package/resources/ai/openai/openai.d.ts +16 -0
  54. package/resources/ai/openai/openai.d.ts.map +1 -1
  55. package/resources/ai/openai/openai.js.map +1 -1
  56. package/resources/ai/openai/openai.mjs.map +1 -1
  57. package/resources/compute/compute.d.mts +10 -0
  58. package/resources/compute/compute.d.mts.map +1 -0
  59. package/resources/compute/compute.d.ts +10 -0
  60. package/resources/compute/compute.d.ts.map +1 -0
  61. package/resources/compute/compute.js +17 -0
  62. package/resources/compute/compute.js.map +1 -0
  63. package/resources/compute/compute.mjs +12 -0
  64. package/resources/compute/compute.mjs.map +1 -0
  65. package/resources/compute/funcs.d.mts +179 -0
  66. package/resources/compute/funcs.d.mts.map +1 -0
  67. package/resources/compute/funcs.d.ts +179 -0
  68. package/resources/compute/funcs.d.ts.map +1 -0
  69. package/resources/compute/funcs.js +41 -0
  70. package/resources/compute/funcs.js.map +1 -0
  71. package/resources/compute/funcs.mjs +37 -0
  72. package/resources/compute/funcs.mjs.map +1 -0
  73. package/resources/compute/index.d.mts +3 -0
  74. package/resources/compute/index.d.mts.map +1 -0
  75. package/resources/compute/index.d.ts +3 -0
  76. package/resources/compute/index.d.ts.map +1 -0
  77. package/resources/compute/index.js +9 -0
  78. package/resources/compute/index.js.map +1 -0
  79. package/resources/compute/index.mjs +4 -0
  80. package/resources/compute/index.mjs.map +1 -0
  81. package/resources/compute.d.mts +2 -0
  82. package/resources/compute.d.mts.map +1 -0
  83. package/resources/compute.d.ts +2 -0
  84. package/resources/compute.d.ts.map +1 -0
  85. package/resources/compute.js +6 -0
  86. package/resources/compute.js.map +1 -0
  87. package/resources/compute.mjs +3 -0
  88. package/resources/compute.mjs.map +1 -0
  89. package/resources/credential-connections/credential-connections.d.mts +4 -1
  90. package/resources/credential-connections/credential-connections.d.mts.map +1 -1
  91. package/resources/credential-connections/credential-connections.d.ts +4 -1
  92. package/resources/credential-connections/credential-connections.d.ts.map +1 -1
  93. package/resources/credential-connections/credential-connections.js.map +1 -1
  94. package/resources/credential-connections/credential-connections.mjs.map +1 -1
  95. package/resources/email-inboxes/drafts.d.mts +7 -0
  96. package/resources/email-inboxes/drafts.d.mts.map +1 -1
  97. package/resources/email-inboxes/drafts.d.ts +7 -0
  98. package/resources/email-inboxes/drafts.d.ts.map +1 -1
  99. package/resources/email-messages/email-messages.d.mts +7 -3
  100. package/resources/email-messages/email-messages.d.mts.map +1 -1
  101. package/resources/email-messages/email-messages.d.ts +7 -3
  102. package/resources/email-messages/email-messages.d.ts.map +1 -1
  103. package/resources/email-messages/email-messages.js +3 -1
  104. package/resources/email-messages/email-messages.js.map +1 -1
  105. package/resources/email-messages/email-messages.mjs +3 -1
  106. package/resources/email-messages/email-messages.mjs.map +1 -1
  107. package/resources/fqdn-connections/fqdn-authentication.d.mts +4 -1
  108. package/resources/fqdn-connections/fqdn-authentication.d.mts.map +1 -1
  109. package/resources/fqdn-connections/fqdn-authentication.d.ts +4 -1
  110. package/resources/fqdn-connections/fqdn-authentication.d.ts.map +1 -1
  111. package/resources/fqdn-connections/fqdn-connections.d.mts +4 -1
  112. package/resources/fqdn-connections/fqdn-connections.d.mts.map +1 -1
  113. package/resources/fqdn-connections/fqdn-connections.d.ts +4 -1
  114. package/resources/fqdn-connections/fqdn-connections.d.ts.map +1 -1
  115. package/resources/fqdn-connections/fqdn-connections.js.map +1 -1
  116. package/resources/fqdn-connections/fqdn-connections.mjs.map +1 -1
  117. package/resources/index.d.mts +3 -2
  118. package/resources/index.d.mts.map +1 -1
  119. package/resources/index.d.ts +3 -2
  120. package/resources/index.d.ts.map +1 -1
  121. package/resources/index.js +6 -4
  122. package/resources/index.js.map +1 -1
  123. package/resources/index.mjs +1 -0
  124. package/resources/index.mjs.map +1 -1
  125. package/resources/messages/messages.d.mts +79 -6
  126. package/resources/messages/messages.d.mts.map +1 -1
  127. package/resources/messages/messages.d.ts +79 -6
  128. package/resources/messages/messages.d.ts.map +1 -1
  129. package/resources/messages/messages.js.map +1 -1
  130. package/resources/messages/messages.mjs.map +1 -1
  131. package/resources/messaging-profiles/actions.d.mts +1 -1
  132. package/resources/messaging-profiles/actions.d.mts.map +1 -1
  133. package/resources/messaging-profiles/actions.d.ts +1 -1
  134. package/resources/messaging-profiles/actions.d.ts.map +1 -1
  135. package/resources/messaging-profiles/index.d.mts +1 -1
  136. package/resources/messaging-profiles/index.d.mts.map +1 -1
  137. package/resources/messaging-profiles/index.d.ts +1 -1
  138. package/resources/messaging-profiles/index.d.ts.map +1 -1
  139. package/resources/messaging-profiles/index.js.map +1 -1
  140. package/resources/messaging-profiles/index.mjs.map +1 -1
  141. package/resources/messaging-profiles/messaging-profiles.d.mts +185 -8
  142. package/resources/messaging-profiles/messaging-profiles.d.mts.map +1 -1
  143. package/resources/messaging-profiles/messaging-profiles.d.ts +185 -8
  144. package/resources/messaging-profiles/messaging-profiles.d.ts.map +1 -1
  145. package/resources/messaging-profiles/messaging-profiles.js +1 -1
  146. package/resources/messaging-profiles/messaging-profiles.js.map +1 -1
  147. package/resources/messaging-profiles/messaging-profiles.mjs +1 -1
  148. package/resources/messaging-profiles/messaging-profiles.mjs.map +1 -1
  149. package/resources/uac-connections/uac-connections.d.mts +9 -2
  150. package/resources/uac-connections/uac-connections.d.mts.map +1 -1
  151. package/resources/uac-connections/uac-connections.d.ts +9 -2
  152. package/resources/uac-connections/uac-connections.d.ts.map +1 -1
  153. package/resources/uac-connections/uac-connections.js.map +1 -1
  154. package/resources/uac-connections/uac-connections.mjs.map +1 -1
  155. package/resources/webhooks.d.mts +129 -3
  156. package/resources/webhooks.d.mts.map +1 -1
  157. package/resources/webhooks.d.ts +129 -3
  158. package/resources/webhooks.d.ts.map +1 -1
  159. package/resources/whatsapp/business-accounts/phone-numbers.d.mts +33 -0
  160. package/resources/whatsapp/business-accounts/phone-numbers.d.mts.map +1 -1
  161. package/resources/whatsapp/business-accounts/phone-numbers.d.ts +33 -0
  162. package/resources/whatsapp/business-accounts/phone-numbers.d.ts.map +1 -1
  163. package/resources/whatsapp/index.d.mts +1 -1
  164. package/resources/whatsapp/index.d.mts.map +1 -1
  165. package/resources/whatsapp/index.d.ts +1 -1
  166. package/resources/whatsapp/index.d.ts.map +1 -1
  167. package/resources/whatsapp/index.js.map +1 -1
  168. package/resources/whatsapp/index.mjs.map +1 -1
  169. package/resources/whatsapp/phone-numbers/index.d.mts +1 -1
  170. package/resources/whatsapp/phone-numbers/index.d.mts.map +1 -1
  171. package/resources/whatsapp/phone-numbers/index.d.ts +1 -1
  172. package/resources/whatsapp/phone-numbers/index.d.ts.map +1 -1
  173. package/resources/whatsapp/phone-numbers/index.js.map +1 -1
  174. package/resources/whatsapp/phone-numbers/index.mjs.map +1 -1
  175. package/resources/whatsapp/phone-numbers/phone-numbers.d.mts +147 -1
  176. package/resources/whatsapp/phone-numbers/phone-numbers.d.mts.map +1 -1
  177. package/resources/whatsapp/phone-numbers/phone-numbers.d.ts +147 -1
  178. package/resources/whatsapp/phone-numbers/phone-numbers.d.ts.map +1 -1
  179. package/resources/whatsapp/phone-numbers/phone-numbers.js +16 -0
  180. package/resources/whatsapp/phone-numbers/phone-numbers.js.map +1 -1
  181. package/resources/whatsapp/phone-numbers/phone-numbers.mjs +16 -0
  182. package/resources/whatsapp/phone-numbers/phone-numbers.mjs.map +1 -1
  183. package/resources/whatsapp/whatsapp.d.mts +2 -2
  184. package/resources/whatsapp/whatsapp.d.mts.map +1 -1
  185. package/resources/whatsapp/whatsapp.d.ts +2 -2
  186. package/resources/whatsapp/whatsapp.d.ts.map +1 -1
  187. package/resources/whatsapp/whatsapp.js.map +1 -1
  188. package/resources/whatsapp/whatsapp.mjs.map +1 -1
  189. package/resources/x402/credit-account/credit-account.d.mts +226 -0
  190. package/resources/x402/credit-account/credit-account.d.mts.map +1 -0
  191. package/resources/x402/credit-account/credit-account.d.ts +226 -0
  192. package/resources/x402/credit-account/credit-account.d.ts.map +1 -0
  193. package/resources/x402/credit-account/credit-account.js +66 -0
  194. package/resources/x402/credit-account/credit-account.js.map +1 -0
  195. package/resources/x402/credit-account/credit-account.mjs +61 -0
  196. package/resources/x402/credit-account/credit-account.mjs.map +1 -0
  197. package/resources/x402/credit-account/index.d.mts +3 -0
  198. package/resources/x402/credit-account/index.d.mts.map +1 -0
  199. package/resources/x402/credit-account/index.d.ts +3 -0
  200. package/resources/x402/credit-account/index.d.ts.map +1 -0
  201. package/resources/x402/credit-account/index.js +9 -0
  202. package/resources/x402/credit-account/index.js.map +1 -0
  203. package/resources/x402/credit-account/index.mjs +4 -0
  204. package/resources/x402/credit-account/index.mjs.map +1 -0
  205. package/resources/x402/credit-account/payments.d.mts +90 -0
  206. package/resources/x402/credit-account/payments.d.mts.map +1 -0
  207. package/resources/x402/credit-account/payments.d.ts +90 -0
  208. package/resources/x402/credit-account/payments.d.ts.map +1 -0
  209. package/resources/x402/credit-account/payments.js +47 -0
  210. package/resources/x402/credit-account/payments.js.map +1 -0
  211. package/resources/x402/credit-account/payments.mjs +43 -0
  212. package/resources/x402/credit-account/payments.mjs.map +1 -0
  213. package/resources/x402/credit-account.d.mts +1 -221
  214. package/resources/x402/credit-account.d.mts.map +1 -1
  215. package/resources/x402/credit-account.d.ts +1 -221
  216. package/resources/x402/credit-account.d.ts.map +1 -1
  217. package/resources/x402/credit-account.js +2 -54
  218. package/resources/x402/credit-account.js.map +1 -1
  219. package/resources/x402/credit-account.mjs +1 -52
  220. package/resources/x402/credit-account.mjs.map +1 -1
  221. package/resources/x402/index.d.mts +1 -1
  222. package/resources/x402/index.d.mts.map +1 -1
  223. package/resources/x402/index.d.ts +1 -1
  224. package/resources/x402/index.d.ts.map +1 -1
  225. package/resources/x402/index.js +2 -2
  226. package/resources/x402/index.js.map +1 -1
  227. package/resources/x402/index.mjs +1 -1
  228. package/resources/x402/index.mjs.map +1 -1
  229. package/resources/x402/x402.d.mts +2 -2
  230. package/resources/x402/x402.d.mts.map +1 -1
  231. package/resources/x402/x402.d.ts +2 -2
  232. package/resources/x402/x402.d.ts.map +1 -1
  233. package/resources/x402/x402.js +2 -2
  234. package/resources/x402/x402.js.map +1 -1
  235. package/resources/x402/x402.mjs +2 -2
  236. package/resources/x402/x402.mjs.map +1 -1
  237. package/src/client.ts +15 -2
  238. package/src/resources/ai/ai.ts +2 -0
  239. package/src/resources/ai/anthropic/v1.ts +18 -0
  240. package/src/resources/ai/assistants/assistants.ts +173 -0
  241. package/src/resources/ai/assistants/index.ts +1 -0
  242. package/src/resources/ai/assistants/versions.ts +27 -0
  243. package/src/resources/ai/chat.ts +87 -23
  244. package/src/resources/ai/index.ts +1 -0
  245. package/src/resources/ai/openai/chat.ts +87 -23
  246. package/src/resources/ai/openai/openai.ts +18 -0
  247. package/src/resources/compute/compute.ts +37 -0
  248. package/src/resources/compute/funcs.ts +298 -0
  249. package/src/resources/compute/index.ts +15 -0
  250. package/src/resources/compute.ts +3 -0
  251. package/src/resources/credential-connections/credential-connections.ts +4 -1
  252. package/src/resources/email-inboxes/drafts.ts +8 -0
  253. package/src/resources/email-messages/email-messages.ts +7 -2
  254. package/src/resources/fqdn-connections/fqdn-authentication.ts +4 -1
  255. package/src/resources/fqdn-connections/fqdn-connections.ts +4 -1
  256. package/src/resources/index.ts +6 -1
  257. package/src/resources/messages/messages.ts +89 -6
  258. package/src/resources/messaging-profiles/actions.ts +1 -1
  259. package/src/resources/messaging-profiles/index.ts +3 -1
  260. package/src/resources/messaging-profiles/messaging-profiles.ts +222 -9
  261. package/src/resources/uac-connections/uac-connections.ts +9 -2
  262. package/src/resources/webhooks.ts +177 -2
  263. package/src/resources/whatsapp/business-accounts/phone-numbers.ts +52 -0
  264. package/src/resources/whatsapp/index.ts +1 -0
  265. package/src/resources/whatsapp/phone-numbers/index.ts +1 -0
  266. package/src/resources/whatsapp/phone-numbers/phone-numbers.ts +222 -0
  267. package/src/resources/whatsapp/whatsapp.ts +2 -0
  268. package/src/resources/x402/credit-account/credit-account.ts +312 -0
  269. package/src/resources/x402/credit-account/index.ts +16 -0
  270. package/src/resources/x402/credit-account/payments.ts +126 -0
  271. package/src/resources/x402/credit-account.ts +1 -290
  272. package/src/resources/x402/index.ts +1 -1
  273. package/src/resources/x402/x402.ts +2 -2
  274. package/src/version.ts +1 -1
  275. package/version.d.mts +1 -1
  276. package/version.d.ts +1 -1
  277. package/version.js +1 -1
  278. 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
  */
@@ -24,7 +24,7 @@ export class Actions extends APIResource {
24
24
  }
25
25
 
26
26
  export interface ActionRegenerateSecretResponse {
27
- data?: MessagingProfilesAPI.MessagingProfile;
27
+ data?: MessagingProfilesAPI.MessagingMessagingProfile;
28
28
  }
29
29
 
30
30
  export declare namespace Actions {
@@ -16,7 +16,9 @@ export {
16
16
  } from './autoresp-configs';
17
17
  export {
18
18
  MessagingProfiles,
19
+ type MessagingMessagingProfile,
19
20
  type MessagingProfile,
21
+ type MessagingProfileFeatures,
20
22
  type NumberPoolSettings,
21
23
  type URLShortenerSettings,
22
24
  type MessagingProfileCreateResponse,
@@ -31,5 +33,5 @@ export {
31
33
  type MessagingProfileListShortCodesParams,
32
34
  type MessagingProfileListAlphanumericSenderIDsParams,
33
35
  type MessagingProfileRetrieveMetricsParams,
34
- type MessagingProfilesDefaultFlatPagination,
36
+ type MessagingMessagingProfilesDefaultFlatPagination,
35
37
  } from './messaging-profiles';
@@ -41,7 +41,7 @@ export class MessagingProfiles extends APIResource {
41
41
  * @example
42
42
  * ```ts
43
43
  * // Automatically fetches more pages as needed.
44
- * for await (const messagingProfile of client.messagingProfiles.list()) {
44
+ * for await (const messagingMessagingProfile of client.messagingProfiles.list()) {
45
45
  * // ...
46
46
  * }
47
47
  * ```
@@ -49,8 +49,8 @@ export class MessagingProfiles extends APIResource {
49
49
  list(
50
50
  query: MessagingProfileListParams | null | undefined = {},
51
51
  options?: RequestOptions,
52
- ): PagePromise<MessagingProfilesDefaultFlatPagination, MessagingProfile> {
53
- return this._client.getAPIList('/messaging_profiles', DefaultFlatPagination<MessagingProfile>, {
52
+ ): PagePromise<MessagingMessagingProfilesDefaultFlatPagination, MessagingMessagingProfile> {
53
+ return this._client.getAPIList('/messaging_profiles', DefaultFlatPagination<MessagingMessagingProfile>, {
54
54
  query,
55
55
  ...options,
56
56
  });
@@ -232,7 +232,172 @@ export class MessagingProfiles extends APIResource {
232
232
  }
233
233
  }
234
234
 
235
- export type MessagingProfilesDefaultFlatPagination = DefaultFlatPagination<MessagingProfile>;
235
+ export type MessagingMessagingProfilesDefaultFlatPagination =
236
+ DefaultFlatPagination<MessagingMessagingProfile>;
237
+
238
+ export interface MessagingMessagingProfile {
239
+ /**
240
+ * Identifies the type of resource.
241
+ */
242
+ id?: string;
243
+
244
+ /**
245
+ * The AI assistant ID associated with this messaging profile.
246
+ */
247
+ ai_assistant_id?: string | null;
248
+
249
+ /**
250
+ * The alphanumeric sender ID to use when sending to destinations that require an
251
+ * alphanumeric sender ID.
252
+ */
253
+ alpha_sender?: string | null;
254
+
255
+ /**
256
+ * ISO 8601 formatted date indicating when the resource was created.
257
+ */
258
+ created_at?: string;
259
+
260
+ /**
261
+ * The maximum amount of money (in USD) that can be spent by this profile before
262
+ * midnight UTC.
263
+ */
264
+ daily_spend_limit?: string;
265
+
266
+ /**
267
+ * Whether to enforce the value configured by `daily_spend_limit`.
268
+ */
269
+ daily_spend_limit_enabled?: boolean;
270
+
271
+ /**
272
+ * Specifies whether the messaging profile is enabled or not.
273
+ */
274
+ enabled?: boolean;
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
+
283
+ /**
284
+ * DEPRECATED: health check url service checking
285
+ */
286
+ health_webhook_url?: string | null;
287
+
288
+ /**
289
+ * enables SMS fallback for MMS messages.
290
+ */
291
+ mms_fall_back_to_sms?: boolean;
292
+
293
+ /**
294
+ * enables automated resizing of MMS media.
295
+ */
296
+ mms_transcoding?: boolean;
297
+
298
+ /**
299
+ * Send messages only to mobile phone numbers.
300
+ */
301
+ mobile_only?: boolean;
302
+
303
+ /**
304
+ * A user friendly name for the messaging profile.
305
+ */
306
+ name?: string;
307
+
308
+ /**
309
+ * Number Pool allows you to send messages from a pool of numbers of different
310
+ * types, assigning weights to each type. The pool consists of all the long code
311
+ * and toll free numbers assigned to the messaging profile.
312
+ *
313
+ * To disable this feature, set the object field to `null`.
314
+ */
315
+ number_pool_settings?: NumberPoolSettings | null;
316
+
317
+ /**
318
+ * The organization that owns this messaging profile.
319
+ */
320
+ organization_id?: string;
321
+
322
+ /**
323
+ * Identifies the type of the resource.
324
+ */
325
+ record_type?: 'messaging_profile';
326
+
327
+ /**
328
+ * Indicates whether message content redaction is enabled for this profile. When
329
+ * enabled, message text, MMS media, and the counterparty phone number are redacted
330
+ * in message records and reporting. Requires organization activation — contact
331
+ * support to enable. The field is only present in responses for organizations with
332
+ * redaction access.
333
+ */
334
+ redaction_enabled?: boolean;
335
+
336
+ /**
337
+ * Determines how much information is redacted for privacy or compliance purposes.
338
+ * Level 1: message records and reporting are redacted, but inbound webhook
339
+ * payloads are not. Level 2 (default): message records, reporting, and inbound
340
+ * webhook payloads are all redacted.
341
+ */
342
+ redaction_level?: number;
343
+
344
+ /**
345
+ * The resource group ID associated with this messaging profile.
346
+ */
347
+ resource_group_id?: string | null;
348
+
349
+ /**
350
+ * Enables automatic character encoding optimization for SMS messages. When
351
+ * enabled, the system automatically selects the most efficient encoding (GSM-7 or
352
+ * UCS-2) based on message content to maximize character limits and minimize costs.
353
+ */
354
+ smart_encoding?: boolean;
355
+
356
+ /**
357
+ * ISO 8601 formatted date indicating when the resource was updated.
358
+ */
359
+ updated_at?: string;
360
+
361
+ /**
362
+ * The URL shortener feature allows automatic replacement of URLs that were
363
+ * generated using a public URL shortener service. Some examples include bit.do,
364
+ * bit.ly, goo.gl, ht.ly, is.gd, ow.ly, rebrand.ly, t.co, tiny.cc, and tinyurl.com.
365
+ * Such URLs are replaced with with links generated by Telnyx. The use of custom
366
+ * links can improve branding and message deliverability.
367
+ *
368
+ * To disable this feature, set the object field to `null`.
369
+ */
370
+ url_shortener_settings?: URLShortenerSettings | null;
371
+
372
+ /**
373
+ * Secret used to authenticate with v1 endpoints.
374
+ */
375
+ v1_secret?: string;
376
+
377
+ /**
378
+ * Determines which webhook format will be used, Telnyx API v1, v2, or a legacy
379
+ * 2010-04-01 format.
380
+ */
381
+ webhook_api_version?: '1' | '2' | '2010-04-01';
382
+
383
+ /**
384
+ * The failover URL where webhooks related to this messaging profile will be sent
385
+ * if sending to the primary URL fails.
386
+ */
387
+ webhook_failover_url?: string | null;
388
+
389
+ /**
390
+ * The URL where webhooks related to this messaging profile will be sent.
391
+ */
392
+ webhook_url?: string | null;
393
+
394
+ /**
395
+ * Destinations to which the messaging profile is allowed to send. The elements in
396
+ * the list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all
397
+ * destinations will be allowed.
398
+ */
399
+ whitelisted_destinations?: Array<string>;
400
+ }
236
401
 
237
402
  export interface MessagingProfile {
238
403
  /**
@@ -385,6 +550,23 @@ export interface MessagingProfile {
385
550
  whitelisted_destinations?: Array<string>;
386
551
  }
387
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
+
388
570
  /**
389
571
  * Number Pool allows you to send messages from a pool of numbers of different
390
572
  * types, assigning weights to each type. The pool consists of all the long code
@@ -471,19 +653,19 @@ export interface URLShortenerSettings {
471
653
  }
472
654
 
473
655
  export interface MessagingProfileCreateResponse {
474
- data?: MessagingProfile;
656
+ data?: MessagingMessagingProfile;
475
657
  }
476
658
 
477
659
  export interface MessagingProfileRetrieveResponse {
478
- data?: MessagingProfile;
660
+ data?: MessagingMessagingProfile;
479
661
  }
480
662
 
481
663
  export interface MessagingProfileUpdateResponse {
482
- data?: MessagingProfile;
664
+ data?: MessagingMessagingProfile;
483
665
  }
484
666
 
485
667
  export interface MessagingProfileDeleteResponse {
486
- data?: MessagingProfile;
668
+ data?: MessagingMessagingProfile;
487
669
  }
488
670
 
489
671
  export interface MessagingProfileRetrieveMetricsResponse {
@@ -562,6 +744,13 @@ export interface MessagingProfileCreateParams {
562
744
  */
563
745
  enabled?: boolean;
564
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
+
565
754
  /**
566
755
  * A URL to receive health check webhooks for numbers in this profile.
567
756
  */
@@ -660,6 +849,13 @@ export interface MessagingProfileUpdateParams {
660
849
  */
661
850
  enabled?: boolean;
662
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
+
663
859
  /**
664
860
  * enables SMS fallback for MMS messages.
665
861
  */
@@ -689,6 +885,21 @@ export interface MessagingProfileUpdateParams {
689
885
  */
690
886
  number_pool_settings?: NumberPoolSettings | null;
691
887
 
888
+ /**
889
+ * Set to true to enable message content redaction on this profile, or false to
890
+ * disable it. Ignored if the organization is not on the redaction allowlist. See
891
+ * the [Message Redaction guide](/docs/messaging/messages/message-redaction) for
892
+ * what is redacted.
893
+ */
894
+ redaction_enabled?: boolean;
895
+
896
+ /**
897
+ * The redaction level to apply when redaction is enabled. 1: redact message
898
+ * records and reporting only. 2 (default): also redact inbound webhook payloads.
899
+ * See the [Message Redaction guide](/docs/messaging/messages/message-redaction).
900
+ */
901
+ redaction_level?: number;
902
+
692
903
  /**
693
904
  * Enables automatic character encoding optimization for SMS messages. When
694
905
  * enabled, the system automatically selects the most efficient encoding (GSM-7 or
@@ -757,7 +968,9 @@ MessagingProfiles.Actions = Actions;
757
968
 
758
969
  export declare namespace MessagingProfiles {
759
970
  export {
971
+ type MessagingMessagingProfile as MessagingMessagingProfile,
760
972
  type MessagingProfile as MessagingProfile,
973
+ type MessagingProfileFeatures as MessagingProfileFeatures,
761
974
  type NumberPoolSettings as NumberPoolSettings,
762
975
  type URLShortenerSettings as URLShortenerSettings,
763
976
  type MessagingProfileCreateResponse as MessagingProfileCreateResponse,
@@ -765,7 +978,7 @@ export declare namespace MessagingProfiles {
765
978
  type MessagingProfileUpdateResponse as MessagingProfileUpdateResponse,
766
979
  type MessagingProfileDeleteResponse as MessagingProfileDeleteResponse,
767
980
  type MessagingProfileRetrieveMetricsResponse as MessagingProfileRetrieveMetricsResponse,
768
- type MessagingProfilesDefaultFlatPagination as MessagingProfilesDefaultFlatPagination,
981
+ type MessagingMessagingProfilesDefaultFlatPagination as MessagingMessagingProfilesDefaultFlatPagination,
769
982
  type MessagingProfileListParams as MessagingProfileListParams,
770
983
  type MessagingProfileCreateParams as MessagingProfileCreateParams,
771
984
  type MessagingProfileUpdateParams as MessagingProfileUpdateParams,
@@ -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,