telnyx 5.70.0 → 5.72.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 (108) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +40 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/lib/webhook_verification.rb +14 -1
  5. data/lib/telnyx/lib/webhooks_ed25519.rb +51 -38
  6. data/lib/telnyx/lib.rb +14 -0
  7. data/lib/telnyx/models/ai/assistant.rb +6 -149
  8. data/lib/telnyx/models/book_appointment_tool.rb +31 -0
  9. data/lib/telnyx/models/book_appointment_tool_params.rb +51 -0
  10. data/lib/telnyx/models/call_assistant_request.rb +176 -0
  11. data/lib/telnyx/models/call_control_bucket_ids.rb +23 -0
  12. data/lib/telnyx/models/call_control_retrieval_tool.rb +31 -0
  13. data/lib/telnyx/models/call_dial_params.rb +11 -1
  14. data/lib/telnyx/models/calls/action_answer_params.rb +11 -1
  15. data/lib/telnyx/models/calls/action_start_ai_assistant_params.rb +6 -39
  16. data/lib/telnyx/models/check_availability_tool.rb +31 -0
  17. data/lib/telnyx/models/check_availability_tool_params.rb +31 -0
  18. data/lib/telnyx/models/pronunciation_dict_alias_item.rb +51 -0
  19. data/lib/telnyx/models/pronunciation_dict_create_params.rb +5 -93
  20. data/lib/telnyx/models/pronunciation_dict_create_response.rb +3 -191
  21. data/lib/telnyx/models/pronunciation_dict_data.rb +101 -0
  22. data/lib/telnyx/models/pronunciation_dict_phoneme_item.rb +71 -0
  23. data/lib/telnyx/models/pronunciation_dict_retrieve_response.rb +3 -191
  24. data/lib/telnyx/models/pronunciation_dict_update_params.rb +5 -93
  25. data/lib/telnyx/models/pronunciation_dict_update_response.rb +3 -191
  26. data/lib/telnyx/models/texml/accounts/call_calls_params.rb +203 -191
  27. data/lib/telnyx/models/voice_clone_create_from_design_params.rb +3 -3
  28. data/lib/telnyx/models/voice_clone_create_from_upload_params.rb +61 -54
  29. data/lib/telnyx/models/voice_clone_create_params.rb +28 -28
  30. data/lib/telnyx/models/whatsapp/phone_numbers/profile/photo_retrieve_params.rb +26 -0
  31. data/lib/telnyx/models/whatsapp/phone_numbers/profile/photo_retrieve_response.rb +54 -0
  32. data/lib/telnyx/models.rb +20 -0
  33. data/lib/telnyx/resources/calls/actions.rb +4 -2
  34. data/lib/telnyx/resources/calls.rb +3 -1
  35. data/lib/telnyx/resources/pronunciation_dicts.rb +4 -4
  36. data/lib/telnyx/resources/texml/accounts/calls.rb +3 -3
  37. data/lib/telnyx/resources/voice_clones.rb +6 -6
  38. data/lib/telnyx/resources/whatsapp/phone_numbers/profile/photo.rb +20 -0
  39. data/lib/telnyx/version.rb +1 -1
  40. data/lib/telnyx.rb +16 -1
  41. data/rbi/telnyx/models/ai/assistant.rbi +15 -329
  42. data/rbi/telnyx/models/book_appointment_tool.rbi +65 -0
  43. data/rbi/telnyx/models/book_appointment_tool_params.rbi +83 -0
  44. data/rbi/telnyx/models/call_assistant_request.rbi +322 -0
  45. data/rbi/telnyx/models/call_control_bucket_ids.rbi +42 -0
  46. data/rbi/telnyx/models/call_control_retrieval_tool.rbi +63 -0
  47. data/rbi/telnyx/models/call_dial_params.rbi +15 -0
  48. data/rbi/telnyx/models/calls/action_answer_params.rbi +15 -0
  49. data/rbi/telnyx/models/calls/action_start_ai_assistant_params.rbi +10 -77
  50. data/rbi/telnyx/models/check_availability_tool.rbi +67 -0
  51. data/rbi/telnyx/models/check_availability_tool_params.rbi +45 -0
  52. data/rbi/telnyx/models/pronunciation_dict_alias_item.rbi +79 -0
  53. data/rbi/telnyx/models/pronunciation_dict_create_params.rbi +8 -154
  54. data/rbi/telnyx/models/pronunciation_dict_create_response.rbi +6 -366
  55. data/rbi/telnyx/models/pronunciation_dict_data.rbi +186 -0
  56. data/rbi/telnyx/models/pronunciation_dict_phoneme_item.rbi +117 -0
  57. data/rbi/telnyx/models/pronunciation_dict_retrieve_response.rbi +6 -366
  58. data/rbi/telnyx/models/pronunciation_dict_update_params.rbi +10 -156
  59. data/rbi/telnyx/models/pronunciation_dict_update_response.rbi +6 -366
  60. data/rbi/telnyx/models/texml/accounts/call_calls_params.rbi +391 -403
  61. data/rbi/telnyx/models/voice_clone_create_from_design_params.rbi +10 -10
  62. data/rbi/telnyx/models/voice_clone_create_from_upload_params.rbi +94 -92
  63. data/rbi/telnyx/models/voice_clone_create_params.rbi +53 -53
  64. data/rbi/telnyx/models/whatsapp/phone_numbers/profile/photo_retrieve_params.rbi +47 -0
  65. data/rbi/telnyx/models/whatsapp/phone_numbers/profile/photo_retrieve_response.rbi +118 -0
  66. data/rbi/telnyx/models.rbi +20 -0
  67. data/rbi/telnyx/resources/calls/actions.rbi +9 -3
  68. data/rbi/telnyx/resources/calls.rbi +5 -0
  69. data/rbi/telnyx/resources/pronunciation_dicts.rbi +5 -7
  70. data/rbi/telnyx/resources/texml/accounts/calls.rbi +5 -5
  71. data/rbi/telnyx/resources/voice_clones.rbi +9 -9
  72. data/rbi/telnyx/resources/whatsapp/phone_numbers/profile/photo.rbi +16 -0
  73. data/sig/telnyx/models/ai/assistant.rbs +3 -142
  74. data/sig/telnyx/models/book_appointment_tool.rbs +35 -0
  75. data/sig/telnyx/models/book_appointment_tool_params.rbs +39 -0
  76. data/sig/telnyx/models/call_assistant_request.rbs +132 -0
  77. data/sig/telnyx/models/call_control_bucket_ids.rbs +21 -0
  78. data/sig/telnyx/models/call_control_retrieval_tool.rbs +35 -0
  79. data/sig/telnyx/models/call_dial_params.rbs +9 -0
  80. data/sig/telnyx/models/calls/action_answer_params.rbs +9 -0
  81. data/sig/telnyx/models/calls/action_start_ai_assistant_params.rbs +6 -35
  82. data/sig/telnyx/models/check_availability_tool.rbs +35 -0
  83. data/sig/telnyx/models/check_availability_tool_params.rbs +16 -0
  84. data/sig/telnyx/models/pronunciation_dict_alias_item.rbs +40 -0
  85. data/sig/telnyx/models/pronunciation_dict_create_params.rbs +2 -58
  86. data/sig/telnyx/models/pronunciation_dict_create_response.rbs +6 -155
  87. data/sig/telnyx/models/pronunciation_dict_data.rbs +88 -0
  88. data/sig/telnyx/models/pronunciation_dict_phoneme_item.rbs +55 -0
  89. data/sig/telnyx/models/pronunciation_dict_retrieve_response.rbs +6 -155
  90. data/sig/telnyx/models/pronunciation_dict_update_params.rbs +2 -58
  91. data/sig/telnyx/models/pronunciation_dict_update_response.rbs +6 -155
  92. data/sig/telnyx/models/texml/accounts/call_calls_params.rbs +317 -325
  93. data/sig/telnyx/models/voice_clone_create_from_design_params.rbs +7 -7
  94. data/sig/telnyx/models/voice_clone_create_from_upload_params.rbs +63 -61
  95. data/sig/telnyx/models/voice_clone_create_params.rbs +35 -35
  96. data/sig/telnyx/models/whatsapp/phone_numbers/profile/photo_retrieve_params.rbs +30 -0
  97. data/sig/telnyx/models/whatsapp/phone_numbers/profile/photo_retrieve_response.rbs +63 -0
  98. data/sig/telnyx/models.rbs +20 -0
  99. data/sig/telnyx/resources/calls/actions.rbs +2 -1
  100. data/sig/telnyx/resources/calls.rbs +1 -0
  101. data/sig/telnyx/resources/pronunciation_dicts.rbs +1 -1
  102. data/sig/telnyx/resources/texml/accounts/calls.rbs +1 -1
  103. data/sig/telnyx/resources/voice_clones.rbs +2 -2
  104. data/sig/telnyx/resources/whatsapp/phone_numbers/profile/photo.rbs +5 -0
  105. metadata +39 -5
  106. data/lib/telnyx/models/pronunciation_dict_list_response.rb +0 -190
  107. data/rbi/telnyx/models/pronunciation_dict_list_response.rbi +0 -353
  108. data/sig/telnyx/models/pronunciation_dict_list_response.rbs +0 -144
