telnyx 7.20.0 → 7.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +7 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +7 -4
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/ai/ai.d.mts +2 -2
  12. package/resources/ai/ai.d.mts.map +1 -1
  13. package/resources/ai/ai.d.ts +2 -2
  14. package/resources/ai/ai.d.ts.map +1 -1
  15. package/resources/ai/ai.js.map +1 -1
  16. package/resources/ai/ai.mjs.map +1 -1
  17. package/resources/ai/anthropic/v1.d.mts +16 -0
  18. package/resources/ai/anthropic/v1.d.mts.map +1 -1
  19. package/resources/ai/anthropic/v1.d.ts +16 -0
  20. package/resources/ai/anthropic/v1.d.ts.map +1 -1
  21. package/resources/ai/assistants/assistants.d.mts +152 -1
  22. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  23. package/resources/ai/assistants/assistants.d.ts +152 -1
  24. package/resources/ai/assistants/assistants.d.ts.map +1 -1
  25. package/resources/ai/assistants/assistants.js.map +1 -1
  26. package/resources/ai/assistants/assistants.mjs.map +1 -1
  27. package/resources/ai/assistants/index.d.mts +1 -1
  28. package/resources/ai/assistants/index.d.mts.map +1 -1
  29. package/resources/ai/assistants/index.d.ts +1 -1
  30. package/resources/ai/assistants/index.d.ts.map +1 -1
  31. package/resources/ai/assistants/index.js.map +1 -1
  32. package/resources/ai/assistants/index.mjs.map +1 -1
  33. package/resources/ai/assistants/versions.d.mts +25 -0
  34. package/resources/ai/assistants/versions.d.mts.map +1 -1
  35. package/resources/ai/assistants/versions.d.ts +25 -0
  36. package/resources/ai/assistants/versions.d.ts.map +1 -1
  37. package/resources/ai/chat.d.mts +77 -22
  38. package/resources/ai/chat.d.mts.map +1 -1
  39. package/resources/ai/chat.d.ts +77 -22
  40. package/resources/ai/chat.d.ts.map +1 -1
  41. package/resources/ai/index.d.mts +1 -1
  42. package/resources/ai/index.d.mts.map +1 -1
  43. package/resources/ai/index.d.ts +1 -1
  44. package/resources/ai/index.d.ts.map +1 -1
  45. package/resources/ai/index.js.map +1 -1
  46. package/resources/ai/index.mjs.map +1 -1
  47. package/resources/ai/openai/chat.d.mts +77 -22
  48. package/resources/ai/openai/chat.d.mts.map +1 -1
  49. package/resources/ai/openai/chat.d.ts +77 -22
  50. package/resources/ai/openai/chat.d.ts.map +1 -1
  51. package/resources/ai/openai/openai.d.mts +16 -0
  52. package/resources/ai/openai/openai.d.mts.map +1 -1
  53. package/resources/ai/openai/openai.d.ts +16 -0
  54. package/resources/ai/openai/openai.d.ts.map +1 -1
  55. package/resources/ai/openai/openai.js.map +1 -1
  56. package/resources/ai/openai/openai.mjs.map +1 -1
  57. package/resources/compute/compute.d.mts +10 -0
  58. package/resources/compute/compute.d.mts.map +1 -0
  59. package/resources/compute/compute.d.ts +10 -0
  60. package/resources/compute/compute.d.ts.map +1 -0
  61. package/resources/compute/compute.js +17 -0
  62. package/resources/compute/compute.js.map +1 -0
  63. package/resources/compute/compute.mjs +12 -0
  64. package/resources/compute/compute.mjs.map +1 -0
  65. package/resources/compute/funcs.d.mts +179 -0
  66. package/resources/compute/funcs.d.mts.map +1 -0
  67. package/resources/compute/funcs.d.ts +179 -0
  68. package/resources/compute/funcs.d.ts.map +1 -0
  69. package/resources/compute/funcs.js +41 -0
  70. package/resources/compute/funcs.js.map +1 -0
  71. package/resources/compute/funcs.mjs +37 -0
  72. package/resources/compute/funcs.mjs.map +1 -0
  73. package/resources/compute/index.d.mts +3 -0
  74. package/resources/compute/index.d.mts.map +1 -0
  75. package/resources/compute/index.d.ts +3 -0
  76. package/resources/compute/index.d.ts.map +1 -0
  77. package/resources/compute/index.js +9 -0
  78. package/resources/compute/index.js.map +1 -0
  79. package/resources/compute/index.mjs +4 -0
  80. package/resources/compute/index.mjs.map +1 -0
  81. package/resources/compute.d.mts +2 -0
  82. package/resources/compute.d.mts.map +1 -0
  83. package/resources/compute.d.ts +2 -0
  84. package/resources/compute.d.ts.map +1 -0
  85. package/resources/compute.js +6 -0
  86. package/resources/compute.js.map +1 -0
  87. package/resources/compute.mjs +3 -0
  88. package/resources/compute.mjs.map +1 -0
  89. package/resources/credential-connections/credential-connections.d.mts +4 -1
  90. package/resources/credential-connections/credential-connections.d.mts.map +1 -1
  91. package/resources/credential-connections/credential-connections.d.ts +4 -1
  92. package/resources/credential-connections/credential-connections.d.ts.map +1 -1
  93. package/resources/credential-connections/credential-connections.js.map +1 -1
  94. package/resources/credential-connections/credential-connections.mjs.map +1 -1
  95. package/resources/email-inboxes/drafts.d.mts +7 -0
  96. package/resources/email-inboxes/drafts.d.mts.map +1 -1
  97. package/resources/email-inboxes/drafts.d.ts +7 -0
  98. package/resources/email-inboxes/drafts.d.ts.map +1 -1
  99. package/resources/email-messages/email-messages.d.mts +7 -3
  100. package/resources/email-messages/email-messages.d.mts.map +1 -1
  101. package/resources/email-messages/email-messages.d.ts +7 -3
  102. package/resources/email-messages/email-messages.d.ts.map +1 -1
  103. package/resources/email-messages/email-messages.js +3 -1
  104. package/resources/email-messages/email-messages.js.map +1 -1
  105. package/resources/email-messages/email-messages.mjs +3 -1
  106. package/resources/email-messages/email-messages.mjs.map +1 -1
  107. package/resources/fqdn-connections/fqdn-authentication.d.mts +4 -1
  108. package/resources/fqdn-connections/fqdn-authentication.d.mts.map +1 -1
  109. package/resources/fqdn-connections/fqdn-authentication.d.ts +4 -1
  110. package/resources/fqdn-connections/fqdn-authentication.d.ts.map +1 -1
  111. package/resources/fqdn-connections/fqdn-connections.d.mts +4 -1
  112. package/resources/fqdn-connections/fqdn-connections.d.mts.map +1 -1
  113. package/resources/fqdn-connections/fqdn-connections.d.ts +4 -1
  114. package/resources/fqdn-connections/fqdn-connections.d.ts.map +1 -1
  115. package/resources/fqdn-connections/fqdn-connections.js.map +1 -1
  116. package/resources/fqdn-connections/fqdn-connections.mjs.map +1 -1
  117. package/resources/index.d.mts +3 -2
  118. package/resources/index.d.mts.map +1 -1
  119. package/resources/index.d.ts +3 -2
  120. package/resources/index.d.ts.map +1 -1
  121. package/resources/index.js +6 -4
  122. package/resources/index.js.map +1 -1
  123. package/resources/index.mjs +1 -0
  124. package/resources/index.mjs.map +1 -1
  125. package/resources/messages/messages.d.mts +79 -6
  126. package/resources/messages/messages.d.mts.map +1 -1
  127. package/resources/messages/messages.d.ts +79 -6
  128. package/resources/messages/messages.d.ts.map +1 -1
  129. package/resources/messages/messages.js.map +1 -1
  130. package/resources/messages/messages.mjs.map +1 -1
  131. package/resources/messaging-profiles/actions.d.mts +1 -1
  132. package/resources/messaging-profiles/actions.d.mts.map +1 -1
  133. package/resources/messaging-profiles/actions.d.ts +1 -1
  134. package/resources/messaging-profiles/actions.d.ts.map +1 -1
  135. package/resources/messaging-profiles/index.d.mts +1 -1
  136. package/resources/messaging-profiles/index.d.mts.map +1 -1
  137. package/resources/messaging-profiles/index.d.ts +1 -1
  138. package/resources/messaging-profiles/index.d.ts.map +1 -1
  139. package/resources/messaging-profiles/index.js.map +1 -1
  140. package/resources/messaging-profiles/index.mjs.map +1 -1
  141. package/resources/messaging-profiles/messaging-profiles.d.mts +185 -8
  142. package/resources/messaging-profiles/messaging-profiles.d.mts.map +1 -1
  143. package/resources/messaging-profiles/messaging-profiles.d.ts +185 -8
  144. package/resources/messaging-profiles/messaging-profiles.d.ts.map +1 -1
  145. package/resources/messaging-profiles/messaging-profiles.js +1 -1
  146. package/resources/messaging-profiles/messaging-profiles.js.map +1 -1
  147. package/resources/messaging-profiles/messaging-profiles.mjs +1 -1
  148. package/resources/messaging-profiles/messaging-profiles.mjs.map +1 -1
  149. package/resources/uac-connections/uac-connections.d.mts +9 -2
  150. package/resources/uac-connections/uac-connections.d.mts.map +1 -1
  151. package/resources/uac-connections/uac-connections.d.ts +9 -2
  152. package/resources/uac-connections/uac-connections.d.ts.map +1 -1
  153. package/resources/uac-connections/uac-connections.js.map +1 -1
  154. package/resources/uac-connections/uac-connections.mjs.map +1 -1
  155. package/resources/webhooks.d.mts +129 -3
  156. package/resources/webhooks.d.mts.map +1 -1
  157. package/resources/webhooks.d.ts +129 -3
  158. package/resources/webhooks.d.ts.map +1 -1
  159. package/resources/whatsapp/business-accounts/phone-numbers.d.mts +33 -0
  160. package/resources/whatsapp/business-accounts/phone-numbers.d.mts.map +1 -1
  161. package/resources/whatsapp/business-accounts/phone-numbers.d.ts +33 -0
  162. package/resources/whatsapp/business-accounts/phone-numbers.d.ts.map +1 -1
  163. package/resources/whatsapp/index.d.mts +1 -1
  164. package/resources/whatsapp/index.d.mts.map +1 -1
  165. package/resources/whatsapp/index.d.ts +1 -1
  166. package/resources/whatsapp/index.d.ts.map +1 -1
  167. package/resources/whatsapp/index.js.map +1 -1
  168. package/resources/whatsapp/index.mjs.map +1 -1
  169. package/resources/whatsapp/phone-numbers/index.d.mts +1 -1
  170. package/resources/whatsapp/phone-numbers/index.d.mts.map +1 -1
  171. package/resources/whatsapp/phone-numbers/index.d.ts +1 -1
  172. package/resources/whatsapp/phone-numbers/index.d.ts.map +1 -1
  173. package/resources/whatsapp/phone-numbers/index.js.map +1 -1
  174. package/resources/whatsapp/phone-numbers/index.mjs.map +1 -1
  175. package/resources/whatsapp/phone-numbers/phone-numbers.d.mts +147 -1
  176. package/resources/whatsapp/phone-numbers/phone-numbers.d.mts.map +1 -1
  177. package/resources/whatsapp/phone-numbers/phone-numbers.d.ts +147 -1
  178. package/resources/whatsapp/phone-numbers/phone-numbers.d.ts.map +1 -1
  179. package/resources/whatsapp/phone-numbers/phone-numbers.js +16 -0
  180. package/resources/whatsapp/phone-numbers/phone-numbers.js.map +1 -1
  181. package/resources/whatsapp/phone-numbers/phone-numbers.mjs +16 -0
  182. package/resources/whatsapp/phone-numbers/phone-numbers.mjs.map +1 -1
  183. package/resources/whatsapp/whatsapp.d.mts +2 -2
  184. package/resources/whatsapp/whatsapp.d.mts.map +1 -1
  185. package/resources/whatsapp/whatsapp.d.ts +2 -2
  186. package/resources/whatsapp/whatsapp.d.ts.map +1 -1
  187. package/resources/whatsapp/whatsapp.js.map +1 -1
  188. package/resources/whatsapp/whatsapp.mjs.map +1 -1
  189. package/resources/x402/credit-account/credit-account.d.mts +226 -0
  190. package/resources/x402/credit-account/credit-account.d.mts.map +1 -0
  191. package/resources/x402/credit-account/credit-account.d.ts +226 -0
  192. package/resources/x402/credit-account/credit-account.d.ts.map +1 -0
  193. package/resources/x402/credit-account/credit-account.js +66 -0
  194. package/resources/x402/credit-account/credit-account.js.map +1 -0
  195. package/resources/x402/credit-account/credit-account.mjs +61 -0
  196. package/resources/x402/credit-account/credit-account.mjs.map +1 -0
  197. package/resources/x402/credit-account/index.d.mts +3 -0
  198. package/resources/x402/credit-account/index.d.mts.map +1 -0
  199. package/resources/x402/credit-account/index.d.ts +3 -0
  200. package/resources/x402/credit-account/index.d.ts.map +1 -0
  201. package/resources/x402/credit-account/index.js +9 -0
  202. package/resources/x402/credit-account/index.js.map +1 -0
  203. package/resources/x402/credit-account/index.mjs +4 -0
  204. package/resources/x402/credit-account/index.mjs.map +1 -0
  205. package/resources/x402/credit-account/payments.d.mts +90 -0
  206. package/resources/x402/credit-account/payments.d.mts.map +1 -0
  207. package/resources/x402/credit-account/payments.d.ts +90 -0
  208. package/resources/x402/credit-account/payments.d.ts.map +1 -0
  209. package/resources/x402/credit-account/payments.js +47 -0
  210. package/resources/x402/credit-account/payments.js.map +1 -0
  211. package/resources/x402/credit-account/payments.mjs +43 -0
  212. package/resources/x402/credit-account/payments.mjs.map +1 -0
  213. package/resources/x402/credit-account.d.mts +1 -221
  214. package/resources/x402/credit-account.d.mts.map +1 -1
  215. package/resources/x402/credit-account.d.ts +1 -221
  216. package/resources/x402/credit-account.d.ts.map +1 -1
  217. package/resources/x402/credit-account.js +2 -54
  218. package/resources/x402/credit-account.js.map +1 -1
  219. package/resources/x402/credit-account.mjs +1 -52
  220. package/resources/x402/credit-account.mjs.map +1 -1
  221. package/resources/x402/index.d.mts +1 -1
  222. package/resources/x402/index.d.mts.map +1 -1
  223. package/resources/x402/index.d.ts +1 -1
  224. package/resources/x402/index.d.ts.map +1 -1
  225. package/resources/x402/index.js +2 -2
  226. package/resources/x402/index.js.map +1 -1
  227. package/resources/x402/index.mjs +1 -1
  228. package/resources/x402/index.mjs.map +1 -1
  229. package/resources/x402/x402.d.mts +2 -2
  230. package/resources/x402/x402.d.mts.map +1 -1
  231. package/resources/x402/x402.d.ts +2 -2
  232. package/resources/x402/x402.d.ts.map +1 -1
  233. package/resources/x402/x402.js +2 -2
  234. package/resources/x402/x402.js.map +1 -1
  235. package/resources/x402/x402.mjs +2 -2
  236. package/resources/x402/x402.mjs.map +1 -1
  237. package/src/client.ts +15 -2
  238. package/src/resources/ai/ai.ts +2 -0
  239. package/src/resources/ai/anthropic/v1.ts +18 -0
  240. package/src/resources/ai/assistants/assistants.ts +173 -0
  241. package/src/resources/ai/assistants/index.ts +1 -0
  242. package/src/resources/ai/assistants/versions.ts +27 -0
  243. package/src/resources/ai/chat.ts +87 -23
  244. package/src/resources/ai/index.ts +1 -0
  245. package/src/resources/ai/openai/chat.ts +87 -23
  246. package/src/resources/ai/openai/openai.ts +18 -0
  247. package/src/resources/compute/compute.ts +37 -0
  248. package/src/resources/compute/funcs.ts +298 -0
  249. package/src/resources/compute/index.ts +15 -0
  250. package/src/resources/compute.ts +3 -0
  251. package/src/resources/credential-connections/credential-connections.ts +4 -1
  252. package/src/resources/email-inboxes/drafts.ts +8 -0
  253. package/src/resources/email-messages/email-messages.ts +7 -2
  254. package/src/resources/fqdn-connections/fqdn-authentication.ts +4 -1
  255. package/src/resources/fqdn-connections/fqdn-connections.ts +4 -1
  256. package/src/resources/index.ts +6 -1
  257. package/src/resources/messages/messages.ts +89 -6
  258. package/src/resources/messaging-profiles/actions.ts +1 -1
  259. package/src/resources/messaging-profiles/index.ts +3 -1
  260. package/src/resources/messaging-profiles/messaging-profiles.ts +222 -9
  261. package/src/resources/uac-connections/uac-connections.ts +9 -2
  262. package/src/resources/webhooks.ts +177 -2
  263. package/src/resources/whatsapp/business-accounts/phone-numbers.ts +52 -0
  264. package/src/resources/whatsapp/index.ts +1 -0
  265. package/src/resources/whatsapp/phone-numbers/index.ts +1 -0
  266. package/src/resources/whatsapp/phone-numbers/phone-numbers.ts +222 -0
  267. package/src/resources/whatsapp/whatsapp.ts +2 -0
  268. package/src/resources/x402/credit-account/credit-account.ts +312 -0
  269. package/src/resources/x402/credit-account/index.ts +16 -0
  270. package/src/resources/x402/credit-account/payments.ts +126 -0
  271. package/src/resources/x402/credit-account.ts +1 -290
  272. package/src/resources/x402/index.ts +1 -1
  273. package/src/resources/x402/x402.ts +2 -2
  274. package/src/version.ts +1 -1
  275. package/version.d.mts +1 -1
  276. package/version.d.ts +1 -1
  277. package/version.js +1 -1
  278. package/version.mjs +1 -1
