telnyx 6.70.0 → 6.72.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 (170) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/client.d.mts +13 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +13 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/ai/ai.d.mts +1 -1
  12. package/resources/ai/ai.d.mts.map +1 -1
  13. package/resources/ai/ai.d.ts +1 -1
  14. package/resources/ai/ai.d.ts.map +1 -1
  15. package/resources/ai/ai.js +2 -2
  16. package/resources/ai/ai.js.map +1 -1
  17. package/resources/ai/ai.mjs +2 -2
  18. package/resources/ai/ai.mjs.map +1 -1
  19. package/resources/calls/actions.d.mts +260 -247
  20. package/resources/calls/actions.d.mts.map +1 -1
  21. package/resources/calls/actions.d.ts +260 -247
  22. package/resources/calls/actions.d.ts.map +1 -1
  23. package/resources/calls/actions.js.map +1 -1
  24. package/resources/calls/actions.mjs.map +1 -1
  25. package/resources/calls/calls.d.mts +210 -3
  26. package/resources/calls/calls.d.mts.map +1 -1
  27. package/resources/calls/calls.d.ts +210 -3
  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 +2 -2
  32. package/resources/calls/index.d.mts.map +1 -1
  33. package/resources/calls/index.d.ts +2 -2
  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/conferences/actions.d.mts +1 -9
  38. package/resources/conferences/actions.d.mts.map +1 -1
  39. package/resources/conferences/actions.d.ts +1 -9
  40. package/resources/conferences/actions.d.ts.map +1 -1
  41. package/resources/index.d.mts +4 -3
  42. package/resources/index.d.mts.map +1 -1
  43. package/resources/index.d.ts +4 -3
  44. package/resources/index.d.ts.map +1 -1
  45. package/resources/index.js +4 -2
  46. package/resources/index.js.map +1 -1
  47. package/resources/index.mjs +1 -0
  48. package/resources/index.mjs.map +1 -1
  49. package/resources/shared.d.mts +6 -0
  50. package/resources/shared.d.mts.map +1 -1
  51. package/resources/shared.d.ts +6 -0
  52. package/resources/shared.d.ts.map +1 -1
  53. package/resources/speech-to-text/index.d.mts +3 -3
  54. package/resources/speech-to-text/index.d.mts.map +1 -1
  55. package/resources/speech-to-text/index.d.ts +3 -3
  56. package/resources/speech-to-text/index.d.ts.map +1 -1
  57. package/resources/speech-to-text/index.js +1 -5
  58. package/resources/speech-to-text/index.js.map +1 -1
  59. package/resources/speech-to-text/index.mjs +0 -2
  60. package/resources/speech-to-text/index.mjs.map +1 -1
  61. package/resources/speech-to-text/internal-base.d.mts +42 -11
  62. package/resources/speech-to-text/internal-base.d.mts.map +1 -1
  63. package/resources/speech-to-text/internal-base.d.ts +42 -11
  64. package/resources/speech-to-text/internal-base.d.ts.map +1 -1
  65. package/resources/speech-to-text/internal-base.js +5 -9
  66. package/resources/speech-to-text/internal-base.js.map +1 -1
  67. package/resources/speech-to-text/internal-base.mjs +5 -9
  68. package/resources/speech-to-text/internal-base.mjs.map +1 -1
  69. package/resources/speech-to-text/speech-to-text.d.mts +79 -100
  70. package/resources/speech-to-text/speech-to-text.d.mts.map +1 -1
  71. package/resources/speech-to-text/speech-to-text.d.ts +79 -100
  72. package/resources/speech-to-text/speech-to-text.d.ts.map +1 -1
  73. package/resources/speech-to-text/speech-to-text.js +16 -19
  74. package/resources/speech-to-text/speech-to-text.js.map +1 -1
  75. package/resources/speech-to-text/speech-to-text.mjs +16 -19
  76. package/resources/speech-to-text/speech-to-text.mjs.map +1 -1
  77. package/resources/speech-to-text/ws-base.d.mts +106 -0
  78. package/resources/speech-to-text/ws-base.d.mts.map +1 -0
  79. package/resources/speech-to-text/ws-base.d.ts +106 -0
  80. package/resources/speech-to-text/ws-base.d.ts.map +1 -0
  81. package/resources/speech-to-text/ws-base.js +476 -0
  82. package/resources/speech-to-text/ws-base.js.map +1 -0
  83. package/resources/speech-to-text/ws-base.mjs +472 -0
  84. package/resources/speech-to-text/ws-base.mjs.map +1 -0
  85. package/resources/speech-to-text/ws.d.mts +9 -28
  86. package/resources/speech-to-text/ws.d.mts.map +1 -1
  87. package/resources/speech-to-text/ws.d.ts +9 -28
  88. package/resources/speech-to-text/ws.d.ts.map +1 -1
  89. package/resources/speech-to-text/ws.js +17 -97
  90. package/resources/speech-to-text/ws.js.map +1 -1
  91. package/resources/speech-to-text/ws.mjs +17 -97
  92. package/resources/speech-to-text/ws.mjs.map +1 -1
  93. package/resources/speech-to-text.d.mts +2 -0
  94. package/resources/speech-to-text.d.mts.map +1 -0
  95. package/resources/speech-to-text.d.ts +2 -0
  96. package/resources/speech-to-text.d.ts.map +1 -0
  97. package/resources/speech-to-text.js +6 -0
  98. package/resources/speech-to-text.js.map +1 -0
  99. package/resources/speech-to-text.mjs +3 -0
  100. package/resources/speech-to-text.mjs.map +1 -0
  101. package/resources/texml/accounts/calls/calls.d.mts +31 -465
  102. package/resources/texml/accounts/calls/calls.d.mts.map +1 -1
  103. package/resources/texml/accounts/calls/calls.d.ts +31 -465
  104. package/resources/texml/accounts/calls/calls.d.ts.map +1 -1
  105. package/resources/texml/accounts/calls/calls.js +7 -1
  106. package/resources/texml/accounts/calls/calls.js.map +1 -1
  107. package/resources/texml/accounts/calls/calls.mjs +7 -1
  108. package/resources/texml/accounts/calls/calls.mjs.map +1 -1
  109. package/resources/text-to-speech/index.d.mts +1 -1
  110. package/resources/text-to-speech/index.d.mts.map +1 -1
  111. package/resources/text-to-speech/index.d.ts +1 -1
  112. package/resources/text-to-speech/index.d.ts.map +1 -1
  113. package/resources/text-to-speech/index.js.map +1 -1
  114. package/resources/text-to-speech/index.mjs.map +1 -1
  115. package/resources/text-to-speech/text-to-speech.d.mts +79 -13
  116. package/resources/text-to-speech/text-to-speech.d.mts.map +1 -1
  117. package/resources/text-to-speech/text-to-speech.d.ts +79 -13
  118. package/resources/text-to-speech/text-to-speech.d.ts.map +1 -1
  119. package/resources/text-to-speech/text-to-speech.js +33 -1
  120. package/resources/text-to-speech/text-to-speech.js.map +1 -1
  121. package/resources/text-to-speech/text-to-speech.mjs +33 -1
  122. package/resources/text-to-speech/text-to-speech.mjs.map +1 -1
  123. package/resources/voice-sdk-call-reports.d.mts +30 -105
  124. package/resources/voice-sdk-call-reports.d.mts.map +1 -1
  125. package/resources/voice-sdk-call-reports.d.ts +30 -105
  126. package/resources/voice-sdk-call-reports.d.ts.map +1 -1
  127. package/resources/voice-sdk-call-reports.js.map +1 -1
  128. package/resources/voice-sdk-call-reports.mjs.map +1 -1
  129. package/resources/whatsapp/index.d.mts +1 -1
  130. package/resources/whatsapp/index.d.mts.map +1 -1
  131. package/resources/whatsapp/index.d.ts +1 -1
  132. package/resources/whatsapp/index.d.ts.map +1 -1
  133. package/resources/whatsapp/index.js.map +1 -1
  134. package/resources/whatsapp/index.mjs.map +1 -1
  135. package/resources/whatsapp/user-data.d.mts +16 -33
  136. package/resources/whatsapp/user-data.d.mts.map +1 -1
  137. package/resources/whatsapp/user-data.d.ts +16 -33
  138. package/resources/whatsapp/user-data.d.ts.map +1 -1
  139. package/resources/whatsapp/whatsapp.d.mts +2 -2
  140. package/resources/whatsapp/whatsapp.d.mts.map +1 -1
  141. package/resources/whatsapp/whatsapp.d.ts +2 -2
  142. package/resources/whatsapp/whatsapp.d.ts.map +1 -1
  143. package/resources/whatsapp/whatsapp.js.map +1 -1
  144. package/resources/whatsapp/whatsapp.mjs.map +1 -1
  145. package/src/client.ts +33 -4
  146. package/src/resources/ai/ai.ts +3 -3
  147. package/src/resources/calls/actions.ts +331 -320
  148. package/src/resources/calls/calls.ts +272 -0
  149. package/src/resources/calls/index.ts +4 -0
  150. package/src/resources/conferences/actions.ts +1 -10
  151. package/src/resources/index.ts +13 -2
  152. package/src/resources/shared.ts +7 -0
  153. package/src/resources/speech-to-text/index.ts +6 -9
  154. package/src/resources/speech-to-text/internal-base.ts +49 -22
  155. package/src/resources/speech-to-text/speech-to-text.ts +102 -128
  156. package/src/resources/speech-to-text/ws-base.ts +619 -0
  157. package/src/resources/speech-to-text/ws.ts +26 -111
  158. package/src/resources/speech-to-text.ts +3 -0
  159. package/src/resources/texml/accounts/calls/calls.ts +36 -564
  160. package/src/resources/text-to-speech/index.ts +3 -2
  161. package/src/resources/text-to-speech/text-to-speech.ts +100 -16
  162. package/src/resources/voice-sdk-call-reports.ts +33 -116
  163. package/src/resources/whatsapp/index.ts +1 -0
  164. package/src/resources/whatsapp/user-data.ts +17 -38
  165. package/src/resources/whatsapp/whatsapp.ts +2 -0
  166. package/src/version.ts +1 -1
  167. package/version.d.mts +1 -1
  168. package/version.d.ts +1 -1
  169. package/version.js +1 -1
  170. package/version.mjs +1 -1