@@ -9,17 +9,17 @@ module Telnyx
9
9
  # design. The clone can then be used for text-to-speech synthesis.
10
10
  sig do
11
11
  params(
12
- body:
12
+ params:
13
13
  T.any(
14
- Telnyx::VoiceCloneCreateParams::Body::TelnyxDesignClone::OrHash,
15
- Telnyx::VoiceCloneCreateParams::Body::MinimaxDesignClone::OrHash
14
+ Telnyx::VoiceCloneCreateParams::Params::TelnyxDesignClone::OrHash,
15
+ Telnyx::VoiceCloneCreateParams::Params::MinimaxDesignClone::OrHash
16
16
  ),
17
17
  request_options: Telnyx::RequestOptions::OrHash
18
18
  ).returns(Telnyx::Models::VoiceCloneCreateResponse)
19
19
  end
20
20
  def create(
21
21
  # Request body for creating a voice clone from an existing voice design.
22
- body:,
22
+ params:,
23
23
  request_options: {}
24
24
  )
25
25
  end
@@ -92,11 +92,11 @@ module Telnyx
92
92
  # clear speech. Maximum file size: 5MB for Telnyx, 20MB for Minimax.
93
93
  sig do
94
94
  params(
95
- body:
95
+ upload_params:
96
96
  T.any(
97
- Telnyx::VoiceCloneCreateFromUploadParams::Body::TelnyxQwen3TtsClone::OrHash,
98
- Telnyx::VoiceCloneCreateFromUploadParams::Body::TelnyxUltraClone::OrHash,
99
- Telnyx::VoiceCloneCreateFromUploadParams::Body::MinimaxClone::OrHash
97
+ Telnyx::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxQwen3TtsClone::OrHash,
98
+ Telnyx::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxUltraClone::OrHash,
99
+ Telnyx::VoiceCloneCreateFromUploadParams::UploadParams::MinimaxClone::OrHash
100
100
  ),
101
101
  request_options: Telnyx::RequestOptions::OrHash
102
102
  ).returns(Telnyx::Models::VoiceCloneCreateFromUploadResponse)
