telnyx 5.68.1 → 5.69.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +39 -0
- data/README.md +1 -1
- data/lib/telnyx/client.rb +7 -0
- data/lib/telnyx/internal/util.rb +18 -4
- data/lib/telnyx/lib/webhook_verification.rb +1 -0
- data/lib/telnyx/lib/webhook_verification_error.rb +27 -0
- data/lib/telnyx/lib/webhooks_ed25519.rb +50 -0
- data/lib/telnyx/models/ai/assistant_create_params.rb +47 -1
- data/lib/telnyx/models/ai/assistant_tool.rb +25 -5
- data/lib/telnyx/models/ai/assistant_update_params.rb +47 -1
- data/lib/telnyx/models/ai/assistants/update_assistant.rb +48 -1
- data/lib/telnyx/models/ai/audio_transcribe_response.rb +70 -7
- data/lib/telnyx/models/ai/inference_embedding.rb +48 -1
- data/lib/telnyx/models/ai/telephony_settings.rb +13 -1
- data/lib/telnyx/models/pronunciation_dict_create_params.rb +141 -0
- data/lib/telnyx/models/pronunciation_dict_create_response.rb +207 -0
- data/lib/telnyx/models/pronunciation_dict_delete_params.rb +20 -0
- data/lib/telnyx/models/pronunciation_dict_list_params.rb +30 -0
- data/lib/telnyx/models/pronunciation_dict_list_response.rb +190 -0
- data/lib/telnyx/models/pronunciation_dict_retrieve_params.rb +20 -0
- data/lib/telnyx/models/pronunciation_dict_retrieve_response.rb +207 -0
- data/lib/telnyx/models/pronunciation_dict_update_params.rb +144 -0
- data/lib/telnyx/models/pronunciation_dict_update_response.rb +207 -0
- data/lib/telnyx/models/texml/accounts/call_calls_params.rb +1893 -547
- data/lib/telnyx/models/texml_initiate_ai_call_params.rb +514 -0
- data/lib/telnyx/models/texml_initiate_ai_call_response.rb +34 -0
- data/lib/telnyx/models/verification.rb +1 -0
- data/lib/telnyx/models/verification_trigger_whatsapp_verification_params.rb +46 -0
- data/lib/telnyx/models/verify_profile_create_params.rb +43 -1
- data/lib/telnyx/models/verify_profile_update_params.rb +43 -1
- data/lib/telnyx/models/whatsapp_message_content.rb +196 -1
- data/lib/telnyx/models/wireless_blocklist_update_params.rb +8 -21
- data/lib/telnyx/models.rb +15 -0
- data/lib/telnyx/resources/ai/assistants/versions.rb +3 -1
- data/lib/telnyx/resources/ai/assistants.rb +6 -2
- data/lib/telnyx/resources/pronunciation_dicts.rb +156 -0
- data/lib/telnyx/resources/texml/accounts/calls.rb +3 -84
- data/lib/telnyx/resources/texml.rb +106 -0
- data/lib/telnyx/resources/verifications.rb +28 -0
- data/lib/telnyx/resources/verify_profiles.rb +5 -2
- data/lib/telnyx/resources/wireless_blocklists.rb +5 -5
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +13 -0
- data/rbi/telnyx/client.rbi +6 -0
- data/rbi/telnyx/internal/util.rbi +8 -0
- data/rbi/telnyx/models/ai/assistant_create_params.rbi +130 -0
- data/rbi/telnyx/models/ai/assistant_tool.rbi +56 -5
- data/rbi/telnyx/models/ai/assistant_update_params.rbi +130 -0
- data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +132 -0
- data/rbi/telnyx/models/ai/audio_transcribe_response.rbi +123 -10
- data/rbi/telnyx/models/ai/inference_embedding.rbi +130 -0
- data/rbi/telnyx/models/ai/telephony_settings.rbi +13 -0
- data/rbi/telnyx/models/pronunciation_dict_create_params.rbi +246 -0
- data/rbi/telnyx/models/pronunciation_dict_create_response.rbi +398 -0
- data/rbi/telnyx/models/pronunciation_dict_delete_params.rbi +38 -0
- data/rbi/telnyx/models/pronunciation_dict_list_params.rbi +57 -0
- data/rbi/telnyx/models/pronunciation_dict_list_response.rbi +353 -0
- data/rbi/telnyx/models/pronunciation_dict_retrieve_params.rbi +38 -0
- data/rbi/telnyx/models/pronunciation_dict_retrieve_response.rbi +398 -0
- data/rbi/telnyx/models/pronunciation_dict_update_params.rbi +268 -0
- data/rbi/telnyx/models/pronunciation_dict_update_response.rbi +398 -0
- data/rbi/telnyx/models/texml/accounts/call_calls_params.rbi +3719 -1011
- data/rbi/telnyx/models/texml_initiate_ai_call_params.rbi +1010 -0
- data/rbi/telnyx/models/texml_initiate_ai_call_response.rbi +58 -0
- data/rbi/telnyx/models/verification.rbi +1 -0
- data/rbi/telnyx/models/verification_trigger_whatsapp_verification_params.rbi +73 -0
- data/rbi/telnyx/models/verify_profile_create_params.rbi +85 -0
- data/rbi/telnyx/models/verify_profile_update_params.rbi +85 -0
- data/rbi/telnyx/models/whatsapp_message_content.rbi +492 -0
- data/rbi/telnyx/models/wireless_blocklist_update_params.rbi +6 -49
- data/rbi/telnyx/models.rbi +19 -10
- data/rbi/telnyx/resources/ai/assistants/versions.rbi +4 -0
- data/rbi/telnyx/resources/ai/assistants.rbi +6 -0
- data/rbi/telnyx/resources/pronunciation_dicts.rbi +131 -0
- data/rbi/telnyx/resources/texml/accounts/calls.rbi +7 -163
- data/rbi/telnyx/resources/texml.rbi +164 -0
- data/rbi/telnyx/resources/verifications.rbi +23 -0
- data/rbi/telnyx/resources/verify_profiles.rbi +4 -0
- data/rbi/telnyx/resources/wireless_blocklists.rbi +3 -3
- data/sig/telnyx/client.rbs +2 -0
- data/sig/telnyx/internal/util.rbs +4 -0
- data/sig/telnyx/models/ai/assistant_create_params.rbs +62 -0
- data/sig/telnyx/models/ai/assistant_tool.rbs +17 -4
- data/sig/telnyx/models/ai/assistant_update_params.rbs +62 -0
- data/sig/telnyx/models/ai/assistants/update_assistant.rbs +62 -0
- data/sig/telnyx/models/ai/audio_transcribe_response.rbs +53 -3
- data/sig/telnyx/models/ai/inference_embedding.rbs +62 -0
- data/sig/telnyx/models/ai/telephony_settings.rbs +7 -0
- data/sig/telnyx/models/pronunciation_dict_create_params.rbs +97 -0
- data/sig/telnyx/models/pronunciation_dict_create_response.rbs +167 -0
- data/sig/telnyx/models/pronunciation_dict_delete_params.rbs +20 -0
- data/sig/telnyx/models/pronunciation_dict_list_params.rbs +32 -0
- data/sig/telnyx/models/pronunciation_dict_list_response.rbs +144 -0
- data/sig/telnyx/models/pronunciation_dict_retrieve_params.rbs +20 -0
- data/sig/telnyx/models/pronunciation_dict_retrieve_response.rbs +167 -0
- data/sig/telnyx/models/pronunciation_dict_update_params.rbs +108 -0
- data/sig/telnyx/models/pronunciation_dict_update_response.rbs +167 -0
- data/sig/telnyx/models/texml/accounts/call_calls_params.rbs +1368 -331
- data/sig/telnyx/models/texml_initiate_ai_call_params.rbs +444 -0
- data/sig/telnyx/models/texml_initiate_ai_call_response.rbs +38 -0
- data/sig/telnyx/models/verification.rbs +2 -1
- data/sig/telnyx/models/verification_trigger_whatsapp_verification_params.rbs +43 -0
- data/sig/telnyx/models/verify_profile_create_params.rbs +43 -1
- data/sig/telnyx/models/verify_profile_update_params.rbs +43 -1
- data/sig/telnyx/models/whatsapp_message_content.rbs +205 -0
- data/sig/telnyx/models/wireless_blocklist_update_params.rbs +5 -25
- data/sig/telnyx/models.rbs +14 -0
- data/sig/telnyx/resources/ai/assistants/versions.rbs +1 -0
- data/sig/telnyx/resources/ai/assistants.rbs +2 -0
- data/sig/telnyx/resources/pronunciation_dicts.rbs +33 -0
- data/sig/telnyx/resources/texml/accounts/calls.rbs +1 -40
- data/sig/telnyx/resources/texml.rbs +44 -0
- data/sig/telnyx/resources/verifications.rbs +8 -0
- data/sig/telnyx/resources/verify_profiles.rbs +2 -0
- data/sig/telnyx/resources/wireless_blocklists.rbs +1 -1
- metadata +43 -2
|
@@ -96,6 +96,11 @@ module Telnyx
|
|
|
96
96
|
# @return [Telnyx::Models::AI::MessagingSettings, nil]
|
|
97
97
|
optional :messaging_settings, -> { Telnyx::AI::MessagingSettings }
|
|
98
98
|
|
|
99
|
+
# @!attribute observability_settings
|
|
100
|
+
#
|
|
101
|
+
# @return [Telnyx::Models::AI::InferenceEmbedding::ObservabilitySettings, nil]
|
|
102
|
+
optional :observability_settings, -> { Telnyx::AI::InferenceEmbedding::ObservabilitySettings }
|
|
103
|
+
|
|
99
104
|
# @!attribute privacy_settings
|
|
100
105
|
#
|
|
101
106
|
# @return [Telnyx::Models::AI::PrivacySettings, nil]
|
|
@@ -129,7 +134,7 @@ module Telnyx
|
|
|
129
134
|
# @return [Telnyx::Models::AI::WidgetSettings, nil]
|
|
130
135
|
optional :widget_settings, -> { Telnyx::AI::WidgetSettings }
|
|
131
136
|
|
|
132
|
-
# @!method initialize(id:, created_at:, instructions:, model:, name:, description: nil, dynamic_variables: nil, dynamic_variables_webhook_url: nil, enabled_features: nil, greeting: nil, import_metadata: nil, insight_settings: nil, llm_api_key_ref: nil, messaging_settings: nil, privacy_settings: nil, telephony_settings: nil, tools: nil, transcription: nil, voice_settings: nil, widget_settings: nil)
|
|
137
|
+
# @!method initialize(id:, created_at:, instructions:, model:, name:, description: nil, dynamic_variables: nil, dynamic_variables_webhook_url: nil, enabled_features: nil, greeting: nil, import_metadata: nil, insight_settings: nil, llm_api_key_ref: nil, messaging_settings: nil, observability_settings: nil, privacy_settings: nil, telephony_settings: nil, tools: nil, transcription: nil, voice_settings: nil, widget_settings: nil)
|
|
133
138
|
# Some parameter documentations has been truncated, see
|
|
134
139
|
# {Telnyx::Models::AI::InferenceEmbedding} for more details.
|
|
135
140
|
#
|
|
@@ -161,6 +166,8 @@ module Telnyx
|
|
|
161
166
|
#
|
|
162
167
|
# @param messaging_settings [Telnyx::Models::AI::MessagingSettings]
|
|
163
168
|
#
|
|
169
|
+
# @param observability_settings [Telnyx::Models::AI::InferenceEmbedding::ObservabilitySettings]
|
|
170
|
+
#
|
|
164
171
|
# @param privacy_settings [Telnyx::Models::AI::PrivacySettings]
|
|
165
172
|
#
|
|
166
173
|
# @param telephony_settings [Telnyx::Models::AI::TelephonySettings]
|
|
@@ -172,6 +179,46 @@ module Telnyx
|
|
|
172
179
|
# @param voice_settings [Telnyx::Models::AI::VoiceSettings]
|
|
173
180
|
#
|
|
174
181
|
# @param widget_settings [Telnyx::Models::AI::WidgetSettings] Configuration settings for the assistant's web widget.
|
|
182
|
+
|
|
183
|
+
# @see Telnyx::Models::AI::InferenceEmbedding#observability_settings
|
|
184
|
+
class ObservabilitySettings < Telnyx::Internal::Type::BaseModel
|
|
185
|
+
# @!attribute host
|
|
186
|
+
#
|
|
187
|
+
# @return [String, nil]
|
|
188
|
+
optional :host, String
|
|
189
|
+
|
|
190
|
+
# @!attribute public_key_ref
|
|
191
|
+
#
|
|
192
|
+
# @return [String, nil]
|
|
193
|
+
optional :public_key_ref, String
|
|
194
|
+
|
|
195
|
+
# @!attribute secret_key_ref
|
|
196
|
+
#
|
|
197
|
+
# @return [String, nil]
|
|
198
|
+
optional :secret_key_ref, String
|
|
199
|
+
|
|
200
|
+
# @!attribute status
|
|
201
|
+
#
|
|
202
|
+
# @return [Symbol, Telnyx::Models::AI::InferenceEmbedding::ObservabilitySettings::Status, nil]
|
|
203
|
+
optional :status, enum: -> { Telnyx::AI::InferenceEmbedding::ObservabilitySettings::Status }
|
|
204
|
+
|
|
205
|
+
# @!method initialize(host: nil, public_key_ref: nil, secret_key_ref: nil, status: nil)
|
|
206
|
+
# @param host [String]
|
|
207
|
+
# @param public_key_ref [String]
|
|
208
|
+
# @param secret_key_ref [String]
|
|
209
|
+
# @param status [Symbol, Telnyx::Models::AI::InferenceEmbedding::ObservabilitySettings::Status]
|
|
210
|
+
|
|
211
|
+
# @see Telnyx::Models::AI::InferenceEmbedding::ObservabilitySettings#status
|
|
212
|
+
module Status
|
|
213
|
+
extend Telnyx::Internal::Type::Enum
|
|
214
|
+
|
|
215
|
+
ENABLED = :enabled
|
|
216
|
+
DISABLED = :disabled
|
|
217
|
+
|
|
218
|
+
# @!method self.values
|
|
219
|
+
# @return [Array<Symbol>]
|
|
220
|
+
end
|
|
221
|
+
end
|
|
175
222
|
end
|
|
176
223
|
end
|
|
177
224
|
end
|
|
@@ -146,6 +146,13 @@ module Telnyx
|
|
|
146
146
|
# @return [Symbol, Telnyx::Models::AI::TelephonySettings::RecordingSettings::Channels, nil]
|
|
147
147
|
optional :channels, enum: -> { Telnyx::AI::TelephonySettings::RecordingSettings::Channels }
|
|
148
148
|
|
|
149
|
+
# @!attribute enabled
|
|
150
|
+
# Whether call recording is enabled. When set to false, calls will not be recorded
|
|
151
|
+
# regardless of other recording configuration.
|
|
152
|
+
#
|
|
153
|
+
# @return [Boolean, nil]
|
|
154
|
+
optional :enabled, Telnyx::Internal::Type::Boolean
|
|
155
|
+
|
|
149
156
|
# @!attribute file_format
|
|
150
157
|
# The format of the recording file.
|
|
151
158
|
#
|
|
@@ -154,11 +161,16 @@ module Telnyx
|
|
|
154
161
|
enum: -> { Telnyx::AI::TelephonySettings::RecordingSettings::Format },
|
|
155
162
|
api_name: :format
|
|
156
163
|
|
|
157
|
-
# @!method initialize(channels: nil, file_format: nil)
|
|
164
|
+
# @!method initialize(channels: nil, enabled: nil, file_format: nil)
|
|
165
|
+
# Some parameter documentations has been truncated, see
|
|
166
|
+
# {Telnyx::Models::AI::TelephonySettings::RecordingSettings} for more details.
|
|
167
|
+
#
|
|
158
168
|
# Configuration for call recording format and channel settings.
|
|
159
169
|
#
|
|
160
170
|
# @param channels [Symbol, Telnyx::Models::AI::TelephonySettings::RecordingSettings::Channels] The number of channels for the recording. 'single' for mono, 'dual' for stereo.
|
|
161
171
|
#
|
|
172
|
+
# @param enabled [Boolean] Whether call recording is enabled. When set to false, calls will not be recorded
|
|
173
|
+
#
|
|
162
174
|
# @param file_format [Symbol, Telnyx::Models::AI::TelephonySettings::RecordingSettings::Format] The format of the recording file.
|
|
163
175
|
|
|
164
176
|
# The number of channels for the recording. 'single' for mono, 'dual' for stereo.
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
# @see Telnyx::Resources::PronunciationDicts#create
|
|
6
|
+
class PronunciationDictCreateParams < Telnyx::Internal::Type::BaseModel
|
|
7
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute items
|
|
11
|
+
# List of pronunciation items (alias or phoneme type). At least one item is
|
|
12
|
+
# required.
|
|
13
|
+
#
|
|
14
|
+
# @return [Array<Telnyx::Models::PronunciationDictCreateParams::Item::Alias, Telnyx::Models::PronunciationDictCreateParams::Item::Phoneme>]
|
|
15
|
+
required :items,
|
|
16
|
+
-> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::PronunciationDictCreateParams::Item] }
|
|
17
|
+
|
|
18
|
+
# @!attribute name
|
|
19
|
+
# Human-readable name. Must be unique within the organization.
|
|
20
|
+
#
|
|
21
|
+
# @return [String]
|
|
22
|
+
required :name, String
|
|
23
|
+
|
|
24
|
+
# @!method initialize(items:, name:, request_options: {})
|
|
25
|
+
# Some parameter documentations has been truncated, see
|
|
26
|
+
# {Telnyx::Models::PronunciationDictCreateParams} for more details.
|
|
27
|
+
#
|
|
28
|
+
# @param items [Array<Telnyx::Models::PronunciationDictCreateParams::Item::Alias, Telnyx::Models::PronunciationDictCreateParams::Item::Phoneme>] List of pronunciation items (alias or phoneme type). At least one item is requir
|
|
29
|
+
#
|
|
30
|
+
# @param name [String] Human-readable name. Must be unique within the organization.
|
|
31
|
+
#
|
|
32
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
|
|
33
|
+
|
|
34
|
+
# A single pronunciation dictionary item. Use type 'alias' to replace matched text
|
|
35
|
+
# with a spoken alias, or type 'phoneme' to specify exact pronunciation using IPA
|
|
36
|
+
# notation.
|
|
37
|
+
module Item
|
|
38
|
+
extend Telnyx::Internal::Type::Union
|
|
39
|
+
|
|
40
|
+
discriminator :type
|
|
41
|
+
|
|
42
|
+
# An alias pronunciation item. When the `text` value is found in input, it is replaced with the `alias` before speech synthesis.
|
|
43
|
+
variant :alias, -> { Telnyx::PronunciationDictCreateParams::Item::Alias }
|
|
44
|
+
|
|
45
|
+
# A phoneme pronunciation item. When the `text` value is found in input, it is pronounced using the specified IPA phoneme notation.
|
|
46
|
+
variant :phoneme, -> { Telnyx::PronunciationDictCreateParams::Item::Phoneme }
|
|
47
|
+
|
|
48
|
+
class Alias < Telnyx::Internal::Type::BaseModel
|
|
49
|
+
# @!attribute alias_
|
|
50
|
+
# The replacement text that will be spoken instead.
|
|
51
|
+
#
|
|
52
|
+
# @return [String]
|
|
53
|
+
required :alias_, String, api_name: :alias
|
|
54
|
+
|
|
55
|
+
# @!attribute text
|
|
56
|
+
# The text to match in the input. Case-insensitive matching is used during
|
|
57
|
+
# synthesis.
|
|
58
|
+
#
|
|
59
|
+
# @return [String]
|
|
60
|
+
required :text, String
|
|
61
|
+
|
|
62
|
+
# @!attribute type
|
|
63
|
+
# The item type.
|
|
64
|
+
#
|
|
65
|
+
# @return [Symbol, :alias]
|
|
66
|
+
required :type, const: :alias
|
|
67
|
+
|
|
68
|
+
# @!method initialize(alias_:, text:, type: :alias)
|
|
69
|
+
# Some parameter documentations has been truncated, see
|
|
70
|
+
# {Telnyx::Models::PronunciationDictCreateParams::Item::Alias} for more details.
|
|
71
|
+
#
|
|
72
|
+
# An alias pronunciation item. When the `text` value is found in input, it is
|
|
73
|
+
# replaced with the `alias` before speech synthesis.
|
|
74
|
+
#
|
|
75
|
+
# @param alias_ [String] The replacement text that will be spoken instead.
|
|
76
|
+
#
|
|
77
|
+
# @param text [String] The text to match in the input. Case-insensitive matching is used during synthes
|
|
78
|
+
#
|
|
79
|
+
# @param type [Symbol, :alias] The item type.
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
class Phoneme < Telnyx::Internal::Type::BaseModel
|
|
83
|
+
# @!attribute alphabet
|
|
84
|
+
# The phonetic alphabet used for the phoneme notation.
|
|
85
|
+
#
|
|
86
|
+
# @return [Symbol, Telnyx::Models::PronunciationDictCreateParams::Item::Phoneme::Alphabet]
|
|
87
|
+
required :alphabet, enum: -> { Telnyx::PronunciationDictCreateParams::Item::Phoneme::Alphabet }
|
|
88
|
+
|
|
89
|
+
# @!attribute phoneme
|
|
90
|
+
# The phoneme notation representing the desired pronunciation.
|
|
91
|
+
#
|
|
92
|
+
# @return [String]
|
|
93
|
+
required :phoneme, String
|
|
94
|
+
|
|
95
|
+
# @!attribute text
|
|
96
|
+
# The text to match in the input. Case-insensitive matching is used during
|
|
97
|
+
# synthesis.
|
|
98
|
+
#
|
|
99
|
+
# @return [String]
|
|
100
|
+
required :text, String
|
|
101
|
+
|
|
102
|
+
# @!attribute type
|
|
103
|
+
# The item type.
|
|
104
|
+
#
|
|
105
|
+
# @return [Symbol, :phoneme]
|
|
106
|
+
required :type, const: :phoneme
|
|
107
|
+
|
|
108
|
+
# @!method initialize(alphabet:, phoneme:, text:, type: :phoneme)
|
|
109
|
+
# Some parameter documentations has been truncated, see
|
|
110
|
+
# {Telnyx::Models::PronunciationDictCreateParams::Item::Phoneme} for more details.
|
|
111
|
+
#
|
|
112
|
+
# A phoneme pronunciation item. When the `text` value is found in input, it is
|
|
113
|
+
# pronounced using the specified IPA phoneme notation.
|
|
114
|
+
#
|
|
115
|
+
# @param alphabet [Symbol, Telnyx::Models::PronunciationDictCreateParams::Item::Phoneme::Alphabet] The phonetic alphabet used for the phoneme notation.
|
|
116
|
+
#
|
|
117
|
+
# @param phoneme [String] The phoneme notation representing the desired pronunciation.
|
|
118
|
+
#
|
|
119
|
+
# @param text [String] The text to match in the input. Case-insensitive matching is used during synthes
|
|
120
|
+
#
|
|
121
|
+
# @param type [Symbol, :phoneme] The item type.
|
|
122
|
+
|
|
123
|
+
# The phonetic alphabet used for the phoneme notation.
|
|
124
|
+
#
|
|
125
|
+
# @see Telnyx::Models::PronunciationDictCreateParams::Item::Phoneme#alphabet
|
|
126
|
+
module Alphabet
|
|
127
|
+
extend Telnyx::Internal::Type::Enum
|
|
128
|
+
|
|
129
|
+
IPA = :ipa
|
|
130
|
+
|
|
131
|
+
# @!method self.values
|
|
132
|
+
# @return [Array<Symbol>]
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# @!method self.variants
|
|
137
|
+
# @return [Array(Telnyx::Models::PronunciationDictCreateParams::Item::Alias, Telnyx::Models::PronunciationDictCreateParams::Item::Phoneme)]
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
end
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
# @see Telnyx::Resources::PronunciationDicts#create
|
|
6
|
+
class PronunciationDictCreateResponse < Telnyx::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute data
|
|
8
|
+
# A pronunciation dictionary record.
|
|
9
|
+
#
|
|
10
|
+
# @return [Telnyx::Models::PronunciationDictCreateResponse::Data, nil]
|
|
11
|
+
optional :data, -> { Telnyx::Models::PronunciationDictCreateResponse::Data }
|
|
12
|
+
|
|
13
|
+
# @!method initialize(data: nil)
|
|
14
|
+
# Response containing a single pronunciation dictionary.
|
|
15
|
+
#
|
|
16
|
+
# @param data [Telnyx::Models::PronunciationDictCreateResponse::Data] A pronunciation dictionary record.
|
|
17
|
+
|
|
18
|
+
# @see Telnyx::Models::PronunciationDictCreateResponse#data
|
|
19
|
+
class Data < Telnyx::Internal::Type::BaseModel
|
|
20
|
+
# @!attribute id
|
|
21
|
+
# Unique identifier for the pronunciation dictionary.
|
|
22
|
+
#
|
|
23
|
+
# @return [String, nil]
|
|
24
|
+
optional :id, String
|
|
25
|
+
|
|
26
|
+
# @!attribute created_at
|
|
27
|
+
# ISO 8601 timestamp with millisecond precision.
|
|
28
|
+
#
|
|
29
|
+
# @return [Time, nil]
|
|
30
|
+
optional :created_at, Time
|
|
31
|
+
|
|
32
|
+
# @!attribute items
|
|
33
|
+
# List of pronunciation items (alias or phoneme type).
|
|
34
|
+
#
|
|
35
|
+
# @return [Array<Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Alias, Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Phoneme>, nil]
|
|
36
|
+
optional :items,
|
|
37
|
+
-> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::Models::PronunciationDictCreateResponse::Data::Item] }
|
|
38
|
+
|
|
39
|
+
# @!attribute name
|
|
40
|
+
# Human-readable name for the dictionary. Must be unique within the organization.
|
|
41
|
+
#
|
|
42
|
+
# @return [String, nil]
|
|
43
|
+
optional :name, String
|
|
44
|
+
|
|
45
|
+
# @!attribute record_type
|
|
46
|
+
# Identifies the resource type.
|
|
47
|
+
#
|
|
48
|
+
# @return [Symbol, Telnyx::Models::PronunciationDictCreateResponse::Data::RecordType, nil]
|
|
49
|
+
optional :record_type, enum: -> { Telnyx::Models::PronunciationDictCreateResponse::Data::RecordType }
|
|
50
|
+
|
|
51
|
+
# @!attribute updated_at
|
|
52
|
+
# ISO 8601 timestamp with millisecond precision.
|
|
53
|
+
#
|
|
54
|
+
# @return [Time, nil]
|
|
55
|
+
optional :updated_at, Time
|
|
56
|
+
|
|
57
|
+
# @!attribute version
|
|
58
|
+
# Auto-incrementing version number. Increases by 1 on each update. Used for
|
|
59
|
+
# optimistic concurrency control and cache invalidation.
|
|
60
|
+
#
|
|
61
|
+
# @return [Integer, nil]
|
|
62
|
+
optional :version, Integer
|
|
63
|
+
|
|
64
|
+
# @!method initialize(id: nil, created_at: nil, items: nil, name: nil, record_type: nil, updated_at: nil, version: nil)
|
|
65
|
+
# Some parameter documentations has been truncated, see
|
|
66
|
+
# {Telnyx::Models::PronunciationDictCreateResponse::Data} for more details.
|
|
67
|
+
#
|
|
68
|
+
# A pronunciation dictionary record.
|
|
69
|
+
#
|
|
70
|
+
# @param id [String] Unique identifier for the pronunciation dictionary.
|
|
71
|
+
#
|
|
72
|
+
# @param created_at [Time] ISO 8601 timestamp with millisecond precision.
|
|
73
|
+
#
|
|
74
|
+
# @param items [Array<Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Alias, Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Phoneme>] List of pronunciation items (alias or phoneme type).
|
|
75
|
+
#
|
|
76
|
+
# @param name [String] Human-readable name for the dictionary. Must be unique within the organization.
|
|
77
|
+
#
|
|
78
|
+
# @param record_type [Symbol, Telnyx::Models::PronunciationDictCreateResponse::Data::RecordType] Identifies the resource type.
|
|
79
|
+
#
|
|
80
|
+
# @param updated_at [Time] ISO 8601 timestamp with millisecond precision.
|
|
81
|
+
#
|
|
82
|
+
# @param version [Integer] Auto-incrementing version number. Increases by 1 on each update. Used for optimi
|
|
83
|
+
|
|
84
|
+
# A single pronunciation dictionary item. Use type 'alias' to replace matched text
|
|
85
|
+
# with a spoken alias, or type 'phoneme' to specify exact pronunciation using IPA
|
|
86
|
+
# notation.
|
|
87
|
+
module Item
|
|
88
|
+
extend Telnyx::Internal::Type::Union
|
|
89
|
+
|
|
90
|
+
discriminator :type
|
|
91
|
+
|
|
92
|
+
# An alias pronunciation item. When the `text` value is found in input, it is replaced with the `alias` before speech synthesis.
|
|
93
|
+
variant :alias, -> { Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Alias }
|
|
94
|
+
|
|
95
|
+
# A phoneme pronunciation item. When the `text` value is found in input, it is pronounced using the specified IPA phoneme notation.
|
|
96
|
+
variant :phoneme, -> { Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Phoneme }
|
|
97
|
+
|
|
98
|
+
class Alias < Telnyx::Internal::Type::BaseModel
|
|
99
|
+
# @!attribute alias_
|
|
100
|
+
# The replacement text that will be spoken instead.
|
|
101
|
+
#
|
|
102
|
+
# @return [String]
|
|
103
|
+
required :alias_, String, api_name: :alias
|
|
104
|
+
|
|
105
|
+
# @!attribute text
|
|
106
|
+
# The text to match in the input. Case-insensitive matching is used during
|
|
107
|
+
# synthesis.
|
|
108
|
+
#
|
|
109
|
+
# @return [String]
|
|
110
|
+
required :text, String
|
|
111
|
+
|
|
112
|
+
# @!attribute type
|
|
113
|
+
# The item type.
|
|
114
|
+
#
|
|
115
|
+
# @return [Symbol, :alias]
|
|
116
|
+
required :type, const: :alias
|
|
117
|
+
|
|
118
|
+
# @!method initialize(alias_:, text:, type: :alias)
|
|
119
|
+
# Some parameter documentations has been truncated, see
|
|
120
|
+
# {Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Alias} for more
|
|
121
|
+
# details.
|
|
122
|
+
#
|
|
123
|
+
# An alias pronunciation item. When the `text` value is found in input, it is
|
|
124
|
+
# replaced with the `alias` before speech synthesis.
|
|
125
|
+
#
|
|
126
|
+
# @param alias_ [String] The replacement text that will be spoken instead.
|
|
127
|
+
#
|
|
128
|
+
# @param text [String] The text to match in the input. Case-insensitive matching is used during synthes
|
|
129
|
+
#
|
|
130
|
+
# @param type [Symbol, :alias] The item type.
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
class Phoneme < Telnyx::Internal::Type::BaseModel
|
|
134
|
+
# @!attribute alphabet
|
|
135
|
+
# The phonetic alphabet used for the phoneme notation.
|
|
136
|
+
#
|
|
137
|
+
# @return [Symbol, Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Phoneme::Alphabet]
|
|
138
|
+
required :alphabet,
|
|
139
|
+
enum: -> { Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Phoneme::Alphabet }
|
|
140
|
+
|
|
141
|
+
# @!attribute phoneme
|
|
142
|
+
# The phoneme notation representing the desired pronunciation.
|
|
143
|
+
#
|
|
144
|
+
# @return [String]
|
|
145
|
+
required :phoneme, String
|
|
146
|
+
|
|
147
|
+
# @!attribute text
|
|
148
|
+
# The text to match in the input. Case-insensitive matching is used during
|
|
149
|
+
# synthesis.
|
|
150
|
+
#
|
|
151
|
+
# @return [String]
|
|
152
|
+
required :text, String
|
|
153
|
+
|
|
154
|
+
# @!attribute type
|
|
155
|
+
# The item type.
|
|
156
|
+
#
|
|
157
|
+
# @return [Symbol, :phoneme]
|
|
158
|
+
required :type, const: :phoneme
|
|
159
|
+
|
|
160
|
+
# @!method initialize(alphabet:, phoneme:, text:, type: :phoneme)
|
|
161
|
+
# Some parameter documentations has been truncated, see
|
|
162
|
+
# {Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Phoneme} for more
|
|
163
|
+
# details.
|
|
164
|
+
#
|
|
165
|
+
# A phoneme pronunciation item. When the `text` value is found in input, it is
|
|
166
|
+
# pronounced using the specified IPA phoneme notation.
|
|
167
|
+
#
|
|
168
|
+
# @param alphabet [Symbol, Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Phoneme::Alphabet] The phonetic alphabet used for the phoneme notation.
|
|
169
|
+
#
|
|
170
|
+
# @param phoneme [String] The phoneme notation representing the desired pronunciation.
|
|
171
|
+
#
|
|
172
|
+
# @param text [String] The text to match in the input. Case-insensitive matching is used during synthes
|
|
173
|
+
#
|
|
174
|
+
# @param type [Symbol, :phoneme] The item type.
|
|
175
|
+
|
|
176
|
+
# The phonetic alphabet used for the phoneme notation.
|
|
177
|
+
#
|
|
178
|
+
# @see Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Phoneme#alphabet
|
|
179
|
+
module Alphabet
|
|
180
|
+
extend Telnyx::Internal::Type::Enum
|
|
181
|
+
|
|
182
|
+
IPA = :ipa
|
|
183
|
+
|
|
184
|
+
# @!method self.values
|
|
185
|
+
# @return [Array<Symbol>]
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# @!method self.variants
|
|
190
|
+
# @return [Array(Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Alias, Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Phoneme)]
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Identifies the resource type.
|
|
194
|
+
#
|
|
195
|
+
# @see Telnyx::Models::PronunciationDictCreateResponse::Data#record_type
|
|
196
|
+
module RecordType
|
|
197
|
+
extend Telnyx::Internal::Type::Enum
|
|
198
|
+
|
|
199
|
+
PRONUNCIATION_DICT = :pronunciation_dict
|
|
200
|
+
|
|
201
|
+
# @!method self.values
|
|
202
|
+
# @return [Array<Symbol>]
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
# @see Telnyx::Resources::PronunciationDicts#delete
|
|
6
|
+
class PronunciationDictDeleteParams < Telnyx::Internal::Type::BaseModel
|
|
7
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(id:, request_options: {})
|
|
16
|
+
# @param id [String]
|
|
17
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
# @see Telnyx::Resources::PronunciationDicts#list
|
|
6
|
+
class PronunciationDictListParams < Telnyx::Internal::Type::BaseModel
|
|
7
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute page_number
|
|
11
|
+
# Page number (1-based). Defaults to 1.
|
|
12
|
+
#
|
|
13
|
+
# @return [Integer, nil]
|
|
14
|
+
optional :page_number, Integer
|
|
15
|
+
|
|
16
|
+
# @!attribute page_size
|
|
17
|
+
# Number of results per page. Defaults to 20, maximum 250.
|
|
18
|
+
#
|
|
19
|
+
# @return [Integer, nil]
|
|
20
|
+
optional :page_size, Integer
|
|
21
|
+
|
|
22
|
+
# @!method initialize(page_number: nil, page_size: nil, request_options: {})
|
|
23
|
+
# @param page_number [Integer] Page number (1-based). Defaults to 1.
|
|
24
|
+
#
|
|
25
|
+
# @param page_size [Integer] Number of results per page. Defaults to 20, maximum 250.
|
|
26
|
+
#
|
|
27
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|