telnyx 5.68.2 → 5.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +59 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/client.rb +7 -0
  5. data/lib/telnyx/internal/util.rb +21 -5
  6. data/lib/telnyx/models/ai/assistant_create_params.rb +8 -1
  7. data/lib/telnyx/models/ai/assistant_tool.rb +25 -5
  8. data/lib/telnyx/models/ai/assistant_update_params.rb +8 -1
  9. data/lib/telnyx/models/ai/assistants/update_assistant.rb +8 -1
  10. data/lib/telnyx/models/ai/audio_transcribe_response.rb +70 -7
  11. data/lib/telnyx/models/ai/conversation_add_message_params.rb +4 -4
  12. data/lib/telnyx/models/ai/inference_embedding.rb +8 -1
  13. data/lib/telnyx/models/ai/observability.rb +46 -0
  14. data/lib/telnyx/models/ai/observability_req.rb +46 -0
  15. data/lib/telnyx/models/ai/telephony_settings.rb +13 -1
  16. data/lib/telnyx/models/call_dial_params.rb +24 -1
  17. data/lib/telnyx/models/calls/action_transfer_params.rb +24 -1
  18. data/lib/telnyx/models/enterprise_create_params.rb +1 -1
  19. data/lib/telnyx/models/enterprise_public.rb +1 -1
  20. data/lib/telnyx/models/enterprise_update_params.rb +1 -1
  21. data/lib/telnyx/models/enterprises/reputation/{number_create_params.rb → number_associate_params.rb} +2 -2
  22. data/lib/telnyx/models/enterprises/reputation/{number_create_response.rb → number_associate_response.rb} +5 -5
  23. data/lib/telnyx/models/enterprises/reputation/{number_delete_params.rb → number_disassociate_params.rb} +2 -2
  24. data/lib/telnyx/models/enterprises/{reputation_list_params.rb → reputation_disable_params.rb} +2 -2
  25. data/lib/telnyx/models/enterprises/{reputation_create_params.rb → reputation_enable_params.rb} +6 -6
  26. data/lib/telnyx/models/enterprises/{reputation_create_response.rb → reputation_enable_response.rb} +2 -2
  27. data/lib/telnyx/models/enterprises/{reputation_delete_all_params.rb → reputation_retrieve_params.rb} +2 -2
  28. data/lib/telnyx/models/enterprises/{reputation_list_response.rb → reputation_retrieve_response.rb} +2 -2
  29. data/lib/telnyx/models/porting_orders/phone_number_block_list_params.rb +9 -9
  30. data/lib/telnyx/models/pronunciation_dict_create_params.rb +141 -0
  31. data/lib/telnyx/models/pronunciation_dict_create_response.rb +207 -0
  32. data/lib/telnyx/models/pronunciation_dict_delete_params.rb +20 -0
  33. data/lib/telnyx/models/pronunciation_dict_list_params.rb +30 -0
  34. data/lib/telnyx/models/pronunciation_dict_list_response.rb +190 -0
  35. data/lib/telnyx/models/pronunciation_dict_retrieve_params.rb +20 -0
  36. data/lib/telnyx/models/pronunciation_dict_retrieve_response.rb +207 -0
  37. data/lib/telnyx/models/pronunciation_dict_update_params.rb +144 -0
  38. data/lib/telnyx/models/pronunciation_dict_update_response.rb +207 -0
  39. data/lib/telnyx/models/texml/accounts/call_calls_params.rb +1893 -547
  40. data/lib/telnyx/models/texml_initiate_ai_call_params.rb +514 -0
  41. data/lib/telnyx/models/texml_initiate_ai_call_response.rb +34 -0
  42. data/lib/telnyx/models/verification.rb +1 -0
  43. data/lib/telnyx/models/verification_trigger_whatsapp_verification_params.rb +46 -0
  44. data/lib/telnyx/models/verify_profile_create_params.rb +43 -1
  45. data/lib/telnyx/models/verify_profile_update_params.rb +43 -1
  46. data/lib/telnyx/models/voice_clone_create_from_upload_params.rb +364 -71
  47. data/lib/telnyx/models/voice_clone_create_params.rb +161 -51
  48. data/lib/telnyx/models/voice_clone_data.rb +51 -4
  49. data/lib/telnyx/models/whatsapp_message_content.rb +196 -1
  50. data/lib/telnyx/models/wireless_blocklist_update_params.rb +8 -21
  51. data/lib/telnyx/models.rb +15 -0
  52. data/lib/telnyx/resources/ai/assistants/versions.rb +3 -1
  53. data/lib/telnyx/resources/ai/assistants.rb +6 -2
  54. data/lib/telnyx/resources/calls/actions.rb +3 -1
  55. data/lib/telnyx/resources/calls.rb +3 -1
  56. data/lib/telnyx/resources/enterprises/reputation/numbers.rb +42 -42
  57. data/lib/telnyx/resources/enterprises/reputation.rb +61 -61
  58. data/lib/telnyx/resources/pronunciation_dicts.rb +156 -0
  59. data/lib/telnyx/resources/texml/accounts/calls.rb +3 -84
  60. data/lib/telnyx/resources/texml.rb +106 -0
  61. data/lib/telnyx/resources/verifications.rb +28 -0
  62. data/lib/telnyx/resources/verify_profiles.rb +5 -2
  63. data/lib/telnyx/resources/voice_clones.rb +7 -27
  64. data/lib/telnyx/resources/wireless_blocklists.rb +5 -5
  65. data/lib/telnyx/version.rb +1 -1
  66. data/lib/telnyx.rb +23 -8
  67. data/rbi/telnyx/client.rbi +6 -0
  68. data/rbi/telnyx/internal/util.rbi +8 -0
  69. data/rbi/telnyx/models/ai/assistant_create_params.rbi +13 -0
  70. data/rbi/telnyx/models/ai/assistant_tool.rbi +56 -5
  71. data/rbi/telnyx/models/ai/assistant_update_params.rbi +13 -0
  72. data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +13 -0
  73. data/rbi/telnyx/models/ai/audio_transcribe_response.rbi +123 -10
  74. data/rbi/telnyx/models/ai/conversation_add_message_params.rbi +5 -5
  75. data/rbi/telnyx/models/ai/inference_embedding.rbi +11 -0
  76. data/rbi/telnyx/models/ai/observability.rbi +90 -0
  77. data/rbi/telnyx/models/ai/observability_req.rbi +92 -0
  78. data/rbi/telnyx/models/ai/telephony_settings.rbi +13 -0
  79. data/rbi/telnyx/models/call_dial_params.rbi +37 -0
  80. data/rbi/telnyx/models/calls/action_transfer_params.rbi +57 -0
  81. data/rbi/telnyx/models/enterprise_create_params.rbi +1 -1
  82. data/rbi/telnyx/models/enterprise_public.rbi +1 -1
  83. data/rbi/telnyx/models/enterprise_update_params.rbi +1 -1
  84. data/rbi/telnyx/models/enterprises/reputation/{number_create_params.rbi → number_associate_params.rbi} +2 -2
  85. data/rbi/telnyx/models/enterprises/reputation/{number_create_response.rbi → number_associate_response.rbi} +7 -7
  86. data/rbi/telnyx/models/enterprises/reputation/{number_delete_params.rbi → number_disassociate_params.rbi} +2 -2
  87. data/rbi/telnyx/models/enterprises/{reputation_list_params.rbi → reputation_disable_params.rbi} +2 -2
  88. data/rbi/telnyx/models/enterprises/{reputation_create_params.rbi → reputation_enable_params.rbi} +14 -14
  89. data/rbi/telnyx/models/enterprises/{reputation_create_response.rbi → reputation_enable_response.rbi} +2 -2
  90. data/rbi/telnyx/models/enterprises/{reputation_delete_all_params.rbi → reputation_retrieve_params.rbi} +2 -2
  91. data/rbi/telnyx/models/enterprises/{reputation_list_response.rbi → reputation_retrieve_response.rbi} +2 -2
  92. data/rbi/telnyx/models/porting_orders/phone_number_block_list_params.rbi +34 -34
  93. data/rbi/telnyx/models/pronunciation_dict_create_params.rbi +246 -0
  94. data/rbi/telnyx/models/pronunciation_dict_create_response.rbi +398 -0
  95. data/rbi/telnyx/models/pronunciation_dict_delete_params.rbi +38 -0
  96. data/rbi/telnyx/models/pronunciation_dict_list_params.rbi +57 -0
  97. data/rbi/telnyx/models/pronunciation_dict_list_response.rbi +353 -0
  98. data/rbi/telnyx/models/pronunciation_dict_retrieve_params.rbi +38 -0
  99. data/rbi/telnyx/models/pronunciation_dict_retrieve_response.rbi +398 -0
  100. data/rbi/telnyx/models/pronunciation_dict_update_params.rbi +268 -0
  101. data/rbi/telnyx/models/pronunciation_dict_update_response.rbi +398 -0
  102. data/rbi/telnyx/models/texml/accounts/call_calls_params.rbi +3719 -1011
  103. data/rbi/telnyx/models/texml_initiate_ai_call_params.rbi +1010 -0
  104. data/rbi/telnyx/models/texml_initiate_ai_call_response.rbi +58 -0
  105. data/rbi/telnyx/models/verification.rbi +1 -0
  106. data/rbi/telnyx/models/verification_trigger_whatsapp_verification_params.rbi +73 -0
  107. data/rbi/telnyx/models/verify_profile_create_params.rbi +85 -0
  108. data/rbi/telnyx/models/verify_profile_update_params.rbi +85 -0
  109. data/rbi/telnyx/models/voice_clone_create_from_upload_params.rbi +711 -136
  110. data/rbi/telnyx/models/voice_clone_create_params.rbi +345 -79
  111. data/rbi/telnyx/models/voice_clone_data.rbi +77 -4
  112. data/rbi/telnyx/models/whatsapp_message_content.rbi +492 -0
  113. data/rbi/telnyx/models/wireless_blocklist_update_params.rbi +6 -49
  114. data/rbi/telnyx/models.rbi +19 -10
  115. data/rbi/telnyx/resources/ai/assistants/versions.rbi +3 -0
  116. data/rbi/telnyx/resources/ai/assistants.rbi +4 -0
  117. data/rbi/telnyx/resources/calls/actions.rbi +5 -0
  118. data/rbi/telnyx/resources/calls.rbi +5 -0
  119. data/rbi/telnyx/resources/enterprises/reputation/numbers.rbi +34 -34
  120. data/rbi/telnyx/resources/enterprises/reputation.rbi +44 -44
  121. data/rbi/telnyx/resources/pronunciation_dicts.rbi +131 -0
  122. data/rbi/telnyx/resources/texml/accounts/calls.rbi +7 -163
  123. data/rbi/telnyx/resources/texml.rbi +164 -0
  124. data/rbi/telnyx/resources/verifications.rbi +23 -0
  125. data/rbi/telnyx/resources/verify_profiles.rbi +4 -0
  126. data/rbi/telnyx/resources/voice_clones.rbi +17 -41
  127. data/rbi/telnyx/resources/wireless_blocklists.rbi +3 -3
  128. data/sig/telnyx/client.rbs +2 -0
  129. data/sig/telnyx/internal/util.rbs +4 -0
  130. data/sig/telnyx/models/ai/assistant_create_params.rbs +9 -0
  131. data/sig/telnyx/models/ai/assistant_tool.rbs +17 -4
  132. data/sig/telnyx/models/ai/assistant_update_params.rbs +9 -0
  133. data/sig/telnyx/models/ai/assistants/update_assistant.rbs +9 -0
  134. data/sig/telnyx/models/ai/audio_transcribe_response.rbs +53 -3
  135. data/sig/telnyx/models/ai/conversation_add_message_params.rbs +5 -5
  136. data/sig/telnyx/models/ai/inference_embedding.rbs +9 -0
  137. data/sig/telnyx/models/ai/observability.rbs +58 -0
  138. data/sig/telnyx/models/ai/observability_req.rbs +58 -0
  139. data/sig/telnyx/models/ai/telephony_settings.rbs +7 -0
  140. data/sig/telnyx/models/call_dial_params.rbs +20 -0
  141. data/sig/telnyx/models/calls/action_transfer_params.rbs +20 -0
  142. data/sig/telnyx/models/enterprise_create_params.rbs +1 -1
  143. data/sig/telnyx/models/enterprise_public.rbs +1 -1
  144. data/sig/telnyx/models/enterprise_update_params.rbs +1 -1
  145. data/sig/telnyx/models/enterprises/reputation/{number_create_params.rbs → number_associate_params.rbs} +2 -2
  146. data/sig/telnyx/models/enterprises/reputation/{number_create_response.rbs → number_associate_response.rbs} +8 -8
  147. data/sig/telnyx/models/enterprises/reputation/{number_delete_params.rbs → number_disassociate_params.rbs} +2 -2
  148. data/sig/telnyx/models/enterprises/{reputation_list_params.rbs → reputation_disable_params.rbs} +2 -2
  149. data/sig/telnyx/models/enterprises/{reputation_create_params.rbs → reputation_enable_params.rbs} +9 -9
  150. data/sig/telnyx/models/enterprises/{reputation_create_response.rbs → reputation_enable_response.rbs} +2 -2
  151. data/sig/telnyx/models/enterprises/{reputation_delete_all_params.rbs → reputation_retrieve_params.rbs} +2 -2
  152. data/sig/telnyx/models/enterprises/{reputation_list_response.rbs → reputation_retrieve_response.rbs} +2 -2
  153. data/sig/telnyx/models/porting_orders/phone_number_block_list_params.rbs +9 -9
  154. data/sig/telnyx/models/pronunciation_dict_create_params.rbs +97 -0
  155. data/sig/telnyx/models/pronunciation_dict_create_response.rbs +167 -0
  156. data/sig/telnyx/models/pronunciation_dict_delete_params.rbs +20 -0
  157. data/sig/telnyx/models/pronunciation_dict_list_params.rbs +32 -0
  158. data/sig/telnyx/models/pronunciation_dict_list_response.rbs +144 -0
  159. data/sig/telnyx/models/pronunciation_dict_retrieve_params.rbs +20 -0
  160. data/sig/telnyx/models/pronunciation_dict_retrieve_response.rbs +167 -0
  161. data/sig/telnyx/models/pronunciation_dict_update_params.rbs +108 -0
  162. data/sig/telnyx/models/pronunciation_dict_update_response.rbs +167 -0
  163. data/sig/telnyx/models/texml/accounts/call_calls_params.rbs +1368 -331
  164. data/sig/telnyx/models/texml_initiate_ai_call_params.rbs +444 -0
  165. data/sig/telnyx/models/texml_initiate_ai_call_response.rbs +38 -0
  166. data/sig/telnyx/models/verification.rbs +2 -1
  167. data/sig/telnyx/models/verification_trigger_whatsapp_verification_params.rbs +43 -0
  168. data/sig/telnyx/models/verify_profile_create_params.rbs +43 -1
  169. data/sig/telnyx/models/verify_profile_update_params.rbs +43 -1
  170. data/sig/telnyx/models/voice_clone_create_from_upload_params.rbs +269 -58
  171. data/sig/telnyx/models/voice_clone_create_params.rbs +129 -44
  172. data/sig/telnyx/models/voice_clone_data.rbs +43 -0
  173. data/sig/telnyx/models/whatsapp_message_content.rbs +205 -0
  174. data/sig/telnyx/models/wireless_blocklist_update_params.rbs +5 -25
  175. data/sig/telnyx/models.rbs +14 -0
  176. data/sig/telnyx/resources/ai/assistants/versions.rbs +1 -0
  177. data/sig/telnyx/resources/ai/assistants.rbs +2 -0
  178. data/sig/telnyx/resources/calls/actions.rbs +1 -0
  179. data/sig/telnyx/resources/calls.rbs +1 -0
  180. data/sig/telnyx/resources/enterprises/reputation/numbers.rbs +7 -7
  181. data/sig/telnyx/resources/enterprises/reputation.rbs +8 -8
  182. data/sig/telnyx/resources/pronunciation_dicts.rbs +33 -0
  183. data/sig/telnyx/resources/texml/accounts/calls.rbs +1 -40
  184. data/sig/telnyx/resources/texml.rbs +44 -0
  185. data/sig/telnyx/resources/verifications.rbs +8 -0
  186. data/sig/telnyx/resources/verify_profiles.rbs +2 -0
  187. data/sig/telnyx/resources/voice_clones.rbs +2 -12
  188. data/sig/telnyx/resources/wireless_blocklists.rbs +1 -1
  189. metadata +71 -26
