telnyx 7.22.0 → 7.23.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 (326) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/client.d.mts +34 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +34 -4
  5. package/client.d.ts.map +1 -1
  6. package/client.js +30 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +30 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/ai/ai.d.mts +6 -2
  12. package/resources/ai/ai.d.mts.map +1 -1
  13. package/resources/ai/ai.d.ts +6 -2
  14. package/resources/ai/ai.d.ts.map +1 -1
  15. package/resources/ai/ai.js +4 -0
  16. package/resources/ai/ai.js.map +1 -1
  17. package/resources/ai/ai.mjs +5 -1
  18. package/resources/ai/ai.mjs.map +1 -1
  19. package/resources/ai/assistants/assistants.d.mts +256 -46
  20. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  21. package/resources/ai/assistants/assistants.d.ts +256 -46
  22. package/resources/ai/assistants/assistants.d.ts.map +1 -1
  23. package/resources/ai/assistants/assistants.js.map +1 -1
  24. package/resources/ai/assistants/assistants.mjs.map +1 -1
  25. package/resources/ai/assistants/versions.d.mts +34 -12
  26. package/resources/ai/assistants/versions.d.mts.map +1 -1
  27. package/resources/ai/assistants/versions.d.ts +34 -12
  28. package/resources/ai/assistants/versions.d.ts.map +1 -1
  29. package/resources/ai/audio.d.mts +78 -43
  30. package/resources/ai/audio.d.mts.map +1 -1
  31. package/resources/ai/audio.d.ts +78 -43
  32. package/resources/ai/audio.d.ts.map +1 -1
  33. package/resources/ai/audio.js.map +1 -1
  34. package/resources/ai/audio.mjs.map +1 -1
  35. package/resources/ai/chat.d.mts +2 -10
  36. package/resources/ai/chat.d.mts.map +1 -1
  37. package/resources/ai/chat.d.ts +2 -10
  38. package/resources/ai/chat.d.ts.map +1 -1
  39. package/resources/ai/chat.js.map +1 -1
  40. package/resources/ai/chat.mjs.map +1 -1
  41. package/resources/ai/index.d.mts +2 -1
  42. package/resources/ai/index.d.mts.map +1 -1
  43. package/resources/ai/index.d.ts +2 -1
  44. package/resources/ai/index.d.ts.map +1 -1
  45. package/resources/ai/index.js +3 -1
  46. package/resources/ai/index.js.map +1 -1
  47. package/resources/ai/index.mjs +2 -1
  48. package/resources/ai/index.mjs.map +1 -1
  49. package/resources/ai/openai/chat.d.mts +10 -11
  50. package/resources/ai/openai/chat.d.mts.map +1 -1
  51. package/resources/ai/openai/chat.d.ts +10 -11
  52. package/resources/ai/openai/chat.d.ts.map +1 -1
  53. package/resources/ai/openai/chat.js.map +1 -1
  54. package/resources/ai/openai/chat.mjs.map +1 -1
  55. package/resources/ai/openai/index.d.mts +1 -1
  56. package/resources/ai/openai/index.d.mts.map +1 -1
  57. package/resources/ai/openai/index.d.ts +1 -1
  58. package/resources/ai/openai/index.d.ts.map +1 -1
  59. package/resources/ai/openai/index.js.map +1 -1
  60. package/resources/ai/openai/index.mjs +1 -1
  61. package/resources/ai/openai/index.mjs.map +1 -1
  62. package/resources/ai/openai/openai.d.mts +2 -2
  63. package/resources/ai/openai/openai.d.mts.map +1 -1
  64. package/resources/ai/openai/openai.d.ts +2 -2
  65. package/resources/ai/openai/openai.d.ts.map +1 -1
  66. package/resources/ai/openai/openai.js.map +1 -1
  67. package/resources/ai/openai/openai.mjs.map +1 -1
  68. package/resources/ai/typesafe/index.d.mts +3 -0
  69. package/resources/ai/typesafe/index.d.mts.map +1 -0
  70. package/resources/ai/typesafe/index.d.ts +3 -0
  71. package/resources/ai/typesafe/index.d.ts.map +1 -0
  72. package/resources/ai/typesafe/index.js +9 -0
  73. package/resources/ai/typesafe/index.js.map +1 -0
  74. package/resources/ai/typesafe/index.mjs +4 -0
  75. package/resources/ai/typesafe/index.mjs.map +1 -0
  76. package/resources/ai/typesafe/typesafe.d.mts +10 -0
  77. package/resources/ai/typesafe/typesafe.d.mts.map +1 -0
  78. package/resources/ai/typesafe/typesafe.d.ts +10 -0
  79. package/resources/ai/typesafe/typesafe.d.ts.map +1 -0
  80. package/resources/ai/typesafe/typesafe.js +17 -0
  81. package/resources/ai/typesafe/typesafe.js.map +1 -0
  82. package/resources/ai/typesafe/typesafe.mjs +12 -0
  83. package/resources/ai/typesafe/typesafe.mjs.map +1 -0
  84. package/resources/ai/typesafe/v1.d.mts +274 -0
  85. package/resources/ai/typesafe/v1.d.mts.map +1 -0
  86. package/resources/ai/typesafe/v1.d.ts +274 -0
  87. package/resources/ai/typesafe/v1.d.ts.map +1 -0
  88. package/resources/ai/typesafe/v1.js +67 -0
  89. package/resources/ai/typesafe/v1.js.map +1 -0
  90. package/resources/ai/typesafe/v1.mjs +63 -0
  91. package/resources/ai/typesafe/v1.mjs.map +1 -0
  92. package/resources/ai/typesafe.d.mts +2 -0
  93. package/resources/ai/typesafe.d.mts.map +1 -0
  94. package/resources/ai/typesafe.d.ts +2 -0
  95. package/resources/ai/typesafe.d.ts.map +1 -0
  96. package/resources/ai/typesafe.js +6 -0
  97. package/resources/ai/typesafe.js.map +1 -0
  98. package/resources/ai/typesafe.mjs +3 -0
  99. package/resources/ai/typesafe.mjs.map +1 -0
  100. package/resources/bot-challenge.d.mts +80 -0
  101. package/resources/bot-challenge.d.mts.map +1 -0
  102. package/resources/bot-challenge.d.ts +80 -0
  103. package/resources/bot-challenge.d.ts.map +1 -0
  104. package/resources/bot-challenge.js +35 -0
  105. package/resources/bot-challenge.js.map +1 -0
  106. package/resources/bot-challenge.mjs +31 -0
  107. package/resources/bot-challenge.mjs.map +1 -0
  108. package/resources/bot-sessions.d.mts +49 -0
  109. package/resources/bot-sessions.d.mts.map +1 -0
  110. package/resources/bot-sessions.d.ts +49 -0
  111. package/resources/bot-sessions.d.ts.map +1 -0
  112. package/resources/bot-sessions.js +28 -0
  113. package/resources/bot-sessions.js.map +1 -0
  114. package/resources/bot-sessions.mjs +24 -0
  115. package/resources/bot-sessions.mjs.map +1 -0
  116. package/resources/bot-signup.d.mts +114 -0
  117. package/resources/bot-signup.d.mts.map +1 -0
  118. package/resources/bot-signup.d.ts +114 -0
  119. package/resources/bot-signup.d.ts.map +1 -0
  120. package/resources/bot-signup.js +63 -0
  121. package/resources/bot-signup.js.map +1 -0
  122. package/resources/bot-signup.mjs +59 -0
  123. package/resources/bot-signup.mjs.map +1 -0
  124. package/resources/calls/actions.d.mts +57 -11
  125. package/resources/calls/actions.d.mts.map +1 -1
  126. package/resources/calls/actions.d.ts +57 -11
  127. package/resources/calls/actions.d.ts.map +1 -1
  128. package/resources/calls/calls.d.mts +45 -5
  129. package/resources/calls/calls.d.mts.map +1 -1
  130. package/resources/calls/calls.d.ts +45 -5
  131. package/resources/calls/calls.d.ts.map +1 -1
  132. package/resources/calls/calls.js.map +1 -1
  133. package/resources/calls/calls.mjs.map +1 -1
  134. package/resources/compute/compute.d.mts +2 -2
  135. package/resources/compute/compute.d.mts.map +1 -1
  136. package/resources/compute/compute.d.ts +2 -2
  137. package/resources/compute/compute.d.ts.map +1 -1
  138. package/resources/compute/compute.js +2 -2
  139. package/resources/compute/compute.js.map +1 -1
  140. package/resources/compute/compute.mjs +2 -2
  141. package/resources/compute/compute.mjs.map +1 -1
  142. package/resources/compute/funcs/export.d.mts +121 -0
  143. package/resources/compute/funcs/export.d.mts.map +1 -0
  144. package/resources/compute/funcs/export.d.ts +121 -0
  145. package/resources/compute/funcs/export.d.ts.map +1 -0
  146. package/resources/compute/funcs/export.js +68 -0
  147. package/resources/compute/funcs/export.js.map +1 -0
  148. package/resources/compute/funcs/export.mjs +64 -0
  149. package/resources/compute/funcs/export.mjs.map +1 -0
  150. package/resources/compute/funcs/funcs.d.mts +214 -0
  151. package/resources/compute/funcs/funcs.d.mts.map +1 -0
  152. package/resources/compute/funcs/funcs.d.ts +214 -0
  153. package/resources/compute/funcs/funcs.d.ts.map +1 -0
  154. package/resources/compute/funcs/funcs.js +80 -0
  155. package/resources/compute/funcs/funcs.js.map +1 -0
  156. package/resources/compute/funcs/funcs.mjs +75 -0
  157. package/resources/compute/funcs/funcs.mjs.map +1 -0
  158. package/resources/compute/funcs/index.d.mts +3 -0
  159. package/resources/compute/funcs/index.d.mts.map +1 -0
  160. package/resources/compute/funcs/index.d.ts +3 -0
  161. package/resources/compute/funcs/index.d.ts.map +1 -0
  162. package/resources/compute/funcs/index.js +9 -0
  163. package/resources/compute/funcs/index.js.map +1 -0
  164. package/resources/compute/funcs/index.mjs +4 -0
  165. package/resources/compute/funcs/index.mjs.map +1 -0
  166. package/resources/compute/funcs.d.mts +1 -178
  167. package/resources/compute/funcs.d.mts.map +1 -1
  168. package/resources/compute/funcs.d.ts +1 -178
  169. package/resources/compute/funcs.d.ts.map +1 -1
  170. package/resources/compute/funcs.js +2 -37
  171. package/resources/compute/funcs.js.map +1 -1
  172. package/resources/compute/funcs.mjs +1 -35
  173. package/resources/compute/funcs.mjs.map +1 -1
  174. package/resources/compute/index.d.mts +1 -1
  175. package/resources/compute/index.d.mts.map +1 -1
  176. package/resources/compute/index.d.ts +1 -1
  177. package/resources/compute/index.d.ts.map +1 -1
  178. package/resources/compute/index.js +2 -2
  179. package/resources/compute/index.js.map +1 -1
  180. package/resources/compute/index.mjs +1 -1
  181. package/resources/compute/index.mjs.map +1 -1
  182. package/resources/connections.d.mts +109 -1
  183. package/resources/connections.d.mts.map +1 -1
  184. package/resources/connections.d.ts +109 -1
  185. package/resources/connections.d.ts.map +1 -1
  186. package/resources/connections.js +8 -0
  187. package/resources/connections.js.map +1 -1
  188. package/resources/connections.mjs +8 -0
  189. package/resources/connections.mjs.map +1 -1
  190. package/resources/detail-records.d.mts +18 -1
  191. package/resources/detail-records.d.mts.map +1 -1
  192. package/resources/detail-records.d.ts +18 -1
  193. package/resources/detail-records.d.ts.map +1 -1
  194. package/resources/email-messages/email-messages.d.mts +5 -3
  195. package/resources/email-messages/email-messages.d.mts.map +1 -1
  196. package/resources/email-messages/email-messages.d.ts +5 -3
  197. package/resources/email-messages/email-messages.d.ts.map +1 -1
  198. package/resources/email-messages/email-messages.js +5 -3
  199. package/resources/email-messages/email-messages.js.map +1 -1
  200. package/resources/email-messages/email-messages.mjs +5 -3
  201. package/resources/email-messages/email-messages.mjs.map +1 -1
  202. package/resources/index.d.mts +7 -2
  203. package/resources/index.d.mts.map +1 -1
  204. package/resources/index.d.ts +7 -2
  205. package/resources/index.d.ts.map +1 -1
  206. package/resources/index.js +14 -4
  207. package/resources/index.js.map +1 -1
  208. package/resources/index.mjs +5 -0
  209. package/resources/index.mjs.map +1 -1
  210. package/resources/machine-payments.d.mts +142 -0
  211. package/resources/machine-payments.d.mts.map +1 -0
  212. package/resources/machine-payments.d.ts +142 -0
  213. package/resources/machine-payments.d.ts.map +1 -0
  214. package/resources/machine-payments.js +56 -0
  215. package/resources/machine-payments.js.map +1 -0
  216. package/resources/machine-payments.mjs +52 -0
  217. package/resources/machine-payments.mjs.map +1 -0
  218. package/resources/messages/messages.d.mts +135 -23
  219. package/resources/messages/messages.d.mts.map +1 -1
  220. package/resources/messages/messages.d.ts +135 -23
  221. package/resources/messages/messages.d.ts.map +1 -1
  222. package/resources/messages/messages.js.map +1 -1
  223. package/resources/messages/messages.mjs.map +1 -1
  224. package/resources/noise-suppression-engines.d.mts +42 -0
  225. package/resources/noise-suppression-engines.d.mts.map +1 -0
  226. package/resources/noise-suppression-engines.d.ts +42 -0
  227. package/resources/noise-suppression-engines.d.ts.map +1 -0
  228. package/resources/noise-suppression-engines.js +21 -0
  229. package/resources/noise-suppression-engines.js.map +1 -0
  230. package/resources/noise-suppression-engines.mjs +17 -0
  231. package/resources/noise-suppression-engines.mjs.map +1 -0
  232. package/resources/speech-to-text/speech-to-text.d.mts +1 -1
  233. package/resources/speech-to-text/speech-to-text.d.mts.map +1 -1
  234. package/resources/speech-to-text/speech-to-text.d.ts +1 -1
  235. package/resources/speech-to-text/speech-to-text.d.ts.map +1 -1
  236. package/resources/texml/accounts/calls/calls.d.mts +117 -0
  237. package/resources/texml/accounts/calls/calls.d.mts.map +1 -1
  238. package/resources/texml/accounts/calls/calls.d.ts +117 -0
  239. package/resources/texml/accounts/calls/calls.d.ts.map +1 -1
  240. package/resources/texml/accounts/calls/calls.js.map +1 -1
  241. package/resources/texml/accounts/calls/calls.mjs.map +1 -1
  242. package/resources/texml/accounts/conferences/participants.d.mts +39 -0
  243. package/resources/texml/accounts/conferences/participants.d.mts.map +1 -1
  244. package/resources/texml/accounts/conferences/participants.d.ts +39 -0
  245. package/resources/texml/accounts/conferences/participants.d.ts.map +1 -1
  246. package/resources/texml/calls.d.mts +71 -0
  247. package/resources/texml/calls.d.mts.map +1 -0
  248. package/resources/texml/calls.d.ts +71 -0
  249. package/resources/texml/calls.d.ts.map +1 -0
  250. package/resources/texml/calls.js +33 -0
  251. package/resources/texml/calls.js.map +1 -0
  252. package/resources/texml/calls.mjs +29 -0
  253. package/resources/texml/calls.mjs.map +1 -0
  254. package/resources/texml/index.d.mts +1 -0
  255. package/resources/texml/index.d.mts.map +1 -1
  256. package/resources/texml/index.d.ts +1 -0
  257. package/resources/texml/index.d.ts.map +1 -1
  258. package/resources/texml/index.js +3 -1
  259. package/resources/texml/index.js.map +1 -1
  260. package/resources/texml/index.mjs +1 -0
  261. package/resources/texml/index.mjs.map +1 -1
  262. package/resources/texml/texml.d.mts +43 -0
  263. package/resources/texml/texml.d.mts.map +1 -1
  264. package/resources/texml/texml.d.ts +43 -0
  265. package/resources/texml/texml.d.ts.map +1 -1
  266. package/resources/texml/texml.js +4 -0
  267. package/resources/texml/texml.js.map +1 -1
  268. package/resources/texml/texml.mjs +4 -0
  269. package/resources/texml/texml.mjs.map +1 -1
  270. package/resources/voice-clones.d.mts +6 -4
  271. package/resources/voice-clones.d.mts.map +1 -1
  272. package/resources/voice-clones.d.ts +6 -4
  273. package/resources/voice-clones.d.ts.map +1 -1
  274. package/resources/voice-clones.js +4 -2
  275. package/resources/voice-clones.js.map +1 -1
  276. package/resources/voice-clones.mjs +4 -2
  277. package/resources/voice-clones.mjs.map +1 -1
  278. package/resources/webhooks.d.mts +26 -49
  279. package/resources/webhooks.d.mts.map +1 -1
  280. package/resources/webhooks.d.ts +26 -49
  281. package/resources/webhooks.d.ts.map +1 -1
  282. package/src/client.ts +80 -0
  283. package/src/resources/ai/ai.ts +13 -1
  284. package/src/resources/ai/assistants/assistants.ts +281 -45
  285. package/src/resources/ai/assistants/versions.ts +34 -12
  286. package/src/resources/ai/audio.ts +93 -45
  287. package/src/resources/ai/chat.ts +2 -11
  288. package/src/resources/ai/index.ts +7 -1
  289. package/src/resources/ai/openai/chat.ts +11 -11
  290. package/src/resources/ai/openai/index.ts +6 -1
  291. package/src/resources/ai/openai/openai.ts +2 -1
  292. package/src/resources/ai/typesafe/index.ts +4 -0
  293. package/src/resources/ai/typesafe/typesafe.ts +19 -0
  294. package/src/resources/ai/typesafe/v1.ts +298 -0
  295. package/src/resources/ai/typesafe.ts +3 -0
  296. package/src/resources/bot-challenge.ts +101 -0
  297. package/src/resources/bot-sessions.ts +61 -0
  298. package/src/resources/bot-signup.ts +140 -0
  299. package/src/resources/calls/actions.ts +65 -10
  300. package/src/resources/calls/calls.ts +52 -5
  301. package/src/resources/compute/compute.ts +2 -2
  302. package/src/resources/compute/funcs/export.ts +156 -0
  303. package/src/resources/compute/funcs/funcs.ts +341 -0
  304. package/src/resources/compute/funcs/index.ts +15 -0
  305. package/src/resources/compute/funcs.ts +1 -296
  306. package/src/resources/compute/index.ts +1 -1
  307. package/src/resources/connections.ts +133 -0
  308. package/src/resources/detail-records.ts +18 -1
  309. package/src/resources/email-messages/email-messages.ts +5 -3
  310. package/src/resources/index.ts +23 -0
  311. package/src/resources/machine-payments.ts +169 -0
  312. package/src/resources/messages/messages.ts +168 -23
  313. package/src/resources/noise-suppression-engines.ts +51 -0
  314. package/src/resources/speech-to-text/speech-to-text.ts +1 -0
  315. package/src/resources/texml/accounts/calls/calls.ts +138 -0
  316. package/src/resources/texml/accounts/conferences/participants.ts +46 -0
  317. package/src/resources/texml/calls.ts +90 -0
  318. package/src/resources/texml/index.ts +1 -0
  319. package/src/resources/texml/texml.ts +56 -0
  320. package/src/resources/voice-clones.ts +6 -4
  321. package/src/resources/webhooks.ts +31 -58
  322. package/src/version.ts +1 -1
  323. package/version.d.mts +1 -1
  324. package/version.d.ts +1 -1
  325. package/version.js +1 -1
  326. package/version.mjs +1 -1
