telnyx 7.25.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 (377) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/client.d.mts +10 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +10 -4
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/ai/ai.d.mts +14 -5
  12. package/resources/ai/ai.d.mts.map +1 -1
  13. package/resources/ai/ai.d.ts +14 -5
  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 +232 -6
  20. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  21. package/resources/ai/assistants/assistants.d.ts +232 -6
  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/index.d.mts +1 -1
  26. package/resources/ai/assistants/index.d.mts.map +1 -1
  27. package/resources/ai/assistants/index.d.ts +1 -1
  28. package/resources/ai/assistants/index.d.ts.map +1 -1
  29. package/resources/ai/assistants/index.js.map +1 -1
  30. package/resources/ai/assistants/index.mjs.map +1 -1
  31. package/resources/ai/assistants/versions.d.mts +12 -0
  32. package/resources/ai/assistants/versions.d.mts.map +1 -1
  33. package/resources/ai/assistants/versions.d.ts +12 -0
  34. package/resources/ai/assistants/versions.d.ts.map +1 -1
  35. package/resources/ai/avatars.d.mts +187 -0
  36. package/resources/ai/avatars.d.mts.map +1 -0
  37. package/resources/ai/avatars.d.ts +187 -0
  38. package/resources/ai/avatars.d.ts.map +1 -0
  39. package/resources/ai/avatars.js +93 -0
  40. package/resources/ai/avatars.js.map +1 -0
  41. package/resources/ai/avatars.mjs +89 -0
  42. package/resources/ai/avatars.mjs.map +1 -0
  43. package/resources/ai/chat.d.mts +20 -6
  44. package/resources/ai/chat.d.mts.map +1 -1
  45. package/resources/ai/chat.d.ts +20 -6
  46. package/resources/ai/chat.d.ts.map +1 -1
  47. package/resources/ai/conversations/conversations.d.mts +8 -0
  48. package/resources/ai/conversations/conversations.d.mts.map +1 -1
  49. package/resources/ai/conversations/conversations.d.ts +8 -0
  50. package/resources/ai/conversations/conversations.d.ts.map +1 -1
  51. package/resources/ai/conversations/conversations.js.map +1 -1
  52. package/resources/ai/conversations/conversations.mjs.map +1 -1
  53. package/resources/ai/index.d.mts +2 -1
  54. package/resources/ai/index.d.mts.map +1 -1
  55. package/resources/ai/index.d.ts +2 -1
  56. package/resources/ai/index.d.ts.map +1 -1
  57. package/resources/ai/index.js +3 -1
  58. package/resources/ai/index.js.map +1 -1
  59. package/resources/ai/index.mjs +1 -0
  60. package/resources/ai/index.mjs.map +1 -1
  61. package/resources/ai/memory/namespaces/index.d.mts +1 -1
  62. package/resources/ai/memory/namespaces/index.d.mts.map +1 -1
  63. package/resources/ai/memory/namespaces/index.d.ts +1 -1
  64. package/resources/ai/memory/namespaces/index.d.ts.map +1 -1
  65. package/resources/ai/memory/namespaces/index.js.map +1 -1
  66. package/resources/ai/memory/namespaces/index.mjs.map +1 -1
  67. package/resources/ai/memory/namespaces/namespaces.d.mts +2 -2
  68. package/resources/ai/memory/namespaces/namespaces.d.mts.map +1 -1
  69. package/resources/ai/memory/namespaces/namespaces.d.ts +2 -2
  70. package/resources/ai/memory/namespaces/namespaces.d.ts.map +1 -1
  71. package/resources/ai/memory/namespaces/namespaces.js.map +1 -1
  72. package/resources/ai/memory/namespaces/namespaces.mjs.map +1 -1
  73. package/resources/ai/memory/namespaces/profiles/index.d.mts +1 -1
  74. package/resources/ai/memory/namespaces/profiles/index.d.mts.map +1 -1
  75. package/resources/ai/memory/namespaces/profiles/index.d.ts +1 -1
  76. package/resources/ai/memory/namespaces/profiles/index.d.ts.map +1 -1
  77. package/resources/ai/memory/namespaces/profiles/index.js.map +1 -1
  78. package/resources/ai/memory/namespaces/profiles/index.mjs.map +1 -1
  79. package/resources/ai/memory/namespaces/profiles/profiles.d.mts +54 -1
  80. package/resources/ai/memory/namespaces/profiles/profiles.d.mts.map +1 -1
  81. package/resources/ai/memory/namespaces/profiles/profiles.d.ts +54 -1
  82. package/resources/ai/memory/namespaces/profiles/profiles.d.ts.map +1 -1
  83. package/resources/ai/memory/namespaces/profiles/profiles.js +31 -0
  84. package/resources/ai/memory/namespaces/profiles/profiles.js.map +1 -1
  85. package/resources/ai/memory/namespaces/profiles/profiles.mjs +31 -0
  86. package/resources/ai/memory/namespaces/profiles/profiles.mjs.map +1 -1
  87. package/resources/ai/openai/chat.d.mts +20 -6
  88. package/resources/ai/openai/chat.d.mts.map +1 -1
  89. package/resources/ai/openai/chat.d.ts +20 -6
  90. package/resources/ai/openai/chat.d.ts.map +1 -1
  91. package/resources/ai/tools.d.mts +17 -1
  92. package/resources/ai/tools.d.mts.map +1 -1
  93. package/resources/ai/tools.d.ts +17 -1
  94. package/resources/ai/tools.d.ts.map +1 -1
  95. package/resources/calls/actions.d.mts +59 -13
  96. package/resources/calls/actions.d.mts.map +1 -1
  97. package/resources/calls/actions.d.ts +59 -13
  98. package/resources/calls/actions.d.ts.map +1 -1
  99. package/resources/calls/calls.d.mts +24 -14
  100. package/resources/calls/calls.d.mts.map +1 -1
  101. package/resources/calls/calls.d.ts +24 -14
  102. package/resources/calls/calls.d.ts.map +1 -1
  103. package/resources/calls/calls.js +8 -0
  104. package/resources/calls/calls.js.map +1 -1
  105. package/resources/calls/calls.mjs +8 -0
  106. package/resources/calls/calls.mjs.map +1 -1
  107. package/resources/calls/index.d.mts +1 -1
  108. package/resources/calls/index.d.mts.map +1 -1
  109. package/resources/calls/index.d.ts +1 -1
  110. package/resources/calls/index.d.ts.map +1 -1
  111. package/resources/calls/index.js.map +1 -1
  112. package/resources/calls/index.mjs.map +1 -1
  113. package/resources/dir/dir.d.mts +10 -7
  114. package/resources/dir/dir.d.mts.map +1 -1
  115. package/resources/dir/dir.d.ts +10 -7
  116. package/resources/dir/dir.d.ts.map +1 -1
  117. package/resources/dir/dir.js +1 -1
  118. package/resources/dir/dir.js.map +1 -1
  119. package/resources/dir/dir.mjs +1 -1
  120. package/resources/dir/dir.mjs.map +1 -1
  121. package/resources/dir/phone-numbers.d.mts +0 -4
  122. package/resources/dir/phone-numbers.d.mts.map +1 -1
  123. package/resources/dir/phone-numbers.d.ts +0 -4
  124. package/resources/dir/phone-numbers.d.ts.map +1 -1
  125. package/resources/email-templates.d.mts +109 -18
  126. package/resources/email-templates.d.mts.map +1 -1
  127. package/resources/email-templates.d.ts +109 -18
  128. package/resources/email-templates.d.ts.map +1 -1
  129. package/resources/email-templates.js +5 -1
  130. package/resources/email-templates.js.map +1 -1
  131. package/resources/email-templates.mjs +5 -1
  132. package/resources/email-templates.mjs.map +1 -1
  133. package/resources/enterprises/dir.d.mts +8 -2
  134. package/resources/enterprises/dir.d.mts.map +1 -1
  135. package/resources/enterprises/dir.d.ts +8 -2
  136. package/resources/enterprises/dir.d.ts.map +1 -1
  137. package/resources/enterprises/dir.js +8 -2
  138. package/resources/enterprises/dir.js.map +1 -1
  139. package/resources/enterprises/dir.mjs +8 -2
  140. package/resources/enterprises/dir.mjs.map +1 -1
  141. package/resources/enterprises/enterprises.d.mts +7 -5
  142. package/resources/enterprises/enterprises.d.mts.map +1 -1
  143. package/resources/enterprises/enterprises.d.ts +7 -5
  144. package/resources/enterprises/enterprises.d.ts.map +1 -1
  145. package/resources/enterprises/enterprises.js +5 -3
  146. package/resources/enterprises/enterprises.js.map +1 -1
  147. package/resources/enterprises/enterprises.mjs +5 -3
  148. package/resources/enterprises/enterprises.mjs.map +1 -1
  149. package/resources/enterprises/index.d.mts +1 -1
  150. package/resources/enterprises/index.d.mts.map +1 -1
  151. package/resources/enterprises/index.d.ts +1 -1
  152. package/resources/enterprises/index.d.ts.map +1 -1
  153. package/resources/enterprises/index.js.map +1 -1
  154. package/resources/enterprises/index.mjs.map +1 -1
  155. package/resources/enterprises/reputation/external-verification.d.mts +94 -0
  156. package/resources/enterprises/reputation/external-verification.d.mts.map +1 -0
  157. package/resources/enterprises/reputation/external-verification.d.ts +94 -0
  158. package/resources/enterprises/reputation/external-verification.d.ts.map +1 -0
  159. package/resources/enterprises/reputation/external-verification.js +54 -0
  160. package/resources/enterprises/reputation/external-verification.js.map +1 -0
  161. package/resources/enterprises/reputation/external-verification.mjs +50 -0
  162. package/resources/enterprises/reputation/external-verification.mjs.map +1 -0
  163. package/resources/enterprises/reputation/index.d.mts +3 -2
  164. package/resources/enterprises/reputation/index.d.mts.map +1 -1
  165. package/resources/enterprises/reputation/index.d.ts +3 -2
  166. package/resources/enterprises/reputation/index.d.ts.map +1 -1
  167. package/resources/enterprises/reputation/index.js +3 -1
  168. package/resources/enterprises/reputation/index.js.map +1 -1
  169. package/resources/enterprises/reputation/index.mjs +1 -0
  170. package/resources/enterprises/reputation/index.mjs.map +1 -1
  171. package/resources/enterprises/reputation/loa.d.mts +3 -2
  172. package/resources/enterprises/reputation/loa.d.mts.map +1 -1
  173. package/resources/enterprises/reputation/loa.d.ts +3 -2
  174. package/resources/enterprises/reputation/loa.d.ts.map +1 -1
  175. package/resources/enterprises/reputation/numbers.d.mts +197 -4
  176. package/resources/enterprises/reputation/numbers.d.mts.map +1 -1
  177. package/resources/enterprises/reputation/numbers.d.ts +197 -4
  178. package/resources/enterprises/reputation/numbers.d.ts.map +1 -1
  179. package/resources/enterprises/reputation/numbers.js +58 -2
  180. package/resources/enterprises/reputation/numbers.js.map +1 -1
  181. package/resources/enterprises/reputation/numbers.mjs +58 -2
  182. package/resources/enterprises/reputation/numbers.mjs.map +1 -1
  183. package/resources/enterprises/reputation/remediation.d.mts +3 -2
  184. package/resources/enterprises/reputation/remediation.d.mts.map +1 -1
  185. package/resources/enterprises/reputation/remediation.d.ts +3 -2
  186. package/resources/enterprises/reputation/remediation.d.ts.map +1 -1
  187. package/resources/enterprises/reputation/reputation.d.mts +39 -3
  188. package/resources/enterprises/reputation/reputation.d.mts.map +1 -1
  189. package/resources/enterprises/reputation/reputation.d.ts +39 -3
  190. package/resources/enterprises/reputation/reputation.d.ts.map +1 -1
  191. package/resources/enterprises/reputation/reputation.js +22 -0
  192. package/resources/enterprises/reputation/reputation.js.map +1 -1
  193. package/resources/enterprises/reputation/reputation.mjs +22 -0
  194. package/resources/enterprises/reputation/reputation.mjs.map +1 -1
  195. package/resources/global-ip-assignment-health.d.mts +4 -4
  196. package/resources/global-ip-assignment-health.d.mts.map +1 -1
  197. package/resources/global-ip-assignment-health.d.ts +4 -4
  198. package/resources/global-ip-assignment-health.d.ts.map +1 -1
  199. package/resources/global-ip-assignments-usage.d.mts +4 -4
  200. package/resources/global-ip-assignments-usage.d.mts.map +1 -1
  201. package/resources/global-ip-assignments-usage.d.ts +4 -4
  202. package/resources/global-ip-assignments-usage.d.ts.map +1 -1
  203. package/resources/index.d.mts +3 -2
  204. package/resources/index.d.mts.map +1 -1
  205. package/resources/index.d.ts +3 -2
  206. package/resources/index.d.ts.map +1 -1
  207. package/resources/index.js +3 -1
  208. package/resources/index.js.map +1 -1
  209. package/resources/index.mjs +1 -0
  210. package/resources/index.mjs.map +1 -1
  211. package/resources/llm-token-gateway/index.d.mts +4 -1
  212. package/resources/llm-token-gateway/index.d.mts.map +1 -1
  213. package/resources/llm-token-gateway/index.d.ts +4 -1
  214. package/resources/llm-token-gateway/index.d.ts.map +1 -1
  215. package/resources/llm-token-gateway/index.js +7 -1
  216. package/resources/llm-token-gateway/index.js.map +1 -1
  217. package/resources/llm-token-gateway/index.mjs +4 -1
  218. package/resources/llm-token-gateway/index.mjs.map +1 -1
  219. package/resources/llm-token-gateway/llm-token-gateway.d.mts +14 -2
  220. package/resources/llm-token-gateway/llm-token-gateway.d.mts.map +1 -1
  221. package/resources/llm-token-gateway/llm-token-gateway.d.ts +14 -2
  222. package/resources/llm-token-gateway/llm-token-gateway.d.ts.map +1 -1
  223. package/resources/llm-token-gateway/llm-token-gateway.js +12 -0
  224. package/resources/llm-token-gateway/llm-token-gateway.js.map +1 -1
  225. package/resources/llm-token-gateway/llm-token-gateway.mjs +13 -1
  226. package/resources/llm-token-gateway/llm-token-gateway.mjs.map +1 -1
  227. package/resources/llm-token-gateway/spend.d.mts +223 -0
  228. package/resources/llm-token-gateway/spend.d.mts.map +1 -0
  229. package/resources/llm-token-gateway/spend.d.ts +223 -0
  230. package/resources/llm-token-gateway/spend.d.ts.map +1 -0
  231. package/resources/llm-token-gateway/spend.js +56 -0
  232. package/resources/llm-token-gateway/spend.js.map +1 -0
  233. package/resources/llm-token-gateway/spend.mjs +52 -0
  234. package/resources/llm-token-gateway/spend.mjs.map +1 -0
  235. package/resources/llm-token-gateway/token-groups.d.mts +577 -0
  236. package/resources/llm-token-gateway/token-groups.d.mts.map +1 -0
  237. package/resources/llm-token-gateway/token-groups.d.ts +577 -0
  238. package/resources/llm-token-gateway/token-groups.d.ts.map +1 -0
  239. package/resources/llm-token-gateway/token-groups.js +139 -0
  240. package/resources/llm-token-gateway/token-groups.js.map +1 -0
  241. package/resources/llm-token-gateway/token-groups.mjs +135 -0
  242. package/resources/llm-token-gateway/token-groups.mjs.map +1 -0
  243. package/resources/llm-token-gateway/token-keys.d.mts +318 -0
  244. package/resources/llm-token-gateway/token-keys.d.mts.map +1 -0
  245. package/resources/llm-token-gateway/token-keys.d.ts +318 -0
  246. package/resources/llm-token-gateway/token-keys.d.ts.map +1 -0
  247. package/resources/llm-token-gateway/token-keys.js +127 -0
  248. package/resources/llm-token-gateway/token-keys.js.map +1 -0
  249. package/resources/llm-token-gateway/token-keys.mjs +123 -0
  250. package/resources/llm-token-gateway/token-keys.mjs.map +1 -0
  251. package/resources/llm-token-gateway/usage.d.mts +205 -146
  252. package/resources/llm-token-gateway/usage.d.mts.map +1 -1
  253. package/resources/llm-token-gateway/usage.d.ts +205 -146
  254. package/resources/llm-token-gateway/usage.d.ts.map +1 -1
  255. package/resources/llm-token-gateway/usage.js +47 -15
  256. package/resources/llm-token-gateway/usage.js.map +1 -1
  257. package/resources/llm-token-gateway/usage.mjs +47 -15
  258. package/resources/llm-token-gateway/usage.mjs.map +1 -1
  259. package/resources/phone-numbers/jobs.d.mts +17 -5
  260. package/resources/phone-numbers/jobs.d.mts.map +1 -1
  261. package/resources/phone-numbers/jobs.d.ts +17 -5
  262. package/resources/phone-numbers/jobs.d.ts.map +1 -1
  263. package/resources/phone-numbers/jobs.js +4 -3
  264. package/resources/phone-numbers/jobs.js.map +1 -1
  265. package/resources/phone-numbers/jobs.mjs +4 -3
  266. package/resources/phone-numbers/jobs.mjs.map +1 -1
  267. package/resources/reputation/numbers.d.mts +10 -0
  268. package/resources/reputation/numbers.d.mts.map +1 -1
  269. package/resources/reputation/numbers.d.ts +10 -0
  270. package/resources/reputation/numbers.d.ts.map +1 -1
  271. package/resources/sip-registration-status.d.mts +149 -0
  272. package/resources/sip-registration-status.d.mts.map +1 -0
  273. package/resources/sip-registration-status.d.ts +149 -0
  274. package/resources/sip-registration-status.d.ts.map +1 -0
  275. package/resources/sip-registration-status.js +32 -0
  276. package/resources/sip-registration-status.js.map +1 -0
  277. package/resources/sip-registration-status.mjs +28 -0
  278. package/resources/sip-registration-status.mjs.map +1 -0
  279. package/resources/texml/texml.d.mts +7 -3
  280. package/resources/texml/texml.d.mts.map +1 -1
  281. package/resources/texml/texml.d.ts +7 -3
  282. package/resources/texml/texml.d.ts.map +1 -1
  283. package/resources/texml/texml.js +4 -2
  284. package/resources/texml/texml.js.map +1 -1
  285. package/resources/texml/texml.mjs +4 -2
  286. package/resources/texml/texml.mjs.map +1 -1
  287. package/resources/webhooks.d.mts +566 -3
  288. package/resources/webhooks.d.mts.map +1 -1
  289. package/resources/webhooks.d.ts +566 -3
  290. package/resources/webhooks.d.ts.map +1 -1
  291. package/resources/webhooks.js.map +1 -1
  292. package/resources/webhooks.mjs.map +1 -1
  293. package/resources/whatsapp/index.d.mts +1 -0
  294. package/resources/whatsapp/index.d.mts.map +1 -1
  295. package/resources/whatsapp/index.d.ts +1 -0
  296. package/resources/whatsapp/index.d.ts.map +1 -1
  297. package/resources/whatsapp/index.js +3 -1
  298. package/resources/whatsapp/index.js.map +1 -1
  299. package/resources/whatsapp/index.mjs +1 -0
  300. package/resources/whatsapp/index.mjs.map +1 -1
  301. package/resources/whatsapp/phone-numbers/calling-routing.d.mts +6 -5
  302. package/resources/whatsapp/phone-numbers/calling-routing.d.mts.map +1 -1
  303. package/resources/whatsapp/phone-numbers/calling-routing.d.ts +6 -5
  304. package/resources/whatsapp/phone-numbers/calling-routing.d.ts.map +1 -1
  305. package/resources/whatsapp/phone-numbers/calling-routing.js +6 -5
  306. package/resources/whatsapp/phone-numbers/calling-routing.js.map +1 -1
  307. package/resources/whatsapp/phone-numbers/calling-routing.mjs +6 -5
  308. package/resources/whatsapp/phone-numbers/calling-routing.mjs.map +1 -1
  309. package/resources/whatsapp/signup.d.mts +128 -0
  310. package/resources/whatsapp/signup.d.mts.map +1 -0
  311. package/resources/whatsapp/signup.d.ts +128 -0
  312. package/resources/whatsapp/signup.d.ts.map +1 -0
  313. package/resources/whatsapp/signup.js +42 -0
  314. package/resources/whatsapp/signup.js.map +1 -0
  315. package/resources/whatsapp/signup.mjs +38 -0
  316. package/resources/whatsapp/signup.mjs.map +1 -0
  317. package/resources/whatsapp/whatsapp.d.mts +4 -0
  318. package/resources/whatsapp/whatsapp.d.mts.map +1 -1
  319. package/resources/whatsapp/whatsapp.d.ts +4 -0
  320. package/resources/whatsapp/whatsapp.d.ts.map +1 -1
  321. package/resources/whatsapp/whatsapp.js +4 -0
  322. package/resources/whatsapp/whatsapp.js.map +1 -1
  323. package/resources/whatsapp/whatsapp.mjs +4 -0
  324. package/resources/whatsapp/whatsapp.mjs.map +1 -1
  325. package/src/client.ts +28 -0
  326. package/src/resources/ai/ai.ts +38 -3
  327. package/src/resources/ai/assistants/assistants.ts +292 -5
  328. package/src/resources/ai/assistants/index.ts +2 -0
  329. package/src/resources/ai/assistants/versions.ts +14 -0
  330. package/src/resources/ai/avatars.ts +238 -0
  331. package/src/resources/ai/chat.ts +20 -6
  332. package/src/resources/ai/conversations/conversations.ts +9 -0
  333. package/src/resources/ai/index.ts +13 -0
  334. package/src/resources/ai/memory/namespaces/index.ts +2 -0
  335. package/src/resources/ai/memory/namespaces/namespaces.ts +4 -0
  336. package/src/resources/ai/memory/namespaces/profiles/index.ts +2 -0
  337. package/src/resources/ai/memory/namespaces/profiles/profiles.ts +71 -0
  338. package/src/resources/ai/openai/chat.ts +20 -6
  339. package/src/resources/ai/tools.ts +19 -1
  340. package/src/resources/calls/actions.ts +65 -10
  341. package/src/resources/calls/calls.ts +24 -8
  342. package/src/resources/calls/index.ts +1 -0
  343. package/src/resources/dir/dir.ts +10 -7
  344. package/src/resources/dir/phone-numbers.ts +1 -6
  345. package/src/resources/email-templates.ts +121 -19
  346. package/src/resources/enterprises/dir.ts +8 -2
  347. package/src/resources/enterprises/enterprises.ts +7 -3
  348. package/src/resources/enterprises/index.ts +1 -0
  349. package/src/resources/enterprises/reputation/external-verification.ts +125 -0
  350. package/src/resources/enterprises/reputation/index.ts +12 -0
  351. package/src/resources/enterprises/reputation/loa.ts +3 -2
  352. package/src/resources/enterprises/reputation/numbers.ts +256 -3
  353. package/src/resources/enterprises/reputation/remediation.ts +3 -2
  354. package/src/resources/enterprises/reputation/reputation.ts +70 -0
  355. package/src/resources/global-ip-assignment-health.ts +4 -4
  356. package/src/resources/global-ip-assignments-usage.ts +4 -4
  357. package/src/resources/index.ts +11 -0
  358. package/src/resources/llm-token-gateway/index.ts +38 -1
  359. package/src/resources/llm-token-gateway/llm-token-gateway.ts +83 -1
  360. package/src/resources/llm-token-gateway/spend.ts +309 -0
  361. package/src/resources/llm-token-gateway/token-groups.ts +724 -0
  362. package/src/resources/llm-token-gateway/token-keys.ts +422 -0
  363. package/src/resources/llm-token-gateway/usage.ts +273 -149
  364. package/src/resources/phone-numbers/jobs.ts +18 -5
  365. package/src/resources/reputation/numbers.ts +12 -0
  366. package/src/resources/sip-registration-status.ts +188 -0
  367. package/src/resources/texml/texml.ts +7 -3
  368. package/src/resources/webhooks.ts +754 -15
  369. package/src/resources/whatsapp/index.ts +7 -0
  370. package/src/resources/whatsapp/phone-numbers/calling-routing.ts +6 -5
  371. package/src/resources/whatsapp/signup.ts +188 -0
  372. package/src/resources/whatsapp/whatsapp.ts +18 -0
  373. package/src/version.ts +1 -1
  374. package/version.d.mts +1 -1
  375. package/version.d.ts +1 -1
  376. package/version.js +1 -1
  377. package/version.mjs +1 -1