@@ -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
@@ -0,0 +1,190 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ # @see Telnyx::Resources::PronunciationDicts#list
6
+ class PronunciationDictListResponse < Telnyx::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # Unique identifier for the pronunciation dictionary.
9
+ #
10
+ # @return [String, nil]
11
+ optional :id, String
12
+
13
+ # @!attribute created_at
14
+ # ISO 8601 timestamp with millisecond precision.
15
+ #
16
+ # @return [Time, nil]
17
+ optional :created_at, Time
18
+
19
+ # @!attribute items
20
+ # List of pronunciation items (alias or phoneme type).
21
+ #
22
+ # @return [Array<Telnyx::Models::PronunciationDictListResponse::Item::Alias, Telnyx::Models::PronunciationDictListResponse::Item::Phoneme>, nil]
23
+ optional :items,
24
+ -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::Models::PronunciationDictListResponse::Item] }
25
+
26
+ # @!attribute name
27
+ # Human-readable name for the dictionary. Must be unique within the organization.
28
+ #
29
+ # @return [String, nil]
30
+ optional :name, String
31
+
32
+ # @!attribute record_type
33
+ # Identifies the resource type.
34
+ #
35
+ # @return [Symbol, Telnyx::Models::PronunciationDictListResponse::RecordType, nil]
36
+ optional :record_type, enum: -> { Telnyx::Models::PronunciationDictListResponse::RecordType }
37
+
38
+ # @!attribute updated_at
39
+ # ISO 8601 timestamp with millisecond precision.
40
+ #
41
+ # @return [Time, nil]
42
+ optional :updated_at, Time
43
+
44
+ # @!attribute version
45
+ # Auto-incrementing version number. Increases by 1 on each update. Used for
46
+ # optimistic concurrency control and cache invalidation.
47
+ #
48
+ # @return [Integer, nil]
49
+ optional :version, Integer
50
+
51
+ # @!method initialize(id: nil, created_at: nil, items: nil, name: nil, record_type: nil, updated_at: nil, version: nil)
52
+ # Some parameter documentations has been truncated, see
53
+ # {Telnyx::Models::PronunciationDictListResponse} for more details.
54
+ #
55
+ # A pronunciation dictionary record.
56
+ #
57
+ # @param id [String] Unique identifier for the pronunciation dictionary.
58
+ #
59
+ # @param created_at [Time] ISO 8601 timestamp with millisecond precision.
60
+ #
61
+ # @param items [Array<Telnyx::Models::PronunciationDictListResponse::Item::Alias, Telnyx::Models::PronunciationDictListResponse::Item::Phoneme>] List of pronunciation items (alias or phoneme type).
62
+ #
63
+ # @param name [String] Human-readable name for the dictionary. Must be unique within the organization.
64
+ #
65
+ # @param record_type [Symbol, Telnyx::Models::PronunciationDictListResponse::RecordType] Identifies the resource type.
66
+ #
67
+ # @param updated_at [Time] ISO 8601 timestamp with millisecond precision.
68
+ #
69
+ # @param version [Integer] Auto-incrementing version number. Increases by 1 on each update. Used for optimi
70
+
71
+ # A single pronunciation dictionary item. Use type 'alias' to replace matched text
72
+ # with a spoken alias, or type 'phoneme' to specify exact pronunciation using IPA
73
+ # notation.
74
+ module Item
75
+ extend Telnyx::Internal::Type::Union
76
+
77
+ discriminator :type
78
+
79
+ # An alias pronunciation item. When the `text` value is found in input, it is replaced with the `alias` before speech synthesis.
80
+ variant :alias, -> { Telnyx::Models::PronunciationDictListResponse::Item::Alias }
81
+
82
+ # A phoneme pronunciation item. When the `text` value is found in input, it is pronounced using the specified IPA phoneme notation.
83
+ variant :phoneme, -> { Telnyx::Models::PronunciationDictListResponse::Item::Phoneme }
84
+
85
+ class Alias < Telnyx::Internal::Type::BaseModel
86
+ # @!attribute alias_
87
+ # The replacement text that will be spoken instead.
88
+ #
89
+ # @return [String]
90
+ required :alias_, String, api_name: :alias
91
+
92
+ # @!attribute text
93
+ # The text to match in the input. Case-insensitive matching is used during
94
+ # synthesis.
95
+ #
96
+ # @return [String]
97
+ required :text, String
98
+
99
+ # @!attribute type
100
+ # The item type.
101
+ #
102
+ # @return [Symbol, :alias]
103
+ required :type, const: :alias
104
+
105
+ # @!method initialize(alias_:, text:, type: :alias)
106
+ # Some parameter documentations has been truncated, see
107
+ # {Telnyx::Models::PronunciationDictListResponse::Item::Alias} for more details.
108
+ #
109
+ # An alias pronunciation item. When the `text` value is found in input, it is
110
+ # replaced with the `alias` before speech synthesis.
111
+ #
112
+ # @param alias_ [String] The replacement text that will be spoken instead.
113
+ #
114
+ # @param text [String] The text to match in the input. Case-insensitive matching is used during synthes
115
+ #
116
+ # @param type [Symbol, :alias] The item type.
117
+ end
118
+
119
+ class Phoneme < Telnyx::Internal::Type::BaseModel
120
+ # @!attribute alphabet
121
+ # The phonetic alphabet used for the phoneme notation.
122
+ #
123
+ # @return [Symbol, Telnyx::Models::PronunciationDictListResponse::Item::Phoneme::Alphabet]
124
+ required :alphabet, enum: -> { Telnyx::Models::PronunciationDictListResponse::Item::Phoneme::Alphabet }
125
+
126
+ # @!attribute phoneme
127
+ # The phoneme notation representing the desired pronunciation.
128
+ #
129
+ # @return [String]
130
+ required :phoneme, String
131
+
132
+ # @!attribute text
133
+ # The text to match in the input. Case-insensitive matching is used during
134
+ # synthesis.
135
+ #
136
+ # @return [String]
137
+ required :text, String
138
+
139
+ # @!attribute type
140
+ # The item type.
141
+ #
142
+ # @return [Symbol, :phoneme]
143
+ required :type, const: :phoneme
144
+
145
+ # @!method initialize(alphabet:, phoneme:, text:, type: :phoneme)
146
+ # Some parameter documentations has been truncated, see
147
+ # {Telnyx::Models::PronunciationDictListResponse::Item::Phoneme} for more details.
148
+ #
149
+ # A phoneme pronunciation item. When the `text` value is found in input, it is
150
+ # pronounced using the specified IPA phoneme notation.
151
+ #
152
+ # @param alphabet [Symbol, Telnyx::Models::PronunciationDictListResponse::Item::Phoneme::Alphabet] The phonetic alphabet used for the phoneme notation.
153
+ #
154
+ # @param phoneme [String] The phoneme notation representing the desired pronunciation.
155
+ #
156
+ # @param text [String] The text to match in the input. Case-insensitive matching is used during synthes
157
+ #
158
+ # @param type [Symbol, :phoneme] The item type.
159
+
160
+ # The phonetic alphabet used for the phoneme notation.
161
+ #
162
+ # @see Telnyx::Models::PronunciationDictListResponse::Item::Phoneme#alphabet
163
+ module Alphabet
164
+ extend Telnyx::Internal::Type::Enum
165
+
166
+ IPA = :ipa
167
+
168
+ # @!method self.values
169
+ # @return [Array<Symbol>]
170
+ end
171
+ end
172
+
173
+ # @!method self.variants
174
+ # @return [Array(Telnyx::Models::PronunciationDictListResponse::Item::Alias, Telnyx::Models::PronunciationDictListResponse::Item::Phoneme)]
175
+ end
176
+
177
+ # Identifies the resource type.
178
+ #
179
+ # @see Telnyx::Models::PronunciationDictListResponse#record_type
180
+ module RecordType
181
+ extend Telnyx::Internal::Type::Enum
182
+
183
+ PRONUNCIATION_DICT = :pronunciation_dict
184
+
185
+ # @!method self.values
186
+ # @return [Array<Symbol>]
187
+ end
188
+ end
189
+ end
190
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ # @see Telnyx::Resources::PronunciationDicts#retrieve
6
+ class PronunciationDictRetrieveParams < 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,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