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