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
@@ -75,22 +75,6 @@ export interface ChatCreateCompletionParams {
75
75
  */
76
76
  frequency_penalty?: number;
77
77
 
78
- /**
79
- * If specified, the output will be exactly one of the choices.
80
- */
81
- guided_choice?: Array<string>;
82
-
83
- /**
84
- * Must be a valid JSON schema. If specified, the output will follow the JSON
85
- * schema.
86
- */
87
- guided_json?: { [key: string]: unknown };
88
-
89
- /**
90
- * If specified, the output will follow the regex pattern.
91
- */
92
- guided_regex?: string;
93
-
94
78
  /**
95
79
  * This is used with `use_beam_search` to prefer shorter or longer completions.
96
80
  */
@@ -115,6 +99,15 @@ export interface ChatCreateCompletionParams {
115
99
  */
116
100
  min_p?: number;
117
101
 
102
+ /**
103
+ * How strictly `region` is applied. `preferred` (the default when `region` is set)
104
+ * tries that region first and falls back to another when the model cannot be
105
+ * served there, so a request that would have succeeded still succeeds. `strict`
106
+ * pins the request: it is served from that region or it fails with a 422, never
107
+ * redirected to another region. Requires `region`.
108
+ */
109
+ mode?: 'preferred' | 'strict';
110
+
118
111
  /**
119
112
  * The language model to chat with.
120
113
  */
@@ -140,10 +133,24 @@ export interface ChatCreateCompletionParams {
140
133
  reasoning_effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
141
134
 
142
135
  /**
143
- * Use this is you want to guarantee a JSON output without defining a schema. For
144
- * control over the schema, use `guided_json`.
136
+ * Optional data-residency region the request should be served from, using the same
137
+ * vocabulary as your account's Data Locality setting. Behavior depends on `mode`.
138
+ * Supported for Telnyx-hosted models only: a request routed to an external
139
+ * provider never passes through Telnyx model routing, so a region cannot be
140
+ * enforced for it. Omit for today's latency-based routing.
141
+ */
142
+ region?: 'USA' | 'EU' | 'AUS' | 'UAE';
143
+
144
+ /**
145
+ * Controls the format of the model output. `json_object` guarantees valid JSON
146
+ * output without defining a schema; `json_schema` constrains the output to the
147
+ * JSON schema you supply via the `json_schema` property and is the supported way
148
+ * to get guaranteed structured output on Telnyx-hosted models.
145
149
  */
146
- response_format?: ChatCreateCompletionParams.ResponseFormat;
150
+ response_format?:
151
+ | ChatCreateCompletionParams.ResponseFormatText
152
+ | ChatCreateCompletionParams.ResponseFormatJsonObject
153
+ | ChatCreateCompletionParams.ResponseFormatJsonSchemaParam;
147
154
 
148
155
  /**
149
156
  * If specified, the system will make a best effort to sample deterministically,
@@ -227,11 +234,68 @@ export namespace ChatCreateCompletionParams {
227
234
  }
228
235
 
229
236
  /**
230
- * Use this is you want to guarantee a JSON output without defining a schema. For
231
- * control over the schema, use `guided_json`.
237
+ * Plain text output.
232
238
  */
233
- export interface ResponseFormat {
234
- type: 'text' | 'json_object';
239
+ export interface ResponseFormatText {
240
+ type: 'text';
241
+ }
242
+
243
+ /**
244
+ * JSON mode: the model output is valid JSON, without a schema.
245
+ */
246
+ export interface ResponseFormatJsonObject {
247
+ type: 'json_object';
248
+ }
249
+
250
+ /**
251
+ * Structured output: the model output is constrained to the JSON schema supplied
252
+ * in `json_schema`.
253
+ */
254
+ export interface ResponseFormatJsonSchemaParam {
255
+ /**
256
+ * The JSON schema configuration, required when `type` is `json_schema`. Matches
257
+ * the
258
+ * [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
259
+ * `json_schema` response format.
260
+ */
261
+ json_schema: ResponseFormatJsonSchemaParam.JsonSchema;
262
+
263
+ type: 'json_schema';
264
+ }
265
+
266
+ export namespace ResponseFormatJsonSchemaParam {
267
+ /**
268
+ * The JSON schema configuration, required when `type` is `json_schema`. Matches
269
+ * the
270
+ * [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
271
+ * `json_schema` response format.
272
+ */
273
+ export interface JsonSchema {
274
+ /**
275
+ * The name of the response format. Used for clarity only.
276
+ */
277
+ name: string;
278
+
279
+ /**
280
+ * A description of what the response format is for, typically used to guide the
281
+ * model.
282
+ */
283
+ description?: string;
284
+
285
+ /**
286
+ * The JSON schema the model output must conform to. A valid
287
+ * [JSON Schema](https://json-schema.org) object, e.g. a Pydantic
288
+ * `model_json_schema()` export.
289
+ */
290
+ schema?: { [key: string]: unknown };
291
+
292
+ /**
293
+ * Enables strict schema adherence when supported by the model. If the generated
294
+ * output does not match the provided schema, the request fails instead of
295
+ * returning non-conformant output.
296
+ */
297
+ strict?: boolean;
298
+ }
235
299
  }
236
300
 
237
301
  export interface Function {
@@ -121,6 +121,15 @@ export interface OpenAICreateResponseParams {
121
121
  */
122
122
  instructions?: string;
123
123
 
124
+ /**
125
+ * How strictly `region` is applied. `preferred` (the default when `region` is set)
126
+ * tries that region first and falls back to another when the model cannot be
127
+ * served there, so a request that would have succeeded still succeeds. `strict`
128
+ * pins the request: it is served from that region or it fails with a 422, never
129
+ * redirected to another region. Requires `region`.
130
+ */
131
+ mode?: 'preferred' | 'strict';
132
+
124
133
  /**
125
134
  * Model identifier to use for the response, for example `zai-org/GLM-5.1-FP8` or
126
135
  * another model available from the Telnyx OpenAI-compatible models endpoint.
@@ -129,6 +138,15 @@ export interface OpenAICreateResponseParams {
129
138
 
130
139
  reasoning?: OpenAICreateResponseParams.Reasoning;
131
140
 
141
+ /**
142
+ * Optional data-residency region the request should be served from, using the same
143
+ * vocabulary as your account's Data Locality setting. Behavior depends on `mode`.
144
+ * Supported for Telnyx-hosted models only: a request routed to an external
145
+ * provider never passes through Telnyx model routing, so a region cannot be
146
+ * enforced for it. Omit for today's latency-based routing.
147
+ */
148
+ region?: 'USA' | 'EU' | 'AUS' | 'UAE';
149
+
132
150
  /**
133
151
  * The service tier to use for this request. Supported values vary by model; use
134
152
  * `GET /v2/ai/openai/models` and inspect the model's `service_tiers` field. If
@@ -0,0 +1,37 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as FuncsAPI from './funcs';
5
+ import {
6
+ FuncRetrieveLogsParams,
7
+ FuncRetrieveLogsResponse,
8
+ FuncRetrieveMetricAggregatesParams,
9
+ FuncRetrieveMetricAggregatesResponse,
10
+ FuncRetrieveRevisionsParams,
11
+ FuncRetrieveRevisionsResponse,
12
+ FuncRetrieveShipInspectionResponse,
13
+ Funcs,
14
+ FunctionsObservabilityPaginationMeta,
15
+ LogsMeta,
16
+ } from './funcs';
17
+
18
+ export class Compute extends APIResource {
19
+ funcs: FuncsAPI.Funcs = new FuncsAPI.Funcs(this._client);
20
+ }
21
+
22
+ Compute.Funcs = Funcs;
23
+
24
+ export declare namespace Compute {
25
+ export {
26
+ Funcs as Funcs,
27
+ type FunctionsObservabilityPaginationMeta as FunctionsObservabilityPaginationMeta,
28
+ type LogsMeta as LogsMeta,
29
+ type FuncRetrieveLogsResponse as FuncRetrieveLogsResponse,
30
+ type FuncRetrieveMetricAggregatesResponse as FuncRetrieveMetricAggregatesResponse,
31
+ type FuncRetrieveRevisionsResponse as FuncRetrieveRevisionsResponse,
32
+ type FuncRetrieveShipInspectionResponse as FuncRetrieveShipInspectionResponse,
33
+ type FuncRetrieveLogsParams as FuncRetrieveLogsParams,
34
+ type FuncRetrieveMetricAggregatesParams as FuncRetrieveMetricAggregatesParams,
35
+ type FuncRetrieveRevisionsParams as FuncRetrieveRevisionsParams,
36
+ };
37
+ }
@@ -0,0 +1,298 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as FuncsAPI from './funcs';
5
+ import { APIPromise } from '../../core/api-promise';
6
+ import { RequestOptions } from '../../internal/request-options';
7
+ import { path } from '../../internal/utils/path';
8
+
9
+ export class Funcs extends APIResource {
10
+ /**
11
+ * Returns logs oldest first. `type=runtime` (default) returns function
12
+ * stdout/stderr. `type=invocations` returns one platform-generated record per HTTP
13
+ * request served.
14
+ */
15
+ retrieveLogs(
16
+ id: string,
17
+ query: FuncRetrieveLogsParams | null | undefined = {},
18
+ options?: RequestOptions,
19
+ ): APIPromise<FuncRetrieveLogsResponse> {
20
+ return this._client.get(path`/compute/funcs/${id}/logs`, { query, ...options });
21
+ }
22
+
23
+ /**
24
+ * Returns aggregate request, latency, CPU, memory, and resource-limit metrics for
25
+ * a function over the requested window.
26
+ */
27
+ retrieveMetricAggregates(
28
+ id: string,
29
+ query: FuncRetrieveMetricAggregatesParams,
30
+ options?: RequestOptions,
31
+ ): APIPromise<FuncRetrieveMetricAggregatesResponse> {
32
+ return this._client.get(path`/compute/funcs/${id}/metric_aggregates`, { query, ...options });
33
+ }
34
+
35
+ /**
36
+ * Lists a function's ship history newest first, including per-ship failure stage
37
+ * and reason when recorded.
38
+ */
39
+ retrieveRevisions(
40
+ id: string,
41
+ query: FuncRetrieveRevisionsParams | null | undefined = {},
42
+ options?: RequestOptions,
43
+ ): APIPromise<FuncRetrieveRevisionsResponse> {
44
+ return this._client.get(path`/compute/funcs/${id}/revisions`, { query, ...options });
45
+ }
46
+
47
+ /**
48
+ * Returns the latest ship outcome. The stage is `none` on success, `pending` while
49
+ * building, or a failure stage such as `build`, `platform`, `pre_build`, `deploy`,
50
+ * or `security_review`. This stage-neutral customer-facing path is an alias over
51
+ * the same inspection resource as `build_log_inspection`.
52
+ */
53
+ retrieveShipInspection(
54
+ id: string,
55
+ options?: RequestOptions,
56
+ ): APIPromise<FuncRetrieveShipInspectionResponse> {
57
+ return this._client.get(path`/compute/funcs/${id}/ship_inspection`, options);
58
+ }
59
+ }
60
+
61
+ export interface FunctionsObservabilityPaginationMeta {
62
+ page_number?: number;
63
+
64
+ page_size?: number;
65
+
66
+ total_pages?: number;
67
+
68
+ total_results?: number;
69
+ }
70
+
71
+ export interface LogsMeta {
72
+ has_more?: boolean;
73
+
74
+ partial?: boolean;
75
+ }
76
+
77
+ export type FuncRetrieveLogsResponse =
78
+ | FuncRetrieveLogsResponse.FuncRuntimeLogsResponse
79
+ | FuncRetrieveLogsResponse.FuncInvocationLogsResponse;
80
+
81
+ export namespace FuncRetrieveLogsResponse {
82
+ export interface FuncRuntimeLogsResponse {
83
+ data?: Array<FuncRuntimeLogsResponse.Data>;
84
+
85
+ meta?: FuncsAPI.LogsMeta;
86
+ }
87
+
88
+ export namespace FuncRuntimeLogsResponse {
89
+ export interface Data {
90
+ level?: string;
91
+
92
+ message?: string;
93
+
94
+ record_type?: 'compute_func_runtime_log';
95
+
96
+ timestamp?: string;
97
+ }
98
+ }
99
+
100
+ export interface FuncInvocationLogsResponse {
101
+ data?: Array<FuncInvocationLogsResponse.Data>;
102
+
103
+ meta?: FuncsAPI.LogsMeta;
104
+ }
105
+
106
+ export namespace FuncInvocationLogsResponse {
107
+ export interface Data {
108
+ duration_ms?: number;
109
+
110
+ method?: string;
111
+
112
+ path?: string;
113
+
114
+ record_type?: 'compute_func_invocation_log';
115
+
116
+ region?: string;
117
+
118
+ request_size_bytes?: number;
119
+
120
+ response_size_bytes?: number;
121
+
122
+ status_code?: number;
123
+
124
+ timestamp?: string;
125
+ }
126
+ }
127
+ }
128
+
129
+ export interface FuncRetrieveMetricAggregatesResponse {
130
+ data?: Array<FuncRetrieveMetricAggregatesResponse.Data>;
131
+
132
+ meta?: FunctionsObservabilityPaginationMeta;
133
+ }
134
+
135
+ export namespace FuncRetrieveMetricAggregatesResponse {
136
+ export interface Data {
137
+ cpu_used_cores_avg?: number | null;
138
+
139
+ cpu_used_cores_max?: number | null;
140
+
141
+ end_time?: string;
142
+
143
+ function_id?: string;
144
+
145
+ function_name?: string;
146
+
147
+ memory_used_bytes_avg?: number | null;
148
+
149
+ memory_used_bytes_max?: number | null;
150
+
151
+ product?: string;
152
+
153
+ record_type?: string;
154
+
155
+ request_client_error_rate?: number | null;
156
+
157
+ request_count?: number | null;
158
+
159
+ request_error_rate?: number | null;
160
+
161
+ request_latency_avg_ms?: number | null;
162
+
163
+ request_latency_p50_ms?: number | null;
164
+
165
+ request_latency_p95_ms?: number | null;
166
+
167
+ request_latency_p99_ms?: number | null;
168
+
169
+ request_success_rate?: number | null;
170
+
171
+ start_time?: string;
172
+ }
173
+ }
174
+
175
+ export interface FuncRetrieveRevisionsResponse {
176
+ data?: Array<FuncRetrieveRevisionsResponse.Data>;
177
+
178
+ meta?: FunctionsObservabilityPaginationMeta;
179
+ }
180
+
181
+ export namespace FuncRetrieveRevisionsResponse {
182
+ export interface Data {
183
+ active?: boolean;
184
+
185
+ build_ok_at?: string;
186
+
187
+ build_status?: string;
188
+
189
+ commit_sha?: string;
190
+
191
+ deploy_status?: string;
192
+
193
+ failure_reason?: string;
194
+
195
+ failure_stage?: string;
196
+
197
+ image?: string;
198
+
199
+ record_type?: string;
200
+
201
+ revision_id?: string;
202
+
203
+ shipped_at?: string;
204
+
205
+ shipped_by?: string;
206
+ }
207
+ }
208
+
209
+ export interface FuncRetrieveShipInspectionResponse {
210
+ data?: FuncRetrieveShipInspectionResponse.Data;
211
+ }
212
+
213
+ export namespace FuncRetrieveShipInspectionResponse {
214
+ export interface Data {
215
+ created_at?: string;
216
+
217
+ reason?: string;
218
+
219
+ /**
220
+ * Stable record type retained by both inspection path aliases.
221
+ */
222
+ record_type?: 'build_log_inspection';
223
+
224
+ runtime?: string;
225
+
226
+ snippet?: string;
227
+
228
+ stage?: 'build' | 'platform' | 'pre_build' | 'deploy' | 'security_review' | 'none' | 'pending';
229
+ }
230
+ }
231
+
232
+ export interface FuncRetrieveLogsParams {
233
+ /**
234
+ * Return records at or before this RFC 3339 timestamp.
235
+ */
236
+ end_time?: string;
237
+
238
+ /**
239
+ * Maximum records to return.
240
+ */
241
+ limit?: number;
242
+
243
+ /**
244
+ * Return records at or after this RFC 3339 timestamp.
245
+ */
246
+ start_time?: string;
247
+
248
+ /**
249
+ * Log stream to return.
250
+ */
251
+ type?: 'runtime' | 'invocations';
252
+ }
253
+
254
+ export interface FuncRetrieveMetricAggregatesParams {
255
+ /**
256
+ * Exclusive window end, UTC ISO 8601 with milliseconds
257
+ */
258
+ end_time: string;
259
+
260
+ /**
261
+ * Inclusive window start, UTC ISO 8601 with milliseconds
262
+ */
263
+ start_time: string;
264
+
265
+ /**
266
+ * Edge site filter
267
+ */
268
+ 'filter[edge_site]'?: string;
269
+
270
+ /**
271
+ * Kubernetes namespace filter
272
+ */
273
+ 'filter[namespace]'?: string;
274
+
275
+ 'page[number]'?: number;
276
+
277
+ 'page[size]'?: number;
278
+ }
279
+
280
+ export interface FuncRetrieveRevisionsParams {
281
+ 'page[number]'?: number;
282
+
283
+ 'page[size]'?: number;
284
+ }
285
+
286
+ export declare namespace Funcs {
287
+ export {
288
+ type FunctionsObservabilityPaginationMeta as FunctionsObservabilityPaginationMeta,
289
+ type LogsMeta as LogsMeta,
290
+ type FuncRetrieveLogsResponse as FuncRetrieveLogsResponse,
291
+ type FuncRetrieveMetricAggregatesResponse as FuncRetrieveMetricAggregatesResponse,
292
+ type FuncRetrieveRevisionsResponse as FuncRetrieveRevisionsResponse,
293
+ type FuncRetrieveShipInspectionResponse as FuncRetrieveShipInspectionResponse,
294
+ type FuncRetrieveLogsParams as FuncRetrieveLogsParams,
295
+ type FuncRetrieveMetricAggregatesParams as FuncRetrieveMetricAggregatesParams,
296
+ type FuncRetrieveRevisionsParams as FuncRetrieveRevisionsParams,
297
+ };
298
+ }
@@ -0,0 +1,15 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export { Compute } from './compute';
4
+ export {
5
+ Funcs,
6
+ type FunctionsObservabilityPaginationMeta,
7
+ type LogsMeta,
8
+ type FuncRetrieveLogsResponse,
9
+ type FuncRetrieveMetricAggregatesResponse,
10
+ type FuncRetrieveRevisionsResponse,
11
+ type FuncRetrieveShipInspectionResponse,
12
+ type FuncRetrieveLogsParams,
13
+ type FuncRetrieveMetricAggregatesParams,
14
+ type FuncRetrieveRevisionsParams,
15
+ } from './funcs';
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './compute/index';
@@ -257,7 +257,10 @@ export interface CredentialConnection {
257
257
 
258
258
  /**
259
259
  * The password to be used as part of the credentials. Must be 8 to 128 characters
260
- * long.
260
+ * long. For primary accounts created on or after September 8, 2026, this password
261
+ * is returned as `********`. The password is returned in full on create, and on
262
+ * update only when that update changed the password. Accounts created before
263
+ * September 8, 2026 are unaffected.
261
264
  */
262
265
  password?: string;
263
266
 
@@ -415,6 +415,14 @@ export interface EmailMessage {
415
415
  * send has been processed or cancelled.
416
416
  */
417
417
  scheduled_at?: string;
418
+
419
+ /**
420
+ * Recipients excluded from delivery by suppression checks, with reasons. On batch
421
+ * items, present when that item had suppressed recipients; all other recipients of
422
+ * the item still receive the message. For single sends this information appears at
423
+ * the top level of the response instead (see EmailMessageResponse.suppressed).
424
+ */
425
+ suppressed?: Array<EmailMessagesAPI.SuppressedRecipient>;
418
426
  }
419
427
 
420
428
  export namespace EmailMessage {
@@ -109,7 +109,9 @@ export class EmailMessages extends APIResource {
109
109
  }
110
110
 
111
111
  /**
112
- * Creates up to 50 email messages in a single request.
112
+ * Creates up to 1,000 email messages in a single request. Each message is
113
+ * validated and sent independently; per-message failures do not affect other
114
+ * messages in the batch. All responses use 207 Multi-Status.
113
115
  *
114
116
  * @example
115
117
  * ```ts
@@ -336,6 +338,7 @@ export namespace EmailMessageBatchResponse {
336
338
  | 'not_found'
337
339
  | 'forbidden'
338
340
  | 'service_unavailable'
341
+ | 'unprocessable_entity'
339
342
  | 'validation_error'
340
343
  | 'recipient_suppressed'
341
344
  | 'reputation_suspended';
@@ -548,7 +551,9 @@ export interface EmailMessageCreateParams {
548
551
 
549
552
  export interface EmailMessageBatchParams {
550
553
  /**
551
- * Body param
554
+ * Body param: Array of email messages to send. Up to 1,000 messages per batch
555
+ * request. Each message is validated and sent independently; per-message failures
556
+ * do not affect other messages in the batch.
552
557
  */
553
558
  messages: Array<EmailMessageBatchParams.Message>;
554
559
 
@@ -80,7 +80,10 @@ export interface FqdnAuthentication {
80
80
  microsoft_teams_sbc?: boolean;
81
81
 
82
82
  /**
83
- * The password for authentication.
83
+ * The password for authentication. For primary accounts created on or after
84
+ * September 8, 2026, this password is returned as `********`. The password is
85
+ * returned in full on create, and on update only when that update changed the
86
+ * password. Accounts created before September 8, 2026 are unaffected.
84
87
  */
85
88
  password?: string;
86
89
 
@@ -249,7 +249,10 @@ export interface FqdnConnection {
249
249
  outbound?: OutboundFqdn;
250
250
 
251
251
  /**
252
- * The password for the FQDN connection.
252
+ * The password for the FQDN connection. For primary accounts created on or after
253
+ * September 8, 2026, this password is returned as `********`. The password is
254
+ * returned in full on create, and on update only when that update changed the
255
+ * password. Accounts created before September 8, 2026 are unaffected.
253
256
  */
254
257
  password?: string;
255
258
 
@@ -185,6 +185,7 @@ export {
185
185
  type CommentListParams,
186
186
  type CommentCreateParams,
187
187
  } from './comments';
188
+ export { Compute } from './compute/compute';
188
189
  export {
189
190
  Conferences,
190
191
  type Conference,
@@ -772,7 +773,9 @@ export {
772
773
  } from './messaging-profile-metrics';
773
774
  export {
774
775
  MessagingProfiles,
776
+ type MessagingMessagingProfile,
775
777
  type MessagingProfile,
778
+ type MessagingProfileFeatures,
776
779
  type NumberPoolSettings,
777
780
  type URLShortenerSettings,
778
781
  type MessagingProfileCreateResponse,
@@ -787,7 +790,7 @@ export {
787
790
  type MessagingProfileListShortCodesParams,
788
791
  type MessagingProfileListAlphanumericSenderIDsParams,
789
792
  type MessagingProfileRetrieveMetricsParams,
790
- type MessagingProfilesDefaultFlatPagination,
793
+ type MessagingMessagingProfilesDefaultFlatPagination,
791
794
  } from './messaging-profiles/messaging-profiles';
792
795
  export { MessagingTollfree } from './messaging-tollfree/messaging-tollfree';
793
796
  export {
@@ -1622,6 +1625,8 @@ export {
1622
1625
  type OutboundMessage,
1623
1626
  type ReplacedLinkClick,
1624
1627
  type Transcription,
1628
+ type WhatsappAccountUpdate,
1629
+ type WhatsappMessageEcho,
1625
1630
  type CallAIGatherEndedWebhookEvent,
1626
1631
  type CallAIGatherMessageHistoryUpdatedWebhookEvent,
1627
1632
  type CallAIGatherPartialResultsWebhookEvent,