@@ -2,8 +2,8 @@
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.X402 = exports.CreditAccount = void 0;
5
- var credit_account_1 = require("./credit-account.js");
6
- Object.defineProperty(exports, "CreditAccount", { enumerable: true, get: function () { return credit_account_1.CreditAccount; } });
5
+ var index_1 = require("./credit-account/index.js");
6
+ Object.defineProperty(exports, "CreditAccount", { enumerable: true, get: function () { return index_1.CreditAccount; } });
7
7
  var x402_1 = require("./x402.js");
8
8
  Object.defineProperty(exports, "X402", { enumerable: true, get: function () { return x402_1.X402; } });
9
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/x402/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sDAM0B;AALxB,+GAAA,aAAa,OAAA;AAMf,kCAA8B;AAArB,4FAAA,IAAI,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/x402/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,mDAMgC;AAL9B,sGAAA,aAAa,OAAA;AAMf,kCAA8B;AAArB,4FAAA,IAAI,OAAA"}
@@ -1,4 +1,4 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- export { CreditAccount, } from "./credit-account.mjs";
2
+ export { CreditAccount, } from "./credit-account/index.mjs";
3
3
  export { X402 } from "./x402.mjs";
4
4
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/x402/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,aAAa,GAKd,6BAAyB;AAC1B,OAAO,EAAE,IAAI,EAAE,mBAAe"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/x402/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,aAAa,GAKd,mCAA+B;AAChC,OAAO,EAAE,IAAI,EAAE,mBAAe"}
@@ -1,6 +1,6 @@
1
1
  import { APIResource } from "../../core/resource.mjs";
