telnyx 7.21.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 (259) hide show
  1. package/CHANGELOG.md +7 -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/assistants/assistants.d.mts +152 -1
  18. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  19. package/resources/ai/assistants/assistants.d.ts +152 -1
  20. package/resources/ai/assistants/assistants.d.ts.map +1 -1
  21. package/resources/ai/assistants/assistants.js.map +1 -1
  22. package/resources/ai/assistants/assistants.mjs.map +1 -1
  23. package/resources/ai/assistants/index.d.mts +1 -1
  24. package/resources/ai/assistants/index.d.mts.map +1 -1
  25. package/resources/ai/assistants/index.d.ts +1 -1
  26. package/resources/ai/assistants/index.d.ts.map +1 -1
  27. package/resources/ai/assistants/index.js.map +1 -1
  28. package/resources/ai/assistants/index.mjs.map +1 -1
  29. package/resources/ai/assistants/versions.d.mts +25 -0
  30. package/resources/ai/assistants/versions.d.mts.map +1 -1
  31. package/resources/ai/assistants/versions.d.ts +25 -0
  32. package/resources/ai/assistants/versions.d.ts.map +1 -1
  33. package/resources/ai/chat.d.mts +61 -22
  34. package/resources/ai/chat.d.mts.map +1 -1
  35. package/resources/ai/chat.d.ts +61 -22
  36. package/resources/ai/chat.d.ts.map +1 -1
  37. package/resources/ai/index.d.mts +1 -1
  38. package/resources/ai/index.d.mts.map +1 -1
  39. package/resources/ai/index.d.ts +1 -1
  40. package/resources/ai/index.d.ts.map +1 -1
  41. package/resources/ai/index.js.map +1 -1
  42. package/resources/ai/index.mjs.map +1 -1
  43. package/resources/ai/openai/chat.d.mts +61 -22
  44. package/resources/ai/openai/chat.d.mts.map +1 -1
  45. package/resources/ai/openai/chat.d.ts +61 -22
  46. package/resources/ai/openai/chat.d.ts.map +1 -1
  47. package/resources/compute/compute.d.mts +10 -0
  48. package/resources/compute/compute.d.mts.map +1 -0
  49. package/resources/compute/compute.d.ts +10 -0
  50. package/resources/compute/compute.d.ts.map +1 -0
  51. package/resources/compute/compute.js +17 -0
  52. package/resources/compute/compute.js.map +1 -0
  53. package/resources/compute/compute.mjs +12 -0
  54. package/resources/compute/compute.mjs.map +1 -0
  55. package/resources/compute/funcs.d.mts +179 -0
  56. package/resources/compute/funcs.d.mts.map +1 -0
  57. package/resources/compute/funcs.d.ts +179 -0
  58. package/resources/compute/funcs.d.ts.map +1 -0
  59. package/resources/compute/funcs.js +41 -0
  60. package/resources/compute/funcs.js.map +1 -0
  61. package/resources/compute/funcs.mjs +37 -0
  62. package/resources/compute/funcs.mjs.map +1 -0
  63. package/resources/compute/index.d.mts +3 -0
  64. package/resources/compute/index.d.mts.map +1 -0
  65. package/resources/compute/index.d.ts +3 -0
  66. package/resources/compute/index.d.ts.map +1 -0
  67. package/resources/compute/index.js +9 -0
  68. package/resources/compute/index.js.map +1 -0
  69. package/resources/compute/index.mjs +4 -0
  70. package/resources/compute/index.mjs.map +1 -0
  71. package/resources/compute.d.mts +2 -0
  72. package/resources/compute.d.mts.map +1 -0
  73. package/resources/compute.d.ts +2 -0
  74. package/resources/compute.d.ts.map +1 -0
  75. package/resources/compute.js +6 -0
  76. package/resources/compute.js.map +1 -0
  77. package/resources/compute.mjs +3 -0
  78. package/resources/compute.mjs.map +1 -0
  79. package/resources/credential-connections/credential-connections.d.mts +4 -1
  80. package/resources/credential-connections/credential-connections.d.mts.map +1 -1
  81. package/resources/credential-connections/credential-connections.d.ts +4 -1
  82. package/resources/credential-connections/credential-connections.d.ts.map +1 -1
  83. package/resources/credential-connections/credential-connections.js.map +1 -1
  84. package/resources/credential-connections/credential-connections.mjs.map +1 -1
  85. package/resources/email-inboxes/drafts.d.mts +7 -0
  86. package/resources/email-inboxes/drafts.d.mts.map +1 -1
  87. package/resources/email-inboxes/drafts.d.ts +7 -0
  88. package/resources/email-inboxes/drafts.d.ts.map +1 -1
  89. package/resources/email-messages/email-messages.d.mts +7 -3
  90. package/resources/email-messages/email-messages.d.mts.map +1 -1
  91. package/resources/email-messages/email-messages.d.ts +7 -3
  92. package/resources/email-messages/email-messages.d.ts.map +1 -1
  93. package/resources/email-messages/email-messages.js +3 -1
  94. package/resources/email-messages/email-messages.js.map +1 -1
  95. package/resources/email-messages/email-messages.mjs +3 -1
  96. package/resources/email-messages/email-messages.mjs.map +1 -1
  97. package/resources/fqdn-connections/fqdn-authentication.d.mts +4 -1
  98. package/resources/fqdn-connections/fqdn-authentication.d.mts.map +1 -1
  99. package/resources/fqdn-connections/fqdn-authentication.d.ts +4 -1
  100. package/resources/fqdn-connections/fqdn-authentication.d.ts.map +1 -1
  101. package/resources/fqdn-connections/fqdn-connections.d.mts +4 -1
  102. package/resources/fqdn-connections/fqdn-connections.d.mts.map +1 -1
  103. package/resources/fqdn-connections/fqdn-connections.d.ts +4 -1
  104. package/resources/fqdn-connections/fqdn-connections.d.ts.map +1 -1
  105. package/resources/fqdn-connections/fqdn-connections.js.map +1 -1
  106. package/resources/fqdn-connections/fqdn-connections.mjs.map +1 -1
  107. package/resources/index.d.mts +3 -2
  108. package/resources/index.d.mts.map +1 -1
  109. package/resources/index.d.ts +3 -2
  110. package/resources/index.d.ts.map +1 -1
  111. package/resources/index.js +6 -4
  112. package/resources/index.js.map +1 -1
  113. package/resources/index.mjs +1 -0
  114. package/resources/index.mjs.map +1 -1
  115. package/resources/messages/messages.d.mts +79 -6
  116. package/resources/messages/messages.d.mts.map +1 -1
  117. package/resources/messages/messages.d.ts +79 -6
  118. package/resources/messages/messages.d.ts.map +1 -1
  119. package/resources/messages/messages.js.map +1 -1
  120. package/resources/messages/messages.mjs.map +1 -1
  121. package/resources/messaging-profiles/index.d.mts +1 -1
  122. package/resources/messaging-profiles/index.d.mts.map +1 -1
  123. package/resources/messaging-profiles/index.d.ts +1 -1
  124. package/resources/messaging-profiles/index.d.ts.map +1 -1
  125. package/resources/messaging-profiles/index.js.map +1 -1
  126. package/resources/messaging-profiles/index.mjs.map +1 -1
  127. package/resources/messaging-profiles/messaging-profiles.d.mts +34 -1
  128. package/resources/messaging-profiles/messaging-profiles.d.mts.map +1 -1
  129. package/resources/messaging-profiles/messaging-profiles.d.ts +34 -1
  130. package/resources/messaging-profiles/messaging-profiles.d.ts.map +1 -1
  131. package/resources/messaging-profiles/messaging-profiles.js.map +1 -1
  132. package/resources/messaging-profiles/messaging-profiles.mjs.map +1 -1
  133. package/resources/uac-connections/uac-connections.d.mts +9 -2
  134. package/resources/uac-connections/uac-connections.d.mts.map +1 -1
  135. package/resources/uac-connections/uac-connections.d.ts +9 -2
  136. package/resources/uac-connections/uac-connections.d.ts.map +1 -1
  137. package/resources/uac-connections/uac-connections.js.map +1 -1
  138. package/resources/uac-connections/uac-connections.mjs.map +1 -1
  139. package/resources/webhooks.d.mts +129 -3
  140. package/resources/webhooks.d.mts.map +1 -1
  141. package/resources/webhooks.d.ts +129 -3
  142. package/resources/webhooks.d.ts.map +1 -1
  143. package/resources/whatsapp/business-accounts/phone-numbers.d.mts +33 -0
  144. package/resources/whatsapp/business-accounts/phone-numbers.d.mts.map +1 -1
  145. package/resources/whatsapp/business-accounts/phone-numbers.d.ts +33 -0
  146. package/resources/whatsapp/business-accounts/phone-numbers.d.ts.map +1 -1
  147. package/resources/whatsapp/index.d.mts +1 -1
  148. package/resources/whatsapp/index.d.mts.map +1 -1
  149. package/resources/whatsapp/index.d.ts +1 -1
  150. package/resources/whatsapp/index.d.ts.map +1 -1
  151. package/resources/whatsapp/index.js.map +1 -1
  152. package/resources/whatsapp/index.mjs.map +1 -1
  153. package/resources/whatsapp/phone-numbers/index.d.mts +1 -1
  154. package/resources/whatsapp/phone-numbers/index.d.mts.map +1 -1
  155. package/resources/whatsapp/phone-numbers/index.d.ts +1 -1
  156. package/resources/whatsapp/phone-numbers/index.d.ts.map +1 -1
  157. package/resources/whatsapp/phone-numbers/index.js.map +1 -1
  158. package/resources/whatsapp/phone-numbers/index.mjs.map +1 -1
  159. package/resources/whatsapp/phone-numbers/phone-numbers.d.mts +147 -1
  160. package/resources/whatsapp/phone-numbers/phone-numbers.d.mts.map +1 -1
  161. package/resources/whatsapp/phone-numbers/phone-numbers.d.ts +147 -1
  162. package/resources/whatsapp/phone-numbers/phone-numbers.d.ts.map +1 -1
  163. package/resources/whatsapp/phone-numbers/phone-numbers.js +16 -0
  164. package/resources/whatsapp/phone-numbers/phone-numbers.js.map +1 -1
  165. package/resources/whatsapp/phone-numbers/phone-numbers.mjs +16 -0
  166. package/resources/whatsapp/phone-numbers/phone-numbers.mjs.map +1 -1
  167. package/resources/whatsapp/whatsapp.d.mts +2 -2
  168. package/resources/whatsapp/whatsapp.d.mts.map +1 -1
  169. package/resources/whatsapp/whatsapp.d.ts +2 -2
  170. package/resources/whatsapp/whatsapp.d.ts.map +1 -1
  171. package/resources/whatsapp/whatsapp.js.map +1 -1
  172. package/resources/whatsapp/whatsapp.mjs.map +1 -1
  173. package/resources/x402/credit-account/credit-account.d.mts +226 -0
  174. package/resources/x402/credit-account/credit-account.d.mts.map +1 -0
  175. package/resources/x402/credit-account/credit-account.d.ts +226 -0
  176. package/resources/x402/credit-account/credit-account.d.ts.map +1 -0
  177. package/resources/x402/credit-account/credit-account.js +66 -0
  178. package/resources/x402/credit-account/credit-account.js.map +1 -0
  179. package/resources/x402/credit-account/credit-account.mjs +61 -0
  180. package/resources/x402/credit-account/credit-account.mjs.map +1 -0
  181. package/resources/x402/credit-account/index.d.mts +3 -0
  182. package/resources/x402/credit-account/index.d.mts.map +1 -0
  183. package/resources/x402/credit-account/index.d.ts +3 -0
  184. package/resources/x402/credit-account/index.d.ts.map +1 -0
  185. package/resources/x402/credit-account/index.js +9 -0
  186. package/resources/x402/credit-account/index.js.map +1 -0
  187. package/resources/x402/credit-account/index.mjs +4 -0
  188. package/resources/x402/credit-account/index.mjs.map +1 -0
  189. package/resources/x402/credit-account/payments.d.mts +90 -0
  190. package/resources/x402/credit-account/payments.d.mts.map +1 -0
  191. package/resources/x402/credit-account/payments.d.ts +90 -0
  192. package/resources/x402/credit-account/payments.d.ts.map +1 -0
  193. package/resources/x402/credit-account/payments.js +47 -0
  194. package/resources/x402/credit-account/payments.js.map +1 -0
  195. package/resources/x402/credit-account/payments.mjs +43 -0
  196. package/resources/x402/credit-account/payments.mjs.map +1 -0
  197. package/resources/x402/credit-account.d.mts +1 -221
  198. package/resources/x402/credit-account.d.mts.map +1 -1
  199. package/resources/x402/credit-account.d.ts +1 -221
  200. package/resources/x402/credit-account.d.ts.map +1 -1
  201. package/resources/x402/credit-account.js +2 -54
  202. package/resources/x402/credit-account.js.map +1 -1
  203. package/resources/x402/credit-account.mjs +1 -52
  204. package/resources/x402/credit-account.mjs.map +1 -1
  205. package/resources/x402/index.d.mts +1 -1
  206. package/resources/x402/index.d.mts.map +1 -1
  207. package/resources/x402/index.d.ts +1 -1
  208. package/resources/x402/index.d.ts.map +1 -1
  209. package/resources/x402/index.js +2 -2
  210. package/resources/x402/index.js.map +1 -1
  211. package/resources/x402/index.mjs +1 -1
  212. package/resources/x402/index.mjs.map +1 -1
  213. package/resources/x402/x402.d.mts +2 -2
  214. package/resources/x402/x402.d.mts.map +1 -1
  215. package/resources/x402/x402.d.ts +2 -2
  216. package/resources/x402/x402.d.ts.map +1 -1
  217. package/resources/x402/x402.js +2 -2
  218. package/resources/x402/x402.js.map +1 -1
  219. package/resources/x402/x402.mjs +2 -2
  220. package/resources/x402/x402.mjs.map +1 -1
  221. package/src/client.ts +11 -0
  222. package/src/resources/ai/ai.ts +2 -0
  223. package/src/resources/ai/assistants/assistants.ts +173 -0
  224. package/src/resources/ai/assistants/index.ts +1 -0
  225. package/src/resources/ai/assistants/versions.ts +27 -0
  226. package/src/resources/ai/chat.ts +69 -23
  227. package/src/resources/ai/index.ts +1 -0
  228. package/src/resources/ai/openai/chat.ts +69 -23
  229. package/src/resources/compute/compute.ts +37 -0
  230. package/src/resources/compute/funcs.ts +298 -0
  231. package/src/resources/compute/index.ts +15 -0
  232. package/src/resources/compute.ts +3 -0
  233. package/src/resources/credential-connections/credential-connections.ts +4 -1
  234. package/src/resources/email-inboxes/drafts.ts +8 -0
  235. package/src/resources/email-messages/email-messages.ts +7 -2
  236. package/src/resources/fqdn-connections/fqdn-authentication.ts +4 -1
  237. package/src/resources/fqdn-connections/fqdn-connections.ts +4 -1
  238. package/src/resources/index.ts +4 -0
  239. package/src/resources/messages/messages.ts +89 -6
  240. package/src/resources/messaging-profiles/index.ts +1 -0
  241. package/src/resources/messaging-profiles/messaging-profiles.ts +39 -0
  242. package/src/resources/uac-connections/uac-connections.ts +9 -2
  243. package/src/resources/webhooks.ts +177 -2
  244. package/src/resources/whatsapp/business-accounts/phone-numbers.ts +52 -0
  245. package/src/resources/whatsapp/index.ts +1 -0
  246. package/src/resources/whatsapp/phone-numbers/index.ts +1 -0
  247. package/src/resources/whatsapp/phone-numbers/phone-numbers.ts +222 -0
  248. package/src/resources/whatsapp/whatsapp.ts +2 -0
  249. package/src/resources/x402/credit-account/credit-account.ts +312 -0
  250. package/src/resources/x402/credit-account/index.ts +16 -0
  251. package/src/resources/x402/credit-account/payments.ts +126 -0
  252. package/src/resources/x402/credit-account.ts +1 -290
  253. package/src/resources/x402/index.ts +1 -1
  254. package/src/resources/x402/x402.ts +2 -2
  255. package/src/version.ts +1 -1
  256. package/version.d.mts +1 -1
  257. package/version.d.ts +1 -1
  258. package/version.js +1 -1
  259. 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
  */