@@ -104,7 +104,7 @@ module Telnyx
104
104
  def create_from_upload(
105
105
  # Multipart form data for creating a voice clone from a direct audio upload.
106
106
  # Maximum file size: 5MB for Telnyx, 20MB for Minimax.
107
- body:,
107
+ upload_params:,
108
108
  request_options: {}
109
109
  )
110
110
  end
@@ -7,6 +7,22 @@ module Telnyx
7
7
  class Profile
8
8
  # Manage Whatsapp phone numbers
9
9
  class Photo
10
+ # Get Whatsapp profile photo
11
+ sig do
12
+ params(
13
+ phone_number: String,
14
+ request_options: Telnyx::RequestOptions::OrHash
15
+ ).returns(
16
+ Telnyx::Models::Whatsapp::PhoneNumbers::Profile::PhotoRetrieveResponse
17
+ )
18
+ end
19
+ def retrieve(
20
+ # Phone number (E.164 format)
21
+ phone_number,
22
+ request_options: {}
23
+ )
24
+ end
25
+
10
26
  # Delete Whatsapp profile photo
11
27
  sig do
12
28
  params(
@@ -43,155 +43,16 @@ module Telnyx
43
43
  }
44
44
 
45
45
  type tool =
46
- Telnyx::AI::Assistant::Tool::BookAppointment
47
- | Telnyx::AI::Assistant::Tool::CheckAvailability
46
+ Telnyx::BookAppointmentTool
47
+ | Telnyx::CheckAvailabilityTool
48
48
  | Telnyx::AI::WebhookTool
49
49
  | Telnyx::AI::HangupTool
50
50
  | Telnyx::AI::TransferTool
51
- | Telnyx::AI::Assistant::Tool::Retrieval
51
+ | Telnyx::CallControlRetrievalTool
52
52
 
53
53
  module Tool
54
54
  extend Telnyx::Internal::Type::Union
55
55
 
