revox 0.0.2 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/README.md +63 -22
  4. data/lib/revox/client.rb +4 -0
  5. data/lib/revox/internal/type/base_model.rb +3 -3
  6. data/lib/revox/internal/util.rb +31 -0
  7. data/lib/revox/models/assistant_create_params.rb +2 -2
  8. data/lib/revox/models/assistant_delete_params.rb +7 -1
  9. data/lib/revox/models/assistant_retrieve_params.rb +7 -1
  10. data/lib/revox/models/assistant_update_params.rb +10 -3
  11. data/lib/revox/models/call_create_params.rb +2 -2
  12. data/lib/revox/models/call_create_response.rb +720 -12
  13. data/lib/revox/models/call_list_params.rb +30 -7
  14. data/lib/revox/models/call_list_response.rb +63 -1
  15. data/lib/revox/models/call_retrieve_params.rb +7 -1
  16. data/lib/revox/models/call_retrieve_response.rb +723 -12
  17. data/lib/revox/models/campaign_cancel_params.rb +20 -0
  18. data/lib/revox/models/campaign_cancel_response.rb +16 -0
  19. data/lib/revox/models/campaign_create_params.rb +174 -0
  20. data/lib/revox/models/campaign_create_response.rb +775 -0
  21. data/lib/revox/models/campaign_delete_params.rb +20 -0
  22. data/lib/revox/models/campaign_delete_response.rb +16 -0
  23. data/lib/revox/models/campaign_export_rows_params.rb +20 -0
  24. data/lib/revox/models/campaign_export_rows_response.rb +22 -0
  25. data/lib/revox/models/campaign_get_rows_params.rb +65 -0
  26. data/lib/revox/models/campaign_get_rows_response.rb +1468 -0
  27. data/lib/revox/models/campaign_list_params.rb +14 -0
  28. data/lib/revox/models/campaign_list_response.rb +771 -0
  29. data/lib/revox/models/campaign_retrieve_params.rb +20 -0
  30. data/lib/revox/models/campaign_retrieve_response.rb +776 -0
  31. data/lib/revox/models/voice_preview_params.rb +1 -9
  32. data/lib/revox/models/voice_retrieve_params.rb +7 -1
  33. data/lib/revox/models.rb +14 -0
  34. data/lib/revox/resources/assistants.rb +26 -2
  35. data/lib/revox/resources/call.rb +20 -8
  36. data/lib/revox/resources/campaigns.rb +181 -0
  37. data/lib/revox/resources/voices.rb +12 -8
  38. data/lib/revox/version.rb +1 -1
  39. data/lib/revox.rb +15 -0
  40. data/rbi/revox/client.rbi +3 -0
  41. data/rbi/revox/internal/util.rbi +20 -0
  42. data/rbi/revox/models/assistant_create_params.rbi +3 -5
  43. data/rbi/revox/models/assistant_delete_params.rbi +11 -5
  44. data/rbi/revox/models/assistant_retrieve_params.rbi +11 -5
  45. data/rbi/revox/models/assistant_update_params.rbi +9 -5
  46. data/rbi/revox/models/call_create_params.rbi +3 -5
  47. data/rbi/revox/models/call_create_response.rbi +1537 -11
  48. data/rbi/revox/models/call_list_params.rbi +53 -6
  49. data/rbi/revox/models/call_list_response.rbi +162 -0
  50. data/rbi/revox/models/call_retrieve_params.rbi +11 -5
  51. data/rbi/revox/models/call_retrieve_response.rbi +1543 -11
  52. data/rbi/revox/models/campaign_cancel_params.rbi +33 -0
  53. data/rbi/revox/models/campaign_cancel_response.rbi +23 -0
  54. data/rbi/revox/models/campaign_create_params.rbi +297 -0
  55. data/rbi/revox/models/campaign_create_response.rbi +1490 -0
  56. data/rbi/revox/models/campaign_delete_params.rbi +33 -0
  57. data/rbi/revox/models/campaign_delete_response.rbi +23 -0
  58. data/rbi/revox/models/campaign_export_rows_params.rbi +33 -0
  59. data/rbi/revox/models/campaign_export_rows_response.rbi +29 -0
  60. data/rbi/revox/models/campaign_get_rows_params.rbi +113 -0
  61. data/rbi/revox/models/campaign_get_rows_response.rbi +2981 -0
  62. data/rbi/revox/models/campaign_list_params.rbi +27 -0
  63. data/rbi/revox/models/campaign_list_response.rbi +1482 -0
  64. data/rbi/revox/models/campaign_retrieve_params.rbi +33 -0
  65. data/rbi/revox/models/campaign_retrieve_response.rbi +1495 -0
  66. data/rbi/revox/models/voice_preview_params.rbi +0 -11
  67. data/rbi/revox/models/voice_retrieve_params.rbi +6 -1
  68. data/rbi/revox/models.rbi +14 -0
  69. data/rbi/revox/resources/assistants.rbi +21 -2
  70. data/rbi/revox/resources/call.rbi +18 -6
  71. data/rbi/revox/resources/campaigns.rbi +128 -0
  72. data/rbi/revox/resources/voices.rbi +9 -7
  73. data/sig/revox/client.rbs +2 -0
  74. data/sig/revox/internal/util.rbs +10 -0
  75. data/sig/revox/models/assistant_create_params.rbs +8 -4
  76. data/sig/revox/models/assistant_delete_params.rbs +8 -3
  77. data/sig/revox/models/assistant_retrieve_params.rbs +8 -3
  78. data/sig/revox/models/assistant_update_params.rbs +13 -4
  79. data/sig/revox/models/call_create_params.rbs +8 -4
  80. data/sig/revox/models/call_create_response.rbs +615 -8
  81. data/sig/revox/models/call_list_params.rbs +42 -7
  82. data/sig/revox/models/call_list_response.rbs +57 -2
  83. data/sig/revox/models/call_retrieve_params.rbs +9 -3
  84. data/sig/revox/models/call_retrieve_response.rbs +615 -8
  85. data/sig/revox/models/campaign_cancel_params.rbs +20 -0
  86. data/sig/revox/models/campaign_cancel_response.rbs +13 -0
  87. data/sig/revox/models/campaign_create_params.rbs +149 -0
  88. data/sig/revox/models/campaign_create_response.rbs +666 -0
  89. data/sig/revox/models/campaign_delete_params.rbs +20 -0
  90. data/sig/revox/models/campaign_delete_response.rbs +13 -0
  91. data/sig/revox/models/campaign_export_rows_params.rbs +20 -0
  92. data/sig/revox/models/campaign_export_rows_response.rbs +15 -0
  93. data/sig/revox/models/campaign_get_rows_params.rbs +82 -0
  94. data/sig/revox/models/campaign_get_rows_response.rbs +1220 -0
  95. data/sig/revox/models/campaign_list_params.rbs +14 -0
  96. data/sig/revox/models/campaign_list_response.rbs +666 -0
  97. data/sig/revox/models/campaign_retrieve_params.rbs +20 -0
  98. data/sig/revox/models/campaign_retrieve_response.rbs +666 -0
  99. data/sig/revox/models/voice_preview_params.rbs +1 -8
  100. data/sig/revox/models/voice_retrieve_params.rbs +5 -1
  101. data/sig/revox/models.rbs +14 -0
  102. data/sig/revox/resources/assistants.rbs +2 -2
  103. data/sig/revox/resources/call.rbs +3 -2
  104. data/sig/revox/resources/campaigns.rbs +52 -0
  105. data/sig/revox/resources/voices.rbs +0 -1
  106. metadata +47 -2
