telnyx 7.7.0 → 7.9.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 (255) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/client.d.mts +9 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +9 -6
  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 +9 -38
  12. package/resources/ai/ai.d.mts.map +1 -1
  13. package/resources/ai/ai.d.ts +9 -38
  14. package/resources/ai/ai.d.ts.map +1 -1
  15. package/resources/ai/ai.js +4 -30
  16. package/resources/ai/ai.js.map +1 -1
  17. package/resources/ai/ai.mjs +5 -31
  18. package/resources/ai/ai.mjs.map +1 -1
  19. package/resources/ai/anthropic/anthropic.d.mts +10 -0
  20. package/resources/ai/anthropic/anthropic.d.mts.map +1 -0
  21. package/resources/ai/anthropic/anthropic.d.ts +10 -0
  22. package/resources/ai/anthropic/anthropic.d.ts.map +1 -0
  23. package/resources/ai/anthropic/anthropic.js +17 -0
  24. package/resources/ai/anthropic/anthropic.js.map +1 -0
  25. package/resources/ai/anthropic/anthropic.mjs +12 -0
  26. package/resources/ai/anthropic/anthropic.mjs.map +1 -0
  27. package/resources/ai/anthropic/index.d.mts +3 -0
  28. package/resources/ai/anthropic/index.d.mts.map +1 -0
  29. package/resources/ai/anthropic/index.d.ts +3 -0
  30. package/resources/ai/anthropic/index.d.ts.map +1 -0
  31. package/resources/ai/anthropic/index.js +9 -0
  32. package/resources/ai/anthropic/index.js.map +1 -0
  33. package/resources/ai/anthropic/index.mjs +4 -0
  34. package/resources/ai/anthropic/index.mjs.map +1 -0
  35. package/resources/ai/anthropic/v1.d.mts +148 -0
  36. package/resources/ai/anthropic/v1.d.mts.map +1 -0
  37. package/resources/ai/anthropic/v1.d.ts +148 -0
  38. package/resources/ai/anthropic/v1.d.ts.map +1 -0
  39. package/resources/ai/anthropic/v1.js +35 -0
  40. package/resources/ai/anthropic/v1.js.map +1 -0
  41. package/resources/ai/anthropic/v1.mjs +31 -0
  42. package/resources/ai/anthropic/v1.mjs.map +1 -0
  43. package/resources/ai/anthropic.d.mts +2 -0
  44. package/resources/ai/anthropic.d.mts.map +1 -0
  45. package/resources/ai/anthropic.d.ts +2 -0
  46. package/resources/ai/anthropic.d.ts.map +1 -0
  47. package/resources/ai/anthropic.js +6 -0
  48. package/resources/ai/anthropic.js.map +1 -0
  49. package/resources/ai/anthropic.mjs +3 -0
  50. package/resources/ai/anthropic.mjs.map +1 -0
  51. package/resources/ai/assistants/assistants.d.mts +58 -5
  52. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  53. package/resources/ai/assistants/assistants.d.ts +58 -5
  54. package/resources/ai/assistants/assistants.d.ts.map +1 -1
  55. package/resources/ai/assistants/assistants.js +2 -2
  56. package/resources/ai/assistants/assistants.js.map +1 -1
  57. package/resources/ai/assistants/assistants.mjs +2 -2
  58. package/resources/ai/assistants/assistants.mjs.map +1 -1
  59. package/resources/ai/chat.d.mts +1 -188
  60. package/resources/ai/chat.d.mts.map +1 -1
  61. package/resources/ai/chat.d.ts +1 -188
  62. package/resources/ai/chat.d.ts.map +1 -1
  63. package/resources/ai/chat.js +0 -14
  64. package/resources/ai/chat.js.map +1 -1
  65. package/resources/ai/chat.mjs +0 -14
  66. package/resources/ai/chat.mjs.map +1 -1
  67. package/resources/ai/conversations/conversation-insights.d.mts +105 -0
  68. package/resources/ai/conversations/conversation-insights.d.mts.map +1 -0
  69. package/resources/ai/conversations/conversation-insights.d.ts +105 -0
  70. package/resources/ai/conversations/conversation-insights.d.ts.map +1 -0
  71. package/resources/ai/conversations/conversation-insights.js +24 -0
  72. package/resources/ai/conversations/conversation-insights.js.map +1 -0
  73. package/resources/ai/conversations/conversation-insights.mjs +20 -0
  74. package/resources/ai/conversations/conversation-insights.mjs.map +1 -0
  75. package/resources/ai/conversations/conversations.d.mts +4 -0
  76. package/resources/ai/conversations/conversations.d.mts.map +1 -1
  77. package/resources/ai/conversations/conversations.d.ts +4 -0
  78. package/resources/ai/conversations/conversations.d.ts.map +1 -1
  79. package/resources/ai/conversations/conversations.js +4 -0
  80. package/resources/ai/conversations/conversations.js.map +1 -1
  81. package/resources/ai/conversations/conversations.mjs +4 -0
  82. package/resources/ai/conversations/conversations.mjs.map +1 -1
  83. package/resources/ai/conversations/index.d.mts +1 -0
  84. package/resources/ai/conversations/index.d.mts.map +1 -1
  85. package/resources/ai/conversations/index.d.ts +1 -0
  86. package/resources/ai/conversations/index.d.ts.map +1 -1
  87. package/resources/ai/conversations/index.js +3 -1
  88. package/resources/ai/conversations/index.js.map +1 -1
  89. package/resources/ai/conversations/index.mjs +1 -0
  90. package/resources/ai/conversations/index.mjs.map +1 -1
  91. package/resources/ai/index.d.mts +4 -3
  92. package/resources/ai/index.d.mts.map +1 -1
  93. package/resources/ai/index.d.ts +4 -3
  94. package/resources/ai/index.d.ts.map +1 -1
  95. package/resources/ai/index.js +17 -15
  96. package/resources/ai/index.js.map +1 -1
  97. package/resources/ai/index.mjs +2 -1
  98. package/resources/ai/index.mjs.map +1 -1
  99. package/resources/ai/tools.d.mts +28 -1
  100. package/resources/ai/tools.d.mts.map +1 -1
  101. package/resources/ai/tools.d.ts +28 -1
  102. package/resources/ai/tools.d.ts.map +1 -1
  103. package/resources/calls/actions.d.mts +31 -5
  104. package/resources/calls/actions.d.mts.map +1 -1
  105. package/resources/calls/actions.d.ts +31 -5
  106. package/resources/calls/actions.d.ts.map +1 -1
  107. package/resources/calls/calls.d.mts +11 -0
  108. package/resources/calls/calls.d.mts.map +1 -1
  109. package/resources/calls/calls.d.ts +11 -0
  110. package/resources/calls/calls.d.ts.map +1 -1
  111. package/resources/calls/calls.js.map +1 -1
  112. package/resources/calls/calls.mjs.map +1 -1
  113. package/resources/conferences/actions.d.mts +6 -0
  114. package/resources/conferences/actions.d.mts.map +1 -1
  115. package/resources/conferences/actions.d.ts +6 -0
  116. package/resources/conferences/actions.d.ts.map +1 -1
  117. package/resources/index.d.mts +3 -3
  118. package/resources/index.d.mts.map +1 -1
  119. package/resources/index.d.ts +3 -3
  120. package/resources/index.d.ts.map +1 -1
  121. package/resources/index.js.map +1 -1
  122. package/resources/index.mjs.map +1 -1
  123. package/resources/managed-accounts/managed-accounts.d.mts +11 -2
  124. package/resources/managed-accounts/managed-accounts.d.mts.map +1 -1
  125. package/resources/managed-accounts/managed-accounts.d.ts +11 -2
  126. package/resources/managed-accounts/managed-accounts.d.ts.map +1 -1
  127. package/resources/managed-accounts/managed-accounts.js.map +1 -1
  128. package/resources/managed-accounts/managed-accounts.mjs.map +1 -1
  129. package/resources/messages/index.d.mts +1 -1
  130. package/resources/messages/index.d.mts.map +1 -1
  131. package/resources/messages/index.d.ts +1 -1
  132. package/resources/messages/index.d.ts.map +1 -1
  133. package/resources/messages/index.js.map +1 -1
  134. package/resources/messages/index.mjs.map +1 -1
  135. package/resources/messages/messages.d.mts +4 -82
  136. package/resources/messages/messages.d.mts.map +1 -1
  137. package/resources/messages/messages.d.ts +4 -82
  138. package/resources/messages/messages.d.ts.map +1 -1
  139. package/resources/messages/messages.js +3 -15
  140. package/resources/messages/messages.js.map +1 -1
  141. package/resources/messages/messages.mjs +3 -15
  142. package/resources/messages/messages.mjs.map +1 -1
  143. package/resources/phone-numbers/phone-numbers.d.mts +21 -0
  144. package/resources/phone-numbers/phone-numbers.d.mts.map +1 -1
  145. package/resources/phone-numbers/phone-numbers.d.ts +21 -0
  146. package/resources/phone-numbers/phone-numbers.d.ts.map +1 -1
  147. package/resources/phone-numbers/phone-numbers.js.map +1 -1
  148. package/resources/phone-numbers/phone-numbers.mjs.map +1 -1
  149. package/resources/requirements.d.mts +28 -3
  150. package/resources/requirements.d.mts.map +1 -1
  151. package/resources/requirements.d.ts +28 -3
  152. package/resources/requirements.d.ts.map +1 -1
  153. package/resources/requirements.js +2 -2
  154. package/resources/requirements.js.map +1 -1
  155. package/resources/requirements.mjs +2 -2
  156. package/resources/requirements.mjs.map +1 -1
  157. package/resources/speech-to-text/speech-to-text.d.mts +1 -1
  158. package/resources/speech-to-text/speech-to-text.d.mts.map +1 -1
  159. package/resources/speech-to-text/speech-to-text.d.ts +1 -1
  160. package/resources/speech-to-text/speech-to-text.d.ts.map +1 -1
  161. package/resources/storage/cloudfs/actions.d.mts +43 -0
  162. package/resources/storage/cloudfs/actions.d.mts.map +1 -0
  163. package/resources/storage/cloudfs/actions.d.ts +43 -0
  164. package/resources/storage/cloudfs/actions.d.ts.map +1 -0
  165. package/resources/storage/cloudfs/actions.js +39 -0
  166. package/resources/storage/cloudfs/actions.js.map +1 -0
  167. package/resources/storage/cloudfs/actions.mjs +35 -0
  168. package/resources/storage/cloudfs/actions.mjs.map +1 -0
  169. package/resources/storage/cloudfs/cloudfs.d.mts +345 -0
  170. package/resources/storage/cloudfs/cloudfs.d.mts.map +1 -0
  171. package/resources/storage/cloudfs/cloudfs.d.ts +345 -0
  172. package/resources/storage/cloudfs/cloudfs.d.ts.map +1 -0
  173. package/resources/storage/cloudfs/cloudfs.js +116 -0
  174. package/resources/storage/cloudfs/cloudfs.js.map +1 -0
  175. package/resources/storage/cloudfs/cloudfs.mjs +111 -0
  176. package/resources/storage/cloudfs/cloudfs.mjs.map +1 -0
  177. package/resources/storage/cloudfs/index.d.mts +3 -0
  178. package/resources/storage/cloudfs/index.d.mts.map +1 -0
  179. package/resources/storage/cloudfs/index.d.ts +3 -0
  180. package/resources/storage/cloudfs/index.d.ts.map +1 -0
  181. package/resources/storage/cloudfs/index.js +9 -0
  182. package/resources/storage/cloudfs/index.js.map +1 -0
  183. package/resources/storage/cloudfs/index.mjs +4 -0
  184. package/resources/storage/cloudfs/index.mjs.map +1 -0
  185. package/resources/storage/cloudfs.d.mts +2 -0
  186. package/resources/storage/cloudfs.d.mts.map +1 -0
  187. package/resources/storage/cloudfs.d.ts +2 -0
  188. package/resources/storage/cloudfs.d.ts.map +1 -0
  189. package/resources/storage/cloudfs.js +6 -0
  190. package/resources/storage/cloudfs.js.map +1 -0
  191. package/resources/storage/cloudfs.mjs +3 -0
  192. package/resources/storage/cloudfs.mjs.map +1 -0
  193. package/resources/storage/index.d.mts +1 -0
  194. package/resources/storage/index.d.mts.map +1 -1
  195. package/resources/storage/index.d.ts +1 -0
  196. package/resources/storage/index.d.ts.map +1 -1
  197. package/resources/storage/index.js +7 -5
  198. package/resources/storage/index.js.map +1 -1
  199. package/resources/storage/index.mjs +1 -0
  200. package/resources/storage/index.mjs.map +1 -1
  201. package/resources/storage/storage.d.mts +4 -0
  202. package/resources/storage/storage.d.mts.map +1 -1
  203. package/resources/storage/storage.d.ts +4 -0
  204. package/resources/storage/storage.d.ts.map +1 -1
  205. package/resources/storage/storage.js +4 -0
  206. package/resources/storage/storage.js.map +1 -1
  207. package/resources/storage/storage.mjs +4 -0
  208. package/resources/storage/storage.mjs.map +1 -1
  209. package/resources/text-to-speech/text-to-speech.d.mts +16 -11
  210. package/resources/text-to-speech/text-to-speech.d.mts.map +1 -1
  211. package/resources/text-to-speech/text-to-speech.d.ts +16 -11
  212. package/resources/text-to-speech/text-to-speech.d.ts.map +1 -1
  213. package/resources/verify-profiles.d.mts +3 -3
  214. package/resources/verify-profiles.d.ts +3 -3
  215. package/resources/webhooks.d.mts +125 -19
  216. package/resources/webhooks.d.mts.map +1 -1
  217. package/resources/webhooks.d.ts +125 -19
  218. package/resources/webhooks.d.ts.map +1 -1
  219. package/src/client.ts +5 -8
  220. package/src/resources/ai/ai.ts +10 -57
  221. package/src/resources/ai/anthropic/anthropic.ts +19 -0
  222. package/src/resources/ai/anthropic/index.ts +4 -0
  223. package/src/resources/ai/anthropic/v1.ts +157 -0
  224. package/src/resources/ai/anthropic.ts +3 -0
  225. package/src/resources/ai/assistants/assistants.ts +68 -5
  226. package/src/resources/ai/chat.ts +2 -234
  227. package/src/resources/ai/conversations/conversation-insights.ts +125 -0
  228. package/src/resources/ai/conversations/conversations.ts +15 -0
  229. package/src/resources/ai/conversations/index.ts +5 -0
  230. package/src/resources/ai/index.ts +3 -9
  231. package/src/resources/ai/tools.ts +32 -0
  232. package/src/resources/calls/actions.ts +31 -5
  233. package/src/resources/calls/calls.ts +12 -0
  234. package/src/resources/conferences/actions.ts +6 -0
  235. package/src/resources/index.ts +1 -4
  236. package/src/resources/managed-accounts/managed-accounts.ts +13 -2
  237. package/src/resources/messages/index.ts +0 -2
  238. package/src/resources/messages/messages.ts +3 -112
  239. package/src/resources/phone-numbers/phone-numbers.ts +24 -0
  240. package/src/resources/requirements.ts +38 -3
  241. package/src/resources/speech-to-text/speech-to-text.ts +1 -1
  242. package/src/resources/storage/cloudfs/actions.ts +59 -0
  243. package/src/resources/storage/cloudfs/cloudfs.ts +446 -0
  244. package/src/resources/storage/cloudfs/index.ts +13 -0
  245. package/src/resources/storage/cloudfs.ts +3 -0
  246. package/src/resources/storage/index.ts +10 -0
  247. package/src/resources/storage/storage.ts +24 -0
  248. package/src/resources/text-to-speech/text-to-speech.ts +16 -11
  249. package/src/resources/verify-profiles.ts +3 -3
  250. package/src/resources/webhooks.ts +152 -11
  251. package/src/version.ts +1 -1
  252. package/version.d.mts +1 -1
  253. package/version.d.ts +1 -1
  254. package/version.js +1 -1
  255. package/version.mjs +1 -1