56
- type book_appointment =
57
- {
58
- book_appointment: Telnyx::AI::Assistant::Tool::BookAppointment::BookAppointment,
59
- type: :book_appointment
60
- }
61
-
62
- class BookAppointment < Telnyx::Internal::Type::BaseModel
63
- attr_accessor book_appointment: Telnyx::AI::Assistant::Tool::BookAppointment::BookAppointment
64
-
65
- attr_accessor type: :book_appointment
66
-
67
- def initialize: (
68
- book_appointment: Telnyx::AI::Assistant::Tool::BookAppointment::BookAppointment,
69
- ?type: :book_appointment
70
- ) -> void
71
-
72
- def to_hash: -> {
73
- book_appointment: Telnyx::AI::Assistant::Tool::BookAppointment::BookAppointment,
74
- type: :book_appointment
75
- }
76
-
77
- type book_appointment =
78
- {
79
- api_key_ref: String,
80
- event_type_id: Integer,
81
- attendee_name: String,
82
- attendee_timezone: String
83
- }
84
-
85
- class BookAppointment < Telnyx::Internal::Type::BaseModel
86
- attr_accessor api_key_ref: String
87
-
88
- attr_accessor event_type_id: Integer
89
-
90
- attr_reader attendee_name: String?
91
-
92
- def attendee_name=: (String) -> String
93
-
94
- attr_reader attendee_timezone: String?
95
-
96
- def attendee_timezone=: (String) -> String
97
-
98
- def initialize: (
99
- api_key_ref: String,
100
- event_type_id: Integer,
101
- ?attendee_name: String,
102
- ?attendee_timezone: String
103
- ) -> void
104
-
105
- def to_hash: -> {
106
- api_key_ref: String,
107
- event_type_id: Integer,
108
- attendee_name: String,
109
- attendee_timezone: String
110
- }
111
- end
112
- end
113
-
114
- type check_availability =
115
- {
116
- check_availability: Telnyx::AI::Assistant::Tool::CheckAvailability::CheckAvailability,
117
- type: :check_availability
118
- }
119
-
120
- class CheckAvailability < Telnyx::Internal::Type::BaseModel
121
- attr_accessor check_availability: Telnyx::AI::Assistant::Tool::CheckAvailability::CheckAvailability
122
-
123
- attr_accessor type: :check_availability
124
-
125
- def initialize: (
126
- check_availability: Telnyx::AI::Assistant::Tool::CheckAvailability::CheckAvailability,
127
- ?type: :check_availability
128
- ) -> void
129
-
130
- def to_hash: -> {
131
- check_availability: Telnyx::AI::Assistant::Tool::CheckAvailability::CheckAvailability,
132
- type: :check_availability
133
- }
134
-
135
- type check_availability =
136
- { api_key_ref: String, event_type_id: Integer }
137
-
138
- class CheckAvailability < Telnyx::Internal::Type::BaseModel
139
- attr_accessor api_key_ref: String
140
-
141
- attr_accessor event_type_id: Integer
142
-
143
- def initialize: (
144
- api_key_ref: String,
145
- event_type_id: Integer
146
- ) -> void
147
-
148
- def to_hash: -> { api_key_ref: String, event_type_id: Integer }
149
- end
150
- end
151
-
152
- type retrieval =
153
- {
154
- retrieval: Telnyx::AI::Assistant::Tool::Retrieval::Retrieval,
155
- type: :retrieval
156
- }
157
-
158
- class Retrieval < Telnyx::Internal::Type::BaseModel
159
- attr_accessor retrieval: Telnyx::AI::Assistant::Tool::Retrieval::Retrieval
160
-
161
- attr_accessor type: :retrieval
162
-
163
- def initialize: (
164
- retrieval: Telnyx::AI::Assistant::Tool::Retrieval::Retrieval,
165
- ?type: :retrieval
166
- ) -> void
167
-
168
- def to_hash: -> {
169
- retrieval: Telnyx::AI::Assistant::Tool::Retrieval::Retrieval,
170
- type: :retrieval
171
- }
172
-
173
- type retrieval =
174
- { bucket_ids: ::Array[String], max_num_results: Integer }
175
-
176
- class Retrieval < Telnyx::Internal::Type::BaseModel
177
- attr_accessor bucket_ids: ::Array[String]
178
-
179
- attr_reader max_num_results: Integer?
180
-
181
- def max_num_results=: (Integer) -> Integer
182
-
183
- def initialize: (
184
- bucket_ids: ::Array[String],
185
- ?max_num_results: Integer
186
- ) -> void
187
-
188
- def to_hash: -> {
189
- bucket_ids: ::Array[String],
190
- max_num_results: Integer
191
- }
192
- end
193
- end
194
-
195
56
  def self?.variants: -> ::Array[Telnyx::Models::AI::Assistant::tool]