@@ -13,9 +13,11 @@ module Revox
13
13
  type call =
14
14
  {
15
15
  id: String,
16
+ assistant: Revox::Models::CallRetrieveResponse::Call::Assistant?,
16
17
  call_attempts: ::Array[Revox::Models::CallRetrieveResponse::Call::CallAttempt],
17
18
  call_retry_config: Revox::Models::CallRetrieveResponse::Call::CallRetryConfig?,
18
19
  calls_count: Float,
20
+ campaign: Revox::Models::CallRetrieveResponse::Call::Campaign?,
19
21
  created_at: top,
20
22
  direction: Revox::Models::CallRetrieveResponse::Call::direction,
21
23
  first_sentence_delay_ms: Integer,
@@ -25,20 +27,25 @@ module Revox
25
27
  last_call_attempt: Revox::Models::CallRetrieveResponse::Call::LastCallAttempt?,
26
28
  llm_model: Revox::Models::CallRetrieveResponse::Call::llm_model,
27
29
  metadata: ::Hash[Symbol, String]?,
28
- next_call_at: top,
30
+ organization_id: String,
29
31
  scheduled_at: top,
32
+ status: Revox::Models::CallRetrieveResponse::Call::status,
30
33
  to_phone_number: String
31
34
  }
32
35
 
33
36
  class Call < Revox::Internal::Type::BaseModel
34
37
  attr_accessor id: String
35
38
 
39
+ attr_accessor assistant: Revox::Models::CallRetrieveResponse::Call::Assistant?
40
+
36
41
  attr_accessor call_attempts: ::Array[Revox::Models::CallRetrieveResponse::Call::CallAttempt]
37
42
 
38
43
  attr_accessor call_retry_config: Revox::Models::CallRetrieveResponse::Call::CallRetryConfig?
39
44
 
40
45
  attr_accessor calls_count: Float
41
46
 
47
+ attr_accessor campaign: Revox::Models::CallRetrieveResponse::Call::Campaign?
48
+
42
49
  attr_accessor created_at: top
43
50
 
44
51
  attr_accessor direction: Revox::Models::CallRetrieveResponse::Call::direction
@@ -57,17 +64,21 @@ module Revox
57
64
 
58
65
  attr_accessor metadata: ::Hash[Symbol, String]?
59
66
 
60
- attr_accessor next_call_at: top
67
+ attr_accessor organization_id: String
61
68
 
62
69
  attr_accessor scheduled_at: top
63
70
 
71
+ attr_accessor status: Revox::Models::CallRetrieveResponse::Call::status
72
+
64
73
  attr_accessor to_phone_number: String
65
74
 
66
75
  def initialize: (
67
76
  id: String,
77
+ assistant: Revox::Models::CallRetrieveResponse::Call::Assistant?,
68
78
  call_attempts: ::Array[Revox::Models::CallRetrieveResponse::Call::CallAttempt],
69
79
  call_retry_config: Revox::Models::CallRetrieveResponse::Call::CallRetryConfig?,
70
80
  calls_count: Float,
81
+ campaign: Revox::Models::CallRetrieveResponse::Call::Campaign?,
71
82
  created_at: top,
72
83
  direction: Revox::Models::CallRetrieveResponse::Call::direction,
73
84
  first_sentence_delay_ms: Integer,
@@ -77,16 +88,19 @@ module Revox
77
88
  last_call_attempt: Revox::Models::CallRetrieveResponse::Call::LastCallAttempt?,
78
89
  llm_model: Revox::Models::CallRetrieveResponse::Call::llm_model,
79
90
  metadata: ::Hash[Symbol, String]?,
80
- next_call_at: top,
91
+ organization_id: String,
81
92
  scheduled_at: top,
93
+ status: Revox::Models::CallRetrieveResponse::Call::status,
82
94
  to_phone_number: String
83
95
  ) -> void
