telnyx 5.70.0 → 5.71.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 (105) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/models/ai/assistant.rb +6 -149
  5. data/lib/telnyx/models/book_appointment_tool.rb +31 -0
  6. data/lib/telnyx/models/book_appointment_tool_params.rb +51 -0
  7. data/lib/telnyx/models/call_assistant_request.rb +176 -0
  8. data/lib/telnyx/models/call_control_bucket_ids.rb +23 -0
  9. data/lib/telnyx/models/call_control_retrieval_tool.rb +31 -0
  10. data/lib/telnyx/models/call_dial_params.rb +11 -1
  11. data/lib/telnyx/models/calls/action_answer_params.rb +11 -1
  12. data/lib/telnyx/models/calls/action_start_ai_assistant_params.rb +6 -39
  13. data/lib/telnyx/models/check_availability_tool.rb +31 -0
  14. data/lib/telnyx/models/check_availability_tool_params.rb +31 -0
  15. data/lib/telnyx/models/pronunciation_dict_alias_item.rb +51 -0
  16. data/lib/telnyx/models/pronunciation_dict_create_params.rb +5 -93
  17. data/lib/telnyx/models/pronunciation_dict_create_response.rb +3 -191
  18. data/lib/telnyx/models/pronunciation_dict_data.rb +101 -0
  19. data/lib/telnyx/models/pronunciation_dict_phoneme_item.rb +71 -0
  20. data/lib/telnyx/models/pronunciation_dict_retrieve_response.rb +3 -191
  21. data/lib/telnyx/models/pronunciation_dict_update_params.rb +5 -93
  22. data/lib/telnyx/models/pronunciation_dict_update_response.rb +3 -191
  23. data/lib/telnyx/models/texml/accounts/call_calls_params.rb +203 -191
  24. data/lib/telnyx/models/voice_clone_create_from_design_params.rb +3 -3
  25. data/lib/telnyx/models/voice_clone_create_from_upload_params.rb +61 -54
  26. data/lib/telnyx/models/voice_clone_create_params.rb +28 -28
  27. data/lib/telnyx/models/whatsapp/phone_numbers/profile/photo_retrieve_params.rb +26 -0
  28. data/lib/telnyx/models/whatsapp/phone_numbers/profile/photo_retrieve_response.rb +54 -0
  29. data/lib/telnyx/models.rb +20 -0
  30. data/lib/telnyx/resources/calls/actions.rb +4 -2
  31. data/lib/telnyx/resources/calls.rb +3 -1
  32. data/lib/telnyx/resources/pronunciation_dicts.rb +4 -4
  33. data/lib/telnyx/resources/texml/accounts/calls.rb +3 -3
  34. data/lib/telnyx/resources/voice_clones.rb +6 -6
  35. data/lib/telnyx/resources/whatsapp/phone_numbers/profile/photo.rb +20 -0
  36. data/lib/telnyx/version.rb +1 -1
  37. data/lib/telnyx.rb +12 -1
  38. data/rbi/telnyx/models/ai/assistant.rbi +15 -329
  39. data/rbi/telnyx/models/book_appointment_tool.rbi +65 -0
  40. data/rbi/telnyx/models/book_appointment_tool_params.rbi +83 -0
  41. data/rbi/telnyx/models/call_assistant_request.rbi +322 -0
  42. data/rbi/telnyx/models/call_control_bucket_ids.rbi +42 -0
  43. data/rbi/telnyx/models/call_control_retrieval_tool.rbi +63 -0
  44. data/rbi/telnyx/models/call_dial_params.rbi +15 -0
  45. data/rbi/telnyx/models/calls/action_answer_params.rbi +15 -0
  46. data/rbi/telnyx/models/calls/action_start_ai_assistant_params.rbi +10 -77
  47. data/rbi/telnyx/models/check_availability_tool.rbi +67 -0
  48. data/rbi/telnyx/models/check_availability_tool_params.rbi +45 -0
  49. data/rbi/telnyx/models/pronunciation_dict_alias_item.rbi +79 -0
  50. data/rbi/telnyx/models/pronunciation_dict_create_params.rbi +8 -154
  51. data/rbi/telnyx/models/pronunciation_dict_create_response.rbi +6 -366
  52. data/rbi/telnyx/models/pronunciation_dict_data.rbi +186 -0
  53. data/rbi/telnyx/models/pronunciation_dict_phoneme_item.rbi +117 -0
  54. data/rbi/telnyx/models/pronunciation_dict_retrieve_response.rbi +6 -366
  55. data/rbi/telnyx/models/pronunciation_dict_update_params.rbi +10 -156
  56. data/rbi/telnyx/models/pronunciation_dict_update_response.rbi +6 -366
  57. data/rbi/telnyx/models/texml/accounts/call_calls_params.rbi +391 -403
  58. data/rbi/telnyx/models/voice_clone_create_from_design_params.rbi +10 -10
  59. data/rbi/telnyx/models/voice_clone_create_from_upload_params.rbi +94 -92
  60. data/rbi/telnyx/models/voice_clone_create_params.rbi +53 -53
  61. data/rbi/telnyx/models/whatsapp/phone_numbers/profile/photo_retrieve_params.rbi +47 -0
  62. data/rbi/telnyx/models/whatsapp/phone_numbers/profile/photo_retrieve_response.rbi +118 -0
  63. data/rbi/telnyx/models.rbi +20 -0
  64. data/rbi/telnyx/resources/calls/actions.rbi +9 -3
  65. data/rbi/telnyx/resources/calls.rbi +5 -0
  66. data/rbi/telnyx/resources/pronunciation_dicts.rbi +5 -7
  67. data/rbi/telnyx/resources/texml/accounts/calls.rbi +5 -5
  68. data/rbi/telnyx/resources/voice_clones.rbi +9 -9
  69. data/rbi/telnyx/resources/whatsapp/phone_numbers/profile/photo.rbi +16 -0
  70. data/sig/telnyx/models/ai/assistant.rbs +3 -142
  71. data/sig/telnyx/models/book_appointment_tool.rbs +35 -0
  72. data/sig/telnyx/models/book_appointment_tool_params.rbs +39 -0
  73. data/sig/telnyx/models/call_assistant_request.rbs +132 -0
  74. data/sig/telnyx/models/call_control_bucket_ids.rbs +21 -0
  75. data/sig/telnyx/models/call_control_retrieval_tool.rbs +35 -0
  76. data/sig/telnyx/models/call_dial_params.rbs +9 -0
  77. data/sig/telnyx/models/calls/action_answer_params.rbs +9 -0
  78. data/sig/telnyx/models/calls/action_start_ai_assistant_params.rbs +6 -35
  79. data/sig/telnyx/models/check_availability_tool.rbs +35 -0
  80. data/sig/telnyx/models/check_availability_tool_params.rbs +16 -0
  81. data/sig/telnyx/models/pronunciation_dict_alias_item.rbs +40 -0
  82. data/sig/telnyx/models/pronunciation_dict_create_params.rbs +2 -58
  83. data/sig/telnyx/models/pronunciation_dict_create_response.rbs +6 -155
  84. data/sig/telnyx/models/pronunciation_dict_data.rbs +88 -0
  85. data/sig/telnyx/models/pronunciation_dict_phoneme_item.rbs +55 -0
  86. data/sig/telnyx/models/pronunciation_dict_retrieve_response.rbs +6 -155
  87. data/sig/telnyx/models/pronunciation_dict_update_params.rbs +2 -58
  88. data/sig/telnyx/models/pronunciation_dict_update_response.rbs +6 -155
  89. data/sig/telnyx/models/texml/accounts/call_calls_params.rbs +317 -325
  90. data/sig/telnyx/models/voice_clone_create_from_design_params.rbs +7 -7
  91. data/sig/telnyx/models/voice_clone_create_from_upload_params.rbs +63 -61
  92. data/sig/telnyx/models/voice_clone_create_params.rbs +35 -35
  93. data/sig/telnyx/models/whatsapp/phone_numbers/profile/photo_retrieve_params.rbs +30 -0
  94. data/sig/telnyx/models/whatsapp/phone_numbers/profile/photo_retrieve_response.rbs +63 -0
  95. data/sig/telnyx/models.rbs +20 -0
  96. data/sig/telnyx/resources/calls/actions.rbs +2 -1
  97. data/sig/telnyx/resources/calls.rbs +1 -0
  98. data/sig/telnyx/resources/pronunciation_dicts.rbs +1 -1
  99. data/sig/telnyx/resources/texml/accounts/calls.rbs +1 -1
  100. data/sig/telnyx/resources/voice_clones.rbs +2 -2
  101. data/sig/telnyx/resources/whatsapp/phone_numbers/profile/photo.rbs +5 -0
  102. metadata +38 -5
  103. data/lib/telnyx/models/pronunciation_dict_list_response.rb +0 -190
  104. data/rbi/telnyx/models/pronunciation_dict_list_response.rbi +0 -353
  105. data/sig/telnyx/models/pronunciation_dict_list_response.rbs +0 -144
