telnyx 7.24.0 → 7.26.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 (536) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +27 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +27 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +21 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +21 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/ai/ai.d.mts +16 -6
  12. package/resources/ai/ai.d.mts.map +1 -1
  13. package/resources/ai/ai.d.ts +16 -6
  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 +4 -0
  18. package/resources/ai/ai.mjs.map +1 -1
  19. package/resources/ai/assistants/assistants.d.mts +551 -33
  20. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  21. package/resources/ai/assistants/assistants.d.ts +551 -33
  22. package/resources/ai/assistants/assistants.d.ts.map +1 -1
  23. package/resources/ai/assistants/assistants.js +79 -2
  24. package/resources/ai/assistants/assistants.js.map +1 -1
  25. package/resources/ai/assistants/assistants.mjs +79 -2
  26. package/resources/ai/assistants/assistants.mjs.map +1 -1
  27. package/resources/ai/assistants/deleted.d.mts +60 -0
  28. package/resources/ai/assistants/deleted.d.mts.map +1 -0
  29. package/resources/ai/assistants/deleted.d.ts +60 -0
  30. package/resources/ai/assistants/deleted.d.ts.map +1 -0
  31. package/resources/ai/assistants/deleted.js +49 -0
  32. package/resources/ai/assistants/deleted.js.map +1 -0
  33. package/resources/ai/assistants/deleted.mjs +45 -0
  34. package/resources/ai/assistants/deleted.mjs.map +1 -0
  35. package/resources/ai/assistants/index.d.mts +2 -1
  36. package/resources/ai/assistants/index.d.mts.map +1 -1
  37. package/resources/ai/assistants/index.d.ts +2 -1
  38. package/resources/ai/assistants/index.d.ts.map +1 -1
  39. package/resources/ai/assistants/index.js +3 -1
  40. package/resources/ai/assistants/index.js.map +1 -1
  41. package/resources/ai/assistants/index.mjs +1 -0
  42. package/resources/ai/assistants/index.mjs.map +1 -1
  43. package/resources/ai/assistants/versions.d.mts +48 -0
  44. package/resources/ai/assistants/versions.d.mts.map +1 -1
  45. package/resources/ai/assistants/versions.d.ts +48 -0
  46. package/resources/ai/assistants/versions.d.ts.map +1 -1
  47. package/resources/ai/avatars.d.mts +187 -0
  48. package/resources/ai/avatars.d.mts.map +1 -0
  49. package/resources/ai/avatars.d.ts +187 -0
  50. package/resources/ai/avatars.d.ts.map +1 -0
  51. package/resources/ai/avatars.js +93 -0
  52. package/resources/ai/avatars.js.map +1 -0
  53. package/resources/ai/avatars.mjs +89 -0
  54. package/resources/ai/avatars.mjs.map +1 -0
  55. package/resources/ai/chat.d.mts +21 -2
  56. package/resources/ai/chat.d.mts.map +1 -1
  57. package/resources/ai/chat.d.ts +21 -2
  58. package/resources/ai/chat.d.ts.map +1 -1
  59. package/resources/ai/conversations/conversations.d.mts +8 -0
  60. package/resources/ai/conversations/conversations.d.mts.map +1 -1
  61. package/resources/ai/conversations/conversations.d.ts +8 -0
  62. package/resources/ai/conversations/conversations.d.ts.map +1 -1
  63. package/resources/ai/conversations/conversations.js.map +1 -1
  64. package/resources/ai/conversations/conversations.mjs.map +1 -1
  65. package/resources/ai/embeddings/embeddings.d.mts +1 -1
  66. package/resources/ai/embeddings/embeddings.d.ts +1 -1
  67. package/resources/ai/embeddings/embeddings.js +1 -1
  68. package/resources/ai/embeddings/embeddings.mjs +1 -1
  69. package/resources/ai/index.d.mts +3 -2
  70. package/resources/ai/index.d.mts.map +1 -1
  71. package/resources/ai/index.d.ts +3 -2
  72. package/resources/ai/index.d.ts.map +1 -1
  73. package/resources/ai/index.js +3 -1
  74. package/resources/ai/index.js.map +1 -1
  75. package/resources/ai/index.mjs +1 -0
  76. package/resources/ai/index.mjs.map +1 -1
  77. package/resources/ai/memory/index.d.mts +1 -1
  78. package/resources/ai/memory/index.d.mts.map +1 -1
  79. package/resources/ai/memory/index.d.ts +1 -1
  80. package/resources/ai/memory/index.d.ts.map +1 -1
  81. package/resources/ai/memory/index.js.map +1 -1
  82. package/resources/ai/memory/index.mjs +1 -1
  83. package/resources/ai/memory/index.mjs.map +1 -1
  84. package/resources/ai/memory/memory.d.mts +2 -2
  85. package/resources/ai/memory/memory.d.mts.map +1 -1
  86. package/resources/ai/memory/memory.d.ts +2 -2
  87. package/resources/ai/memory/memory.d.ts.map +1 -1
  88. package/resources/ai/memory/memory.js.map +1 -1
  89. package/resources/ai/memory/memory.mjs +1 -1
  90. package/resources/ai/memory/memory.mjs.map +1 -1
  91. package/resources/ai/memory/namespaces/index.d.mts +2 -2
  92. package/resources/ai/memory/namespaces/index.d.mts.map +1 -1
  93. package/resources/ai/memory/namespaces/index.d.ts +2 -2
  94. package/resources/ai/memory/namespaces/index.d.ts.map +1 -1
  95. package/resources/ai/memory/namespaces/index.js.map +1 -1
  96. package/resources/ai/memory/namespaces/index.mjs +1 -1
  97. package/resources/ai/memory/namespaces/index.mjs.map +1 -1
  98. package/resources/ai/memory/namespaces/namespaces.d.mts +62 -6
  99. package/resources/ai/memory/namespaces/namespaces.d.mts.map +1 -1
  100. package/resources/ai/memory/namespaces/namespaces.d.ts +62 -6
  101. package/resources/ai/memory/namespaces/namespaces.d.ts.map +1 -1
  102. package/resources/ai/memory/namespaces/namespaces.js +41 -3
  103. package/resources/ai/memory/namespaces/namespaces.js.map +1 -1
  104. package/resources/ai/memory/namespaces/namespaces.mjs +41 -3
  105. package/resources/ai/memory/namespaces/namespaces.mjs.map +1 -1
  106. package/resources/ai/memory/namespaces/profiles/index.d.mts +1 -1
  107. package/resources/ai/memory/namespaces/profiles/index.d.mts.map +1 -1
  108. package/resources/ai/memory/namespaces/profiles/index.d.ts +1 -1
  109. package/resources/ai/memory/namespaces/profiles/index.d.ts.map +1 -1
  110. package/resources/ai/memory/namespaces/profiles/index.js.map +1 -1
  111. package/resources/ai/memory/namespaces/profiles/index.mjs.map +1 -1
  112. package/resources/ai/memory/namespaces/profiles/profiles.d.mts +54 -1
  113. package/resources/ai/memory/namespaces/profiles/profiles.d.mts.map +1 -1
  114. package/resources/ai/memory/namespaces/profiles/profiles.d.ts +54 -1
  115. package/resources/ai/memory/namespaces/profiles/profiles.d.ts.map +1 -1
  116. package/resources/ai/memory/namespaces/profiles/profiles.js +31 -0
  117. package/resources/ai/memory/namespaces/profiles/profiles.js.map +1 -1
  118. package/resources/ai/memory/namespaces/profiles/profiles.mjs +31 -0
  119. package/resources/ai/memory/namespaces/profiles/profiles.mjs.map +1 -1
  120. package/resources/ai/openai/chat.d.mts +21 -2
  121. package/resources/ai/openai/chat.d.mts.map +1 -1
  122. package/resources/ai/openai/chat.d.ts +21 -2
  123. package/resources/ai/openai/chat.d.ts.map +1 -1
  124. package/resources/ai/tools.d.mts +20 -5
  125. package/resources/ai/tools.d.mts.map +1 -1
  126. package/resources/ai/tools.d.ts +20 -5
  127. package/resources/ai/tools.d.ts.map +1 -1
  128. package/resources/ai/tools.js +5 -2
  129. package/resources/ai/tools.js.map +1 -1
  130. package/resources/ai/tools.mjs +5 -2
  131. package/resources/ai/tools.mjs.map +1 -1
  132. package/resources/calls/actions.d.mts +135 -30
  133. package/resources/calls/actions.d.mts.map +1 -1
  134. package/resources/calls/actions.d.ts +135 -30
  135. package/resources/calls/actions.d.ts.map +1 -1
  136. package/resources/calls/actions.js +31 -0
  137. package/resources/calls/actions.js.map +1 -1
  138. package/resources/calls/actions.mjs +31 -0
  139. package/resources/calls/actions.mjs.map +1 -1
  140. package/resources/calls/calls.d.mts +72 -25
  141. package/resources/calls/calls.d.mts.map +1 -1
  142. package/resources/calls/calls.d.ts +72 -25
  143. package/resources/calls/calls.d.ts.map +1 -1
  144. package/resources/calls/calls.js +11 -0
  145. package/resources/calls/calls.js.map +1 -1
  146. package/resources/calls/calls.mjs +11 -0
  147. package/resources/calls/calls.mjs.map +1 -1
  148. package/resources/calls/index.d.mts +1 -1
  149. package/resources/calls/index.d.mts.map +1 -1
  150. package/resources/calls/index.d.ts +1 -1
  151. package/resources/calls/index.d.ts.map +1 -1
  152. package/resources/calls/index.js.map +1 -1
  153. package/resources/calls/index.mjs.map +1 -1
  154. package/resources/dir/dir.d.mts +226 -31
  155. package/resources/dir/dir.d.mts.map +1 -1
  156. package/resources/dir/dir.d.ts +226 -31
  157. package/resources/dir/dir.d.ts.map +1 -1
  158. package/resources/dir/dir.js +78 -14
  159. package/resources/dir/dir.js.map +1 -1
  160. package/resources/dir/dir.mjs +78 -14
  161. package/resources/dir/dir.mjs.map +1 -1
  162. package/resources/dir/index.d.mts +1 -1
  163. package/resources/dir/index.d.mts.map +1 -1
  164. package/resources/dir/index.d.ts +1 -1
  165. package/resources/dir/index.d.ts.map +1 -1
  166. package/resources/dir/index.js.map +1 -1
  167. package/resources/dir/index.mjs.map +1 -1
  168. package/resources/dir/phone-numbers.d.mts +8 -8
  169. package/resources/dir/phone-numbers.d.mts.map +1 -1
  170. package/resources/dir/phone-numbers.d.ts +8 -8
  171. package/resources/dir/phone-numbers.d.ts.map +1 -1
  172. package/resources/dir/phone-numbers.js +4 -4
  173. package/resources/dir/phone-numbers.mjs +4 -4
  174. package/resources/dir/references.d.mts +9 -6
  175. package/resources/dir/references.d.mts.map +1 -1
  176. package/resources/dir/references.d.ts +9 -6
  177. package/resources/dir/references.d.ts.map +1 -1
  178. package/resources/email-templates.d.mts +109 -18
  179. package/resources/email-templates.d.mts.map +1 -1
  180. package/resources/email-templates.d.ts +109 -18
  181. package/resources/email-templates.d.ts.map +1 -1
  182. package/resources/email-templates.js +5 -1
  183. package/resources/email-templates.js.map +1 -1
  184. package/resources/email-templates.mjs +5 -1
  185. package/resources/email-templates.mjs.map +1 -1
  186. package/resources/enterprises/dir.d.mts +25 -3
  187. package/resources/enterprises/dir.d.mts.map +1 -1
  188. package/resources/enterprises/dir.d.ts +25 -3
  189. package/resources/enterprises/dir.d.ts.map +1 -1
  190. package/resources/enterprises/dir.js +8 -2
  191. package/resources/enterprises/dir.js.map +1 -1
  192. package/resources/enterprises/dir.mjs +8 -2
  193. package/resources/enterprises/dir.mjs.map +1 -1
  194. package/resources/enterprises/enterprises.d.mts +244 -28
  195. package/resources/enterprises/enterprises.d.mts.map +1 -1
  196. package/resources/enterprises/enterprises.d.ts +244 -28
  197. package/resources/enterprises/enterprises.d.ts.map +1 -1
  198. package/resources/enterprises/enterprises.js +31 -7
  199. package/resources/enterprises/enterprises.js.map +1 -1
  200. package/resources/enterprises/enterprises.mjs +31 -7
  201. package/resources/enterprises/enterprises.mjs.map +1 -1
  202. package/resources/enterprises/index.d.mts +2 -1
  203. package/resources/enterprises/index.d.mts.map +1 -1
  204. package/resources/enterprises/index.d.ts +2 -1
  205. package/resources/enterprises/index.d.ts.map +1 -1
  206. package/resources/enterprises/index.js +3 -1
  207. package/resources/enterprises/index.js.map +1 -1
  208. package/resources/enterprises/index.mjs +1 -0
  209. package/resources/enterprises/index.mjs.map +1 -1
  210. package/resources/enterprises/reputation/external-verification.d.mts +94 -0
  211. package/resources/enterprises/reputation/external-verification.d.mts.map +1 -0
  212. package/resources/enterprises/reputation/external-verification.d.ts +94 -0
  213. package/resources/enterprises/reputation/external-verification.d.ts.map +1 -0
  214. package/resources/enterprises/reputation/external-verification.js +54 -0
  215. package/resources/enterprises/reputation/external-verification.js.map +1 -0
  216. package/resources/enterprises/reputation/external-verification.mjs +50 -0
  217. package/resources/enterprises/reputation/external-verification.mjs.map +1 -0
  218. package/resources/enterprises/reputation/index.d.mts +3 -2
  219. package/resources/enterprises/reputation/index.d.mts.map +1 -1
  220. package/resources/enterprises/reputation/index.d.ts +3 -2
  221. package/resources/enterprises/reputation/index.d.ts.map +1 -1
  222. package/resources/enterprises/reputation/index.js +3 -1
  223. package/resources/enterprises/reputation/index.js.map +1 -1
  224. package/resources/enterprises/reputation/index.mjs +1 -0
  225. package/resources/enterprises/reputation/index.mjs.map +1 -1
  226. package/resources/enterprises/reputation/loa.d.mts +64 -3
  227. package/resources/enterprises/reputation/loa.d.mts.map +1 -1
  228. package/resources/enterprises/reputation/loa.d.ts +64 -3
  229. package/resources/enterprises/reputation/loa.d.ts.map +1 -1
  230. package/resources/enterprises/reputation/numbers.d.mts +197 -4
  231. package/resources/enterprises/reputation/numbers.d.mts.map +1 -1
  232. package/resources/enterprises/reputation/numbers.d.ts +197 -4
  233. package/resources/enterprises/reputation/numbers.d.ts.map +1 -1
  234. package/resources/enterprises/reputation/numbers.js +58 -2
  235. package/resources/enterprises/reputation/numbers.js.map +1 -1
  236. package/resources/enterprises/reputation/numbers.mjs +58 -2
  237. package/resources/enterprises/reputation/numbers.mjs.map +1 -1
  238. package/resources/enterprises/reputation/remediation.d.mts +3 -2
  239. package/resources/enterprises/reputation/remediation.d.mts.map +1 -1
  240. package/resources/enterprises/reputation/remediation.d.ts +3 -2
  241. package/resources/enterprises/reputation/remediation.d.ts.map +1 -1
  242. package/resources/enterprises/reputation/reputation.d.mts +39 -3
  243. package/resources/enterprises/reputation/reputation.d.mts.map +1 -1
  244. package/resources/enterprises/reputation/reputation.d.ts +39 -3
  245. package/resources/enterprises/reputation/reputation.d.ts.map +1 -1
  246. package/resources/enterprises/reputation/reputation.js +22 -0
  247. package/resources/enterprises/reputation/reputation.js.map +1 -1
  248. package/resources/enterprises/reputation/reputation.mjs +22 -0
  249. package/resources/enterprises/reputation/reputation.mjs.map +1 -1
  250. package/resources/enterprises/verify-email.d.mts +91 -0
  251. package/resources/enterprises/verify-email.d.mts.map +1 -0
  252. package/resources/enterprises/verify-email.d.ts +91 -0
  253. package/resources/enterprises/verify-email.d.ts.map +1 -0
  254. package/resources/enterprises/verify-email.js +55 -0
  255. package/resources/enterprises/verify-email.js.map +1 -0
  256. package/resources/enterprises/verify-email.mjs +51 -0
  257. package/resources/enterprises/verify-email.mjs.map +1 -0
  258. package/resources/global-ip-assignment-health.d.mts +4 -4
  259. package/resources/global-ip-assignment-health.d.mts.map +1 -1
  260. package/resources/global-ip-assignment-health.d.ts +4 -4
  261. package/resources/global-ip-assignment-health.d.ts.map +1 -1
  262. package/resources/global-ip-assignments-usage.d.mts +4 -4
  263. package/resources/global-ip-assignments-usage.d.mts.map +1 -1
  264. package/resources/global-ip-assignments-usage.d.ts +4 -4
  265. package/resources/global-ip-assignments-usage.d.ts.map +1 -1
  266. package/resources/index.d.mts +6 -3
  267. package/resources/index.d.mts.map +1 -1
  268. package/resources/index.d.ts +6 -3
  269. package/resources/index.d.ts.map +1 -1
  270. package/resources/index.js +9 -3
  271. package/resources/index.js.map +1 -1
  272. package/resources/index.mjs +3 -0
  273. package/resources/index.mjs.map +1 -1
  274. package/resources/infringement-claims.d.mts +4 -0
  275. package/resources/infringement-claims.d.mts.map +1 -1
  276. package/resources/infringement-claims.d.ts +4 -0
  277. package/resources/infringement-claims.d.ts.map +1 -1
  278. package/resources/llm-token-gateway/index.d.mts +6 -0
  279. package/resources/llm-token-gateway/index.d.mts.map +1 -0
  280. package/resources/llm-token-gateway/index.d.ts +6 -0
  281. package/resources/llm-token-gateway/index.d.ts.map +1 -0
  282. package/resources/llm-token-gateway/index.js +15 -0
  283. package/resources/llm-token-gateway/index.js.map +1 -0
  284. package/resources/llm-token-gateway/index.mjs +7 -0
  285. package/resources/llm-token-gateway/index.mjs.map +1 -0
  286. package/resources/llm-token-gateway/llm-token-gateway.d.mts +22 -0
  287. package/resources/llm-token-gateway/llm-token-gateway.d.mts.map +1 -0
  288. package/resources/llm-token-gateway/llm-token-gateway.d.ts +22 -0
  289. package/resources/llm-token-gateway/llm-token-gateway.d.ts.map +1 -0
  290. package/resources/llm-token-gateway/llm-token-gateway.js +29 -0
  291. package/resources/llm-token-gateway/llm-token-gateway.js.map +1 -0
  292. package/resources/llm-token-gateway/llm-token-gateway.mjs +24 -0
  293. package/resources/llm-token-gateway/llm-token-gateway.mjs.map +1 -0
  294. package/resources/llm-token-gateway/spend.d.mts +223 -0
  295. package/resources/llm-token-gateway/spend.d.mts.map +1 -0
  296. package/resources/llm-token-gateway/spend.d.ts +223 -0
  297. package/resources/llm-token-gateway/spend.d.ts.map +1 -0
  298. package/resources/llm-token-gateway/spend.js +56 -0
  299. package/resources/llm-token-gateway/spend.js.map +1 -0
  300. package/resources/llm-token-gateway/spend.mjs +52 -0
  301. package/resources/llm-token-gateway/spend.mjs.map +1 -0
  302. package/resources/llm-token-gateway/token-groups.d.mts +577 -0
  303. package/resources/llm-token-gateway/token-groups.d.mts.map +1 -0
  304. package/resources/llm-token-gateway/token-groups.d.ts +577 -0
  305. package/resources/llm-token-gateway/token-groups.d.ts.map +1 -0
  306. package/resources/llm-token-gateway/token-groups.js +139 -0
  307. package/resources/llm-token-gateway/token-groups.js.map +1 -0
  308. package/resources/llm-token-gateway/token-groups.mjs +135 -0
  309. package/resources/llm-token-gateway/token-groups.mjs.map +1 -0
  310. package/resources/llm-token-gateway/token-keys.d.mts +318 -0
  311. package/resources/llm-token-gateway/token-keys.d.mts.map +1 -0
  312. package/resources/llm-token-gateway/token-keys.d.ts +318 -0
  313. package/resources/llm-token-gateway/token-keys.d.ts.map +1 -0
  314. package/resources/llm-token-gateway/token-keys.js +127 -0
  315. package/resources/llm-token-gateway/token-keys.js.map +1 -0
  316. package/resources/llm-token-gateway/token-keys.mjs +123 -0
  317. package/resources/llm-token-gateway/token-keys.mjs.map +1 -0
  318. package/resources/llm-token-gateway/usage.d.mts +319 -0
  319. package/resources/llm-token-gateway/usage.d.mts.map +1 -0
  320. package/resources/llm-token-gateway/usage.d.ts +319 -0
  321. package/resources/llm-token-gateway/usage.d.ts.map +1 -0
  322. package/resources/llm-token-gateway/usage.js +63 -0
  323. package/resources/llm-token-gateway/usage.js.map +1 -0
  324. package/resources/llm-token-gateway/usage.mjs +59 -0
  325. package/resources/llm-token-gateway/usage.mjs.map +1 -0
  326. package/resources/llm-token-gateway.d.mts +2 -0
  327. package/resources/llm-token-gateway.d.mts.map +1 -0
  328. package/resources/llm-token-gateway.d.ts +2 -0
  329. package/resources/llm-token-gateway.d.ts.map +1 -0
  330. package/resources/llm-token-gateway.js +6 -0
  331. package/resources/llm-token-gateway.js.map +1 -0
  332. package/resources/llm-token-gateway.mjs +3 -0
  333. package/resources/llm-token-gateway.mjs.map +1 -0
  334. package/resources/meeting-sessions/meeting-sessions.d.mts +8 -9
  335. package/resources/meeting-sessions/meeting-sessions.d.mts.map +1 -1
  336. package/resources/meeting-sessions/meeting-sessions.d.ts +8 -9
  337. package/resources/meeting-sessions/meeting-sessions.d.ts.map +1 -1
  338. package/resources/meeting-sessions/meeting-sessions.js +6 -6
  339. package/resources/meeting-sessions/meeting-sessions.js.map +1 -1
  340. package/resources/meeting-sessions/meeting-sessions.mjs +6 -6
  341. package/resources/meeting-sessions/meeting-sessions.mjs.map +1 -1
  342. package/resources/phone-numbers/jobs.d.mts +17 -5
  343. package/resources/phone-numbers/jobs.d.mts.map +1 -1
  344. package/resources/phone-numbers/jobs.d.ts +17 -5
  345. package/resources/phone-numbers/jobs.d.ts.map +1 -1
  346. package/resources/phone-numbers/jobs.js +4 -3
  347. package/resources/phone-numbers/jobs.js.map +1 -1
  348. package/resources/phone-numbers/jobs.mjs +4 -3
  349. package/resources/phone-numbers/jobs.mjs.map +1 -1
  350. package/resources/porting-orders/phone-number-blocks.d.mts +1 -1
  351. package/resources/porting-orders/phone-number-blocks.d.mts.map +1 -1
  352. package/resources/porting-orders/phone-number-blocks.d.ts +1 -1
  353. package/resources/porting-orders/phone-number-blocks.d.ts.map +1 -1
  354. package/resources/porting-orders/porting-orders.d.mts +1 -1
  355. package/resources/porting-orders/porting-orders.d.mts.map +1 -1
  356. package/resources/porting-orders/porting-orders.d.ts +1 -1
  357. package/resources/porting-orders/porting-orders.d.ts.map +1 -1
  358. package/resources/porting-orders/porting-orders.js.map +1 -1
  359. package/resources/porting-orders/porting-orders.mjs.map +1 -1
  360. package/resources/porting-phone-numbers.d.mts +1 -1
  361. package/resources/porting-phone-numbers.d.mts.map +1 -1
  362. package/resources/porting-phone-numbers.d.ts +1 -1
  363. package/resources/porting-phone-numbers.d.ts.map +1 -1
  364. package/resources/reputation/numbers.d.mts +10 -0
  365. package/resources/reputation/numbers.d.mts.map +1 -1
  366. package/resources/reputation/numbers.d.ts +10 -0
  367. package/resources/reputation/numbers.d.ts.map +1 -1
  368. package/resources/requirements.d.mts +2 -2
  369. package/resources/requirements.d.mts.map +1 -1
  370. package/resources/requirements.d.ts +2 -2
  371. package/resources/requirements.d.ts.map +1 -1
  372. package/resources/sip-registration-status.d.mts +149 -0
  373. package/resources/sip-registration-status.d.mts.map +1 -0
  374. package/resources/sip-registration-status.d.ts +149 -0
  375. package/resources/sip-registration-status.d.ts.map +1 -0
  376. package/resources/sip-registration-status.js +32 -0
  377. package/resources/sip-registration-status.js.map +1 -0
  378. package/resources/sip-registration-status.mjs +28 -0
  379. package/resources/sip-registration-status.mjs.map +1 -0
  380. package/resources/spend-limits.d.mts +335 -0
  381. package/resources/spend-limits.d.mts.map +1 -0
  382. package/resources/spend-limits.d.ts +335 -0
  383. package/resources/spend-limits.d.ts.map +1 -0
  384. package/resources/spend-limits.js +91 -0
  385. package/resources/spend-limits.js.map +1 -0
  386. package/resources/spend-limits.mjs +87 -0
  387. package/resources/spend-limits.mjs.map +1 -0
  388. package/resources/terms-of-service/agreements.d.mts +12 -0
  389. package/resources/terms-of-service/agreements.d.mts.map +1 -1
  390. package/resources/terms-of-service/agreements.d.ts +12 -0
  391. package/resources/terms-of-service/agreements.d.ts.map +1 -1
  392. package/resources/terms-of-service/terms-of-service.d.mts +15 -0
  393. package/resources/terms-of-service/terms-of-service.d.mts.map +1 -1
  394. package/resources/terms-of-service/terms-of-service.d.ts +15 -0
  395. package/resources/terms-of-service/terms-of-service.d.ts.map +1 -1
  396. package/resources/terms-of-service/terms-of-service.js.map +1 -1
  397. package/resources/terms-of-service/terms-of-service.mjs.map +1 -1
  398. package/resources/texml/texml.d.mts +7 -3
  399. package/resources/texml/texml.d.mts.map +1 -1
  400. package/resources/texml/texml.d.ts +7 -3
  401. package/resources/texml/texml.d.ts.map +1 -1
  402. package/resources/texml/texml.js +4 -2
  403. package/resources/texml/texml.js.map +1 -1
  404. package/resources/texml/texml.mjs +4 -2
  405. package/resources/texml/texml.mjs.map +1 -1
  406. package/resources/text-to-speech/text-to-speech.d.mts +4 -2
  407. package/resources/text-to-speech/text-to-speech.d.mts.map +1 -1
  408. package/resources/text-to-speech/text-to-speech.d.ts +4 -2
  409. package/resources/text-to-speech/text-to-speech.d.ts.map +1 -1
  410. package/resources/webhooks.d.mts +967 -6
  411. package/resources/webhooks.d.mts.map +1 -1
  412. package/resources/webhooks.d.ts +967 -6
  413. package/resources/webhooks.d.ts.map +1 -1
  414. package/resources/webhooks.js.map +1 -1
  415. package/resources/webhooks.mjs.map +1 -1
  416. package/resources/whatsapp/index.d.mts +1 -0
  417. package/resources/whatsapp/index.d.mts.map +1 -1
  418. package/resources/whatsapp/index.d.ts +1 -0
  419. package/resources/whatsapp/index.d.ts.map +1 -1
  420. package/resources/whatsapp/index.js +3 -1
  421. package/resources/whatsapp/index.js.map +1 -1
  422. package/resources/whatsapp/index.mjs +1 -0
  423. package/resources/whatsapp/index.mjs.map +1 -1
  424. package/resources/whatsapp/phone-numbers/calling-routing.d.mts +90 -0
  425. package/resources/whatsapp/phone-numbers/calling-routing.d.mts.map +1 -0
  426. package/resources/whatsapp/phone-numbers/calling-routing.d.ts +90 -0
  427. package/resources/whatsapp/phone-numbers/calling-routing.d.ts.map +1 -0
  428. package/resources/whatsapp/phone-numbers/calling-routing.js +66 -0
  429. package/resources/whatsapp/phone-numbers/calling-routing.js.map +1 -0
  430. package/resources/whatsapp/phone-numbers/calling-routing.mjs +62 -0
  431. package/resources/whatsapp/phone-numbers/calling-routing.mjs.map +1 -0
  432. package/resources/whatsapp/phone-numbers/index.d.mts +1 -0
  433. package/resources/whatsapp/phone-numbers/index.d.mts.map +1 -1
  434. package/resources/whatsapp/phone-numbers/index.d.ts +1 -0
  435. package/resources/whatsapp/phone-numbers/index.d.ts.map +1 -1
  436. package/resources/whatsapp/phone-numbers/index.js +3 -1
  437. package/resources/whatsapp/phone-numbers/index.js.map +1 -1
  438. package/resources/whatsapp/phone-numbers/index.mjs +1 -0
  439. package/resources/whatsapp/phone-numbers/index.mjs.map +1 -1
  440. package/resources/whatsapp/phone-numbers/phone-numbers.d.mts +4 -0
  441. package/resources/whatsapp/phone-numbers/phone-numbers.d.mts.map +1 -1
  442. package/resources/whatsapp/phone-numbers/phone-numbers.d.ts +4 -0
  443. package/resources/whatsapp/phone-numbers/phone-numbers.d.ts.map +1 -1
  444. package/resources/whatsapp/phone-numbers/phone-numbers.js +4 -0
  445. package/resources/whatsapp/phone-numbers/phone-numbers.js.map +1 -1
  446. package/resources/whatsapp/phone-numbers/phone-numbers.mjs +4 -0
  447. package/resources/whatsapp/phone-numbers/phone-numbers.mjs.map +1 -1
  448. package/resources/whatsapp/signup.d.mts +128 -0
  449. package/resources/whatsapp/signup.d.mts.map +1 -0
  450. package/resources/whatsapp/signup.d.ts +128 -0
  451. package/resources/whatsapp/signup.d.ts.map +1 -0
  452. package/resources/whatsapp/signup.js +42 -0
  453. package/resources/whatsapp/signup.js.map +1 -0
  454. package/resources/whatsapp/signup.mjs +38 -0
  455. package/resources/whatsapp/signup.mjs.map +1 -0
  456. package/resources/whatsapp/whatsapp.d.mts +4 -0
  457. package/resources/whatsapp/whatsapp.d.mts.map +1 -1
  458. package/resources/whatsapp/whatsapp.d.ts +4 -0
  459. package/resources/whatsapp/whatsapp.d.ts.map +1 -1
  460. package/resources/whatsapp/whatsapp.js +4 -0
  461. package/resources/whatsapp/whatsapp.js.map +1 -1
  462. package/resources/whatsapp/whatsapp.mjs +4 -0
  463. package/resources/whatsapp/whatsapp.mjs.map +1 -1
  464. package/src/client.ts +83 -0
  465. package/src/resources/ai/ai.ts +48 -4
  466. package/src/resources/ai/assistants/assistants.ts +676 -33
  467. package/src/resources/ai/assistants/deleted.ts +86 -0
  468. package/src/resources/ai/assistants/index.ts +13 -0
  469. package/src/resources/ai/assistants/versions.ts +54 -0
  470. package/src/resources/ai/avatars.ts +238 -0
  471. package/src/resources/ai/chat.ts +21 -2
  472. package/src/resources/ai/conversations/conversations.ts +9 -0
  473. package/src/resources/ai/embeddings/embeddings.ts +1 -1
  474. package/src/resources/ai/index.ts +18 -1
  475. package/src/resources/ai/memory/index.ts +9 -1
  476. package/src/resources/ai/memory/memory.ts +13 -1
  477. package/src/resources/ai/memory/namespaces/index.ts +11 -1
  478. package/src/resources/ai/memory/namespaces/namespaces.ts +85 -3
  479. package/src/resources/ai/memory/namespaces/profiles/index.ts +2 -0
  480. package/src/resources/ai/memory/namespaces/profiles/profiles.ts +71 -0
  481. package/src/resources/ai/openai/chat.ts +21 -2
  482. package/src/resources/ai/tools.ts +25 -7
  483. package/src/resources/calls/actions.ts +141 -25
  484. package/src/resources/calls/calls.ts +73 -17
  485. package/src/resources/calls/index.ts +1 -0
  486. package/src/resources/dir/dir.ts +269 -35
  487. package/src/resources/dir/index.ts +6 -0
  488. package/src/resources/dir/phone-numbers.ts +9 -10
  489. package/src/resources/dir/references.ts +9 -6
  490. package/src/resources/email-templates.ts +121 -19
  491. package/src/resources/enterprises/dir.ts +27 -3
  492. package/src/resources/enterprises/enterprises.ts +257 -26
  493. package/src/resources/enterprises/index.ts +6 -0
  494. package/src/resources/enterprises/reputation/external-verification.ts +125 -0
  495. package/src/resources/enterprises/reputation/index.ts +12 -0
  496. package/src/resources/enterprises/reputation/loa.ts +76 -3
  497. package/src/resources/enterprises/reputation/numbers.ts +256 -3
  498. package/src/resources/enterprises/reputation/remediation.ts +3 -2
  499. package/src/resources/enterprises/reputation/reputation.ts +70 -0
  500. package/src/resources/enterprises/verify-email.ts +117 -0
  501. package/src/resources/global-ip-assignment-health.ts +4 -4
  502. package/src/resources/global-ip-assignments-usage.ts +4 -4
  503. package/src/resources/index.ts +31 -0
  504. package/src/resources/infringement-claims.ts +4 -0
  505. package/src/resources/llm-token-gateway/index.ts +41 -0
  506. package/src/resources/llm-token-gateway/llm-token-gateway.ts +101 -0
  507. package/src/resources/llm-token-gateway/spend.ts +309 -0
  508. package/src/resources/llm-token-gateway/token-groups.ts +724 -0
  509. package/src/resources/llm-token-gateway/token-keys.ts +422 -0
  510. package/src/resources/llm-token-gateway/usage.ts +460 -0
  511. package/src/resources/llm-token-gateway.ts +3 -0
  512. package/src/resources/meeting-sessions/meeting-sessions.ts +8 -9
  513. package/src/resources/phone-numbers/jobs.ts +18 -5
  514. package/src/resources/porting-orders/phone-number-blocks.ts +9 -1
  515. package/src/resources/porting-orders/porting-orders.ts +9 -1
  516. package/src/resources/porting-phone-numbers.ts +9 -1
  517. package/src/resources/reputation/numbers.ts +12 -0
  518. package/src/resources/requirements.ts +2 -2
  519. package/src/resources/sip-registration-status.ts +188 -0
  520. package/src/resources/spend-limits.ts +428 -0
  521. package/src/resources/terms-of-service/agreements.ts +12 -0
  522. package/src/resources/terms-of-service/terms-of-service.ts +15 -0
  523. package/src/resources/texml/texml.ts +7 -3
  524. package/src/resources/text-to-speech/text-to-speech.ts +4 -2
  525. package/src/resources/webhooks.ts +1460 -228
  526. package/src/resources/whatsapp/index.ts +7 -0
  527. package/src/resources/whatsapp/phone-numbers/calling-routing.ts +114 -0
  528. package/src/resources/whatsapp/phone-numbers/index.ts +7 -0
  529. package/src/resources/whatsapp/phone-numbers/phone-numbers.ts +18 -0
  530. package/src/resources/whatsapp/signup.ts +188 -0
  531. package/src/resources/whatsapp/whatsapp.ts +18 -0
  532. package/src/version.ts +1 -1
  533. package/version.d.mts +1 -1
  534. package/version.d.ts +1 -1
  535. package/version.js +1 -1
  536. package/version.mjs +1 -1