196
57
  end
197
58
  end
@@ -0,0 +1,35 @@
1
+ module Telnyx
2
+ module Models
3
+ type book_appointment_tool =
4
+ {
5
+ book_appointment: Telnyx::BookAppointmentToolParams,
6
+ type: Telnyx::Models::BookAppointmentTool::type_
7
+ }
8
+
9
+ class BookAppointmentTool < Telnyx::Internal::Type::BaseModel
10
+ attr_accessor book_appointment: Telnyx::BookAppointmentToolParams
11
+
12
+ attr_accessor type: Telnyx::Models::BookAppointmentTool::type_
13
+
14
+ def initialize: (
15
+ book_appointment: Telnyx::BookAppointmentToolParams,
16
+ type: Telnyx::Models::BookAppointmentTool::type_
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ book_appointment: Telnyx::BookAppointmentToolParams,
21
+ type: Telnyx::Models::BookAppointmentTool::type_
22
+ }
23
+
24
+ type type_ = :book_appointment
25
+
26
+ module Type
27
+ extend Telnyx::Internal::Type::Enum
28
+
29
+ BOOK_APPOINTMENT: :book_appointment
30
+
31
+ def self?.values: -> ::Array[Telnyx::Models::BookAppointmentTool::type_]
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,39 @@
1
+ module Telnyx
2
+ module Models
3
+ type book_appointment_tool_params =
4
+ {
5
+ api_key_ref: String,
6
+ event_type_id: Integer,
7
+ attendee_name: String,
8
+ attendee_timezone: String
9
+ }
10
+
11
+ class BookAppointmentToolParams < Telnyx::Internal::Type::BaseModel
12
+ attr_accessor api_key_ref: String
13
+
14
+ attr_accessor event_type_id: Integer
15
+
16
+ attr_reader attendee_name: String?
17
+
18
+ def attendee_name=: (String) -> String
19
+
20
+ attr_reader attendee_timezone: String?
21
+
22
+ def attendee_timezone=: (String) -> String
23
+
24
+ def initialize: (
25
+ api_key_ref: String,
26
+ event_type_id: Integer,
27
+ ?attendee_name: String,
28
+ ?attendee_timezone: String
29
+ ) -> void
30
+
31
+ def to_hash: -> {
32
+ api_key_ref: String,
33
+ event_type_id: Integer,
34
+ attendee_name: String,
35
+ attendee_timezone: String
36
+ }
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,132 @@
1
+ module Telnyx
2
+ module Models
3
+ type call_assistant_request =
4
+ {
5
+ id: String,
6
+ dynamic_variables: ::Hash[Symbol, Telnyx::Models::CallAssistantRequest::dynamic_variable],
7
+ external_llm: ::Hash[Symbol, top],
8
+ fallback_config: ::Hash[Symbol, top],
9
+ greeting: String,
10
+ instructions: String,
11
+ llm_api_key_ref: String,
12
+ mcp_servers: ::Array[::Hash[Symbol, top]],
13
+ model: String,
14
+ name: String,
15
+ observability_settings: ::Hash[Symbol, top],
16
+ openai_api_key_ref: String,
17
+ tools: ::Array[Telnyx::Models::CallAssistantRequest::tool]
18
+ }
19
+
20
+ class CallAssistantRequest < Telnyx::Internal::Type::BaseModel
21
+ attr_accessor id: String
22
+
23
+ attr_reader dynamic_variables: ::Hash[Symbol, Telnyx::Models::CallAssistantRequest::dynamic_variable]?
24
+
25
+ def dynamic_variables=: (
26
+ ::Hash[Symbol, Telnyx::Models::CallAssistantRequest::dynamic_variable]
27
+ ) -> ::Hash[Symbol, Telnyx::Models::CallAssistantRequest::dynamic_variable]
28
+
29
+ attr_reader external_llm: ::Hash[Symbol, top]?
30
+
31
+ def external_llm=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
32
+
33
+ attr_reader fallback_config: ::Hash[Symbol, top]?
34
+
35
+ def fallback_config=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
36
+
37
+ attr_reader greeting: String?
38
+
39
+ def greeting=: (String) -> String
40
+
41
+ attr_reader instructions: String?
42
+
43
+ def instructions=: (String) -> String
44
+
45
+ attr_reader llm_api_key_ref: String?
46
+
47
+ def llm_api_key_ref=: (String) -> String
48
+
49
+ attr_reader mcp_servers: ::Array[::Hash[Symbol, top]]?
50
+
51
+ def mcp_servers=: (
52
+ ::Array[::Hash[Symbol, top]]
53
+ ) -> ::Array[::Hash[Symbol, top]]
54
+
55
+ attr_reader model: String?
56
+
57
+ def model=: (String) -> String
58
+
59
+ attr_reader name: String?
60
+
61
+ def name=: (String) -> String
62
+
63
+ attr_reader observability_settings: ::Hash[Symbol, top]?
64
+
65
+ def observability_settings=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
66
+
67
+ attr_reader openai_api_key_ref: String?
68
+
69
+ def openai_api_key_ref=: (String) -> String
70
+
71
+ attr_reader tools: ::Array[Telnyx::Models::CallAssistantRequest::tool]?
72
+
73
+ def tools=: (
74
+ ::Array[Telnyx::Models::CallAssistantRequest::tool]
75
+ ) -> ::Array[Telnyx::Models::CallAssistantRequest::tool]
76
+
77
+ def initialize: (
78
+ id: String,
79
+ ?dynamic_variables: ::Hash[Symbol, Telnyx::Models::CallAssistantRequest::dynamic_variable],
80
+ ?external_llm: ::Hash[Symbol, top],
81
+ ?fallback_config: ::Hash[Symbol, top],
82
+ ?greeting: String,
83
+ ?instructions: String,
84
+ ?llm_api_key_ref: String,
85
+ ?mcp_servers: ::Array[::Hash[Symbol, top]],
86
+ ?model: String,
87
+ ?name: String,
88
+ ?observability_settings: ::Hash[Symbol, top],
89
+ ?openai_api_key_ref: String,
90
+ ?tools: ::Array[Telnyx::Models::CallAssistantRequest::tool]
91
+ ) -> void
92
+
93
+ def to_hash: -> {
94
+ id: String,
95
+ dynamic_variables: ::Hash[Symbol, Telnyx::Models::CallAssistantRequest::dynamic_variable],
96
+ external_llm: ::Hash[Symbol, top],
97
+ fallback_config: ::Hash[Symbol, top],
98
+ greeting: String,
99
+ instructions: String,
100
+ llm_api_key_ref: String,
101
+ mcp_servers: ::Array[::Hash[Symbol, top]],
102
+ model: String,
103
+ name: String,
104
+ observability_settings: ::Hash[Symbol, top],
105
+ openai_api_key_ref: String,
106
+ tools: ::Array[Telnyx::Models::CallAssistantRequest::tool]
107
+ }
108
+
109
+ type dynamic_variable = String | Float | bool
110
+
111
+ module DynamicVariable
112
+ extend Telnyx::Internal::Type::Union
113
+
114
+ def self?.variants: -> ::Array[Telnyx::Models::CallAssistantRequest::dynamic_variable]
115
+ end
116
+
117
+ type tool =
118
+ Telnyx::BookAppointmentTool
119
+ | Telnyx::CheckAvailabilityTool
120
+ | Telnyx::AI::WebhookTool
121
+ | Telnyx::AI::HangupTool
122
+ | Telnyx::AI::TransferTool
123
+ | Telnyx::CallControlRetrievalTool
124
+
125
+ module Tool
126
+ extend Telnyx::Internal::Type::Union
127
+
128
+ def self?.variants: -> ::Array[Telnyx::Models::CallAssistantRequest::tool]
129
+ end
130
+ end
131
+ end
132
+ end
@@ -0,0 +1,21 @@
1
+ module Telnyx
2
+ module Models
3
+ type call_control_bucket_ids =
4
+ { bucket_ids: ::Array[String], max_num_results: Integer }
5
+
6
+ class CallControlBucketIDs < Telnyx::Internal::Type::BaseModel
7
+ attr_accessor bucket_ids: ::Array[String]
8
+
9
+ attr_reader max_num_results: Integer?
10
+
11
+ def max_num_results=: (Integer) -> Integer
12
+
13
+ def initialize: (
14
+ bucket_ids: ::Array[String],
15
+ ?max_num_results: Integer
16
+ ) -> void
17
+
18
+ def to_hash: -> { bucket_ids: ::Array[String], max_num_results: Integer }
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,35 @@
1
+ module Telnyx
2
+ module Models
3
+ type call_control_retrieval_tool =
4
+ {
5
+ retrieval: Telnyx::CallControlBucketIDs,
6
+ type: Telnyx::Models::CallControlRetrievalTool::type_
7
+ }
8
+
9
+ class CallControlRetrievalTool < Telnyx::Internal::Type::BaseModel
10
+ attr_accessor retrieval: Telnyx::CallControlBucketIDs
11
+
12
+ attr_accessor type: Telnyx::Models::CallControlRetrievalTool::type_
13
+
14
+ def initialize: (
15
+ retrieval: Telnyx::CallControlBucketIDs,
16
+ type: Telnyx::Models::CallControlRetrievalTool::type_
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ retrieval: Telnyx::CallControlBucketIDs,
21
+ type: Telnyx::Models::CallControlRetrievalTool::type_
22
+ }
23
+
24
+ type type_ = :retrieval
25
+
26
+ module Type
27
+ extend Telnyx::Internal::Type::Enum
28
+
29
+ RETRIEVAL: :retrieval
30
+
31
+ def self?.values: -> ::Array[Telnyx::Models::CallControlRetrievalTool::type_]
32
+ end
33
+ end
34
+ end
35
+ end
@@ -7,6 +7,7 @@ module Telnyx
7
7
  to: Telnyx::Models::CallDialParams::to,
