telnyx 6.47.0 → 6.49.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 (113) hide show
  1. package/CHANGELOG.md +24 -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/ai.d.mts +2 -2
  12. package/resources/ai/ai.d.mts.map +1 -1
  13. package/resources/ai/ai.d.ts +2 -2
  14. package/resources/ai/ai.d.ts.map +1 -1
  15. package/resources/ai/ai.js.map +1 -1
  16. package/resources/ai/ai.mjs.map +1 -1
  17. package/resources/ai/assistants/assistants.d.mts +142 -324
  18. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  19. package/resources/ai/assistants/assistants.d.ts +142 -324
  20. package/resources/ai/assistants/assistants.d.ts.map +1 -1
  21. package/resources/ai/assistants/assistants.js.map +1 -1
  22. package/resources/ai/assistants/assistants.mjs.map +1 -1
  23. package/resources/ai/assistants/canary-deploys.d.mts +246 -30
  24. package/resources/ai/assistants/canary-deploys.d.mts.map +1 -1
  25. package/resources/ai/assistants/canary-deploys.d.ts +246 -30
  26. package/resources/ai/assistants/canary-deploys.d.ts.map +1 -1
  27. package/resources/ai/assistants/canary-deploys.js +0 -10
  28. package/resources/ai/assistants/canary-deploys.js.map +1 -1
  29. package/resources/ai/assistants/canary-deploys.mjs +0 -10
  30. package/resources/ai/assistants/canary-deploys.mjs.map +1 -1
  31. package/resources/ai/assistants/index.d.mts +2 -2
  32. package/resources/ai/assistants/index.d.mts.map +1 -1
  33. package/resources/ai/assistants/index.d.ts +2 -2
  34. package/resources/ai/assistants/index.d.ts.map +1 -1
  35. package/resources/ai/assistants/index.js.map +1 -1
  36. package/resources/ai/assistants/index.mjs.map +1 -1
  37. package/resources/ai/assistants/versions.d.mts +6 -214
  38. package/resources/ai/assistants/versions.d.mts.map +1 -1
  39. package/resources/ai/assistants/versions.d.ts +6 -214
  40. package/resources/ai/assistants/versions.d.ts.map +1 -1
  41. package/resources/ai/index.d.mts +1 -1
  42. package/resources/ai/index.d.mts.map +1 -1
  43. package/resources/ai/index.d.ts +1 -1
  44. package/resources/ai/index.d.ts.map +1 -1
  45. package/resources/ai/index.js.map +1 -1
  46. package/resources/ai/index.mjs.map +1 -1
  47. package/resources/calls/actions.d.mts +52 -4
  48. package/resources/calls/actions.d.mts.map +1 -1
  49. package/resources/calls/actions.d.ts +52 -4
  50. package/resources/calls/actions.d.ts.map +1 -1
  51. package/resources/conferences/actions.d.mts +13 -1
  52. package/resources/conferences/actions.d.mts.map +1 -1
  53. package/resources/conferences/actions.d.ts +13 -1
  54. package/resources/conferences/actions.d.ts.map +1 -1
  55. package/resources/index.d.mts +1 -0
  56. package/resources/index.d.mts.map +1 -1
  57. package/resources/index.d.ts +1 -0
  58. package/resources/index.d.ts.map +1 -1
  59. package/resources/index.js +4 -2
  60. package/resources/index.js.map +1 -1
  61. package/resources/index.mjs +1 -0
  62. package/resources/index.mjs.map +1 -1
  63. package/resources/uac-connections/actions.d.mts +65 -0
  64. package/resources/uac-connections/actions.d.mts.map +1 -0
  65. package/resources/uac-connections/actions.d.ts +65 -0
  66. package/resources/uac-connections/actions.d.ts.map +1 -0
  67. package/resources/uac-connections/actions.js +29 -0
  68. package/resources/uac-connections/actions.js.map +1 -0
  69. package/resources/uac-connections/actions.mjs +25 -0
  70. package/resources/uac-connections/actions.mjs.map +1 -0
  71. package/resources/uac-connections/index.d.mts +3 -0
  72. package/resources/uac-connections/index.d.mts.map +1 -0
  73. package/resources/uac-connections/index.d.ts +3 -0
  74. package/resources/uac-connections/index.d.ts.map +1 -0
  75. package/resources/uac-connections/index.js +9 -0
  76. package/resources/uac-connections/index.js.map +1 -0
  77. package/resources/uac-connections/index.mjs +4 -0
  78. package/resources/uac-connections/index.mjs.map +1 -0
  79. package/resources/uac-connections/uac-connections.d.mts +2588 -0
  80. package/resources/uac-connections/uac-connections.d.mts.map +1 -0
  81. package/resources/uac-connections/uac-connections.d.ts +2588 -0
  82. package/resources/uac-connections/uac-connections.d.ts.map +1 -0
  83. package/resources/uac-connections/uac-connections.js +97 -0
  84. package/resources/uac-connections/uac-connections.js.map +1 -0
  85. package/resources/uac-connections/uac-connections.mjs +92 -0
  86. package/resources/uac-connections/uac-connections.mjs.map +1 -0
  87. package/resources/uac-connections.d.mts +2 -0
  88. package/resources/uac-connections.d.mts.map +1 -0
  89. package/resources/uac-connections.d.ts +2 -0
  90. package/resources/uac-connections.d.ts.map +1 -0
  91. package/resources/uac-connections.js +6 -0
  92. package/resources/uac-connections.js.map +1 -0
  93. package/resources/uac-connections.mjs +3 -0
  94. package/resources/uac-connections.mjs.map +1 -0
  95. package/src/client.ts +30 -0
  96. package/src/resources/ai/ai.ts +12 -0
  97. package/src/resources/ai/assistants/assistants.ts +167 -377
  98. package/src/resources/ai/assistants/canary-deploys.ts +280 -31
  99. package/src/resources/ai/assistants/index.ts +6 -1
  100. package/src/resources/ai/assistants/versions.ts +6 -250
  101. package/src/resources/ai/index.ts +6 -0
  102. package/src/resources/calls/actions.ts +64 -4
  103. package/src/resources/conferences/actions.ts +16 -1
  104. package/src/resources/index.ts +12 -0
  105. package/src/resources/uac-connections/actions.ts +83 -0
  106. package/src/resources/uac-connections/index.ts +15 -0
  107. package/src/resources/uac-connections/uac-connections.ts +3153 -0
  108. package/src/resources/uac-connections.ts +3 -0
  109. package/src/version.ts +1 -1
  110. package/version.d.mts +1 -1
  111. package/version.d.ts +1 -1
  112. package/version.js +1 -1
  113. package/version.mjs +1 -1