@@ -2,7 +2,6 @@
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as MessagesAPI from './messages';
5
- import * as Shared from '../shared';
6
5
  import * as RcsAPI from './rcs';
7
6
  import {
8
7
  RcGenerateDeeplinkParams,
@@ -258,8 +257,15 @@ export interface MessagingInboundMessagePayload {
258
257
  id?: string;
259
258
 
260
259
  /**
261
- * WhatsApp message body. For message edits and revocations, inspect `type` and the
262
- * corresponding `edit` or `revoke` object.
260
+ * Automatic response type triggered by an inbound opt-in, opt-out, or help
261
+ * keyword. Examples include START, STOP, and HELP.
262
+ */
263
+ autoresponse_type?: string;
264
+
265
+ /**
266
+ * Message body for RCS and WhatsApp. RCS messages contain text, user_file,
267
+ * location, or suggestion_response. For WhatsApp edits and revocations, inspect
268
+ * type and the corresponding edit or revoke object.
263
269
  */
264
270
  body?: MessagingInboundMessagePayload.Body;
265
271
 
@@ -366,15 +372,16 @@ export interface MessagingInboundMessagePayload {
366
372
  text?: string;
367
373
 
368
374
  /**
369
- * Receiving address. SMS and MMS webhooks use an array of recipients. WhatsApp
370
- * webhooks use one E.164 phone number.
375
+ * Receiving address. SMS, MMS and RCS webhooks use an array of recipients. RCS
376
+ * recipients are identified by agent_id and agent_name. WhatsApp webhooks use one
377
+ * E.164 phone number.
371
378
  */
372
379
  to?: Array<MessagingInboundMessagePayload.UnionMember0> | string;
373
380
 
374
381
  /**
375
382
  * The messaging channel used for the message.
376
383
  */
377
- type?: 'SMS' | 'MMS' | 'WHATSAPP';
384
+ type?: 'SMS' | 'MMS' | 'WHATSAPP' | 'RCS';
378
385
 
379
386
  /**
380
387
  * Not used for inbound messages.
@@ -395,8 +402,9 @@ export interface MessagingInboundMessagePayload {
395
402
 
396
403
  export namespace MessagingInboundMessagePayload {
397
404
  /**
398
- * WhatsApp message body. For message edits and revocations, inspect `type` and the
399
- * corresponding `edit` or `revoke` object.
405
+ * Message body for RCS and WhatsApp. RCS messages contain text, user_file,
406
+ * location, or suggestion_response. For WhatsApp edits and revocations, inspect
407
+ * type and the corresponding edit or revoke object.
400
408
  */
401
409
  export interface Body {
402
410
  /**
@@ -419,11 +427,26 @@ export namespace MessagingInboundMessagePayload {
419
427
  */
420
428
  from?: string;
421
429
 
430
+ /**
431
+ * Location shared in an RCS message.
432
+ */
433
+ location?: Body.Location;
434
+
422
435
  /**
423
436
  * Details for a revoked WhatsApp message.
424
437
  */
425
438
  revoke?: Body.Revoke;
426
439
 
440
+ /**
441
+ * Selected RCS suggestion.
442
+ */
443
+ suggestion_response?: Body.SuggestionResponse;
444
+
445
+ /**
446
+ * RCS text string or WhatsApp text object.
447
+ */
448
+ text?: string | Body.Body;
449
+
427
450
  /**
428
451
  * Unix timestamp supplied by Meta.
429
452
  */
@@ -435,6 +458,11 @@ export namespace MessagingInboundMessagePayload {
435
458
  */
436
459
  type?: string;
437
460
 
461
+ /**
462
+ * RCS file attachment and optional thumbnail.
463
+ */
464
+ user_file?: Body.UserFile;
465
+
438
466
  [k: string]: unknown;
439
467
  }
440
468
 
@@ -455,6 +483,15 @@ export namespace MessagingInboundMessagePayload {
455
483
  original_message_id: string;
456
484
  }
457
485
 
486
+ /**
487
+ * Location shared in an RCS message.
488
+ */
489
+ export interface Location {
490
+ latitude?: number;
491
+
492
+ longitude?: number;
493
+ }
494
+
458
495
  /**
459
496
  * Details for a revoked WhatsApp message.
460
497
  */
@@ -465,6 +502,52 @@ export namespace MessagingInboundMessagePayload {
465
502
  */
466
503
  original_message_id: string;
467
504
  }
505
+
506
+ /**
507
+ * Selected RCS suggestion.
508
+ */
509
+ export interface SuggestionResponse {
510
+ postback_data?: string;
511
+
512
+ text?: string;
513
+ }
514
+
515
+ export interface Body {
516
+ body?: string;
517
+
518
+ [k: string]: unknown;
519
+ }
520
+
521
+ /**
522
+ * RCS file attachment and optional thumbnail.
523
+ */
524
+ export interface UserFile {
525
+ payload?: UserFile.Payload;
526
+
527
+ thumbnail?: UserFile.Thumbnail;
528
+ }
529
+
530
+ export namespace UserFile {
531
+ export interface Payload {
532
+ file_name?: string;
533
+
534
+ file_size_bytes?: number;
535
+
536
+ file_uri?: string;
537
+
538
+ mime_type?: string;
539
+ }
540
+
541
+ export interface Thumbnail {
542
+ file_name?: string;
543
+
544
+ file_size_bytes?: number;
545
+
546
+ file_uri?: string;
547
+
548
+ mime_type?: string;
549
+ }
550
+ }
468
551
  }
469
552
 
470
553
  export interface Cc {
@@ -549,7 +632,7 @@ export namespace MessagingInboundMessagePayload {
549
632
  /**
550
633
  * The line-type of the sender.
551
634
  */
552
- line_type?: 'Wireline' | 'Wireless' | 'VoWiFi' | 'VoIP' | 'Pre-Paid Wireless' | '';
635
+ line_type?: 'Wireline' | 'Wireless' | 'VoWiFi' | 'VoIP' | 'Pre-Paid Wireless' | '' | 'long_code';
553
636
 
554
637
  /**
555
638
  * Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short
@@ -557,7 +640,7 @@ export namespace MessagingInboundMessagePayload {
557
640
  */
558
641
  phone_number?: string;
559
642
 
560
- status?: 'received' | 'delivered';
643
+ status?: 'received' | 'delivered' | 'webhook_delivered';
561
644
  }
562
645
 
563
646
  export interface Media {
@@ -583,6 +666,16 @@ export namespace MessagingInboundMessagePayload {
583
666
  }
584
667
 
585
668
  export interface UnionMember0 {
669
+ /**
670
+ * RCS agent identifier.
671
+ */
672
+ agent_id?: string;
673
+
674
+ /**
675
+ * RCS agent name.
676
+ */
677
+ agent_name?: string;
678
+
586
679
  /**
587
680
  * The carrier of the receiver.
588
681
  */
@@ -616,6 +709,11 @@ export interface MessagingOutboundMessagePayload {
616
709
  */
617
710
  id?: string;
618
711
 
712
+ /**
713
+ * RCS webhook message body. Text messages use the text property.
714
+ */
715
+ body?: MessagingOutboundMessagePayload.Body;
716
+
619
717
  cc?: Array<MessagingOutboundMessagePayload.Cc>;
620
718
 
621
719
  /**
@@ -731,7 +829,7 @@ export interface MessagingOutboundMessagePayload {
731
829
  /**
732
830
  * The type of message.
733
831
  */
734
- type?: 'SMS' | 'MMS';
832
+ type?: 'SMS' | 'MMS' | 'RCS';
735
833
 
736
834
  /**
737
835
  * Message must be out of the queue by this time or else it will be discarded and
@@ -760,6 +858,16 @@ export interface MessagingOutboundMessagePayload {
760
858
  }
761
859
 
762
860
  export namespace MessagingOutboundMessagePayload {
861
+ /**
862
+ * RCS webhook message body. Text messages use the text property.
863
+ */
864
+ export interface Body {
865
+ /**
866
+ * RCS text message.
867
+ */
868
+ text?: string;
869
+ }
870
+
763
871
  export interface Cc {
764
872
  /**
765
873
  * The carrier of the receiver.
@@ -834,6 +942,16 @@ export namespace MessagingOutboundMessagePayload {
834
942
  }
835
943
 
836
944
  export interface From {
945
+ /**
946
+ * RCS agent identifier.
947
+ */
948
+ agent_id?: string;
949
+
950
+ /**
951
+ * RCS agent name.
952
+ */
953
+ agent_name?: string;
954
+
837
955
  /**
838
956
  * The carrier of the receiver.
839
957
  */
@@ -900,7 +1018,8 @@ export namespace MessagingOutboundMessagePayload {
900
1018
  | 'sending_failed'
901
1019
  | 'delivery_unconfirmed'
902
1020
  | 'delivered'
903
- | 'delivery_failed';
1021
+ | 'delivery_failed'
1022
+ | 'read';
904
1023
  }
905
1024
  }
906
1025
 
@@ -910,6 +1029,11 @@ export interface OutboundMessagePayload {
910
1029
  */
911
1030
  id?: string;
912
1031
 
1032
+ /**
1033
+ * RCS webhook message body. Text messages use the text property.
1034
+ */
1035
+ body?: OutboundMessagePayload.Body;
1036
+
913
1037
  cc?: Array<OutboundMessagePayload.Cc>;
914
1038
 
915
1039
  /**
@@ -939,7 +1063,7 @@ export interface OutboundMessagePayload {
939
1063
  * These errors may point at addressees when referring to unsuccessful/unconfirmed
940
1064
  * delivery statuses.
941
1065
  */
942
- errors?: Array<Shared.MessagingError>;
1066
+ errors?: Array<MessagingError0b38e7044b>;
943
1067
 
944
1068
  from?: OutboundMessagePayload.From;
945
1069
 
@@ -1025,7 +1149,7 @@ export interface OutboundMessagePayload {
1025
1149
  /**
1026
1150
  * The type of message.
1027
1151
  */
1028
- type?: 'SMS' | 'MMS';
1152
+ type?: 'SMS' | 'MMS' | 'RCS';
1029
1153
 
1030
1154
  /**
1031
1155
  * Message must be out of the queue by this time or else it will be discarded and
@@ -1054,6 +1178,16 @@ export interface OutboundMessagePayload {
1054
1178
  }
1055
1179
 
1056
1180
  export namespace OutboundMessagePayload {
1181
+ /**
1182
+ * RCS webhook message body. Text messages use the text property.
1183
+ */
1184
+ export interface Body {
1185
+ /**
1186
+ * RCS text message.
1187
+ */
1188
+ text?: string;
1189
+ }
1190
+
1057
1191
  export interface Cc {
1058
1192
  /**
1059
1193
  * The carrier of the receiver.
@@ -1128,6 +1262,16 @@ export namespace OutboundMessagePayload {
1128
1262
  }
1129
1263
 
1130
1264
  export interface From {
1265
+ /**
1266
+ * RCS agent identifier.
1267
+ */
1268
+ agent_id?: string;
1269
+
1270
+ /**
1271
+ * RCS agent name.
1272
+ */
1273
+ agent_name?: string;
1274
+
1131
1275
  /**
1132
1276
  * The carrier of the receiver.
1133
1277
  */
@@ -1194,7 +1338,8 @@ export namespace OutboundMessagePayload {
1194
1338
  | 'sending_failed'
1195
1339
  | 'delivery_unconfirmed'
1196
1340
  | 'delivered'
1197
- | 'delivery_failed';
1341
+ | 'delivery_failed'
1342
+ | 'read';
1198
1343
  }
1199
1344
  }
1200
1345
 
@@ -1917,7 +2062,7 @@ export interface WhatsappReaction {
1917
2062
  }
1918
2063
 
1919
2064
  export interface MessageRetrieveResponse {
1920
- data?: MessagingOutboundMessagePayload | MessagingInboundMessagePayload;
2065
+ data?: OutboundMessagePayload | MessagingInboundMessagePayload;
1921
2066
  }
1922
2067
 
1923
2068
  export interface MessageCancelScheduledResponse {
@@ -2216,31 +2361,31 @@ export namespace MessageCancelScheduledResponse {
2216
2361
  }
2217
2362
 
2218
2363
  export interface MessageRetrieveGroupMessagesResponse {
2219
- data?: Array<MessagingOutboundMessagePayload>;
2364
+ data?: Array<OutboundMessagePayload>;
2220
2365
  }
2221
2366
 
2222
2367
  export interface MessageScheduleResponse {
2223
- data?: MessagingOutboundMessagePayload;
2368
+ data?: OutboundMessagePayload;
2224
2369
  }
2225
2370
 
2226
2371
  export interface MessageSendResponse {
2227
- data?: MessagingOutboundMessagePayload;
2372
+ data?: OutboundMessagePayload;
2228
2373
  }
2229
2374
 
2230
2375
  export interface MessageSendGroupMmsResponse {
2231
- data?: MessagingOutboundMessagePayload;
2376
+ data?: OutboundMessagePayload;
2232
2377
  }
2233
2378
 
2234
2379
  export interface MessageSendLongCodeResponse {
2235
- data?: MessagingOutboundMessagePayload;
2380
+ data?: OutboundMessagePayload;
2236
2381
  }
2237
2382
 
2238
2383
  export interface MessageSendNumberPoolResponse {
2239
- data?: MessagingOutboundMessagePayload;
2384
+ data?: OutboundMessagePayload;
2240
2385
  }
2241
2386
 
2242
2387
  export interface MessageSendShortCodeResponse {
2243
- data?: MessagingOutboundMessagePayload;
2388
+ data?: OutboundMessagePayload;
2244
2389
  }
2245
2390
 
2246
2391
  export interface MessageSendWithAlphanumericSenderResponse {
@@ -0,0 +1,51 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+
7
+ /**
8
+ * Noise suppression engines that can be selected when configuring noise suppression on voice connections.
9
+ */
10
+ export class NoiseSuppressionEngines extends APIResource {
11
+ /**
12
+ * Returns all noise suppression engines available to the authenticated user.
13
+ * Engines gated behind a feature flag are included only when the flag is enabled
14
+ * for the user's account. Results are not paginated; the number of engines is
15
+ * expected to remain small.
16
+ */
17
+ list(options?: RequestOptions): APIPromise<NoiseSuppressionEngineListResponse> {
18
+ return this._client.get('/noise_suppression_engines', options);
19
+ }
20
+ }
21
+
22
+ export interface NoiseSuppressionEngineListResponse {
23
+ data: Array<NoiseSuppressionEngineListResponse.Data>;
24
+ }
25
+
26
+ export namespace NoiseSuppressionEngineListResponse {
27
+ /**
28
+ * A noise suppression engine available to the authenticated user.
29
+ */
30
+ export interface Data {
31
+ /**
32
+ * Default attenuation level of the engine (0-100, in multiples of ten).
33
+ */
34
+ default_attenuation_level: number;
35
+
36
+ /**
37
+ * Human-readable name of the engine.
38
+ */
39
+ label: string;
40
+
41
+ /**
42
+ * Machine-readable identifier of the engine, used when configuring noise
43
+ * suppression.
44
+ */
45
+ value: string;
46
+ }
47
+ }
48
+
49
+ export declare namespace NoiseSuppressionEngines {
50
+ export { type NoiseSuppressionEngineListResponse as NoiseSuppressionEngineListResponse };
51
+ }
@@ -314,6 +314,7 @@ export interface SpeechToTextRetrieveTranscriptionParams {
314
314
  | 'speechmatics/standard'
315
315
  | 'soniox/stt-rt-v4'
316
316
  | 'nvidia/parakeet-v3'
317
+ | 'omi-health/omi-med-stt-v1'
317
318
  | 'humain/realtime'
318
319
  | 'reson8/turns'
319
320
  | 'cohere/ar-stt';
@@ -590,6 +590,27 @@ export namespace CallCallsParams {
590
590
  */
591
591
  MachineDetection?: 'Enable' | 'Disable' | 'DetectMessageEnd';
592
592
 
593
+ /**
594
+ * Highest frequency, in Hz, that a tone can reach and still be treated as a beep.
595
+ * Only used when MachineDetection is enabled.
596
+ */
597
+ MachineDetectionBeepMaxFrequency?: number;
598
+
599
+ /**
600
+ * Lowest frequency, in Hz, that a tone must reach to be treated as a beep. Raising
601
+ * it above 480 excludes North American ringback (440 + 480 Hz), which can
602
+ * otherwise be reported as a beep when the `freq_only` profile is in use. Only
603
+ * used when MachineDetection is enabled.
604
+ */
605
+ MachineDetectionBeepMinFrequency?: number;
606
+
607
+ /**
608
+ * Shortest tone, in milliseconds, that can be treated as a beep. Raising it
609
+ * rejects brief tones such as call-progress blips. Only used when MachineDetection
610
+ * is enabled.
611
+ */
612
+ MachineDetectionBeepMinToneDuration?: number;
613
+
593
614
  /**
594
615
  * Selects which detectors must validate a beep. `both` requires the amplitude and
595
616
  * frequency detectors to agree. `freq_only` uses the frequency detector alone, for
@@ -598,6 +619,31 @@ export namespace CallCallsParams {
598
619
  */
599
620
  MachineDetectionBeepProfile?: 'both' | 'freq_only';
600
621
 
622
+ /**
623
+ * When enabled, a candidate beep must pass an additional spectral check before it
624
+ * is reported. Only used when MachineDetection is enabled.
625
+ */
626
+ MachineDetectionBeepSpectralConfirmation?: boolean;
627
+
628
+ /**
629
+ * Minimum spectral purity, from 0 to 1, for a tone to be treated as a beep.
630
+ * Raising it rejects mixed tones such as ringback, which combines two frequencies.
631
+ * Only used when MachineDetection is enabled.
632
+ */
633
+ MachineDetectionBeepSpectralMinPurity?: number;
634
+
635
+ /**
636
+ * When enabled, the fax CNG tone is rejected rather than reported as a beep. Only
637
+ * used when MachineDetection is enabled.
638
+ */
639
+ MachineDetectionBeepSpectralRejectFaxCng?: boolean;
640
+
641
+ /**
642
+ * Length of the spectral confirmation window, in milliseconds. Only used when
643
+ * MachineDetection is enabled.
644
+ */
645
+ MachineDetectionBeepSpectralWindow?: number;
646
+
601
647
  /**
602
648
  * Silence duration threshold after a call screening prompt before ending prompt
603
649
  * detection, in milliseconds. Used when `DetectionMode` is `PremiumCallScreening`.
@@ -874,6 +920,27 @@ export namespace CallCallsParams {
874
920
  */
875
921
  MachineDetection?: 'Enable' | 'Disable' | 'DetectMessageEnd';
876
922
 
923
+ /**
924
+ * Highest frequency, in Hz, that a tone can reach and still be treated as a beep.
925
+ * Only used when MachineDetection is enabled.
926
+ */
927
+ MachineDetectionBeepMaxFrequency?: number;
928
+
929
+ /**
930
+ * Lowest frequency, in Hz, that a tone must reach to be treated as a beep. Raising
931
+ * it above 480 excludes North American ringback (440 + 480 Hz), which can
932
+ * otherwise be reported as a beep when the `freq_only` profile is in use. Only
933
+ * used when MachineDetection is enabled.
934
+ */
935
+ MachineDetectionBeepMinFrequency?: number;
936
+
937
+ /**
938
+ * Shortest tone, in milliseconds, that can be treated as a beep. Raising it
939
+ * rejects brief tones such as call-progress blips. Only used when MachineDetection
940
+ * is enabled.
941
+ */
942
+ MachineDetectionBeepMinToneDuration?: number;
943
+
877
944
  /**
878
945
  * Selects which detectors must validate a beep. `both` requires the amplitude and
879
946
  * frequency detectors to agree. `freq_only` uses the frequency detector alone, for
@@ -882,6 +949,31 @@ export namespace CallCallsParams {
882
949
  */
883
950
  MachineDetectionBeepProfile?: 'both' | 'freq_only';
884
951
 
952
+ /**
953
+ * When enabled, a candidate beep must pass an additional spectral check before it
954
+ * is reported. Only used when MachineDetection is enabled.
955
+ */
956
+ MachineDetectionBeepSpectralConfirmation?: boolean;
957
+
958
+ /**
959
+ * Minimum spectral purity, from 0 to 1, for a tone to be treated as a beep.
960
+ * Raising it rejects mixed tones such as ringback, which combines two frequencies.
961
+ * Only used when MachineDetection is enabled.
962
+ */
963
+ MachineDetectionBeepSpectralMinPurity?: number;
964
+
965
+ /**
966
+ * When enabled, the fax CNG tone is rejected rather than reported as a beep. Only
967
+ * used when MachineDetection is enabled.
968
+ */
969
+ MachineDetectionBeepSpectralRejectFaxCng?: boolean;
970
+
971
+ /**
972
+ * Length of the spectral confirmation window, in milliseconds. Only used when
973
+ * MachineDetection is enabled.
974
+ */
975
+ MachineDetectionBeepSpectralWindow?: number;
976
+
885
977
  /**
886
978
  * Silence duration threshold after a call screening prompt before ending prompt
887
979
  * detection, in milliseconds. Used when `DetectionMode` is `PremiumCallScreening`.
@@ -1152,6 +1244,27 @@ export namespace CallCallsParams {
1152
1244
  */
1153
1245
  MachineDetection?: 'Enable' | 'Disable' | 'DetectMessageEnd';
1154
1246
 
1247
+ /**
1248
+ * Highest frequency, in Hz, that a tone can reach and still be treated as a beep.
1249
+ * Only used when MachineDetection is enabled.
1250
+ */
1251
+ MachineDetectionBeepMaxFrequency?: number;
1252
+
1253
+ /**
1254
+ * Lowest frequency, in Hz, that a tone must reach to be treated as a beep. Raising
1255
+ * it above 480 excludes North American ringback (440 + 480 Hz), which can
1256
+ * otherwise be reported as a beep when the `freq_only` profile is in use. Only
1257
+ * used when MachineDetection is enabled.
1258
+ */
1259
+ MachineDetectionBeepMinFrequency?: number;
1260
+
1261
+ /**
1262
+ * Shortest tone, in milliseconds, that can be treated as a beep. Raising it
1263
+ * rejects brief tones such as call-progress blips. Only used when MachineDetection
1264
+ * is enabled.
1265
+ */
1266
+ MachineDetectionBeepMinToneDuration?: number;
1267
+
1155
1268
  /**
1156
1269
  * Selects which detectors must validate a beep. `both` requires the amplitude and
1157
1270
  * frequency detectors to agree. `freq_only` uses the frequency detector alone, for
@@ -1160,6 +1273,31 @@ export namespace CallCallsParams {
1160
1273
  */
1161
1274
  MachineDetectionBeepProfile?: 'both' | 'freq_only';
1162
1275
 
1276
+ /**
1277
+ * When enabled, a candidate beep must pass an additional spectral check before it
1278
+ * is reported. Only used when MachineDetection is enabled.
1279
+ */
1280
+ MachineDetectionBeepSpectralConfirmation?: boolean;
1281
+
1282
+ /**
1283
+ * Minimum spectral purity, from 0 to 1, for a tone to be treated as a beep.
1284
+ * Raising it rejects mixed tones such as ringback, which combines two frequencies.
1285
+ * Only used when MachineDetection is enabled.
1286
+ */
1287
+ MachineDetectionBeepSpectralMinPurity?: number;
1288
+
1289
+ /**
1290
+ * When enabled, the fax CNG tone is rejected rather than reported as a beep. Only
1291
+ * used when MachineDetection is enabled.
1292
+ */
1293
+ MachineDetectionBeepSpectralRejectFaxCng?: boolean;
1294
+
1295
+ /**
1296
+ * Length of the spectral confirmation window, in milliseconds. Only used when
1297
+ * MachineDetection is enabled.
1298
+ */
1299
+ MachineDetectionBeepSpectralWindow?: number;
1300
+
1163
1301
  /**
1164
1302
  * Silence duration threshold after a call screening prompt before ending prompt
1165
1303
  * detection, in milliseconds. Used when `DetectionMode` is `PremiumCallScreening`.
@@ -484,6 +484,27 @@ export interface ParticipantParticipantsParams {
484
484
  */
485
485
  MachineDetection?: 'Enable' | 'DetectMessageEnd';
486
486
 
487
+ /**
488
+ * Body param: Highest frequency, in Hz, that a tone can reach and still be treated
489
+ * as a beep. Only used when MachineDetection is enabled.
490
+ */
491
+ MachineDetectionBeepMaxFrequency?: number;
492
+
493
+ /**
494
+ * Body param: Lowest frequency, in Hz, that a tone must reach to be treated as a
495
+ * beep. Raising it above 480 excludes North American ringback (440 + 480 Hz),
496
+ * which can otherwise be reported as a beep when the `freq_only` profile is in
497
+ * use. Only used when MachineDetection is enabled.
498
+ */
499
+ MachineDetectionBeepMinFrequency?: number;
500
+
501
+ /**
502
+ * Body param: Shortest tone, in milliseconds, that can be treated as a beep.
503
+ * Raising it rejects brief tones such as call-progress blips. Only used when
504
+ * MachineDetection is enabled.
505
+ */
506
+ MachineDetectionBeepMinToneDuration?: number;
507
+
487
508
  /**
488
509
  * Body param: Selects which detectors must validate a beep. `both` requires the
489
510
  * amplitude and frequency detectors to agree. `freq_only` uses the frequency
@@ -492,6 +513,31 @@ export interface ParticipantParticipantsParams {
492
513
  */
493
514
  MachineDetectionBeepProfile?: 'both' | 'freq_only';
494
515
 
516
+ /**
517
+ * Body param: When enabled, a candidate beep must pass an additional spectral
518
+ * check before it is reported. Only used when MachineDetection is enabled.
519
+ */
520
+ MachineDetectionBeepSpectralConfirmation?: boolean;
521
+
522
+ /**
523
+ * Body param: Minimum spectral purity, from 0 to 1, for a tone to be treated as a
524
+ * beep. Raising it rejects mixed tones such as ringback, which combines two
525
+ * frequencies. Only used when MachineDetection is enabled.
526
+ */
527
+ MachineDetectionBeepSpectralMinPurity?: number;
528
+
529
+ /**
530
+ * Body param: When enabled, the fax CNG tone is rejected rather than reported as a
531
+ * beep. Only used when MachineDetection is enabled.
532
+ */
533
+ MachineDetectionBeepSpectralRejectFaxCng?: boolean;
534
+
535
+ /**
536
+ * Body param: Length of the spectral confirmation window, in milliseconds. Only
537
+ * used when MachineDetection is enabled.
538
+ */
539
+ MachineDetectionBeepSpectralWindow?: number;
540
+
495
541
  /**
496
542
  * Body param: If initial silence duration is greater than this value, consider it
497
543
  * a machine. Ignored when `premium` detection is used.