@@ -93,6 +93,7 @@ import {
93
93
  CallControlCommandResult,
94
94
  CallControlCommandResultWithConversationID,
95
95
  ConversationRelayInterruptible,
96
+ ConversationRelayTranscriptionEngineConfig,
96
97
  DeepgramNova2Config,
97
98
  DeepgramNova3Config,
98
99
  DeveloperMessage,
@@ -138,10 +139,18 @@ export class Calls extends APIResource {
138
139
  * include a `call_leg_id` which can be used to correlate the command with
139
140
  * subsequent webhooks.
140
141
  *
142
+ * To place the call with an AI assistant from the start, include `assistant.id`
143
+ * and any per-call overrides in the `assistant` object; Telnyx attempts to warm up
144
+ * the assistant before placing the call and starts it automatically when the
145
+ * called party answers.
146
+ *
141
147
  * **Expected Webhooks:**
142
148
  *
143
149
  * - `call.initiated`
144
150
  * - `call.answered` or `call.hangup`
151
+ * - `call.conversation.created` when the requested assistant conversation is
152
+ * created, or `call.conversation.start_failed` when it could not be started
153
+ * after the called party answered
145
154
  * - `call.hold` and `call.unhold` if the call is held/unheld
146
155
  * - `call.machine.detection.ended` if `answering_machine_detection` was requested
147
156
  * - `call.machine.greeting.ended` if `answering_machine_detection` was requested
@@ -150,6 +159,9 @@ export class Calls extends APIResource {
150
159
  * `answering_machine_detection=premium` was requested
151
160
  * - `call.machine.premium.greeting.ended` if `answering_machine_detection=premium`
152
161
  * was requested and a beep was detected
162
+ * - `call.machine.premium.call_screening.detected` if
163
+ * `answering_machine_detection=premium_ios_call_screening_detection` was
164
+ * requested and an Apple Call Screening tone was detected
153
165
  * - `call.deepfake_detection.result` if `deepfake_detection` was enabled
154
166
  * - `call.deepfake_detection.error` if `deepfake_detection` was enabled and an
155
167
  * error occurred
@@ -188,9 +200,11 @@ export class Calls extends APIResource {
188
200
  }
189
201
 
190
202
  /**
191
- * AI Assistant configuration. All fields except `id` are optional — the
192
- * assistant's stored configuration will be used as fallback for any omitted
193
- * fields.
203
+ * AI Assistant configuration and per-call overrides. All fields except `id` are
204
+ * optional. Omitted assistant fields use the stored configuration. Supplied
205
+ * `voice_settings` and `transcription` objects replace their stored objects rather
206
+ * than merging individual settings; include every setting you want to retain.
207
+ * `dynamic_variables` are merged, with request values taking precedence.
194
208
  */
195
209
  export interface CallAssistantRequest {
196
210
  /**
@@ -282,6 +296,19 @@ export interface CallAssistantRequest {
282
296
  | Shared.CallControlRetrievalTool
283
297
  >;
284
298
 
299
+ /**
300
+ * Per-call speech-to-text configuration for the assistant. If omitted, the stored
301
+ * assistant transcription configuration is used. If supplied, this object replaces
302
+ * the stored transcription settings. This is separate from the top-level
303
+ * `transcription` boolean on answer and dial commands.
304
+ */
305
+ transcription?: ActionsAPI.TranscriptionConfig;
306
+
307
+ /**
308
+ * Per-call voice configuration. Set the voice identifier in
309
+ * `voice_settings.voice`, not in `assistant.voice`. If supplied, this object
310
+ * replaces the stored voice settings.
311
+ */
285
312
  voice_settings?: AssistantsAPI.VoiceSettings;
286
313
  }
287
314
 
@@ -498,9 +525,12 @@ export interface ConversationRelayEmbeddedConfig {
498
525
  * Engine-specific transcription settings for Conversation Relay. This accepts the
499
526
  * same provider-specific options used by the Call Transcription Start command,
500
527
  * such as `transcription_model`, without requiring the engine discriminator to be
501
- * repeated inside this object.
528
+ * repeated inside this object. With Deepgram Flux (`deepgram/flux`),
529
+ * `interim_results`, `eot_threshold` and `eager_eot_threshold` control the interim
530
+ * prompts and the `eagerEndOfTurn` and `turnResumed` frames sent to your WebSocket
531
+ * server.
502
532
  */
503
- transcription_engine_config?: { [key: string]: unknown };
533
+ transcription_engine_config?: ActionsAPI.ConversationRelayTranscriptionEngineConfig;
504
534
 
505
535
  /**
506
536
  * Text-to-speech provider. If omitted, Telnyx derives it from `voice` or
@@ -519,10 +549,10 @@ export interface ConversationRelayEmbeddedConfig {
519
549
  * the `VoiceId` (e.g., `AWS.Polly.Joanna-Neural`). Check the
520
550
  * [available voices](https://docs.aws.amazon.com/polly/latest/dg/available-voices.html)
521
551
  * for compatibility.
522
- * - **Azure:** Use `Azure.<VoiceId>. (e.g. Azure.en-CA-ClaraNeural,
523
- * Azure.en-CA-LiamNeural, Azure.en-US-BrianMultilingualNeural,
524
- * Azure.en-US-Ava:DragonHDLatestNeural. For a complete list of voices, go to
525
- * [Azure Voice Gallery](https://speech.microsoft.com/portal/voicegallery).)
552
+ * - **Azure:** Use `Azure.<VoiceId>` (e.g., `Azure.en-CA-ClaraNeural`,
553
+ * `Azure.en-CA-LiamNeural`, `Azure.en-US-BrianMultilingualNeural`,
554
+ * `Azure.en-US-Ava:DragonHDLatestNeural`). For a complete list of voices, go to
555
+ * [Azure Voice Gallery](https://speech.microsoft.com/portal/voicegallery).
526
556
  * - **ElevenLabs:** Use `ElevenLabs.<ModelId>.<VoiceId>` (e.g.,
527
557
  * `ElevenLabs.BaseModel.John`). The `ModelId` part is optional. To use
528
558
  * ElevenLabs, you must provide your ElevenLabs API key as an integration secret
@@ -637,9 +667,12 @@ export interface ConversationRelayLanguage {
637
667
  * Engine-specific transcription settings for Conversation Relay. This accepts the
638
668
  * same provider-specific options used by the Call Transcription Start command,
639
669
  * such as `transcription_model`, without requiring the engine discriminator to be
640
- * repeated inside this object.
670
+ * repeated inside this object. With Deepgram Flux (`deepgram/flux`),
671
+ * `interim_results`, `eot_threshold` and `eager_eot_threshold` control the interim
672
+ * prompts and the `eagerEndOfTurn` and `turnResumed` frames sent to your WebSocket
673
+ * server.
641
674
  */
642
- transcription_engine_config?: { [key: string]: unknown };
675
+ transcription_engine_config?: ActionsAPI.ConversationRelayTranscriptionEngineConfig;
643
676
 
644
677
  /**
645
678
  * Conversation Relay transcription provider name. Prefer `transcription_engine`
@@ -921,10 +954,20 @@ export interface CallDialParams {
921
954
  * `greeting_end` or `detect_words` is used and a `machine` is detected, you will
922
955
  * receive another `call.machine.greeting.ended` webhook when the answering machine
923
956
  * greeting ends with a beep or silence. If `detect_beep` is used, you will only
924
- * receive `call.machine.greeting.ended` if a beep is detected.
957
+ * receive `call.machine.greeting.ended` if a beep is detected. If
958
+ * `answering_machine_detection` is set to `premium_ios_call_screening_detection`,
959
+ * Premium AMD runs with iOS Call Screening support: after an initial `machine`
960
+ * result, Telnyx listens for the iOS call-screening prompt to end or for an Apple
961
+ * Call Screening tone, sends `call.machine.premium.greeting.ended` with
962
+ * `result=prompt_ended` or `call.machine.premium.call_screening.detected` with
963
+ * `result=screening` respectively. When the Apple Call Screening tone is detected,
964
+ * Premium AMD is restarted on the screened call and a
965
+ * `call.machine.premium.detection.ended` webhook with the post-screening
966
+ * classification follows.
925
967
  */
926
968
  answering_machine_detection?:
927
969
  | 'premium'
970
+ | 'premium_ios_call_screening_detection'
928
971
  | 'detect'
929
972
  | 'detect_beep'
930
973
  | 'detect_words'
@@ -935,14 +978,17 @@ export interface CallDialParams {
935
978
  * Optional configuration parameters to modify 'answering_machine_detection'
936
979
  * performance. Only `total_analysis_time_millis` and `greeting_duration_millis`
937
980
  * parameters are applicable when `premium` is selected as
938
- * answering_machine_detection.
981
+ * answering_machine_detection. `prompt_end_timeout_millis` is additionally
982
+ * applicable when `premium_ios_call_screening_detection` is selected.
939
983
  */
940
984
  answering_machine_detection_config?: CallDialParams.AnsweringMachineDetectionConfig;
941
985
 
942
986
  /**
943
- * AI Assistant configuration. All fields except `id` are optional — the
944
- * assistant's stored configuration will be used as fallback for any omitted
945
- * fields.
987
+ * AI Assistant configuration and per-call overrides. All fields except `id` are
988
+ * optional. Omitted assistant fields use the stored configuration. Supplied
989
+ * `voice_settings` and `transcription` objects replace their stored objects rather
990
+ * than merging individual settings; include every setting you want to retain.
991
+ * `dynamic_variables` are merged, with request values taking precedence.
946
992
  */
947
993
  assistant?: CallAssistantRequest;
948
994
 
@@ -1329,7 +1375,8 @@ export namespace CallDialParams {
1329
1375
  * Optional configuration parameters to modify 'answering_machine_detection'
1330
1376
  * performance. Only `total_analysis_time_millis` and `greeting_duration_millis`
1331
1377
  * parameters are applicable when `premium` is selected as
1332
- * answering_machine_detection.
1378
+ * answering_machine_detection. `prompt_end_timeout_millis` is additionally
1379
+ * applicable when `premium_ios_call_screening_detection` is selected.
1333
1380
  */
1334
1381
  export interface AnsweringMachineDetectionConfig {
1335
1382
  /**
@@ -1429,6 +1476,14 @@ export namespace CallDialParams {
1429
1476
  */
1430
1477
  maximum_word_length_millis?: number;
1431
1478
 
1479
+ /**
1480
+ * Maximum time Telnyx waits, in milliseconds, for the iOS call-screening prompt to
1481
+ * end after Premium AMD initially detects a `machine`. Used when
1482
+ * `answering_machine_detection` is `premium_ios_call_screening_detection`.
1483
+ * Defaults to 5000 milliseconds.
1484
+ */
1485
+ prompt_end_timeout_millis?: number;
1486
+
1432
1487
  /**
1433
1488
  * Minimum noise threshold for any analysis.
1434
1489
  */
@@ -1603,6 +1658,7 @@ export declare namespace Calls {
1603
1658
  type CallControlCommandResult as CallControlCommandResult,
1604
1659
  type CallControlCommandResultWithConversationID as CallControlCommandResultWithConversationID,
1605
1660
  type ConversationRelayInterruptible as ConversationRelayInterruptible,
1661
+ type ConversationRelayTranscriptionEngineConfig as ConversationRelayTranscriptionEngineConfig,
1606
1662
  type DeepgramNova2Config as DeepgramNova2Config,
1607
1663
  type DeepgramNova3Config as DeepgramNova3Config,
1608
1664
  type DeveloperMessage as DeveloperMessage,
@@ -8,6 +8,7 @@ export {
8
8
  type CallControlCommandResult,
9
9
  type CallControlCommandResultWithConversationID,
10
10
  type ConversationRelayInterruptible,
11
+ type ConversationRelayTranscriptionEngineConfig,
11
12
  type DeepgramNova2Config,
12
13
  type DeepgramNova3Config,
13
14
  type DeveloperMessage,
@@ -110,22 +110,23 @@ export class DirResource extends APIResource {
110
110
  }
111
111
 
112
112
  /**
113
- * Delete a DIR. Failure modes: `400` if a child phone number is in a non-deletable
114
- * status, `409` if the DIR has an unresolved infringement claim, `404` if the DIR
115
- * is not yours.
113
+ * Request deletion of a DIR. This does not remove the DIR on this call: it records
114
+ * the request, moves the DIR to `delete_requested`, and Telnyx completes the
115
+ * removal (de-registration and cleanup) shortly after. A verified DIR keeps
116
+ * serving its branded identity, and keeps billing, until the removal is executed.
117
+ * Failure modes: `400` if a child phone number is still attached or the DIR is
118
+ * `in_review` (wait for the review to finish), `409` if the DIR has an unresolved
119
+ * infringement claim, `404` if the DIR is not yours.
116
120
  *
117
121
  * @example
118
122
  * ```ts
119
- * await client.dir.delete(
123
+ * const dir = await client.dir.delete(
120
124
  * '16635d38-75a6-4481-82e8-69af60e05011',
121
125
  * );
122
126
  * ```
123
127
  */
124
- delete(dirID: string, options?: RequestOptions): APIPromise<void> {
125
- return this._client.delete(path`/dir/${dirID}`, {
126
- ...options,
127
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
128
- });
128
+ delete(dirID: string, options?: RequestOptions): APIPromise<DirDeleteResponse> {
129
+ return this._client.delete(path`/dir/${dirID}`, options);
129
130
  }
130
131
 
131
132
  /**
@@ -147,11 +148,14 @@ export class DirResource extends APIResource {
147
148
  * Edit a DIR. DIRs in `draft`, `rejected`, `unsuccessful`, or `suspended` can be
148
149
  * edited freely: PATCH is a pure edit, `status` is never changed, and you re-vet
149
150
  * by calling `POST /v2/dir/{dir_id}/submit` explicitly. A `verified` DIR can also
150
- * be edited in place: a PATCH that changes any value returns the DIR to `draft`
151
- * and branded delivery stops until you re-submit and the DIR is approved again,
152
- * while a PATCH that changes nothing (an empty body or values identical to the
153
- * current ones) leaves the DIR `verified`, so idempotent retries are safe. DIRs in
154
- * any other status (`submitted`, `in_review`, `expired`, `infringement_claimed`,
151
+ * be edited in place: a PATCH that changes any value returns the DIR to `draft`;
152
+ * the currently approved identity keeps displaying, and the edited content goes
153
+ * live only after you re-submit and the DIR is approved again. A PATCH that
154
+ * changes nothing (an empty body or values identical to the current ones) leaves
155
+ * the DIR `verified`, so idempotent retries are safe. Changing only
156
+ * `bpo_authorizations` or `webhook_url` is the exception: the DIR stays
157
+ * `verified`. Each BPO authorization is reviewed on its own instead. DIRs in any
158
+ * other status (`submitted`, `in_review`, `expired`, `infringement_claimed`,
155
159
  * `permanently_rejected`) cannot be edited.
156
160
  *
157
161
  * @example
@@ -245,7 +249,7 @@ export class DirResource extends APIResource {
245
249
  *
246
250
  * Returns `400` from `submitted`/`in_review`/`permanently_rejected`. Returns `400`
247
251
  * if the DIR's business and financial references have not been submitted. Returns
248
- * `409` if the DIR has an unresolved infringement claim.
252
+ * `400` if the DIR has an unresolved infringement claim.
249
253
  *
250
254
  * @example
251
255
  * ```ts
@@ -289,10 +293,95 @@ export class DirResource extends APIResource {
289
293
  __binaryResponse: true,
290
294
  });
291
295
  }
296
+
297
+ /**
298
+ * List the BPO (Business Process Outsourcer) accounts a Brand Owner has authorized
299
+ * on this DIR, together with the review state of each authorization.
300
+ *
301
+ * Authorizations are supplied as the `bpo_authorizations` array when creating or
302
+ * updating a DIR, and each one is reviewed on its own. Only an `approved`
303
+ * authorization adds that BPO to this DIR's authorized callers in the branded
304
+ * calling registry; `pending` and `rejected` authorizations do not. Each entry
305
+ * includes the `loa_document_id` you submitted: because `bpo_authorizations`
306
+ * replaces the whole list on every DIR update, send each entry you want to keep
307
+ * back with its `loa_document_id` unchanged, and it keeps its review state. A
308
+ * rejected entry carries a `rejection_reason`. Returns an empty list when the DIR
309
+ * has authorized no BPOs.
310
+ *
311
+ * @example
312
+ * ```ts
313
+ * const response = await client.dir.retrieveBpoAuthorizations(
314
+ * '16635d38-75a6-4481-82e8-69af60e05011',
315
+ * );
316
+ * ```
317
+ */
318
+ retrieveBpoAuthorizations(
319
+ dirID: string,
320
+ query: DirRetrieveBpoAuthorizationsParams | null | undefined = {},
321
+ options?: RequestOptions,
322
+ ): APIPromise<DirRetrieveBpoAuthorizationsResponse> {
323
+ return this._client.get(path`/dir/${dirID}/bpo_authorizations`, { query, ...options });
324
+ }
325
+
326
+ /**
327
+ * The Letter of Authorization in which a Brand Owner authorizes an approved BPO
328
+ * (Business Process Outsourcer) to place branded calls that display this DIR on
329
+ * the owner's behalf. Both parties are read from the caller's account: the Brand
330
+ * Owner is the enterprise that owns the DIR, and the BPO is `bpo_enterprise_id`.
331
+ * No business identity is accepted in the body.
332
+ *
333
+ * When `signature` is omitted the PDF is returned unsigned so the Brand Owner can
334
+ * sign it externally and the BPO can upload it via the Documents API. When
335
+ * `signature` is present the PDF embeds the supplied image, printed name, and
336
+ * signed-at date.
337
+ *
338
+ * Returns `application/pdf`.
339
+ *
340
+ * @example
341
+ * ```ts
342
+ * const response = await client.dir.bpoLoa(
343
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
344
+ * {
345
+ * bpo_enterprise_id:
346
+ * '4a6192a4-573d-446d-b3ce-aff9117272a6',
347
+ * },
348
+ * );
349
+ *
350
+ * const content = await response.blob();
351
+ * console.log(content);
352
+ * ```
353
+ */
354
+ bpoLoa(dirID: string, body: DirBpoLoaParams, options?: RequestOptions): APIPromise<Response> {
355
+ return this._client.post(path`/dir/${dirID}/bpo_loa`, {
356
+ body,
357
+ ...options,
358
+ headers: buildHeaders([{ Accept: 'application/pdf' }, options?.headers]),
359
+ __binaryResponse: true,
360
+ });
361
+ }
292
362
  }
293
363
 
294
364
  export type DirsDefaultFlatPagination = DefaultFlatPagination<Dir>;
295
365
 
366
+ /**
367
+ * One authorization to include when creating or updating a DIR: an approved BPO
368
+ * (Business Process Outsourcer) account plus the signed Letter of Authorization
369
+ * the Brand Owner granted it.
370
+ */
371
+ export interface BpoAuthorizationInput {
372
+ /**
373
+ * Enterprise id of an approved BPO (Business Process Outsourcer) account on your
374
+ * organization to authorize for this DIR.
375
+ */
376
+ bpo_enterprise_id: string;
377
+
378
+ /**
379
+ * Id of the signed Letter of Authorization document (uploaded via the Telnyx
380
+ * Documents API) in which the Brand Owner authorizes this BPO.
381
+ */
382
+ loa_document_id: string;
383
+ }
384
+
296
385
  export interface Dir {
297
386
  id?: string;
298
387
 
@@ -310,6 +399,12 @@ export interface Dir {
310
399
 
311
400
  created_at?: string;
312
401
 
402
+ /**
403
+ * When deletion was requested. Set once the DIR enters `delete_requested`; `null`
404
+ * otherwise.
405
+ */
406
+ delete_requested_at?: string | null;
407
+
313
408
  display_name?: string;
314
409
 
315
410
  documents?: Array<Document> | null;
@@ -345,6 +440,10 @@ export interface Dir {
345
440
  * - `infringement_claimed` - a trademark/impersonation claim is open against this
346
441
  * DIR.
347
442
  * - `permanently_rejected` - terminal; cannot be resubmitted.
443
+ * - `delete_requested` - you have requested deletion; the DIR still exists and
444
+ * Telnyx is completing the removal (de-registration and cleanup). A verified DIR
445
+ * keeps serving its branded identity, and keeps billing, until the removal
446
+ * finishes.
348
447
  */
349
448
  status?: DirStatus;
350
449
 
@@ -353,6 +452,12 @@ export interface Dir {
353
452
  updated_at?: string;
354
453
 
355
454
  verified_at?: string | null;
455
+
456
+ /**
457
+ * `https://` URL that receives webhook notifications for this DIR's
458
+ * compliance-review outcomes. `null` when not subscribed.
459
+ */
460
+ webhook_url?: string | null;
356
461
  }
357
462
 
358
463
  export namespace Dir {
@@ -390,6 +495,10 @@ export interface DirList {
390
495
  * - `infringement_claimed` - a trademark/impersonation claim is open against this
391
496
  * DIR.
392
497
  * - `permanently_rejected` - terminal; cannot be resubmitted.
498
+ * - `delete_requested` - you have requested deletion; the DIR still exists and
499
+ * Telnyx is completing the removal (de-registration and cleanup). A verified DIR
500
+ * keeps serving its branded identity, and keeps billing, until the removal
501
+ * finishes.
393
502
  */
394
503
  export type DirStatus =
395
504
  | 'draft'
@@ -401,7 +510,8 @@ export type DirStatus =
401
510
  | 'suspended'
402
511
  | 'expired'
403
512
  | 'infringement_claimed'
404
- | 'permanently_rejected';
513
+ | 'permanently_rejected'
514
+ | 'delete_requested';
405
515
 
406
516
  export interface DirWrapped {
407
517
  data: Dir;
@@ -434,9 +544,43 @@ export interface Document {
434
544
  | 'bank_statement'
435
545
  | 'other';
436
546
 
547
+ /**
548
+ * An optional note describing this document, for example what it proves.
549
+ */
437
550
  description?: string;
438
551
  }
439
552
 
553
+ export interface SignaturePayload {
554
+ /**
555
+ * PNG image, base64-encoded.
556
+ */
557
+ image_base64: string;
558
+
559
+ /**
560
+ * Optional. When absent the rendered PDF falls back to the enterprise contact's
561
+ * legal name.
562
+ */
563
+ signer_name?: string | null;
564
+ }
565
+
566
+ export interface DirDeleteResponse {
567
+ data: DirDeleteResponse.Data;
568
+ }
569
+
570
+ export namespace DirDeleteResponse {
571
+ export interface Data {
572
+ /**
573
+ * Id of the DIR whose deletion was requested.
574
+ */
575
+ id: string;
576
+
577
+ /**
578
+ * Always `delete_requested`: the DIR has been queued for removal, not yet removed.
579
+ */
580
+ status: 'delete_requested';
581
+ }
582
+ }
583
+
440
584
  export interface DirListDocumentTypesResponse {
441
585
  data: Array<DirListDocumentTypesResponse.Data>;
442
586
 
@@ -463,6 +607,60 @@ export namespace DirListDocumentTypesResponse {
463
607
  }
464
608
  }
465
609
 
610
+ /**
611
+ * Paginated list of a DIR's BPO authorizations.
612
+ */
613
+ export interface DirRetrieveBpoAuthorizationsResponse {
614
+ data: Array<DirRetrieveBpoAuthorizationsResponse.Data>;
615
+
616
+ /**
617
+ * JSON:API pagination metadata returned with every paginated list response. Page
618
+ * numbering is 1-based. `page_size` reports the number of items actually returned
619
+ * in `data` for this page; the requested size is taken from the `page[size]` query
620
+ * parameter.
621
+ */
622
+ meta: CallReasonsAPI.BrandedCallingPaginationMeta;
623
+ }
624
+
625
+ export namespace DirRetrieveBpoAuthorizationsResponse {
626
+ /**
627
+ * A single authorization of a BPO (Business Process Outsourcer) account on a DIR.
628
+ */
629
+ export interface Data {
630
+ /**
631
+ * The authorized BPO account's enterprise id.
632
+ */
633
+ bpo_enterprise_id: string;
634
+
635
+ /**
636
+ * Id of the signed Letter of Authorization document submitted for this BPO. Send
637
+ * it back unchanged in `bpo_authorizations` when updating the DIR to keep this
638
+ * authorization and its review state.
639
+ */
640
+ loa_document_id: string;
641
+
642
+ /**
643
+ * Always `bpo_authorization`.
644
+ */
645
+ record_type: 'bpo_authorization';
646
+
647
+ /**
648
+ * Review state of this authorization. `pending` when the authorization is first
649
+ * added, or when you send a different `loa_document_id` for this BPO in
650
+ * `bpo_authorizations` (uploading a document alone changes nothing). Approving the
651
+ * DIR approves its pending authorizations; an admin can also approve or reject one
652
+ * on its own. Only an `approved` authorization adds the BPO to this DIR's
653
+ * authorized callers in the branded calling registry.
654
+ */
655
+ status: 'pending' | 'approved' | 'rejected';
656
+
657
+ /**
658
+ * Why the authorization was rejected. `null` unless `status` is `rejected`.
659
+ */
660
+ rejection_reason?: string | null;
661
+ }
662
+ }
663
+
466
664
  export interface DirListParams extends DefaultFlatPaginationParams {
467
665
  /**
468
666
  * Case-insensitive partial match on call reason.
@@ -523,6 +721,16 @@ export interface DirUpdateParams {
523
721
  */
524
722
  authorizer_name?: string;
525
723
 
724
+ /**
725
+ * Optional. Replace this DIR's authorized BPO (Business Process Outsourcer)
726
+ * accounts with these, each with its signed Letter of Authorization. The supplied
727
+ * list replaces the current one: a BPO left out has its authorization removed, and
728
+ * a new BPO (or a changed Letter of Authorization) is created `pending` admin
729
+ * review. Send an empty list to clear all authorizations; omit the field to leave
730
+ * them unchanged. Editing this list does not re-vet the DIR. Maximum 10.
731
+ */
732
+ bpo_authorizations?: Array<BpoAuthorizationInput>;
733
+
526
734
  /**
527
735
  * 1–10 reasons your business calls customers. Validate phrasing against
528
736
  * `POST /call_reasons/validate`.
@@ -570,6 +778,13 @@ export interface DirUpdateParams {
570
778
  * (BPO/reseller). Updating this triggers re-vetting on next submit.
571
779
  */
572
780
  reselling?: boolean;
781
+
782
+ /**
783
+ * Optional `https://` URL that receives webhook notifications when this DIR's
784
+ * compliance review completes. Send `null` to clear. Changing only this field on a
785
+ * `verified` DIR does not re-vet it. Maximum 2048 characters.
786
+ */
787
+ webhook_url?: string | null;
573
788
  }
574
789
 
575
790
  export interface DirListInfringementClaimsParams extends DefaultFlatPaginationParams {}
@@ -586,7 +801,8 @@ export interface DirUpdateInfringementParams {
586
801
  certify_ip_ownership: true;
587
802
 
588
803
  /**
589
- * Must be `true`.
804
+ * Check to certify that the brand no longer infringes anyone else's trademark or
805
+ * intellectual property.
590
806
  */
591
807
  certify_no_infringement: true;
592
808
 
@@ -602,6 +818,10 @@ export interface DirUpdateInfringementParams {
602
818
 
603
819
  call_reasons?: Array<string> | null;
604
820
 
821
+ /**
822
+ * The business name shown to call recipients, 1 to 35 characters, no emoji, not
823
+ * blank.
824
+ */
605
825
  display_name?: string | null;
606
826
 
607
827
  /**
@@ -624,8 +844,9 @@ export interface DirNewLoaParams {
624
844
  phone_numbers: Array<string>;
625
845
 
626
846
  /**
627
- * Third-party reseller / partner managing the enterprise's phone numbers. Omit
628
- * when the enterprise works directly with Telnyx.
847
+ * Third-party reseller / partner managing the enterprise's phone numbers on its
848
+ * behalf, such as a call center (BPO) acting for a client. Omit when the
849
+ * enterprise manages its own numbers.
629
850
  */
630
851
  agent?: LoaAPI.AgentInput;
631
852
 
@@ -634,27 +855,34 @@ export interface DirNewLoaParams {
634
855
  * name, and signed-at date. When absent the PDF is returned unsigned so the
635
856
  * customer can sign externally and upload it via the Documents API.
636
857
  */
637
- signature?: DirNewLoaParams.Signature;
858
+ signature?: SignaturePayload;
638
859
  }
639
860
 
640
- export namespace DirNewLoaParams {
861
+ export interface DirRetrieveBpoAuthorizationsParams {
641
862
  /**
642
- * Optional. When provided the rendered PDF embeds the signature image, printed
643
- * name, and signed-at date. When absent the PDF is returned unsigned so the
644
- * customer can sign externally and upload it via the Documents API.
863
+ * 1-based page number. Out-of-range values return an empty page with correct meta.
645
864
  */
646
- export interface Signature {
647
- /**
648
- * PNG image, base64-encoded.
649
- */
650
- image_base64: string;
865
+ 'page[number]'?: number;
651
866
 
652
- /**
653
- * Optional. When absent the rendered PDF falls back to the enterprise contact's
654
- * legal name.
655
- */
656
- signer_name?: string | null;
657
- }
867
+ /**
868
+ * Items per page. Maximum 250; values above are clamped to 250.
869
+ */
870
+ 'page[size]'?: number;
871
+ }
872
+
873
+ export interface DirBpoLoaParams {
874
+ /**
875
+ * The approved BPO enterprise the Brand Owner is authorizing. Must be a BPO
876
+ * account on the caller's organization that has already been approved.
877
+ */
878
+ bpo_enterprise_id: string;
879
+
880
+ /**
881
+ * Optional. When provided the rendered PDF embeds the signature image, printed
882
+ * name, and signed-at date. When absent the PDF is returned unsigned so the Brand
883
+ * Owner can sign externally and the BPO can upload it via the Documents API.
884
+ */
885
+ signature?: SignaturePayload;
658
886
  }
659
887
 
660
888
  DirResource.Comments = Comments;
@@ -665,18 +893,24 @@ DirResource.VerifyEmail = VerifyEmail;
665
893
 
666
894
  export declare namespace DirResource {
667
895
  export {
896
+ type BpoAuthorizationInput as BpoAuthorizationInput,
668
897
  type Dir as Dir,
669
898
  type DirList as DirList,
670
899
  type DirStatus as DirStatus,
671
900
  type DirWrapped as DirWrapped,
672
901
  type Document as Document,
902
+ type SignaturePayload as SignaturePayload,
903
+ type DirDeleteResponse as DirDeleteResponse,
673
904
  type DirListDocumentTypesResponse as DirListDocumentTypesResponse,
905
+ type DirRetrieveBpoAuthorizationsResponse as DirRetrieveBpoAuthorizationsResponse,
674
906
  type DirsDefaultFlatPagination as DirsDefaultFlatPagination,
675
907
  type DirListParams as DirListParams,
676
908
  type DirUpdateParams as DirUpdateParams,
677
909
  type DirListInfringementClaimsParams as DirListInfringementClaimsParams,
678
910
  type DirUpdateInfringementParams as DirUpdateInfringementParams,
679
911
  type DirNewLoaParams as DirNewLoaParams,
912
+ type DirRetrieveBpoAuthorizationsParams as DirRetrieveBpoAuthorizationsParams,
913
+ type DirBpoLoaParams as DirBpoLoaParams,
680
914
  };
681
915
 
682
916
  export {
@@ -11,17 +11,23 @@ export {
11
11
  } from './comments';
12
12
  export {
13
13
  DirResource,
14
+ type BpoAuthorizationInput,
14
15
  type Dir,
15
16
  type DirList,
16
17
  type DirStatus,
17
18
  type DirWrapped,
18
19
  type Document,
20
+ type SignaturePayload,
21
+ type DirDeleteResponse,
19
22
  type DirListDocumentTypesResponse,
23
+ type DirRetrieveBpoAuthorizationsResponse,
20
24
  type DirListParams,
21
25
  type DirUpdateParams,
22
26
  type DirListInfringementClaimsParams,
23
27
  type DirUpdateInfringementParams,
24
28
  type DirNewLoaParams,
29
+ type DirRetrieveBpoAuthorizationsParams,
30
+ type DirBpoLoaParams,
25
31
  type DirsDefaultFlatPagination,
26
32
  } from './dir';
27
33
  export {