84
96
 
85
97
  def to_hash: -> {
86
98
  id: String,
99
+ assistant: Revox::Models::CallRetrieveResponse::Call::Assistant?,
87
100
  call_attempts: ::Array[Revox::Models::CallRetrieveResponse::Call::CallAttempt],
88
101
  call_retry_config: Revox::Models::CallRetrieveResponse::Call::CallRetryConfig?,
89
102
  calls_count: Float,
103
+ campaign: Revox::Models::CallRetrieveResponse::Call::Campaign?,
90
104
  created_at: top,
91
105
  direction: Revox::Models::CallRetrieveResponse::Call::direction,
92
106
  first_sentence_delay_ms: Integer,
@@ -96,21 +110,472 @@ module Revox
96
110
  last_call_attempt: Revox::Models::CallRetrieveResponse::Call::LastCallAttempt?,
97
111
  llm_model: Revox::Models::CallRetrieveResponse::Call::llm_model,
98
112
  metadata: ::Hash[Symbol, String]?,
99
- next_call_at: top,
113
+ organization_id: String,
100
114
  scheduled_at: top,
115
+ status: Revox::Models::CallRetrieveResponse::Call::status,
101
116
  to_phone_number: String
102
117
  }
103
118
 
119
+ type assistant =
120
+ {
121
+ id: String,
122
+ background_sound: Revox::Models::CallRetrieveResponse::Call::Assistant::background_sound?,
123
+ calendly: Revox::Models::CallRetrieveResponse::Call::Assistant::Calendly?,
124
+ call_retry_config: Revox::Models::CallRetrieveResponse::Call::Assistant::CallRetryConfig?,
125
+ created_at: top,
126
+ end_of_call_sentence: String?,
127
+ first_sentence: String?,
128
+ first_sentence_delay_ms: Integer,
129
+ first_sentence_mode: Revox::Models::CallRetrieveResponse::Call::Assistant::first_sentence_mode,
130
+ ivr_navigation_enabled: bool,
131
+ llm_model: Revox::Models::CallRetrieveResponse::Call::Assistant::llm_model,
132
+ max_call_duration_secs: Float,
133
+ name: String,
134
+ organization_id: String,
135
+ prompt: String,
136
+ structured_output_config: ::Array[Revox::Models::CallRetrieveResponse::Call::Assistant::StructuredOutputConfig]?,
137
+ transfer_phone_number: String?,
138
+ updated_at: top,
139
+ voice: Revox::Models::CallRetrieveResponse::Call::Assistant::Voice?,
140
+ voicemail_message: String?,
141
+ webhook_url: String?,
142
+ faq_items: ::Array[Revox::Models::CallRetrieveResponse::Call::Assistant::FaqItem],
143
+ pending_faq_count: Float
144
+ }
145
+
146
+ class Assistant < Revox::Internal::Type::BaseModel
147
+ attr_accessor id: String
148
+
149
+ attr_accessor background_sound: Revox::Models::CallRetrieveResponse::Call::Assistant::background_sound?
150
+
151
+ attr_accessor calendly: Revox::Models::CallRetrieveResponse::Call::Assistant::Calendly?
152
+
153
+ attr_accessor call_retry_config: Revox::Models::CallRetrieveResponse::Call::Assistant::CallRetryConfig?
154
+
155
+ attr_accessor created_at: top
156
+
157
+ attr_accessor end_of_call_sentence: String?
158
+
159
+ attr_accessor first_sentence: String?
160
+
161
+ attr_accessor first_sentence_delay_ms: Integer
162
+
163
+ attr_accessor first_sentence_mode: Revox::Models::CallRetrieveResponse::Call::Assistant::first_sentence_mode
164
+
165
+ attr_accessor ivr_navigation_enabled: bool
166
+
167
+ attr_accessor llm_model: Revox::Models::CallRetrieveResponse::Call::Assistant::llm_model
168
+
169
+ attr_accessor max_call_duration_secs: Float
170
+
171
+ attr_accessor name: String
172
+
173
+ attr_accessor organization_id: String
174
+
175
+ attr_accessor prompt: String
176
+
177
+ attr_accessor structured_output_config: ::Array[Revox::Models::CallRetrieveResponse::Call::Assistant::StructuredOutputConfig]?
178
+
179
+ attr_accessor transfer_phone_number: String?
180
+
181
+ attr_accessor updated_at: top
182
+
183
+ attr_accessor voice: Revox::Models::CallRetrieveResponse::Call::Assistant::Voice?
184
+
185
+ attr_accessor voicemail_message: String?
186
+
187
+ attr_accessor webhook_url: String?
188
+
189
+ attr_reader faq_items: ::Array[Revox::Models::CallRetrieveResponse::Call::Assistant::FaqItem]?
190
+
191
+ def faq_items=: (
192
+ ::Array[Revox::Models::CallRetrieveResponse::Call::Assistant::FaqItem]
193
+ ) -> ::Array[Revox::Models::CallRetrieveResponse::Call::Assistant::FaqItem]
194
+
195
+ attr_reader pending_faq_count: Float?
196
+
197
+ def pending_faq_count=: (Float) -> Float
198
+
199
+ def initialize: (
200
+ id: String,
201
+ background_sound: Revox::Models::CallRetrieveResponse::Call::Assistant::background_sound?,
202
+ calendly: Revox::Models::CallRetrieveResponse::Call::Assistant::Calendly?,
203
+ call_retry_config: Revox::Models::CallRetrieveResponse::Call::Assistant::CallRetryConfig?,
204
+ created_at: top,
205
+ end_of_call_sentence: String?,
206
+ first_sentence: String?,
207
+ first_sentence_delay_ms: Integer,
208
+ first_sentence_mode: Revox::Models::CallRetrieveResponse::Call::Assistant::first_sentence_mode,
209
+ ivr_navigation_enabled: bool,
210
+ llm_model: Revox::Models::CallRetrieveResponse::Call::Assistant::llm_model,
211
+ max_call_duration_secs: Float,
212
+ name: String,
213
+ organization_id: String,
214
+ prompt: String,
215
+ structured_output_config: ::Array[Revox::Models::CallRetrieveResponse::Call::Assistant::StructuredOutputConfig]?,
216
+ transfer_phone_number: String?,
217
+ updated_at: top,
218
+ voice: Revox::Models::CallRetrieveResponse::Call::Assistant::Voice?,
219
+ voicemail_message: String?,
220
+ webhook_url: String?,
221
+ ?faq_items: ::Array[Revox::Models::CallRetrieveResponse::Call::Assistant::FaqItem],
222
+ ?pending_faq_count: Float
223
+ ) -> void
224
+
225
+ def to_hash: -> {
226
+ id: String,
227
+ background_sound: Revox::Models::CallRetrieveResponse::Call::Assistant::background_sound?,
228
+ calendly: Revox::Models::CallRetrieveResponse::Call::Assistant::Calendly?,
229
+ call_retry_config: Revox::Models::CallRetrieveResponse::Call::Assistant::CallRetryConfig?,
230
+ created_at: top,
231
+ end_of_call_sentence: String?,
232
+ first_sentence: String?,
233
+ first_sentence_delay_ms: Integer,
234
+ first_sentence_mode: Revox::Models::CallRetrieveResponse::Call::Assistant::first_sentence_mode,
235
+ ivr_navigation_enabled: bool,
236
+ llm_model: Revox::Models::CallRetrieveResponse::Call::Assistant::llm_model,
237
+ max_call_duration_secs: Float,
238
+ name: String,
239
+ organization_id: String,
240
+ prompt: String,
241
+ structured_output_config: ::Array[Revox::Models::CallRetrieveResponse::Call::Assistant::StructuredOutputConfig]?,
242
+ transfer_phone_number: String?,
243
+ updated_at: top,
244
+ voice: Revox::Models::CallRetrieveResponse::Call::Assistant::Voice?,
245
+ voicemail_message: String?,
246
+ webhook_url: String?,
247
+ faq_items: ::Array[Revox::Models::CallRetrieveResponse::Call::Assistant::FaqItem],
248
+ pending_faq_count: Float
249
+ }
250
+
251
+ type background_sound = :"audio/office.ogg"
252
+
253
+ module BackgroundSound
254
+ extend Revox::Internal::Type::Enum
255
+
256
+ AUDIO_OFFICE_OGG: :"audio/office.ogg"
257
+
258
+ def self?.values: -> ::Array[Revox::Models::CallRetrieveResponse::Call::Assistant::background_sound]
259
+ end
260
+
261
+ type calendly = { connection_id: String, event_type_id: String }
262
+
263
+ class Calendly < Revox::Internal::Type::BaseModel
264
+ attr_accessor connection_id: String
265
+
266
+ attr_accessor event_type_id: String
267
+
268
+ def initialize: (
269
+ connection_id: String,
270
+ event_type_id: String
271
+ ) -> void
272
+
273
+ def to_hash: -> { connection_id: String, event_type_id: String }
274
+ end
275
+
276
+ type call_retry_config =
277
+ {
278
+ calling_windows: ::Array[Revox::Models::CallRetrieveResponse::Call::Assistant::CallRetryConfig::CallingWindow],
279
+ max_retry_attempts: Integer,
280
+ timezone: String?
281
+ }
282
+
283
+ class CallRetryConfig < Revox::Internal::Type::BaseModel
284
+ attr_accessor calling_windows: ::Array[Revox::Models::CallRetrieveResponse::Call::Assistant::CallRetryConfig::CallingWindow]
285
+
286
+ attr_accessor max_retry_attempts: Integer
287
+
288
+ attr_accessor timezone: String?
289
+
290
+ def initialize: (
291
+ calling_windows: ::Array[Revox::Models::CallRetrieveResponse::Call::Assistant::CallRetryConfig::CallingWindow],
292
+ max_retry_attempts: Integer,
293
+ ?timezone: String?
294
+ ) -> void
295
+
296
+ def to_hash: -> {
297
+ calling_windows: ::Array[Revox::Models::CallRetrieveResponse::Call::Assistant::CallRetryConfig::CallingWindow],
298
+ max_retry_attempts: Integer,
299
+ timezone: String?
300
+ }
301
+
302
+ type calling_window =
303
+ {
304
+ calling_window_end_time: String,
305
+ calling_window_start_time: String,
306
+ retry_delay_seconds: Integer
307
+ }
308
+
309
+ class CallingWindow < Revox::Internal::Type::BaseModel
310
+ attr_accessor calling_window_end_time: String
311
+
312
+ attr_accessor calling_window_start_time: String
313
+
314
+ attr_accessor retry_delay_seconds: Integer
315
+
316
+ def initialize: (
317
+ calling_window_end_time: String,
318
+ calling_window_start_time: String,
319
+ retry_delay_seconds: Integer
320
+ ) -> void
321
+
322
+ def to_hash: -> {
323
+ calling_window_end_time: String,
324
+ calling_window_start_time: String,
325
+ retry_delay_seconds: Integer
326
+ }
327
+ end
328
+ end
329
+
330
+ type first_sentence_mode = :generated | :static | :none
331
+
332
+ module FirstSentenceMode
333
+ extend Revox::Internal::Type::Enum
334
+
335
+ GENERATED: :generated
336
+ STATIC: :static
337
+ NONE: :none
338
+
339
+ def self?.values: -> ::Array[Revox::Models::CallRetrieveResponse::Call::Assistant::first_sentence_mode]
340
+ end
341
+
342
+ type llm_model =
343
+ Revox::Models::CallRetrieveResponse::Call::Assistant::LlmModel::UnionMember0
344
+ | Revox::Models::CallRetrieveResponse::Call::Assistant::LlmModel::UnionMember1
345
+
346
+ module LlmModel
347
+ extend Revox::Internal::Type::Union
348
+
349
+ type union_member0 =
350
+ {
351
+ name: Revox::Models::CallRetrieveResponse::Call::Assistant::LlmModel::UnionMember0::name_,
352
+ type: :"dedicated-instance"
353
+ }
354
+
355
+ class UnionMember0 < Revox::Internal::Type::BaseModel
356
+ attr_accessor name: Revox::Models::CallRetrieveResponse::Call::Assistant::LlmModel::UnionMember0::name_
357
+
358
+ attr_accessor type: :"dedicated-instance"
359
+
360
+ def initialize: (
361
+ name: Revox::Models::CallRetrieveResponse::Call::Assistant::LlmModel::UnionMember0::name_,
362
+ ?type: :"dedicated-instance"
363
+ ) -> void
364
+
365
+ def to_hash: -> {
366
+ name: Revox::Models::CallRetrieveResponse::Call::Assistant::LlmModel::UnionMember0::name_,
367
+ type: :"dedicated-instance"
368
+ }
369
+
370
+ type name_ = :"gpt-4.1" | :"ministral-3-8b-instruct"
371
+
372
+ module Name
373
+ extend Revox::Internal::Type::Enum
374
+
375
+ GPT_4_1: :"gpt-4.1"
376
+ MINISTRAL_3_8B_INSTRUCT: :"ministral-3-8b-instruct"
377
+
378
+ def self?.values: -> ::Array[Revox::Models::CallRetrieveResponse::Call::Assistant::LlmModel::UnionMember0::name_]
379
+ end
380
+ end
381
+
382
+ type union_member1 =
383
+ {
384
+ openrouter_model_id: String,
385
+ openrouter_provider: String,
386
+ type: :openrouter
387
+ }
388
+
389
+ class UnionMember1 < Revox::Internal::Type::BaseModel
390
+ attr_accessor openrouter_model_id: String
391
+
392
+ attr_accessor openrouter_provider: String
393
+
394
+ attr_accessor type: :openrouter
395
+
396
+ def initialize: (
397
+ openrouter_model_id: String,
398
+ openrouter_provider: String,
399
+ ?type: :openrouter
400
+ ) -> void
401
+
402
+ def to_hash: -> {
403
+ openrouter_model_id: String,
404
+ openrouter_provider: String,
405
+ type: :openrouter
406
+ }
407
+ end
408
+
409
+ def self?.variants: -> ::Array[Revox::Models::CallRetrieveResponse::Call::Assistant::llm_model]
410
+ end
411
+
412
+ type structured_output_config =
413
+ {
414
+ name: String,
415
+ required: bool,
416
+ type: Revox::Models::CallRetrieveResponse::Call::Assistant::StructuredOutputConfig::type_,
417
+ description: String,
418
+ enum_options: ::Array[String]
419
+ }
420
+
421
+ class StructuredOutputConfig < Revox::Internal::Type::BaseModel
422
+ attr_accessor name: String
423
+
424
+ attr_accessor required: bool
425
+
426
+ attr_accessor type: Revox::Models::CallRetrieveResponse::Call::Assistant::StructuredOutputConfig::type_
427
+
428
+ attr_reader description: String?
429
+
430
+ def description=: (String) -> String
431
+
432
+ attr_reader enum_options: ::Array[String]?
433
+
434
+ def enum_options=: (::Array[String]) -> ::Array[String]
435
+
436
+ def initialize: (
437
+ name: String,
438
+ required: bool,
439
+ type: Revox::Models::CallRetrieveResponse::Call::Assistant::StructuredOutputConfig::type_,
440
+ ?description: String,
441
+ ?enum_options: ::Array[String]
442
+ ) -> void
443
+
444
+ def to_hash: -> {
445
+ name: String,
446
+ required: bool,
447
+ type: Revox::Models::CallRetrieveResponse::Call::Assistant::StructuredOutputConfig::type_,
448
+ description: String,
449
+ enum_options: ::Array[String]
450
+ }
451
+
452
+ type type_ =
453
+ :string | :number | :boolean | :enum | :date | :datetime
454
+
455
+ module Type
456
+ extend Revox::Internal::Type::Enum
457
+
458
+ STRING: :string
459
+ NUMBER: :number
460
+ BOOLEAN: :boolean
461
+ ENUM: :enum
462
+ DATE: :date
463
+ DATETIME: :datetime
464
+
465
+ def self?.values: -> ::Array[Revox::Models::CallRetrieveResponse::Call::Assistant::StructuredOutputConfig::type_]
466
+ end
467
+ end
468
+
469
+ type voice =
470
+ {
471
+ id: String,
472
+ provider: Revox::Models::CallRetrieveResponse::Call::Assistant::Voice::provider,
473
+ speed: Float
474
+ }
475
+
476
+ class Voice < Revox::Internal::Type::BaseModel
477
+ attr_accessor id: String
478
+
479
+ attr_accessor provider: Revox::Models::CallRetrieveResponse::Call::Assistant::Voice::provider
480
+
481
+ attr_reader speed: Float?
482
+
483
+ def speed=: (Float) -> Float
484
+
485
+ def initialize: (
486
+ id: String,
487
+ provider: Revox::Models::CallRetrieveResponse::Call::Assistant::Voice::provider,
488
+ ?speed: Float
489
+ ) -> void
490
+
491
+ def to_hash: -> {
492
+ id: String,
493
+ provider: Revox::Models::CallRetrieveResponse::Call::Assistant::Voice::provider,
494
+ speed: Float
495
+ }
496
+
497
+ type provider = :cartesia | :elevenlabs
498
+
499
+ module Provider
500
+ extend Revox::Internal::Type::Enum
501
+
502
+ CARTESIA: :cartesia
503
+ ELEVENLABS: :elevenlabs
504
+
505
+ def self?.values: -> ::Array[Revox::Models::CallRetrieveResponse::Call::Assistant::Voice::provider]
506
+ end
507
+ end
508
+
509
+ type faq_item =
510
+ {
511
+ answer: String,
512
+ question: String,
513
+ id: String,
514
+ needs_human_answer: bool,
515
+ source: Revox::Models::CallRetrieveResponse::Call::Assistant::FaqItem::source
516
+ }
517
+
518
+ class FaqItem < Revox::Internal::Type::BaseModel
519
+ attr_accessor answer: String
520
+
521
+ attr_accessor question: String
522
+
523
+ attr_reader id: String?
524
+
525
+ def id=: (String) -> String
526
+
527
+ attr_reader needs_human_answer: bool?
528
+
529
+ def needs_human_answer=: (bool) -> bool
530
+
531
+ attr_reader source: Revox::Models::CallRetrieveResponse::Call::Assistant::FaqItem::source?
532
+
533
+ def source=: (
534
+ Revox::Models::CallRetrieveResponse::Call::Assistant::FaqItem::source
535
+ ) -> Revox::Models::CallRetrieveResponse::Call::Assistant::FaqItem::source
536
+
537
+ def initialize: (
538
+ answer: String,
539
+ question: String,
540
+ ?id: String,
541
+ ?needs_human_answer: bool,
542
+ ?source: Revox::Models::CallRetrieveResponse::Call::Assistant::FaqItem::source
543
+ ) -> void
544
+
545
+ def to_hash: -> {
546
+ answer: String,
547
+ question: String,
548
+ id: String,
549
+ needs_human_answer: bool,
550
+ source: Revox::Models::CallRetrieveResponse::Call::Assistant::FaqItem::source
551
+ }
552
+
553
+ type source = :human | :ai
554
+
555
+ module Source
556
+ extend Revox::Internal::Type::Enum
557
+
558
+ HUMAN: :human
559
+ AI: :ai
560
+
561
+ def self?.values: -> ::Array[Revox::Models::CallRetrieveResponse::Call::Assistant::FaqItem::source]
562
+ end
563
+ end
564
+ end
565
+
104
566
  type call_attempt =
