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.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/client.rb +7 -0
  5. data/lib/telnyx/internal/util.rb +18 -4
  6. data/lib/telnyx/models/ai/assistant_create_params.rb +47 -1
  7. data/lib/telnyx/models/ai/assistant_tool.rb +25 -5
  8. data/lib/telnyx/models/ai/assistant_update_params.rb +47 -1
  9. data/lib/telnyx/models/ai/assistants/update_assistant.rb +48 -1
  10. data/lib/telnyx/models/ai/audio_transcribe_response.rb +70 -7
  11. data/lib/telnyx/models/ai/inference_embedding.rb +48 -1
  12. data/lib/telnyx/models/ai/telephony_settings.rb +13 -1
  13. data/lib/telnyx/models/pronunciation_dict_create_params.rb +141 -0
  14. data/lib/telnyx/models/pronunciation_dict_create_response.rb +207 -0
  15. data/lib/telnyx/models/pronunciation_dict_delete_params.rb +20 -0
  16. data/lib/telnyx/models/pronunciation_dict_list_params.rb +30 -0
  17. data/lib/telnyx/models/pronunciation_dict_list_response.rb +190 -0
  18. data/lib/telnyx/models/pronunciation_dict_retrieve_params.rb +20 -0
  19. data/lib/telnyx/models/pronunciation_dict_retrieve_response.rb +207 -0
  20. data/lib/telnyx/models/pronunciation_dict_update_params.rb +144 -0
  21. data/lib/telnyx/models/pronunciation_dict_update_response.rb +207 -0
  22. data/lib/telnyx/models/texml/accounts/call_calls_params.rb +1893 -547
  23. data/lib/telnyx/models/texml_initiate_ai_call_params.rb +514 -0
  24. data/lib/telnyx/models/texml_initiate_ai_call_response.rb +34 -0
  25. data/lib/telnyx/models/verification.rb +1 -0
  26. data/lib/telnyx/models/verification_trigger_whatsapp_verification_params.rb +46 -0
  27. data/lib/telnyx/models/verify_profile_create_params.rb +43 -1
  28. data/lib/telnyx/models/verify_profile_update_params.rb +43 -1
  29. data/lib/telnyx/models/whatsapp_message_content.rb +196 -1
  30. data/lib/telnyx/models/wireless_blocklist_update_params.rb +8 -21
  31. data/lib/telnyx/models.rb +15 -0
  32. data/lib/telnyx/resources/ai/assistants/versions.rb +3 -1
  33. data/lib/telnyx/resources/ai/assistants.rb +6 -2
  34. data/lib/telnyx/resources/pronunciation_dicts.rb +156 -0
  35. data/lib/telnyx/resources/texml/accounts/calls.rb +3 -84
  36. data/lib/telnyx/resources/texml.rb +106 -0
  37. data/lib/telnyx/resources/verifications.rb +28 -0
  38. data/lib/telnyx/resources/verify_profiles.rb +5 -2
  39. data/lib/telnyx/resources/wireless_blocklists.rb +5 -5
  40. data/lib/telnyx/version.rb +1 -1
  41. data/lib/telnyx.rb +13 -0
  42. data/rbi/telnyx/client.rbi +6 -0
  43. data/rbi/telnyx/internal/util.rbi +8 -0
  44. data/rbi/telnyx/models/ai/assistant_create_params.rbi +130 -0
  45. data/rbi/telnyx/models/ai/assistant_tool.rbi +56 -5
  46. data/rbi/telnyx/models/ai/assistant_update_params.rbi +130 -0
  47. data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +132 -0
  48. data/rbi/telnyx/models/ai/audio_transcribe_response.rbi +123 -10
  49. data/rbi/telnyx/models/ai/inference_embedding.rbi +130 -0
  50. data/rbi/telnyx/models/ai/telephony_settings.rbi +13 -0
  51. data/rbi/telnyx/models/pronunciation_dict_create_params.rbi +246 -0
  52. data/rbi/telnyx/models/pronunciation_dict_create_response.rbi +398 -0
  53. data/rbi/telnyx/models/pronunciation_dict_delete_params.rbi +38 -0
  54. data/rbi/telnyx/models/pronunciation_dict_list_params.rbi +57 -0
  55. data/rbi/telnyx/models/pronunciation_dict_list_response.rbi +353 -0
  56. data/rbi/telnyx/models/pronunciation_dict_retrieve_params.rbi +38 -0
  57. data/rbi/telnyx/models/pronunciation_dict_retrieve_response.rbi +398 -0
  58. data/rbi/telnyx/models/pronunciation_dict_update_params.rbi +268 -0
  59. data/rbi/telnyx/models/pronunciation_dict_update_response.rbi +398 -0
  60. data/rbi/telnyx/models/texml/accounts/call_calls_params.rbi +3719 -1011
  61. data/rbi/telnyx/models/texml_initiate_ai_call_params.rbi +1010 -0
  62. data/rbi/telnyx/models/texml_initiate_ai_call_response.rbi +58 -0
  63. data/rbi/telnyx/models/verification.rbi +1 -0
  64. data/rbi/telnyx/models/verification_trigger_whatsapp_verification_params.rbi +73 -0
  65. data/rbi/telnyx/models/verify_profile_create_params.rbi +85 -0
  66. data/rbi/telnyx/models/verify_profile_update_params.rbi +85 -0
  67. data/rbi/telnyx/models/whatsapp_message_content.rbi +492 -0
  68. data/rbi/telnyx/models/wireless_blocklist_update_params.rbi +6 -49
  69. data/rbi/telnyx/models.rbi +19 -10
  70. data/rbi/telnyx/resources/ai/assistants/versions.rbi +4 -0
  71. data/rbi/telnyx/resources/ai/assistants.rbi +6 -0
  72. data/rbi/telnyx/resources/pronunciation_dicts.rbi +131 -0
  73. data/rbi/telnyx/resources/texml/accounts/calls.rbi +7 -163
  74. data/rbi/telnyx/resources/texml.rbi +164 -0
  75. data/rbi/telnyx/resources/verifications.rbi +23 -0
  76. data/rbi/telnyx/resources/verify_profiles.rbi +4 -0
  77. data/rbi/telnyx/resources/wireless_blocklists.rbi +3 -3
  78. data/sig/telnyx/client.rbs +2 -0
  79. data/sig/telnyx/internal/util.rbs +4 -0
  80. data/sig/telnyx/models/ai/assistant_create_params.rbs +62 -0
  81. data/sig/telnyx/models/ai/assistant_tool.rbs +17 -4
  82. data/sig/telnyx/models/ai/assistant_update_params.rbs +62 -0
  83. data/sig/telnyx/models/ai/assistants/update_assistant.rbs +62 -0
  84. data/sig/telnyx/models/ai/audio_transcribe_response.rbs +53 -3
  85. data/sig/telnyx/models/ai/inference_embedding.rbs +62 -0
  86. data/sig/telnyx/models/ai/telephony_settings.rbs +7 -0
  87. data/sig/telnyx/models/pronunciation_dict_create_params.rbs +97 -0
  88. data/sig/telnyx/models/pronunciation_dict_create_response.rbs +167 -0
  89. data/sig/telnyx/models/pronunciation_dict_delete_params.rbs +20 -0
  90. data/sig/telnyx/models/pronunciation_dict_list_params.rbs +32 -0
  91. data/sig/telnyx/models/pronunciation_dict_list_response.rbs +144 -0
  92. data/sig/telnyx/models/pronunciation_dict_retrieve_params.rbs +20 -0
  93. data/sig/telnyx/models/pronunciation_dict_retrieve_response.rbs +167 -0
  94. data/sig/telnyx/models/pronunciation_dict_update_params.rbs +108 -0
  95. data/sig/telnyx/models/pronunciation_dict_update_response.rbs +167 -0
  96. data/sig/telnyx/models/texml/accounts/call_calls_params.rbs +1368 -331
  97. data/sig/telnyx/models/texml_initiate_ai_call_params.rbs +444 -0
  98. data/sig/telnyx/models/texml_initiate_ai_call_response.rbs +38 -0
  99. data/sig/telnyx/models/verification.rbs +2 -1
  100. data/sig/telnyx/models/verification_trigger_whatsapp_verification_params.rbs +43 -0
  101. data/sig/telnyx/models/verify_profile_create_params.rbs +43 -1
  102. data/sig/telnyx/models/verify_profile_update_params.rbs +43 -1
  103. data/sig/telnyx/models/whatsapp_message_content.rbs +205 -0
  104. data/sig/telnyx/models/wireless_blocklist_update_params.rbs +5 -25
  105. data/sig/telnyx/models.rbs +14 -0
  106. data/sig/telnyx/resources/ai/assistants/versions.rbs +1 -0
  107. data/sig/telnyx/resources/ai/assistants.rbs +2 -0
  108. data/sig/telnyx/resources/pronunciation_dicts.rbs +33 -0
  109. data/sig/telnyx/resources/texml/accounts/calls.rbs +1 -40
  110. data/sig/telnyx/resources/texml.rbs +44 -0
  111. data/sig/telnyx/resources/verifications.rbs +8 -0
  112. data/sig/telnyx/resources/verify_profiles.rbs +2 -0
  113. data/sig/telnyx/resources/wireless_blocklists.rbs +1 -1
  114. metadata +41 -2
