revox 0.0.2

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 (161) hide show
  1. checksums.yaml +7 -0
  2. data/.ignore +2 -0
  3. data/CHANGELOG.md +10 -0
  4. data/README.md +234 -0
  5. data/SECURITY.md +23 -0
  6. data/lib/revox/client.rb +86 -0
  7. data/lib/revox/errors.rb +228 -0
  8. data/lib/revox/file_part.rb +58 -0
  9. data/lib/revox/internal/transport/base_client.rb +570 -0
  10. data/lib/revox/internal/transport/pooled_net_requester.rb +210 -0
  11. data/lib/revox/internal/type/array_of.rb +168 -0
  12. data/lib/revox/internal/type/base_model.rb +529 -0
  13. data/lib/revox/internal/type/base_page.rb +55 -0
  14. data/lib/revox/internal/type/boolean.rb +77 -0
  15. data/lib/revox/internal/type/converter.rb +327 -0
  16. data/lib/revox/internal/type/enum.rb +131 -0
  17. data/lib/revox/internal/type/file_input.rb +110 -0
  18. data/lib/revox/internal/type/hash_of.rb +188 -0
  19. data/lib/revox/internal/type/request_parameters.rb +42 -0
  20. data/lib/revox/internal/type/union.rb +237 -0
  21. data/lib/revox/internal/type/unknown.rb +81 -0
  22. data/lib/revox/internal/util.rb +920 -0
  23. data/lib/revox/internal.rb +20 -0
  24. data/lib/revox/models/assistant_create_params.rb +467 -0
  25. data/lib/revox/models/assistant_create_response.rb +535 -0
  26. data/lib/revox/models/assistant_delete_params.rb +14 -0
  27. data/lib/revox/models/assistant_delete_response.rb +16 -0
  28. data/lib/revox/models/assistant_list_params.rb +14 -0
  29. data/lib/revox/models/assistant_list_response.rb +533 -0
  30. data/lib/revox/models/assistant_retrieve_params.rb +14 -0
  31. data/lib/revox/models/assistant_retrieve_response.rb +518 -0
  32. data/lib/revox/models/assistant_update_params.rb +467 -0
  33. data/lib/revox/models/assistant_update_response.rb +535 -0
  34. data/lib/revox/models/call_create_params.rb +592 -0
  35. data/lib/revox/models/call_create_response.rb +684 -0
  36. data/lib/revox/models/call_list_params.rb +29 -0
  37. data/lib/revox/models/call_list_response.rb +197 -0
  38. data/lib/revox/models/call_retrieve_params.rb +14 -0
  39. data/lib/revox/models/call_retrieve_response.rb +684 -0
  40. data/lib/revox/models/users/me_retrieve_params.rb +16 -0
  41. data/lib/revox/models/users/me_retrieve_response.rb +89 -0
  42. data/lib/revox/models/users/me_update_params.rb +22 -0
  43. data/lib/revox/models/users/me_update_response.rb +89 -0
  44. data/lib/revox/models/voice_list_params.rb +14 -0
  45. data/lib/revox/models/voice_list_response.rb +91 -0
  46. data/lib/revox/models/voice_preview_params.rb +49 -0
  47. data/lib/revox/models/voice_retrieve_params.rb +30 -0
  48. data/lib/revox/models/voice_retrieve_response.rb +39 -0
  49. data/lib/revox/models.rb +65 -0
  50. data/lib/revox/request_options.rb +77 -0
  51. data/lib/revox/resources/assistants.rb +180 -0
  52. data/lib/revox/resources/call.rb +100 -0
  53. data/lib/revox/resources/users/me.rb +55 -0
  54. data/lib/revox/resources/users.rb +18 -0
  55. data/lib/revox/resources/voices.rb +83 -0
  56. data/lib/revox/version.rb +5 -0
  57. data/lib/revox.rb +85 -0
  58. data/manifest.yaml +17 -0
  59. data/rbi/revox/client.rbi +58 -0
  60. data/rbi/revox/errors.rbi +205 -0
  61. data/rbi/revox/file_part.rbi +37 -0
  62. data/rbi/revox/internal/transport/base_client.rbi +297 -0
  63. data/rbi/revox/internal/transport/pooled_net_requester.rbi +82 -0
  64. data/rbi/revox/internal/type/array_of.rbi +104 -0
  65. data/rbi/revox/internal/type/base_model.rbi +299 -0
  66. data/rbi/revox/internal/type/base_page.rbi +42 -0
  67. data/rbi/revox/internal/type/boolean.rbi +58 -0
  68. data/rbi/revox/internal/type/converter.rbi +204 -0
  69. data/rbi/revox/internal/type/enum.rbi +82 -0
  70. data/rbi/revox/internal/type/file_input.rbi +58 -0
  71. data/rbi/revox/internal/type/hash_of.rbi +104 -0
  72. data/rbi/revox/internal/type/request_parameters.rbi +29 -0
  73. data/rbi/revox/internal/type/union.rbi +126 -0
  74. data/rbi/revox/internal/type/unknown.rbi +58 -0
  75. data/rbi/revox/internal/util.rbi +478 -0
  76. data/rbi/revox/internal.rbi +16 -0
  77. data/rbi/revox/models/assistant_create_params.rbi +929 -0
  78. data/rbi/revox/models/assistant_create_response.rbi +1089 -0
  79. data/rbi/revox/models/assistant_delete_params.rbi +27 -0
  80. data/rbi/revox/models/assistant_delete_response.rbi +26 -0
  81. data/rbi/revox/models/assistant_list_params.rbi +27 -0
  82. data/rbi/revox/models/assistant_list_response.rbi +1079 -0
  83. data/rbi/revox/models/assistant_retrieve_params.rbi +27 -0
  84. data/rbi/revox/models/assistant_retrieve_response.rbi +1024 -0
  85. data/rbi/revox/models/assistant_update_params.rbi +935 -0
  86. data/rbi/revox/models/assistant_update_response.rbi +1089 -0
  87. data/rbi/revox/models/call_create_params.rbi +1147 -0
  88. data/rbi/revox/models/call_create_response.rbi +1335 -0
  89. data/rbi/revox/models/call_list_params.rbi +47 -0
  90. data/rbi/revox/models/call_list_response.rbi +401 -0
  91. data/rbi/revox/models/call_retrieve_params.rbi +27 -0
  92. data/rbi/revox/models/call_retrieve_response.rbi +1346 -0
  93. data/rbi/revox/models/users/me_retrieve_params.rbi +29 -0
  94. data/rbi/revox/models/users/me_retrieve_response.rbi +139 -0
  95. data/rbi/revox/models/users/me_update_params.rbi +43 -0
  96. data/rbi/revox/models/users/me_update_response.rbi +139 -0
  97. data/rbi/revox/models/voice_list_params.rbi +25 -0
  98. data/rbi/revox/models/voice_list_response.rbi +204 -0
  99. data/rbi/revox/models/voice_preview_params.rbi +84 -0
  100. data/rbi/revox/models/voice_retrieve_params.rbi +59 -0
  101. data/rbi/revox/models/voice_retrieve_response.rbi +70 -0
  102. data/rbi/revox/models.rbi +27 -0
  103. data/rbi/revox/request_options.rbi +55 -0
  104. data/rbi/revox/resources/assistants.rbi +206 -0
  105. data/rbi/revox/resources/call.rbi +86 -0
  106. data/rbi/revox/resources/users/me.rbi +33 -0
  107. data/rbi/revox/resources/users.rbi +15 -0
  108. data/rbi/revox/resources/voices.rbi +58 -0
  109. data/rbi/revox/version.rbi +5 -0
  110. data/sig/revox/client.rbs +32 -0
  111. data/sig/revox/errors.rbs +117 -0
  112. data/sig/revox/file_part.rbs +21 -0
  113. data/sig/revox/internal/transport/base_client.rbs +133 -0
  114. data/sig/revox/internal/transport/pooled_net_requester.rbs +48 -0
  115. data/sig/revox/internal/type/array_of.rbs +48 -0
  116. data/sig/revox/internal/type/base_model.rbs +102 -0
  117. data/sig/revox/internal/type/base_page.rbs +24 -0
  118. data/sig/revox/internal/type/boolean.rbs +26 -0
  119. data/sig/revox/internal/type/converter.rbs +79 -0
  120. data/sig/revox/internal/type/enum.rbs +32 -0
  121. data/sig/revox/internal/type/file_input.rbs +25 -0
  122. data/sig/revox/internal/type/hash_of.rbs +48 -0
  123. data/sig/revox/internal/type/request_parameters.rbs +17 -0
  124. data/sig/revox/internal/type/union.rbs +52 -0
  125. data/sig/revox/internal/type/unknown.rbs +26 -0
  126. data/sig/revox/internal/util.rbs +185 -0
  127. data/sig/revox/internal.rbs +9 -0
  128. data/sig/revox/models/assistant_create_params.rbs +413 -0
  129. data/sig/revox/models/assistant_create_response.rbs +461 -0
  130. data/sig/revox/models/assistant_delete_params.rbs +15 -0
  131. data/sig/revox/models/assistant_delete_response.rbs +13 -0
  132. data/sig/revox/models/assistant_list_params.rbs +15 -0
  133. data/sig/revox/models/assistant_list_response.rbs +461 -0
  134. data/sig/revox/models/assistant_retrieve_params.rbs +15 -0
  135. data/sig/revox/models/assistant_retrieve_response.rbs +446 -0
  136. data/sig/revox/models/assistant_update_params.rbs +417 -0
  137. data/sig/revox/models/assistant_update_response.rbs +461 -0
  138. data/sig/revox/models/call_create_params.rbs +507 -0
  139. data/sig/revox/models/call_create_response.rbs +551 -0
  140. data/sig/revox/models/call_list_params.rbs +28 -0
  141. data/sig/revox/models/call_list_response.rbs +171 -0
  142. data/sig/revox/models/call_retrieve_params.rbs +14 -0
  143. data/sig/revox/models/call_retrieve_response.rbs +551 -0
  144. data/sig/revox/models/users/me_retrieve_params.rbs +16 -0
  145. data/sig/revox/models/users/me_retrieve_response.rbs +70 -0
  146. data/sig/revox/models/users/me_update_params.rbs +28 -0
  147. data/sig/revox/models/users/me_update_response.rbs +70 -0
  148. data/sig/revox/models/voice_list_params.rbs +14 -0
  149. data/sig/revox/models/voice_list_response.rbs +83 -0
  150. data/sig/revox/models/voice_preview_params.rbs +49 -0
  151. data/sig/revox/models/voice_retrieve_params.rbs +35 -0
  152. data/sig/revox/models/voice_retrieve_response.rbs +32 -0
  153. data/sig/revox/models.rbs +25 -0
  154. data/sig/revox/request_options.rbs +34 -0
  155. data/sig/revox/resources/assistants.rbs +66 -0
  156. data/sig/revox/resources/call.rbs +31 -0
  157. data/sig/revox/resources/users/me.rbs +18 -0
  158. data/sig/revox/resources/users.rbs +9 -0
  159. data/sig/revox/resources/voices.rbs +24 -0
  160. data/sig/revox/version.rbs +3 -0
  161. metadata +232 -0