@@ -14,10 +14,12 @@ module Telnyx
14
14
  required :call_control_id, String
15
15
 
16
16
  # @!attribute assistant
17
- # AI Assistant configuration
17
+ # AI Assistant configuration. All fields except `id` are optional — the
18
+ # assistant's stored configuration will be used as fallback for any omitted
19
+ # fields.
18
20
  #
19
- # @return [Telnyx::Models::Calls::ActionStartAIAssistantParams::Assistant, nil]
20
- optional :assistant, -> { Telnyx::Calls::ActionStartAIAssistantParams::Assistant }
21
+ # @return [Telnyx::Models::CallAssistantRequest, nil]
22
+ optional :assistant, -> { Telnyx::CallAssistantRequest }
21
23
 
22
24
  # @!attribute client_state
23
25
  # Use this field to add state to every subsequent webhook. It must be a valid
@@ -119,7 +121,7 @@ module Telnyx
119
121
  #
120
122
  # @param call_control_id [String]
121
123
  #
122
- # @param assistant [Telnyx::Models::Calls::ActionStartAIAssistantParams::Assistant] AI Assistant configuration
124
+ # @param assistant [Telnyx::Models::CallAssistantRequest] AI Assistant configuration. All fields except `id` are optional — the assistant'
123
125
  #