105
567
  {
106
568
  id: String,
107
569
  answered_at: top,
570
+ dial_error: Revox::Models::CallRetrieveResponse::Call::CallAttempt::dial_error?,
108
571
  ended_at: top,
109
572
  phone_number: String,
110
573
  recording_url: String?,
111
574
  result: Revox::Models::CallRetrieveResponse::Call::CallAttempt::result?,
112
575
  started_at: top,
113
576
  status: Revox::Models::CallRetrieveResponse::Call::CallAttempt::status,
577
+ end_reason: String?,
578
+ ended_by: Revox::Models::CallRetrieveResponse::Call::CallAttempt::ended_by?,
114
579
  structured_output: ::Hash[Symbol, top]?,
115
580
  transcript: ::Array[Revox::Models::CallRetrieveResponse::Call::CallAttempt::Transcript]?
116
581
  }
@@ -120,6 +585,8 @@ module Revox
120
585
 
121
586
  attr_accessor answered_at: top
122
587
 
588
+ attr_accessor dial_error: Revox::Models::CallRetrieveResponse::Call::CallAttempt::dial_error?
589
+
123
590
  attr_accessor ended_at: top
124
591
 
125
592
  attr_accessor phone_number: String
@@ -132,6 +599,10 @@ module Revox
132
599
 