@@ -0,0 +1,59 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import * as CloudfsAPI from './cloudfs';
5
+ import { APIPromise } from '../../../core/api-promise';
6
+ import { buildHeaders } from '../../../internal/headers';
7
+ import { RequestOptions } from '../../../internal/request-options';
8
+ import { path } from '../../../internal/utils/path';
9
+
10
+ /**
11
+ * Manage CloudFS filesystems — JuiceFS-compatible filesystems backed by Telnyx Cloud Storage
12
+ */
13
+ export class Actions extends APIResource {
14
+ /**
15
+ * Issues a new metadata access token for the filesystem and returns the full
16
+ * filesystem, including the new `meta_token` and credential-bearing `meta_url`.
17
+ * The previous token stops authenticating immediately; the metadata database and
18
+ * S3 bucket are unchanged. The request takes no body. Allowed while the filesystem
19
+ * is `ready` or `needs_format`; otherwise returns a `409`. Retrying with the same
20
+ * `Idempotency-Key` within 24 hours replays the original response — including the
21
+ * same token — instead of rotating again.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * const cloudfsFilesystemResponseWrapper =
26
+ * await client.storage.cloudfs.actions.rotateMetaToken(
27
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
28
+ * { 'Idempotency-Key': 'Idempotency-Key' },
29
+ * );
30
+ * ```
31
+ */
32
+ rotateMetaToken(
33
+ id: string,
34
+ params: ActionRotateMetaTokenParams,
35
+ options?: RequestOptions,
36
+ ): APIPromise<CloudfsAPI.CloudfsFilesystemResponseWrapper> {
37
+ const { 'Idempotency-Key': idempotencyKey } = params;
38
+ return this._client.post(path`/storage/cloudfs/${id}/actions/rotate-meta-token`, {
39
+ ...options,
40
+ headers: buildHeaders([{ 'Idempotency-Key': idempotencyKey }, options?.headers]),
41
+ });
42
+ }
43
+ }
44
+
45
+ export interface ActionRotateMetaTokenParams {
46
+ /**
47
+ * Unique key that makes the request idempotent (1-255 characters: letters,
48
+ * numbers, `_`, and `-`). Retrying with the same key within 24 hours replays the
49
+ * original response (marked with an `Idempotent-Replayed: true` header) instead of
50
+ * repeating the action. Reusing a key with a different request returns a `422`;
51
+ * sending a key while the original request is still being processed returns a
52
+ * `409`.
53
+ */
54
+ 'Idempotency-Key': string;
55
+ }
56
+
57
+ export declare namespace Actions {
58
+ export { type ActionRotateMetaTokenParams as ActionRotateMetaTokenParams };
59
+ }
@@ -0,0 +1,446 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import * as CloudfsAPI from './cloudfs';
5
+ import * as ActionsAPI from './actions';
6
+ import { ActionRotateMetaTokenParams, Actions } from './actions';
7
+ import { APIPromise } from '../../../core/api-promise';
8
+ import { buildHeaders } from '../../../internal/headers';
9
+ import { RequestOptions } from '../../../internal/request-options';
10
+ import { path } from '../../../internal/utils/path';
11
+
12
+ /**
13
+ * Manage CloudFS filesystems — JuiceFS-compatible filesystems backed by Telnyx Cloud Storage
14
+ */
15
+ export class Cloudfs extends APIResource {
16
+ actions: ActionsAPI.Actions = new ActionsAPI.Actions(this._client);
17
+
18
+ /**
19
+ * Lists the CloudFS filesystems for the authenticated user's organization. Results
20
+ * use cursor-based pagination: fetch the next page by passing `meta.cursors.after`
21
+ * as `page[after]`, or follow the `meta.next` URL.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * const cloudfs = await client.storage.cloudfs.list();
26
+ * ```
27
+ */
28
+ list(
29
+ query: CloudfListParams | null | undefined = {},
30
+ options?: RequestOptions,
31
+ ): APIPromise<CloudfListResponse> {
32
+ return this._client.get('/storage/cloudfs', { query, ...options });
33
+ }
34
+
35
+ /**
36
+ * Creates a CloudFS filesystem. Provisioning is synchronous — typically a few
37
+ * seconds, up to a few minutes — and the filesystem is returned with status
38
+ * `ready`, together with its S3 bucket and metadata connection details. This
39
+ * response is the only time the filesystem's `meta_token` — and the
40
+ * credential-bearing `meta_url` — are returned; store them securely. If the token
41
+ * is lost, issue a new one with the rotate-meta-token action. Names are unique
42
+ * within your organization: creating with an existing name returns a `422`.
43
+ * Requests are idempotent: retrying with the same `Idempotency-Key` within 24
44
+ * hours replays the original response instead of creating another filesystem.
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * const cloudfsFilesystemResponseWrapper =
49
+ * await client.storage.cloudfs.create({
50
+ * name: 'agent-fs',
51
+ * region: 'us-east-1',
52
+ * 'Idempotency-Key': 'Idempotency-Key',
53
+ * });
54
+ * ```
55
+ */
56
+ create(params: CloudfCreateParams, options?: RequestOptions): APIPromise<CloudfsFilesystemResponseWrapper> {
57
+ const { 'Idempotency-Key': idempotencyKey, ...body } = params;
58
+ return this._client.post('/storage/cloudfs', {
59
+ body,
60
+ ...options,
61
+ headers: buildHeaders([{ 'Idempotency-Key': idempotencyKey }, options?.headers]),
62
+ });
63
+ }
64
+
65
+ /**
66
+ * Permanently deletes a CloudFS filesystem, removing its S3 bucket and its
67
+ * metadata database. Deletion is synchronous: the response returns the
68
+ * filesystem's final state with status `deleted`. There is no restore. A
69
+ * filesystem that is still `provisioning` returns a `409`. If the filesystem still
70
+ * contains data, the request may be rejected with a `409` — drain the bucket and
71
+ * retry.
72
+ *
73
+ * @example
74
+ * ```ts
75
+ * const cloudfsFilesystemDetailResponseWrapper =
76
+ * await client.storage.cloudfs.delete(
77
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
78
+ * );
79
+ * ```
80
+ */
81
+ delete(id: string, options?: RequestOptions): APIPromise<CloudfsFilesystemDetailResponseWrapper> {
82
+ return this._client.delete(path`/storage/cloudfs/${id}`, options);
83
+ }
84
+
85
+ /**
86
+ * Retrieves a CloudFS filesystem by its ID. The returned `meta_url` omits the
87
+ * credential — the metadata token is only ever returned by create and
88
+ * rotate-meta-token. A filesystem whose last lifecycle action failed includes a
89
+ * customer-safe `error` message.
90
+ *
91
+ * @example
92
+ * ```ts
93
+ * const cloudfsFilesystemDetailResponseWrapper =
94
+ * await client.storage.cloudfs.retrieve(
95
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
96
+ * );
97
+ * ```
98
+ */
99
+ retrieve(id: string, options?: RequestOptions): APIPromise<CloudfsFilesystemDetailResponseWrapper> {
100
+ return this._client.get(path`/storage/cloudfs/${id}`, options);
101
+ }
102
+
103
+ /**
104
+ * Updates a CloudFS filesystem. Only `name` can be changed; other fields are
105
+ * immutable and unknown fields are rejected with a `400`. Renaming to a name that
106
+ * already exists in your organization returns a `422`.
107
+ *
108
+ * @example
109
+ * ```ts
110
+ * const cloudfsFilesystemDetailResponseWrapper =
111
+ * await client.storage.cloudfs.update(
112
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
113
+ * );
114
+ * ```
115
+ */
116
+ update(
117
+ id: string,
118
+ body: CloudfUpdateParams,
119
+ options?: RequestOptions,
120
+ ): APIPromise<CloudfsFilesystemDetailResponseWrapper> {
121
+ return this._client.patch(path`/storage/cloudfs/${id}`, { body, ...options });
122
+ }
123
+ }
124
+
125
+ export interface CloudfsFilesystemDetailResponseWrapper {
126
+ /**
127
+ * A CloudFS filesystem as returned by get, update, and delete. `meta_url` omits
128
+ * the credential and there is no `meta_token` field — the token is only returned
129
+ * by create and rotate-meta-token.
130
+ */
131
+ data?: CloudfsFilesystemDetailResponseWrapper.Data;
132
+ }
133
+
134
+ export namespace CloudfsFilesystemDetailResponseWrapper {
135
+ /**
136
+ * A CloudFS filesystem as returned by get, update, and delete. `meta_url` omits
137
+ * the credential and there is no `meta_token` field — the token is only returned
138
+ * by create and rotate-meta-token.
139
+ */
140
+ export interface Data {
141
+ id?: string;
142
+
143
+ created_at?: string;
144
+
145
+ /**
146
+ * Explanation of the most recent failed lifecycle action. Present only when the
147
+ * filesystem is in a `failed` state.
148
+ */
149
+ error?: string;
150
+
151
+ /**
152
+ * PostgreSQL connection URL for the filesystem's metadata database, without the
153
+ * credential. Combine it with your stored metadata token, or issue a new token
154
+ * with rotate-meta-token.
155
+ */
156
+ meta_url?: string;
157
+
158
+ name?: string;
159
+
160
+ record_type?: string;
161
+
162
+ region?: string;
163
+
164
+ /**
165
+ * Name of the bucket that stores this filesystem's data. Created during
166
+ * provisioning.
167
+ */
168
+ s3_bucket?: string;
169
+
170
+ /**
171
+ * URL of the Telnyx Cloud Storage endpoint backing this filesystem.
172
+ */
173
+ s3_endpoint?: string;
174
+
175
+ /**
176
+ * Lifecycle status of the filesystem. `ready` means it is fully provisioned and
177
+ * usable. `needs_format` means the storage bucket and metadata database were
178
+ * provisioned but the filesystem has not yet been formatted — run `juicefs format`
179
+ * with the filesystem's `meta_url` before mounting. `failed` means the last
180
+ * lifecycle action failed — see the filesystem's `error` message. `deleted`
181
+ * appears only in the delete response: deleted filesystems are excluded from list
182
+ * results and return a `404` on retrieval.
183
+ */
184
+ status?: CloudfsAPI.CloudfsFilesystemStatus;
185
+
186
+ updated_at?: string;
187
+ }
188
+ }
189
+
190
+ export interface CloudfsFilesystemResponseWrapper {
191
+ /**
192
+ * A CloudFS filesystem, including its metadata credential. This shape is returned
193
+ * only by create and rotate-meta-token.
194
+ */
195
+ data?: CloudfsFilesystemResponseWrapper.Data;
196
+ }
197
+
198
+ export namespace CloudfsFilesystemResponseWrapper {
199
+ /**
200
+ * A CloudFS filesystem, including its metadata credential. This shape is returned
201
+ * only by create and rotate-meta-token.
202
+ */
203
+ export interface Data {
204
+ id?: string;
205
+
206
+ created_at?: string;
207
+
208
+ /**
209
+ * Metadata access token, in cleartext. Returned only by create and
210
+ * rotate-meta-token and not retrievable afterwards — store it securely.
211
+ */
212
+ meta_token?: string;
213
+
214
+ /**
215
+ * PostgreSQL connection URL for the filesystem's metadata database. In create and
216
+ * rotate-meta-token responses it embeds the metadata token as the password:
217
+ * `postgres://<database>:<meta_token>@us-east-1.telnyxcloudfs.com:5432/<database>?sslmode=require`
218
+ * (the example below is shown without the credential; the actual response includes
219
+ * it). Pass it to `juicefs mount`: the storage configuration is baked in at
220
+ * provisioning, so the metadata URL is all a client needs to mount the filesystem.
221
+ */
222
+ meta_url?: string;
223
+
224
+ name?: string;
225
+
226
+ record_type?: string;
227
+
228
+ region?: string;
229
+
230
+ /**
231
+ * Name of the bucket that stores this filesystem's data. Created during
232
+ * provisioning.
233
+ */
234
+ s3_bucket?: string;
235
+
236
+ /**
237
+ * URL of the Telnyx Cloud Storage endpoint backing this filesystem.
238
+ */
239
+ s3_endpoint?: string;
240
+
241
+ /**
242
+ * Lifecycle status of the filesystem. `ready` means it is fully provisioned and
243
+ * usable. `needs_format` means the storage bucket and metadata database were
244
+ * provisioned but the filesystem has not yet been formatted — run `juicefs format`
245
+ * with the filesystem's `meta_url` before mounting. `failed` means the last
246
+ * lifecycle action failed — see the filesystem's `error` message. `deleted`
247
+ * appears only in the delete response: deleted filesystems are excluded from list
248
+ * results and return a `404` on retrieval.
249
+ */
250
+ status?: CloudfsAPI.CloudfsFilesystemStatus;
251
+
252
+ updated_at?: string;
253
+ }
254
+ }
255
+
256
+ /**
257
+ * Lifecycle status of the filesystem. `ready` means it is fully provisioned and
258
+ * usable. `needs_format` means the storage bucket and metadata database were
259
+ * provisioned but the filesystem has not yet been formatted — run `juicefs format`
260
+ * with the filesystem's `meta_url` before mounting. `failed` means the last
261
+ * lifecycle action failed — see the filesystem's `error` message. `deleted`
262
+ * appears only in the delete response: deleted filesystems are excluded from list
263
+ * results and return a `404` on retrieval.
264
+ */
265
+ export type CloudfsFilesystemStatus =
266
+ | 'provisioning'
267
+ | 'ready'
268
+ | 'needs_format'
269
+ | 'deleting'
270
+ | 'failed'
271
+ | 'deleted';
272
+
273
+ export interface CloudfListResponse {
274
+ data?: Array<CloudfListResponse.Data>;
275
+
276
+ meta?: CloudfListResponse.Meta;
277
+ }
278
+
279
+ export namespace CloudfListResponse {
280
+ /**
281
+ * A CloudFS filesystem as returned in list results. Connection details
282
+ * (`meta_url`, `meta_token`) are omitted — retrieve the filesystem by ID for its
283
+ * redacted `meta_url`.
284
+ */
285
+ export interface Data {
286
+ id?: string;
287
+
288
+ created_at?: string;
289
+
290
+ name?: string;
291
+
292
+ record_type?: string;
293
+
294
+ region?: string;
295
+
296
+ /**
297
+ * Name of the bucket that stores this filesystem's data. Created during
298
+ * provisioning.
299
+ */
300
+ s3_bucket?: string;
301
+
302
+ /**
303
+ * URL of the Telnyx Cloud Storage endpoint backing this filesystem.
304
+ */
305
+ s3_endpoint?: string;
306
+
307
+ /**
308
+ * Lifecycle status of the filesystem. `ready` means it is fully provisioned and
309
+ * usable. `needs_format` means the storage bucket and metadata database were
310
+ * provisioned but the filesystem has not yet been formatted — run `juicefs format`
311
+ * with the filesystem's `meta_url` before mounting. `failed` means the last
312
+ * lifecycle action failed — see the filesystem's `error` message. `deleted`
313
+ * appears only in the delete response: deleted filesystems are excluded from list
314
+ * results and return a `404` on retrieval.
315
+ */
316
+ status?: CloudfsAPI.CloudfsFilesystemStatus;
317
+
318
+ updated_at?: string;
319
+ }
320
+
321
+ export interface Meta {
322
+ /**
323
+ * Opaque cursors for the adjacent pages. Empty when there are no adjacent pages.
324
+ */
325
+ cursors?: Meta.Cursors;
326
+
327
+ /**
328
+ * Relative URL (path and query) of the next page. Omitted when there are no
329
+ * further results.
330
+ */
331
+ next?: string;
332
+
333
+ /**
334
+ * Relative URL (path and query) of the previous page. Omitted on the first page.
335
+ */
336
+ previous?: string;
337
+ }
338
+
339
+ export namespace Meta {
340
+ /**
341
+ * Opaque cursors for the adjacent pages. Empty when there are no adjacent pages.
342
+ */
343
+ export interface Cursors {
344
+ /**
345
+ * Cursor for the next page; pass it as `page[after]`. Omitted on the last page.
346
+ */
347
+ after?: string;
348
+
349
+ /**
350
+ * Cursor for the previous page; pass it as `page[before]`. Omitted on the first
351
+ * page.
352
+ */
353
+ before?: string;
354
+ }
355
+ }
356
+ }
357
+
358
+ export interface CloudfListParams {
359
+ /**
360
+ * Return only the filesystem whose name matches exactly.
361
+ */
362
+ 'filter[name]'?: string;
363
+
364
+ /**
365
+ * Return only filesystems in this region.
366
+ */
367
+ 'filter[region]'?: string;
368
+
369
+ /**
370
+ * Return only filesystems with this status. Unrecognized values are ignored.
371
+ */
372
+ 'filter[status]'?: 'provisioning' | 'ready' | 'needs_format' | 'deleting' | 'failed';
373
+
374
+ /**
375
+ * Opaque cursor from a previous response's `meta.cursors.after`; returns the page
376
+ * after it. Mutually exclusive with `page[before]`.
377
+ */
378
+ 'page[after]'?: string;
379
+
380
+ /**
381
+ * Opaque cursor from a previous response's `meta.cursors.before`; returns the page
382
+ * before it. Mutually exclusive with `page[after]`.
383
+ */
384
+ 'page[before]'?: string;
385
+
386
+ /**
387
+ * The number of filesystems to return per page. Values above 250 are treated
388
+ * as 250.
389
+ */
390
+ 'page[limit]'?: number;
391
+
392
+ /**
393
+ * Sort order for the results: a field name for ascending, or the field name
394
+ * prefixed with `-` for descending.
395
+ */
396
+ sort?: 'created_at' | '-created_at' | 'updated_at' | '-updated_at' | 'name' | '-name';
397
+ }
398
+
399
+ export interface CloudfCreateParams {
400
+ /**
401
+ * Body param: Filesystem name, unique within your organization. Names are trimmed
402
+ * and lowercased; after normalization they may contain lowercase letters, numbers,
403
+ * `.`, `_`, and `-` only.
404
+ */
405
+ name: string;
406
+
407
+ /**
408
+ * Body param: Region where the filesystem's storage and metadata are provisioned.
409
+ */
410
+ region: 'us-central-1' | 'us-east-1' | 'us-west-1';
411
+
412
+ /**
413
+ * Header param: Unique key that makes the request idempotent (1-255 characters:
414
+ * letters, numbers, `_`, and `-`). Retrying with the same key within 24 hours
415
+ * replays the original response (marked with an `Idempotent-Replayed: true`
416
+ * header) instead of repeating the action. Reusing a key with a different request
417
+ * returns a `422`; sending a key while the original request is still being
418
+ * processed returns a `409`.
419
+ */
420
+ 'Idempotency-Key': string;
421
+ }
422
+
423
+ export interface CloudfUpdateParams {
424
+ /**
425
+ * New filesystem name, unique within your organization. Names are trimmed and
426
+ * lowercased; after normalization they may contain lowercase letters, numbers,
427
+ * `.`, `_`, and `-` only.
428
+ */
429
+ name?: string;
430
+ }
431
+
432
+ Cloudfs.Actions = Actions;
433
+
434
+ export declare namespace Cloudfs {
435
+ export {
436
+ type CloudfsFilesystemDetailResponseWrapper as CloudfsFilesystemDetailResponseWrapper,
437
+ type CloudfsFilesystemResponseWrapper as CloudfsFilesystemResponseWrapper,
438
+ type CloudfsFilesystemStatus as CloudfsFilesystemStatus,
439
+ type CloudfListResponse as CloudfListResponse,
440
+ type CloudfListParams as CloudfListParams,
441
+ type CloudfCreateParams as CloudfCreateParams,
442
+ type CloudfUpdateParams as CloudfUpdateParams,
443
+ };
444
+
445
+ export { Actions as Actions, type ActionRotateMetaTokenParams as ActionRotateMetaTokenParams };
446
+ }
@@ -0,0 +1,13 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export { Actions, type ActionRotateMetaTokenParams } from './actions';
4
+ export {
5
+ Cloudfs,
6
+ type CloudfsFilesystemDetailResponseWrapper,
7
+ type CloudfsFilesystemResponseWrapper,
8
+ type CloudfsFilesystemStatus,
9
+ type CloudfListResponse,
10
+ type CloudfListParams,
11
+ type CloudfCreateParams,
12
+ type CloudfUpdateParams,
13
+ } from './cloudfs';
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './cloudfs/index';
@@ -5,6 +5,16 @@ export {
5
5
  type BucketCreatePresignedURLResponse,
6
6
  type BucketCreatePresignedURLParams,
7
7
  } from './buckets/index';
