telnyx 6.40.0 → 6.41.1

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 (124) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/client.d.mts +10 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +10 -4
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/core/pagination.d.mts.map +1 -1
  9. package/core/pagination.d.ts.map +1 -1
  10. package/internal/detect-platform.js +1 -1
  11. package/internal/detect-platform.js.map +1 -1
  12. package/internal/detect-platform.mjs +1 -1
  13. package/internal/detect-platform.mjs.map +1 -1
  14. package/package.json +1 -1
  15. package/resources/ai/assistants/assistants.d.mts +2 -68
  16. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  17. package/resources/ai/assistants/assistants.d.ts +2 -68
  18. package/resources/ai/assistants/assistants.d.ts.map +1 -1
  19. package/resources/ai/assistants/assistants.js.map +1 -1
  20. package/resources/ai/assistants/assistants.mjs.map +1 -1
  21. package/resources/calls/actions.d.mts +10 -21
  22. package/resources/calls/actions.d.mts.map +1 -1
  23. package/resources/calls/actions.d.ts +10 -21
  24. package/resources/calls/actions.d.ts.map +1 -1
  25. package/resources/calls/calls.d.mts +95 -1
  26. package/resources/calls/calls.d.mts.map +1 -1
  27. package/resources/calls/calls.d.ts +95 -1
  28. package/resources/calls/calls.d.ts.map +1 -1
  29. package/resources/calls/calls.js.map +1 -1
  30. package/resources/calls/calls.mjs.map +1 -1
  31. package/resources/calls/index.d.mts +1 -1
  32. package/resources/calls/index.d.mts.map +1 -1
  33. package/resources/calls/index.d.ts +1 -1
  34. package/resources/calls/index.d.ts.map +1 -1
  35. package/resources/calls/index.js.map +1 -1
  36. package/resources/calls/index.mjs.map +1 -1
  37. package/resources/index.d.mts +2 -2
  38. package/resources/index.d.mts.map +1 -1
  39. package/resources/index.d.ts +2 -2
  40. package/resources/index.d.ts.map +1 -1
  41. package/resources/index.js.map +1 -1
  42. package/resources/index.mjs.map +1 -1
  43. package/resources/inexplicit-number-orders.d.mts.map +1 -1
  44. package/resources/inexplicit-number-orders.d.ts.map +1 -1
  45. package/resources/networks/networks.d.mts.map +1 -1
  46. package/resources/networks/networks.d.ts.map +1 -1
  47. package/resources/networks/networks.js.map +1 -1
  48. package/resources/networks/networks.mjs.map +1 -1
  49. package/resources/pronunciation-dicts.d.mts +63 -393
  50. package/resources/pronunciation-dicts.d.mts.map +1 -1
  51. package/resources/pronunciation-dicts.d.ts +63 -393
  52. package/resources/pronunciation-dicts.d.ts.map +1 -1
  53. package/resources/pronunciation-dicts.js +5 -2
  54. package/resources/pronunciation-dicts.js.map +1 -1
  55. package/resources/pronunciation-dicts.mjs +5 -2
  56. package/resources/pronunciation-dicts.mjs.map +1 -1
  57. package/resources/shared.d.mts +59 -0
  58. package/resources/shared.d.mts.map +1 -1
  59. package/resources/shared.d.ts +59 -0
  60. package/resources/shared.d.ts.map +1 -1
  61. package/resources/texml/accounts/calls/calls.d.mts +12 -10
  62. package/resources/texml/accounts/calls/calls.d.mts.map +1 -1
  63. package/resources/texml/accounts/calls/calls.d.ts +12 -10
  64. package/resources/texml/accounts/calls/calls.d.ts.map +1 -1
  65. package/resources/texml/accounts/calls/calls.js +4 -7
  66. package/resources/texml/accounts/calls/calls.js.map +1 -1
  67. package/resources/texml/accounts/calls/calls.mjs +4 -7
  68. package/resources/texml/accounts/calls/calls.mjs.map +1 -1
  69. package/resources/virtual-cross-connects.d.mts.map +1 -1
  70. package/resources/virtual-cross-connects.d.ts.map +1 -1
  71. package/resources/voice-clones.d.mts +205 -59
  72. package/resources/voice-clones.d.mts.map +1 -1
  73. package/resources/voice-clones.d.ts +205 -59
  74. package/resources/voice-clones.d.ts.map +1 -1
  75. package/resources/voice-clones.js +21 -12
  76. package/resources/voice-clones.js.map +1 -1
  77. package/resources/voice-clones.mjs +21 -12
  78. package/resources/voice-clones.mjs.map +1 -1
  79. package/resources/whatsapp/phone-numbers/profile/index.d.mts +1 -1
  80. package/resources/whatsapp/phone-numbers/profile/index.d.mts.map +1 -1
  81. package/resources/whatsapp/phone-numbers/profile/index.d.ts +1 -1
  82. package/resources/whatsapp/phone-numbers/profile/index.d.ts.map +1 -1
  83. package/resources/whatsapp/phone-numbers/profile/index.js.map +1 -1
  84. package/resources/whatsapp/phone-numbers/profile/index.mjs.map +1 -1
  85. package/resources/whatsapp/phone-numbers/profile/photo.d.mts +30 -1
  86. package/resources/whatsapp/phone-numbers/profile/photo.d.mts.map +1 -1
  87. package/resources/whatsapp/phone-numbers/profile/photo.d.ts +30 -1
  88. package/resources/whatsapp/phone-numbers/profile/photo.d.ts.map +1 -1
  89. package/resources/whatsapp/phone-numbers/profile/photo.js +14 -0
  90. package/resources/whatsapp/phone-numbers/profile/photo.js.map +1 -1
  91. package/resources/whatsapp/phone-numbers/profile/photo.mjs +14 -0
  92. package/resources/whatsapp/phone-numbers/profile/photo.mjs.map +1 -1
  93. package/resources/whatsapp/phone-numbers/profile/profile.d.mts +2 -2
  94. package/resources/whatsapp/phone-numbers/profile/profile.d.mts.map +1 -1
  95. package/resources/whatsapp/phone-numbers/profile/profile.d.ts +2 -2
  96. package/resources/whatsapp/phone-numbers/profile/profile.d.ts.map +1 -1
  97. package/resources/whatsapp/phone-numbers/profile/profile.js.map +1 -1
  98. package/resources/whatsapp/phone-numbers/profile/profile.mjs.map +1 -1
  99. package/resources/wireguard-interfaces.d.mts.map +1 -1
  100. package/resources/wireguard-interfaces.d.ts.map +1 -1
  101. package/src/client.ts +16 -4
  102. package/src/core/pagination.ts +3 -3
  103. package/src/internal/detect-platform.ts +1 -1
  104. package/src/resources/ai/assistants/assistants.ts +4 -84
  105. package/src/resources/calls/actions.ts +11 -24
  106. package/src/resources/calls/calls.ts +106 -0
  107. package/src/resources/calls/index.ts +1 -0
  108. package/src/resources/index.ts +5 -2
  109. package/src/resources/inexplicit-number-orders.ts +2 -1
  110. package/src/resources/networks/networks.ts +2 -1
  111. package/src/resources/pronunciation-dicts.ts +70 -465
  112. package/src/resources/shared.ts +73 -0
  113. package/src/resources/texml/accounts/calls/calls.ts +15 -23
  114. package/src/resources/virtual-cross-connects.ts +2 -1
  115. package/src/resources/voice-clones.ts +235 -58
  116. package/src/resources/whatsapp/phone-numbers/profile/index.ts +1 -1
  117. package/src/resources/whatsapp/phone-numbers/profile/photo.ts +41 -1
  118. package/src/resources/whatsapp/phone-numbers/profile/profile.ts +2 -1
  119. package/src/resources/wireguard-interfaces.ts +2 -1
  120. package/src/version.ts +1 -1
  121. package/version.d.mts +1 -1
  122. package/version.d.ts +1 -1
  123. package/version.js +1 -1
  124. package/version.mjs +1 -1