133
600
  attr_accessor status: Revox::Models::CallRetrieveResponse::Call::CallAttempt::status
134
601
 
602
+ attr_accessor end_reason: String?
603
+
604
+ attr_accessor ended_by: Revox::Models::CallRetrieveResponse::Call::CallAttempt::ended_by?
605
+
135
606
  attr_accessor structured_output: ::Hash[Symbol, top]?
136
607
 
137
608
  attr_accessor transcript: ::Array[Revox::Models::CallRetrieveResponse::Call::CallAttempt::Transcript]?
@@ -139,12 +610,15 @@ module Revox
139
610
  def initialize: (
140
611
  id: String,
141
612
  answered_at: top,
613
+ dial_error: Revox::Models::CallRetrieveResponse::Call::CallAttempt::dial_error?,
142
614
  ended_at: top,
143
615
  phone_number: String,
144
616
  recording_url: String?,
145
617
  result: Revox::Models::CallRetrieveResponse::Call::CallAttempt::result?,
146
618
  started_at: top,
147
619
  status: Revox::Models::CallRetrieveResponse::Call::CallAttempt::status,
620
+ ?end_reason: String?,
621
+ ?ended_by: Revox::Models::CallRetrieveResponse::Call::CallAttempt::ended_by?,
148
622
  ?structured_output: ::Hash[Symbol, top]?,
149
623
  ?transcript: ::Array[Revox::Models::CallRetrieveResponse::Call::CallAttempt::Transcript]?
150
624
  ) -> void