8
+ export {
9
+ Cloudfs,
10
+ type CloudfsFilesystemDetailResponseWrapper,
11
+ type CloudfsFilesystemResponseWrapper,
12
+ type CloudfsFilesystemStatus,
13
+ type CloudfListResponse,
14
+ type CloudfListParams,
15
+ type CloudfCreateParams,
16
+ type CloudfUpdateParams,
17
+ } from './cloudfs/index';
8
18
  export {
9
19
  Kvs,
10
20
  type KvNamespace,
@@ -14,6 +14,17 @@ import {
14
14
  import * as BucketsAPI from './buckets/buckets';
15
15
  import { BucketCreatePresignedURLParams, BucketCreatePresignedURLResponse, Buckets } from './buckets/buckets';
16
16
  import * as UsageAPI from './buckets/usage';
17
+ import * as CloudfsAPI from './cloudfs/cloudfs';
18
+ import {
19
+ CloudfCreateParams,
20
+ CloudfListParams,
21
+ CloudfListResponse,
22
+ CloudfUpdateParams,
23
+ Cloudfs,
24
+ CloudfsFilesystemDetailResponseWrapper,
25
+ CloudfsFilesystemResponseWrapper,
26
+ CloudfsFilesystemStatus,
27
+ } from './cloudfs/cloudfs';
17
28
  import * as KvsAPI from './kvs/kvs';
18
29
  import {
19
30
  KvCreateParams,
@@ -45,6 +56,7 @@ export class Storage extends APIResource {
45
56
  );
46
57
  migrations: MigrationsAPI.Migrations = new MigrationsAPI.Migrations(this._client);
47
58
  kvs: KvsAPI.Kvs = new KvsAPI.Kvs(this._client);
59
+ cloudfs: CloudfsAPI.Cloudfs = new CloudfsAPI.Cloudfs(this._client);
48
60
 
49
61
  /**
50
62
  * List Migration Source coverage
@@ -86,6 +98,7 @@ Storage.Buckets = Buckets;
86
98
  Storage.MigrationSources = MigrationSources;
87
99
  Storage.Migrations = Migrations;
88
100
  Storage.Kvs = Kvs;
101
+ Storage.Cloudfs = Cloudfs;
89
102
 
90
103
  export declare namespace Storage {
91
104
  export { type StorageListMigrationSourceCoverageResponse as StorageListMigrationSourceCoverageResponse };
@@ -123,4 +136,15 @@ export declare namespace Storage {
123
136
  type KvListParams as KvListParams,
124
137
  type KvCreateParams as KvCreateParams,
125
138
  };
139
+
140
+ export {
141
+ Cloudfs as Cloudfs,
142
+ type CloudfsFilesystemDetailResponseWrapper as CloudfsFilesystemDetailResponseWrapper,
143
+ type CloudfsFilesystemResponseWrapper as CloudfsFilesystemResponseWrapper,
144
+ type CloudfsFilesystemStatus as CloudfsFilesystemStatus,
145
+ type CloudfListResponse as CloudfListResponse,
146
+ type CloudfListParams as CloudfListParams,
147
+ type CloudfCreateParams as CloudfCreateParams,
148
+ type CloudfUpdateParams as CloudfUpdateParams,
149
+ };
126
150
  }
@@ -322,7 +322,9 @@ export interface TextToSpeechGenerateSpeechParams {
322
322
  /**
323
323
  * Telnyx provider-specific parameters. Use `voice_speed` and `temperature` for
324
324
  * `Natural` and `NaturalHD` models. For the `Ultra` model, use `voice_speed`,
325
- * `volume`, and `emotion`.
325
+ * `volume`, and `emotion`. `Bayan` and `Sukhan` don't use `temperature`, `volume`,
326
+ * or `emotion`, and don't support `voice_speed`. `Sukhan`'s `response_format` is
327
+ * restricted to `mp3` or `pcm` (no `wav`).
326
328
  */
327
329
  telnyx?: TextToSpeechGenerateSpeechParams.Telnyx;
328
330
 
@@ -339,10 +341,10 @@ export interface TextToSpeechGenerateSpeechParams {
339
341
  /**
340
342
  * Voice identifier in the format `provider.model_id.voice_id` or
341
343
  * `provider.voice_id`. Examples: `telnyx.NaturalHD.Alloy`,
342
- * `Telnyx.Ultra.<voice_id>`, `azure.en-US-AvaMultilingualNeural`,
343
- * `aws.Polly.Generative.Lucia`. When provided, `provider`, `model_id`, and
344
- * `voice_id` are extracted automatically and take precedence over individual
345
- * parameters.
344
+ * `Telnyx.Ultra.<voice_id>`, `Telnyx.Bayan.Ahmed`, `Telnyx.Sukhan.urdu-professor`,
345
+ * `azure.en-US-AvaMultilingualNeural`, `aws.Polly.Generative.Lucia`. When
346
+ * provided, `provider`, `model_id`, and `voice_id` are extracted automatically and
347
+ * take precedence over individual parameters.
346
348
  */
347
349
  voice?: string;
348
350
 
@@ -532,7 +534,9 @@ export namespace TextToSpeechGenerateSpeechParams {
532
534
  /**
533
535
  * Telnyx provider-specific parameters. Use `voice_speed` and `temperature` for
534
536
  * `Natural` and `NaturalHD` models. For the `Ultra` model, use `voice_speed`,
535
- * `volume`, and `emotion`.
537
+ * `volume`, and `emotion`. `Bayan` and `Sukhan` don't use `temperature`, `volume`,
538
+ * or `emotion`, and don't support `voice_speed`. `Sukhan`'s `response_format` is
539
+ * restricted to `mp3` or `pcm` (no `wav`).
536
540
  */
537
541
  export interface Telnyx {
538
542
  /**
@@ -557,7 +561,8 @@ export namespace TextToSpeechGenerateSpeechParams {
557
561
  temperature?: number;
558
562
 
559
563
  /**
560
- * Voice speed multiplier. Applies to all models. Range: 0.5 to 2.0.
564
+ * Voice speed multiplier. Applies to all models except `Bayan` and `Sukhan`, which
565
+ * don't support it. Range: 0.5 to 2.0.
561
566
  */
562
567
  voice_speed?: number;
563
568
 
@@ -627,10 +632,10 @@ export interface TextToSpeechRetrieveSpeechParams {
627
632
  /**
628
633
  * Voice identifier in the format `provider.model_id.voice_id` or
629
634
  * `provider.voice_id` (e.g. `telnyx.NaturalHD.Telnyx_Alloy`,
630
- * `Telnyx.Ultra.<voice_id>`, or `azure.en-US-AvaMultilingualNeural`). When
631
- * provided, the `provider`, `model_id`, and `voice_id` are extracted
632
- * automatically. Takes precedence over individual `provider`/`model_id`/`voice_id`
633
- * parameters.
635
+ * `Telnyx.Ultra.<voice_id>`, `Telnyx.Bayan.Ahmed`, `Telnyx.Sukhan.urdu-professor`,
636
+ * or `azure.en-US-AvaMultilingualNeural`). When provided, the `provider`,
637
+ * `model_id`, and `voice_id` are extracted automatically. Takes precedence over
638
+ * individual `provider`/`model_id`/`voice_id` parameters.
634
639
  */
635
640
  voice?: string;
636
641
 
@@ -324,7 +324,7 @@ export namespace VerifyProfile {
324
324
  sender_phone_number?: string | null;
325
325
 
326
326
  /**
327
- * Customer pre-approved authentication template name registered on Meta
327
+ * Customer pre-approved authentication template ID registered on Meta
328
328
  */
329
329
  template_id?: string | null;
330
330
 
@@ -533,7 +533,7 @@ export namespace VerifyProfileCreateParams {
533
533
  sender_phone_number?: string | null;
534
534
 
535
535
  /**
536
- * Customer pre-approved authentication template name registered on Meta
536
+ * Customer pre-approved authentication template ID registered on Meta
537
537
  */
538
538
  template_id?: string | null;
539
539
 
@@ -677,7 +677,7 @@ export namespace VerifyProfileUpdateParams {
677
677
  sender_phone_number?: string | null;
678
678
 
679
679
  /**
680
- * Customer pre-approved authentication template name registered on Meta
680
+ * Customer pre-approved authentication template ID registered on Meta
681
681
  */
682
682
  template_id?: string | null;
683
683