telnyx 6.68.0 → 6.70.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 (59) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/client.d.mts +6 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -0
  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/assistants/assistants.d.mts +6 -0
  12. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  13. package/resources/ai/assistants/assistants.d.ts +6 -0
  14. package/resources/ai/assistants/assistants.d.ts.map +1 -1
  15. package/resources/ai/assistants/assistants.js.map +1 -1
  16. package/resources/ai/assistants/assistants.mjs.map +1 -1
  17. package/resources/calls/actions.d.mts +4 -4
  18. package/resources/calls/actions.d.ts +4 -4
  19. package/resources/conferences/actions.d.mts +2 -2
  20. package/resources/conferences/actions.d.ts +2 -2
  21. package/resources/index.d.mts +1 -0
  22. package/resources/index.d.mts.map +1 -1
  23. package/resources/index.d.ts +1 -0
  24. package/resources/index.d.ts.map +1 -1
  25. package/resources/index.js +3 -1
  26. package/resources/index.js.map +1 -1
  27. package/resources/index.mjs +1 -0
  28. package/resources/index.mjs.map +1 -1
  29. package/resources/messages/messages.d.mts +8 -0
  30. package/resources/messages/messages.d.mts.map +1 -1
  31. package/resources/messages/messages.d.ts +8 -0
  32. package/resources/messages/messages.d.ts.map +1 -1
  33. package/resources/messages/messages.js.map +1 -1
  34. package/resources/messages/messages.mjs.map +1 -1
  35. package/resources/shared.d.mts +4 -0
  36. package/resources/shared.d.mts.map +1 -1
  37. package/resources/shared.d.ts +4 -0
  38. package/resources/shared.d.ts.map +1 -1
  39. package/resources/voice-sdk-call-reports.d.mts +438 -0
  40. package/resources/voice-sdk-call-reports.d.mts.map +1 -0
  41. package/resources/voice-sdk-call-reports.d.ts +438 -0
  42. package/resources/voice-sdk-call-reports.d.ts.map +1 -0
  43. package/resources/voice-sdk-call-reports.js +30 -0
  44. package/resources/voice-sdk-call-reports.js.map +1 -0
  45. package/resources/voice-sdk-call-reports.mjs +26 -0
  46. package/resources/voice-sdk-call-reports.mjs.map +1 -0
  47. package/src/client.ts +20 -0
  48. package/src/resources/ai/assistants/assistants.ts +7 -0
  49. package/src/resources/calls/actions.ts +4 -4
  50. package/src/resources/conferences/actions.ts +2 -2
  51. package/src/resources/index.ts +7 -0
  52. package/src/resources/messages/messages.ts +10 -0
  53. package/src/resources/shared.ts +5 -0
  54. package/src/resources/voice-sdk-call-reports.ts +498 -0
  55. package/src/version.ts +1 -1
  56. package/version.d.mts +1 -1
  57. package/version.d.ts +1 -1
  58. package/version.js +1 -1
  59. package/version.mjs +1 -1