124
126
  # @param client_state [String] Use this field to add state to every subsequent webhook. It must be a valid Base
125
127
  #
@@ -143,41 +145,6 @@ module Telnyx
143
145
  #
144
146
  # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
145
147
 
146
- class Assistant < Telnyx::Internal::Type::BaseModel
147
- # @!attribute id
148
- # The identifier of the AI assistant to use
149
- #
150
- # @return [String, nil]
151
- optional :id, String
152
-
153
- # @!attribute instructions
154
- # The system instructions that the voice assistant uses during the start assistant
155
- # command. This will overwrite the instructions set in the assistant
156
- # configuration.
157
- #
158
- # @return [String, nil]
159
- optional :instructions, String
160
-
161
- # @!attribute openai_api_key_ref
162
- # Reference to the OpenAI API key. Required only when using OpenAI models
163
- #
164
- # @return [String, nil]
165
- optional :openai_api_key_ref, String
166
-
167
- # @!method initialize(id: nil, instructions: nil, openai_api_key_ref: nil)
168
- # Some parameter documentations has been truncated, see
169
- # {Telnyx::Models::Calls::ActionStartAIAssistantParams::Assistant} for more
170
- # details.
171
- #
172
- # AI Assistant configuration
173
- #
174
- # @param id [String] The identifier of the AI assistant to use
175
- #
176
- # @param instructions [String] The system instructions that the voice assistant uses during the start assistant
177
- #
178
- # @param openai_api_key_ref [String] Reference to the OpenAI API key. Required only when using OpenAI models
179
- end
180
-
181
148
  # Messages sent by an end user
182
149
  module MessageHistory