@@ -83,20 +83,13 @@ export class Calls extends APIResource {
83
83
  * ```ts
84
84
  * const response = await client.texml.accounts.calls.calls(
85
85
  * 'account_sid',
86
- * { Url: 'https://www.example.com/instructions.xml' },
86
+ * { params: { Url: 'https://www.example.com/texml.xml' } },
87
87
  * );
88
88
  * ```
89
89
  */
90
- calls(
91
- accountSid: string,
92
- params: CallCallsParams,
93
- options?: RequestOptions,
94
- ): APIPromise<CallCallsResponse> {
95
- const { timeout_seconds, ...body } = params;
96
- return this._client.post(path`/texml/Accounts/${accountSid}/Calls`, {
97
- body: { Timeout: timeout_seconds, ...body },
98
- ...options,
99
- });
90
+ calls(accountSid: string, args: CallCallsParams, options?: RequestOptions): APIPromise<CallCallsResponse> {
91
+ const { params } = args;
92
+ return this._client.post(path`/texml/Accounts/${accountSid}/Calls`, { body: params, ...options });
100
93
  }
101
94
 
102
95
  /**
@@ -684,12 +677,11 @@ export interface CallUpdateParams {
684
677
  Url?: string;
685
678
  }
686
679
 
687
- export type CallCallsParams =
688
- | CallCallsParams.WithURL
689
- | CallCallsParams.WithTeXml
690
- | CallCallsParams.ApplicationDefault;
680
+ export interface CallCallsParams {
681
+ params: CallCallsParams.WithURL | CallCallsParams.WithTeXml | CallCallsParams.ApplicationDefault;
682
+ }
691
683
 
692
- export declare namespace CallCallsParams {
684
+ export namespace CallCallsParams {
693
685
  export interface WithURL {
694
686
  /**
695
687
  * The URL from which Telnyx will retrieve the TeXML call instructions.
@@ -891,7 +883,7 @@ export declare namespace CallCallsParams {
891
883
  */
892
884
  SupervisingRole?: 'barge' | 'whisper' | 'monitor';
893
885
 
894
- Texml?: unknown;
886
+ Texml?: string | null;
895
887
 
896
888
  /**
897
889
  * The maximum duration of the call in seconds. The minimum value is 30 and the
@@ -904,7 +896,7 @@ export declare namespace CallCallsParams {
904
896
  * call is canceled. The minimum value is 5 and the maximum value is 120. Default
905
897
  * is 30 seconds.
906
898
  */
907
- timeout_seconds?: number;
899
+ Timeout?: number;
908
900
 
909
901
  /**
910
902
  * The phone number of the called party. Phone numbers are formatted with a `+` and
@@ -1152,7 +1144,7 @@ export declare namespace CallCallsParams {
1152
1144
  * call is canceled. The minimum value is 5 and the maximum value is 120. Default
1153
1145
  * is 30 seconds.
1154
1146
  */
1155
- timeout_seconds?: number;
1147
+ Timeout?: number;
1156
1148
 
1157
1149
  /**
1158
1150
  * The phone number of the called party. Phone numbers are formatted with a `+` and
@@ -1166,7 +1158,7 @@ export declare namespace CallCallsParams {
1166
1158
  */
1167
1159
  Trim?: 'trim-silence' | 'do-not-trim';
1168
1160
 
1169
- Url?: unknown;
1161
+ Url?: string | null;
1170
1162
 
1171
1163
  /**
1172
1164
  * HTTP request type used for `Url`. The default value is inherited from TeXML
@@ -1385,7 +1377,7 @@ export declare namespace CallCallsParams {
1385
1377
  */
1386
1378
  SupervisingRole?: 'barge' | 'whisper' | 'monitor';
1387
1379
 
1388
- Texml?: unknown;
1380
+ Texml?: string | null;
1389
1381
 
1390
1382
  /**
1391
1383
  * The maximum duration of the call in seconds. The minimum value is 30 and the
@@ -1398,7 +1390,7 @@ export declare namespace CallCallsParams {
1398
1390
  * call is canceled. The minimum value is 5 and the maximum value is 120. Default
1399
1391
  * is 30 seconds.
1400
1392
  */
1401
- timeout_seconds?: number;
1393
+ Timeout?: number;
1402
1394
 
1403
1395
  /**
1404
1396
  * The phone number of the called party. Phone numbers are formatted with a `+` and
@@ -1412,7 +1404,7 @@ export declare namespace CallCallsParams {
1412
1404
  */
1413
1405
  Trim?: 'trim-silence' | 'do-not-trim';
1414
1406
 
1415
- Url?: unknown;
1407
+ Url?: string | null;
1416
1408
 
1417
1409
  /**
1418
1410
  * HTTP request type used for `Url`. The default value is inherited from TeXML
@@ -522,7 +522,8 @@ export namespace VirtualCrossConnectUpdateResponse {
522
522
  }
523
523
 
524
524
  export interface VirtualCrossConnectListResponse
525
- extends GlobalIPAssignmentsAPI.Record, PublicInternetGatewaysAPI.NetworkInterface {
525
+ extends GlobalIPAssignmentsAPI.Record,
526
+ PublicInternetGatewaysAPI.NetworkInterface {
526
527
  /**
527
528
  * The region interface is deployed to.
528
529
  */
@@ -20,15 +20,19 @@ export class VoiceClones extends APIResource {
20
20
  * @example
21
21
  * ```ts
22
22
  * const voiceClone = await client.voiceClones.create({
23
- * gender: 'male',
24
- * language: 'en',
25
- * name: 'clone-narrator',
26
- * voice_design_id: '550e8400-e29b-41d4-a716-446655440000',
23
+ * params: {
24
+ * gender: 'male',
25
+ * language: 'en',
26
+ * name: 'clone-narrator',
27
+ * voice_design_id: '550e8400-e29b-41d4-a716-446655440000',
28
+ * provider: 'telnyx',
29
+ * },
27
30
  * });
28
31
  * ```
29
32
  */
30
- create(body: VoiceCloneCreateParams, options?: RequestOptions): APIPromise<VoiceCloneCreateResponse> {
31
- return this._client.post('/voice_clones', { body, ...options });
33
+ create(args: VoiceCloneCreateParams, options?: RequestOptions): APIPromise<VoiceCloneCreateResponse> {
34
+ const { params } = args;
35
+ return this._client.post('/voice_clones', { body: params, ...options });
32
36
  }
33
37
 
34
38
  /**
@@ -91,24 +95,29 @@ export class VoiceClones extends APIResource {
91
95
  /**
92
96
  * Creates a new voice clone by uploading an audio file directly. Supported
93
97
  * formats: WAV, MP3, FLAC, OGG, M4A. For best results, provide 5–10 seconds of
94
- * clear speech. Maximum file size: 2MB.
98
+ * clear speech. Maximum file size: 5MB for Telnyx, 20MB for Minimax.
95
99
  *
96
100
  * @example
97
101
  * ```ts
98
102
  * const response = await client.voiceClones.createFromUpload({
99
- * audio_file: fs.createReadStream('path/to/file'),
100
- * language: 'lkf-Lz1vLbBu-9uDh-9AHaOS2D-Cbf',
101
- * name: 'name',
103
+ * params: {
104
+ * audio_file: fs.createReadStream('path/to/file'),
105
+ * gender: 'male',
106
+ * language: 'lkf-Lz1vLbBu-9uDh-9AHaOS2D-Cbf',
107
+ * name: 'name',
108
+ * provider: 'telnyx',
109
+ * },
102
110
  * });
103
111
  * ```
104
112
  */
105
113
  createFromUpload(
106
- body: VoiceCloneCreateFromUploadParams,
114
+ args: VoiceCloneCreateFromUploadParams,
107
115
  options?: RequestOptions,
108
116
  ): APIPromise<VoiceCloneCreateFromUploadResponse> {
117
+ const { params } = args;
109
118
  return this._client.post(
110
119
  '/voice_clones/from_upload',
111
- multipartFormRequestOptions({ body, ...options }, this._client),
120
+ multipartFormRequestOptions({ body: params, ...options }, this._client),
112
121
  );
113
122
  }
114
123
 
@@ -166,6 +175,11 @@ export interface VoiceCloneData {
166
175
  */
167
176
  language?: string | null;
168
177
 
178
+ /**
179
+ * TTS model identifier for the voice clone.
180
+ */
181
+ model_id?: 'Qwen3TTS' | 'Ultra' | 'speech-2.8-turbo';
182
+
169
183
  /**
170
184
  * Name of the voice clone.
171
185
  */
@@ -182,8 +196,8 @@ export interface VoiceCloneData {
182
196
  provider_supported_models?: Array<string>;
183
197
 
184
198
  /**
185
- * Provider-specific voice identifier used for TTS synthesis. For Telnyx clones
186
- * this equals the clone ID; for Minimax it is the Minimax-assigned voice ID.
199
+ * Provider-specific voice identifier used for TTS synthesis. May differ from the
200
+ * clone UUID depending on the provider and model.
187
201
  */
188
202
  provider_voice_id?: string | null;
189
203
 
@@ -202,6 +216,12 @@ export interface VoiceCloneData {
202
216
  */
203
217
  source_voice_design_version?: number | null;
204
218
 
219
+ /**
220
+ * Clone status. pending for Ultra clones while on-prem import is in progress,
221
+ * active once ready, failed if verification timed out, expired if not kept alive.
222
+ */
223
+ status?: 'active' | 'pending' | 'failed' | 'expired';
224
+
205
225
  /**
206
226
  * Timestamp when the voice clone was last updated.
207
227
  */
@@ -240,29 +260,72 @@ export interface VoiceCloneCreateFromUploadResponse {
240
260
 
241
261
  export interface VoiceCloneCreateParams {
242
262
  /**
243
- * Gender of the voice clone.
263
+ * Request body for creating a voice clone from an existing voice design.
244
264
  */
245
- gender: 'male' | 'female' | 'neutral';
265
+ params: VoiceCloneCreateParams.TelnyxDesignClone | VoiceCloneCreateParams.MinimaxDesignClone;
266
+ }
246
267
 
268
+ export namespace VoiceCloneCreateParams {
247
269
  /**
248
- * ISO 639-1 language code for the clone (e.g. `en`, `fr`, `de`).
270
+ * Create a voice clone from a voice design using the Telnyx provider.
249
271
  */
250
- language: string;
272
+ export interface TelnyxDesignClone {
273
+ /**
274
+ * Gender of the voice clone.
275
+ */
276
+ gender: 'male' | 'female' | 'neutral';
251
277
 
252
- /**
253
- * Name for the voice clone.
254
- */
255
- name: string;
278
+ /**
279
+ * ISO 639-1 language code for the clone. Supports the combined Telnyx language
280
+ * set.
281
+ */
282
+ language: string;
256
283
 
257
- /**
258
- * UUID of the source voice design to clone.
259
- */
260
- voice_design_id: string;
284
+ /**
285
+ * Name for the voice clone.
286
+ */
287
+ name: string;
288
+
289
+ /**
290
+ * UUID of the source voice design to clone.
291
+ */
292
+ voice_design_id: string;
293
+
294
+ /**
295
+ * Voice synthesis provider. Defaults to `telnyx`.
296
+ */
297
+ provider?: 'telnyx' | 'minimax';
298
+ }
261
299
 
262
300
  /**
263
- * Voice synthesis provider. Case-insensitive. Defaults to `telnyx`.
301
+ * Create a voice clone from a voice design using the Minimax provider.
264
302
  */
265
- provider?: 'telnyx' | 'minimax';
303
+ export interface MinimaxDesignClone {
304
+ /**
305
+ * Gender of the voice clone.
306
+ */
307
+ gender: 'male' | 'female' | 'neutral';
308
+
309
+ /**
310
+ * ISO 639-1 language code for the clone. Supports the Minimax language set.
311
+ */
312
+ language: string;
313
+
314
+ /**
315
+ * Name for the voice clone.
316
+ */
317
+ name: string;
318
+
319
+ /**
320
+ * Voice synthesis provider. Must be `minimax`.
321
+ */
322
+ provider: 'telnyx' | 'minimax';
323
+
324
+ /**
325
+ * UUID of the source voice design to clone.
326
+ */
327
+ voice_design_id: string;
328
+ }
266
329
  }
267
330
 
268
331
  export interface VoiceCloneUpdateParams {
@@ -301,42 +364,156 @@ export interface VoiceCloneListParams extends DefaultFlatPaginationParams {
301
364
 
302
365
  export interface VoiceCloneCreateFromUploadParams {
303
366
  /**
304
- * Audio file to clone the voice from. Supported formats: WAV, MP3, FLAC, OGG, M4A.
305
- * For best quality, provide 5–10 seconds of clear, uninterrupted speech. Maximum
306
- * size: 5MB for Telnyx, 20MB for Minimax.
367
+ * Multipart form data for creating a voice clone from a direct audio upload.
368
+ * Maximum file size: 5MB for Telnyx, 20MB for Minimax.
307
369
  */
308
- audio_file: Uploadable;
309
-
310
- /**
311
- * ISO 639-1 language code (e.g. `en`, `fr`) or `auto` for automatic detection.
312
- */
313
- language: string;
314
-
315
- /**
316
- * Name for the voice clone.
317
- */
318
- name: string;
319
-
320
- /**
321
- * Gender of the voice clone.
322
- */
323
- gender?: 'male' | 'female' | 'neutral';
370
+ params:
371
+ | VoiceCloneCreateFromUploadParams.TelnyxQwen3TtsClone
372
+ | VoiceCloneCreateFromUploadParams.TelnyxUltraClone
373
+ | VoiceCloneCreateFromUploadParams.MinimaxClone;
374
+ }
324
375
 
325
- /**
326
- * Optional custom label describing the voice style. If omitted, falls back to the
327
- * source design's prompt text.
328
- */
329
- label?: string;
376
+ export namespace VoiceCloneCreateFromUploadParams {
377
+ /**
378
+ * Upload-based voice clone using the Telnyx Qwen3TTS model (default).
379
+ */
380
+ export interface TelnyxQwen3TtsClone {
381
+ /**
382
+ * Audio file to clone the voice from. Supported formats: WAV, MP3, FLAC, OGG, M4A.
383
+ * For best quality, provide 5–10 seconds of clear, uninterrupted speech. Maximum
384
+ * size: 5MB.
385
+ */
386
+ audio_file: Uploadable;
387
+
388
+ /**
389
+ * Gender of the voice clone.
390
+ */
391
+ gender: 'male' | 'female' | 'neutral';
392
+
393
+ /**
394
+ * ISO 639-1 language code from the Qwen language set.
395
+ */
396
+ language: string;
397
+
398
+ /**
399
+ * Name for the voice clone.
400
+ */
401
+ name: string;
402
+
403
+ /**
404
+ * Voice synthesis provider. Must be `telnyx`.
405
+ */
406
+ provider: 'telnyx' | 'minimax';
407
+
408
+ /**
409
+ * Optional custom label describing the voice style.
410
+ */
411
+ label?: string;
412
+
413
+ /**
414
+ * TTS model identifier. Nullable/omittable — defaults to Qwen3TTS.
415
+ */
416
+ model_id?: 'Qwen3TTS' | null;
417
+
418
+ /**
419
+ * Optional transcript of the audio file. Providing this improves clone quality.
420
+ */
421
+ ref_text?: string;
422
+ }
330
423
 
331
424
  /**
332
- * Voice synthesis provider. Case-insensitive. Defaults to `telnyx`.
333
- */
334
- provider?: 'telnyx' | 'minimax';
425
+ * Upload-based voice clone using the Telnyx Ultra model.
426
+ */
427
+ export interface TelnyxUltraClone {
428
+ /**
429
+ * Audio file to clone the voice from. Supported formats: WAV, MP3, FLAC, OGG, M4A.
430
+ * For best quality, provide 5–10 seconds of clear, uninterrupted speech. Maximum
431
+ * size: 5MB.
432
+ */
433
+ audio_file: Uploadable;
434
+
435
+ /**
436
+ * Gender of the voice clone.
437
+ */
438
+ gender: 'male' | 'female' | 'neutral';
439
+
440
+ /**
441
+ * ISO 639-1 language code from the Ultra language set (40 languages).
442
+ */
443
+ language: string;
444
+
445
+ /**
446
+ * TTS model identifier. Must be `Ultra`.
447
+ */
448
+ model_id: 'Ultra';
449
+
450
+ /**
451
+ * Name for the voice clone.
452
+ */
453
+ name: string;
454
+
455
+ /**
456
+ * Voice synthesis provider. Must be `telnyx`.
457
+ */
458
+ provider: 'telnyx' | 'minimax';
459
+
460
+ /**
461
+ * Optional custom label describing the voice style.
462
+ */
463
+ label?: string;
464
+
465
+ /**
466
+ * Optional transcript of the audio file. Providing this improves clone quality.
467
+ */
468
+ ref_text?: string;
469
+ }
335
470
 
336
471
  /**
337
- * Optional transcript of the audio file. Providing this improves clone quality.
338
- */
339
- ref_text?: string;
472
+ * Upload-based voice clone using the Minimax provider.
473
+ */
474
+ export interface MinimaxClone {
475
+ /**
476
+ * Audio file to clone the voice from. Supported formats: WAV, MP3, FLAC, OGG, M4A.
477
+ * For best quality, provide 5–10 seconds of clear, uninterrupted speech. Maximum
478
+ * size: 20MB.
479
+ */
480
+ audio_file: Uploadable;
481
+
482
+ /**
483
+ * Gender of the voice clone.
484
+ */
485
+ gender: 'male' | 'female' | 'neutral';
486
+
487
+ /**
488
+ * ISO 639-1 language code from the Minimax language set.
489
+ */
490
+ language: string;
491
+
492
+ /**
493
+ * Name for the voice clone.
494
+ */
495
+ name: string;
496
+
497
+ /**
498
+ * Voice synthesis provider. Must be `minimax`.
499
+ */
500
+ provider: 'telnyx' | 'minimax';
501
+
502
+ /**
503
+ * Optional custom label describing the voice style.
504
+ */
505
+ label?: string;
506
+
507
+ /**
508
+ * TTS model identifier. Nullable — defaults to speech-2.8-turbo.
509
+ */
510
+ model_id?: 'speech-2.8-turbo' | null;
511
+
512
+ /**
513
+ * Optional transcript of the audio file. Providing this improves clone quality.
514
+ */
515
+ ref_text?: string;
516
+ }
340
517
  }
341
518
 
342
519
  export declare namespace VoiceClones {
@@ -1,6 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export { Photo, type PhotoUploadResponse, type PhotoUploadParams } from './photo';
3
+ export { Photo, type PhotoRetrieveResponse, type PhotoUploadResponse, type PhotoUploadParams } from './photo';
4
4
  export {
5
5
  Profile,
6
6
  type WhatsappProfileData,
@@ -13,6 +13,21 @@ import { path } from '../../../../internal/utils/path';
13
13
  * Manage Whatsapp phone numbers
14
14
  */
15
15
  export class Photo extends APIResource {
16
+ /**
17
+ * Get Whatsapp profile photo
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * const photo =
22
+ * await client.whatsapp.phoneNumbers.profile.photo.retrieve(
23
+ * 'phone_number',
24
+ * );
25
+ * ```
26
+ */
27
+ retrieve(phoneNumber: string, options?: RequestOptions): APIPromise<PhotoRetrieveResponse> {
28
+ return this._client.get(path`/v2/whatsapp/phone_numbers/${phoneNumber}/profile/photo`, options);
29
+ }
30
+
16
31
  /**
17
32
  * Delete Whatsapp profile photo
18
33
  *
@@ -54,6 +69,27 @@ export class Photo extends APIResource {
54
69
  }
55
70
  }
56
71
 
72
+ export interface PhotoRetrieveResponse {
73
+ data?: PhotoRetrieveResponse.Data;
74
+ }
75
+
76
+ export namespace PhotoRetrieveResponse {
77
+ export interface Data {
78
+ /**
79
+ * Meta phone number ID
80
+ */
81
+ phone_number_id?: string;
82
+
83
+ /**
84
+ * URL of the business profile photo (served by Meta's CDN). May be empty if no
85
+ * photo is set.
86
+ */
87
+ profile_photo_url?: string;
88
+
89
+ record_type?: string;
90
+ }
91
+ }
92
+
57
93
  export interface PhotoUploadResponse {
58
94
  data?: ProfileAPI.WhatsappProfileData;
59
95
  }
@@ -66,5 +102,9 @@ export interface PhotoUploadParams {
66
102
  }
67
103
 
68
104
  export declare namespace Photo {
69
- export { type PhotoUploadResponse as PhotoUploadResponse, type PhotoUploadParams as PhotoUploadParams };
105
+ export {
106
+ type PhotoRetrieveResponse as PhotoRetrieveResponse,
107
+ type PhotoUploadResponse as PhotoUploadResponse,
108
+ type PhotoUploadParams as PhotoUploadParams,
109
+ };
70
110
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../../../../core/resource';
4
4
  import * as PhotoAPI from './photo';
5
- import { Photo, PhotoUploadParams, PhotoUploadResponse } from './photo';
5
+ import { Photo, PhotoRetrieveResponse, PhotoUploadParams, PhotoUploadResponse } from './photo';
6
6
  import { APIPromise } from '../../../../core/api-promise';
7
7
  import { RequestOptions } from '../../../../internal/request-options';
8
8
  import { path } from '../../../../internal/utils/path';
@@ -115,6 +115,7 @@ export declare namespace Profile {
115
115
 
116
116
  export {
117
117
  Photo as Photo,
118
+ type PhotoRetrieveResponse as PhotoRetrieveResponse,
118
119
  type PhotoUploadResponse as PhotoUploadResponse,
119
120
  type PhotoUploadParams as PhotoUploadParams,
120
121
  };
@@ -186,7 +186,8 @@ export namespace WireguardInterfaceRetrieveResponse {
186
186
  }
187
187
 
188
188
  export interface WireguardInterfaceListResponse
189
- extends GlobalIPAssignmentsAPI.Record, PublicInternetGatewaysAPI.NetworkInterface {
189
+ extends GlobalIPAssignmentsAPI.Record,
190
+ PublicInternetGatewaysAPI.NetworkInterface {
190
191
  /**
191
192
  * Enable SIP traffic forwarding over VPN interface.
192
193
  */
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '6.40.0'; // x-release-please-version
1
+ export const VERSION = '6.41.1'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "6.40.0";
1
+ export declare const VERSION = "6.41.1";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "6.40.0";
1
+ export declare const VERSION = "6.41.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '6.40.0'; // x-release-please-version
4
+ exports.VERSION = '6.41.1'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '6.40.0'; // x-release-please-version
1
+ export const VERSION = '6.41.1'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map