@@ -0,0 +1,498 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { DefaultFlatPagination, type DefaultFlatPaginationParams, PagePromise } from '../core/pagination';
6
+ import { RequestOptions } from '../internal/request-options';
7
+ import { path } from '../internal/utils/path';
8
+
9
+ /**
10
+ * Retrieve raw Voice SDK call report stats payloads for WebRTC call troubleshooting.
11
+ */
12
+ export class VoiceSDKCallReports extends APIResource {
13
+ /**
14
+ * Returns raw call report stats JSON payloads stored for the authenticated user
15
+ * and `call_id`. The user is derived from Telnyx authentication, not from request
16
+ * parameters.
17
+ */
18
+ retrieve(callID: string, options?: RequestOptions): APIPromise<VoiceSDKCallReportRetrieveResponse> {
19
+ return this._client.get(path`/voice_sdk_call_reports/${callID}`, options);
20
+ }
21
+
22
+ /**
23
+ * Returns paginated raw call report stats JSON payloads stored for the
24
+ * authenticated user. The user is derived from Telnyx authentication, not from
25
+ * request parameters.
26
+ */
27
+ list(
28
+ query: VoiceSDKCallReportListParams | null | undefined = {},
29
+ options?: RequestOptions,
30
+ ): PagePromise<VoiceSDKCallReportListResponsesDefaultFlatPagination, VoiceSDKCallReportListResponse> {
31
+ return this._client.getAPIList(
32
+ '/voice_sdk_call_reports',
33
+ DefaultFlatPagination<VoiceSDKCallReportListResponse>,
34
+ { query, ...options },
35
+ );
36
+ }
37
+ }
38
+
39
+ export type VoiceSDKCallReportListResponsesDefaultFlatPagination =
40
+ DefaultFlatPagination<VoiceSDKCallReportListResponse>;
41
+
42
+ /**
43
+ * Raw Voice SDK call report stats payloads as stored by voice-sdk-debug.
44
+ */
45
+ export type VoiceSDKCallReportRetrieveResponse =
46
+ Array<VoiceSDKCallReportRetrieveResponse.VoiceSDKCallReportRetrieveResponseItem>;
47
+
48
+ export namespace VoiceSDKCallReportRetrieveResponse {
49
+ /**
50
+ * A raw call report stats JSON payload. The schema is intentionally permissive
51
+ * because Voice SDK clients can add fields over time.
52
+ */
53
+ export interface VoiceSDKCallReportRetrieveResponseItem {
54
+ /**
55
+ * Unique call identifier.
56
+ */
57
+ call_id?: string;
58
+
59
+ /**
60
+ * User-scoped storage grouping identifier derived from the authenticated user.
61
+ * This is not a unique per-call report identifier and may be shared by multiple
62
+ * calls for the same user.
63
+ */
64
+ call_report_id?: string;
65
+
66
+ /**
67
+ * Creation timestamp when present.
68
+ */
69
+ created_at?: string;
70
+
71
+ /**
72
+ * Reason the SDK flushed this stats report segment, for example an intermediate
73
+ * socket-close flush.
74
+ */
75
+ flushReason?: { [key: string]: unknown };
76
+
77
+ /**
78
+ * Raw logs payload emitted by the Voice SDK and stored without normalization. Live
79
+ * responses commonly return an array of log entries, but object-shaped log
80
+ * payloads are also allowed for compatibility.
81
+ */
82
+ logs?:
83
+ | Array<VoiceSDKCallReportRetrieveResponseItem.UnionMember0>
84
+ | VoiceSDKCallReportRetrieveResponseItem.Entries;
85
+
86
+ /**
87
+ * Organization associated with the stored call report when provided by the Voice
88
+ * SDK reporting path.
89
+ */
90
+ organization_id?: string;
91
+
92
+ /**
93
+ * Zero-based stats segment index when the SDK sends segmented or intermediate
94
+ * reports.
95
+ */
96
+ segment?: number;
97
+
98
+ /**
99
+ * Raw stats payload emitted by the Voice SDK and stored without normalization. The
100
+ * exact shape can vary by SDK platform and version. Live responses commonly return
101
+ * an array of interval snapshots, but object-shaped stats payloads are also
102
+ * allowed for compatibility.
103
+ */
104
+ stats?: Array<{ [key: string]: unknown }> | VoiceSDKCallReportRetrieveResponseItem.UnionMember1;
105
+
106
+ /**
107
+ * Time when the call report was stored.
108
+ */
109
+ stored_at?: string;
110
+
111
+ /**
112
+ * High-level call metadata.
113
+ */
114
+ summary?: { [key: string]: unknown };
115
+
116
+ /**
117
+ * Telnyx call leg identifier for correlating the report with call-control, SIP,
118
+ * and media troubleshooting data.
119
+ */
120
+ telnyx_leg_id?: string;
121
+
122
+ /**
123
+ * Telnyx RTC session identifier for correlating the report with Voice SDK
124
+ * signaling and media-session logs.
125
+ */
126
+ telnyx_session_id?: string;
127
+
128
+ /**
129
+ * Voice SDK user agent string reported by the client. This is the preferred
130
+ * SDK/platform/version dimension when present.
131
+ */
132
+ user_agent?: string;
133
+
134
+ /**
135
+ * Authenticated user that owns the call report.
136
+ */
137
+ user_id?: string;
138
+
139
+ /**
140
+ * Legacy SDK version value when the client reports one separately from the user
141
+ * agent.
142
+ */
143
+ version?: string;
144
+
145
+ /**
146
+ * Voice SDK instance identifier.
147
+ */
148
+ voice_sdk_id?: string;
149
+
150
+ /**
151
+ * Decoded Voice SDK identifier metadata emitted by voice-sdk-proxy when available.
152
+ */
153
+ voice_sdk_id_decoded?: { [key: string]: unknown };
154
+
155
+ /**
156
+ * Voice SDK session correlation identifier used to group stats segments for the
157
+ * same SDK session.
158
+ */
159
+ voice_sdk_session_id?: string;
160
+
161
+ [k: string]: unknown;
162
+ }
163
+
164
+ 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
+ * Raw logs object emitted by the Voice SDK when logs are grouped under an entries
194
+ * field.
195
+ */
196
+ export interface Entries {
197
+ /**
198
+ * Raw log entries when the SDK groups logs under an entries field.
199
+ */
200
+ entries?: Array<Entries.Entry>;
201
+
202
+ [k: string]: unknown;
203
+ }
204
+
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
+ /**
235
+ * Raw stats object emitted by the Voice SDK.
236
+ */
237
+ export interface UnionMember1 {
238
+ /**
239
+ * Raw audio stats such as inbound/outbound packet, byte, jitter, packet-loss,
240
+ * bitrate, and audio-level metrics.
241
+ */
242
+ audio?: { [key: string]: unknown };
243
+
244
+ /**
245
+ * Raw connection stats such as round-trip time, packets, and bytes sent or
246
+ * received.
247
+ */
248
+ connection?: { [key: string]: unknown };
249
+
250
+ /**
251
+ * Raw ICE candidate-pair information, including selected pair, local/remote
252
+ * candidates, state, and nomination data when provided by the SDK.
253
+ */
254
+ ice?: { [key: string]: unknown };
255
+
256
+ /**
257
+ * Raw transport stats such as ICE state, DTLS state, SRTP cipher, TLS version, and
258
+ * selected-candidate-pair changes.
259
+ */
260
+ transport?: { [key: string]: unknown };
261
+
262
+ [k: string]: unknown;
263
+ }
264
+ }
265
+ }
266
+
267
+ /**
268
+ * A raw call report stats JSON payload. The schema is intentionally permissive
269
+ * because Voice SDK clients can add fields over time.
270
+ */
271
+ export interface VoiceSDKCallReportListResponse {
272
+ /**
273
+ * Unique call identifier.
274
+ */
275
+ call_id?: string;
276
+
277
+ /**
278
+ * User-scoped storage grouping identifier derived from the authenticated user.
279
+ * This is not a unique per-call report identifier and may be shared by multiple
280
+ * calls for the same user.
281
+ */
282
+ call_report_id?: string;
283
+
284
+ /**
285
+ * Creation timestamp when present.
286
+ */
287
+ created_at?: string;
288
+
289
+ /**
290
+ * Reason the SDK flushed this stats report segment, for example an intermediate
291
+ * socket-close flush.
292
+ */
293
+ flushReason?: { [key: string]: unknown };
294
+
295
+ /**
296
+ * Raw logs payload emitted by the Voice SDK and stored without normalization. Live
297
+ * responses commonly return an array of log entries, but object-shaped log
298
+ * payloads are also allowed for compatibility.
299
+ */
300
+ logs?: Array<VoiceSDKCallReportListResponse.UnionMember0> | VoiceSDKCallReportListResponse.Entries;
301
+
302
+ /**
303
+ * Organization associated with the stored call report when provided by the Voice
304
+ * SDK reporting path.
305
+ */
306
+ organization_id?: string;
307
+
308
+ /**
309
+ * Zero-based stats segment index when the SDK sends segmented or intermediate
310
+ * reports.
311
+ */
312
+ segment?: number;
313
+
314
+ /**
315
+ * Raw stats payload emitted by the Voice SDK and stored without normalization. The
316
+ * exact shape can vary by SDK platform and version. Live responses commonly return
317
+ * an array of interval snapshots, but object-shaped stats payloads are also
318
+ * allowed for compatibility.
319
+ */
320
+ stats?: Array<{ [key: string]: unknown }> | VoiceSDKCallReportListResponse.UnionMember1;
321
+
322
+ /**
323
+ * Time when the call report was stored.
324
+ */
325
+ stored_at?: string;
326
+
327
+ /**
328
+ * High-level call metadata.
329
+ */
330
+ summary?: { [key: string]: unknown };
331
+
332
+ /**
333
+ * Telnyx call leg identifier for correlating the report with call-control, SIP,
334
+ * and media troubleshooting data.
335
+ */
336
+ telnyx_leg_id?: string;
337
+
338
+ /**
339
+ * Telnyx RTC session identifier for correlating the report with Voice SDK
340
+ * signaling and media-session logs.
341
+ */
342
+ telnyx_session_id?: string;
343
+
344
+ /**
345
+ * Voice SDK user agent string reported by the client. This is the preferred
346
+ * SDK/platform/version dimension when present.
347
+ */
348
+ user_agent?: string;
349
+
350
+ /**
351
+ * Authenticated user that owns the call report.
352
+ */
353
+ user_id?: string;
354
+
355
+ /**
356
+ * Legacy SDK version value when the client reports one separately from the user
357
+ * agent.
358
+ */
359
+ version?: string;
360
+
361
+ /**
362
+ * Voice SDK instance identifier.
363
+ */
364
+ voice_sdk_id?: string;
365
+
366
+ /**
367
+ * Decoded Voice SDK identifier metadata emitted by voice-sdk-proxy when available.
368
+ */
369
+ voice_sdk_id_decoded?: { [key: string]: unknown };
370
+
371
+ /**
372
+ * Voice SDK session correlation identifier used to group stats segments for the
373
+ * same SDK session.
374
+ */
375
+ voice_sdk_session_id?: string;
376
+
377
+ [k: string]: unknown;
378
+ }
379
+
380
+ 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
+ /**
409
+ * Raw logs object emitted by the Voice SDK when logs are grouped under an entries
410
+ * field.
411
+ */
412
+ export interface Entries {
413
+ /**
414
+ * Raw log entries when the SDK groups logs under an entries field.
415
+ */
416
+ entries?: Array<Entries.Entry>;
417
+
418
+ [k: string]: unknown;
419
+ }
420
+
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
+ /**
451
+ * Raw stats object emitted by the Voice SDK.
452
+ */
453
+ export interface UnionMember1 {
454
+ /**
455
+ * Raw audio stats such as inbound/outbound packet, byte, jitter, packet-loss,
456
+ * bitrate, and audio-level metrics.
457
+ */
458
+ audio?: { [key: string]: unknown };
459
+
460
+ /**
461
+ * Raw connection stats such as round-trip time, packets, and bytes sent or
462
+ * received.
463
+ */
464
+ connection?: { [key: string]: unknown };
465
+
466
+ /**
467
+ * Raw ICE candidate-pair information, including selected pair, local/remote
468
+ * candidates, state, and nomination data when provided by the SDK.
469
+ */
470
+ ice?: { [key: string]: unknown };
471
+
472
+ /**
473
+ * Raw transport stats such as ICE state, DTLS state, SRTP cipher, TLS version, and
474
+ * selected-candidate-pair changes.
475
+ */
476
+ transport?: { [key: string]: unknown };
477
+
478
+ [k: string]: unknown;
479
+ }
480
+ }
481
+
482
+ export interface VoiceSDKCallReportListParams extends DefaultFlatPaginationParams {
483
+ /**
484
+ * Set the order of the results by creation date. `asc` and `created_at` sort
485
+ * oldest reports first; `desc` and `-created_at` sort newest reports first. If not
486
+ * given, results are sorted by creation date in descending order.
487
+ */
488
+ sort?: 'asc' | 'desc' | 'created_at' | '-created_at';
489
+ }
490
+
491
+ export declare namespace VoiceSDKCallReports {
492
+ export {
493
+ type VoiceSDKCallReportRetrieveResponse as VoiceSDKCallReportRetrieveResponse,
494
+ type VoiceSDKCallReportListResponse as VoiceSDKCallReportListResponse,
495
+ type VoiceSDKCallReportListResponsesDefaultFlatPagination as VoiceSDKCallReportListResponsesDefaultFlatPagination,
496
+ type VoiceSDKCallReportListParams as VoiceSDKCallReportListParams,
497
+ };
498
+ }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '6.68.0'; // x-release-please-version
1
+ export const VERSION = '6.70.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "6.68.0";
1
+ export declare const VERSION = "6.70.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "6.68.0";
1
+ export declare const VERSION = "6.70.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.68.0'; // x-release-please-version
4
+ exports.VERSION = '6.70.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '6.68.0'; // x-release-please-version
1
+ export const VERSION = '6.70.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map