telnyx 5.68.1 → 5.69.0

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