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,1147 @@
1
+ # typed: strong
2
+
3
+ module Revox
4
+ module Models
5
+ class CallCreateParams < Revox::Internal::Type::BaseModel
6
+ extend Revox::Internal::Type::RequestParameters::Converter
7
+ include Revox::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Revox::CallCreateParams, Revox::Internal::AnyHash)
12
+ end
13
+
14
+ # The phone number to call in the E.164 format. Example: +1234567890
15
+ sig { returns(String) }
16
+ attr_accessor :phone_number
17
+
18
+ # You can provide a custom assistant configuration here. If you don't provide an
19
+ # assistant_id, this assistant object will be used for this call.
20
+ sig { returns(T.nilable(Revox::CallCreateParams::Assistant)) }
21
+ attr_reader :assistant
22
+
23
+ sig { params(assistant: Revox::CallCreateParams::Assistant::OrHash).void }
24
+ attr_writer :assistant
25
+
26
+ # The ID of the assistant to use for this call.
27
+ sig { returns(T.nilable(String)) }
28
+ attr_reader :assistant_id
29
+
30
+ sig { params(assistant_id: String).void }
31
+ attr_writer :assistant_id
32
+
33
+ # Limit the number of concurrent calls for a given concurrency key.
34
+ sig { returns(T.nilable(Revox::CallCreateParams::Concurrency)) }
35
+ attr_reader :concurrency
36
+
37
+ sig do
38
+ params(concurrency: Revox::CallCreateParams::Concurrency::OrHash).void
39
+ end
40
+ attr_writer :concurrency
41
+
42
+ # The prompt to use for the call. This will be given to the LLM (gpt-4.1)
43
+ sig { returns(T.nilable(T::Boolean)) }
44
+ attr_reader :force_now
45
+
46
+ sig { params(force_now: T::Boolean).void }
47
+ attr_writer :force_now
48
+
49
+ # The phone number to use for making the call (e.g., +1234567890). If not
50
+ # provided, uses the default trunk.
51
+ sig { returns(T.nilable(String)) }
52
+ attr_reader :from_phone_number
53
+
54
+ sig { params(from_phone_number: String).void }
55
+ attr_writer :from_phone_number
56
+
57
+ # Metadata to store with the call.
58
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
59
+ attr_reader :metadata
60
+
61
+ sig { params(metadata: T::Hash[Symbol, String]).void }
62
+ attr_writer :metadata
63
+
64
+ # Variables to interpolate into the prompt. Wether you use an assistant_id or an
65
+ # assistant object, this will be used to interpolate the variables into the
66
+ # prompt.
67
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
68
+ attr_reader :prompt_variables
69
+
70
+ sig { params(prompt_variables: T::Hash[Symbol, String]).void }
71
+ attr_writer :prompt_variables
72
+
73
+ # Schedule the call to start at a specific date and time (ISO 8601 format). If not
74
+ # provided, the call will start immediately.
75
+ sig { returns(T.nilable(Revox::CallCreateParams::ScheduledAt::Variants)) }
76
+ attr_reader :scheduled_at
77
+
78
+ sig do
79
+ params(
80
+ scheduled_at: Revox::CallCreateParams::ScheduledAt::Variants
81
+ ).void
82
+ end
83
+ attr_writer :scheduled_at
84
+
85
+ sig do
86
+ params(
87
+ phone_number: String,
88
+ assistant: Revox::CallCreateParams::Assistant::OrHash,
89
+ assistant_id: String,
90
+ concurrency: Revox::CallCreateParams::Concurrency::OrHash,
91
+ force_now: T::Boolean,
92
+ from_phone_number: String,
93
+ metadata: T::Hash[Symbol, String],
94
+ prompt_variables: T::Hash[Symbol, String],
95
+ scheduled_at: Revox::CallCreateParams::ScheduledAt::Variants,
96
+ request_options: Revox::RequestOptions::OrHash
97
+ ).returns(T.attached_class)
98
+ end
99
+ def self.new(
100
+ # The phone number to call in the E.164 format. Example: +1234567890
101
+ phone_number:,
102
+ # You can provide a custom assistant configuration here. If you don't provide an
103
+ # assistant_id, this assistant object will be used for this call.
104
+ assistant: nil,
105
+ # The ID of the assistant to use for this call.
106
+ assistant_id: nil,
107
+ # Limit the number of concurrent calls for a given concurrency key.
108
+ concurrency: nil,
109
+ # The prompt to use for the call. This will be given to the LLM (gpt-4.1)
110
+ force_now: nil,
111
+ # The phone number to use for making the call (e.g., +1234567890). If not
112
+ # provided, uses the default trunk.
113
+ from_phone_number: nil,
114
+ # Metadata to store with the call.
115
+ metadata: nil,
116
+ # Variables to interpolate into the prompt. Wether you use an assistant_id or an
117
+ # assistant object, this will be used to interpolate the variables into the
118
+ # prompt.
119
+ prompt_variables: nil,
120
+ # Schedule the call to start at a specific date and time (ISO 8601 format). If not
121
+ # provided, the call will start immediately.
122
+ scheduled_at: nil,
123
+ request_options: {}
124
+ )
125
+ end
126
+
127
+ sig do
128
+ override.returns(
129
+ {
130
+ phone_number: String,
131
+ assistant: Revox::CallCreateParams::Assistant,
132
+ assistant_id: String,
133
+ concurrency: Revox::CallCreateParams::Concurrency,
134
+ force_now: T::Boolean,
135
+ from_phone_number: String,
136
+ metadata: T::Hash[Symbol, String],
137
+ prompt_variables: T::Hash[Symbol, String],
138
+ scheduled_at: Revox::CallCreateParams::ScheduledAt::Variants,
139
+ request_options: Revox::RequestOptions
140
+ }
141
+ )
142
+ end
143
+ def to_hash
144
+ end
145
+
146
+ class Assistant < Revox::Internal::Type::BaseModel
147
+ OrHash =
148
+ T.type_alias do
149
+ T.any(Revox::CallCreateParams::Assistant, Revox::Internal::AnyHash)
150
+ end
151
+
152
+ # The prompt to use for the call. This will be given to the LLM (gpt-4.1)
153
+ sig { returns(String) }
154
+ attr_accessor :prompt
155
+
156
+ # The background sound to play during the call. Useful to give the impression that
157
+ # your AI agent is in an office, in the street, or anywhere else you want.
158
+ sig do
159
+ returns(
160
+ T.nilable(
161
+ Revox::CallCreateParams::Assistant::BackgroundSound::OrSymbol
162
+ )
163
+ )
164
+ end
165
+ attr_accessor :background_sound
166
+
167
+ sig { returns(T.nilable(Revox::CallCreateParams::Assistant::Calendly)) }
168
+ attr_reader :calendly
169
+
170
+ sig do
171
+ params(
172
+ calendly:
173
+ T.nilable(Revox::CallCreateParams::Assistant::Calendly::OrHash)
174
+ ).void
175
+ end
176
+ attr_writer :calendly
177
+
178
+ # Configuration for call retry behavior including time windows, delays, and max
179
+ # iterations. If not provided, defaults will be used.
180
+ sig do
181
+ returns(
182
+ T.nilable(Revox::CallCreateParams::Assistant::CallRetryConfig)
183
+ )
184
+ end
185
+ attr_reader :call_retry_config
186
+
187
+ sig do
188
+ params(
189
+ call_retry_config:
190
+ Revox::CallCreateParams::Assistant::CallRetryConfig::OrHash
191
+ ).void
192
+ end
193
+ attr_writer :call_retry_config
194
+
195
+ # Optional message to say when the agent decides to end the call.
196
+ sig { returns(T.nilable(String)) }
197
+ attr_reader :end_of_call_sentence
198
+
199
+ sig { params(end_of_call_sentence: String).void }
200
+ attr_writer :end_of_call_sentence
201
+
202
+ # FAQ items to associate with this assistant. When provided, replaces all existing
203
+ # FAQ items.
204
+ sig do
205
+ returns(
206
+ T.nilable(T::Array[Revox::CallCreateParams::Assistant::FaqItem])
207
+ )
208
+ end
209
+ attr_reader :faq_items
210
+
211
+ sig do
212
+ params(
213
+ faq_items:
214
+ T::Array[Revox::CallCreateParams::Assistant::FaqItem::OrHash]
215
+ ).void
216
+ end
217
+ attr_writer :faq_items
218
+
219
+ # The first sentence to use for the call. This will be given to the LLM
220
+ sig { returns(T.nilable(String)) }
221
+ attr_reader :first_sentence
222
+
223
+ sig { params(first_sentence: String).void }
224
+ attr_writer :first_sentence
225
+
226
+ # Delay in milliseconds before speaking the first sentence. Default: 400.
227
+ sig { returns(T.nilable(Integer)) }
228
+ attr_reader :first_sentence_delay_ms
229
+
230
+ sig { params(first_sentence_delay_ms: Integer).void }
231
+ attr_writer :first_sentence_delay_ms
232
+
233
+ # How the first sentence should be handled. "generated" means the LLM will
234
+ # generate a response based on the first_sentence instruction. "static" means the
235
+ # first_sentence will be spoken exactly as provided. "none" means the agent will
236
+ # not speak first and will wait for the user.
237
+ sig do
238
+ returns(
239
+ T.nilable(
240
+ Revox::CallCreateParams::Assistant::FirstSentenceMode::OrSymbol
241
+ )
242
+ )
243
+ end
244
+ attr_reader :first_sentence_mode
245
+
246
+ sig do
247
+ params(
248
+ first_sentence_mode:
249
+ Revox::CallCreateParams::Assistant::FirstSentenceMode::OrSymbol
250
+ ).void
251
+ end
252
+ attr_writer :first_sentence_mode
253
+
254
+ # Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
255
+ # skip turns to navigate phone menus.
256
+ sig { returns(T.nilable(T::Boolean)) }
257
+ attr_reader :ivr_navigation_enabled
258
+
259
+ sig { params(ivr_navigation_enabled: T::Boolean).void }
260
+ attr_writer :ivr_navigation_enabled
261
+
262
+ sig do
263
+ returns(
264
+ T.nilable(
265
+ T.any(
266
+ Revox::CallCreateParams::Assistant::LlmModel::UnionMember0,
267
+ Revox::CallCreateParams::Assistant::LlmModel::UnionMember1
268
+ )
269
+ )
270
+ )
271
+ end
272
+ attr_reader :llm_model
273
+
274
+ sig do
275
+ params(
276
+ llm_model:
277
+ T.any(
278
+ Revox::CallCreateParams::Assistant::LlmModel::UnionMember0::OrHash,
279
+ Revox::CallCreateParams::Assistant::LlmModel::UnionMember1::OrHash
280
+ )
281
+ ).void
282
+ end
283
+ attr_writer :llm_model
284
+
285
+ # The maximum duration of the call in seconds. This is the maximum time the call
286
+ # will be allowed to run.
287
+ sig { returns(T.nilable(Float)) }
288
+ attr_reader :max_call_duration_secs
289
+
290
+ sig { params(max_call_duration_secs: Float).void }
291
+ attr_writer :max_call_duration_secs
292
+
293
+ # The structured output config to use for the call. This is used to extract the
294
+ # data from the call (like email, name, company name, etc.).
295
+ sig do
296
+ returns(
297
+ T.nilable(
298
+ T::Array[
299
+ Revox::CallCreateParams::Assistant::StructuredOutputConfig
300
+ ]
301
+ )
302
+ )
303
+ end
304
+ attr_reader :structured_output_config
305
+
306
+ sig do
307
+ params(
308
+ structured_output_config:
309
+ T::Array[
310
+ Revox::CallCreateParams::Assistant::StructuredOutputConfig::OrHash
311
+ ]
312
+ ).void
313
+ end
314
+ attr_writer :structured_output_config
315
+
316
+ # Phone number to transfer calls to when users request to speak to a human agent
317
+ # in E.164 format (e.g. +1234567890).
318
+ sig { returns(T.nilable(String)) }
319
+ attr_accessor :transfer_phone_number
320
+
321
+ # The voice to use for the call. You can get the list of voices using the /voices
322
+ # endpoint
323
+ sig { returns(T.nilable(Revox::CallCreateParams::Assistant::Voice)) }
324
+ attr_reader :voice
325
+
326
+ sig do
327
+ params(voice: Revox::CallCreateParams::Assistant::Voice::OrHash).void
328
+ end
329
+ attr_writer :voice
330
+
331
+ # If set, when voicemail is detected the agent will speak this message then hang
332
+ # up; if null, hang up immediately.
333
+ sig { returns(T.nilable(String)) }
334
+ attr_accessor :voicemail_message
335
+
336
+ # The webhook URL to call when the call is completed.
337
+ sig { returns(T.nilable(String)) }
338
+ attr_reader :webhook_url
339
+
340
+ sig { params(webhook_url: String).void }
341
+ attr_writer :webhook_url
342
+
343
+ # You can provide a custom assistant configuration here. If you don't provide an
344
+ # assistant_id, this assistant object will be used for this call.
345
+ sig do
346
+ params(
347
+ prompt: String,
348
+ background_sound:
349
+ T.nilable(
350
+ Revox::CallCreateParams::Assistant::BackgroundSound::OrSymbol
351
+ ),
352
+ calendly:
353
+ T.nilable(Revox::CallCreateParams::Assistant::Calendly::OrHash),
354
+ call_retry_config:
355
+ Revox::CallCreateParams::Assistant::CallRetryConfig::OrHash,
356
+ end_of_call_sentence: String,
357
+ faq_items:
358
+ T::Array[Revox::CallCreateParams::Assistant::FaqItem::OrHash],
359
+ first_sentence: String,
360
+ first_sentence_delay_ms: Integer,
361
+ first_sentence_mode:
362
+ Revox::CallCreateParams::Assistant::FirstSentenceMode::OrSymbol,
363
+ ivr_navigation_enabled: T::Boolean,
364
+ llm_model:
365
+ T.any(
366
+ Revox::CallCreateParams::Assistant::LlmModel::UnionMember0::OrHash,
367
+ Revox::CallCreateParams::Assistant::LlmModel::UnionMember1::OrHash
368
+ ),
369
+ max_call_duration_secs: Float,
370
+ structured_output_config:
371
+ T::Array[
372
+ Revox::CallCreateParams::Assistant::StructuredOutputConfig::OrHash
373
+ ],
374
+ transfer_phone_number: T.nilable(String),
375
+ voice: Revox::CallCreateParams::Assistant::Voice::OrHash,
376
+ voicemail_message: T.nilable(String),
377
+ webhook_url: String
378
+ ).returns(T.attached_class)
379
+ end
380
+ def self.new(
381
+ # The prompt to use for the call. This will be given to the LLM (gpt-4.1)
382
+ prompt:,
383
+ # The background sound to play during the call. Useful to give the impression that
384
+ # your AI agent is in an office, in the street, or anywhere else you want.
385
+ background_sound: nil,
386
+ calendly: nil,
387
+ # Configuration for call retry behavior including time windows, delays, and max
388
+ # iterations. If not provided, defaults will be used.
389
+ call_retry_config: nil,
390
+ # Optional message to say when the agent decides to end the call.
391
+ end_of_call_sentence: nil,
392
+ # FAQ items to associate with this assistant. When provided, replaces all existing
393
+ # FAQ items.
394
+ faq_items: nil,
395
+ # The first sentence to use for the call. This will be given to the LLM
396
+ first_sentence: nil,
397
+ # Delay in milliseconds before speaking the first sentence. Default: 400.
398
+ first_sentence_delay_ms: nil,
399
+ # How the first sentence should be handled. "generated" means the LLM will
400
+ # generate a response based on the first_sentence instruction. "static" means the
401
+ # first_sentence will be spoken exactly as provided. "none" means the agent will
402
+ # not speak first and will wait for the user.
403
+ first_sentence_mode: nil,
404
+ # Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
405
+ # skip turns to navigate phone menus.
406
+ ivr_navigation_enabled: nil,
407
+ llm_model: nil,
408
+ # The maximum duration of the call in seconds. This is the maximum time the call
409
+ # will be allowed to run.
410
+ max_call_duration_secs: nil,
411
+ # The structured output config to use for the call. This is used to extract the
412
+ # data from the call (like email, name, company name, etc.).
413
+ structured_output_config: nil,
414
+ # Phone number to transfer calls to when users request to speak to a human agent
415
+ # in E.164 format (e.g. +1234567890).
416
+ transfer_phone_number: nil,
417
+ # The voice to use for the call. You can get the list of voices using the /voices
418
+ # endpoint
419
+ voice: nil,
420
+ # If set, when voicemail is detected the agent will speak this message then hang
421
+ # up; if null, hang up immediately.
422
+ voicemail_message: nil,
423
+ # The webhook URL to call when the call is completed.
424
+ webhook_url: nil
425
+ )
426
+ end
427
+
428
+ sig do
429
+ override.returns(
430
+ {
431
+ prompt: String,
432
+ background_sound:
433
+ T.nilable(
434
+ Revox::CallCreateParams::Assistant::BackgroundSound::OrSymbol
435
+ ),
436
+ calendly: T.nilable(Revox::CallCreateParams::Assistant::Calendly),
437
+ call_retry_config:
438
+ Revox::CallCreateParams::Assistant::CallRetryConfig,
439
+ end_of_call_sentence: String,
440
+ faq_items: T::Array[Revox::CallCreateParams::Assistant::FaqItem],
441
+ first_sentence: String,
442
+ first_sentence_delay_ms: Integer,
443
+ first_sentence_mode:
444
+ Revox::CallCreateParams::Assistant::FirstSentenceMode::OrSymbol,
445
+ ivr_navigation_enabled: T::Boolean,
446
+ llm_model:
447
+ T.any(
448
+ Revox::CallCreateParams::Assistant::LlmModel::UnionMember0,
449
+ Revox::CallCreateParams::Assistant::LlmModel::UnionMember1
450
+ ),
451
+ max_call_duration_secs: Float,
452
+ structured_output_config:
453
+ T::Array[
454
+ Revox::CallCreateParams::Assistant::StructuredOutputConfig
455
+ ],
456
+ transfer_phone_number: T.nilable(String),
457
+ voice: Revox::CallCreateParams::Assistant::Voice,
458
+ voicemail_message: T.nilable(String),
459
+ webhook_url: String
460
+ }
461
+ )
462
+ end
463
+ def to_hash
464
+ end
465
+
466
+ # The background sound to play during the call. Useful to give the impression that
467
+ # your AI agent is in an office, in the street, or anywhere else you want.
468
+ module BackgroundSound
469
+ extend Revox::Internal::Type::Enum
470
+
471
+ TaggedSymbol =
472
+ T.type_alias do
473
+ T.all(Symbol, Revox::CallCreateParams::Assistant::BackgroundSound)
474
+ end
475
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
476
+
477
+ AUDIO_OFFICE_OGG =
478
+ T.let(
479
+ :"audio/office.ogg",
480
+ Revox::CallCreateParams::Assistant::BackgroundSound::TaggedSymbol
481
+ )
482
+
483
+ sig do
484
+ override.returns(
485
+ T::Array[
486
+ Revox::CallCreateParams::Assistant::BackgroundSound::TaggedSymbol
487
+ ]
488
+ )
489
+ end
490
+ def self.values
491
+ end
492
+ end
493
+
494
+ class Calendly < Revox::Internal::Type::BaseModel
495
+ OrHash =
496
+ T.type_alias do
497
+ T.any(
498
+ Revox::CallCreateParams::Assistant::Calendly,
499
+ Revox::Internal::AnyHash
500
+ )
501
+ end
502
+
503
+ # The connection ID representing the link between your Calendly account and Revox.
504
+ sig { returns(String) }
505
+ attr_accessor :connection_id
506
+
507
+ # The event type ID representing the event type to schedule. (eg:
508
+ # https://api.calendly.com/event_types/b2330295-2a91-4a1d-bb73-99e7707663d5)
509
+ sig { returns(String) }
510
+ attr_accessor :event_type_id
511
+
512
+ sig do
513
+ params(connection_id: String, event_type_id: String).returns(
514
+ T.attached_class
515
+ )
516
+ end
517
+ def self.new(
518
+ # The connection ID representing the link between your Calendly account and Revox.
519
+ connection_id:,
520
+ # The event type ID representing the event type to schedule. (eg:
521
+ # https://api.calendly.com/event_types/b2330295-2a91-4a1d-bb73-99e7707663d5)
522
+ event_type_id:
523
+ )
524
+ end
525
+
526
+ sig do
527
+ override.returns({ connection_id: String, event_type_id: String })
528
+ end
529
+ def to_hash
530
+ end
531
+ end
532
+
533
+ class CallRetryConfig < Revox::Internal::Type::BaseModel
534
+ OrHash =
535
+ T.type_alias do
536
+ T.any(
537
+ Revox::CallCreateParams::Assistant::CallRetryConfig,
538
+ Revox::Internal::AnyHash
539
+ )
540
+ end
541
+
542
+ sig do
543
+ returns(
544
+ T::Array[
545
+ Revox::CallCreateParams::Assistant::CallRetryConfig::CallingWindow
546
+ ]
547
+ )
548
+ end
549
+ attr_accessor :calling_windows
550
+
551
+ # Maximum number of call retry attempts. Default: 3.
552
+ sig { returns(Integer) }
553
+ attr_accessor :max_retry_attempts
554
+
555
+ # Optional IANA timezone identifier to override the automatic timezone detection
556
+ # from phone number. If not provided, timezone is determined from the recipient's
557
+ # phone number country code. Examples: 'America/New_York', 'Europe/Paris'.
558
+ sig { returns(T.nilable(String)) }
559
+ attr_accessor :timezone
560
+
561
+ # Configuration for call retry behavior including time windows, delays, and max
562
+ # iterations. If not provided, defaults will be used.
563
+ sig do
564
+ params(
565
+ calling_windows:
566
+ T::Array[
567
+ Revox::CallCreateParams::Assistant::CallRetryConfig::CallingWindow::OrHash
568
+ ],
569
+ max_retry_attempts: Integer,
570
+ timezone: T.nilable(String)
571
+ ).returns(T.attached_class)
572
+ end
573
+ def self.new(
574
+ calling_windows:,
575
+ # Maximum number of call retry attempts. Default: 3.
576
+ max_retry_attempts:,
577
+ # Optional IANA timezone identifier to override the automatic timezone detection
578
+ # from phone number. If not provided, timezone is determined from the recipient's
579
+ # phone number country code. Examples: 'America/New_York', 'Europe/Paris'.
580
+ timezone: nil
581
+ )
582
+ end
583
+
584
+ sig do
585
+ override.returns(
586
+ {
587
+ calling_windows:
588
+ T::Array[
589
+ Revox::CallCreateParams::Assistant::CallRetryConfig::CallingWindow
590
+ ],
591
+ max_retry_attempts: Integer,
592
+ timezone: T.nilable(String)
593
+ }
594
+ )
595
+ end
596
+ def to_hash
597
+ end
598
+
599
+ class CallingWindow < Revox::Internal::Type::BaseModel
600
+ OrHash =
601
+ T.type_alias do
602
+ T.any(
603
+ Revox::CallCreateParams::Assistant::CallRetryConfig::CallingWindow,
604
+ Revox::Internal::AnyHash
605
+ )
606
+ end
607
+
608
+ # End time for the calling window in the recipient's timezone (or
609
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
610
+ # Examples: '17:00', '6pm'. Default: '18:00'.
611
+ sig { returns(String) }
612
+ attr_accessor :calling_window_end_time
613
+
614
+ # Start time for the calling window in the recipient's timezone (or
615
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
616
+ # Examples: '09:00', '10am'. Default: '10:00'.
617
+ sig { returns(String) }
618
+ attr_accessor :calling_window_start_time
619
+
620
+ # Delay between retry attempts in seconds. Default: 7200 (2 hours).
621
+ sig { returns(Integer) }
622
+ attr_accessor :retry_delay_seconds
623
+
624
+ sig do
625
+ params(
626
+ calling_window_end_time: String,
627
+ calling_window_start_time: String,
628
+ retry_delay_seconds: Integer
629
+ ).returns(T.attached_class)
630
+ end
631
+ def self.new(
632
+ # End time for the calling window in the recipient's timezone (or
633
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
634
+ # Examples: '17:00', '6pm'. Default: '18:00'.
635
+ calling_window_end_time:,
636
+ # Start time for the calling window in the recipient's timezone (or
637
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
638
+ # Examples: '09:00', '10am'. Default: '10:00'.
639
+ calling_window_start_time:,
640
+ # Delay between retry attempts in seconds. Default: 7200 (2 hours).
641
+ retry_delay_seconds:
642
+ )
643
+ end
644
+
645
+ sig do
646
+ override.returns(
647
+ {
648
+ calling_window_end_time: String,
649
+ calling_window_start_time: String,
650
+ retry_delay_seconds: Integer
651
+ }
652
+ )
653
+ end
654
+ def to_hash
655
+ end
656
+ end
657
+ end
658
+
659
+ class FaqItem < Revox::Internal::Type::BaseModel
660
+ OrHash =
661
+ T.type_alias do
662
+ T.any(
663
+ Revox::CallCreateParams::Assistant::FaqItem,
664
+ Revox::Internal::AnyHash
665
+ )
666
+ end
667
+
668
+ sig { returns(String) }
669
+ attr_accessor :answer
670
+
671
+ sig { returns(String) }
672
+ attr_accessor :question
673
+
674
+ sig do
675
+ params(answer: String, question: String).returns(T.attached_class)
676
+ end
677
+ def self.new(answer:, question:)
678
+ end
679
+
680
+ sig { override.returns({ answer: String, question: String }) }
681
+ def to_hash
682
+ end
683
+ end
684
+
685
+ # How the first sentence should be handled. "generated" means the LLM will
686
+ # generate a response based on the first_sentence instruction. "static" means the
687
+ # first_sentence will be spoken exactly as provided. "none" means the agent will
688
+ # not speak first and will wait for the user.
689
+ module FirstSentenceMode
690
+ extend Revox::Internal::Type::Enum
691
+
692
+ TaggedSymbol =
693
+ T.type_alias do
694
+ T.all(
695
+ Symbol,
696
+ Revox::CallCreateParams::Assistant::FirstSentenceMode
697
+ )
698
+ end
699
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
700
+
701
+ GENERATED =
702
+ T.let(
703
+ :generated,
704
+ Revox::CallCreateParams::Assistant::FirstSentenceMode::TaggedSymbol
705
+ )
706
+ STATIC =
707
+ T.let(
708
+ :static,
709
+ Revox::CallCreateParams::Assistant::FirstSentenceMode::TaggedSymbol
710
+ )
711
+ NONE =
712
+ T.let(
713
+ :none,
714
+ Revox::CallCreateParams::Assistant::FirstSentenceMode::TaggedSymbol
715
+ )
716
+
717
+ sig do
718
+ override.returns(
719
+ T::Array[
720
+ Revox::CallCreateParams::Assistant::FirstSentenceMode::TaggedSymbol
721
+ ]
722
+ )
723
+ end
724
+ def self.values
725
+ end
726
+ end
727
+
728
+ module LlmModel
729
+ extend Revox::Internal::Type::Union
730
+
731
+ Variants =
732
+ T.type_alias do
733
+ T.any(
734
+ Revox::CallCreateParams::Assistant::LlmModel::UnionMember0,
735
+ Revox::CallCreateParams::Assistant::LlmModel::UnionMember1
736
+ )
737
+ end
738
+
739
+ class UnionMember0 < Revox::Internal::Type::BaseModel
740
+ OrHash =
741
+ T.type_alias do
742
+ T.any(
743
+ Revox::CallCreateParams::Assistant::LlmModel::UnionMember0,
744
+ Revox::Internal::AnyHash
745
+ )
746
+ end
747
+
748
+ sig do
749
+ returns(
750
+ Revox::CallCreateParams::Assistant::LlmModel::UnionMember0::Name::OrSymbol
751
+ )
752
+ end
753
+ attr_accessor :name
754
+
755
+ sig { returns(Symbol) }
756
+ attr_accessor :type
757
+
758
+ sig do
759
+ params(
760
+ name:
761
+ Revox::CallCreateParams::Assistant::LlmModel::UnionMember0::Name::OrSymbol,
762
+ type: Symbol
763
+ ).returns(T.attached_class)
764
+ end
765
+ def self.new(name:, type: :"dedicated-instance")
766
+ end
767
+
768
+ sig do
769
+ override.returns(
770
+ {
771
+ name:
772
+ Revox::CallCreateParams::Assistant::LlmModel::UnionMember0::Name::OrSymbol,
773
+ type: Symbol
774
+ }
775
+ )
776
+ end
777
+ def to_hash
778
+ end
779
+
780
+ module Name
781
+ extend Revox::Internal::Type::Enum
782
+
783
+ TaggedSymbol =
784
+ T.type_alias do
785
+ T.all(
786
+ Symbol,
787
+ Revox::CallCreateParams::Assistant::LlmModel::UnionMember0::Name
788
+ )
789
+ end
790
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
791
+
792
+ GPT_4_1 =
793
+ T.let(
794
+ :"gpt-4.1",
795
+ Revox::CallCreateParams::Assistant::LlmModel::UnionMember0::Name::TaggedSymbol
796
+ )
797
+ MINISTRAL_3_8B_INSTRUCT =
798
+ T.let(
799
+ :"ministral-3-8b-instruct",
800
+ Revox::CallCreateParams::Assistant::LlmModel::UnionMember0::Name::TaggedSymbol
801
+ )
802
+
803
+ sig do
804
+ override.returns(
805
+ T::Array[
806
+ Revox::CallCreateParams::Assistant::LlmModel::UnionMember0::Name::TaggedSymbol
807
+ ]
808
+ )
809
+ end
810
+ def self.values
811
+ end
812
+ end
813
+ end
814
+
815
+ class UnionMember1 < Revox::Internal::Type::BaseModel
816
+ OrHash =
817
+ T.type_alias do
818
+ T.any(
819
+ Revox::CallCreateParams::Assistant::LlmModel::UnionMember1,
820
+ Revox::Internal::AnyHash
821
+ )
822
+ end
823
+
824
+ # The model ID to use from OpenRouter. eg: openai/gpt-4.1
825
+ sig { returns(String) }
826
+ attr_accessor :openrouter_model_id
827
+
828
+ # The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
829
+ sig { returns(String) }
830
+ attr_accessor :openrouter_provider
831
+
832
+ # Use a model from OpenRouter.
833
+ sig { returns(Symbol) }
834
+ attr_accessor :type
835
+
836
+ sig do
837
+ params(
838
+ openrouter_model_id: String,
839
+ openrouter_provider: String,
840
+ type: Symbol
841
+ ).returns(T.attached_class)
842
+ end
843
+ def self.new(
844
+ # The model ID to use from OpenRouter. eg: openai/gpt-4.1
845
+ openrouter_model_id:,
846
+ # The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
847
+ openrouter_provider:,
848
+ # Use a model from OpenRouter.
849
+ type: :openrouter
850
+ )
851
+ end
852
+
853
+ sig do
854
+ override.returns(
855
+ {
856
+ openrouter_model_id: String,
857
+ openrouter_provider: String,
858
+ type: Symbol
859
+ }
860
+ )
861
+ end
862
+ def to_hash
863
+ end
864
+ end
865
+
866
+ sig do
867
+ override.returns(
868
+ T::Array[Revox::CallCreateParams::Assistant::LlmModel::Variants]
869
+ )
870
+ end
871
+ def self.variants
872
+ end
873
+ end
874
+
875
+ class StructuredOutputConfig < Revox::Internal::Type::BaseModel
876
+ OrHash =
877
+ T.type_alias do
878
+ T.any(
879
+ Revox::CallCreateParams::Assistant::StructuredOutputConfig,
880
+ Revox::Internal::AnyHash
881
+ )
882
+ end
883
+
884
+ sig { returns(String) }
885
+ attr_accessor :name
886
+
887
+ sig { returns(T::Boolean) }
888
+ attr_accessor :required
889
+
890
+ sig do
891
+ returns(
892
+ Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type::OrSymbol
893
+ )
894
+ end
895
+ attr_accessor :type
896
+
897
+ sig { returns(T.nilable(String)) }
898
+ attr_reader :description
899
+
900
+ sig { params(description: String).void }
901
+ attr_writer :description
902
+
903
+ sig { returns(T.nilable(T::Array[String])) }
904
+ attr_reader :enum_options
905
+
906
+ sig { params(enum_options: T::Array[String]).void }
907
+ attr_writer :enum_options
908
+
909
+ sig do
910
+ params(
911
+ name: String,
912
+ required: T::Boolean,
913
+ type:
914
+ Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type::OrSymbol,
915
+ description: String,
916
+ enum_options: T::Array[String]
917
+ ).returns(T.attached_class)
918
+ end
919
+ def self.new(
920
+ name:,
921
+ required:,
922
+ type:,
923
+ description: nil,
924
+ enum_options: nil
925
+ )
926
+ end
927
+
928
+ sig do
929
+ override.returns(
930
+ {
931
+ name: String,
932
+ required: T::Boolean,
933
+ type:
934
+ Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type::OrSymbol,
935
+ description: String,
936
+ enum_options: T::Array[String]
937
+ }
938
+ )
939
+ end
940
+ def to_hash
941
+ end
942
+
943
+ module Type
944
+ extend Revox::Internal::Type::Enum
945
+
946
+ TaggedSymbol =
947
+ T.type_alias do
948
+ T.all(
949
+ Symbol,
950
+ Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type
951
+ )
952
+ end
953
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
954
+
955
+ STRING =
956
+ T.let(
957
+ :string,
958
+ Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type::TaggedSymbol
959
+ )
960
+ NUMBER =
961
+ T.let(
962
+ :number,
963
+ Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type::TaggedSymbol
964
+ )
965
+ BOOLEAN =
966
+ T.let(
967
+ :boolean,
968
+ Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type::TaggedSymbol
969
+ )
970
+ ENUM =
971
+ T.let(
972
+ :enum,
973
+ Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type::TaggedSymbol
974
+ )
975
+ DATE =
976
+ T.let(
977
+ :date,
978
+ Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type::TaggedSymbol
979
+ )
980
+ DATETIME =
981
+ T.let(
982
+ :datetime,
983
+ Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type::TaggedSymbol
984
+ )
985
+
986
+ sig do
987
+ override.returns(
988
+ T::Array[
989
+ Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type::TaggedSymbol
990
+ ]
991
+ )
992
+ end
993
+ def self.values
994
+ end
995
+ end
996
+ end
997
+
998
+ class Voice < Revox::Internal::Type::BaseModel
999
+ OrHash =
1000
+ T.type_alias do
1001
+ T.any(
1002
+ Revox::CallCreateParams::Assistant::Voice,
1003
+ Revox::Internal::AnyHash
1004
+ )
1005
+ end
1006
+
1007
+ # The ID of the voice.
1008
+ sig { returns(String) }
1009
+ attr_accessor :id
1010
+
1011
+ # The provider of the voice.
1012
+ sig do
1013
+ returns(
1014
+ Revox::CallCreateParams::Assistant::Voice::Provider::OrSymbol
1015
+ )
1016
+ end
1017
+ attr_accessor :provider
1018
+
1019
+ # The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
1020
+ # 0.7–1.2. Default is 1.0.
1021
+ sig { returns(T.nilable(Float)) }
1022
+ attr_reader :speed
1023
+
1024
+ sig { params(speed: Float).void }
1025
+ attr_writer :speed
1026
+
1027
+ # The voice to use for the call. You can get the list of voices using the /voices
1028
+ # endpoint
1029
+ sig do
1030
+ params(
1031
+ id: String,
1032
+ provider:
1033
+ Revox::CallCreateParams::Assistant::Voice::Provider::OrSymbol,
1034
+ speed: Float
1035
+ ).returns(T.attached_class)
1036
+ end
1037
+ def self.new(
1038
+ # The ID of the voice.
1039
+ id:,
1040
+ # The provider of the voice.
1041
+ provider:,
1042
+ # The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
1043
+ # 0.7–1.2. Default is 1.0.
1044
+ speed: nil
1045
+ )
1046
+ end
1047
+
1048
+ sig do
1049
+ override.returns(
1050
+ {
1051
+ id: String,
1052
+ provider:
1053
+ Revox::CallCreateParams::Assistant::Voice::Provider::OrSymbol,
1054
+ speed: Float
1055
+ }
1056
+ )
1057
+ end
1058
+ def to_hash
1059
+ end
1060
+
1061
+ # The provider of the voice.
1062
+ module Provider
1063
+ extend Revox::Internal::Type::Enum
1064
+
1065
+ TaggedSymbol =
1066
+ T.type_alias do
1067
+ T.all(
1068
+ Symbol,
1069
+ Revox::CallCreateParams::Assistant::Voice::Provider
1070
+ )
1071
+ end
1072
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1073
+
1074
+ CARTESIA =
1075
+ T.let(
1076
+ :cartesia,
1077
+ Revox::CallCreateParams::Assistant::Voice::Provider::TaggedSymbol
1078
+ )
1079
+ ELEVENLABS =
1080
+ T.let(
1081
+ :elevenlabs,
1082
+ Revox::CallCreateParams::Assistant::Voice::Provider::TaggedSymbol
1083
+ )
1084
+
1085
+ sig do
1086
+ override.returns(
1087
+ T::Array[
1088
+ Revox::CallCreateParams::Assistant::Voice::Provider::TaggedSymbol
1089
+ ]
1090
+ )
1091
+ end
1092
+ def self.values
1093
+ end
1094
+ end
1095
+ end
1096
+ end
1097
+
1098
+ class Concurrency < Revox::Internal::Type::BaseModel
1099
+ OrHash =
1100
+ T.type_alias do
1101
+ T.any(
1102
+ Revox::CallCreateParams::Concurrency,
1103
+ Revox::Internal::AnyHash
1104
+ )
1105
+ end
1106
+
1107
+ # The key for which you want to limit the number of concurrent calls.
1108
+ sig { returns(String) }
1109
+ attr_accessor :key
1110
+
1111
+ # The maximum number of concurrent calls to allow for the given concurrency key.
1112
+ sig { returns(Float) }
1113
+ attr_accessor :max
1114
+
1115
+ # Limit the number of concurrent calls for a given concurrency key.
1116
+ sig { params(key: String, max: Float).returns(T.attached_class) }
1117
+ def self.new(
1118
+ # The key for which you want to limit the number of concurrent calls.
1119
+ key:,
1120
+ # The maximum number of concurrent calls to allow for the given concurrency key.
1121
+ max:
1122
+ )
1123
+ end
1124
+
1125
+ sig { override.returns({ key: String, max: Float }) }
1126
+ def to_hash
1127
+ end
1128
+ end
1129
+
1130
+ # Schedule the call to start at a specific date and time (ISO 8601 format). If not
1131
+ # provided, the call will start immediately.
1132
+ module ScheduledAt
1133
+ extend Revox::Internal::Type::Union
1134
+
1135
+ Variants = T.type_alias { T.any(Time, T.anything) }
1136
+
1137
+ sig do
1138
+ override.returns(
1139
+ T::Array[Revox::CallCreateParams::ScheduledAt::Variants]
1140
+ )
1141
+ end
1142
+ def self.variants
1143
+ end
1144
+ end
1145
+ end
1146
+ end
1147
+ end