@@ -152,17 +626,46 @@ module Revox
152
626
  def to_hash: -> {
153
627
  id: String,
154
628
  answered_at: top,
629
+ dial_error: Revox::Models::CallRetrieveResponse::Call::CallAttempt::dial_error?,
155
630
  ended_at: top,
156
631
  phone_number: String,
157
632
  recording_url: String?,
158
633
  result: Revox::Models::CallRetrieveResponse::Call::CallAttempt::result?,
159
634
  started_at: top,
160
635
  status: Revox::Models::CallRetrieveResponse::Call::CallAttempt::status,
636
+ end_reason: String?,
637
+ ended_by: Revox::Models::CallRetrieveResponse::Call::CallAttempt::ended_by?,
161
638
  structured_output: ::Hash[Symbol, top]?,
162
639
  transcript: ::Array[Revox::Models::CallRetrieveResponse::Call::CallAttempt::Transcript]?
163
640
  }
164
641
 
165
- type result = :IVR | :voicemail | :human | :unknown
642
+ type dial_error =
643
+ :number_non_attributed
644
+ | :too_many_calls
645
+ | :busy
646
+ | :temporarily_unavailable
647
+ | :no_answer
648
+ | :no_international_permission
649
+ | :precondition_failed
650
+ | :non_classified_error
651
+
652
+ module DialError
653
+ extend Revox::Internal::Type::Enum
654
+
655
+ NUMBER_NON_ATTRIBUTED: :number_non_attributed
656
+ TOO_MANY_CALLS: :too_many_calls
657
+ BUSY: :busy
658
+ TEMPORARILY_UNAVAILABLE: :temporarily_unavailable
659
+ NO_ANSWER: :no_answer
660
+ NO_INTERNATIONAL_PERMISSION: :no_international_permission
661
+ PRECONDITION_FAILED: :precondition_failed
662
+ NON_CLASSIFIED_ERROR: :non_classified_error
663
+
664
+ def self?.values: -> ::Array[Revox::Models::CallRetrieveResponse::Call::CallAttempt::dial_error]
665
+ end
666
+
667
+ type result =
668
+ :IVR | :voicemail | :human | :unknown | :"ios-screening-filter"
166
669
 
