telnyx 5.68.2 → 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 +35 -0
- data/README.md +1 -1
- data/lib/telnyx/client.rb +7 -0
- data/lib/telnyx/internal/util.rb +18 -4
- 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 +41 -2
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
class PronunciationDictCreateParams < Telnyx::Internal::Type::BaseModel
|
|
6
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Telnyx::PronunciationDictCreateParams,
|
|
13
|
+
Telnyx::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# List of pronunciation items (alias or phoneme type). At least one item is
|
|
18
|
+
# required.
|
|
19
|
+
sig do
|
|
20
|
+
returns(
|
|
21
|
+
T::Array[
|
|
22
|
+
T.any(
|
|
23
|
+
Telnyx::PronunciationDictCreateParams::Item::Alias,
|
|
24
|
+
Telnyx::PronunciationDictCreateParams::Item::Phoneme
|
|
25
|
+
)
|
|
26
|
+
]
|
|
27
|
+
)
|
|
28
|
+
end
|
|
29
|
+
attr_accessor :items
|
|
30
|
+
|
|
31
|
+
# Human-readable name. Must be unique within the organization.
|
|
32
|
+
sig { returns(String) }
|
|
33
|
+
attr_accessor :name
|
|
34
|
+
|
|
35
|
+
sig do
|
|
36
|
+
params(
|
|
37
|
+
items:
|
|
38
|
+
T::Array[
|
|
39
|
+
T.any(
|
|
40
|
+
Telnyx::PronunciationDictCreateParams::Item::Alias::OrHash,
|
|
41
|
+
Telnyx::PronunciationDictCreateParams::Item::Phoneme::OrHash
|
|
42
|
+
)
|
|
43
|
+
],
|
|
44
|
+
name: String,
|
|
45
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
46
|
+
).returns(T.attached_class)
|
|
47
|
+
end
|
|
48
|
+
def self.new(
|
|
49
|
+
# List of pronunciation items (alias or phoneme type). At least one item is
|
|
50
|
+
# required.
|
|
51
|
+
items:,
|
|
52
|
+
# Human-readable name. Must be unique within the organization.
|
|
53
|
+
name:,
|
|
54
|
+
request_options: {}
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
sig do
|
|
59
|
+
override.returns(
|
|
60
|
+
{
|
|
61
|
+
items:
|
|
62
|
+
T::Array[
|
|
63
|
+
T.any(
|
|
64
|
+
Telnyx::PronunciationDictCreateParams::Item::Alias,
|
|
65
|
+
Telnyx::PronunciationDictCreateParams::Item::Phoneme
|
|
66
|
+
)
|
|
67
|
+
],
|
|
68
|
+
name: String,
|
|
69
|
+
request_options: Telnyx::RequestOptions
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
end
|
|
73
|
+
def to_hash
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# A single pronunciation dictionary item. Use type 'alias' to replace matched text
|
|
77
|
+
# with a spoken alias, or type 'phoneme' to specify exact pronunciation using IPA
|
|
78
|
+
# notation.
|
|
79
|
+
module Item
|
|
80
|
+
extend Telnyx::Internal::Type::Union
|
|
81
|
+
|
|
82
|
+
Variants =
|
|
83
|
+
T.type_alias do
|
|
84
|
+
T.any(
|
|
85
|
+
Telnyx::PronunciationDictCreateParams::Item::Alias,
|
|
86
|
+
Telnyx::PronunciationDictCreateParams::Item::Phoneme
|
|
87
|
+
)
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
class Alias < Telnyx::Internal::Type::BaseModel
|
|
91
|
+
OrHash =
|
|
92
|
+
T.type_alias do
|
|
93
|
+
T.any(
|
|
94
|
+
Telnyx::PronunciationDictCreateParams::Item::Alias,
|
|
95
|
+
Telnyx::Internal::AnyHash
|
|
96
|
+
)
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# The replacement text that will be spoken instead.
|
|
100
|
+
sig { returns(String) }
|
|
101
|
+
attr_accessor :alias_
|
|
102
|
+
|
|
103
|
+
# The text to match in the input. Case-insensitive matching is used during
|
|
104
|
+
# synthesis.
|
|
105
|
+
sig { returns(String) }
|
|
106
|
+
attr_accessor :text
|
|
107
|
+
|
|
108
|
+
# The item type.
|
|
109
|
+
sig { returns(Symbol) }
|
|
110
|
+
attr_accessor :type
|
|
111
|
+
|
|
112
|
+
# An alias pronunciation item. When the `text` value is found in input, it is
|
|
113
|
+
# replaced with the `alias` before speech synthesis.
|
|
114
|
+
sig do
|
|
115
|
+
params(alias_: String, text: String, type: Symbol).returns(
|
|
116
|
+
T.attached_class
|
|
117
|
+
)
|
|
118
|
+
end
|
|
119
|
+
def self.new(
|
|
120
|
+
# The replacement text that will be spoken instead.
|
|
121
|
+
alias_:,
|
|
122
|
+
# The text to match in the input. Case-insensitive matching is used during
|
|
123
|
+
# synthesis.
|
|
124
|
+
text:,
|
|
125
|
+
# The item type.
|
|
126
|
+
type: :alias
|
|
127
|
+
)
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
sig do
|
|
131
|
+
override.returns({ alias_: String, text: String, type: Symbol })
|
|
132
|
+
end
|
|
133
|
+
def to_hash
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
class Phoneme < Telnyx::Internal::Type::BaseModel
|
|
138
|
+
OrHash =
|
|
139
|
+
T.type_alias do
|
|
140
|
+
T.any(
|
|
141
|
+
Telnyx::PronunciationDictCreateParams::Item::Phoneme,
|
|
142
|
+
Telnyx::Internal::AnyHash
|
|
143
|
+
)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# The phonetic alphabet used for the phoneme notation.
|
|
147
|
+
sig do
|
|
148
|
+
returns(
|
|
149
|
+
Telnyx::PronunciationDictCreateParams::Item::Phoneme::Alphabet::OrSymbol
|
|
150
|
+
)
|
|
151
|
+
end
|
|
152
|
+
attr_accessor :alphabet
|
|
153
|
+
|
|
154
|
+
# The phoneme notation representing the desired pronunciation.
|
|
155
|
+
sig { returns(String) }
|
|
156
|
+
attr_accessor :phoneme
|
|
157
|
+
|
|
158
|
+
# The text to match in the input. Case-insensitive matching is used during
|
|
159
|
+
# synthesis.
|
|
160
|
+
sig { returns(String) }
|
|
161
|
+
attr_accessor :text
|
|
162
|
+
|
|
163
|
+
# The item type.
|
|
164
|
+
sig { returns(Symbol) }
|
|
165
|
+
attr_accessor :type
|
|
166
|
+
|
|
167
|
+
# A phoneme pronunciation item. When the `text` value is found in input, it is
|
|
168
|
+
# pronounced using the specified IPA phoneme notation.
|
|
169
|
+
sig do
|
|
170
|
+
params(
|
|
171
|
+
alphabet:
|
|
172
|
+
Telnyx::PronunciationDictCreateParams::Item::Phoneme::Alphabet::OrSymbol,
|
|
173
|
+
phoneme: String,
|
|
174
|
+
text: String,
|
|
175
|
+
type: Symbol
|
|
176
|
+
).returns(T.attached_class)
|
|
177
|
+
end
|
|
178
|
+
def self.new(
|
|
179
|
+
# The phonetic alphabet used for the phoneme notation.
|
|
180
|
+
alphabet:,
|
|
181
|
+
# The phoneme notation representing the desired pronunciation.
|
|
182
|
+
phoneme:,
|
|
183
|
+
# The text to match in the input. Case-insensitive matching is used during
|
|
184
|
+
# synthesis.
|
|
185
|
+
text:,
|
|
186
|
+
# The item type.
|
|
187
|
+
type: :phoneme
|
|
188
|
+
)
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
sig do
|
|
192
|
+
override.returns(
|
|
193
|
+
{
|
|
194
|
+
alphabet:
|
|
195
|
+
Telnyx::PronunciationDictCreateParams::Item::Phoneme::Alphabet::OrSymbol,
|
|
196
|
+
phoneme: String,
|
|
197
|
+
text: String,
|
|
198
|
+
type: Symbol
|
|
199
|
+
}
|
|
200
|
+
)
|
|
201
|
+
end
|
|
202
|
+
def to_hash
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# The phonetic alphabet used for the phoneme notation.
|
|
206
|
+
module Alphabet
|
|
207
|
+
extend Telnyx::Internal::Type::Enum
|
|
208
|
+
|
|
209
|
+
TaggedSymbol =
|
|
210
|
+
T.type_alias do
|
|
211
|
+
T.all(
|
|
212
|
+
Symbol,
|
|
213
|
+
Telnyx::PronunciationDictCreateParams::Item::Phoneme::Alphabet
|
|
214
|
+
)
|
|
215
|
+
end
|
|
216
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
217
|
+
|
|
218
|
+
IPA =
|
|
219
|
+
T.let(
|
|
220
|
+
:ipa,
|
|
221
|
+
Telnyx::PronunciationDictCreateParams::Item::Phoneme::Alphabet::TaggedSymbol
|
|
222
|
+
)
|
|
223
|
+
|
|
224
|
+
sig do
|
|
225
|
+
override.returns(
|
|
226
|
+
T::Array[
|
|
227
|
+
Telnyx::PronunciationDictCreateParams::Item::Phoneme::Alphabet::TaggedSymbol
|
|
228
|
+
]
|
|
229
|
+
)
|
|
230
|
+
end
|
|
231
|
+
def self.values
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
sig do
|
|
237
|
+
override.returns(
|
|
238
|
+
T::Array[Telnyx::PronunciationDictCreateParams::Item::Variants]
|
|
239
|
+
)
|
|
240
|
+
end
|
|
241
|
+
def self.variants
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
end
|
|
245
|
+
end
|
|
246
|
+
end
|
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
class PronunciationDictCreateResponse < Telnyx::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Telnyx::Models::PronunciationDictCreateResponse,
|
|
10
|
+
Telnyx::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# A pronunciation dictionary record.
|
|
15
|
+
sig do
|
|
16
|
+
returns(
|
|
17
|
+
T.nilable(Telnyx::Models::PronunciationDictCreateResponse::Data)
|
|
18
|
+
)
|
|
19
|
+
end
|
|
20
|
+
attr_reader :data
|
|
21
|
+
|
|
22
|
+
sig do
|
|
23
|
+
params(
|
|
24
|
+
data: Telnyx::Models::PronunciationDictCreateResponse::Data::OrHash
|
|
25
|
+
).void
|
|
26
|
+
end
|
|
27
|
+
attr_writer :data
|
|
28
|
+
|
|
29
|
+
# Response containing a single pronunciation dictionary.
|
|
30
|
+
sig do
|
|
31
|
+
params(
|
|
32
|
+
data: Telnyx::Models::PronunciationDictCreateResponse::Data::OrHash
|
|
33
|
+
).returns(T.attached_class)
|
|
34
|
+
end
|
|
35
|
+
def self.new(
|
|
36
|
+
# A pronunciation dictionary record.
|
|
37
|
+
data: nil
|
|
38
|
+
)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
sig do
|
|
42
|
+
override.returns(
|
|
43
|
+
{ data: Telnyx::Models::PronunciationDictCreateResponse::Data }
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
def to_hash
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
class Data < Telnyx::Internal::Type::BaseModel
|
|
50
|
+
OrHash =
|
|
51
|
+
T.type_alias do
|
|
52
|
+
T.any(
|
|
53
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data,
|
|
54
|
+
Telnyx::Internal::AnyHash
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Unique identifier for the pronunciation dictionary.
|
|
59
|
+
sig { returns(T.nilable(String)) }
|
|
60
|
+
attr_reader :id
|
|
61
|
+
|
|
62
|
+
sig { params(id: String).void }
|
|
63
|
+
attr_writer :id
|
|
64
|
+
|
|
65
|
+
# ISO 8601 timestamp with millisecond precision.
|
|
66
|
+
sig { returns(T.nilable(Time)) }
|
|
67
|
+
attr_reader :created_at
|
|
68
|
+
|
|
69
|
+
sig { params(created_at: Time).void }
|
|
70
|
+
attr_writer :created_at
|
|
71
|
+
|
|
72
|
+
# List of pronunciation items (alias or phoneme type).
|
|
73
|
+
sig do
|
|
74
|
+
returns(
|
|
75
|
+
T.nilable(
|
|
76
|
+
T::Array[
|
|
77
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Variants
|
|
78
|
+
]
|
|
79
|
+
)
|
|
80
|
+
)
|
|
81
|
+
end
|
|
82
|
+
attr_reader :items
|
|
83
|
+
|
|
84
|
+
sig do
|
|
85
|
+
params(
|
|
86
|
+
items:
|
|
87
|
+
T::Array[
|
|
88
|
+
T.any(
|
|
89
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Alias::OrHash,
|
|
90
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Phoneme::OrHash
|
|
91
|
+
)
|
|
92
|
+
]
|
|
93
|
+
).void
|
|
94
|
+
end
|
|
95
|
+
attr_writer :items
|
|
96
|
+
|
|
97
|
+
# Human-readable name for the dictionary. Must be unique within the organization.
|
|
98
|
+
sig { returns(T.nilable(String)) }
|
|
99
|
+
attr_reader :name
|
|
100
|
+
|
|
101
|
+
sig { params(name: String).void }
|
|
102
|
+
attr_writer :name
|
|
103
|
+
|
|
104
|
+
# Identifies the resource type.
|
|
105
|
+
sig do
|
|
106
|
+
returns(
|
|
107
|
+
T.nilable(
|
|
108
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::RecordType::TaggedSymbol
|
|
109
|
+
)
|
|
110
|
+
)
|
|
111
|
+
end
|
|
112
|
+
attr_reader :record_type
|
|
113
|
+
|
|
114
|
+
sig do
|
|
115
|
+
params(
|
|
116
|
+
record_type:
|
|
117
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::RecordType::OrSymbol
|
|
118
|
+
).void
|
|
119
|
+
end
|
|
120
|
+
attr_writer :record_type
|
|
121
|
+
|
|
122
|
+
# ISO 8601 timestamp with millisecond precision.
|
|
123
|
+
sig { returns(T.nilable(Time)) }
|
|
124
|
+
attr_reader :updated_at
|
|
125
|
+
|
|
126
|
+
sig { params(updated_at: Time).void }
|
|
127
|
+
attr_writer :updated_at
|
|
128
|
+
|
|
129
|
+
# Auto-incrementing version number. Increases by 1 on each update. Used for
|
|
130
|
+
# optimistic concurrency control and cache invalidation.
|
|
131
|
+
sig { returns(T.nilable(Integer)) }
|
|
132
|
+
attr_reader :version
|
|
133
|
+
|
|
134
|
+
sig { params(version: Integer).void }
|
|
135
|
+
attr_writer :version
|
|
136
|
+
|
|
137
|
+
# A pronunciation dictionary record.
|
|
138
|
+
sig do
|
|
139
|
+
params(
|
|
140
|
+
id: String,
|
|
141
|
+
created_at: Time,
|
|
142
|
+
items:
|
|
143
|
+
T::Array[
|
|
144
|
+
T.any(
|
|
145
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Alias::OrHash,
|
|
146
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Phoneme::OrHash
|
|
147
|
+
)
|
|
148
|
+
],
|
|
149
|
+
name: String,
|
|
150
|
+
record_type:
|
|
151
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::RecordType::OrSymbol,
|
|
152
|
+
updated_at: Time,
|
|
153
|
+
version: Integer
|
|
154
|
+
).returns(T.attached_class)
|
|
155
|
+
end
|
|
156
|
+
def self.new(
|
|
157
|
+
# Unique identifier for the pronunciation dictionary.
|
|
158
|
+
id: nil,
|
|
159
|
+
# ISO 8601 timestamp with millisecond precision.
|
|
160
|
+
created_at: nil,
|
|
161
|
+
# List of pronunciation items (alias or phoneme type).
|
|
162
|
+
items: nil,
|
|
163
|
+
# Human-readable name for the dictionary. Must be unique within the organization.
|
|
164
|
+
name: nil,
|
|
165
|
+
# Identifies the resource type.
|
|
166
|
+
record_type: nil,
|
|
167
|
+
# ISO 8601 timestamp with millisecond precision.
|
|
168
|
+
updated_at: nil,
|
|
169
|
+
# Auto-incrementing version number. Increases by 1 on each update. Used for
|
|
170
|
+
# optimistic concurrency control and cache invalidation.
|
|
171
|
+
version: nil
|
|
172
|
+
)
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
sig do
|
|
176
|
+
override.returns(
|
|
177
|
+
{
|
|
178
|
+
id: String,
|
|
179
|
+
created_at: Time,
|
|
180
|
+
items:
|
|
181
|
+
T::Array[
|
|
182
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Variants
|
|
183
|
+
],
|
|
184
|
+
name: String,
|
|
185
|
+
record_type:
|
|
186
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::RecordType::TaggedSymbol,
|
|
187
|
+
updated_at: Time,
|
|
188
|
+
version: Integer
|
|
189
|
+
}
|
|
190
|
+
)
|
|
191
|
+
end
|
|
192
|
+
def to_hash
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# A single pronunciation dictionary item. Use type 'alias' to replace matched text
|
|
196
|
+
# with a spoken alias, or type 'phoneme' to specify exact pronunciation using IPA
|
|
197
|
+
# notation.
|
|
198
|
+
module Item
|
|
199
|
+
extend Telnyx::Internal::Type::Union
|
|
200
|
+
|
|
201
|
+
Variants =
|
|
202
|
+
T.type_alias do
|
|
203
|
+
T.any(
|
|
204
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Alias,
|
|
205
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Phoneme
|
|
206
|
+
)
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
class Alias < Telnyx::Internal::Type::BaseModel
|
|
210
|
+
OrHash =
|
|
211
|
+
T.type_alias do
|
|
212
|
+
T.any(
|
|
213
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Alias,
|
|
214
|
+
Telnyx::Internal::AnyHash
|
|
215
|
+
)
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# The replacement text that will be spoken instead.
|
|
219
|
+
sig { returns(String) }
|
|
220
|
+
attr_accessor :alias_
|
|
221
|
+
|
|
222
|
+
# The text to match in the input. Case-insensitive matching is used during
|
|
223
|
+
# synthesis.
|
|
224
|
+
sig { returns(String) }
|
|
225
|
+
attr_accessor :text
|
|
226
|
+
|
|
227
|
+
# The item type.
|
|
228
|
+
sig { returns(Symbol) }
|
|
229
|
+
attr_accessor :type
|
|
230
|
+
|
|
231
|
+
# An alias pronunciation item. When the `text` value is found in input, it is
|
|
232
|
+
# replaced with the `alias` before speech synthesis.
|
|
233
|
+
sig do
|
|
234
|
+
params(alias_: String, text: String, type: Symbol).returns(
|
|
235
|
+
T.attached_class
|
|
236
|
+
)
|
|
237
|
+
end
|
|
238
|
+
def self.new(
|
|
239
|
+
# The replacement text that will be spoken instead.
|
|
240
|
+
alias_:,
|
|
241
|
+
# The text to match in the input. Case-insensitive matching is used during
|
|
242
|
+
# synthesis.
|
|
243
|
+
text:,
|
|
244
|
+
# The item type.
|
|
245
|
+
type: :alias
|
|
246
|
+
)
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
sig do
|
|
250
|
+
override.returns({ alias_: String, text: String, type: Symbol })
|
|
251
|
+
end
|
|
252
|
+
def to_hash
|
|
253
|
+
end
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
class Phoneme < Telnyx::Internal::Type::BaseModel
|
|
257
|
+
OrHash =
|
|
258
|
+
T.type_alias do
|
|
259
|
+
T.any(
|
|
260
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Phoneme,
|
|
261
|
+
Telnyx::Internal::AnyHash
|
|
262
|
+
)
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# The phonetic alphabet used for the phoneme notation.
|
|
266
|
+
sig do
|
|
267
|
+
returns(
|
|
268
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Phoneme::Alphabet::TaggedSymbol
|
|
269
|
+
)
|
|
270
|
+
end
|
|
271
|
+
attr_accessor :alphabet
|
|
272
|
+
|
|
273
|
+
# The phoneme notation representing the desired pronunciation.
|
|
274
|
+
sig { returns(String) }
|
|
275
|
+
attr_accessor :phoneme
|
|
276
|
+
|
|
277
|
+
# The text to match in the input. Case-insensitive matching is used during
|
|
278
|
+
# synthesis.
|
|
279
|
+
sig { returns(String) }
|
|
280
|
+
attr_accessor :text
|
|
281
|
+
|
|
282
|
+
# The item type.
|
|
283
|
+
sig { returns(Symbol) }
|
|
284
|
+
attr_accessor :type
|
|
285
|
+
|
|
286
|
+
# A phoneme pronunciation item. When the `text` value is found in input, it is
|
|
287
|
+
# pronounced using the specified IPA phoneme notation.
|
|
288
|
+
sig do
|
|
289
|
+
params(
|
|
290
|
+
alphabet:
|
|
291
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Phoneme::Alphabet::OrSymbol,
|
|
292
|
+
phoneme: String,
|
|
293
|
+
text: String,
|
|
294
|
+
type: Symbol
|
|
295
|
+
).returns(T.attached_class)
|
|
296
|
+
end
|
|
297
|
+
def self.new(
|
|
298
|
+
# The phonetic alphabet used for the phoneme notation.
|
|
299
|
+
alphabet:,
|
|
300
|
+
# The phoneme notation representing the desired pronunciation.
|
|
301
|
+
phoneme:,
|
|
302
|
+
# The text to match in the input. Case-insensitive matching is used during
|
|
303
|
+
# synthesis.
|
|
304
|
+
text:,
|
|
305
|
+
# The item type.
|
|
306
|
+
type: :phoneme
|
|
307
|
+
)
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
sig do
|
|
311
|
+
override.returns(
|
|
312
|
+
{
|
|
313
|
+
alphabet:
|
|
314
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Phoneme::Alphabet::TaggedSymbol,
|
|
315
|
+
phoneme: String,
|
|
316
|
+
text: String,
|
|
317
|
+
type: Symbol
|
|
318
|
+
}
|
|
319
|
+
)
|
|
320
|
+
end
|
|
321
|
+
def to_hash
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# The phonetic alphabet used for the phoneme notation.
|
|
325
|
+
module Alphabet
|
|
326
|
+
extend Telnyx::Internal::Type::Enum
|
|
327
|
+
|
|
328
|
+
TaggedSymbol =
|
|
329
|
+
T.type_alias do
|
|
330
|
+
T.all(
|
|
331
|
+
Symbol,
|
|
332
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Phoneme::Alphabet
|
|
333
|
+
)
|
|
334
|
+
end
|
|
335
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
336
|
+
|
|
337
|
+
IPA =
|
|
338
|
+
T.let(
|
|
339
|
+
:ipa,
|
|
340
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Phoneme::Alphabet::TaggedSymbol
|
|
341
|
+
)
|
|
342
|
+
|
|
343
|
+
sig do
|
|
344
|
+
override.returns(
|
|
345
|
+
T::Array[
|
|
346
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Phoneme::Alphabet::TaggedSymbol
|
|
347
|
+
]
|
|
348
|
+
)
|
|
349
|
+
end
|
|
350
|
+
def self.values
|
|
351
|
+
end
|
|
352
|
+
end
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
sig do
|
|
356
|
+
override.returns(
|
|
357
|
+
T::Array[
|
|
358
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::Item::Variants
|
|
359
|
+
]
|
|
360
|
+
)
|
|
361
|
+
end
|
|
362
|
+
def self.variants
|
|
363
|
+
end
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
# Identifies the resource type.
|
|
367
|
+
module RecordType
|
|
368
|
+
extend Telnyx::Internal::Type::Enum
|
|
369
|
+
|
|
370
|
+
TaggedSymbol =
|
|
371
|
+
T.type_alias do
|
|
372
|
+
T.all(
|
|
373
|
+
Symbol,
|
|
374
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::RecordType
|
|
375
|
+
)
|
|
376
|
+
end
|
|
377
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
378
|
+
|
|
379
|
+
PRONUNCIATION_DICT =
|
|
380
|
+
T.let(
|
|
381
|
+
:pronunciation_dict,
|
|
382
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::RecordType::TaggedSymbol
|
|
383
|
+
)
|
|
384
|
+
|
|
385
|
+
sig do
|
|
386
|
+
override.returns(
|
|
387
|
+
T::Array[
|
|
388
|
+
Telnyx::Models::PronunciationDictCreateResponse::Data::RecordType::TaggedSymbol
|
|
389
|
+
]
|
|
390
|
+
)
|
|
391
|
+
end
|
|
392
|
+
def self.values
|
|
393
|
+
end
|
|
394
|
+
end
|
|
395
|
+
end
|
|
396
|
+
end
|
|
397
|
+
end
|
|
398
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
class PronunciationDictDeleteParams < Telnyx::Internal::Type::BaseModel
|
|
6
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Telnyx::PronunciationDictDeleteParams,
|
|
13
|
+
Telnyx::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
sig do
|
|
21
|
+
params(
|
|
22
|
+
id: String,
|
|
23
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
25
|
+
end
|
|
26
|
+
def self.new(id:, request_options: {})
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
{ id: String, request_options: Telnyx::RequestOptions }
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
def to_hash
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|