183
150
  extend Telnyx::Internal::Type::Union
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ class CheckAvailabilityTool < Telnyx::Internal::Type::BaseModel
6
+ # @!attribute check_availability
7
+ #
8
+ # @return [Telnyx::Models::CheckAvailabilityToolParams]
9
+ required :check_availability, -> { Telnyx::CheckAvailabilityToolParams }
10
+
11
+ # @!attribute type
12
+ #
13
+ # @return [Symbol, Telnyx::Models::CheckAvailabilityTool::Type]
14
+ required :type, enum: -> { Telnyx::CheckAvailabilityTool::Type }
15
+
16
+ # @!method initialize(check_availability:, type:)
17
+ # @param check_availability [Telnyx::Models::CheckAvailabilityToolParams]
18
+ # @param type [Symbol, Telnyx::Models::CheckAvailabilityTool::Type]
19
+
20
+ # @see Telnyx::Models::CheckAvailabilityTool#type
21
+ module Type
22
+ extend Telnyx::Internal::Type::Enum
23
+
24
+ CHECK_AVAILABILITY = :check_availability
25
+
26
+ # @!method self.values
27
+ # @return [Array<Symbol>]
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ class CheckAvailabilityToolParams < Telnyx::Internal::Type::BaseModel
6
+ # @!attribute api_key_ref
7
+ # Reference to an integration secret that contains your Cal.com API key. You would
8
+ # pass the `identifier` for an integration secret
9
+ # [/v2/integration_secrets](https://developers.telnyx.com/api/secrets-manager/integration-secrets/create-integration-secret)
10
+ # that refers to your Cal.com API key.
11
+ #
12
+ # @return [String]
13
+ required :api_key_ref, String
14
+
15
+ # @!attribute event_type_id
16
+ # Event Type ID for which slots are being fetched.
17
+ # [cal.com](https://cal.com/docs/api-reference/v2/slots/get-available-slots#parameter-event-type-id)
18
+ #
19
+ # @return [Integer]
20
+ required :event_type_id, Integer
21
+
22
+ # @!method initialize(api_key_ref:, event_type_id:)
23
+ # Some parameter documentations has been truncated, see
24
+ # {Telnyx::Models::CheckAvailabilityToolParams} for more details.
25
+ #
26
+ # @param api_key_ref [String] Reference to an integration secret that contains your Cal.com API key. You would
27
+ #
28
+ # @param event_type_id [Integer] Event Type ID for which slots are being fetched. [cal.com](https://cal.com/docs/
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ class PronunciationDictAliasItem < Telnyx::Internal::Type::BaseModel
6
+ # @!attribute alias_
7
+ # The replacement text that will be spoken instead.
8
+ #
9
+ # @return [String]
10
+ required :alias_, String, api_name: :alias
11
+
12
+ # @!attribute text
13
+ # The text to match in the input. Case-insensitive matching is used during
14
+ # synthesis.
15
+ #
16
+ # @return [String]
17
+ required :text, String
18
+
19
+ # @!attribute type
20
+ # The item type.
21
+ #
22
+ # @return [Symbol, Telnyx::Models::PronunciationDictAliasItem::Type]
23
+ required :type, enum: -> { Telnyx::PronunciationDictAliasItem::Type }
24
+
25
+ # @!method initialize(alias_:, text:, type:)
26
+ # Some parameter documentations has been truncated, see
27
+ # {Telnyx::Models::PronunciationDictAliasItem} for more details.
28
+ #
29
+ # An alias pronunciation item. When the `text` value is found in input, it is
30
+ # replaced with the `alias` before speech synthesis.
31
+ #
32
+ # @param alias_ [String] The replacement text that will be spoken instead.
33
+ #
34
+ # @param text [String] The text to match in the input. Case-insensitive matching is used during synthes
35
+ #
36
+ # @param type [Symbol, Telnyx::Models::PronunciationDictAliasItem::Type] The item type.
37
+
38
+ # The item type.
39
+ #
40
+ # @see Telnyx::Models::PronunciationDictAliasItem#type
41
+ module Type
42
+ extend Telnyx::Internal::Type::Enum
43
+
44
+ ALIAS = :alias
45
+
46
+ # @!method self.values
47
+ # @return [Array<Symbol>]
48
+ end
49
+ end
50
+ end
51
+ end
@@ -11,7 +11,7 @@ module Telnyx
11
11
  # List of pronunciation items (alias or phoneme type). At least one item is
12
12
  # required.
13
13
  #
14
- # @return [Array<Telnyx::Models::PronunciationDictCreateParams::Item::Alias, Telnyx::Models::PronunciationDictCreateParams::Item::Phoneme>]
14
+ # @return [Array<Telnyx::Models::PronunciationDictAliasItem, Telnyx::Models::PronunciationDictPhonemeItem>]
15
15
  required :items,
16
16
  -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::PronunciationDictCreateParams::Item] }
17
17
 
@@ -25,7 +25,7 @@ module Telnyx
25
25
  # Some parameter documentations has been truncated, see
26
26
  # {Telnyx::Models::PronunciationDictCreateParams} for more details.