167
670
  module Result
168
671
  extend Revox::Internal::Type::Enum
@@ -171,11 +674,12 @@ module Revox
171
674
  VOICEMAIL: :voicemail
172
675
  HUMAN: :human
173
676
  UNKNOWN: :unknown
677
+ IOS_SCREENING_FILTER: :"ios-screening-filter"
174
678
 
175
679
  def self?.values: -> ::Array[Revox::Models::CallRetrieveResponse::Call::CallAttempt::result]
176
680
  end
177
681
 
178
- type status = :queued | :ringing | :ongoing | :completed
682
+ type status = :queued | :ringing | :ongoing | :completed | :error
179
683
 
180
684
  module Status
181
685
  extend Revox::Internal::Type::Enum
@@ -184,10 +688,23 @@ module Revox
184
688
  RINGING: :ringing
185
689
  ONGOING: :ongoing
186
690
  COMPLETED: :completed
691
+ ERROR: :error
187
692
 
188
693
  def self?.values: -> ::Array[Revox::Models::CallRetrieveResponse::Call::CallAttempt::status]
189
694
  end
190
695
 
696
+ type ended_by = :agent | :user | :system
697
+
698
+ module EndedBy
699
+ extend Revox::Internal::Type::Enum
700
+
701
+ AGENT: :agent
702
+ USER: :user
703
+ SYSTEM: :system
704
+
705
+ def self?.values: -> ::Array[Revox::Models::CallRetrieveResponse::Call::CallAttempt::ended_by]
706
+ end
707
+
191
708
  type transcript =