2
- import * as CreditAccountAPI from "./credit-account.mjs";
3
- import { CreditAccount, CreditAccountCreateQuoteParams, CreditAccountCreateQuoteResponse, CreditAccountSettleParams, CreditAccountSettleResponse } from "./credit-account.mjs";
2
+ import * as CreditAccountAPI from "./credit-account/credit-account.mjs";
3
+ import { CreditAccount, CreditAccountCreateQuoteParams, CreditAccountCreateQuoteResponse, CreditAccountSettleParams, CreditAccountSettleResponse } from "./credit-account/credit-account.mjs";
4
4
  export declare class X402 extends APIResource {
5
5
  creditAccount: CreditAccountAPI.CreditAccount;
6
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"x402.d.mts","sourceRoot":"","sources":["../../src/resources/x402/x402.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,gBAAgB,6BAAyB;AACrD,OAAO,EACL,aAAa,EACb,8BAA8B,EAC9B,gCAAgC,EAChC,yBAAyB,EACzB,2BAA2B,EAC5B,6BAAyB;AAE1B,qBAAa,IAAK,SAAQ,WAAW;IACnC,aAAa,EAAE,gBAAgB,CAAC,aAAa,CAAoD;CAClG;AAID,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,aAAa,IAAI,aAAa,EAC9B,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,8BAA8B,IAAI,8BAA8B,GACtE,CAAC;CACH"}
1
+ {"version":3,"file":"x402.d.mts","sourceRoot":"","sources":["../../src/resources/x402/x402.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,gBAAgB,4CAAwC;AACpE,OAAO,EACL,aAAa,EACb,8BAA8B,EAC9B,gCAAgC,EAChC,yBAAyB,EACzB,2BAA2B,EAC5B,4CAAwC;AAEzC,qBAAa,IAAK,SAAQ,WAAW;IACnC,aAAa,EAAE,gBAAgB,CAAC,aAAa,CAAoD;CAClG;AAID,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,aAAa,IAAI,aAAa,EAC9B,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,8BAA8B,IAAI,8BAA8B,GACtE,CAAC;CACH"}
@@ -1,6 +1,6 @@
1
1
  import { APIResource } from "../../core/resource.js";
2
- import * as CreditAccountAPI from "./credit-account.js";
3
- import { CreditAccount, CreditAccountCreateQuoteParams, CreditAccountCreateQuoteResponse, CreditAccountSettleParams, CreditAccountSettleResponse } from "./credit-account.js";
2
+ import * as CreditAccountAPI from "./credit-account/credit-account.js";
3
+ import { CreditAccount, CreditAccountCreateQuoteParams, CreditAccountCreateQuoteResponse, CreditAccountSettleParams, CreditAccountSettleResponse } from "./credit-account/credit-account.js";
4
4
  export declare class X402 extends APIResource {
5
5
  creditAccount: CreditAccountAPI.CreditAccount;
6
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"x402.d.ts","sourceRoot":"","sources":["../../src/resources/x402/x402.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,gBAAgB,4BAAyB;AACrD,OAAO,EACL,aAAa,EACb,8BAA8B,EAC9B,gCAAgC,EAChC,yBAAyB,EACzB,2BAA2B,EAC5B,4BAAyB;AAE1B,qBAAa,IAAK,SAAQ,WAAW;IACnC,aAAa,EAAE,gBAAgB,CAAC,aAAa,CAAoD;CAClG;AAID,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,aAAa,IAAI,aAAa,EAC9B,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,8BAA8B,IAAI,8BAA8B,GACtE,CAAC;CACH"}
1
+ {"version":3,"file":"x402.d.ts","sourceRoot":"","sources":["../../src/resources/x402/x402.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,gBAAgB,2CAAwC;AACpE,OAAO,EACL,aAAa,EACb,8BAA8B,EAC9B,gCAAgC,EAChC,yBAAyB,EACzB,2BAA2B,EAC5B,2CAAwC;AAEzC,qBAAa,IAAK,SAAQ,WAAW;IACnC,aAAa,EAAE,gBAAgB,CAAC,aAAa,CAAoD;CAClG;AAID,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,aAAa,IAAI,aAAa,EAC9B,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,8BAA8B,IAAI,8BAA8B,GACtE,CAAC;CACH"}
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.X402 = void 0;
5
5
  const tslib_1 = require("../../internal/tslib.js");
6
6
  const resource_1 = require("../../core/resource.js");
7
- const CreditAccountAPI = tslib_1.__importStar(require("./credit-account.js"));
8
- const credit_account_1 = require("./credit-account.js");
7
+ const CreditAccountAPI = tslib_1.__importStar(require("./credit-account/credit-account.js"));
8
+ const credit_account_1 = require("./credit-account/credit-account.js");
9
9
  class X402 extends resource_1.APIResource {
10
10
  constructor() {
11
11
  super(...arguments);
@@ -1 +1 @@
1
- {"version":3,"file":"x402.js","sourceRoot":"","sources":["../../src/resources/x402/x402.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,8EAAqD;AACrD,wDAM0B;AAE1B,MAAa,IAAK,SAAQ,sBAAW;IAArC;;QACE,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnG,CAAC;CAAA;AAFD,oBAEC;AAED,IAAI,CAAC,aAAa,GAAG,8BAAa,CAAC"}
1
+ {"version":3,"file":"x402.js","sourceRoot":"","sources":["../../src/resources/x402/x402.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,6FAAoE;AACpE,uEAMyC;AAEzC,MAAa,IAAK,SAAQ,sBAAW;IAArC;;QACE,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnG,CAAC;CAAA;AAFD,oBAEC;AAED,IAAI,CAAC,aAAa,GAAG,8BAAa,CAAC"}
@@ -1,7 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  import { APIResource } from "../../core/resource.mjs";
3
- import * as CreditAccountAPI from "./credit-account.mjs";
4
- import { CreditAccount, } from "./credit-account.mjs";
3
+ import * as CreditAccountAPI from "./credit-account/credit-account.mjs";
4
+ import { CreditAccount, } from "./credit-account/credit-account.mjs";
5
5
  export class X402 extends APIResource {
6
6
  constructor() {
7
7
  super(...arguments);
@@ -1 +1 @@
1
- {"version":3,"file":"x402.mjs","sourceRoot":"","sources":["../../src/resources/x402/x402.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,gBAAgB,6BAAyB;AACrD,OAAO,EACL,aAAa,GAKd,6BAAyB;AAE1B,MAAM,OAAO,IAAK,SAAQ,WAAW;IAArC;;QACE,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnG,CAAC;CAAA;AAED,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC"}
1
+ {"version":3,"file":"x402.mjs","sourceRoot":"","sources":["../../src/resources/x402/x402.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,gBAAgB,4CAAwC;AACpE,OAAO,EACL,aAAa,GAKd,4CAAwC;AAEzC,MAAM,OAAO,IAAK,SAAQ,WAAW;IAArC;;QACE,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnG,CAAC;CAAA;AAED,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC"}
package/src/client.ts CHANGED
@@ -1145,6 +1145,8 @@ import {
1145
1145
  UnsafeUnwrapWebhookEvent,
1146
1146
  UnwrapWebhookEvent,
1147
1147
  Webhooks,
1148
+ WhatsappAccountUpdate,
1149
+ WhatsappMessageEcho,
1148
1150
  } from './resources/webhooks';
1149
1151
  import {
1150
1152
  WellKnown,
@@ -1240,6 +1242,7 @@ import {
1240
1242
  StreamBidirectionalTargetLegs,
1241
1243
  StreamCodec,
1242
1244
  } from './resources/calls/calls';
1245
+ import { Compute } from './resources/compute/compute';
1243
1246
  import {
1244
1247
  Conference,
1245
1248
  ConferenceCreateParams,
@@ -1505,10 +1508,13 @@ import {
1505
1508
  MessagingHostedNumberOrders,
1506
1509
  } from './resources/messaging-hosted-number-orders/messaging-hosted-number-orders';
1507
1510
  import {
1511
+ MessagingMessagingProfile,
1512
+ MessagingMessagingProfilesDefaultFlatPagination,
1508
1513
  MessagingProfile,
1509
1514
  MessagingProfileCreateParams,
1510
1515
  MessagingProfileCreateResponse,
1511
1516
  MessagingProfileDeleteResponse,
1517
+ MessagingProfileFeatures,
1512
1518
  MessagingProfileListAlphanumericSenderIDsParams,
1513
1519
  MessagingProfileListParams,
1514
1520
  MessagingProfileListPhoneNumbersParams,
@@ -1519,7 +1525,6 @@ import {
1519
1525
  MessagingProfileUpdateParams,
1520
1526
  MessagingProfileUpdateResponse,
1521
1527
  MessagingProfiles,
1522
- MessagingProfilesDefaultFlatPagination,
1523
1528
  NumberPoolSettings,
1524
1529
  URLShortenerSettings,
1525
1530
  } from './resources/messaging-profiles/messaging-profiles';
@@ -3240,6 +3245,7 @@ export class Telnyx {
3240
3245
  webSearch: API.WebSearch = new API.WebSearch(this);
3241
3246
  meetingSessions: API.MeetingSessions = new API.MeetingSessions(this);
3242
3247
  externalRequirements: API.ExternalRequirements = new API.ExternalRequirements(this);
3248
+ compute: API.Compute = new API.Compute(this);
3243
3249
  }
3244
3250
 
3245
3251
  Telnyx.Legacy = Legacy;
@@ -3424,6 +3430,7 @@ Telnyx.Pricing = Pricing;
3424
3430
  Telnyx.WebSearch = WebSearch;
3425
3431
  Telnyx.MeetingSessions = MeetingSessions;
3426
3432
  Telnyx.ExternalRequirements = ExternalRequirements;
3433
+ Telnyx.Compute = Compute;
3427
3434
 
3428
3435
  export declare namespace Telnyx {
3429
3436
  export type RequestOptions = Opts.RequestOptions;
@@ -3604,6 +3611,8 @@ export declare namespace Telnyx {
3604
3611
  type OutboundMessage as OutboundMessage,
3605
3612
  type ReplacedLinkClick as ReplacedLinkClick,
3606
3613
  type Transcription as Transcription,
3614
+ type WhatsappAccountUpdate as WhatsappAccountUpdate,
3615
+ type WhatsappMessageEcho as WhatsappMessageEcho,
3607
3616
  type CallAIGatherEndedWebhookEvent as CallAIGatherEndedWebhookEvent,
3608
3617
  type CallAIGatherMessageHistoryUpdatedWebhookEvent as CallAIGatherMessageHistoryUpdatedWebhookEvent,
3609
3618
  type CallAIGatherPartialResultsWebhookEvent as CallAIGatherPartialResultsWebhookEvent,
@@ -4328,7 +4337,9 @@ export declare namespace Telnyx {
4328
4337
 
4329
4338
  export {
4330
4339
  MessagingProfiles as MessagingProfiles,
4340
+ type MessagingMessagingProfile as MessagingMessagingProfile,
4331
4341
  type MessagingProfile as MessagingProfile,
4342
+ type MessagingProfileFeatures as MessagingProfileFeatures,
4332
4343
  type NumberPoolSettings as NumberPoolSettings,
4333
4344
  type URLShortenerSettings as URLShortenerSettings,
4334
4345
  type MessagingProfileCreateResponse as MessagingProfileCreateResponse,
@@ -4336,7 +4347,7 @@ export declare namespace Telnyx {
4336
4347
  type MessagingProfileUpdateResponse as MessagingProfileUpdateResponse,
4337
4348
  type MessagingProfileDeleteResponse as MessagingProfileDeleteResponse,
4338
4349
  type MessagingProfileRetrieveMetricsResponse as MessagingProfileRetrieveMetricsResponse,
4339
- type MessagingProfilesDefaultFlatPagination as MessagingProfilesDefaultFlatPagination,
4350
+ type MessagingMessagingProfilesDefaultFlatPagination as MessagingMessagingProfilesDefaultFlatPagination,
4340
4351
  type MessagingProfileListParams as MessagingProfileListParams,
4341
4352
  type MessagingProfileCreateParams as MessagingProfileCreateParams,
4342
4353
  type MessagingProfileUpdateParams as MessagingProfileUpdateParams,
@@ -5449,6 +5460,8 @@ export declare namespace Telnyx {
5449
5460
 
5450
5461
  export { ExternalRequirements as ExternalRequirements };
5451
5462
 
5463
+ export { Compute as Compute };
5464
+
5452
5465
  export type APIError = API.APIError;
5453
5466
  export type AvailablePhoneNumbersMetadata = API.AvailablePhoneNumbersMetadata;
5454
5467
  export type AzureVoiceSettings = API.AzureVoiceSettings;
@@ -45,6 +45,7 @@ import * as AssistantsAPI from './assistants/assistants';
45
45
  import {
46
46
  ArithmeticExpression,
47
47
  Assistant,
48
+ AssistantA2AAgent,
48
49
  AssistantChatParams,
49
50
  AssistantChatResponse,
50
51
  AssistantCloneParams,
@@ -648,6 +649,7 @@ export declare namespace AI {
648
649
  Assistants as Assistants,
649
650
  type ArithmeticExpression as ArithmeticExpression,
650
651
  type Assistant as Assistant,
652
+ type AssistantA2AAgent as AssistantA2AAgent,
651
653
  type AssistantIntegration as AssistantIntegration,
652
654
  type AssistantMcpServer as AssistantMcpServer,
653
655
  type AssistantTool as AssistantTool,
@@ -92,6 +92,24 @@ export interface V1MessagesParams {
92
92
  */
93
93
  metadata?: { [key: string]: unknown };
94
94
 
95
+ /**
96
+ * How strictly `region` is applied. `preferred` (the default when `region` is set)
97
+ * tries that region first and falls back to another when the model cannot be
98
+ * served there, so a request that would have succeeded still succeeds. `strict`
99
+ * pins the request: it is served from that region or it fails with a 422, never
100
+ * redirected to another region. Requires `region`.
101
+ */
102
+ mode?: 'preferred' | 'strict';
103
+
104
+ /**
105
+ * Optional data-residency region the request should be served from, using the same
106
+ * vocabulary as your account's Data Locality setting. Behavior depends on `mode`.
107
+ * Supported for Telnyx-hosted models only: a request routed to an external
108
+ * provider never passes through Telnyx model routing, so a region cannot be
109
+ * enforced for it. Omit for today's latency-based routing.
110
+ */
111
+ region?: 'USA' | 'EU' | 'AUS' | 'UAE';
112
+
95
113
  /**
96
114
  * The service tier to use for this request. Supported values vary by model; use
97
115
  * the Telnyx models endpoint and inspect the model's `service_tiers` field. If
@@ -372,6 +372,130 @@ export interface Assistant {
372
372
  >;
373
373
  }
374
374
 
375
+ /**
376
+ * A remote agent, reachable over the A2A (Agent2Agent) protocol, that an assistant
377
+ * can delegate to. Tools are not configured here: at the start of every
378
+ * conversation the agent's card is fetched and one tool is derived per skill the
379
+ * card advertises.
380
+ */
381
+ export interface AssistantA2AAgent {
382
+ /**
383
+ * Identifies the agent and seeds the names of the tools derived from its card
384
+ * (`a2a_<name>_<skill_id>`). Characters outside `[A-Za-z0-9_]` are replaced with
385
+ * `_` before the tool name is built, so two agents whose names differ only in
386
+ * punctuation collide and are rejected.
387
+ */
388
+ name: string;
389
+
390
+ /**
391
+ * The agent's base URL, or the URL of its agent card. At most 2,048 bytes once
392
+ * UTF-8 encoded. `/.well-known/agent-card.json` is appended to the path unless it
393
+ * already ends in `.json`. Must be an `http://` or `https://` URL for an
394
+ * externally reachable host: internal destinations (`localhost`, private and
395
+ * reserved IP ranges, `.local` domains) are rejected, and the hostname may not
396
+ * contain a `{{...}}` placeholder. Placeholders in the path are allowed.
397
+ */
398
+ url: string;
399
+
400
+ /**
401
+ * When `true`, the assistant hands the turn straight back to the model and the
402
+ * agent's answer is delivered into the conversation once it arrives, instead of
403
+ * the caller waiting for it in silence.
404
+ */
405
+ async?: boolean;
406
+
407
+ /**
408
+ * Headers sent when fetching this agent's card and on every call made to it. Use
409
+ * them to authenticate to the agent.
410
+ */
411
+ headers?: Array<AssistantA2AAgent.Header>;
412
+
413
+ /**
414
+ * Filler messages spoken while a call to this agent is in progress.
415
+ * `request_start` messages are spoken immediately when the call begins.
416
+ * `request_response_delayed` messages are spoken after `timing_ms` has elapsed
417
+ * only if the agent has not answered yet. Filler messages are not used when
418
+ * `async` is `true`.
419
+ */
420
+ messages?: Array<
421
+ AssistantA2AAgent.A2AAgentRequestStartMessage | AssistantA2AAgent.A2AAgentRequestResponseDelayedMessage
422
+ >;
423
+
424
+ /**
425
+ * How often, in milliseconds, to poll an agent task that has not finished yet.
426
+ * Defaults to 500.
427
+ */
428
+ poll_interval_ms?: number;
429
+
430
+ /**
431
+ * Total budget, in milliseconds, for one call to this agent, including any time
432
+ * spent polling a task that is still running. Omit to inherit the assistant's tool
433
+ * timeout.
434
+ */
435
+ timeout_ms?: number;
436
+ }
437
+
438
+ export namespace AssistantA2AAgent {
439
+ /**
440
+ * A header sent when fetching an A2A agent's card and on every call made to that
441
+ * agent.
442
+ */
443
+ export interface Header {
444
+ /**
445
+ * HTTP header name. May only contain alphanumeric characters, hyphens, and
446
+ * underscores, or a `{{dynamic_variable}}` placeholder surrounded by those
447
+ * characters.
448
+ */
449
+ name: string;
450
+
451
+ /**
452
+ * Header value, stored exactly as written. It may be a literal, a
453
+ * `{{dynamic_variable}}`, or an
454
+ * `{{#integration_secret}}identifier{{/integration_secret}}` section that resolves
455
+ * to a stored integration secret when the conversation starts. Control characters
456
+ * are not allowed. The encrypted `{{variable | encryption_secret_ref}}` form used
457
+ * for per-caller credentials is not resolved here and is rejected when the
458
+ * assistant is saved.
459
+ */
460
+ value: string;
461
+ }
462
+
463
+ export interface A2AAgentRequestStartMessage {
464
+ /**
465
+ * The text the assistant speaks.
466
+ */
467
+ content: string;
468
+
469
+ /**
470
+ * Speak the filler message immediately when the call to the agent begins.
471
+ */
472
+ type: 'request_start';
473
+
474
+ /**
475
+ * An optional delay value. This value is ignored for `request_start` messages.
476
+ */
477
+ timing_ms?: number;
478
+ }
479
+
480
+ export interface A2AAgentRequestResponseDelayedMessage {
481
+ /**
482
+ * The text the assistant speaks.
483
+ */
484
+ content: string;
485
+
486
+ /**
487
+ * How long to wait, in milliseconds, before speaking this message.
488
+ */
489
+ timing_ms: number;
490
+
491
+ /**
492
+ * Speak the filler message only if the agent has not answered yet after
493
+ * `timing_ms`.
494
+ */
495
+ type: 'request_response_delayed';
496
+ }
497
+ }
498
+
375
499
  /**
376
500
  * Reference to a connected integration attached to an assistant. Discover
377
501
  * available integrations with `/ai/integrations` and connected integrations with
@@ -1715,6 +1839,18 @@ export interface InferenceEmbedding {
1715
1839
 
1716
1840
  name: string;
1717
1841
 
1842
+ /**
1843
+ * A2A agents this assistant can delegate to. Tools are not stored here: at the
1844
+ * start of every conversation each agent's card is fetched and one tool is derived
1845
+ * per skill the card advertises, named `a2a_<name>_<skill_id>`. The following
1846
+ * limits are not enforced when the assistant is saved, and anything past them is
1847
+ * dropped when the conversation starts: 64 agents per assistant, 64 skills per
1848
+ * card, 128 derived tools per assistant, and a 6 second budget for all card
1849
+ * fetches combined. An agent whose card cannot be fetched costs the assistant that
1850
+ * capability for the conversation; it does not fail the call.
1851
+ */
1852
+ a2a_agents?: Array<AssistantA2AAgent>;
1853
+
1718
1854
  /**
1719
1855
  * Conversation flow as returned by the API.
1720
1856
  */
@@ -2415,6 +2551,17 @@ export interface TelephonySettings {
2415
2551
  */
2416
2552
  disable_dtmf?: boolean;
2417
2553
 
2554
+ /**
2555
+ * Destination number or SIP URI to transfer the caller to when the AI conversation
2556
+ * ends abnormally, for example because of an assistant-side error, so the caller
2557
+ * is not left in dead air. This only fires for abnormal ends: it does not fire
2558
+ * when the conversation ends on purpose (the caller hung up, the assistant
2559
+ * completed normally, the caller hung up after a relay handoff, or voicemail was
2560
+ * detected), and it does not fire when the assistant already transferred or
2561
+ * bridged the call.
2562
+ */
2563
+ fallback_destination?: string;
2564
+
2418
2565
  /**
2419
2566
  * The noise suppression engine to use. Use 'disabled' to turn off noise
2420
2567
  * suppression.
@@ -3312,6 +3459,18 @@ export interface AssistantCreateParams {
3312
3459
  */
3313
3460
  name: string;
3314
3461
 
3462
+ /**
3463
+ * Body param: A2A agents this assistant can delegate to. Tools are not stored
3464
+ * here: at the start of every conversation each agent's card is fetched and one
3465
+ * tool is derived per skill the card advertises, named `a2a_<name>_<skill_id>`.
3466
+ * The following limits are not enforced when the assistant is saved, and anything
3467
+ * past them is dropped when the conversation starts: 64 agents per assistant, 64
3468
+ * skills per card, 128 derived tools per assistant, and a 6 second budget for all
3469
+ * card fetches combined. An agent whose card cannot be fetched costs the assistant
3470
+ * that capability for the conversation; it does not fail the call.
3471
+ */
3472
+ a2a_agents?: Array<AssistantA2AAgent>;
3473
+
3315
3474
  /**
3316
3475
  * Body param: Conversation flow as supplied by API clients (create / update).
3317
3476
  *
@@ -3557,6 +3716,19 @@ export interface AssistantRetrieveParams {
3557
3716
  }
3558
3717
 
3559
3718
  export interface AssistantUpdateParams {
3719
+ /**
3720
+ * A2A agents this assistant can delegate to. Tools are not stored here: at the
3721
+ * start of every conversation each agent's card is fetched and one tool is derived
3722
+ * per skill the card advertises, named `a2a_<name>_<skill_id>`. The following
3723
+ * limits are not enforced when the assistant is saved, and anything past them is
3724
+ * dropped when the conversation starts: 64 agents per assistant, 64 skills per
3725
+ * card, 128 derived tools per assistant, and a 6 second budget for all card
3726
+ * fetches combined. An agent whose card cannot be fetched costs the assistant that
3727
+ * capability for the conversation; it does not fail the call. Omit this field to
3728
+ * leave the assistant's agents unchanged; send an empty array to remove them all.
3729
+ */
3730
+ a2a_agents?: Array<AssistantA2AAgent>;
3731
+
3560
3732
  /**
3561
3733
  * Conversation flow as supplied by API clients (create / update).
3562
3734
  *
@@ -3811,6 +3983,7 @@ export declare namespace Assistants {
3811
3983
  export {
3812
3984
  type ArithmeticExpression as ArithmeticExpression,
3813
3985
  type Assistant as Assistant,
3986
+ type AssistantA2AAgent as AssistantA2AAgent,
3814
3987
  type AssistantIntegration as AssistantIntegration,
3815
3988
  type AssistantMcpServer as AssistantMcpServer,
3816
3989
  type AssistantTool as AssistantTool,
@@ -4,6 +4,7 @@ export {
4
4
  Assistants,
5
5
  type ArithmeticExpression,
6
6
  type Assistant,
7
+ type AssistantA2AAgent,
7
8
  type AssistantIntegration,
8
9
  type AssistantMcpServer,
9
10
  type AssistantTool,
@@ -117,6 +117,19 @@ export class Versions extends APIResource {
117
117
  }
118
118
 
119
119
  export interface UpdateAssistant {
120
+ /**
121
+ * A2A agents this assistant can delegate to. Tools are not stored here: at the
122
+ * start of every conversation each agent's card is fetched and one tool is derived
123
+ * per skill the card advertises, named `a2a_<name>_<skill_id>`. The following
124
+ * limits are not enforced when the assistant is saved, and anything past them is
125
+ * dropped when the conversation starts: 64 agents per assistant, 64 skills per
126
+ * card, 128 derived tools per assistant, and a 6 second budget for all card
127
+ * fetches combined. An agent whose card cannot be fetched costs the assistant that
128
+ * capability for the conversation; it does not fail the call. Omit this field to
129
+ * leave the assistant's agents unchanged; send an empty array to remove them all.
130
+ */
131
+ a2a_agents?: Array<AssistantsAPI.AssistantA2AAgent>;
132
+
120
133
  /**
121
134
  * Conversation flow as supplied by API clients (create / update).
122
135
  *
@@ -299,6 +312,20 @@ export interface VersionUpdateParams {
299
312
  */
300
313
  assistant_id: string;
301
314
 
315
+ /**
316
+ * Body param: A2A agents this assistant can delegate to. Tools are not stored
317
+ * here: at the start of every conversation each agent's card is fetched and one
318
+ * tool is derived per skill the card advertises, named `a2a_<name>_<skill_id>`.
319
+ * The following limits are not enforced when the assistant is saved, and anything
320
+ * past them is dropped when the conversation starts: 64 agents per assistant, 64
321
+ * skills per card, 128 derived tools per assistant, and a 6 second budget for all
322
+ * card fetches combined. An agent whose card cannot be fetched costs the assistant
323
+ * that capability for the conversation; it does not fail the call. Omit this field
324
+ * to leave the assistant's agents unchanged; send an empty array to remove them
325
+ * all.
326
+ */
327
+ a2a_agents?: Array<AssistantsAPI.AssistantA2AAgent>;
328
+
302
329
  /**
303
330
  * Body param: Conversation flow as supplied by API clients (create / update).
304
331
  *
@@ -58,22 +58,6 @@ export interface ChatCompletionRequest {
58
58
  */
59
59
  frequency_penalty?: number;
60
60
 
61
- /**
62
- * If specified, the output will be exactly one of the choices.
63
- */
64
- guided_choice?: Array<string>;
65
-
66
- /**
67
- * Must be a valid JSON schema. If specified, the output will follow the JSON
68
- * schema.
69
- */
70
- guided_json?: { [key: string]: unknown };
71
-
72
- /**
73
- * If specified, the output will follow the regex pattern.
74
- */
75
- guided_regex?: string;
76
-
77
61
  /**
78
62
  * This is used with `use_beam_search` to prefer shorter or longer completions.
79
63
  */
@@ -98,6 +82,15 @@ export interface ChatCompletionRequest {
98
82
  */
99
83
  min_p?: number;
100
84
 
85
+ /**
86
+ * How strictly `region` is applied. `preferred` (the default when `region` is set)
87
+ * tries that region first and falls back to another when the model cannot be
88
+ * served there, so a request that would have succeeded still succeeds. `strict`
89
+ * pins the request: it is served from that region or it fails with a 422, never
90
+ * redirected to another region. Requires `region`.
91
+ */
92
+ mode?: 'preferred' | 'strict';
93
+
101
94
  /**
102
95
  * The language model to chat with.
103
96
  */
@@ -123,10 +116,24 @@ export interface ChatCompletionRequest {
123
116
  reasoning_effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
124
117
 
125
118
  /**
126
- * Use this is you want to guarantee a JSON output without defining a schema. For
127
- * control over the schema, use `guided_json`.
119
+ * Optional data-residency region the request should be served from, using the same
120
+ * vocabulary as your account's Data Locality setting. Behavior depends on `mode`.
121
+ * Supported for Telnyx-hosted models only: a request routed to an external
122
+ * provider never passes through Telnyx model routing, so a region cannot be
123
+ * enforced for it. Omit for today's latency-based routing.
124
+ */
125
+ region?: 'USA' | 'EU' | 'AUS' | 'UAE';
126
+
127
+ /**
128
+ * Controls the format of the model output. `json_object` guarantees valid JSON
129
+ * output without defining a schema; `json_schema` constrains the output to the
130
+ * JSON schema you supply via the `json_schema` property and is the supported way
131
+ * to get guaranteed structured output on Telnyx-hosted models.
128
132
  */
129
- response_format?: ChatCompletionRequest.ResponseFormat;
133
+ response_format?:
134
+ | ChatCompletionRequest.ResponseFormatText
135
+ | ChatCompletionRequest.ResponseFormatJsonObject
136
+ | ChatCompletionRequest.ResponseFormatJsonSchemaParam;
130
137
 
131
138
  /**
132
139
  * If specified, the system will make a best effort to sample deterministically,
@@ -210,11 +217,68 @@ export namespace ChatCompletionRequest {
210
217
  }
211
218
 
212
219
  /**
213
- * Use this is you want to guarantee a JSON output without defining a schema. For
214
- * control over the schema, use `guided_json`.
220
+ * Plain text output.
215
221
  */
216
- export interface ResponseFormat {
217
- type: 'text' | 'json_object';
222
+ export interface ResponseFormatText {
223
+ type: 'text';
224
+ }
225
+
226
+ /**
227
+ * JSON mode: the model output is valid JSON, without a schema.
228
+ */
229
+ export interface ResponseFormatJsonObject {
230
+ type: 'json_object';
231
+ }
232
+
233
+ /**
234
+ * Structured output: the model output is constrained to the JSON schema supplied
235
+ * in `json_schema`.
236
+ */
237
+ export interface ResponseFormatJsonSchemaParam {
238
+ /**
239
+ * The JSON schema configuration, required when `type` is `json_schema`. Matches
240
+ * the
241
+ * [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
242
+ * `json_schema` response format.
243
+ */
244
+ json_schema: ResponseFormatJsonSchemaParam.JsonSchema;
245
+
246
+ type: 'json_schema';
247
+ }
248
+
249
+ export namespace ResponseFormatJsonSchemaParam {
250
+ /**
251
+ * The JSON schema configuration, required when `type` is `json_schema`. Matches
252
+ * the
253
+ * [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
254
+ * `json_schema` response format.
255
+ */
256
+ export interface JsonSchema {
257
+ /**
258
+ * The name of the response format. Used for clarity only.
259
+ */
260
+ name: string;
261
+
262
+ /**
263
+ * A description of what the response format is for, typically used to guide the
264
+ * model.
265
+ */
266
+ description?: string;
267
+
268
+ /**
269
+ * The JSON schema the model output must conform to. A valid
270
+ * [JSON Schema](https://json-schema.org) object, e.g. a Pydantic
271
+ * `model_json_schema()` export.
272
+ */
273
+ schema?: { [key: string]: unknown };
274
+
275
+ /**
276
+ * Enables strict schema adherence when supported by the model. If the generated
277
+ * output does not match the provided schema, the request fails instead of
278
+ * returning non-conformant output.
279
+ */
280
+ strict?: boolean;
281
+ }
218
282
  }
219
283
 
220
284
  export interface Function {
@@ -15,6 +15,7 @@ export {
15
15
  Assistants,
16
16
  type ArithmeticExpression,
17
17
  type Assistant,
18
+ type AssistantA2AAgent,
18
19
  type AssistantIntegration,
19
20
  type AssistantMcpServer,
20
21
  type AssistantTool,