@@ -0,0 +1,577 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import { APIPromise } from "../../core/api-promise.mjs";
3
+ import { DefaultFlatPagination, type DefaultFlatPaginationParams, PagePromise } from "../../core/pagination.mjs";
4
+ import { RequestOptions } from "../../internal/request-options.mjs";
5
+ /**
6
+ * Manage and report AI Gateway usage.
7
+ */
8
+ export declare class TokenGroups extends APIResource {
9
+ /**
10
+ * List gateway token groups within the authenticated Telnyx account. Foreign and
11
+ * unknown resource IDs return the same 404 response.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * // Automatically fetches more pages as needed.
16
+ * for await (const tokenGroup of client.llmTokenGateway.tokenGroups.list()) {
17
+ * // ...
18
+ * }
19
+ * ```
20
+ */
21
+ list(query?: TokenGroupListParams | null | undefined, options?: RequestOptions): PagePromise<TokenGroupsDefaultFlatPagination, TokenGroup>;
22
+ /**
23
+ * Create gateway token group within the authenticated Telnyx account. Foreign and
24
+ * unknown resource IDs return the same 404 response.
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * const tokenGroupResponse =
29
+ * await client.llmTokenGateway.tokenGroups.create({
30
+ * allowed_models: ['Kimi-K3', 'GLM-5.3-Flash'],
31
+ * name: 'support-backend',
32
+ * 'Idempotency-Key': 'Idempotency-Key',
33
+ * fallbacks: { 'Kimi-K3': ['GLM-5.3-Flash'] },
34
+ * max_parallel_requests: 20,
35
+ * retries: {
36
+ * max_attempts: 2,
37
+ * retry_delay_ms: 250,
38
+ * backoff: 'exponential',
39
+ * request_timeout_ms: 10000,
40
+ * },
41
+ * });
42
+ * ```
43
+ */
44
+ create(params: TokenGroupCreateParams, options?: RequestOptions): APIPromise<TokenGroupResponse>;
45
+ /**
46
+ * Revoke resource and its keys atomically; retain historical attribution, never
47
+ * detach into an ungoverned service key.
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * await client.llmTokenGateway.tokenGroups.delete(
52
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
53
+ * {
54
+ * 'Idempotency-Key': 'Idempotency-Key',
55
+ * 'If-Match': 'If-Match',
56
+ * },
57
+ * );
58
+ * ```
59
+ */
60
+ delete(id: string, params: TokenGroupDeleteParams, options?: RequestOptions): APIPromise<void>;
61
+ /**
62
+ * Get gateway token group within the authenticated Telnyx account. Foreign and
63
+ * unknown resource IDs return the same 404 response.
64
+ *
65
+ * @example
66
+ * ```ts
67
+ * const tokenGroupResponse =
68
+ * await client.llmTokenGateway.tokenGroups.retrieve(
69
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
70
+ * );
71
+ * ```
72
+ */
73
+ retrieve(id: string, options?: RequestOptions): APIPromise<TokenGroupResponse>;
74
+ /**
75
+ * Update gateway token group within the authenticated Telnyx account. Foreign and
76
+ * unknown resource IDs return the same 404 response. Omitted fields are preserved.
77
+ * Null clears the optional concurrency, fallback and retry settings. A stale
78
+ * If-Match returns 412; read the resource again before updating.
79
+ *
80
+ * @example
81
+ * ```ts
82
+ * const tokenGroupResponse =
83
+ * await client.llmTokenGateway.tokenGroups.update(
84
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
85
+ * {
86
+ * 'Idempotency-Key': 'Idempotency-Key',
87
+ * 'If-Match': 'If-Match',
88
+ * allowed_models: ['Kimi-K3', 'GLM-5.3-Flash'],
89
+ * fallbacks: { 'Kimi-K3': ['GLM-5.3-Flash'] },
90
+ * max_parallel_requests: 20,
91
+ * name: 'support-backend',
92
+ * retries: {
93
+ * max_attempts: 2,
94
+ * retry_delay_ms: 250,
95
+ * backoff: 'exponential',
96
+ * request_timeout_ms: 10000,
97
+ * },
98
+ * },
99
+ * );
100
+ * ```
101
+ */
102
+ update(id: string, params: TokenGroupUpdateParams, options?: RequestOptions): APIPromise<TokenGroupResponse>;
103
+ }
104
+ export type TokenGroupsDefaultFlatPagination = DefaultFlatPagination<TokenGroup>;
105
+ export interface AIGatewayResourcesPageMeta {
106
+ has_more: boolean;
107
+ page_number: number;
108
+ page_size: number;
109
+ snapshot: string;
110
+ }
111
+ export type BudgetDuration = '1d' | '7d' | '30d' | null;
112
+ export interface TokenGroup {
113
+ id: string;
114
+ allowed_models: Array<string>;
115
+ blocked: boolean;
116
+ budget_duration: BudgetDuration | null;
117
+ budget_started_at: string | null;
118
+ cache_ttl: number | null;
119
+ created_at: string;
120
+ /**
121
+ * Per-group model fallbacks: primary alias -> ordered list of 1..3 other aliases.
122
+ * Every key and listed alias must be in allowed_models (a PATCH removing a
123
+ * referenced alias is 400); a chain never lists its own key; wildcards are
124
+ * rejected. Chains are one level deep (a step's own chain is not expanded).
125
+ * Fallback is attempted only for managed routes, only before the first provider
126
+ * event is forwarded, and only to steps the key may use; each attempt is reserved
127
+ * and recorded. {} and null both disable fallbacks.
128
+ */
129
+ fallbacks: {
130
+ [key: string]: Array<string>;
131
+ } | null;
132
+ /**
133
+ * Per-group guardrail policy. Missing actions default to ignore. profiles may be
134
+ * listed with both dlp actions ignore (staged, inactive) but a non-ignore dlp
135
+ * action requires at least one profile. streaming defaults to buffered when any
136
+ * response action is block and passthrough otherwise; passthrough with a response
137
+ * block is 400. Findings are codes and counts only; content is never stored. The
138
+ * stored form is echoed back canonicalised (all actions explicit, profiles
139
+ * sorted); {} is stored as an all-ignore policy, null disables.
140
+ */
141
+ guardrails: TokenGroup.Guardrails | null;
142
+ /**
143
+ * USD, decimal precision at most 6 places; parse exactly to integer micro-USD,
144
+ * never binary float accounting.
145
+ */
146
+ max_budget: number | null;
147
+ name: string;
148
+ provider_key_ids: Array<string>;
149
+ record_type: 'token_group';
150
+ /**
151
+ * USD, decimal precision at most 6 places; parse exactly to integer micro-USD,
152
+ * never binary float accounting.
153
+ */
154
+ reserved_spend: number;
155
+ resets_at: string | null;
156
+ /**
157
+ * Per-group same-route retries. max_attempts counts the first try of each step
158
+ * (the primary and each fallback) and is the ceiling for the x-ltg-max-attempts
159
+ * request header. A step is retried only when its attempt definitely did no
160
+ * provider work (connection failure before dispatch, or 429/529) before the first
161
+ * provider event; an uncertain failure (timeout, 408/500/502/503/504) moves to the
162
+ * next fallback step instead. max_attempts x (1 + the longest fallback chain) must
163
+ * not exceed 8, else 400. The n-th retry waits retry_delay_ms (constant),
164
+ * retry_delay_ms*n (linear) or retry_delay_ms*2^(n-1) (exponential), at most 5 s
165
+ * and never past the request deadline, then jittered uniformly down to half that
166
+ * value so concurrent retries spread out; a provider Retry-After of at most 5 s is
167
+ * honoured and a longer one moves to the next step. request_timeout_ms applies to
168
+ * streaming requests only: it bounds each attempt's time to its first provider
169
+ * event and never applies after it. Non-stream requests keep the per-attempt hop
170
+ * and idle bounds (their headers arrive only with the finished completion).
171
+ * retry_delay_ms and backoff are floors for the request knobs. Each planned
172
+ * attempt is reserved (at most 8 per request); unused reservation is released at
173
+ * settlement. Managed routes only. The stored form is echoed back with defaults
174
+ * filled in; null disables retries.
175
+ */
176
+ retries: TokenGroup.Retries | null;
177
+ rpm_limit: number | null;
178
+ /**
179
+ * USD, decimal precision at most 6 places; parse exactly to integer micro-USD,
180
+ * never binary float accounting.
181
+ */
182
+ spend: number;
183
+ tpm_limit: number | null;
184
+ updated_at: string;
185
+ version: number;
186
+ /**
187
+ * Optional maximum concurrent reserved/dispatched cache misses across replicas.
188
+ * Null means no concurrency cap. Cache hits do not consume slots; unknown usage
189
+ * retains its budget hold without a slot.
190
+ */
191
+ max_parallel_requests?: number | null;
192
+ }
193
+ export declare namespace TokenGroup {
194
+ /**
195
+ * Per-group guardrail policy. Missing actions default to ignore. profiles may be
196
+ * listed with both dlp actions ignore (staged, inactive) but a non-ignore dlp
197
+ * action requires at least one profile. streaming defaults to buffered when any
198
+ * response action is block and passthrough otherwise; passthrough with a response
199
+ * block is 400. Findings are codes and counts only; content is never stored. The
200
+ * stored form is echoed back canonicalised (all actions explicit, profiles
201
+ * sorted); {} is stored as an all-ignore policy, null disables.
202
+ */
203
+ interface Guardrails {
204
+ dlp?: Guardrails.Dlp;
205
+ secrets?: Guardrails.Secrets;
206
+ streaming?: 'buffered' | 'passthrough';
207
+ }
208
+ namespace Guardrails {
209
+ interface Dlp {
210
+ profiles?: Array<'financial' | 'government_id' | 'contact'>;
211
+ prompt?: 'ignore' | 'flag' | 'block';
212
+ response?: 'ignore' | 'flag' | 'block';
213
+ }
214
+ interface Secrets {
215
+ prompt?: 'ignore' | 'flag' | 'block';
216
+ response?: 'ignore' | 'flag' | 'block';
217
+ }
218
+ }
219
+ /**
220
+ * Per-group same-route retries. max_attempts counts the first try of each step
221
+ * (the primary and each fallback) and is the ceiling for the x-ltg-max-attempts
222
+ * request header. A step is retried only when its attempt definitely did no
223
+ * provider work (connection failure before dispatch, or 429/529) before the first
224
+ * provider event; an uncertain failure (timeout, 408/500/502/503/504) moves to the
225
+ * next fallback step instead. max_attempts x (1 + the longest fallback chain) must
226
+ * not exceed 8, else 400. The n-th retry waits retry_delay_ms (constant),
227
+ * retry_delay_ms*n (linear) or retry_delay_ms*2^(n-1) (exponential), at most 5 s
228
+ * and never past the request deadline, then jittered uniformly down to half that
229
+ * value so concurrent retries spread out; a provider Retry-After of at most 5 s is
230
+ * honoured and a longer one moves to the next step. request_timeout_ms applies to
231
+ * streaming requests only: it bounds each attempt's time to its first provider
232
+ * event and never applies after it. Non-stream requests keep the per-attempt hop
233
+ * and idle bounds (their headers arrive only with the finished completion).
234
+ * retry_delay_ms and backoff are floors for the request knobs. Each planned
235
+ * attempt is reserved (at most 8 per request); unused reservation is released at
236
+ * settlement. Managed routes only. The stored form is echoed back with defaults
237
+ * filled in; null disables retries.
238
+ */
239
+ interface Retries {
240
+ max_attempts: number;
241
+ backoff?: 'constant' | 'linear' | 'exponential';
242
+ request_timeout_ms?: number | null;
243
+ retry_delay_ms?: number;
244
+ }
245
+ }
246
+ export interface TokenGroupResponse {
247
+ data: TokenGroup;
248
+ }
249
+ export interface TokenGroupListParams extends DefaultFlatPaginationParams {
250
+ /**
251
+ * Required after page 1; account/filter-bound 15-minute stable snapshot;
252
+ * expired/mismatch 409.
253
+ */
254
+ 'page[snapshot]'?: string;
255
+ }
256
+ export interface TokenGroupCreateParams {
257
+ /**
258
+ * Body param
259
+ */
260
+ allowed_models: Array<string>;
261
+ /**
262
+ * Body param
263
+ */
264
+ name: string;
265
+ /**
266
+ * Header param: 24h, scoped by account+method+path. Same key/body returns same
267
+ * outcome; changed body 409; in-progress 409 with Retry-After. Token-create replay
268
+ * returns 200 metadata WITHOUT secret.
269
+ */
270
+ 'Idempotency-Key': string;
271
+ /**
272
+ * Body param
273
+ */
274
+ blocked?: boolean;
275
+ /**
276
+ * Body param
277
+ */
278
+ budget_duration?: BudgetDuration | null;
279
+ /**
280
+ * Body param
281
+ */
282
+ cache_ttl?: number | null;
283
+ /**
284
+ * Body param: Per-group model fallbacks: primary alias -> ordered list of 1..3
285
+ * other aliases. Every key and listed alias must be in allowed_models (a PATCH
286
+ * removing a referenced alias is 400); a chain never lists its own key; wildcards
287
+ * are rejected. Chains are one level deep (a step's own chain is not expanded).
288
+ * Fallback is attempted only for managed routes, only before the first provider
289
+ * event is forwarded, and only to steps the key may use; each attempt is reserved
290
+ * and recorded. {} and null both disable fallbacks.
291
+ */
292
+ fallbacks?: {
293
+ [key: string]: Array<string>;
294
+ } | null;
295
+ /**
296
+ * Body param: Per-group guardrail policy. Missing actions default to ignore.
297
+ * profiles may be listed with both dlp actions ignore (staged, inactive) but a
298
+ * non-ignore dlp action requires at least one profile. streaming defaults to
299
+ * buffered when any response action is block and passthrough otherwise;
300
+ * passthrough with a response block is 400. Findings are codes and counts only;
301
+ * content is never stored. The stored form is echoed back canonicalised (all
302
+ * actions explicit, profiles sorted); {} is stored as an all-ignore policy, null
303
+ * disables.
304
+ */
305
+ guardrails?: TokenGroupCreateParams.Guardrails | null;
306
+ /**
307
+ * Body param: USD, decimal precision at most 6 places; parse exactly to integer
308
+ * micro-USD, never binary float accounting.
309
+ */
310
+ max_budget?: number | null;
311
+ /**
312
+ * Body param: Optional maximum concurrent reserved/dispatched cache misses across
313
+ * replicas. Null means no concurrency cap. Cache hits do not consume slots;
314
+ * unknown usage retains its budget hold without a slot.
315
+ */
316
+ max_parallel_requests?: number | null;
317
+ /**
318
+ * Body param
319
+ */
320
+ provider_key_ids?: Array<string>;
321
+ /**
322
+ * Body param: Per-group same-route retries. max_attempts counts the first try of
323
+ * each step (the primary and each fallback) and is the ceiling for the
324
+ * x-ltg-max-attempts request header. A step is retried only when its attempt
325
+ * definitely did no provider work (connection failure before dispatch, or 429/529)
326
+ * before the first provider event; an uncertain failure (timeout,
327
+ * 408/500/502/503/504) moves to the next fallback step instead. max_attempts x
328
+ * (1 + the longest fallback chain) must not exceed 8, else 400. The n-th retry
329
+ * waits retry_delay_ms (constant), retry_delay_ms*n (linear) or
330
+ * retry_delay_ms*2^(n-1) (exponential), at most 5 s and never past the request
331
+ * deadline, then jittered uniformly down to half that value so concurrent retries
332
+ * spread out; a provider Retry-After of at most 5 s is honoured and a longer one
333
+ * moves to the next step. request_timeout_ms applies to streaming requests only:
334
+ * it bounds each attempt's time to its first provider event and never applies
335
+ * after it. Non-stream requests keep the per-attempt hop and idle bounds (their
336
+ * headers arrive only with the finished completion). retry_delay_ms and backoff
337
+ * are floors for the request knobs. Each planned attempt is reserved (at most 8
338
+ * per request); unused reservation is released at settlement. Managed routes only.
339
+ * The stored form is echoed back with defaults filled in; null disables retries.
340
+ */
341
+ retries?: TokenGroupCreateParams.Retries | null;
342
+ /**
343
+ * Body param
344
+ */
345
+ rpm_limit?: number | null;
346
+ /**
347
+ * Body param
348
+ */
349
+ tpm_limit?: number | null;
350
+ }
351
+ export declare namespace TokenGroupCreateParams {
352
+ /**
353
+ * Per-group guardrail policy. Missing actions default to ignore. profiles may be
354
+ * listed with both dlp actions ignore (staged, inactive) but a non-ignore dlp
355
+ * action requires at least one profile. streaming defaults to buffered when any
356
+ * response action is block and passthrough otherwise; passthrough with a response
357
+ * block is 400. Findings are codes and counts only; content is never stored. The
358
+ * stored form is echoed back canonicalised (all actions explicit, profiles
359
+ * sorted); {} is stored as an all-ignore policy, null disables.
360
+ */
361
+ interface Guardrails {
362
+ dlp?: Guardrails.Dlp;
363
+ secrets?: Guardrails.Secrets;
364
+ streaming?: 'buffered' | 'passthrough';
365
+ }
366
+ namespace Guardrails {
367
+ interface Dlp {
368
+ profiles?: Array<'financial' | 'government_id' | 'contact'>;
369
+ prompt?: 'ignore' | 'flag' | 'block';
370
+ response?: 'ignore' | 'flag' | 'block';
371
+ }
372
+ interface Secrets {
373
+ prompt?: 'ignore' | 'flag' | 'block';
374
+ response?: 'ignore' | 'flag' | 'block';
375
+ }
376
+ }
377
+ /**
378
+ * Per-group same-route retries. max_attempts counts the first try of each step
379
+ * (the primary and each fallback) and is the ceiling for the x-ltg-max-attempts
380
+ * request header. A step is retried only when its attempt definitely did no
381
+ * provider work (connection failure before dispatch, or 429/529) before the first
382
+ * provider event; an uncertain failure (timeout, 408/500/502/503/504) moves to the
383
+ * next fallback step instead. max_attempts x (1 + the longest fallback chain) must
384
+ * not exceed 8, else 400. The n-th retry waits retry_delay_ms (constant),
385
+ * retry_delay_ms*n (linear) or retry_delay_ms*2^(n-1) (exponential), at most 5 s
386
+ * and never past the request deadline, then jittered uniformly down to half that
387
+ * value so concurrent retries spread out; a provider Retry-After of at most 5 s is
388
+ * honoured and a longer one moves to the next step. request_timeout_ms applies to
389
+ * streaming requests only: it bounds each attempt's time to its first provider
390
+ * event and never applies after it. Non-stream requests keep the per-attempt hop
391
+ * and idle bounds (their headers arrive only with the finished completion).
392
+ * retry_delay_ms and backoff are floors for the request knobs. Each planned
393
+ * attempt is reserved (at most 8 per request); unused reservation is released at
394
+ * settlement. Managed routes only. The stored form is echoed back with defaults
395
+ * filled in; null disables retries.
396
+ */
397
+ interface Retries {
398
+ max_attempts: number;
399
+ backoff?: 'constant' | 'linear' | 'exponential';
400
+ request_timeout_ms?: number | null;
401
+ retry_delay_ms?: number;
402
+ }
403
+ }
404
+ export interface TokenGroupDeleteParams {
405
+ /**
406
+ * 24h, scoped by account+method+path. Same key/body returns same outcome; changed
407
+ * body 409; in-progress 409 with Retry-After. Token-create replay returns 200
408
+ * metadata WITHOUT secret.
409
+ */
410
+ 'Idempotency-Key': string;
411
+ /**
412
+ * Exact quoted resource-version ETag; an exact intermediary-weakened echo W/"n" is
413
+ * accepted. Wildcard, combined and malformed validators are rejected; stale 412;
414
+ * missing 428. HTTP field names are case-insensitive. Replayed idempotent result
415
+ * is checked first.
416
+ */
417
+ 'If-Match': string;
418
+ }
419
+ export interface TokenGroupUpdateParams {
420
+ /**
421
+ * Header param: 24h, scoped by account+method+path. Same key/body returns same
422
+ * outcome; changed body 409; in-progress 409 with Retry-After. Token-create replay
423
+ * returns 200 metadata WITHOUT secret.
424
+ */
425
+ 'Idempotency-Key': string;
426
+ /**
427
+ * Header param: Exact quoted resource-version ETag; an exact intermediary-weakened
428
+ * echo W/"n" is accepted. Wildcard, combined and malformed validators are
429
+ * rejected; stale 412; missing 428. HTTP field names are case-insensitive.
430
+ * Replayed idempotent result is checked first.
431
+ */
432
+ 'If-Match': string;
433
+ /**
434
+ * Body param
435
+ */
436
+ allowed_models?: Array<string>;
437
+ /**
438
+ * Body param
439
+ */
440
+ blocked?: boolean;
441
+ /**
442
+ * Body param
443
+ */
444
+ budget_duration?: BudgetDuration | null;
445
+ /**
446
+ * Body param
447
+ */
448
+ cache_ttl?: number | null;
449
+ /**
450
+ * Body param: Per-group model fallbacks: primary alias -> ordered list of 1..3
451
+ * other aliases. Every key and listed alias must be in allowed_models (a PATCH
452
+ * removing a referenced alias is 400); a chain never lists its own key; wildcards
453
+ * are rejected. Chains are one level deep (a step's own chain is not expanded).
454
+ * Fallback is attempted only for managed routes, only before the first provider
455
+ * event is forwarded, and only to steps the key may use; each attempt is reserved
456
+ * and recorded. {} and null both disable fallbacks.
457
+ */
458
+ fallbacks?: {
459
+ [key: string]: Array<string>;
460
+ } | null;
461
+ /**
462
+ * Body param: Per-group guardrail policy. Missing actions default to ignore.
463
+ * profiles may be listed with both dlp actions ignore (staged, inactive) but a
464
+ * non-ignore dlp action requires at least one profile. streaming defaults to
465
+ * buffered when any response action is block and passthrough otherwise;
466
+ * passthrough with a response block is 400. Findings are codes and counts only;
467
+ * content is never stored. The stored form is echoed back canonicalised (all
468
+ * actions explicit, profiles sorted); {} is stored as an all-ignore policy, null
469
+ * disables.
470
+ */
471
+ guardrails?: TokenGroupUpdateParams.Guardrails | null;
472
+ /**
473
+ * Body param: USD, decimal precision at most 6 places; parse exactly to integer
474
+ * micro-USD, never binary float accounting.
475
+ */
476
+ max_budget?: number | null;
477
+ /**
478
+ * Body param: Optional maximum concurrent reserved/dispatched cache misses across
479
+ * replicas. Null means no concurrency cap. Cache hits do not consume slots;
480
+ * unknown usage retains its budget hold without a slot.
481
+ */
482
+ max_parallel_requests?: number | null;
483
+ /**
484
+ * Body param
485
+ */
486
+ name?: string;
487
+ /**
488
+ * Body param
489
+ */
490
+ provider_key_ids?: Array<string>;
491
+ /**
492
+ * Body param: Per-group same-route retries. max_attempts counts the first try of
493
+ * each step (the primary and each fallback) and is the ceiling for the
494
+ * x-ltg-max-attempts request header. A step is retried only when its attempt
495
+ * definitely did no provider work (connection failure before dispatch, or 429/529)
496
+ * before the first provider event; an uncertain failure (timeout,
497
+ * 408/500/502/503/504) moves to the next fallback step instead. max_attempts x
498
+ * (1 + the longest fallback chain) must not exceed 8, else 400. The n-th retry
499
+ * waits retry_delay_ms (constant), retry_delay_ms*n (linear) or
500
+ * retry_delay_ms*2^(n-1) (exponential), at most 5 s and never past the request
501
+ * deadline, then jittered uniformly down to half that value so concurrent retries
502
+ * spread out; a provider Retry-After of at most 5 s is honoured and a longer one
503
+ * moves to the next step. request_timeout_ms applies to streaming requests only:
504
+ * it bounds each attempt's time to its first provider event and never applies
505
+ * after it. Non-stream requests keep the per-attempt hop and idle bounds (their
506
+ * headers arrive only with the finished completion). retry_delay_ms and backoff
507
+ * are floors for the request knobs. Each planned attempt is reserved (at most 8
508
+ * per request); unused reservation is released at settlement. Managed routes only.
509
+ * The stored form is echoed back with defaults filled in; null disables retries.
510
+ */
511
+ retries?: TokenGroupUpdateParams.Retries | null;
512
+ /**
513
+ * Body param
514
+ */
515
+ rpm_limit?: number | null;
516
+ /**
517
+ * Body param
518
+ */
519
+ tpm_limit?: number | null;
520
+ }
521
+ export declare namespace TokenGroupUpdateParams {
522
+ /**
523
+ * Per-group guardrail policy. Missing actions default to ignore. profiles may be
524
+ * listed with both dlp actions ignore (staged, inactive) but a non-ignore dlp
525
+ * action requires at least one profile. streaming defaults to buffered when any
526
+ * response action is block and passthrough otherwise; passthrough with a response
527
+ * block is 400. Findings are codes and counts only; content is never stored. The
528
+ * stored form is echoed back canonicalised (all actions explicit, profiles
529
+ * sorted); {} is stored as an all-ignore policy, null disables.
530
+ */
531
+ interface Guardrails {
532
+ dlp?: Guardrails.Dlp;
533
+ secrets?: Guardrails.Secrets;
534
+ streaming?: 'buffered' | 'passthrough';
535
+ }
536
+ namespace Guardrails {
537
+ interface Dlp {
538
+ profiles?: Array<'financial' | 'government_id' | 'contact'>;
539
+ prompt?: 'ignore' | 'flag' | 'block';
540
+ response?: 'ignore' | 'flag' | 'block';
541
+ }
542
+ interface Secrets {
543
+ prompt?: 'ignore' | 'flag' | 'block';
544
+ response?: 'ignore' | 'flag' | 'block';
545
+ }
546
+ }
547
+ /**
548
+ * Per-group same-route retries. max_attempts counts the first try of each step
549
+ * (the primary and each fallback) and is the ceiling for the x-ltg-max-attempts
550
+ * request header. A step is retried only when its attempt definitely did no
551
+ * provider work (connection failure before dispatch, or 429/529) before the first
552
+ * provider event; an uncertain failure (timeout, 408/500/502/503/504) moves to the
553
+ * next fallback step instead. max_attempts x (1 + the longest fallback chain) must
554
+ * not exceed 8, else 400. The n-th retry waits retry_delay_ms (constant),
555
+ * retry_delay_ms*n (linear) or retry_delay_ms*2^(n-1) (exponential), at most 5 s
556
+ * and never past the request deadline, then jittered uniformly down to half that
557
+ * value so concurrent retries spread out; a provider Retry-After of at most 5 s is
558
+ * honoured and a longer one moves to the next step. request_timeout_ms applies to
559
+ * streaming requests only: it bounds each attempt's time to its first provider
560
+ * event and never applies after it. Non-stream requests keep the per-attempt hop
561
+ * and idle bounds (their headers arrive only with the finished completion).
562
+ * retry_delay_ms and backoff are floors for the request knobs. Each planned
563
+ * attempt is reserved (at most 8 per request); unused reservation is released at
564
+ * settlement. Managed routes only. The stored form is echoed back with defaults
565
+ * filled in; null disables retries.
566
+ */
567
+ interface Retries {
568
+ max_attempts: number;
569
+ backoff?: 'constant' | 'linear' | 'exponential';
570
+ request_timeout_ms?: number | null;
571
+ retry_delay_ms?: number;
572
+ }
573
+ }
574
+ export declare namespace TokenGroups {
575
+ export { type AIGatewayResourcesPageMeta as AIGatewayResourcesPageMeta, type BudgetDuration as BudgetDuration, type TokenGroup as TokenGroup, type TokenGroupResponse as TokenGroupResponse, type TokenGroupsDefaultFlatPagination as TokenGroupsDefaultFlatPagination, type TokenGroupListParams as TokenGroupListParams, type TokenGroupCreateParams as TokenGroupCreateParams, type TokenGroupDeleteParams as TokenGroupDeleteParams, type TokenGroupUpdateParams as TokenGroupUpdateParams, };
576
+ }
577
+ //# sourceMappingURL=token-groups.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-groups.d.mts","sourceRoot":"","sources":["../../src/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