@@ -8,6 +8,10 @@ export {
8
8
  type AssistantsList,
9
9
  type AudioVisualizerConfig,
10
10
  type EnabledFeatures,
11
+ type ExternalLlm,
12
+ type ExternalLlmReq,
13
+ type FallbackConfig,
14
+ type FallbackConfigReq,
11
15
  type HangupTool,
12
16
  type HangupToolParams,
13
17
  type ImportMetadata,
@@ -17,6 +21,8 @@ export {
17
21
  type MessagingSettings,
18
22
  type Observability,
19
23
  type ObservabilityReq,
24
+ type PostConversationSettings,
25
+ type PostConversationSettingsReq,
20
26
  type PrivacySettings,
21
27
  type RetrievalTool,
22
28
  type TelephonySettings,
@@ -2673,6 +2673,8 @@ export interface ActionGatherUsingAIParams {
2673
2673
  * - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
2674
2674
  * - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
2675
2675
  * `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
2676
+ * - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
2677
+ * `ara`, `rex`, `sal`, `leo`.
2676
2678
  */
2677
2679
  voice?: string;
2678
2680
 
@@ -2685,7 +2687,8 @@ export interface ActionGatherUsingAIParams {
2685
2687
  | AwsVoiceSettings
2686
2688
  | Shared.AzureVoiceSettings
2687
2689
  | Shared.RimeVoiceSettings
2688
- | Shared.ResembleVoiceSettings;
2690
+ | Shared.ResembleVoiceSettings
2691
+ | ActionGatherUsingAIParams.XaiVoiceSettings;
2689
2692
  }
2690
2693
 
2691
2694
  export namespace ActionGatherUsingAIParams {
@@ -2700,6 +2703,18 @@ export namespace ActionGatherUsingAIParams {
2700
2703
  */
2701
2704
  role?: 'assistant' | 'user';
2702
2705
  }
2706
+
2707
+ export interface XaiVoiceSettings {
2708
+ /**
2709
+ * Voice settings provider type
2710
+ */
2711
+ type: 'xai';
2712
+
2713
+ /**
2714
+ * Language code, or `auto` to detect automatically.
2715
+ */
2716
+ language?: string;
2717
+ }
2703
2718
  }
2704
2719
 
2705
2720
  export interface ActionGatherUsingAudioParams {
@@ -2832,6 +2847,8 @@ export interface ActionGatherUsingSpeakParams {
2832
2847
  * `voice_settings` to configure precision, sample_rate, and format.
2833
2848
  * - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
2834
2849
  * `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
2850
+ * - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
2851
+ * `ara`, `rex`, `sal`, `leo`.
2835
2852
  *
2836
2853
  * For service_level basic, you may define the gender of the speaker (male or
2837
2854
  * female).
@@ -2954,7 +2971,8 @@ export interface ActionGatherUsingSpeakParams {
2954
2971
  | Shared.AzureVoiceSettings
2955
2972
  | Shared.RimeVoiceSettings
2956
2973
  | Shared.ResembleVoiceSettings
2957
- | ActionGatherUsingSpeakParams.InworldVoiceSettings;
2974
+ | ActionGatherUsingSpeakParams.InworldVoiceSettings
2975
+ | ActionGatherUsingSpeakParams.XaiVoiceSettings;
2958
2976
  }
2959
2977
 
2960
2978
  export namespace ActionGatherUsingSpeakParams {
@@ -2964,6 +2982,18 @@ export namespace ActionGatherUsingSpeakParams {
2964
2982
  */
2965
2983
  type: 'inworld';
2966
2984
  }
2985
+
2986
+ export interface XaiVoiceSettings {
2987
+ /**
2988
+ * Voice settings provider type
2989
+ */
2990
+ type: 'xai';
2991
+
2992
+ /**
2993
+ * Language code, or `auto` to detect automatically.
2994
+ */
2995
+ language?: string;
2996
+ }
2967
2997
  }
2968
2998
 
2969
2999
  export interface ActionHangupParams {
@@ -3239,6 +3269,8 @@ export interface ActionSpeakParams {
3239
3269
  * `voice_settings` to configure precision, sample_rate, and format.
3240
3270
  * - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
3241
3271
  * `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
3272
+ * - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
3273
+ * `ara`, `rex`, `sal`, `leo`.
3242
3274
  *
3243
3275
  * For service_level basic, you may define the gender of the speaker (male or
3244
3276
  * female).
@@ -3334,7 +3366,8 @@ export interface ActionSpeakParams {
3334
3366
  | Shared.AzureVoiceSettings
3335
3367
  | Shared.RimeVoiceSettings
3336
3368
  | Shared.ResembleVoiceSettings
3337
- | ActionSpeakParams.InworldVoiceSettings;
3369
+ | ActionSpeakParams.InworldVoiceSettings
3370
+ | ActionSpeakParams.XaiVoiceSettings;
3338
3371
  }
3339
3372
 
3340
3373
  export namespace ActionSpeakParams {
@@ -3344,6 +3377,18 @@ export namespace ActionSpeakParams {
3344
3377
  */
3345
3378
  type: 'inworld';
3346
3379
  }
3380
+
3381
+ export interface XaiVoiceSettings {
3382
+ /**
3383
+ * Voice settings provider type
3384
+ */
3385
+ type: 'xai';
3386
+
3387
+ /**
3388
+ * Language code, or `auto` to detect automatically.
3389
+ */
3390
+ language?: string;
3391
+ }
3347
3392
  }
3348
3393
 
3349
3394
  export interface ActionStartAIAssistantParams {
@@ -3434,6 +3479,8 @@ export interface ActionStartAIAssistantParams {
3434
3479
  * - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
3435
3480
  * - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
3436
3481
  * `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
3482
+ * - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
3483
+ * `ara`, `rex`, `sal`, `leo`.
3437
3484
  */
3438
3485
  voice?: string;
3439
3486
 
@@ -3446,7 +3493,8 @@ export interface ActionStartAIAssistantParams {
3446
3493
  | AwsVoiceSettings
3447
3494
  | Shared.AzureVoiceSettings
3448
3495
  | Shared.RimeVoiceSettings
3449
- | Shared.ResembleVoiceSettings;
3496
+ | Shared.ResembleVoiceSettings
3497
+ | ActionStartAIAssistantParams.XaiVoiceSettings;
3450
3498
  }
3451
3499
 
3452
3500
  export namespace ActionStartAIAssistantParams {
@@ -3614,6 +3662,18 @@ export namespace ActionStartAIAssistantParams {
3614
3662
  */
3615
3663
  on_hangup?: 'continue_conversation' | 'end_conversation';
3616
3664
  }
3665
+
3666
+ export interface XaiVoiceSettings {
3667
+ /**
3668
+ * Voice settings provider type
3669
+ */
3670
+ type: 'xai';
3671
+
3672
+ /**
3673
+ * Language code, or `auto` to detect automatically.
3674
+ */
3675
+ language?: string;
3676
+ }
3617
3677
  }
3618
3678
 
3619
3679
  export interface ActionStartForkingParams {
@@ -940,6 +940,8 @@ export interface ActionSpeakParams {
940
940
  * `voice_settings` to configure precision, sample_rate, and format.
941
941
  * - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
942
942
  * `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
943
+ * - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
944
+ * `ara`, `rex`, `sal`, `leo`.
943
945
  *
944
946
  * For service_level basic, you may define the gender of the speaker (male or
945
947
  * female).
@@ -1017,7 +1019,8 @@ export interface ActionSpeakParams {
1017
1019
  | Shared.AzureVoiceSettings
1018
1020
  | Shared.RimeVoiceSettings
1019
1021
  | Shared.ResembleVoiceSettings
1020
- | ActionSpeakParams.InworldVoiceSettings;
1022
+ | ActionSpeakParams.InworldVoiceSettings
1023
+ | ActionSpeakParams.XaiVoiceSettings;
1021
1024
  }
1022
1025
 
1023
1026
  export namespace ActionSpeakParams {
@@ -1027,6 +1030,18 @@ export namespace ActionSpeakParams {
1027
1030
  */
1028
1031
  type: 'inworld';
1029
1032
  }
1033
+
1034
+ export interface XaiVoiceSettings {
1035
+ /**
1036
+ * Voice settings provider type
1037
+ */
1038
+ type: 'xai';
1039
+
1040
+ /**
1041
+ * Language code, or `auto` to detect automatically.
1042
+ */
1043
+ language?: string;
1044
+ }
1030
1045
  }
1031
1046
 
1032
1047
  export interface ActionStopParams {
@@ -1242,6 +1242,18 @@ export {
1242
1242
  type TrafficPolicyProfilesDefaultFlatPagination,
1243
1243
  type TrafficPolicyProfileListServicesResponsesDefaultFlatPagination,
1244
1244
  } from './traffic-policy-profiles';
1245
+ export {
1246
+ UacConnections,
1247
+ type UacConnectionCreateResponse,
1248
+ type UacConnectionRetrieveResponse,
1249
+ type UacConnectionUpdateResponse,
1250
+ type UacConnectionListResponse,
1251
+ type UacConnectionDeleteResponse,
1252
+ type UacConnectionCreateParams,
1253
+ type UacConnectionUpdateParams,
1254
+ type UacConnectionListParams,
1255
+ type UacConnectionListResponsesDefaultFlatPagination,
1256
+ } from './uac-connections/uac-connections';
1245
1257
  export {
1246
1258
  UsageReports,
1247
1259
  type UsageReportListResponse,
@@ -0,0 +1,83 @@
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 { RequestOptions } from '../../internal/request-options';
6
+ import { path } from '../../internal/utils/path';
7
+
8
+ /**
9
+ * UAC connection operations
10
+ */
11
+ export class Actions extends APIResource {
12
+ /**
13
+ * Checks the registration status for a UAC connection (`registration_status`) as
14
+ * well as the timestamp for the last SIP registration event
15
+ * (`registration_status_updated_at`).
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * const response =
20
+ * await client.uacConnections.actions.checkRegistrationStatus(
21
+ * 'id',
22
+ * );
23
+ * ```
24
+ */
25
+ checkRegistrationStatus(
26
+ id: string,
27
+ options?: RequestOptions,
28
+ ): APIPromise<ActionCheckRegistrationStatusResponse> {
29
+ return this._client.post(path`/uac_connections/${id}/actions/check_registration_status`, options);
30
+ }
31
+ }
32
+
33
+ export interface ActionCheckRegistrationStatusResponse {
34
+ data?: ActionCheckRegistrationStatusResponse.Data;
35
+ }
36
+
37
+ export namespace ActionCheckRegistrationStatusResponse {
38
+ export interface Data {
39
+ /**
40
+ * The ip used during the SIP connection
41
+ */
42
+ ip_address?: string;
43
+
44
+ /**
45
+ * ISO 8601 formatted date indicating when the resource was last updated.
46
+ */
47
+ last_registration?: string;
48
+
49
+ /**
50
+ * The port of the SIP connection
51
+ */
52
+ port?: number;
53
+
54
+ /**
55
+ * Identifies the type of the resource.
56
+ */
57
+ record_type?: string;
58
+
59
+ /**
60
+ * The user name of the SIP connection
61
+ */
62
+ sip_username?: string;
63
+
64
+ /**
65
+ * The current registration status of your SIP connection
66
+ */
67
+ status?: 'Not Applicable' | 'Not Registered' | 'Failed' | 'Expired' | 'Registered' | 'Unregistered';
68
+
69
+ /**
70
+ * The protocol of the SIP connection
71
+ */
72
+ transport?: string;
73
+
74
+ /**
75
+ * The user agent of the SIP connection
76
+ */
77
+ user_agent?: string;
78
+ }
79
+ }
80
+
81
+ export declare namespace Actions {
82
+ export { type ActionCheckRegistrationStatusResponse as ActionCheckRegistrationStatusResponse };
83
+ }
@@ -0,0 +1,15 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export { Actions, type ActionCheckRegistrationStatusResponse } from './actions';
4
+ export {
5
+ UacConnections,
6
+ type UacConnectionCreateResponse,
7
+ type UacConnectionRetrieveResponse,
8
+ type UacConnectionUpdateResponse,
9
+ type UacConnectionListResponse,
10
+ type UacConnectionDeleteResponse,
11
+ type UacConnectionCreateParams,
12
+ type UacConnectionUpdateParams,
13
+ type UacConnectionListParams,
14
+ type UacConnectionListResponsesDefaultFlatPagination,
15
+ } from './uac-connections';