@@ -158,10 +142,15 @@ export interface ChatCreateCompletionParams {
158
142
  region?: 'USA' | 'EU' | 'AUS' | 'UAE';
159
143
 
160
144
  /**
161
- * Use this is you want to guarantee a JSON output without defining a schema. For
162
- * control over the schema, use `guided_json`.
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.
163
149
  */
164
- response_format?: ChatCreateCompletionParams.ResponseFormat;
150
+ response_format?:
151
+ | ChatCreateCompletionParams.ResponseFormatText
152
+ | ChatCreateCompletionParams.ResponseFormatJsonObject
153
+ | ChatCreateCompletionParams.ResponseFormatJsonSchemaParam;
165
154
 
166
155
  /**
167
156
  * If specified, the system will make a best effort to sample deterministically,
@@ -245,11 +234,68 @@ export namespace ChatCreateCompletionParams {
245
234
  }
246
235
 
247
236
  /**
248
- * Use this is you want to guarantee a JSON output without defining a schema. For
249
- * control over the schema, use `guided_json`.
237
+ * Plain text output.
238
+ */
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`.
250
253
  */
251
- export interface ResponseFormat {
252
- type: 'text' | 'json_object';
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
+ }
253
299
  }
254
300
 
255
301
  export interface Function {
@@ -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,
@@ -774,6 +775,7 @@ export {
774
775
  MessagingProfiles,
775
776
  type MessagingMessagingProfile,
776
777
  type MessagingProfile,
778
+ type MessagingProfileFeatures,
777
779
  type NumberPoolSettings,
778
780
  type URLShortenerSettings,
779
781
  type MessagingProfileCreateResponse,
@@ -1623,6 +1625,8 @@ export {
1623
1625
  type OutboundMessage,
1624
1626
  type ReplacedLinkClick,
1625
1627
  type Transcription,
1628
+ type WhatsappAccountUpdate,
1629
+ type WhatsappMessageEcho,
1626
1630
  type CallAIGatherEndedWebhookEvent,
1627
1631
  type CallAIGatherMessageHistoryUpdatedWebhookEvent,
1628
1632
  type CallAIGatherPartialResultsWebhookEvent,