8
8
  answering_machine_detection: Telnyx::Models::CallDialParams::answering_machine_detection,
9
9
  answering_machine_detection_config: Telnyx::CallDialParams::AnsweringMachineDetectionConfig,
10
+ assistant: Telnyx::CallAssistantRequest,
10
11
  audio_url: String,
11
12
  billing_group_id: String,
12
13
  bridge_intent: bool,
@@ -82,6 +83,12 @@ module Telnyx
82
83
  Telnyx::CallDialParams::AnsweringMachineDetectionConfig
83
84
  ) -> Telnyx::CallDialParams::AnsweringMachineDetectionConfig
84
85
 
86
+ attr_reader assistant: Telnyx::CallAssistantRequest?
87
+
88
+ def assistant=: (
89
+ Telnyx::CallAssistantRequest
90
+ ) -> Telnyx::CallAssistantRequest
91
+
85
92
  attr_reader audio_url: String?
86
93
 
87
94
  def audio_url=: (String) -> String
@@ -334,6 +341,7 @@ module Telnyx
334
341
  to: Telnyx::Models::CallDialParams::to,
335
342
  ?answering_machine_detection: Telnyx::Models::CallDialParams::answering_machine_detection,
336
343
  ?answering_machine_detection_config: Telnyx::CallDialParams::AnsweringMachineDetectionConfig,