27
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
28
+ # @param items [Array<Telnyx::Models::PronunciationDictAliasItem, Telnyx::Models::PronunciationDictPhonemeItem>] List of pronunciation items (alias or phoneme type). At least one item is requir
29
29
  #
30
30
  # @param name [String] Human-readable name. Must be unique within the organization.
31
31
  #
@@ -40,101 +40,13 @@ module Telnyx
40
40
  discriminator :type
41
41
 
42
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 }
43
+ variant :alias, -> { Telnyx::PronunciationDictAliasItem }
44
44
 
45
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
46
+ variant :phoneme, -> { Telnyx::PronunciationDictPhonemeItem }
135
47
 
136
48
  # @!method self.variants
137
- # @return [Array(Telnyx::Models::PronunciationDictCreateParams::Item::Alias, Telnyx::Models::PronunciationDictCreateParams::Item::Phoneme)]
49
+ # @return [Array(Telnyx::Models::PronunciationDictAliasItem, Telnyx::Models::PronunciationDictPhonemeItem)]
138
50
  end
139
51
  end
140
52
  end
@@ -7,201 +7,13 @@ module Telnyx
7
7
  # @!attribute data
8
8
  # A pronunciation dictionary record.
9
9
  #
10
- # @return [Telnyx::Models::PronunciationDictCreateResponse::Data, nil]
11
- optional :data, -> { Telnyx::Models::PronunciationDictCreateResponse::Data }
10
+ # @return [Telnyx::Models::PronunciationDictData, nil]
11
+ optional :data, -> { Telnyx::PronunciationDictData }
12
12
 
13
13
  # @!method initialize(data: nil)
14
14
  # Response containing a single pronunciation dictionary.
15
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
16
+ # @param data [Telnyx::Models::PronunciationDictData] A pronunciation dictionary record.
205
17
  end
206
18
  end
207
19
  end
