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