@@ -29,13 +29,49 @@ export class TextToSpeech extends APIResource {
29
29
  * adjustment, and volume control. Use the `telnyx` provider-specific parameters to
30
30
  * configure these features.
31
31
  */
32
- generate(
33
- body: TextToSpeechGenerateParams,
32
+ createSpeech(
33
+ body: TextToSpeechCreateSpeechParams,
34
34
  options?: RequestOptions,
35
- ): APIPromise<TextToSpeechGenerateResponse> {
35
+ ): APIPromise<TextToSpeechCreateSpeechResponse> {
36
36
  return this._client.post('/text-to-speech/speech', { body, ...options });
37
37
  }
38
38
 
39
+ /**
40
+ * Open a WebSocket connection to stream text and receive synthesized audio in real
41
+ * time. Authentication is provided via the standard
42
+ * `Authorization: Bearer <API_KEY>` header. Send JSON frames with text to
43
+ * synthesize; receive JSON frames containing base64-encoded audio chunks.
44
+ *
45
+ * Supported providers: `aws`, `telnyx`, `azure`, `murfai`, `minimax`, `rime`,
46
+ * `resemble`, `elevenlabs`, `xai`.
47
+ *
48
+ * **Connection flow:**
49
+ *
50
+ * 1. Open WebSocket with query parameters specifying provider, voice, and model.
51
+ * 2. Send an initial handshake message `{"text": " "}` (single space) with
52
+ * optional `voice_settings` to initialize the session.
53
+ * 3. Send text messages as `{"text": "Hello world"}`.
54
+ * 4. Receive audio chunks as JSON frames with base64-encoded audio.
55
+ * 5. A final frame with `isFinal: true` indicates the end of audio for the current
56
+ * text.
57
+ *
58
+ * To interrupt and restart synthesis mid-stream, send `{"force": true}` — the
59
+ * current worker is stopped and a new one is started.
60
+ *
61
+ * **Note:** The Telnyx `Ultra` model is not available over WebSocket. Use the HTTP
62
+ * POST `/text-to-speech/speech` endpoint instead.
63
+ */
64
+ generateSpeech(
65
+ query: TextToSpeechGenerateSpeechParams | null | undefined = {},
66
+ options?: RequestOptions,
67
+ ): APIPromise<void> {
68
+ return this._client.get('/text-to-speech/speech', {
69
+ query,
70
+ ...options,
71
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
72
+ });
73
+ }
74
+
39
75
  /**
40
76
  * Retrieve a list of available voices from one or all TTS providers. When
41
77
  * `provider` is specified, returns voices for that provider only. Otherwise,
@@ -71,7 +107,7 @@ export class TextToSpeech extends APIResource {
71
107
  /**
72
108
  * Response when `output_type` is `base64_output`.
73
109
  */
74
- export interface TextToSpeechGenerateResponse {
110
+ export interface TextToSpeechCreateSpeechResponse {
75
111
  /**
76
112
  * Base64-encoded audio data.
77
113
  */
@@ -236,16 +272,16 @@ export namespace StreamServerEvent {
236
272
  }
237
273
  }
238
274
 
239
- export interface TextToSpeechGenerateParams {
275
+ export interface TextToSpeechCreateSpeechParams {
240
276
  /**
241
277
  * AWS Polly provider-specific parameters.
242
278
  */
243
- aws?: TextToSpeechGenerateParams.Aws;
279
+ aws?: TextToSpeechCreateSpeechParams.Aws;
244
280
 
245
281
  /**
246
282
  * Azure Cognitive Services provider-specific parameters.
247
283
  */
248
- azure?: TextToSpeechGenerateParams.Azure;
284
+ azure?: TextToSpeechCreateSpeechParams.Azure;
249
285
 
250
286
  /**
251
287
  * When `true`, bypass the audio cache and generate fresh audio.
@@ -255,7 +291,7 @@ export interface TextToSpeechGenerateParams {
255
291
  /**
256
292
  * ElevenLabs provider-specific parameters.
257
293
  */
258
- elevenlabs?: TextToSpeechGenerateParams.Elevenlabs;
294
+ elevenlabs?: TextToSpeechCreateSpeechParams.Elevenlabs;
259
295
 
260
296
  /**
261
297
  * Inworld provider-specific parameters.
@@ -270,7 +306,7 @@ export interface TextToSpeechGenerateParams {
270
306
  /**
271
307
  * Minimax provider-specific parameters.
272
308
  */
273
- minimax?: TextToSpeechGenerateParams.Minimax;
309
+ minimax?: TextToSpeechCreateSpeechParams.Minimax;
274
310
 
275
311
  /**
276
312
  * Determines the response format. `binary_output` returns raw audio bytes,
@@ -286,19 +322,19 @@ export interface TextToSpeechGenerateParams {
286
322
  /**
287
323
  * Resemble AI provider-specific parameters.
288
324
  */
289
- resemble?: TextToSpeechGenerateParams.Resemble;
325
+ resemble?: TextToSpeechCreateSpeechParams.Resemble;
290
326
 
291
327
  /**
292
328
  * Rime provider-specific parameters.
293
329
  */
294
- rime?: TextToSpeechGenerateParams.Rime;
330
+ rime?: TextToSpeechCreateSpeechParams.Rime;
295
331
 
296
332
  /**
297
333
  * Telnyx provider-specific parameters. Use `voice_speed` and `temperature` for
298
334
  * `Natural` and `NaturalHD` models. For the `Ultra` model, use `voice_speed`,
299
335
  * `volume`, and `emotion`.
300
336
  */
301
- telnyx?: TextToSpeechGenerateParams.Telnyx;
337
+ telnyx?: TextToSpeechCreateSpeechParams.Telnyx;
302
338
 
303
339
  /**
304
340
  * The text to convert to speech.
@@ -329,10 +365,10 @@ export interface TextToSpeechGenerateParams {
329
365
  /**
330
366
  * xAI provider-specific parameters.
331
367
  */
332
- xai?: TextToSpeechGenerateParams.Xai;
368
+ xai?: TextToSpeechCreateSpeechParams.Xai;
333
369
  }
334
370
 
335
- export namespace TextToSpeechGenerateParams {
371
+ export namespace TextToSpeechCreateSpeechParams {
336
372
  /**
337
373
  * AWS Polly provider-specific parameters.
338
374
  */
@@ -567,6 +603,53 @@ export namespace TextToSpeechGenerateParams {
567
603
  }
568
604
  }
569
605
 
606
+ export interface TextToSpeechGenerateSpeechParams {
607
+ /**
608
+ * Audio output format override. Supported for Telnyx models. `pcm` and `wav` are
609
+ * available for `Natural`/`NaturalHD` models. The `Ultra` model outputs PCM at
610
+ * 24kHz s16le or MP3 at 128kbps 24kHz.
611
+ */
612
+ audio_format?: 'pcm' | 'wav' | 'mp3';
613
+
614
+ /**
615
+ * When `true`, bypass the audio cache and generate fresh audio.
616
+ */
617
+ disable_cache?: boolean;
618
+
619
+ /**
620
+ * Model identifier for the chosen provider. Examples: `Natural`, `NaturalHD`,
621
+ * `Ultra` (Telnyx); `Polly.Generative` (AWS).
622
+ */
623
+ model_id?: string;
624
+
625
+ /**
626
+ * TTS provider. Defaults to `telnyx` if not specified. Ignored when `voice` is
627
+ * provided.
628
+ */
629
+ provider?: 'aws' | 'telnyx' | 'azure' | 'elevenlabs' | 'minimax' | 'murfai' | 'rime' | 'resemble' | 'xai';
630
+
631
+ /**
632
+ * Client-provided socket identifier for tracking. If not provided, one is
633
+ * generated server-side.
634
+ */
635
+ socket_id?: string;
636
+
637
+ /**
638
+ * Voice identifier in the format `provider.model_id.voice_id` or
639
+ * `provider.voice_id` (e.g. `telnyx.NaturalHD.Telnyx_Alloy`,
640
+ * `Telnyx.Ultra.<voice_id>`, or `azure.en-US-AvaMultilingualNeural`). When
641
+ * provided, the `provider`, `model_id`, and `voice_id` are extracted
642
+ * automatically. Takes precedence over individual `provider`/`model_id`/`voice_id`
643
+ * parameters.
644
+ */
645
+ voice?: string;
646
+
647
+ /**
648
+ * Voice identifier for the chosen provider.
649
+ */
650
+ voice_id?: string;
651
+ }
652
+
570
653
  export interface TextToSpeechListVoicesParams {
571
654
  /**
572
655
  * API key for providers that require one to list voices (e.g. ElevenLabs).
@@ -581,11 +664,12 @@ export interface TextToSpeechListVoicesParams {
581
664
 
582
665
  export declare namespace TextToSpeech {
583
666
  export {
584
- type TextToSpeechGenerateResponse as TextToSpeechGenerateResponse,
667
+ type TextToSpeechCreateSpeechResponse as TextToSpeechCreateSpeechResponse,
585
668
  type TextToSpeechListVoicesResponse as TextToSpeechListVoicesResponse,
586
669
  type StreamClientEvent as StreamClientEvent,
587
670
  type StreamServerEvent as StreamServerEvent,
588
- type TextToSpeechGenerateParams as TextToSpeechGenerateParams,
671
+ type TextToSpeechCreateSpeechParams as TextToSpeechCreateSpeechParams,
672
+ type TextToSpeechGenerateSpeechParams as TextToSpeechGenerateSpeechParams,
589
673
  type TextToSpeechListVoicesParams as TextToSpeechListVoicesParams,
590
674
  };
591
675
  }
@@ -1,6 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
+ import * as VoiceSDKCallReportsAPI from './voice-sdk-call-reports';
4
5
  import { APIPromise } from '../core/api-promise';
5
6
  import { DefaultFlatPagination, type DefaultFlatPaginationParams, PagePromise } from '../core/pagination';
6
7
  import { RequestOptions } from '../internal/request-options';
@@ -39,6 +40,33 @@ export class VoiceSDKCallReports extends APIResource {
39
40
  export type VoiceSDKCallReportListResponsesDefaultFlatPagination =
40
41
  DefaultFlatPagination<VoiceSDKCallReportListResponse>;
41
42
 
43
+ /**
44
+ * A raw Voice SDK log entry. Additional SDK-specific fields may be present.
45
+ */
46
+ export interface VoiceSDKCallReportLogEntry {
47
+ /**
48
+ * Raw structured context attached to the log entry.
49
+ */
50
+ context?: { [key: string]: unknown };
51
+
52
+ /**
53
+ * Log level emitted by the SDK.
54
+ */
55
+ level?: 'debug' | 'info' | 'warn' | 'error';
56
+
57
+ /**
58
+ * Log message.
59
+ */
60
+ message?: string;
61
+
62
+ /**
63
+ * Time when the log entry was emitted.
64
+ */
65
+ timestamp?: string;
66
+
67
+ [k: string]: unknown;
68
+ }
69
+
42
70
  /**
43
71
  * Raw Voice SDK call report stats payloads as stored by voice-sdk-debug.
44
72
  */
@@ -80,7 +108,7 @@ export namespace VoiceSDKCallReportRetrieveResponse {
80
108
  * payloads are also allowed for compatibility.
81
109
  */
82
110
  logs?:
83
- | Array<VoiceSDKCallReportRetrieveResponseItem.UnionMember0>
111
+ | Array<VoiceSDKCallReportsAPI.VoiceSDKCallReportLogEntry>
84
112
  | VoiceSDKCallReportRetrieveResponseItem.Entries;
85
113
 
86
114
  /**
@@ -162,33 +190,6 @@ export namespace VoiceSDKCallReportRetrieveResponse {
162
190
  }
163
191
 
164
192
  export namespace VoiceSDKCallReportRetrieveResponseItem {
165
- /**
166
- * A raw Voice SDK log entry. Additional SDK-specific fields may be present.
167
- */
168
- export interface UnionMember0 {
169
- /**
170
- * Raw structured context attached to the log entry.
171
- */
172
- context?: { [key: string]: unknown };
173
-
174
- /**
175
- * Log level emitted by the SDK.
176
- */
177
- level?: 'debug' | 'info' | 'warn' | 'error';
178
-
179
- /**
180
- * Log message.
181
- */
182
- message?: string;
183
-
184
- /**
185
- * Time when the log entry was emitted.
186
- */
187
- timestamp?: string;
188
-
189
- [k: string]: unknown;
190
- }
191
-
192
193
  /**
193
194
  * Raw logs object emitted by the Voice SDK when logs are grouped under an entries
194
195
  * field.
@@ -197,40 +198,11 @@ export namespace VoiceSDKCallReportRetrieveResponse {
197
198
  /**
198
199
  * Raw log entries when the SDK groups logs under an entries field.
199
200
  */
200
- entries?: Array<Entries.Entry>;
201
+ entries?: Array<VoiceSDKCallReportsAPI.VoiceSDKCallReportLogEntry>;
201
202
 
202
203
  [k: string]: unknown;
203
204
  }
204
205
 
205
- export namespace Entries {
206
- /**
207
- * A raw Voice SDK log entry. Additional SDK-specific fields may be present.
208
- */
209
- export interface Entry {
210
- /**
211
- * Raw structured context attached to the log entry.
212
- */
213
- context?: { [key: string]: unknown };
214
-
215
- /**
216
- * Log level emitted by the SDK.
217
- */
218
- level?: 'debug' | 'info' | 'warn' | 'error';
219
-
220
- /**
221
- * Log message.
222
- */
223
- message?: string;
224
-
225
- /**
226
- * Time when the log entry was emitted.
227
- */
228
- timestamp?: string;
229
-
230
- [k: string]: unknown;
231
- }
232
- }
233
-
234
206
  /**
235
207
  * Raw stats object emitted by the Voice SDK.
236
208
  */
@@ -297,7 +269,7 @@ export interface VoiceSDKCallReportListResponse {
297
269
  * responses commonly return an array of log entries, but object-shaped log
298
270
  * payloads are also allowed for compatibility.
299
271
  */
300
- logs?: Array<VoiceSDKCallReportListResponse.UnionMember0> | VoiceSDKCallReportListResponse.Entries;
272
+ logs?: Array<VoiceSDKCallReportLogEntry> | VoiceSDKCallReportListResponse.Entries;
301
273
 
302
274
  /**
303
275
  * Organization associated with the stored call report when provided by the Voice
@@ -378,33 +350,6 @@ export interface VoiceSDKCallReportListResponse {
378
350
  }
379
351
 
380
352
  export namespace VoiceSDKCallReportListResponse {
381
- /**
382
- * A raw Voice SDK log entry. Additional SDK-specific fields may be present.
383
- */
384
- export interface UnionMember0 {
385
- /**
386
- * Raw structured context attached to the log entry.
387
- */
388
- context?: { [key: string]: unknown };
389
-
390
- /**
391
- * Log level emitted by the SDK.
392
- */
393
- level?: 'debug' | 'info' | 'warn' | 'error';
394
-
395
- /**
396
- * Log message.
397
- */
398
- message?: string;
399
-
400
- /**
401
- * Time when the log entry was emitted.
402
- */
403
- timestamp?: string;
404
-
405
- [k: string]: unknown;
406
- }
407
-
408
353
  /**
409
354
  * Raw logs object emitted by the Voice SDK when logs are grouped under an entries
410
355
  * field.
@@ -413,40 +358,11 @@ export namespace VoiceSDKCallReportListResponse {
413
358
  /**
414
359
  * Raw log entries when the SDK groups logs under an entries field.
415
360
  */
416
- entries?: Array<Entries.Entry>;
361
+ entries?: Array<VoiceSDKCallReportsAPI.VoiceSDKCallReportLogEntry>;
417
362
 
418
363
  [k: string]: unknown;
419
364
  }
420
365
 
421
- export namespace Entries {
422
- /**
423
- * A raw Voice SDK log entry. Additional SDK-specific fields may be present.
424
- */
425
- export interface Entry {
426
- /**
427
- * Raw structured context attached to the log entry.
428
- */
429
- context?: { [key: string]: unknown };
430
-
431
- /**
432
- * Log level emitted by the SDK.
433
- */
434
- level?: 'debug' | 'info' | 'warn' | 'error';
435
-
436
- /**
437
- * Log message.
438
- */
439
- message?: string;
440
-
441
- /**
442
- * Time when the log entry was emitted.
443
- */
444
- timestamp?: string;
445
-
446
- [k: string]: unknown;
447
- }
448
- }
449
-
450
366
  /**
451
367
  * Raw stats object emitted by the Voice SDK.
452
368
  */
@@ -490,6 +406,7 @@ export interface VoiceSDKCallReportListParams extends DefaultFlatPaginationParam
490
406
 
491
407
  export declare namespace VoiceSDKCallReports {
492
408
  export {
409
+ type VoiceSDKCallReportLogEntry as VoiceSDKCallReportLogEntry,
493
410
  type VoiceSDKCallReportRetrieveResponse as VoiceSDKCallReportRetrieveResponse,
494
411
  type VoiceSDKCallReportListResponse as VoiceSDKCallReportListResponse,
495
412
  type VoiceSDKCallReportListResponsesDefaultFlatPagination as VoiceSDKCallReportListResponsesDefaultFlatPagination,
@@ -23,6 +23,7 @@ export {
23
23
  } from './templates';
24
24
  export {
25
25
  UserData,
26
+ type WhatsappUserData,
26
27
  type UserDataRetrieveResponse,
27
28
  type UserDataUpdateResponse,
28
29
  type UserDataUpdateParams,
@@ -33,52 +33,30 @@ export class UserData extends APIResource {
33
33
  }
34
34
  }
35
35
 
36
- export interface UserDataRetrieveResponse {
37
- data?: UserDataRetrieveResponse.Data;
38
- }
39
-
40
- export namespace UserDataRetrieveResponse {
41
- export interface Data {
42
- created_at?: string;
36
+ export interface WhatsappUserData {
37
+ created_at?: string;
43
38
 
44
- record_type?: string;
39
+ record_type?: string;
45
40
 
46
- updated_at?: string;
41
+ updated_at?: string;
47
42
 
48
- /**
49
- * Failover URL to receive Whatsapp signup events
50
- */
51
- webhook_failover_url?: string;
43
+ /**
44
+ * Failover URL to receive Whatsapp signup events
45
+ */
46
+ webhook_failover_url?: string;
52
47
 
53
- /**
54
- * URL to receive Whatsapp signup events
55
- */
56
- webhook_url?: string;
57
- }
48
+ /**
49
+ * URL to receive Whatsapp signup events
50
+ */
51
+ webhook_url?: string;
58
52
  }
59
53
 
60
- export interface UserDataUpdateResponse {
61
- data?: UserDataUpdateResponse.Data;
54
+ export interface UserDataRetrieveResponse {
55
+ data?: WhatsappUserData;
62
56
  }
63
57
 
64
- export namespace UserDataUpdateResponse {
65
- export interface Data {
66
- created_at?: string;
67
-
68
- record_type?: string;
69
-
70
- updated_at?: string;
71
-
72
- /**
73
- * Failover URL to receive Whatsapp signup events
74
- */
75
- webhook_failover_url?: string;
76
-
77
- /**
78
- * URL to receive Whatsapp signup events
79
- */
80
- webhook_url?: string;
81
- }
58
+ export interface UserDataUpdateResponse {
59
+ data?: WhatsappUserData;
82
60
  }
83
61
 
84
62
  export interface UserDataUpdateParams {
@@ -95,6 +73,7 @@ export interface UserDataUpdateParams {
95
73
 
96
74
  export declare namespace UserData {
97
75
  export {
76
+ type WhatsappUserData as WhatsappUserData,
98
77
  type UserDataRetrieveResponse as UserDataRetrieveResponse,
99
78
  type UserDataUpdateResponse as UserDataUpdateResponse,
100
79
  type UserDataUpdateParams as UserDataUpdateParams,
@@ -9,6 +9,7 @@ import {
9
9
  UserDataRetrieveResponse,
10
10
  UserDataUpdateParams,
11
11
  UserDataUpdateResponse,
12
+ WhatsappUserData,
12
13
  } from './user-data';
13
14
  import * as BusinessAccountsAPI from './business-accounts/business-accounts';
14
15
  import {
@@ -69,6 +70,7 @@ export declare namespace Whatsapp {
69
70
 
70
71
  export {
71
72
  UserData as UserData,
73
+ type WhatsappUserData as WhatsappUserData,
72
74
  type UserDataRetrieveResponse as UserDataRetrieveResponse,
73
75
  type UserDataUpdateResponse as UserDataUpdateResponse,
74
76
  type UserDataUpdateParams as UserDataUpdateParams,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '6.70.0'; // x-release-please-version
1
+ export const VERSION = '6.72.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "6.70.0";
1
+ export declare const VERSION = "6.72.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "6.70.0";
1
+ export declare const VERSION = "6.72.0";
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.70.0'; // x-release-please-version
4
+ exports.VERSION = '6.72.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '6.70.0'; // x-release-please-version
1
+ export const VERSION = '6.72.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map