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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ac9a07c8a853ece2ee38dc9271bc8aede4cdc909f634b11f547d24a01906726
4
- data.tar.gz: 6ad873c682fd93b981dbca7a48f83bef3c1b43e29a6722c2e72bf46f6b20b79a
3
+ metadata.gz: 55892760f556bee9521d8c638235b5dce702cea3c1766f230318952e9db8f8ab
4
+ data.tar.gz: bfa439dd1d25de410cd87030b3a86f119b068e922ed4f74821c6028fc9beb3bf
5
5
  SHA512:
6
- metadata.gz: 7cd372e02874a4654b037003c200e382104128701fb6e521882853e81a7671d6faa00e51e8dc28f9d58f69a38a2edcbcb1c473642e1ddcf979d6cf9718aaf3c9
7
- data.tar.gz: 71b0c0af94329048ed0920882d23d0cd41c8e5d231e7004de41196dc05f08c1231ce8ec3a4e6f8f4f4cae7a223a5c93a756acd68bcc4ea406844ac62b7c41f82
6
+ metadata.gz: ed548d98590649ba4b7e628a4f2955f1a40c6ba9e78b6268d396a7ed400e6e6870c39951bdb70fdd21f0ab10187767a752b59fba7e493539c37fd26d996a438b
7
+ data.tar.gz: d8ae515be892c263d2a85a0ee1b60531aca724fe39973e5b148c32bfa6cb5c58ce37a7bf3ae5d92d41f146c4cdc5bd887970cf9df3dd246ce8d17a9b89c20da9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.71.0 (2026-04-11)
4
+
5
+ Full Changelog: [v5.70.0...v5.71.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.70.0...v5.71.0)
6
+
7
+ ### Features
8
+
9
+ * add shared CallAssistantRequest schema for call-control assistant object ([67a2157](https://github.com/team-telnyx/telnyx-ruby/commit/67a2157455d5a6e5138f89e54479977f108605a7))
10
+ * **api:** manual updates ([0000b53](https://github.com/team-telnyx/telnyx-ruby/commit/0000b5378d0f1dfeb46f1b5670933819fa935d5a))
11
+ * **api:** Merge pull request [#46](https://github.com/team-telnyx/telnyx-ruby/issues/46) from stainless-sdks/FixModelRecommendation ([4b3ea59](https://github.com/team-telnyx/telnyx-ruby/commit/4b3ea599a86f9279f139cbb7868da79079685846))
12
+ * MSG-6846: add GET /profile/photo docs for whatsapp API ([d06a131](https://github.com/team-telnyx/telnyx-ruby/commit/d06a131d943549a7a744a3968e116480d986fc8e))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * correct Provider constant reference in VoiceCloneCreateFromDesignParams RBI/RBS ([6c66dd2](https://github.com/team-telnyx/telnyx-ruby/commit/6c66dd2ebf03c26eeeadadb0a93f5828134d0492))
18
+
19
+
20
+ ### Reverts
21
+
22
+ * restore stainless.yml to pre-6a6df5b state ([d7e3266](https://github.com/team-telnyx/telnyx-ruby/commit/d7e3266c5593d4163184b2cdcff260aa281843d7))
23
+
24
+
25
+ ### Documentation
26
+
27
+ * improve examples ([ecc0d15](https://github.com/team-telnyx/telnyx-ruby/commit/ecc0d1599570e1bbeb73c2db47b05a3a9c0e7a00))
28
+
3
29
  ## 5.70.0 (2026-04-08)
4
30
 
5
31
  Full Changelog: [v5.69.0...v5.70.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.69.0...v5.70.0)
data/README.md CHANGED
@@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application
24
24
  <!-- x-release-please-start-version -->
25
25
 
26
26
  ```ruby
27
- gem "telnyx", "~> 5.70.0"
27
+ gem "telnyx", "~> 5.71.0"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
@@ -29,7 +29,7 @@ module Telnyx
29
29
  # @!attribute tools
30
30
  # The tools that the voice assistant can use.
31
31
  #
32
- # @return [Array<Telnyx::Models::AI::Assistant::Tool::BookAppointment, Telnyx::Models::AI::Assistant::Tool::CheckAvailability, Telnyx::Models::AI::WebhookTool, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::TransferTool, Telnyx::Models::AI::Assistant::Tool::Retrieval>, nil]
32
+ # @return [Array<Telnyx::Models::BookAppointmentTool, Telnyx::Models::CheckAvailabilityTool, Telnyx::Models::AI::WebhookTool, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::TransferTool, Telnyx::Models::CallControlRetrievalTool>, nil]
33
33
  optional :tools, -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::AI::Assistant::Tool] }
34
34
 
35
35
  # @!method initialize(instructions: nil, model: nil, openai_api_key_ref: nil, tools: nil)
@@ -44,16 +44,16 @@ module Telnyx
44
44
  #
45
45
  # @param openai_api_key_ref [String] This is necessary only if the model selected is from OpenAI. You would pass the
46
46
  #
47
- # @param tools [Array<Telnyx::Models::AI::Assistant::Tool::BookAppointment, Telnyx::Models::AI::Assistant::Tool::CheckAvailability, Telnyx::Models::AI::WebhookTool, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::TransferTool, Telnyx::Models::AI::Assistant::Tool::Retrieval>] The tools that the voice assistant can use.
47
+ # @param tools [Array<Telnyx::Models::BookAppointmentTool, Telnyx::Models::CheckAvailabilityTool, Telnyx::Models::AI::WebhookTool, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::TransferTool, Telnyx::Models::CallControlRetrievalTool>] The tools that the voice assistant can use.
48
48
 
49
49
  module Tool
50
50
  extend Telnyx::Internal::Type::Union
51
51
 
52
52
  discriminator :type
53
53
 
54
- variant :book_appointment, -> { Telnyx::AI::Assistant::Tool::BookAppointment }
54
+ variant :book_appointment, -> { Telnyx::BookAppointmentTool }
55
55
 
56
- variant :check_availability, -> { Telnyx::AI::Assistant::Tool::CheckAvailability }
56
+ variant :check_availability, -> { Telnyx::CheckAvailabilityTool }
57
57
 
58
58
  variant :webhook, -> { Telnyx::AI::WebhookTool }
59
59
 
@@ -61,153 +61,10 @@ module Telnyx
61
61
 
62
62
  variant :transfer, -> { Telnyx::AI::TransferTool }
63
63
 
64
- variant :retrieval, -> { Telnyx::AI::Assistant::Tool::Retrieval }
65
-
66
- class BookAppointment < Telnyx::Internal::Type::BaseModel
67
- # @!attribute book_appointment
68
- #
69
- # @return [Telnyx::Models::AI::Assistant::Tool::BookAppointment::BookAppointment]
70
- required :book_appointment, -> { Telnyx::AI::Assistant::Tool::BookAppointment::BookAppointment }
71
-
72
- # @!attribute type
73
- #
74
- # @return [Symbol, :book_appointment]
75
- required :type, const: :book_appointment
76
-
77
- # @!method initialize(book_appointment:, type: :book_appointment)
78
- # @param book_appointment [Telnyx::Models::AI::Assistant::Tool::BookAppointment::BookAppointment]
79
- # @param type [Symbol, :book_appointment]
80
-
81
- # @see Telnyx::Models::AI::Assistant::Tool::BookAppointment#book_appointment
82
- class BookAppointment < Telnyx::Internal::Type::BaseModel
83
- # @!attribute api_key_ref
84
- # Reference to an integration secret that contains your Cal.com API key. You would
85
- # pass the `identifier` for an integration secret
86
- # [/v2/integration_secrets](https://developers.telnyx.com/api/secrets-manager/integration-secrets/create-integration-secret)
87
- # that refers to your Cal.com API key.
88
- #
89
- # @return [String]
90
- required :api_key_ref, String
91
-
92
- # @!attribute event_type_id
93
- # Event Type ID for which slots are being fetched.
94
- # [cal.com](https://cal.com/docs/api-reference/v2/bookings/create-a-booking#body-event-type-id)
95
- #
96
- # @return [Integer]
97
- required :event_type_id, Integer
98
-
99
- # @!attribute attendee_name
100
- # The name of the attendee
101
- # [cal.com](https://cal.com/docs/api-reference/v2/bookings/create-a-booking#body-attendee-name).
102
- # If not provided, the assistant will ask for the attendee's name.
103
- #
104
- # @return [String, nil]
105
- optional :attendee_name, String
106
-
107
- # @!attribute attendee_timezone
108
- # The timezone of the attendee
109
- # [cal.com](https://cal.com/docs/api-reference/v2/bookings/create-a-booking#body-attendee-timezone).
110
- # If not provided, the assistant will ask for the attendee's timezone.
111
- #
112
- # @return [String, nil]
113
- optional :attendee_timezone, String
114
-
115
- # @!method initialize(api_key_ref:, event_type_id:, attendee_name: nil, attendee_timezone: nil)
116
- # Some parameter documentations has been truncated, see
117
- # {Telnyx::Models::AI::Assistant::Tool::BookAppointment::BookAppointment} for more
118
- # details.
119
- #
120
- # @param api_key_ref [String] Reference to an integration secret that contains your Cal.com API key. You would
121
- #
122
- # @param event_type_id [Integer] Event Type ID for which slots are being fetched. [cal.com](https://cal.com/docs/
123
- #
124
- # @param attendee_name [String] The name of the attendee [cal.com](https://cal.com/docs/api-reference/v2/booking
125
- #
126
- # @param attendee_timezone [String] The timezone of the attendee [cal.com](https://cal.com/docs/api-reference/v2/boo
127
- end
128
- end
129
-
130
- class CheckAvailability < Telnyx::Internal::Type::BaseModel
131
- # @!attribute check_availability
132
- #
133
- # @return [Telnyx::Models::AI::Assistant::Tool::CheckAvailability::CheckAvailability]
134
- required :check_availability, -> { Telnyx::AI::Assistant::Tool::CheckAvailability::CheckAvailability }
135
-
136
- # @!attribute type
137
- #
138
- # @return [Symbol, :check_availability]
139
- required :type, const: :check_availability
140
-
141
- # @!method initialize(check_availability:, type: :check_availability)
142
- # @param check_availability [Telnyx::Models::AI::Assistant::Tool::CheckAvailability::CheckAvailability]
143
- # @param type [Symbol, :check_availability]
144
-
145
- # @see Telnyx::Models::AI::Assistant::Tool::CheckAvailability#check_availability
146
- class CheckAvailability < Telnyx::Internal::Type::BaseModel
147
- # @!attribute api_key_ref
148
- # Reference to an integration secret that contains your Cal.com API key. You would
149
- # pass the `identifier` for an integration secret
150
- # [/v2/integration_secrets](https://developers.telnyx.com/api/secrets-manager/integration-secrets/create-integration-secret)
151
- # that refers to your Cal.com API key.
152
- #
153
- # @return [String]
154
- required :api_key_ref, String
155
-
156
- # @!attribute event_type_id
157
- # Event Type ID for which slots are being fetched.
158
- # [cal.com](https://cal.com/docs/api-reference/v2/slots/get-available-slots#parameter-event-type-id)
159
- #
160
- # @return [Integer]
161
- required :event_type_id, Integer
162
-
163
- # @!method initialize(api_key_ref:, event_type_id:)
164
- # Some parameter documentations has been truncated, see
165
- # {Telnyx::Models::AI::Assistant::Tool::CheckAvailability::CheckAvailability} for
166
- # more details.
167
- #
168
- # @param api_key_ref [String] Reference to an integration secret that contains your Cal.com API key. You would
169
- #
170
- # @param event_type_id [Integer] Event Type ID for which slots are being fetched. [cal.com](https://cal.com/docs/
171
- end
172
- end
173
-
174
- class Retrieval < Telnyx::Internal::Type::BaseModel
175
- # @!attribute retrieval
176
- #
177
- # @return [Telnyx::Models::AI::Assistant::Tool::Retrieval::Retrieval]
178
- required :retrieval, -> { Telnyx::AI::Assistant::Tool::Retrieval::Retrieval }
179
-
180
- # @!attribute type
181
- #
182
- # @return [Symbol, :retrieval]
183
- required :type, const: :retrieval
184
-
185
- # @!method initialize(retrieval:, type: :retrieval)
186
- # @param retrieval [Telnyx::Models::AI::Assistant::Tool::Retrieval::Retrieval]
187
- # @param type [Symbol, :retrieval]
188
-
189
- # @see Telnyx::Models::AI::Assistant::Tool::Retrieval#retrieval
190
- class Retrieval < Telnyx::Internal::Type::BaseModel
191
- # @!attribute bucket_ids
192
- #
193
- # @return [Array<String>]
194
- required :bucket_ids, Telnyx::Internal::Type::ArrayOf[String]
195
-
196
- # @!attribute max_num_results
197
- # The maximum number of results to retrieve as context for the language model.
198
- #
199
- # @return [Integer, nil]
200
- optional :max_num_results, Integer
201
-
202
- # @!method initialize(bucket_ids:, max_num_results: nil)
203
- # @param bucket_ids [Array<String>]
204
- #
205
- # @param max_num_results [Integer] The maximum number of results to retrieve as context for the language model.
206
- end
207
- end
64
+ variant :retrieval, -> { Telnyx::CallControlRetrievalTool }
208
65
 
209
66
  # @!method self.variants
210
- # @return [Array(Telnyx::Models::AI::Assistant::Tool::BookAppointment, Telnyx::Models::AI::Assistant::Tool::CheckAvailability, Telnyx::Models::AI::WebhookTool, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::TransferTool, Telnyx::Models::AI::Assistant::Tool::Retrieval)]
67
+ # @return [Array(Telnyx::Models::BookAppointmentTool, Telnyx::Models::CheckAvailabilityTool, Telnyx::Models::AI::WebhookTool, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::TransferTool, Telnyx::Models::CallControlRetrievalTool)]
211
68
  end
212
69
  end
213
70
  end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ class BookAppointmentTool < Telnyx::Internal::Type::BaseModel
6
+ # @!attribute book_appointment
7
+ #
8
+ # @return [Telnyx::Models::BookAppointmentToolParams]
9
+ required :book_appointment, -> { Telnyx::BookAppointmentToolParams }
10
+
11
+ # @!attribute type
12
+ #
13
+ # @return [Symbol, Telnyx::Models::BookAppointmentTool::Type]
14
+ required :type, enum: -> { Telnyx::BookAppointmentTool::Type }
15
+
16
+ # @!method initialize(book_appointment:, type:)
17
+ # @param book_appointment [Telnyx::Models::BookAppointmentToolParams]
18
+ # @param type [Symbol, Telnyx::Models::BookAppointmentTool::Type]
19
+
20
+ # @see Telnyx::Models::BookAppointmentTool#type
21
+ module Type
22
+ extend Telnyx::Internal::Type::Enum
23
+
24
+ BOOK_APPOINTMENT = :book_appointment
25
+
26
+ # @!method self.values
27
+ # @return [Array<Symbol>]
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ class BookAppointmentToolParams < 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/bookings/create-a-booking#body-event-type-id)
18
+ #
19
+ # @return [Integer]
20
+ required :event_type_id, Integer
21
+
22
+ # @!attribute attendee_name
23
+ # The name of the attendee
24
+ # [cal.com](https://cal.com/docs/api-reference/v2/bookings/create-a-booking#body-attendee-name).
25
+ # If not provided, the assistant will ask for the attendee's name.
26
+ #
27
+ # @return [String, nil]
28
+ optional :attendee_name, String
29
+
30
+ # @!attribute attendee_timezone
31
+ # The timezone of the attendee
32
+ # [cal.com](https://cal.com/docs/api-reference/v2/bookings/create-a-booking#body-attendee-timezone).
33
+ # If not provided, the assistant will ask for the attendee's timezone.
34
+ #
35
+ # @return [String, nil]
36
+ optional :attendee_timezone, String
37
+
38
+ # @!method initialize(api_key_ref:, event_type_id:, attendee_name: nil, attendee_timezone: nil)
39
+ # Some parameter documentations has been truncated, see
40
+ # {Telnyx::Models::BookAppointmentToolParams} for more details.
41
+ #
42
+ # @param api_key_ref [String] Reference to an integration secret that contains your Cal.com API key. You would
43
+ #
44
+ # @param event_type_id [Integer] Event Type ID for which slots are being fetched. [cal.com](https://cal.com/docs/
45
+ #
46
+ # @param attendee_name [String] The name of the attendee [cal.com](https://cal.com/docs/api-reference/v2/booking
47
+ #
48
+ # @param attendee_timezone [String] The timezone of the attendee [cal.com](https://cal.com/docs/api-reference/v2/boo
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,176 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ class CallAssistantRequest < Telnyx::Internal::Type::BaseModel
6
+ # @!attribute id
7
+ # The identifier of the AI assistant to use.
8
+ #
9
+ # @return [String]
10
+ required :id, String
11
+
12
+ # @!attribute dynamic_variables
13
+ # Map of dynamic variables and their default values. Dynamic variables can be
14
+ # referenced in instructions, greeting, and tool definitions using the
15
+ # `{{variable_name}}` syntax. Call-control-agent automatically merges in
16
+ # `telnyx_call_*` variables (telnyx_call_to, telnyx_call_from,
17
+ # telnyx_conversation_channel, telnyx_agent_target, telnyx_end_user_target,
18
+ # telnyx_call_caller_id_name) and custom header variables.
19
+ #
20
+ # @return [Hash{Symbol=>String, Float, Boolean}, nil]
21
+ optional :dynamic_variables,
22
+ -> { Telnyx::Internal::Type::HashOf[union: Telnyx::CallAssistantRequest::DynamicVariable] }
23
+
24
+ # @!attribute external_llm
25
+ # External LLM configuration for bringing your own LLM endpoint.
26
+ #
27
+ # @return [Hash{Symbol=>Object}, nil]
28
+ optional :external_llm, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
29
+
30
+ # @!attribute fallback_config
31
+ # Fallback LLM configuration used when the primary LLM provider is unavailable.
32
+ #
33
+ # @return [Hash{Symbol=>Object}, nil]
34
+ optional :fallback_config, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
35
+
36
+ # @!attribute greeting
37
+ # Initial greeting text spoken when the assistant starts. Can be plain text for
38
+ # any voice or SSML for `AWS.Polly.<voice_id>` voices. There is a 3,000 character
39
+ # limit.
40
+ #
41
+ # @return [String, nil]
42
+ optional :greeting, String
43
+
44
+ # @!attribute instructions
45
+ # System instructions for the voice assistant. Can be templated with
46
+ # [dynamic variables](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables).
47
+ # This will overwrite the instructions set in the assistant configuration.
48
+ #
49
+ # @return [String, nil]
50
+ optional :instructions, String
51
+
52
+ # @!attribute llm_api_key_ref
53
+ # Integration secret identifier for the LLM provider API key. Use this field to
54
+ # reference an
55
+ # [integration secret](https://developers.telnyx.com/api/secrets-manager/integration-secrets/create-integration-secret)
56
+ # containing your LLM provider API key. Supports any LLM provider (OpenAI,
57
+ # Anthropic, etc.).
58
+ #
59
+ # @return [String, nil]
60
+ optional :llm_api_key_ref, String
61
+
62
+ # @!attribute mcp_servers
63
+ # MCP (Model Context Protocol) server configurations for extending the assistant's
64
+ # capabilities with external tools and data sources.
65
+ #
66
+ # @return [Array<Hash{Symbol=>Object}>, nil]
67
+ optional :mcp_servers,
68
+ Telnyx::Internal::Type::ArrayOf[Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]]
69
+
70
+ # @!attribute model
71
+ # LLM model override for this call. If omitted, the assistant's configured model
72
+ # is used.
73
+ #
74
+ # @return [String, nil]
75
+ optional :model, String
76
+
77
+ # @!attribute name
78
+ # Assistant name override for this call.
79
+ #
80
+ # @return [String, nil]
81
+ optional :name, String
82
+
83
+ # @!attribute observability_settings
84
+ # Observability configuration for the assistant session, including Langfuse
85
+ # integration for tracing and monitoring.
86
+ #
87
+ # @return [Hash{Symbol=>Object}, nil]
88
+ optional :observability_settings, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
89
+
90
+ # @!attribute openai_api_key_ref
91
+ # @deprecated This field is deprecated and will be removed soon
92
+ #
93
+ # Deprecated — use `llm_api_key_ref` instead. Integration secret identifier for
94
+ # the OpenAI API key. This field is maintained for backward compatibility;
95
+ # `llm_api_key_ref` is the canonical field name and supports all LLM providers.
96
+ #
97
+ # @return [String, nil]
98
+ optional :openai_api_key_ref, String
99
+
100
+ # @!attribute tools
101
+ # Inline tool definitions available to the assistant (webhook, retrieval,
102
+ # transfer, hangup, etc.). Overrides the assistant's stored tools if provided.
103
+ #
104
+ # @return [Array<Telnyx::Models::BookAppointmentTool, Telnyx::Models::CheckAvailabilityTool, Telnyx::Models::AI::WebhookTool, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::TransferTool, Telnyx::Models::CallControlRetrievalTool>, nil]
105
+ optional :tools, -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::CallAssistantRequest::Tool] }
106
+
107
+ # @!method initialize(id:, dynamic_variables: nil, external_llm: nil, fallback_config: nil, greeting: nil, instructions: nil, llm_api_key_ref: nil, mcp_servers: nil, model: nil, name: nil, observability_settings: nil, openai_api_key_ref: nil, tools: nil)
108
+ # Some parameter documentations has been truncated, see
109
+ # {Telnyx::Models::CallAssistantRequest} for more details.
110
+ #
111
+ # AI Assistant configuration. All fields except `id` are optional — the
112
+ # assistant's stored configuration will be used as fallback for any omitted
113
+ # fields.
114
+ #
115
+ # @param id [String] The identifier of the AI assistant to use.
116
+ #
117
+ # @param dynamic_variables [Hash{Symbol=>String, Float, Boolean}] Map of dynamic variables and their default values. Dynamic variables can be refe
118
+ #
119
+ # @param external_llm [Hash{Symbol=>Object}] External LLM configuration for bringing your own LLM endpoint.
120
+ #
121
+ # @param fallback_config [Hash{Symbol=>Object}] Fallback LLM configuration used when the primary LLM provider is unavailable.
122
+ #
123
+ # @param greeting [String] Initial greeting text spoken when the assistant starts. Can be plain text for an
124
+ #
125
+ # @param instructions [String] System instructions for the voice assistant. Can be templated with [dynamic vari
126
+ #
127
+ # @param llm_api_key_ref [String] Integration secret identifier for the LLM provider API key. Use this field to re
128
+ #
129
+ # @param mcp_servers [Array<Hash{Symbol=>Object}>] MCP (Model Context Protocol) server configurations for extending the assistant's
130
+ #
131
+ # @param model [String] LLM model override for this call. If omitted, the assistant's configured model i
132
+ #
133
+ # @param name [String] Assistant name override for this call.
134
+ #
135
+ # @param observability_settings [Hash{Symbol=>Object}] Observability configuration for the assistant session, including Langfuse integr
136
+ #
137
+ # @param openai_api_key_ref [String] Deprecated — use `llm_api_key_ref` instead. Integration secret identifier for th
138
+ #
139
+ # @param tools [Array<Telnyx::Models::BookAppointmentTool, Telnyx::Models::CheckAvailabilityTool, Telnyx::Models::AI::WebhookTool, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::TransferTool, Telnyx::Models::CallControlRetrievalTool>] Inline tool definitions available to the assistant (webhook, retrieval, transfer
140
+
141
+ module DynamicVariable
142
+ extend Telnyx::Internal::Type::Union
143
+
144
+ variant String
145
+
146
+ variant Float
147
+
148
+ variant Telnyx::Internal::Type::Boolean
149
+
150
+ # @!method self.variants
151
+ # @return [Array(String, Float, Boolean)]
152
+ end
153
+
154
+ module Tool
155
+ extend Telnyx::Internal::Type::Union
156
+
157
+ discriminator :type
158
+
159
+ variant :book_appointment, -> { Telnyx::BookAppointmentTool }
160
+
161
+ variant :check_availability, -> { Telnyx::CheckAvailabilityTool }
162
+
163
+ variant :webhook, -> { Telnyx::AI::WebhookTool }
164
+
165
+ variant :hangup, -> { Telnyx::AI::HangupTool }
166
+
167
+ variant :transfer, -> { Telnyx::AI::TransferTool }
168
+
169
+ variant :retrieval, -> { Telnyx::CallControlRetrievalTool }
170
+
171
+ # @!method self.variants
172
+ # @return [Array(Telnyx::Models::BookAppointmentTool, Telnyx::Models::CheckAvailabilityTool, Telnyx::Models::AI::WebhookTool, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::TransferTool, Telnyx::Models::CallControlRetrievalTool)]
173
+ end
174
+ end
175
+ end
176
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ class CallControlBucketIDs < Telnyx::Internal::Type::BaseModel
6
+ # @!attribute bucket_ids
7
+ #
8
+ # @return [Array<String>]
9
+ required :bucket_ids, Telnyx::Internal::Type::ArrayOf[String]
10
+
11
+ # @!attribute max_num_results
12
+ # The maximum number of results to retrieve as context for the language model.
13
+ #
14
+ # @return [Integer, nil]
15
+ optional :max_num_results, Integer
16
+
17
+ # @!method initialize(bucket_ids:, max_num_results: nil)
18
+ # @param bucket_ids [Array<String>]
19
+ #
20
+ # @param max_num_results [Integer] The maximum number of results to retrieve as context for the language model.
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ class CallControlRetrievalTool < Telnyx::Internal::Type::BaseModel
6
+ # @!attribute retrieval
7
+ #
8
+ # @return [Telnyx::Models::CallControlBucketIDs]
9
+ required :retrieval, -> { Telnyx::CallControlBucketIDs }
10
+
11
+ # @!attribute type
12
+ #
13
+ # @return [Symbol, Telnyx::Models::CallControlRetrievalTool::Type]
14
+ required :type, enum: -> { Telnyx::CallControlRetrievalTool::Type }
15
+
16
+ # @!method initialize(retrieval:, type:)
17
+ # @param retrieval [Telnyx::Models::CallControlBucketIDs]
18
+ # @param type [Symbol, Telnyx::Models::CallControlRetrievalTool::Type]
19
+
20
+ # @see Telnyx::Models::CallControlRetrievalTool#type
21
+ module Type
22
+ extend Telnyx::Internal::Type::Enum
23
+
24
+ RETRIEVAL = :retrieval
25
+
26
+ # @!method self.values
27
+ # @return [Array<Symbol>]
28
+ end
29
+ end
30
+ end
31
+ end
@@ -58,6 +58,14 @@ module Telnyx
58
58
  optional :answering_machine_detection_config,
59
59
  -> { Telnyx::CallDialParams::AnsweringMachineDetectionConfig }
60
60
 
61
+ # @!attribute assistant
62
+ # AI Assistant configuration. All fields except `id` are optional — the
63
+ # assistant's stored configuration will be used as fallback for any omitted
64
+ # fields.
65
+ #
66
+ # @return [Telnyx::Models::CallAssistantRequest, nil]
67
+ optional :assistant, -> { Telnyx::CallAssistantRequest }
68
+
61
69
  # @!attribute audio_url
62
70
  # The URL of a file to be played back to the callee when the call is answered. The
63
71
  # URL can point to either a WAV or MP3 file. media_name and audio_url cannot be
@@ -407,7 +415,7 @@ module Telnyx
407
415
  # @return [Symbol, Telnyx::Models::CallDialParams::WebhookURLMethod, nil]
408
416
  optional :webhook_url_method, enum: -> { Telnyx::CallDialParams::WebhookURLMethod }
409
417
 
410
- # @!method initialize(connection_id:, from:, to:, answering_machine_detection: nil, answering_machine_detection_config: nil, audio_url: nil, billing_group_id: nil, bridge_intent: nil, bridge_on_answer: nil, client_state: nil, command_id: nil, conference_config: nil, custom_headers: nil, dialogflow_config: nil, enable_dialogflow: nil, from_display_name: nil, link_to: nil, media_encryption: nil, media_name: nil, park_after_unbridge: nil, preferred_codecs: nil, prevent_double_bridge: nil, privacy: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, send_silence_when_idle: nil, sip_auth_password: nil, sip_auth_username: nil, sip_headers: nil, sip_region: nil, sip_transport_protocol: nil, sound_modifications: nil, stream_auth_token: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_sampling_rate: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_establish_before_call_originate: nil, stream_track: nil, stream_url: nil, supervise_call_control_id: nil, supervisor_role: nil, time_limit_secs: nil, timeout_secs: nil, transcription: nil, transcription_config: nil, webhook_url: nil, webhook_url_method: nil, request_options: {})
418
+ # @!method initialize(connection_id:, from:, to:, answering_machine_detection: nil, answering_machine_detection_config: nil, assistant: nil, audio_url: nil, billing_group_id: nil, bridge_intent: nil, bridge_on_answer: nil, client_state: nil, command_id: nil, conference_config: nil, custom_headers: nil, dialogflow_config: nil, enable_dialogflow: nil, from_display_name: nil, link_to: nil, media_encryption: nil, media_name: nil, park_after_unbridge: nil, preferred_codecs: nil, prevent_double_bridge: nil, privacy: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, send_silence_when_idle: nil, sip_auth_password: nil, sip_auth_username: nil, sip_headers: nil, sip_region: nil, sip_transport_protocol: nil, sound_modifications: nil, stream_auth_token: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_sampling_rate: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_establish_before_call_originate: nil, stream_track: nil, stream_url: nil, supervise_call_control_id: nil, supervisor_role: nil, time_limit_secs: nil, timeout_secs: nil, transcription: nil, transcription_config: nil, webhook_url: nil, webhook_url_method: nil, request_options: {})
411
419
  # Some parameter documentations has been truncated, see
412
420
  # {Telnyx::Models::CallDialParams} for more details.
413
421
  #
@@ -421,6 +429,8 @@ module Telnyx
421
429
  #
422
430
  # @param answering_machine_detection_config [Telnyx::Models::CallDialParams::AnsweringMachineDetectionConfig] Optional configuration parameters to modify 'answering_machine_detection' perfor
423
431
  #
432
+ # @param assistant [Telnyx::Models::CallAssistantRequest] AI Assistant configuration. All fields except `id` are optional — the assistant'
433
+ #
424
434
  # @param audio_url [String] The URL of a file to be played back to the callee when the call is answered. The
425
435
  #
426
436
  # @param billing_group_id [String] Use this field to set the Billing Group ID for the call. Must be a valid and exi
@@ -13,6 +13,14 @@ module Telnyx
13
13
  # @return [String]
14
14
  required :call_control_id, String
15
15
 
16
+ # @!attribute assistant
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.
20
+ #
21
+ # @return [Telnyx::Models::CallAssistantRequest, nil]
22
+ optional :assistant, -> { Telnyx::CallAssistantRequest }
23
+
16
24
  # @!attribute billing_group_id
17
25
  # Use this field to set the Billing Group ID for the call. Must be a valid and
18
26
  # existing Billing Group ID.
@@ -210,12 +218,14 @@ module Telnyx
210
218
  # @return [Symbol, Telnyx::Models::Calls::ActionAnswerParams::WebhookURLsMethod, nil]
211
219
  optional :webhook_urls_method, enum: -> { Telnyx::Calls::ActionAnswerParams::WebhookURLsMethod }
212
220
 
213
- # @!method initialize(call_control_id:, billing_group_id: nil, client_state: nil, command_id: nil, custom_headers: nil, preferred_codecs: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, send_silence_when_idle: nil, sip_headers: nil, sound_modifications: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_track: nil, stream_url: nil, transcription: nil, transcription_config: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {})
221
+ # @!method initialize(call_control_id:, assistant: nil, billing_group_id: nil, client_state: nil, command_id: nil, custom_headers: nil, preferred_codecs: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, send_silence_when_idle: nil, sip_headers: nil, sound_modifications: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_track: nil, stream_url: nil, transcription: nil, transcription_config: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {})
214
222
  # Some parameter documentations has been truncated, see
215
223
  # {Telnyx::Models::Calls::ActionAnswerParams} for more details.
216
224
  #
217
225
  # @param call_control_id [String]
218
226
  #
227
+ # @param assistant [Telnyx::Models::CallAssistantRequest] AI Assistant configuration. All fields except `id` are optional — the assistant'
228
+ #
219
229
  # @param billing_group_id [String] Use this field to set the Billing Group ID for the call. Must be a valid and exi
220
230
  #
221
231
  # @param client_state [String] Use this field to add state to every subsequent webhook. It must be a valid Base