192
709
  {
193
710
  content: String,
@@ -310,6 +827,18 @@ module Revox
310
827
  end
311
828
  end
312
829
 
830
+ type campaign = { id: String, name: String }
831
+
832
+ class Campaign < Revox::Internal::Type::BaseModel
833
+ attr_accessor id: String
834
+
835
+ attr_accessor name: String
836
+
837
+ def initialize: (id: String, name: String) -> void
838
+
839
+ def to_hash: -> { id: String, name: String }
840
+ end
841
+
313
842
  type direction = :inbound | :outbound
314
843
 
315
844
  module Direction
@@ -325,12 +854,15 @@ module Revox
325
854
  {
326
855
  id: String,
327
856
  answered_at: top,
857
+ dial_error: Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::dial_error?,
328
858
  ended_at: top,
329
859
  phone_number: String,
330
860
  recording_url: String?,
331
861
  result: Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::result?,
332
862
  started_at: top,
333
863
  status: Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::status,
864
+ end_reason: String?,
865
+ ended_by: Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::ended_by?,
334
866
  structured_output: ::Hash[Symbol, top]?,
335
867
  transcript: ::Array[Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::Transcript]?
336
868
  }
@@ -340,6 +872,8 @@ module Revox
340
872
 
341
873
  attr_accessor answered_at: top
342
874
 
875
+ attr_accessor dial_error: Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::dial_error?
876
+
343
877
  attr_accessor ended_at: top
344
878
 
345
879
  attr_accessor phone_number: String
@@ -352,6 +886,10 @@ module Revox
352
886
 
353
887
  attr_accessor status: Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::status
354
888
 
889
+ attr_accessor end_reason: String?
890
+
891
+ attr_accessor ended_by: Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::ended_by?
892
+
355
893
  attr_accessor structured_output: ::Hash[Symbol, top]?
356
894
 
357
895
  attr_accessor transcript: ::Array[Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::Transcript]?
@@ -359,12 +897,15 @@ module Revox
359
897
  def initialize: (
360
898
  id: String,
361
899
  answered_at: top,
900
+ dial_error: Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::dial_error?,
362
901
  ended_at: top,
363
902
  phone_number: String,
364
903
  recording_url: String?,
365
904
  result: Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::result?,
366
905
  started_at: top,
367
906
  status: Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::status,
907
+ ?end_reason: String?,
908
+ ?ended_by: Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::ended_by?,
368
909
  ?structured_output: ::Hash[Symbol, top]?,
369
910
  ?transcript: ::Array[Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::Transcript]?
370
911
  ) -> void
@@ -372,17 +913,46 @@ module Revox
372
913
  def to_hash: -> {
373
914
  id: String,
374
915
  answered_at: top,
916
+ dial_error: Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::dial_error?,
375
917
  ended_at: top,
376
918
  phone_number: String,
377
919
  recording_url: String?,
378
920
  result: Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::result?,
379
921
  started_at: top,
380
922
  status: Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::status,
923
+ end_reason: String?,
924
+ ended_by: Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::ended_by?,
381
925
  structured_output: ::Hash[Symbol, top]?,
382
926
  transcript: ::Array[Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::Transcript]?
383
927
  }
384
928
 
385
- type result = :IVR | :voicemail | :human | :unknown
929
+ type dial_error =
930
+ :number_non_attributed
931
+ | :too_many_calls
932
+ | :busy
933
+ | :temporarily_unavailable
934
+ | :no_answer
935
+ | :no_international_permission
936
+ | :precondition_failed
937
+ | :non_classified_error
938
+
939
+ module DialError
940
+ extend Revox::Internal::Type::Enum
941
+
942
+ NUMBER_NON_ATTRIBUTED: :number_non_attributed
943
+ TOO_MANY_CALLS: :too_many_calls
944
+ BUSY: :busy
945
+ TEMPORARILY_UNAVAILABLE: :temporarily_unavailable
946
+ NO_ANSWER: :no_answer
947
+ NO_INTERNATIONAL_PERMISSION: :no_international_permission
948
+ PRECONDITION_FAILED: :precondition_failed
949
+ NON_CLASSIFIED_ERROR: :non_classified_error
950
+
951
+ def self?.values: -> ::Array[Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::dial_error]
952
+ end
953
+
954
+ type result =
955
+ :IVR | :voicemail | :human | :unknown | :"ios-screening-filter"
386
956
 
387
957
  module Result
388
958
  extend Revox::Internal::Type::Enum
@@ -391,11 +961,12 @@ module Revox
391
961
  VOICEMAIL: :voicemail
392
962
  HUMAN: :human
393
963
  UNKNOWN: :unknown
964
+ IOS_SCREENING_FILTER: :"ios-screening-filter"
394
965
 
395
966
  def self?.values: -> ::Array[Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::result]
396
967
  end
397
968
 
398
- type status = :queued | :ringing | :ongoing | :completed
969
+ type status = :queued | :ringing | :ongoing | :completed | :error
399
970
 
400
971
  module Status
401
972
  extend Revox::Internal::Type::Enum
@@ -404,10 +975,23 @@ module Revox
404
975
  RINGING: :ringing
405
976
  ONGOING: :ongoing
406
977
  COMPLETED: :completed
978
+ ERROR: :error
407
979
 
408
980
  def self?.values: -> ::Array[Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::status]
409
981
  end
410
982
 
983
+ type ended_by = :agent | :user | :system
984
+
985
+ module EndedBy
986
+ extend Revox::Internal::Type::Enum
987
+
988
+ AGENT: :agent
989
+ USER: :user
990
+ SYSTEM: :system
991
+
992
+ def self?.values: -> ::Array[Revox::Models::CallRetrieveResponse::Call::LastCallAttempt::ended_by]
993
+ end
994
+
411
995
  type transcript =
412
996
  {
413
997
  content: String,
@@ -545,6 +1129,29 @@ module Revox
545
1129
 
546
1130
  def self?.variants: -> ::Array[Revox::Models::CallRetrieveResponse::Call::llm_model]
547
1131
  end
1132
+
1133
+ type status =
1134
+ :initializing
1135
+ | :queued_for_calling
1136
+ | :calling
1137
+ | :scheduled
1138
+ | :completed
1139
+ | :cancelled
1140
+ | :errored
1141
+
1142
+ module Status
1143
+ extend Revox::Internal::Type::Enum
1144
+
1145
+ INITIALIZING: :initializing
1146
+ QUEUED_FOR_CALLING: :queued_for_calling
1147
+ CALLING: :calling
1148
+ SCHEDULED: :scheduled
1149
+ COMPLETED: :completed
1150
+ CANCELLED: :cancelled
1151
+ ERRORED: :errored
1152
+
1153
+ def self?.values: -> ::Array[Revox::Models::CallRetrieveResponse::Call::status]
1154
+ end
548
1155
  end
549
1156
  end
550
1157
  end