344
+ ?assistant: Telnyx::CallAssistantRequest,
337
345
  ?audio_url: String,
338
346
  ?billing_group_id: String,
339
347
  ?bridge_intent: bool,
@@ -393,6 +401,7 @@ module Telnyx
393
401
  to: Telnyx::Models::CallDialParams::to,
394
402
  answering_machine_detection: Telnyx::Models::CallDialParams::answering_machine_detection,
395
403
  answering_machine_detection_config: Telnyx::CallDialParams::AnsweringMachineDetectionConfig,
404
+ assistant: Telnyx::CallAssistantRequest,
396
405
  audio_url: String,
397
406
  billing_group_id: String,
398
407
  bridge_intent: bool,
@@ -4,6 +4,7 @@ module Telnyx
4
4
  type action_answer_params =
5
5
  {
6
6
  call_control_id: String,
7
+ assistant: Telnyx::CallAssistantRequest,
7
8
  billing_group_id: String,
8
9
  client_state: String,
9
10
  command_id: String,
@@ -42,6 +43,12 @@ module Telnyx
42
43
 
43
44
  attr_accessor call_control_id: String
44
45
 
46
+ attr_reader assistant: Telnyx::CallAssistantRequest?
47
+
48
+ def assistant=: (
49
+ Telnyx::CallAssistantRequest
50
+ ) -> Telnyx::CallAssistantRequest
51
+
45
52
  attr_reader billing_group_id: String?
46
53
 
47
54
  def billing_group_id=: (String) -> String
@@ -196,6 +203,7 @@ module Telnyx
196
203
 
197
204
  def initialize: (
198
205
  call_control_id: String,
206
+ ?assistant: Telnyx::CallAssistantRequest,
199
207
  ?billing_group_id: String,
200
208
  ?client_state: String,
201
209
  ?command_id: String,
@@ -230,6 +238,7 @@ module Telnyx
230
238
 
231
239
  def to_hash: -> {
232
240
  call_control_id: String,
241
+ assistant: Telnyx::CallAssistantRequest,
233
242
  billing_group_id: String,
234
243
  client_state: String,
235
244
  command_id: String,
@@ -4,7 +4,7 @@ module Telnyx
4
4
  type action_start_ai_assistant_params =
5
5
  {
6
6
  call_control_id: String,
7
- assistant: Telnyx::Calls::ActionStartAIAssistantParams::Assistant,
7
+ assistant: Telnyx::CallAssistantRequest,
8
8
  client_state: String,
9
9
  command_id: String,
10
10
  greeting: String,
@@ -24,11 +24,11 @@ module Telnyx
24
24
 
25
25
  attr_accessor call_control_id: String
26
26
 
27
- attr_reader assistant: Telnyx::Calls::ActionStartAIAssistantParams::Assistant?
27
+ attr_reader assistant: Telnyx::CallAssistantRequest?
28
28
 
29
29
  def assistant=: (
30
- Telnyx::Calls::ActionStartAIAssistantParams::Assistant
31
- ) -> Telnyx::Calls::ActionStartAIAssistantParams::Assistant
30
+ Telnyx::CallAssistantRequest
31
+ ) -> Telnyx::CallAssistantRequest
32
32
 
33
33
  attr_reader client_state: String?
34
34
 
@@ -82,7 +82,7 @@ module Telnyx
82
82
 
83
83
  def initialize: (
84
84
  call_control_id: String,
85
- ?assistant: Telnyx::Calls::ActionStartAIAssistantParams::Assistant,
85
+ ?assistant: Telnyx::CallAssistantRequest,
86
86
  ?client_state: String,
87
87
  ?command_id: String,
88
88
  ?greeting: String,
@@ -98,7 +98,7 @@ module Telnyx
98
98
 
99
99
  def to_hash: -> {
100
100
  call_control_id: String,
101
- assistant: Telnyx::Calls::ActionStartAIAssistantParams::Assistant,
101
+ assistant: Telnyx::CallAssistantRequest,
102
102
  client_state: String,
103
103
  command_id: String,
104
104
  greeting: String,
@@ -112,35 +112,6 @@ module Telnyx
112
112
  request_options: Telnyx::RequestOptions
113
113
  }
114
114
 
115
- type assistant =
116
- { id: String, instructions: String, openai_api_key_ref: String }
117
-
118
- class Assistant < Telnyx::Internal::Type::BaseModel
119
- attr_reader id: String?
120
-
121
- def id=: (String) -> String
122
-
123
- attr_reader instructions: String?
124
-
125
- def instructions=: (String) -> String
126
-
127
- attr_reader openai_api_key_ref: String?
128
-
129
- def openai_api_key_ref=: (String) -> String
130
-
131
- def initialize: (
132
- ?id: String,
133
- ?instructions: String,
134
- ?openai_api_key_ref: String
135
- ) -> void
136
-
137
- def to_hash: -> {
138
- id: String,
139
- instructions: String,
140
- openai_api_key_ref: String
141
- }
142
- end
143
-
144
115
  type message_history =
145
116
  Telnyx::Calls::ActionStartAIAssistantParams::MessageHistory::User
146
117
  | Telnyx::Calls::ActionStartAIAssistantParams::MessageHistory::Assistant
@@ -0,0 +1,35 @@
1
+ module Telnyx
2
+ module Models
3
+ type check_availability_tool =
4
+ {
5
+ check_availability: Telnyx::CheckAvailabilityToolParams,
6
+ type: Telnyx::Models::CheckAvailabilityTool::type_
7
+ }
8
+
9
+ class CheckAvailabilityTool < Telnyx::Internal::Type::BaseModel
10
+ attr_accessor check_availability: Telnyx::CheckAvailabilityToolParams
11
+
12
+ attr_accessor type: Telnyx::Models::CheckAvailabilityTool::type_
13
+
14
+ def initialize: (
15
+ check_availability: Telnyx::CheckAvailabilityToolParams,
16
+ type: Telnyx::Models::CheckAvailabilityTool::type_
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ check_availability: Telnyx::CheckAvailabilityToolParams,
21
+ type: Telnyx::Models::CheckAvailabilityTool::type_
22
+ }
23
+
24
+ type type_ = :check_availability
25
+
26
+ module Type
27
+ extend Telnyx::Internal::Type::Enum
28
+
29
+ CHECK_AVAILABILITY: :check_availability
30
+
31
+ def self?.values: -> ::Array[Telnyx::Models::CheckAvailabilityTool::type_]
32
+ end
33
+ end
34
+ end
35
+ end