@@ -0,0 +1,592 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Revox
4
+ module Models
5
+ # @see Revox::Resources::Call#create
6
+ class CallCreateParams < Revox::Internal::Type::BaseModel
7
+ extend Revox::Internal::Type::RequestParameters::Converter
8
+ include Revox::Internal::Type::RequestParameters
9
+
10
+ # @!attribute phone_number
11
+ # The phone number to call in the E.164 format. Example: +1234567890
12
+ #
13
+ # @return [String]
14
+ required :phone_number, String
15
+
16
+ # @!attribute assistant
17
+ # You can provide a custom assistant configuration here. If you don't provide an
18
+ # assistant_id, this assistant object will be used for this call.
19
+ #
20
+ # @return [Revox::Models::CallCreateParams::Assistant, nil]
21
+ optional :assistant, -> { Revox::CallCreateParams::Assistant }
22
+
23
+ # @!attribute assistant_id
24
+ # The ID of the assistant to use for this call.
25
+ #
26
+ # @return [String, nil]
27
+ optional :assistant_id, String
28
+
29
+ # @!attribute concurrency
30
+ # Limit the number of concurrent calls for a given concurrency key.
31
+ #
32
+ # @return [Revox::Models::CallCreateParams::Concurrency, nil]
33
+ optional :concurrency, -> { Revox::CallCreateParams::Concurrency }
34
+
35
+ # @!attribute force_now
36
+ # The prompt to use for the call. This will be given to the LLM (gpt-4.1)
37
+ #
38
+ # @return [Boolean, nil]
39
+ optional :force_now, Revox::Internal::Type::Boolean
40
+
41
+ # @!attribute from_phone_number
42
+ # The phone number to use for making the call (e.g., +1234567890). If not
43
+ # provided, uses the default trunk.
44
+ #
45
+ # @return [String, nil]
46
+ optional :from_phone_number, String
47
+
48
+ # @!attribute metadata
49
+ # Metadata to store with the call.
50
+ #
51
+ # @return [Hash{Symbol=>String}, nil]
52
+ optional :metadata, Revox::Internal::Type::HashOf[String]
53
+
54
+ # @!attribute prompt_variables
55
+ # Variables to interpolate into the prompt. Wether you use an assistant_id or an
56
+ # assistant object, this will be used to interpolate the variables into the
57
+ # prompt.
58
+ #
59
+ # @return [Hash{Symbol=>String}, nil]
60
+ optional :prompt_variables, Revox::Internal::Type::HashOf[String]
61
+
62
+ # @!attribute scheduled_at
63
+ # Schedule the call to start at a specific date and time (ISO 8601 format). If not
64
+ # provided, the call will start immediately.
65
+ #
66
+ # @return [Time, Object, nil]
67
+ optional :scheduled_at, union: -> { Revox::CallCreateParams::ScheduledAt }
68
+
69
+ # @!method initialize(phone_number:, assistant: nil, assistant_id: nil, concurrency: nil, force_now: nil, from_phone_number: nil, metadata: nil, prompt_variables: nil, scheduled_at: nil, request_options: {})
70
+ # Some parameter documentations has been truncated, see
71
+ # {Revox::Models::CallCreateParams} for more details.
72
+ #
73
+ # @param phone_number [String] The phone number to call in the E.164 format. Example: +1234567890
74
+ #
75
+ # @param assistant [Revox::Models::CallCreateParams::Assistant] You can provide a custom assistant configuration here. If you don't provide an a
76
+ #
77
+ # @param assistant_id [String] The ID of the assistant to use for this call.
78
+ #
79
+ # @param concurrency [Revox::Models::CallCreateParams::Concurrency] Limit the number of concurrent calls for a given concurrency key.
80
+ #
81
+ # @param force_now [Boolean] The prompt to use for the call. This will be given to the LLM (gpt-4.1)
82
+ #
83
+ # @param from_phone_number [String] The phone number to use for making the call (e.g., +1234567890). If not provided
84
+ #
85
+ # @param metadata [Hash{Symbol=>String}] Metadata to store with the call.
86
+ #
87
+ # @param prompt_variables [Hash{Symbol=>String}] Variables to interpolate into the prompt. Wether you use an assistant_id or an a
88
+ #
89
+ # @param scheduled_at [Time, Object] Schedule the call to start at a specific date and time (ISO 8601 format). If not
90
+ #
91
+ # @param request_options [Revox::RequestOptions, Hash{Symbol=>Object}]
92
+
93
+ class Assistant < Revox::Internal::Type::BaseModel
94
+ # @!attribute prompt
95
+ # The prompt to use for the call. This will be given to the LLM (gpt-4.1)
96
+ #
97
+ # @return [String]
98
+ required :prompt, String
99
+
100
+ # @!attribute background_sound
101
+ # The background sound to play during the call. Useful to give the impression that
102
+ # your AI agent is in an office, in the street, or anywhere else you want.
103
+ #
104
+ # @return [Symbol, Revox::Models::CallCreateParams::Assistant::BackgroundSound, nil]
105
+ optional :background_sound,
106
+ enum: -> {
107
+ Revox::CallCreateParams::Assistant::BackgroundSound
108
+ },
109
+ nil?: true
110
+
111
+ # @!attribute calendly
112
+ #
113
+ # @return [Revox::Models::CallCreateParams::Assistant::Calendly, nil]
114
+ optional :calendly, -> { Revox::CallCreateParams::Assistant::Calendly }, nil?: true
115
+
116
+ # @!attribute call_retry_config
117
+ # Configuration for call retry behavior including time windows, delays, and max
118
+ # iterations. If not provided, defaults will be used.
119
+ #
120
+ # @return [Revox::Models::CallCreateParams::Assistant::CallRetryConfig, nil]
121
+ optional :call_retry_config, -> { Revox::CallCreateParams::Assistant::CallRetryConfig }
122
+
123
+ # @!attribute end_of_call_sentence
124
+ # Optional message to say when the agent decides to end the call.
125
+ #
126
+ # @return [String, nil]
127
+ optional :end_of_call_sentence, String
128
+
129
+ # @!attribute faq_items
130
+ # FAQ items to associate with this assistant. When provided, replaces all existing
131
+ # FAQ items.
132
+ #
133
+ # @return [Array<Revox::Models::CallCreateParams::Assistant::FaqItem>, nil]
134
+ optional :faq_items, -> { Revox::Internal::Type::ArrayOf[Revox::CallCreateParams::Assistant::FaqItem] }
135
+
136
+ # @!attribute first_sentence
137
+ # The first sentence to use for the call. This will be given to the LLM
138
+ #
139
+ # @return [String, nil]
140
+ optional :first_sentence, String
141
+
142
+ # @!attribute first_sentence_delay_ms
143
+ # Delay in milliseconds before speaking the first sentence. Default: 400.
144
+ #
145
+ # @return [Integer, nil]
146
+ optional :first_sentence_delay_ms, Integer
147
+
148
+ # @!attribute first_sentence_mode
149
+ # How the first sentence should be handled. "generated" means the LLM will
150
+ # generate a response based on the first_sentence instruction. "static" means the
151
+ # first_sentence will be spoken exactly as provided. "none" means the agent will
152
+ # not speak first and will wait for the user.
153
+ #
154
+ # @return [Symbol, Revox::Models::CallCreateParams::Assistant::FirstSentenceMode, nil]
155
+ optional :first_sentence_mode, enum: -> { Revox::CallCreateParams::Assistant::FirstSentenceMode }
156
+
157
+ # @!attribute ivr_navigation_enabled
158
+ # Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
159
+ # skip turns to navigate phone menus.
160
+ #
161
+ # @return [Boolean, nil]
162
+ optional :ivr_navigation_enabled, Revox::Internal::Type::Boolean
163
+
164
+ # @!attribute llm_model
165
+ #
166
+ # @return [Revox::Models::CallCreateParams::Assistant::LlmModel::UnionMember0, Revox::Models::CallCreateParams::Assistant::LlmModel::UnionMember1, nil]
167
+ optional :llm_model, union: -> { Revox::CallCreateParams::Assistant::LlmModel }
168
+
169
+ # @!attribute max_call_duration_secs
170
+ # The maximum duration of the call in seconds. This is the maximum time the call
171
+ # will be allowed to run.
172
+ #
173
+ # @return [Float, nil]
174
+ optional :max_call_duration_secs, Float
175
+
176
+ # @!attribute structured_output_config
177
+ # The structured output config to use for the call. This is used to extract the
178
+ # data from the call (like email, name, company name, etc.).
179
+ #
180
+ # @return [Array<Revox::Models::CallCreateParams::Assistant::StructuredOutputConfig>, nil]
181
+ optional :structured_output_config,
182
+ -> { Revox::Internal::Type::ArrayOf[Revox::CallCreateParams::Assistant::StructuredOutputConfig] }
183
+
184
+ # @!attribute transfer_phone_number
185
+ # Phone number to transfer calls to when users request to speak to a human agent
186
+ # in E.164 format (e.g. +1234567890).
187
+ #
188
+ # @return [String, nil]
189
+ optional :transfer_phone_number, String, nil?: true
190
+
191
+ # @!attribute voice
192
+ # The voice to use for the call. You can get the list of voices using the /voices
193
+ # endpoint
194
+ #
195
+ # @return [Revox::Models::CallCreateParams::Assistant::Voice, nil]
196
+ optional :voice, -> { Revox::CallCreateParams::Assistant::Voice }
197
+
198
+ # @!attribute voicemail_message
199
+ # If set, when voicemail is detected the agent will speak this message then hang
200
+ # up; if null, hang up immediately.
201
+ #
202
+ # @return [String, nil]
203
+ optional :voicemail_message, String, nil?: true
204
+
205
+ # @!attribute webhook_url
206
+ # The webhook URL to call when the call is completed.
207
+ #
208
+ # @return [String, nil]
209
+ optional :webhook_url, String
210
+
211
+ # @!method initialize(prompt:, background_sound: nil, calendly: nil, call_retry_config: nil, end_of_call_sentence: nil, faq_items: nil, first_sentence: nil, first_sentence_delay_ms: nil, first_sentence_mode: nil, ivr_navigation_enabled: nil, llm_model: nil, max_call_duration_secs: nil, structured_output_config: nil, transfer_phone_number: nil, voice: nil, voicemail_message: nil, webhook_url: nil)
212
+ # Some parameter documentations has been truncated, see
213
+ # {Revox::Models::CallCreateParams::Assistant} for more details.
214
+ #
215
+ # You can provide a custom assistant configuration here. If you don't provide an
216
+ # assistant_id, this assistant object will be used for this call.
217
+ #
218
+ # @param prompt [String] The prompt to use for the call. This will be given to the LLM (gpt-4.1)
219
+ #
220
+ # @param background_sound [Symbol, Revox::Models::CallCreateParams::Assistant::BackgroundSound, nil] The background sound to play during the call. Useful to give the impression that
221
+ #
222
+ # @param calendly [Revox::Models::CallCreateParams::Assistant::Calendly, nil]
223
+ #
224
+ # @param call_retry_config [Revox::Models::CallCreateParams::Assistant::CallRetryConfig] Configuration for call retry behavior including time windows, delays, and max it
225
+ #
226
+ # @param end_of_call_sentence [String] Optional message to say when the agent decides to end the call.
227
+ #
228
+ # @param faq_items [Array<Revox::Models::CallCreateParams::Assistant::FaqItem>] FAQ items to associate with this assistant. When provided, replaces all existing
229
+ #
230
+ # @param first_sentence [String] The first sentence to use for the call. This will be given to the LLM
231
+ #
232
+ # @param first_sentence_delay_ms [Integer] Delay in milliseconds before speaking the first sentence. Default: 400.
233
+ #
234
+ # @param first_sentence_mode [Symbol, Revox::Models::CallCreateParams::Assistant::FirstSentenceMode] How the first sentence should be handled. "generated" means the LLM will generat
235
+ #
236
+ # @param ivr_navigation_enabled [Boolean] Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
237
+ #
238
+ # @param llm_model [Revox::Models::CallCreateParams::Assistant::LlmModel::UnionMember0, Revox::Models::CallCreateParams::Assistant::LlmModel::UnionMember1]
239
+ #
240
+ # @param max_call_duration_secs [Float] The maximum duration of the call in seconds. This is the maximum time the call w
241
+ #
242
+ # @param structured_output_config [Array<Revox::Models::CallCreateParams::Assistant::StructuredOutputConfig>] The structured output config to use for the call. This is used to extract the da
243
+ #
244
+ # @param transfer_phone_number [String, nil] Phone number to transfer calls to when users request to speak to a human agent i
245
+ #
246
+ # @param voice [Revox::Models::CallCreateParams::Assistant::Voice] The voice to use for the call. You can get the list of voices using the /voices
247
+ #
248
+ # @param voicemail_message [String, nil] If set, when voicemail is detected the agent will speak this message then hang u
249
+ #
250
+ # @param webhook_url [String] The webhook URL to call when the call is completed.
251
+
252
+ # The background sound to play during the call. Useful to give the impression that
253
+ # your AI agent is in an office, in the street, or anywhere else you want.
254
+ #
255
+ # @see Revox::Models::CallCreateParams::Assistant#background_sound
256
+ module BackgroundSound
257
+ extend Revox::Internal::Type::Enum
258
+
259
+ AUDIO_OFFICE_OGG = :"audio/office.ogg"
260
+
261
+ # @!method self.values
262
+ # @return [Array<Symbol>]
263
+ end
264
+
265
+ # @see Revox::Models::CallCreateParams::Assistant#calendly
266
+ class Calendly < Revox::Internal::Type::BaseModel
267
+ # @!attribute connection_id
268
+ # The connection ID representing the link between your Calendly account and Revox.
269
+ #
270
+ # @return [String]
271
+ required :connection_id, String
272
+
273
+ # @!attribute event_type_id
274
+ # The event type ID representing the event type to schedule. (eg:
275
+ # https://api.calendly.com/event_types/b2330295-2a91-4a1d-bb73-99e7707663d5)
276
+ #
277
+ # @return [String]
278
+ required :event_type_id, String
279
+
280
+ # @!method initialize(connection_id:, event_type_id:)
281
+ # Some parameter documentations has been truncated, see
282
+ # {Revox::Models::CallCreateParams::Assistant::Calendly} for more details.
283
+ #
284
+ # @param connection_id [String] The connection ID representing the link between your Calendly account and Revox.
285
+ #
286
+ # @param event_type_id [String] The event type ID representing the event type to schedule. (eg: https://api.cale
287
+ end
288
+
289
+ # @see Revox::Models::CallCreateParams::Assistant#call_retry_config
290
+ class CallRetryConfig < Revox::Internal::Type::BaseModel
291
+ # @!attribute calling_windows
292
+ #
293
+ # @return [Array<Revox::Models::CallCreateParams::Assistant::CallRetryConfig::CallingWindow>]
294
+ required :calling_windows,
295
+ -> { Revox::Internal::Type::ArrayOf[Revox::CallCreateParams::Assistant::CallRetryConfig::CallingWindow] }
296
+
297
+ # @!attribute max_retry_attempts
298
+ # Maximum number of call retry attempts. Default: 3.
299
+ #
300
+ # @return [Integer]
301
+ required :max_retry_attempts, Integer
302
+
303
+ # @!attribute timezone
304
+ # Optional IANA timezone identifier to override the automatic timezone detection
305
+ # from phone number. If not provided, timezone is determined from the recipient's
306
+ # phone number country code. Examples: 'America/New_York', 'Europe/Paris'.
307
+ #
308
+ # @return [String, nil]
309
+ optional :timezone, String, nil?: true
310
+
311
+ # @!method initialize(calling_windows:, max_retry_attempts:, timezone: nil)
312
+ # Some parameter documentations has been truncated, see
313
+ # {Revox::Models::CallCreateParams::Assistant::CallRetryConfig} for more details.
314
+ #
315
+ # Configuration for call retry behavior including time windows, delays, and max
316
+ # iterations. If not provided, defaults will be used.
317
+ #
318
+ # @param calling_windows [Array<Revox::Models::CallCreateParams::Assistant::CallRetryConfig::CallingWindow>]
319
+ #
320
+ # @param max_retry_attempts [Integer] Maximum number of call retry attempts. Default: 3.
321
+ #
322
+ # @param timezone [String, nil] Optional IANA timezone identifier to override the automatic timezone detection f
323
+
324
+ class CallingWindow < Revox::Internal::Type::BaseModel
325
+ # @!attribute calling_window_end_time
326
+ # End time for the calling window in the recipient's timezone (or
327
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
328
+ # Examples: '17:00', '6pm'. Default: '18:00'.
329
+ #
330
+ # @return [String]
331
+ required :calling_window_end_time, String
332
+
333
+ # @!attribute calling_window_start_time
334
+ # Start time for the calling window in the recipient's timezone (or
335
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
336
+ # Examples: '09:00', '10am'. Default: '10:00'.
337
+ #
338
+ # @return [String]
339
+ required :calling_window_start_time, String
340
+
341
+ # @!attribute retry_delay_seconds
342
+ # Delay between retry attempts in seconds. Default: 7200 (2 hours).
343
+ #
344
+ # @return [Integer]
345
+ required :retry_delay_seconds, Integer
346
+
347
+ # @!method initialize(calling_window_end_time:, calling_window_start_time:, retry_delay_seconds:)
348
+ # Some parameter documentations has been truncated, see
349
+ # {Revox::Models::CallCreateParams::Assistant::CallRetryConfig::CallingWindow} for
350
+ # more details.
351
+ #
352
+ # @param calling_window_end_time [String] End time for the calling window in the recipient's timezone (or timezone_overrid
353
+ #
354
+ # @param calling_window_start_time [String] Start time for the calling window in the recipient's timezone (or timezone_overr
355
+ #
356
+ # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. Default: 7200 (2 hours).
357
+ end
358
+ end
359
+
360
+ class FaqItem < Revox::Internal::Type::BaseModel
361
+ # @!attribute answer
362
+ #
363
+ # @return [String]
364
+ required :answer, String
365
+
366
+ # @!attribute question
367
+ #
368
+ # @return [String]
369
+ required :question, String
370
+
371
+ # @!method initialize(answer:, question:)
372
+ # @param answer [String]
373
+ # @param question [String]
374
+ end
375
+
376
+ # How the first sentence should be handled. "generated" means the LLM will
377
+ # generate a response based on the first_sentence instruction. "static" means the
378
+ # first_sentence will be spoken exactly as provided. "none" means the agent will
379
+ # not speak first and will wait for the user.
380
+ #
381
+ # @see Revox::Models::CallCreateParams::Assistant#first_sentence_mode
382
+ module FirstSentenceMode
383
+ extend Revox::Internal::Type::Enum
384
+
385
+ GENERATED = :generated
386
+ STATIC = :static
387
+ NONE = :none
388
+
389
+ # @!method self.values
390
+ # @return [Array<Symbol>]
391
+ end
392
+
393
+ # @see Revox::Models::CallCreateParams::Assistant#llm_model
394
+ module LlmModel
395
+ extend Revox::Internal::Type::Union
396
+
397
+ variant -> { Revox::CallCreateParams::Assistant::LlmModel::UnionMember0 }
398
+
399
+ variant -> { Revox::CallCreateParams::Assistant::LlmModel::UnionMember1 }
400
+
401
+ class UnionMember0 < Revox::Internal::Type::BaseModel
402
+ # @!attribute name
403
+ #
404
+ # @return [Symbol, Revox::Models::CallCreateParams::Assistant::LlmModel::UnionMember0::Name]
405
+ required :name, enum: -> { Revox::CallCreateParams::Assistant::LlmModel::UnionMember0::Name }
406
+
407
+ # @!attribute type
408
+ #
409
+ # @return [Symbol, :"dedicated-instance"]
410
+ required :type, const: :"dedicated-instance"
411
+
412
+ # @!method initialize(name:, type: :"dedicated-instance")
413
+ # @param name [Symbol, Revox::Models::CallCreateParams::Assistant::LlmModel::UnionMember0::Name]
414
+ # @param type [Symbol, :"dedicated-instance"]
415
+
416
+ # @see Revox::Models::CallCreateParams::Assistant::LlmModel::UnionMember0#name
417
+ module Name
418
+ extend Revox::Internal::Type::Enum
419
+
420
+ GPT_4_1 = :"gpt-4.1"
421
+ MINISTRAL_3_8B_INSTRUCT = :"ministral-3-8b-instruct"
422
+
423
+ # @!method self.values
424
+ # @return [Array<Symbol>]
425
+ end
426
+ end
427
+
428
+ class UnionMember1 < Revox::Internal::Type::BaseModel
429
+ # @!attribute openrouter_model_id
430
+ # The model ID to use from OpenRouter. eg: openai/gpt-4.1
431
+ #
432
+ # @return [String]
433
+ required :openrouter_model_id, String
434
+
435
+ # @!attribute openrouter_provider
436
+ # The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
437
+ #
438
+ # @return [String]
439
+ required :openrouter_provider, String
440
+
441
+ # @!attribute type
442
+ # Use a model from OpenRouter.
443
+ #
444
+ # @return [Symbol, :openrouter]
445
+ required :type, const: :openrouter
446
+
447
+ # @!method initialize(openrouter_model_id:, openrouter_provider:, type: :openrouter)
448
+ # @param openrouter_model_id [String] The model ID to use from OpenRouter. eg: openai/gpt-4.1
449
+ #
450
+ # @param openrouter_provider [String] The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
451
+ #
452
+ # @param type [Symbol, :openrouter] Use a model from OpenRouter.
453
+ end
454
+
455
+ # @!method self.variants
456
+ # @return [Array(Revox::Models::CallCreateParams::Assistant::LlmModel::UnionMember0, Revox::Models::CallCreateParams::Assistant::LlmModel::UnionMember1)]
457
+ end
458
+
459
+ class StructuredOutputConfig < Revox::Internal::Type::BaseModel
460
+ # @!attribute name
461
+ #
462
+ # @return [String]
463
+ required :name, String
464
+
465
+ # @!attribute required
466
+ #
467
+ # @return [Boolean]
468
+ required :required, Revox::Internal::Type::Boolean
469
+
470
+ # @!attribute type
471
+ #
472
+ # @return [Symbol, Revox::Models::CallCreateParams::Assistant::StructuredOutputConfig::Type]
473
+ required :type, enum: -> { Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type }
474
+
475
+ # @!attribute description
476
+ #
477
+ # @return [String, nil]
478
+ optional :description, String
479
+
480
+ # @!attribute enum_options
481
+ #
482
+ # @return [Array<String>, nil]
483
+ optional :enum_options, Revox::Internal::Type::ArrayOf[String]
484
+
485
+ # @!method initialize(name:, required:, type:, description: nil, enum_options: nil)
486
+ # @param name [String]
487
+ # @param required [Boolean]
488
+ # @param type [Symbol, Revox::Models::CallCreateParams::Assistant::StructuredOutputConfig::Type]
489
+ # @param description [String]
490
+ # @param enum_options [Array<String>]
491
+
492
+ # @see Revox::Models::CallCreateParams::Assistant::StructuredOutputConfig#type
493
+ module Type
494
+ extend Revox::Internal::Type::Enum
495
+
496
+ STRING = :string
497
+ NUMBER = :number
498
+ BOOLEAN = :boolean
499
+ ENUM = :enum
500
+ DATE = :date
501
+ DATETIME = :datetime
502
+
503
+ # @!method self.values
504
+ # @return [Array<Symbol>]
505
+ end
506
+ end
507
+
508
+ # @see Revox::Models::CallCreateParams::Assistant#voice
509
+ class Voice < Revox::Internal::Type::BaseModel
510
+ # @!attribute id
511
+ # The ID of the voice.
512
+ #
513
+ # @return [String]
514
+ required :id, String
515
+
516
+ # @!attribute provider
517
+ # The provider of the voice.
518
+ #
519
+ # @return [Symbol, Revox::Models::CallCreateParams::Assistant::Voice::Provider]
520
+ required :provider, enum: -> { Revox::CallCreateParams::Assistant::Voice::Provider }
521
+
522
+ # @!attribute speed
523
+ # The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
524
+ # 0.7–1.2. Default is 1.0.
525
+ #
526
+ # @return [Float, nil]
527
+ optional :speed, Float
528
+
529
+ # @!method initialize(id:, provider:, speed: nil)
530
+ # Some parameter documentations has been truncated, see
531
+ # {Revox::Models::CallCreateParams::Assistant::Voice} for more details.
532
+ #
533
+ # The voice to use for the call. You can get the list of voices using the /voices
534
+ # endpoint
535
+ #
536
+ # @param id [String] The ID of the voice.
537
+ #
538
+ # @param provider [Symbol, Revox::Models::CallCreateParams::Assistant::Voice::Provider] The provider of the voice.
539
+ #
540
+ # @param speed [Float] The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
541
+
542
+ # The provider of the voice.
543
+ #
544
+ # @see Revox::Models::CallCreateParams::Assistant::Voice#provider
545
+ module Provider
546
+ extend Revox::Internal::Type::Enum
547
+
548
+ CARTESIA = :cartesia
549
+ ELEVENLABS = :elevenlabs
550
+
551
+ # @!method self.values
552
+ # @return [Array<Symbol>]
553
+ end
554
+ end
555
+ end
556
+
557
+ class Concurrency < Revox::Internal::Type::BaseModel
558
+ # @!attribute key
559
+ # The key for which you want to limit the number of concurrent calls.
560
+ #
561
+ # @return [String]
562
+ required :key, String
563
+
564
+ # @!attribute max
565
+ # The maximum number of concurrent calls to allow for the given concurrency key.
566
+ #
567
+ # @return [Float]
568
+ required :max, Float
569
+
570
+ # @!method initialize(key:, max:)
571
+ # Limit the number of concurrent calls for a given concurrency key.
572
+ #
573
+ # @param key [String] The key for which you want to limit the number of concurrent calls.
574
+ #
575
+ # @param max [Float] The maximum number of concurrent calls to allow for the given concurrency key.
576
+ end
577
+
578
+ # Schedule the call to start at a specific date and time (ISO 8601 format). If not
579
+ # provided, the call will start immediately.
580
+ module ScheduledAt
581
+ extend Revox::Internal::Type::Union
582
+
583
+ variant Time
584
+
585
+ variant Revox::Internal::Type::Unknown
586
+
587
+ # @!method self.variants
588
+ # @return [Array(Time, Object)]
589
+ end
590
+ end
591
+ end
592
+ end