@@ -0,0 +1,101 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ # @see Telnyx::Resources::PronunciationDicts#list
6
+ class PronunciationDictData < 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::PronunciationDictAliasItem, Telnyx::Models::PronunciationDictPhonemeItem>, nil]
23
+ optional :items, -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::PronunciationDictData::Item] }
24
+
25
+ # @!attribute name
26
+ # Human-readable name for the dictionary. Must be unique within the organization.
27
+ #
28
+ # @return [String, nil]
29
+ optional :name, String
30
+
31
+ # @!attribute record_type
32
+ # Identifies the resource type.
33
+ #
34
+ # @return [Symbol, Telnyx::Models::PronunciationDictData::RecordType, nil]
35
+ optional :record_type, enum: -> { Telnyx::PronunciationDictData::RecordType }
36
+
37
+ # @!attribute updated_at
38
+ # ISO 8601 timestamp with millisecond precision.
39
+ #
40
+ # @return [Time, nil]
41
+ optional :updated_at, Time
42
+
43
+ # @!attribute version
44
+ # Auto-incrementing version number. Increases by 1 on each update. Used for
45
+ # optimistic concurrency control and cache invalidation.
46
+ #
47
+ # @return [Integer, nil]
48
+ optional :version, Integer
49
+
50
+ # @!method initialize(id: nil, created_at: nil, items: nil, name: nil, record_type: nil, updated_at: nil, version: nil)
51
+ # Some parameter documentations has been truncated, see
52
+ # {Telnyx::Models::PronunciationDictData} for more details.
53
+ #
54
+ # A pronunciation dictionary record.
55
+ #
56
+ # @param id [String] Unique identifier for the pronunciation dictionary.
57
+ #
58
+ # @param created_at [Time] ISO 8601 timestamp with millisecond precision.
59
+ #
60
+ # @param items [Array<Telnyx::Models::PronunciationDictAliasItem, Telnyx::Models::PronunciationDictPhonemeItem>] List of pronunciation items (alias or phoneme type).
61
+ #
62
+ # @param name [String] Human-readable name for the dictionary. Must be unique within the organization.
63
+ #
64
+ # @param record_type [Symbol, Telnyx::Models::PronunciationDictData::RecordType] Identifies the resource type.
65
+ #
66
+ # @param updated_at [Time] ISO 8601 timestamp with millisecond precision.
67
+ #
68
+ # @param version [Integer] Auto-incrementing version number. Increases by 1 on each update. Used for optimi
69
+
70
+ # A single pronunciation dictionary item. Use type 'alias' to replace matched text
71
+ # with a spoken alias, or type 'phoneme' to specify exact pronunciation using IPA
72
+ # notation.
73
+ module Item
74
+ extend Telnyx::Internal::Type::Union
75
+
76
+ discriminator :type
77
+
78
+ # An alias pronunciation item. When the `text` value is found in input, it is replaced with the `alias` before speech synthesis.
79
+ variant :alias, -> { Telnyx::PronunciationDictAliasItem }
80
+
81
+ # A phoneme pronunciation item. When the `text` value is found in input, it is pronounced using the specified IPA phoneme notation.
82
+ variant :phoneme, -> { Telnyx::PronunciationDictPhonemeItem }
83
+
84
+ # @!method self.variants
85
+ # @return [Array(Telnyx::Models::PronunciationDictAliasItem, Telnyx::Models::PronunciationDictPhonemeItem)]
86
+ end
87
+
88
+ # Identifies the resource type.
89
+ #
90
+ # @see Telnyx::Models::PronunciationDictData#record_type
91
+ module RecordType
92
+ extend Telnyx::Internal::Type::Enum
93
+
94
+ PRONUNCIATION_DICT = :pronunciation_dict
95
+
96
+ # @!method self.values
97
+ # @return [Array<Symbol>]
98
+ end
99
+ end
100
+ end
101
+ end
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ class PronunciationDictPhonemeItem < Telnyx::Internal::Type::BaseModel
6
+ # @!attribute alphabet
7
+ # The phonetic alphabet used for the phoneme notation.
8
+ #
9
+ # @return [Symbol, Telnyx::Models::PronunciationDictPhonemeItem::Alphabet]
10
+ required :alphabet, enum: -> { Telnyx::PronunciationDictPhonemeItem::Alphabet }
11
+
12
+ # @!attribute phoneme
13
+ # The phoneme notation representing the desired pronunciation.
14
+ #
15
+ # @return [String]
16
+ required :phoneme, String
17
+
18
+ # @!attribute text
19
+ # The text to match in the input. Case-insensitive matching is used during
20
+ # synthesis.
21
+ #
22
+ # @return [String]
23
+ required :text, String
24
+
25
+ # @!attribute type
26
+ # The item type.
27
+ #
28
+ # @return [Symbol, Telnyx::Models::PronunciationDictPhonemeItem::Type]
29
+ required :type, enum: -> { Telnyx::PronunciationDictPhonemeItem::Type }
30
+
31
+ # @!method initialize(alphabet:, phoneme:, text:, type:)
32
+ # Some parameter documentations has been truncated, see
33
+ # {Telnyx::Models::PronunciationDictPhonemeItem} for more details.
34
+ #
35
+ # A phoneme pronunciation item. When the `text` value is found in input, it is
36
+ # pronounced using the specified IPA phoneme notation.
37
+ #
38
+ # @param alphabet [Symbol, Telnyx::Models::PronunciationDictPhonemeItem::Alphabet] The phonetic alphabet used for the phoneme notation.
39
+ #
40
+ # @param phoneme [String] The phoneme notation representing the desired pronunciation.
41
+ #
42
+ # @param text [String] The text to match in the input. Case-insensitive matching is used during synthes
43
+ #
44
+ # @param type [Symbol, Telnyx::Models::PronunciationDictPhonemeItem::Type] The item type.
45
+
46
+ # The phonetic alphabet used for the phoneme notation.
47
+ #
48
+ # @see Telnyx::Models::PronunciationDictPhonemeItem#alphabet
49
+ module Alphabet
50
+ extend Telnyx::Internal::Type::Enum
51
+
52
+ IPA = :ipa
53
+
54
+ # @!method self.values
55
+ # @return [Array<Symbol>]
56
+ end
57
+
58
+ # The item type.
59
+ #
60
+ # @see Telnyx::Models::PronunciationDictPhonemeItem#type
61
+ module Type
62
+ extend Telnyx::Internal::Type::Enum
63
+
64
+ PHONEME = :phoneme
65
+
66
+ # @!method self.values
67
+ # @return [Array<Symbol>]
68
+ end
69
+ end
70
+ end
71
+ end