@@ -0,0 +1,207 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ # @see Telnyx::Resources::PronunciationDicts#retrieve
6
+ class PronunciationDictRetrieveResponse < Telnyx::Internal::Type::BaseModel
7
+ # @!attribute data
8
+ # A pronunciation dictionary record.
9
+ #
10
+ # @return [Telnyx::Models::PronunciationDictRetrieveResponse::Data, nil]
11
+ optional :data, -> { Telnyx::Models::PronunciationDictRetrieveResponse::Data }
12
+
13
+ # @!method initialize(data: nil)
14
+ # Response containing a single pronunciation dictionary.
15
+ #
16
+ # @param data [Telnyx::Models::PronunciationDictRetrieveResponse::Data] A pronunciation dictionary record.
17
+
18
+ # @see Telnyx::Models::PronunciationDictRetrieveResponse#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::PronunciationDictRetrieveResponse::Data::Item::Alias, Telnyx::Models::PronunciationDictRetrieveResponse::Data::Item::Phoneme>, nil]
36
+ optional :items,
37
+ -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::Models::PronunciationDictRetrieveResponse::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::PronunciationDictRetrieveResponse::Data::RecordType, nil]
49
+ optional :record_type, enum: -> { Telnyx::Models::PronunciationDictRetrieveResponse::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::PronunciationDictRetrieveResponse::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::PronunciationDictRetrieveResponse::Data::Item::Alias, Telnyx::Models::PronunciationDictRetrieveResponse::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::PronunciationDictRetrieveResponse::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::PronunciationDictRetrieveResponse::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::PronunciationDictRetrieveResponse::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::PronunciationDictRetrieveResponse::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::PronunciationDictRetrieveResponse::Data::Item::Phoneme::Alphabet]
138
+ required :alphabet,
139
+ enum: -> { Telnyx::Models::PronunciationDictRetrieveResponse::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::PronunciationDictRetrieveResponse::Data::Item::Phoneme} for
163
+ # more 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::PronunciationDictRetrieveResponse::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::PronunciationDictRetrieveResponse::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::PronunciationDictRetrieveResponse::Data::Item::Alias, Telnyx::Models::PronunciationDictRetrieveResponse::Data::Item::Phoneme)]
191
+ end
192
+
193
+ # Identifies the resource type.
194
+ #
195
+ # @see Telnyx::Models::PronunciationDictRetrieveResponse::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,144 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ # @see Telnyx::Resources::PronunciationDicts#update
6
+ class PronunciationDictUpdateParams < 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
+ # @!attribute items
16
+ # Updated list of pronunciation items (alias or phoneme type).
17
+ #
18
+ # @return [Array<Telnyx::Models::PronunciationDictUpdateParams::Item::Alias, Telnyx::Models::PronunciationDictUpdateParams::Item::Phoneme>, nil]
19
+ optional :items,
20
+ -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::PronunciationDictUpdateParams::Item] }
21
+
22
+ # @!attribute name
23
+ # Updated dictionary name.
24
+ #
25
+ # @return [String, nil]
26
+ optional :name, String
27
+
28
+ # @!method initialize(id:, items: nil, name: nil, request_options: {})
29
+ # @param id [String]
30
+ #
31
+ # @param items [Array<Telnyx::Models::PronunciationDictUpdateParams::Item::Alias, Telnyx::Models::PronunciationDictUpdateParams::Item::Phoneme>] Updated list of pronunciation items (alias or phoneme type).
32
+ #
33
+ # @param name [String] Updated dictionary name.
34
+ #
35
+ # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
36
+
37
+ # A single pronunciation dictionary item. Use type 'alias' to replace matched text
38
+ # with a spoken alias, or type 'phoneme' to specify exact pronunciation using IPA
39
+ # notation.
40
+ module Item
41
+ extend Telnyx::Internal::Type::Union
42
+
43
+ discriminator :type
44
+
45
+ # An alias pronunciation item. When the `text` value is found in input, it is replaced with the `alias` before speech synthesis.
46
+ variant :alias, -> { Telnyx::PronunciationDictUpdateParams::Item::Alias }
47
+
48
+ # A phoneme pronunciation item. When the `text` value is found in input, it is pronounced using the specified IPA phoneme notation.
49
+ variant :phoneme, -> { Telnyx::PronunciationDictUpdateParams::Item::Phoneme }
50
+
51
+ class Alias < Telnyx::Internal::Type::BaseModel
52
+ # @!attribute alias_
53
+ # The replacement text that will be spoken instead.
54
+ #
55
+ # @return [String]
56
+ required :alias_, String, api_name: :alias
57
+
58
+ # @!attribute text
59
+ # The text to match in the input. Case-insensitive matching is used during
60
+ # synthesis.
61
+ #
62
+ # @return [String]
63
+ required :text, String
64
+
65
+ # @!attribute type
66
+ # The item type.
67
+ #
68
+ # @return [Symbol, :alias]
69
+ required :type, const: :alias
70
+
71
+ # @!method initialize(alias_:, text:, type: :alias)
72
+ # Some parameter documentations has been truncated, see
73
+ # {Telnyx::Models::PronunciationDictUpdateParams::Item::Alias} for more details.
74
+ #
75
+ # An alias pronunciation item. When the `text` value is found in input, it is
76
+ # replaced with the `alias` before speech synthesis.
77
+ #
78
+ # @param alias_ [String] The replacement text that will be spoken instead.
79
+ #
80
+ # @param text [String] The text to match in the input. Case-insensitive matching is used during synthes
81
+ #
82
+ # @param type [Symbol, :alias] The item type.
83
+ end
84
+
85
+ class Phoneme < Telnyx::Internal::Type::BaseModel
86
+ # @!attribute alphabet
87
+ # The phonetic alphabet used for the phoneme notation.
88
+ #
89
+ # @return [Symbol, Telnyx::Models::PronunciationDictUpdateParams::Item::Phoneme::Alphabet]
90
+ required :alphabet, enum: -> { Telnyx::PronunciationDictUpdateParams::Item::Phoneme::Alphabet }
91
+
92
+ # @!attribute phoneme
93
+ # The phoneme notation representing the desired pronunciation.
94
+ #
95
+ # @return [String]
96
+ required :phoneme, String
97
+
98
+ # @!attribute text
99
+ # The text to match in the input. Case-insensitive matching is used during
100
+ # synthesis.
101
+ #
102
+ # @return [String]
103
+ required :text, String
104
+
105
+ # @!attribute type
106
+ # The item type.
107
+ #
108
+ # @return [Symbol, :phoneme]
109
+ required :type, const: :phoneme
110
+
111
+ # @!method initialize(alphabet:, phoneme:, text:, type: :phoneme)
112
+ # Some parameter documentations has been truncated, see
113
+ # {Telnyx::Models::PronunciationDictUpdateParams::Item::Phoneme} for more details.
114
+ #
115
+ # A phoneme pronunciation item. When the `text` value is found in input, it is
116
+ # pronounced using the specified IPA phoneme notation.
117
+ #
118
+ # @param alphabet [Symbol, Telnyx::Models::PronunciationDictUpdateParams::Item::Phoneme::Alphabet] The phonetic alphabet used for the phoneme notation.
119
+ #
120
+ # @param phoneme [String] The phoneme notation representing the desired pronunciation.
121
+ #
122
+ # @param text [String] The text to match in the input. Case-insensitive matching is used during synthes
123
+ #
124
+ # @param type [Symbol, :phoneme] The item type.
125
+
126
+ # The phonetic alphabet used for the phoneme notation.
127
+ #
128
+ # @see Telnyx::Models::PronunciationDictUpdateParams::Item::Phoneme#alphabet
129
+ module Alphabet
130
+ extend Telnyx::Internal::Type::Enum
131
+
132
+ IPA = :ipa
133
+
134
+ # @!method self.values
135
+ # @return [Array<Symbol>]
136
+ end
137
+ end
138
+
139
+ # @!method self.variants
140
+ # @return [Array(Telnyx::Models::PronunciationDictUpdateParams::Item::Alias, Telnyx::Models::PronunciationDictUpdateParams::Item::Phoneme)]
141
+ end
142
+ end
143
+ end
144
+ end
@@ -0,0 +1,207 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ # @see Telnyx::Resources::PronunciationDicts#update
6
+ class PronunciationDictUpdateResponse < Telnyx::Internal::Type::BaseModel
7
+ # @!attribute data
8
+ # A pronunciation dictionary record.
9
+ #
10
+ # @return [Telnyx::Models::PronunciationDictUpdateResponse::Data, nil]
11
+ optional :data, -> { Telnyx::Models::PronunciationDictUpdateResponse::Data }
12
+
13
+ # @!method initialize(data: nil)
14
+ # Response containing a single pronunciation dictionary.
15
+ #
16
+ # @param data [Telnyx::Models::PronunciationDictUpdateResponse::Data] A pronunciation dictionary record.
17
+
18
+ # @see Telnyx::Models::PronunciationDictUpdateResponse#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::PronunciationDictUpdateResponse::Data::Item::Alias, Telnyx::Models::PronunciationDictUpdateResponse::Data::Item::Phoneme>, nil]
36
+ optional :items,
37
+ -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::Models::PronunciationDictUpdateResponse::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::PronunciationDictUpdateResponse::Data::RecordType, nil]
49
+ optional :record_type, enum: -> { Telnyx::Models::PronunciationDictUpdateResponse::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::PronunciationDictUpdateResponse::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::PronunciationDictUpdateResponse::Data::Item::Alias, Telnyx::Models::PronunciationDictUpdateResponse::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::PronunciationDictUpdateResponse::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::PronunciationDictUpdateResponse::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::PronunciationDictUpdateResponse::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::PronunciationDictUpdateResponse::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::PronunciationDictUpdateResponse::Data::Item::Phoneme::Alphabet]
138
+ required :alphabet,
139
+ enum: -> { Telnyx::Models::PronunciationDictUpdateResponse::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::PronunciationDictUpdateResponse::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::PronunciationDictUpdateResponse::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::PronunciationDictUpdateResponse::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::PronunciationDictUpdateResponse::Data::Item::Alias, Telnyx::Models::PronunciationDictUpdateResponse::Data::Item::Phoneme)]
191
+ end
192
+
193
+ # Identifies the resource type.
194
+ #
195
+ # @see Telnyx::Models::PronunciationDictUpdateResponse::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