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
@@ -0,0 +1,2981 @@
1
+ # typed: strong
2
+
3
+ module Revox
4
+ module Models
5
+ class CampaignGetRowsResponse < Revox::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Revox::Models::CampaignGetRowsResponse,
10
+ Revox::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ sig { returns(Float) }
15
+ attr_accessor :page
16
+
17
+ sig { returns(Float) }
18
+ attr_accessor :page_size
19
+
20
+ sig { returns(T::Array[Revox::Models::CampaignGetRowsResponse::Row]) }
21
+ attr_accessor :rows
22
+
23
+ sig { returns(Float) }
24
+ attr_accessor :total
25
+
26
+ sig do
27
+ params(
28
+ page: Float,
29
+ page_size: Float,
30
+ rows: T::Array[Revox::Models::CampaignGetRowsResponse::Row::OrHash],
31
+ total: Float
32
+ ).returns(T.attached_class)
33
+ end
34
+ def self.new(page:, page_size:, rows:, total:)
35
+ end
36
+
37
+ sig do
38
+ override.returns(
39
+ {
40
+ page: Float,
41
+ page_size: Float,
42
+ rows: T::Array[Revox::Models::CampaignGetRowsResponse::Row],
43
+ total: Float
44
+ }
45
+ )
46
+ end
47
+ def to_hash
48
+ end
49
+
50
+ class Row < Revox::Internal::Type::BaseModel
51
+ OrHash =
52
+ T.type_alias do
53
+ T.any(
54
+ Revox::Models::CampaignGetRowsResponse::Row,
55
+ Revox::Internal::AnyHash
56
+ )
57
+ end
58
+
59
+ sig { returns(String) }
60
+ attr_accessor :id
61
+
62
+ sig { returns(T::Hash[Symbol, String]) }
63
+ attr_accessor :input_data
64
+
65
+ sig { returns(String) }
66
+ attr_accessor :phone_number
67
+
68
+ sig { returns(Float) }
69
+ attr_accessor :row_index
70
+
71
+ # This represent a call "order" that was requested by the user. A call order can
72
+ # be resolved over multiple call attempts spanning up to a few days.
73
+ sig do
74
+ returns(T.nilable(Revox::Models::CampaignGetRowsResponse::Row::Call))
75
+ end
76
+ attr_reader :call
77
+
78
+ sig do
79
+ params(
80
+ call: Revox::Models::CampaignGetRowsResponse::Row::Call::OrHash
81
+ ).void
82
+ end
83
+ attr_writer :call
84
+
85
+ sig do
86
+ params(
87
+ id: String,
88
+ input_data: T::Hash[Symbol, String],
89
+ phone_number: String,
90
+ row_index: Float,
91
+ call: Revox::Models::CampaignGetRowsResponse::Row::Call::OrHash
92
+ ).returns(T.attached_class)
93
+ end
94
+ def self.new(
95
+ id:,
96
+ input_data:,
97
+ phone_number:,
98
+ row_index:,
99
+ # This represent a call "order" that was requested by the user. A call order can
100
+ # be resolved over multiple call attempts spanning up to a few days.
101
+ call: nil
102
+ )
103
+ end
104
+
105
+ sig do
106
+ override.returns(
107
+ {
108
+ id: String,
109
+ input_data: T::Hash[Symbol, String],
110
+ phone_number: String,
111
+ row_index: Float,
112
+ call: Revox::Models::CampaignGetRowsResponse::Row::Call
113
+ }
114
+ )
115
+ end
116
+ def to_hash
117
+ end
118
+
119
+ class Call < Revox::Internal::Type::BaseModel
120
+ OrHash =
121
+ T.type_alias do
122
+ T.any(
123
+ Revox::Models::CampaignGetRowsResponse::Row::Call,
124
+ Revox::Internal::AnyHash
125
+ )
126
+ end
127
+
128
+ # The ID of the call.
129
+ sig { returns(String) }
130
+ attr_accessor :id
131
+
132
+ sig do
133
+ returns(
134
+ T.nilable(
135
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant
136
+ )
137
+ )
138
+ end
139
+ attr_reader :assistant
140
+
141
+ sig do
142
+ params(
143
+ assistant:
144
+ T.nilable(
145
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::OrHash
146
+ )
147
+ ).void
148
+ end
149
+ attr_writer :assistant
150
+
151
+ # All call attempts for this call order, ordered by most recent first.
152
+ sig do
153
+ returns(
154
+ T::Array[
155
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt
156
+ ]
157
+ )
158
+ end
159
+ attr_accessor :call_attempts
160
+
161
+ # Configuration for call retry behavior including time windows, delays, and max
162
+ # iterations. If not provided, defaults will be used.
163
+ sig do
164
+ returns(
165
+ T.nilable(
166
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallRetryConfig
167
+ )
168
+ )
169
+ end
170
+ attr_reader :call_retry_config
171
+
172
+ sig do
173
+ params(
174
+ call_retry_config:
175
+ T.nilable(
176
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallRetryConfig::OrHash
177
+ )
178
+ ).void
179
+ end
180
+ attr_writer :call_retry_config
181
+
182
+ # The number of call attempts made.
183
+ sig { returns(Float) }
184
+ attr_accessor :calls_count
185
+
186
+ sig do
187
+ returns(
188
+ T.nilable(
189
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Campaign
190
+ )
191
+ )
192
+ end
193
+ attr_reader :campaign
194
+
195
+ sig do
196
+ params(
197
+ campaign:
198
+ T.nilable(
199
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Campaign::OrHash
200
+ )
201
+ ).void
202
+ end
203
+ attr_writer :campaign
204
+
205
+ # The time the call order was created.
206
+ sig { returns(T.anything) }
207
+ attr_accessor :created_at
208
+
209
+ # Whether the call is inbound or outbound.
210
+ sig do
211
+ returns(
212
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Direction::TaggedSymbol
213
+ )
214
+ end
215
+ attr_accessor :direction
216
+
217
+ # Delay in milliseconds before speaking the first sentence. Default: 400.
218
+ sig { returns(Integer) }
219
+ attr_accessor :first_sentence_delay_ms
220
+
221
+ # The phone number that made the call. Formatted in E.164 format. Example:
222
+ # +1234567890
223
+ sig { returns(String) }
224
+ attr_accessor :from_phone_number
225
+
226
+ # DEPRECATED: Whether the call has been cancelled. This is derived from `status`.
227
+ # Use `status` instead.
228
+ sig { returns(T::Boolean) }
229
+ attr_accessor :is_cancelled
230
+
231
+ # DEPRECATED: Whether the call has completed. This is derived from `status`. Use
232
+ # `status` instead.
233
+ sig { returns(T::Boolean) }
234
+ attr_accessor :is_completed
235
+
236
+ # This represent a single call attempt. A call attempt is a single call made to
237
+ # the phone number.
238
+ sig do
239
+ returns(
240
+ T.nilable(
241
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt
242
+ )
243
+ )
244
+ end
245
+ attr_reader :last_call_attempt
246
+
247
+ sig do
248
+ params(
249
+ last_call_attempt:
250
+ T.nilable(
251
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::OrHash
252
+ )
253
+ ).void
254
+ end
255
+ attr_writer :last_call_attempt
256
+
257
+ sig do
258
+ returns(
259
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LlmModel::Variants
260
+ )
261
+ end
262
+ attr_accessor :llm_model
263
+
264
+ # Metadata stored with the call.
265
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
266
+ attr_accessor :metadata
267
+
268
+ # The ID of the organization that owns the call.
269
+ sig { returns(String) }
270
+ attr_accessor :organization_id
271
+
272
+ # The time the call order is scheduled to start.
273
+ sig { returns(T.anything) }
274
+ attr_accessor :scheduled_at
275
+
276
+ # The status of the call.
277
+ sig do
278
+ returns(
279
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Status::TaggedSymbol
280
+ )
281
+ end
282
+ attr_accessor :status
283
+
284
+ # The phone number that received the call. Formatted in E.164 format. Example:
285
+ # +1234567890
286
+ sig { returns(String) }
287
+ attr_accessor :to_phone_number
288
+
289
+ # This represent a call "order" that was requested by the user. A call order can
290
+ # be resolved over multiple call attempts spanning up to a few days.
291
+ sig do
292
+ params(
293
+ id: String,
294
+ assistant:
295
+ T.nilable(
296
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::OrHash
297
+ ),
298
+ call_attempts:
299
+ T::Array[
300
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::OrHash
301
+ ],
302
+ call_retry_config:
303
+ T.nilable(
304
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallRetryConfig::OrHash
305
+ ),
306
+ calls_count: Float,
307
+ campaign:
308
+ T.nilable(
309
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Campaign::OrHash
310
+ ),
311
+ created_at: T.anything,
312
+ direction:
313
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Direction::OrSymbol,
314
+ first_sentence_delay_ms: Integer,
315
+ from_phone_number: String,
316
+ is_cancelled: T::Boolean,
317
+ is_completed: T::Boolean,
318
+ last_call_attempt:
319
+ T.nilable(
320
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::OrHash
321
+ ),
322
+ llm_model:
323
+ T.any(
324
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LlmModel::UnionMember0::OrHash,
325
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LlmModel::UnionMember1::OrHash
326
+ ),
327
+ metadata: T.nilable(T::Hash[Symbol, String]),
328
+ organization_id: String,
329
+ scheduled_at: T.anything,
330
+ status:
331
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Status::OrSymbol,
332
+ to_phone_number: String
333
+ ).returns(T.attached_class)
334
+ end
335
+ def self.new(
336
+ # The ID of the call.
337
+ id:,
338
+ assistant:,
339
+ # All call attempts for this call order, ordered by most recent first.
340
+ call_attempts:,
341
+ # Configuration for call retry behavior including time windows, delays, and max
342
+ # iterations. If not provided, defaults will be used.
343
+ call_retry_config:,
344
+ # The number of call attempts made.
345
+ calls_count:,
346
+ campaign:,
347
+ # The time the call order was created.
348
+ created_at:,
349
+ # Whether the call is inbound or outbound.
350
+ direction:,
351
+ # Delay in milliseconds before speaking the first sentence. Default: 400.
352
+ first_sentence_delay_ms:,
353
+ # The phone number that made the call. Formatted in E.164 format. Example:
354
+ # +1234567890
355
+ from_phone_number:,
356
+ # DEPRECATED: Whether the call has been cancelled. This is derived from `status`.
357
+ # Use `status` instead.
358
+ is_cancelled:,
359
+ # DEPRECATED: Whether the call has completed. This is derived from `status`. Use
360
+ # `status` instead.
361
+ is_completed:,
362
+ # This represent a single call attempt. A call attempt is a single call made to
363
+ # the phone number.
364
+ last_call_attempt:,
365
+ llm_model:,
366
+ # Metadata stored with the call.
367
+ metadata:,
368
+ # The ID of the organization that owns the call.
369
+ organization_id:,
370
+ # The time the call order is scheduled to start.
371
+ scheduled_at:,
372
+ # The status of the call.
373
+ status:,
374
+ # The phone number that received the call. Formatted in E.164 format. Example:
375
+ # +1234567890
376
+ to_phone_number:
377
+ )
378
+ end
379
+
380
+ sig do
381
+ override.returns(
382
+ {
383
+ id: String,
384
+ assistant:
385
+ T.nilable(
386
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant
387
+ ),
388
+ call_attempts:
389
+ T::Array[
390
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt
391
+ ],
392
+ call_retry_config:
393
+ T.nilable(
394
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallRetryConfig
395
+ ),
396
+ calls_count: Float,
397
+ campaign:
398
+ T.nilable(
399
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Campaign
400
+ ),
401
+ created_at: T.anything,
402
+ direction:
403
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Direction::TaggedSymbol,
404
+ first_sentence_delay_ms: Integer,
405
+ from_phone_number: String,
406
+ is_cancelled: T::Boolean,
407
+ is_completed: T::Boolean,
408
+ last_call_attempt:
409
+ T.nilable(
410
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt
411
+ ),
412
+ llm_model:
413
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LlmModel::Variants,
414
+ metadata: T.nilable(T::Hash[Symbol, String]),
415
+ organization_id: String,
416
+ scheduled_at: T.anything,
417
+ status:
418
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Status::TaggedSymbol,
419
+ to_phone_number: String
420
+ }
421
+ )
422
+ end
423
+ def to_hash
424
+ end
425
+
426
+ class Assistant < Revox::Internal::Type::BaseModel
427
+ OrHash =
428
+ T.type_alias do
429
+ T.any(
430
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant,
431
+ Revox::Internal::AnyHash
432
+ )
433
+ end
434
+
435
+ sig { returns(String) }
436
+ attr_accessor :id
437
+
438
+ # The background sound to play during the call. Useful to give the impression that
439
+ # your AI agent is in an office.
440
+ sig do
441
+ returns(
442
+ T.nilable(
443
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::BackgroundSound::TaggedSymbol
444
+ )
445
+ )
446
+ end
447
+ attr_accessor :background_sound
448
+
449
+ sig do
450
+ returns(
451
+ T.nilable(
452
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Calendly
453
+ )
454
+ )
455
+ end
456
+ attr_reader :calendly
457
+
458
+ sig do
459
+ params(
460
+ calendly:
461
+ T.nilable(
462
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Calendly::OrHash
463
+ )
464
+ ).void
465
+ end
466
+ attr_writer :calendly
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
+ returns(
472
+ T.nilable(
473
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::CallRetryConfig
474
+ )
475
+ )
476
+ end
477
+ attr_reader :call_retry_config
478
+
479
+ sig do
480
+ params(
481
+ call_retry_config:
482
+ T.nilable(
483
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::CallRetryConfig::OrHash
484
+ )
485
+ ).void
486
+ end
487
+ attr_writer :call_retry_config
488
+
489
+ sig { returns(T.anything) }
490
+ attr_accessor :created_at
491
+
492
+ sig { returns(T.nilable(String)) }
493
+ attr_accessor :end_of_call_sentence
494
+
495
+ sig { returns(T.nilable(String)) }
496
+ attr_accessor :first_sentence
497
+
498
+ # Delay in milliseconds before speaking the first sentence. Default: 400.
499
+ sig { returns(Integer) }
500
+ attr_accessor :first_sentence_delay_ms
501
+
502
+ sig do
503
+ returns(
504
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FirstSentenceMode::TaggedSymbol
505
+ )
506
+ end
507
+ attr_accessor :first_sentence_mode
508
+
509
+ # Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
510
+ # skip turns to navigate phone menus.
511
+ sig { returns(T::Boolean) }
512
+ attr_accessor :ivr_navigation_enabled
513
+
514
+ sig do
515
+ returns(
516
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::LlmModel::Variants
517
+ )
518
+ end
519
+ attr_accessor :llm_model
520
+
521
+ # The maximum duration of the call in seconds. This is the maximum time the call
522
+ # will be allowed to run.
523
+ sig { returns(Float) }
524
+ attr_accessor :max_call_duration_secs
525
+
526
+ sig { returns(String) }
527
+ attr_accessor :name
528
+
529
+ sig { returns(String) }
530
+ attr_accessor :organization_id
531
+
532
+ sig { returns(String) }
533
+ attr_accessor :prompt
534
+
535
+ # The structured output config to use for the call. This is used to extract the
536
+ # data from the call (like email, name, company name, etc.).
537
+ sig do
538
+ returns(
539
+ T.nilable(
540
+ T::Array[
541
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::StructuredOutputConfig
542
+ ]
543
+ )
544
+ )
545
+ end
546
+ attr_accessor :structured_output_config
547
+
548
+ # Phone number to transfer calls to when users request to speak to a human agent.
549
+ sig { returns(T.nilable(String)) }
550
+ attr_accessor :transfer_phone_number
551
+
552
+ sig { returns(T.anything) }
553
+ attr_accessor :updated_at
554
+
555
+ sig do
556
+ returns(
557
+ T.nilable(
558
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Voice
559
+ )
560
+ )
561
+ end
562
+ attr_reader :voice
563
+
564
+ sig do
565
+ params(
566
+ voice:
567
+ T.nilable(
568
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Voice::OrHash
569
+ )
570
+ ).void
571
+ end
572
+ attr_writer :voice
573
+
574
+ # If set, when voicemail is detected the agent will speak this message then hang
575
+ # up; if null, hang up immediately.
576
+ sig { returns(T.nilable(String)) }
577
+ attr_accessor :voicemail_message
578
+
579
+ # The webhook URL to call when the call is completed.
580
+ sig { returns(T.nilable(String)) }
581
+ attr_accessor :webhook_url
582
+
583
+ sig do
584
+ returns(
585
+ T.nilable(
586
+ T::Array[
587
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FaqItem
588
+ ]
589
+ )
590
+ )
591
+ end
592
+ attr_reader :faq_items
593
+
594
+ sig do
595
+ params(
596
+ faq_items:
597
+ T::Array[
598
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FaqItem::OrHash
599
+ ]
600
+ ).void
601
+ end
602
+ attr_writer :faq_items
603
+
604
+ sig { returns(T.nilable(Float)) }
605
+ attr_reader :pending_faq_count
606
+
607
+ sig { params(pending_faq_count: Float).void }
608
+ attr_writer :pending_faq_count
609
+
610
+ sig do
611
+ params(
612
+ id: String,
613
+ background_sound:
614
+ T.nilable(
615
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::BackgroundSound::OrSymbol
616
+ ),
617
+ calendly:
618
+ T.nilable(
619
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Calendly::OrHash
620
+ ),
621
+ call_retry_config:
622
+ T.nilable(
623
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::CallRetryConfig::OrHash
624
+ ),
625
+ created_at: T.anything,
626
+ end_of_call_sentence: T.nilable(String),
627
+ first_sentence: T.nilable(String),
628
+ first_sentence_delay_ms: Integer,
629
+ first_sentence_mode:
630
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FirstSentenceMode::OrSymbol,
631
+ ivr_navigation_enabled: T::Boolean,
632
+ llm_model:
633
+ T.any(
634
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::LlmModel::UnionMember0::OrHash,
635
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::LlmModel::UnionMember1::OrHash
636
+ ),
637
+ max_call_duration_secs: Float,
638
+ name: String,
639
+ organization_id: String,
640
+ prompt: String,
641
+ structured_output_config:
642
+ T.nilable(
643
+ T::Array[
644
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::StructuredOutputConfig::OrHash
645
+ ]
646
+ ),
647
+ transfer_phone_number: T.nilable(String),
648
+ updated_at: T.anything,
649
+ voice:
650
+ T.nilable(
651
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Voice::OrHash
652
+ ),
653
+ voicemail_message: T.nilable(String),
654
+ webhook_url: T.nilable(String),
655
+ faq_items:
656
+ T::Array[
657
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FaqItem::OrHash
658
+ ],
659
+ pending_faq_count: Float
660
+ ).returns(T.attached_class)
661
+ end
662
+ def self.new(
663
+ id:,
664
+ # The background sound to play during the call. Useful to give the impression that
665
+ # your AI agent is in an office.
666
+ background_sound:,
667
+ calendly:,
668
+ # Configuration for call retry behavior including time windows, delays, and max
669
+ # iterations. If not provided, defaults will be used.
670
+ call_retry_config:,
671
+ created_at:,
672
+ end_of_call_sentence:,
673
+ first_sentence:,
674
+ # Delay in milliseconds before speaking the first sentence. Default: 400.
675
+ first_sentence_delay_ms:,
676
+ first_sentence_mode:,
677
+ # Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
678
+ # skip turns to navigate phone menus.
679
+ ivr_navigation_enabled:,
680
+ llm_model:,
681
+ # The maximum duration of the call in seconds. This is the maximum time the call
682
+ # will be allowed to run.
683
+ max_call_duration_secs:,
684
+ name:,
685
+ organization_id:,
686
+ prompt:,
687
+ # The structured output config to use for the call. This is used to extract the
688
+ # data from the call (like email, name, company name, etc.).
689
+ structured_output_config:,
690
+ # Phone number to transfer calls to when users request to speak to a human agent.
691
+ transfer_phone_number:,
692
+ updated_at:,
693
+ voice:,
694
+ # If set, when voicemail is detected the agent will speak this message then hang
695
+ # up; if null, hang up immediately.
696
+ voicemail_message:,
697
+ # The webhook URL to call when the call is completed.
698
+ webhook_url:,
699
+ faq_items: nil,
700
+ pending_faq_count: nil
701
+ )
702
+ end
703
+
704
+ sig do
705
+ override.returns(
706
+ {
707
+ id: String,
708
+ background_sound:
709
+ T.nilable(
710
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::BackgroundSound::TaggedSymbol
711
+ ),
712
+ calendly:
713
+ T.nilable(
714
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Calendly
715
+ ),
716
+ call_retry_config:
717
+ T.nilable(
718
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::CallRetryConfig
719
+ ),
720
+ created_at: T.anything,
721
+ end_of_call_sentence: T.nilable(String),
722
+ first_sentence: T.nilable(String),
723
+ first_sentence_delay_ms: Integer,
724
+ first_sentence_mode:
725
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FirstSentenceMode::TaggedSymbol,
726
+ ivr_navigation_enabled: T::Boolean,
727
+ llm_model:
728
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::LlmModel::Variants,
729
+ max_call_duration_secs: Float,
730
+ name: String,
731
+ organization_id: String,
732
+ prompt: String,
733
+ structured_output_config:
734
+ T.nilable(
735
+ T::Array[
736
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::StructuredOutputConfig
737
+ ]
738
+ ),
739
+ transfer_phone_number: T.nilable(String),
740
+ updated_at: T.anything,
741
+ voice:
742
+ T.nilable(
743
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Voice
744
+ ),
745
+ voicemail_message: T.nilable(String),
746
+ webhook_url: T.nilable(String),
747
+ faq_items:
748
+ T::Array[
749
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FaqItem
750
+ ],
751
+ pending_faq_count: Float
752
+ }
753
+ )
754
+ end
755
+ def to_hash
756
+ end
757
+
758
+ # The background sound to play during the call. Useful to give the impression that
759
+ # your AI agent is in an office.
760
+ module BackgroundSound
761
+ extend Revox::Internal::Type::Enum
762
+
763
+ TaggedSymbol =
764
+ T.type_alias do
765
+ T.all(
766
+ Symbol,
767
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::BackgroundSound
768
+ )
769
+ end
770
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
771
+
772
+ AUDIO_OFFICE_OGG =
773
+ T.let(
774
+ :"audio/office.ogg",
775
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::BackgroundSound::TaggedSymbol
776
+ )
777
+
778
+ sig do
779
+ override.returns(
780
+ T::Array[
781
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::BackgroundSound::TaggedSymbol
782
+ ]
783
+ )
784
+ end
785
+ def self.values
786
+ end
787
+ end
788
+
789
+ class Calendly < Revox::Internal::Type::BaseModel
790
+ OrHash =
791
+ T.type_alias do
792
+ T.any(
793
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Calendly,
794
+ Revox::Internal::AnyHash
795
+ )
796
+ end
797
+
798
+ # The connection ID representing the link between your Calendly account and Revox.
799
+ sig { returns(String) }
800
+ attr_accessor :connection_id
801
+
802
+ # The event type ID representing the event type to schedule. (eg:
803
+ # https://api.calendly.com/event_types/b2330295-2a91-4a1d-bb73-99e7707663d5)
804
+ sig { returns(String) }
805
+ attr_accessor :event_type_id
806
+
807
+ sig do
808
+ params(connection_id: String, event_type_id: String).returns(
809
+ T.attached_class
810
+ )
811
+ end
812
+ def self.new(
813
+ # The connection ID representing the link between your Calendly account and Revox.
814
+ connection_id:,
815
+ # The event type ID representing the event type to schedule. (eg:
816
+ # https://api.calendly.com/event_types/b2330295-2a91-4a1d-bb73-99e7707663d5)
817
+ event_type_id:
818
+ )
819
+ end
820
+
821
+ sig do
822
+ override.returns(
823
+ { connection_id: String, event_type_id: String }
824
+ )
825
+ end
826
+ def to_hash
827
+ end
828
+ end
829
+
830
+ class CallRetryConfig < Revox::Internal::Type::BaseModel
831
+ OrHash =
832
+ T.type_alias do
833
+ T.any(
834
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::CallRetryConfig,
835
+ Revox::Internal::AnyHash
836
+ )
837
+ end
838
+
839
+ sig do
840
+ returns(
841
+ T::Array[
842
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::CallRetryConfig::CallingWindow
843
+ ]
844
+ )
845
+ end
846
+ attr_accessor :calling_windows
847
+
848
+ # Maximum number of call retry attempts. Default: 3.
849
+ sig { returns(Integer) }
850
+ attr_accessor :max_retry_attempts
851
+
852
+ # Optional IANA timezone identifier to override the automatic timezone detection
853
+ # from phone number. If not provided, timezone is determined from the recipient's
854
+ # phone number country code. Examples: 'America/New_York', 'Europe/Paris'.
855
+ sig { returns(T.nilable(String)) }
856
+ attr_accessor :timezone
857
+
858
+ # Configuration for call retry behavior including time windows, delays, and max
859
+ # iterations. If not provided, defaults will be used.
860
+ sig do
861
+ params(
862
+ calling_windows:
863
+ T::Array[
864
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::CallRetryConfig::CallingWindow::OrHash
865
+ ],
866
+ max_retry_attempts: Integer,
867
+ timezone: T.nilable(String)
868
+ ).returns(T.attached_class)
869
+ end
870
+ def self.new(
871
+ calling_windows:,
872
+ # Maximum number of call retry attempts. Default: 3.
873
+ max_retry_attempts:,
874
+ # Optional IANA timezone identifier to override the automatic timezone detection
875
+ # from phone number. If not provided, timezone is determined from the recipient's
876
+ # phone number country code. Examples: 'America/New_York', 'Europe/Paris'.
877
+ timezone: nil
878
+ )
879
+ end
880
+
881
+ sig do
882
+ override.returns(
883
+ {
884
+ calling_windows:
885
+ T::Array[
886
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::CallRetryConfig::CallingWindow
887
+ ],
888
+ max_retry_attempts: Integer,
889
+ timezone: T.nilable(String)
890
+ }
891
+ )
892
+ end
893
+ def to_hash
894
+ end
895
+
896
+ class CallingWindow < Revox::Internal::Type::BaseModel
897
+ OrHash =
898
+ T.type_alias do
899
+ T.any(
900
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::CallRetryConfig::CallingWindow,
901
+ Revox::Internal::AnyHash
902
+ )
903
+ end
904
+
905
+ # End time for the calling window in the recipient's timezone (or
906
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
907
+ # Examples: '17:00', '6pm'. Default: '18:00'.
908
+ sig { returns(String) }
909
+ attr_accessor :calling_window_end_time
910
+
911
+ # Start time for the calling window in the recipient's timezone (or
912
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
913
+ # Examples: '09:00', '10am'. Default: '10:00'.
914
+ sig { returns(String) }
915
+ attr_accessor :calling_window_start_time
916
+
917
+ # Delay between retry attempts in seconds. Default: 7200 (2 hours).
918
+ sig { returns(Integer) }
919
+ attr_accessor :retry_delay_seconds
920
+
921
+ sig do
922
+ params(
923
+ calling_window_end_time: String,
924
+ calling_window_start_time: String,
925
+ retry_delay_seconds: Integer
926
+ ).returns(T.attached_class)
927
+ end
928
+ def self.new(
929
+ # End time for the calling window in the recipient's timezone (or
930
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
931
+ # Examples: '17:00', '6pm'. Default: '18:00'.
932
+ calling_window_end_time:,
933
+ # Start time for the calling window in the recipient's timezone (or
934
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
935
+ # Examples: '09:00', '10am'. Default: '10:00'.
936
+ calling_window_start_time:,
937
+ # Delay between retry attempts in seconds. Default: 7200 (2 hours).
938
+ retry_delay_seconds:
939
+ )
940
+ end
941
+
942
+ sig do
943
+ override.returns(
944
+ {
945
+ calling_window_end_time: String,
946
+ calling_window_start_time: String,
947
+ retry_delay_seconds: Integer
948
+ }
949
+ )
950
+ end
951
+ def to_hash
952
+ end
953
+ end
954
+ end
955
+
956
+ module FirstSentenceMode
957
+ extend Revox::Internal::Type::Enum
958
+
959
+ TaggedSymbol =
960
+ T.type_alias do
961
+ T.all(
962
+ Symbol,
963
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FirstSentenceMode
964
+ )
965
+ end
966
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
967
+
968
+ GENERATED =
969
+ T.let(
970
+ :generated,
971
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FirstSentenceMode::TaggedSymbol
972
+ )
973
+ STATIC =
974
+ T.let(
975
+ :static,
976
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FirstSentenceMode::TaggedSymbol
977
+ )
978
+ NONE =
979
+ T.let(
980
+ :none,
981
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FirstSentenceMode::TaggedSymbol
982
+ )
983
+
984
+ sig do
985
+ override.returns(
986
+ T::Array[
987
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FirstSentenceMode::TaggedSymbol
988
+ ]
989
+ )
990
+ end
991
+ def self.values
992
+ end
993
+ end
994
+
995
+ module LlmModel
996
+ extend Revox::Internal::Type::Union
997
+
998
+ Variants =
999
+ T.type_alias do
1000
+ T.any(
1001
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::LlmModel::UnionMember0,
1002
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::LlmModel::UnionMember1
1003
+ )
1004
+ end
1005
+
1006
+ class UnionMember0 < Revox::Internal::Type::BaseModel
1007
+ OrHash =
1008
+ T.type_alias do
1009
+ T.any(
1010
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::LlmModel::UnionMember0,
1011
+ Revox::Internal::AnyHash
1012
+ )
1013
+ end
1014
+
1015
+ sig do
1016
+ returns(
1017
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::LlmModel::UnionMember0::Name::TaggedSymbol
1018
+ )
1019
+ end
1020
+ attr_accessor :name
1021
+
1022
+ sig { returns(Symbol) }
1023
+ attr_accessor :type
1024
+
1025
+ sig do
1026
+ params(
1027
+ name:
1028
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::LlmModel::UnionMember0::Name::OrSymbol,
1029
+ type: Symbol
1030
+ ).returns(T.attached_class)
1031
+ end
1032
+ def self.new(name:, type: :"dedicated-instance")
1033
+ end
1034
+
1035
+ sig do
1036
+ override.returns(
1037
+ {
1038
+ name:
1039
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::LlmModel::UnionMember0::Name::TaggedSymbol,
1040
+ type: Symbol
1041
+ }
1042
+ )
1043
+ end
1044
+ def to_hash
1045
+ end
1046
+
1047
+ module Name
1048
+ extend Revox::Internal::Type::Enum
1049
+
1050
+ TaggedSymbol =
1051
+ T.type_alias do
1052
+ T.all(
1053
+ Symbol,
1054
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::LlmModel::UnionMember0::Name
1055
+ )
1056
+ end
1057
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1058
+
1059
+ GPT_4_1 =
1060
+ T.let(
1061
+ :"gpt-4.1",
1062
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::LlmModel::UnionMember0::Name::TaggedSymbol
1063
+ )
1064
+ MINISTRAL_3_8B_INSTRUCT =
1065
+ T.let(
1066
+ :"ministral-3-8b-instruct",
1067
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::LlmModel::UnionMember0::Name::TaggedSymbol
1068
+ )
1069
+
1070
+ sig do
1071
+ override.returns(
1072
+ T::Array[
1073
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::LlmModel::UnionMember0::Name::TaggedSymbol
1074
+ ]
1075
+ )
1076
+ end
1077
+ def self.values
1078
+ end
1079
+ end
1080
+ end
1081
+
1082
+ class UnionMember1 < Revox::Internal::Type::BaseModel
1083
+ OrHash =
1084
+ T.type_alias do
1085
+ T.any(
1086
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::LlmModel::UnionMember1,
1087
+ Revox::Internal::AnyHash
1088
+ )
1089
+ end
1090
+
1091
+ # The model ID to use from OpenRouter. eg: openai/gpt-4.1
1092
+ sig { returns(String) }
1093
+ attr_accessor :openrouter_model_id
1094
+
1095
+ # The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
1096
+ sig { returns(String) }
1097
+ attr_accessor :openrouter_provider
1098
+
1099
+ # Use a model from OpenRouter.
1100
+ sig { returns(Symbol) }
1101
+ attr_accessor :type
1102
+
1103
+ sig do
1104
+ params(
1105
+ openrouter_model_id: String,
1106
+ openrouter_provider: String,
1107
+ type: Symbol
1108
+ ).returns(T.attached_class)
1109
+ end
1110
+ def self.new(
1111
+ # The model ID to use from OpenRouter. eg: openai/gpt-4.1
1112
+ openrouter_model_id:,
1113
+ # The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
1114
+ openrouter_provider:,
1115
+ # Use a model from OpenRouter.
1116
+ type: :openrouter
1117
+ )
1118
+ end
1119
+
1120
+ sig do
1121
+ override.returns(
1122
+ {
1123
+ openrouter_model_id: String,
1124
+ openrouter_provider: String,
1125
+ type: Symbol
1126
+ }
1127
+ )
1128
+ end
1129
+ def to_hash
1130
+ end
1131
+ end
1132
+
1133
+ sig do
1134
+ override.returns(
1135
+ T::Array[
1136
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::LlmModel::Variants
1137
+ ]
1138
+ )
1139
+ end
1140
+ def self.variants
1141
+ end
1142
+ end
1143
+
1144
+ class StructuredOutputConfig < Revox::Internal::Type::BaseModel
1145
+ OrHash =
1146
+ T.type_alias do
1147
+ T.any(
1148
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::StructuredOutputConfig,
1149
+ Revox::Internal::AnyHash
1150
+ )
1151
+ end
1152
+
1153
+ sig { returns(String) }
1154
+ attr_accessor :name
1155
+
1156
+ sig { returns(T::Boolean) }
1157
+ attr_accessor :required
1158
+
1159
+ sig do
1160
+ returns(
1161
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::StructuredOutputConfig::Type::TaggedSymbol
1162
+ )
1163
+ end
1164
+ attr_accessor :type
1165
+
1166
+ sig { returns(T.nilable(String)) }
1167
+ attr_reader :description
1168
+
1169
+ sig { params(description: String).void }
1170
+ attr_writer :description
1171
+
1172
+ sig { returns(T.nilable(T::Array[String])) }
1173
+ attr_reader :enum_options
1174
+
1175
+ sig { params(enum_options: T::Array[String]).void }
1176
+ attr_writer :enum_options
1177
+
1178
+ sig do
1179
+ params(
1180
+ name: String,
1181
+ required: T::Boolean,
1182
+ type:
1183
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::StructuredOutputConfig::Type::OrSymbol,
1184
+ description: String,
1185
+ enum_options: T::Array[String]
1186
+ ).returns(T.attached_class)
1187
+ end
1188
+ def self.new(
1189
+ name:,
1190
+ required:,
1191
+ type:,
1192
+ description: nil,
1193
+ enum_options: nil
1194
+ )
1195
+ end
1196
+
1197
+ sig do
1198
+ override.returns(
1199
+ {
1200
+ name: String,
1201
+ required: T::Boolean,
1202
+ type:
1203
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::StructuredOutputConfig::Type::TaggedSymbol,
1204
+ description: String,
1205
+ enum_options: T::Array[String]
1206
+ }
1207
+ )
1208
+ end
1209
+ def to_hash
1210
+ end
1211
+
1212
+ module Type
1213
+ extend Revox::Internal::Type::Enum
1214
+
1215
+ TaggedSymbol =
1216
+ T.type_alias do
1217
+ T.all(
1218
+ Symbol,
1219
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::StructuredOutputConfig::Type
1220
+ )
1221
+ end
1222
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1223
+
1224
+ STRING =
1225
+ T.let(
1226
+ :string,
1227
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::StructuredOutputConfig::Type::TaggedSymbol
1228
+ )
1229
+ NUMBER =
1230
+ T.let(
1231
+ :number,
1232
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::StructuredOutputConfig::Type::TaggedSymbol
1233
+ )
1234
+ BOOLEAN =
1235
+ T.let(
1236
+ :boolean,
1237
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::StructuredOutputConfig::Type::TaggedSymbol
1238
+ )
1239
+ ENUM =
1240
+ T.let(
1241
+ :enum,
1242
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::StructuredOutputConfig::Type::TaggedSymbol
1243
+ )
1244
+ DATE =
1245
+ T.let(
1246
+ :date,
1247
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::StructuredOutputConfig::Type::TaggedSymbol
1248
+ )
1249
+ DATETIME =
1250
+ T.let(
1251
+ :datetime,
1252
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::StructuredOutputConfig::Type::TaggedSymbol
1253
+ )
1254
+
1255
+ sig do
1256
+ override.returns(
1257
+ T::Array[
1258
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::StructuredOutputConfig::Type::TaggedSymbol
1259
+ ]
1260
+ )
1261
+ end
1262
+ def self.values
1263
+ end
1264
+ end
1265
+ end
1266
+
1267
+ class Voice < Revox::Internal::Type::BaseModel
1268
+ OrHash =
1269
+ T.type_alias do
1270
+ T.any(
1271
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Voice,
1272
+ Revox::Internal::AnyHash
1273
+ )
1274
+ end
1275
+
1276
+ # The ID of the voice.
1277
+ sig { returns(String) }
1278
+ attr_accessor :id
1279
+
1280
+ # The provider of the voice.
1281
+ sig do
1282
+ returns(
1283
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Voice::Provider::TaggedSymbol
1284
+ )
1285
+ end
1286
+ attr_accessor :provider
1287
+
1288
+ # The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
1289
+ # 0.7–1.2. Default is 1.0.
1290
+ sig { returns(T.nilable(Float)) }
1291
+ attr_reader :speed
1292
+
1293
+ sig { params(speed: Float).void }
1294
+ attr_writer :speed
1295
+
1296
+ sig do
1297
+ params(
1298
+ id: String,
1299
+ provider:
1300
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Voice::Provider::OrSymbol,
1301
+ speed: Float
1302
+ ).returns(T.attached_class)
1303
+ end
1304
+ def self.new(
1305
+ # The ID of the voice.
1306
+ id:,
1307
+ # The provider of the voice.
1308
+ provider:,
1309
+ # The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
1310
+ # 0.7–1.2. Default is 1.0.
1311
+ speed: nil
1312
+ )
1313
+ end
1314
+
1315
+ sig do
1316
+ override.returns(
1317
+ {
1318
+ id: String,
1319
+ provider:
1320
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Voice::Provider::TaggedSymbol,
1321
+ speed: Float
1322
+ }
1323
+ )
1324
+ end
1325
+ def to_hash
1326
+ end
1327
+
1328
+ # The provider of the voice.
1329
+ module Provider
1330
+ extend Revox::Internal::Type::Enum
1331
+
1332
+ TaggedSymbol =
1333
+ T.type_alias do
1334
+ T.all(
1335
+ Symbol,
1336
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Voice::Provider
1337
+ )
1338
+ end
1339
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1340
+
1341
+ CARTESIA =
1342
+ T.let(
1343
+ :cartesia,
1344
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Voice::Provider::TaggedSymbol
1345
+ )
1346
+ ELEVENLABS =
1347
+ T.let(
1348
+ :elevenlabs,
1349
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Voice::Provider::TaggedSymbol
1350
+ )
1351
+
1352
+ sig do
1353
+ override.returns(
1354
+ T::Array[
1355
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::Voice::Provider::TaggedSymbol
1356
+ ]
1357
+ )
1358
+ end
1359
+ def self.values
1360
+ end
1361
+ end
1362
+ end
1363
+
1364
+ class FaqItem < Revox::Internal::Type::BaseModel
1365
+ OrHash =
1366
+ T.type_alias do
1367
+ T.any(
1368
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FaqItem,
1369
+ Revox::Internal::AnyHash
1370
+ )
1371
+ end
1372
+
1373
+ sig { returns(String) }
1374
+ attr_accessor :answer
1375
+
1376
+ sig { returns(String) }
1377
+ attr_accessor :question
1378
+
1379
+ sig { returns(T.nilable(String)) }
1380
+ attr_reader :id
1381
+
1382
+ sig { params(id: String).void }
1383
+ attr_writer :id
1384
+
1385
+ sig { returns(T.nilable(T::Boolean)) }
1386
+ attr_reader :needs_human_answer
1387
+
1388
+ sig { params(needs_human_answer: T::Boolean).void }
1389
+ attr_writer :needs_human_answer
1390
+
1391
+ sig do
1392
+ returns(
1393
+ T.nilable(
1394
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FaqItem::Source::TaggedSymbol
1395
+ )
1396
+ )
1397
+ end
1398
+ attr_reader :source
1399
+
1400
+ sig do
1401
+ params(
1402
+ source:
1403
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FaqItem::Source::OrSymbol
1404
+ ).void
1405
+ end
1406
+ attr_writer :source
1407
+
1408
+ sig do
1409
+ params(
1410
+ answer: String,
1411
+ question: String,
1412
+ id: String,
1413
+ needs_human_answer: T::Boolean,
1414
+ source:
1415
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FaqItem::Source::OrSymbol
1416
+ ).returns(T.attached_class)
1417
+ end
1418
+ def self.new(
1419
+ answer:,
1420
+ question:,
1421
+ id: nil,
1422
+ needs_human_answer: nil,
1423
+ source: nil
1424
+ )
1425
+ end
1426
+
1427
+ sig do
1428
+ override.returns(
1429
+ {
1430
+ answer: String,
1431
+ question: String,
1432
+ id: String,
1433
+ needs_human_answer: T::Boolean,
1434
+ source:
1435
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FaqItem::Source::TaggedSymbol
1436
+ }
1437
+ )
1438
+ end
1439
+ def to_hash
1440
+ end
1441
+
1442
+ module Source
1443
+ extend Revox::Internal::Type::Enum
1444
+
1445
+ TaggedSymbol =
1446
+ T.type_alias do
1447
+ T.all(
1448
+ Symbol,
1449
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FaqItem::Source
1450
+ )
1451
+ end
1452
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1453
+
1454
+ HUMAN =
1455
+ T.let(
1456
+ :human,
1457
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FaqItem::Source::TaggedSymbol
1458
+ )
1459
+ AI =
1460
+ T.let(
1461
+ :ai,
1462
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FaqItem::Source::TaggedSymbol
1463
+ )
1464
+
1465
+ sig do
1466
+ override.returns(
1467
+ T::Array[
1468
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Assistant::FaqItem::Source::TaggedSymbol
1469
+ ]
1470
+ )
1471
+ end
1472
+ def self.values
1473
+ end
1474
+ end
1475
+ end
1476
+ end
1477
+
1478
+ class CallAttempt < Revox::Internal::Type::BaseModel
1479
+ OrHash =
1480
+ T.type_alias do
1481
+ T.any(
1482
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt,
1483
+ Revox::Internal::AnyHash
1484
+ )
1485
+ end
1486
+
1487
+ # The ID of the call attempt.
1488
+ sig { returns(String) }
1489
+ attr_accessor :id
1490
+
1491
+ # The time the call was answered.
1492
+ sig { returns(T.anything) }
1493
+ attr_accessor :answered_at
1494
+
1495
+ # The SIP error that occurred.
1496
+ sig do
1497
+ returns(
1498
+ T.nilable(
1499
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::DialError::TaggedSymbol
1500
+ )
1501
+ )
1502
+ end
1503
+ attr_accessor :dial_error
1504
+
1505
+ # The time the call ended.
1506
+ sig { returns(T.anything) }
1507
+ attr_accessor :ended_at
1508
+
1509
+ # The phone number that was called. Formatted in E.164 format. Example:
1510
+ # +1234567890
1511
+ sig { returns(String) }
1512
+ attr_accessor :phone_number
1513
+
1514
+ # The URL of the audio recording of the call.
1515
+ sig { returns(T.nilable(String)) }
1516
+ attr_accessor :recording_url
1517
+
1518
+ sig do
1519
+ returns(
1520
+ T.nilable(
1521
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Result::TaggedSymbol
1522
+ )
1523
+ )
1524
+ end
1525
+ attr_accessor :result
1526
+
1527
+ # The time the call started.
1528
+ sig { returns(T.anything) }
1529
+ attr_accessor :started_at
1530
+
1531
+ # The status of the call attempt.
1532
+ sig do
1533
+ returns(
1534
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Status::TaggedSymbol
1535
+ )
1536
+ end
1537
+ attr_accessor :status
1538
+
1539
+ # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
1540
+ # 'voicemail', 'transfer', 'ivr_no_navigate'.
1541
+ sig { returns(T.nilable(String)) }
1542
+ attr_accessor :end_reason
1543
+
1544
+ # Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or
1545
+ # 'system' (e.g. max duration limit).
1546
+ sig do
1547
+ returns(
1548
+ T.nilable(
1549
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::EndedBy::TaggedSymbol
1550
+ )
1551
+ )
1552
+ end
1553
+ attr_accessor :ended_by
1554
+
1555
+ # The data extracted from the call, using the structured output config from the
1556
+ # parent call object.
1557
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
1558
+ attr_accessor :structured_output
1559
+
1560
+ # The transcript of the call.
1561
+ sig do
1562
+ returns(
1563
+ T.nilable(
1564
+ T::Array[
1565
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Transcript
1566
+ ]
1567
+ )
1568
+ )
1569
+ end
1570
+ attr_accessor :transcript
1571
+
1572
+ # This represent a single call attempt. A call attempt is a single call made to
1573
+ # the phone number.
1574
+ sig do
1575
+ params(
1576
+ id: String,
1577
+ answered_at: T.anything,
1578
+ dial_error:
1579
+ T.nilable(
1580
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::DialError::OrSymbol
1581
+ ),
1582
+ ended_at: T.anything,
1583
+ phone_number: String,
1584
+ recording_url: T.nilable(String),
1585
+ result:
1586
+ T.nilable(
1587
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Result::OrSymbol
1588
+ ),
1589
+ started_at: T.anything,
1590
+ status:
1591
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Status::OrSymbol,
1592
+ end_reason: T.nilable(String),
1593
+ ended_by:
1594
+ T.nilable(
1595
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::EndedBy::OrSymbol
1596
+ ),
1597
+ structured_output: T.nilable(T::Hash[Symbol, T.anything]),
1598
+ transcript:
1599
+ T.nilable(
1600
+ T::Array[
1601
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Transcript::OrHash
1602
+ ]
1603
+ )
1604
+ ).returns(T.attached_class)
1605
+ end
1606
+ def self.new(
1607
+ # The ID of the call attempt.
1608
+ id:,
1609
+ # The time the call was answered.
1610
+ answered_at:,
1611
+ # The SIP error that occurred.
1612
+ dial_error:,
1613
+ # The time the call ended.
1614
+ ended_at:,
1615
+ # The phone number that was called. Formatted in E.164 format. Example:
1616
+ # +1234567890
1617
+ phone_number:,
1618
+ # The URL of the audio recording of the call.
1619
+ recording_url:,
1620
+ result:,
1621
+ # The time the call started.
1622
+ started_at:,
1623
+ # The status of the call attempt.
1624
+ status:,
1625
+ # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
1626
+ # 'voicemail', 'transfer', 'ivr_no_navigate'.
1627
+ end_reason: nil,
1628
+ # Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or
1629
+ # 'system' (e.g. max duration limit).
1630
+ ended_by: nil,
1631
+ # The data extracted from the call, using the structured output config from the
1632
+ # parent call object.
1633
+ structured_output: nil,
1634
+ # The transcript of the call.
1635
+ transcript: nil
1636
+ )
1637
+ end
1638
+
1639
+ sig do
1640
+ override.returns(
1641
+ {
1642
+ id: String,
1643
+ answered_at: T.anything,
1644
+ dial_error:
1645
+ T.nilable(
1646
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::DialError::TaggedSymbol
1647
+ ),
1648
+ ended_at: T.anything,
1649
+ phone_number: String,
1650
+ recording_url: T.nilable(String),
1651
+ result:
1652
+ T.nilable(
1653
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Result::TaggedSymbol
1654
+ ),
1655
+ started_at: T.anything,
1656
+ status:
1657
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Status::TaggedSymbol,
1658
+ end_reason: T.nilable(String),
1659
+ ended_by:
1660
+ T.nilable(
1661
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::EndedBy::TaggedSymbol
1662
+ ),
1663
+ structured_output: T.nilable(T::Hash[Symbol, T.anything]),
1664
+ transcript:
1665
+ T.nilable(
1666
+ T::Array[
1667
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Transcript
1668
+ ]
1669
+ )
1670
+ }
1671
+ )
1672
+ end
1673
+ def to_hash
1674
+ end
1675
+
1676
+ # The SIP error that occurred.
1677
+ module DialError
1678
+ extend Revox::Internal::Type::Enum
1679
+
1680
+ TaggedSymbol =
1681
+ T.type_alias do
1682
+ T.all(
1683
+ Symbol,
1684
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::DialError
1685
+ )
1686
+ end
1687
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1688
+
1689
+ NUMBER_NON_ATTRIBUTED =
1690
+ T.let(
1691
+ :number_non_attributed,
1692
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::DialError::TaggedSymbol
1693
+ )
1694
+ TOO_MANY_CALLS =
1695
+ T.let(
1696
+ :too_many_calls,
1697
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::DialError::TaggedSymbol
1698
+ )
1699
+ BUSY =
1700
+ T.let(
1701
+ :busy,
1702
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::DialError::TaggedSymbol
1703
+ )
1704
+ TEMPORARILY_UNAVAILABLE =
1705
+ T.let(
1706
+ :temporarily_unavailable,
1707
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::DialError::TaggedSymbol
1708
+ )
1709
+ NO_ANSWER =
1710
+ T.let(
1711
+ :no_answer,
1712
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::DialError::TaggedSymbol
1713
+ )
1714
+ NO_INTERNATIONAL_PERMISSION =
1715
+ T.let(
1716
+ :no_international_permission,
1717
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::DialError::TaggedSymbol
1718
+ )
1719
+ PRECONDITION_FAILED =
1720
+ T.let(
1721
+ :precondition_failed,
1722
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::DialError::TaggedSymbol
1723
+ )
1724
+ NON_CLASSIFIED_ERROR =
1725
+ T.let(
1726
+ :non_classified_error,
1727
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::DialError::TaggedSymbol
1728
+ )
1729
+
1730
+ sig do
1731
+ override.returns(
1732
+ T::Array[
1733
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::DialError::TaggedSymbol
1734
+ ]
1735
+ )
1736
+ end
1737
+ def self.values
1738
+ end
1739
+ end
1740
+
1741
+ module Result
1742
+ extend Revox::Internal::Type::Enum
1743
+
1744
+ TaggedSymbol =
1745
+ T.type_alias do
1746
+ T.all(
1747
+ Symbol,
1748
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Result
1749
+ )
1750
+ end
1751
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1752
+
1753
+ IVR =
1754
+ T.let(
1755
+ :IVR,
1756
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Result::TaggedSymbol
1757
+ )
1758
+ VOICEMAIL =
1759
+ T.let(
1760
+ :voicemail,
1761
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Result::TaggedSymbol
1762
+ )
1763
+ HUMAN =
1764
+ T.let(
1765
+ :human,
1766
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Result::TaggedSymbol
1767
+ )
1768
+ UNKNOWN =
1769
+ T.let(
1770
+ :unknown,
1771
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Result::TaggedSymbol
1772
+ )
1773
+ IOS_SCREENING_FILTER =
1774
+ T.let(
1775
+ :"ios-screening-filter",
1776
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Result::TaggedSymbol
1777
+ )
1778
+
1779
+ sig do
1780
+ override.returns(
1781
+ T::Array[
1782
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Result::TaggedSymbol
1783
+ ]
1784
+ )
1785
+ end
1786
+ def self.values
1787
+ end
1788
+ end
1789
+
1790
+ # The status of the call attempt.
1791
+ module Status
1792
+ extend Revox::Internal::Type::Enum
1793
+
1794
+ TaggedSymbol =
1795
+ T.type_alias do
1796
+ T.all(
1797
+ Symbol,
1798
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Status
1799
+ )
1800
+ end
1801
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1802
+
1803
+ QUEUED =
1804
+ T.let(
1805
+ :queued,
1806
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Status::TaggedSymbol
1807
+ )
1808
+ RINGING =
1809
+ T.let(
1810
+ :ringing,
1811
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Status::TaggedSymbol
1812
+ )
1813
+ ONGOING =
1814
+ T.let(
1815
+ :ongoing,
1816
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Status::TaggedSymbol
1817
+ )
1818
+ COMPLETED =
1819
+ T.let(
1820
+ :completed,
1821
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Status::TaggedSymbol
1822
+ )
1823
+ ERROR =
1824
+ T.let(
1825
+ :error,
1826
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Status::TaggedSymbol
1827
+ )
1828
+
1829
+ sig do
1830
+ override.returns(
1831
+ T::Array[
1832
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Status::TaggedSymbol
1833
+ ]
1834
+ )
1835
+ end
1836
+ def self.values
1837
+ end
1838
+ end
1839
+
1840
+ # Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or
1841
+ # 'system' (e.g. max duration limit).
1842
+ module EndedBy
1843
+ extend Revox::Internal::Type::Enum
1844
+
1845
+ TaggedSymbol =
1846
+ T.type_alias do
1847
+ T.all(
1848
+ Symbol,
1849
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::EndedBy
1850
+ )
1851
+ end
1852
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1853
+
1854
+ AGENT =
1855
+ T.let(
1856
+ :agent,
1857
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::EndedBy::TaggedSymbol
1858
+ )
1859
+ USER =
1860
+ T.let(
1861
+ :user,
1862
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::EndedBy::TaggedSymbol
1863
+ )
1864
+ SYSTEM =
1865
+ T.let(
1866
+ :system,
1867
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::EndedBy::TaggedSymbol
1868
+ )
1869
+
1870
+ sig do
1871
+ override.returns(
1872
+ T::Array[
1873
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::EndedBy::TaggedSymbol
1874
+ ]
1875
+ )
1876
+ end
1877
+ def self.values
1878
+ end
1879
+ end
1880
+
1881
+ class Transcript < Revox::Internal::Type::BaseModel
1882
+ OrHash =
1883
+ T.type_alias do
1884
+ T.any(
1885
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Transcript,
1886
+ Revox::Internal::AnyHash
1887
+ )
1888
+ end
1889
+
1890
+ sig { returns(String) }
1891
+ attr_accessor :content
1892
+
1893
+ sig do
1894
+ returns(
1895
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Transcript::Role::TaggedSymbol
1896
+ )
1897
+ end
1898
+ attr_accessor :role
1899
+
1900
+ sig do
1901
+ returns(
1902
+ T.nilable(
1903
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Transcript::ToolArguments::Variants
1904
+ )
1905
+ )
1906
+ end
1907
+ attr_reader :tool_arguments
1908
+
1909
+ sig do
1910
+ params(
1911
+ tool_arguments:
1912
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Transcript::ToolArguments::Variants
1913
+ ).void
1914
+ end
1915
+ attr_writer :tool_arguments
1916
+
1917
+ sig { returns(T.nilable(T::Boolean)) }
1918
+ attr_reader :tool_is_error
1919
+
1920
+ sig { params(tool_is_error: T::Boolean).void }
1921
+ attr_writer :tool_is_error
1922
+
1923
+ sig { returns(T.nilable(String)) }
1924
+ attr_reader :tool_name
1925
+
1926
+ sig { params(tool_name: String).void }
1927
+ attr_writer :tool_name
1928
+
1929
+ sig do
1930
+ params(
1931
+ content: String,
1932
+ role:
1933
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Transcript::Role::OrSymbol,
1934
+ tool_arguments:
1935
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Transcript::ToolArguments::Variants,
1936
+ tool_is_error: T::Boolean,
1937
+ tool_name: String
1938
+ ).returns(T.attached_class)
1939
+ end
1940
+ def self.new(
1941
+ content:,
1942
+ role:,
1943
+ tool_arguments: nil,
1944
+ tool_is_error: nil,
1945
+ tool_name: nil
1946
+ )
1947
+ end
1948
+
1949
+ sig do
1950
+ override.returns(
1951
+ {
1952
+ content: String,
1953
+ role:
1954
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Transcript::Role::TaggedSymbol,
1955
+ tool_arguments:
1956
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Transcript::ToolArguments::Variants,
1957
+ tool_is_error: T::Boolean,
1958
+ tool_name: String
1959
+ }
1960
+ )
1961
+ end
1962
+ def to_hash
1963
+ end
1964
+
1965
+ module Role
1966
+ extend Revox::Internal::Type::Enum
1967
+
1968
+ TaggedSymbol =
1969
+ T.type_alias do
1970
+ T.all(
1971
+ Symbol,
1972
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Transcript::Role
1973
+ )
1974
+ end
1975
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1976
+
1977
+ USER =
1978
+ T.let(
1979
+ :user,
1980
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Transcript::Role::TaggedSymbol
1981
+ )
1982
+ ASSISTANT =
1983
+ T.let(
1984
+ :assistant,
1985
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Transcript::Role::TaggedSymbol
1986
+ )
1987
+ TOOL =
1988
+ T.let(
1989
+ :tool,
1990
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Transcript::Role::TaggedSymbol
1991
+ )
1992
+
1993
+ sig do
1994
+ override.returns(
1995
+ T::Array[
1996
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Transcript::Role::TaggedSymbol
1997
+ ]
1998
+ )
1999
+ end
2000
+ def self.values
2001
+ end
2002
+ end
2003
+
2004
+ module ToolArguments
2005
+ extend Revox::Internal::Type::Union
2006
+
2007
+ Variants =
2008
+ T.type_alias { T.any(T::Hash[Symbol, T.anything], String) }
2009
+
2010
+ sig do
2011
+ override.returns(
2012
+ T::Array[
2013
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallAttempt::Transcript::ToolArguments::Variants
2014
+ ]
2015
+ )
2016
+ end
2017
+ def self.variants
2018
+ end
2019
+
2020
+ UnionMember0Map =
2021
+ T.let(
2022
+ Revox::Internal::Type::HashOf[
2023
+ Revox::Internal::Type::Unknown
2024
+ ],
2025
+ Revox::Internal::Type::Converter
2026
+ )
2027
+ end
2028
+ end
2029
+ end
2030
+
2031
+ class CallRetryConfig < Revox::Internal::Type::BaseModel
2032
+ OrHash =
2033
+ T.type_alias do
2034
+ T.any(
2035
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallRetryConfig,
2036
+ Revox::Internal::AnyHash
2037
+ )
2038
+ end
2039
+
2040
+ sig do
2041
+ returns(
2042
+ T::Array[
2043
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallRetryConfig::CallingWindow
2044
+ ]
2045
+ )
2046
+ end
2047
+ attr_accessor :calling_windows
2048
+
2049
+ # Maximum number of call retry attempts. Default: 3.
2050
+ sig { returns(Integer) }
2051
+ attr_accessor :max_retry_attempts
2052
+
2053
+ # Optional IANA timezone identifier to override the automatic timezone detection
2054
+ # from phone number. If not provided, timezone is determined from the recipient's
2055
+ # phone number country code. Examples: 'America/New_York', 'Europe/Paris'.
2056
+ sig { returns(T.nilable(String)) }
2057
+ attr_accessor :timezone
2058
+
2059
+ # Configuration for call retry behavior including time windows, delays, and max
2060
+ # iterations. If not provided, defaults will be used.
2061
+ sig do
2062
+ params(
2063
+ calling_windows:
2064
+ T::Array[
2065
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallRetryConfig::CallingWindow::OrHash
2066
+ ],
2067
+ max_retry_attempts: Integer,
2068
+ timezone: T.nilable(String)
2069
+ ).returns(T.attached_class)
2070
+ end
2071
+ def self.new(
2072
+ calling_windows:,
2073
+ # Maximum number of call retry attempts. Default: 3.
2074
+ max_retry_attempts:,
2075
+ # Optional IANA timezone identifier to override the automatic timezone detection
2076
+ # from phone number. If not provided, timezone is determined from the recipient's
2077
+ # phone number country code. Examples: 'America/New_York', 'Europe/Paris'.
2078
+ timezone: nil
2079
+ )
2080
+ end
2081
+
2082
+ sig do
2083
+ override.returns(
2084
+ {
2085
+ calling_windows:
2086
+ T::Array[
2087
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallRetryConfig::CallingWindow
2088
+ ],
2089
+ max_retry_attempts: Integer,
2090
+ timezone: T.nilable(String)
2091
+ }
2092
+ )
2093
+ end
2094
+ def to_hash
2095
+ end
2096
+
2097
+ class CallingWindow < Revox::Internal::Type::BaseModel
2098
+ OrHash =
2099
+ T.type_alias do
2100
+ T.any(
2101
+ Revox::Models::CampaignGetRowsResponse::Row::Call::CallRetryConfig::CallingWindow,
2102
+ Revox::Internal::AnyHash
2103
+ )
2104
+ end
2105
+
2106
+ # End time for the calling window in the recipient's timezone (or
2107
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
2108
+ # Examples: '17:00', '6pm'. Default: '18:00'.
2109
+ sig { returns(String) }
2110
+ attr_accessor :calling_window_end_time
2111
+
2112
+ # Start time for the calling window in the recipient's timezone (or
2113
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
2114
+ # Examples: '09:00', '10am'. Default: '10:00'.
2115
+ sig { returns(String) }
2116
+ attr_accessor :calling_window_start_time
2117
+
2118
+ # Delay between retry attempts in seconds. Default: 7200 (2 hours).
2119
+ sig { returns(Integer) }
2120
+ attr_accessor :retry_delay_seconds
2121
+
2122
+ sig do
2123
+ params(
2124
+ calling_window_end_time: String,
2125
+ calling_window_start_time: String,
2126
+ retry_delay_seconds: Integer
2127
+ ).returns(T.attached_class)
2128
+ end
2129
+ def self.new(
2130
+ # End time for the calling window in the recipient's timezone (or
2131
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
2132
+ # Examples: '17:00', '6pm'. Default: '18:00'.
2133
+ calling_window_end_time:,
2134
+ # Start time for the calling window in the recipient's timezone (or
2135
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
2136
+ # Examples: '09:00', '10am'. Default: '10:00'.
2137
+ calling_window_start_time:,
2138
+ # Delay between retry attempts in seconds. Default: 7200 (2 hours).
2139
+ retry_delay_seconds:
2140
+ )
2141
+ end
2142
+
2143
+ sig do
2144
+ override.returns(
2145
+ {
2146
+ calling_window_end_time: String,
2147
+ calling_window_start_time: String,
2148
+ retry_delay_seconds: Integer
2149
+ }
2150
+ )
2151
+ end
2152
+ def to_hash
2153
+ end
2154
+ end
2155
+ end
2156
+
2157
+ class Campaign < Revox::Internal::Type::BaseModel
2158
+ OrHash =
2159
+ T.type_alias do
2160
+ T.any(
2161
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Campaign,
2162
+ Revox::Internal::AnyHash
2163
+ )
2164
+ end
2165
+
2166
+ sig { returns(String) }
2167
+ attr_accessor :id
2168
+
2169
+ sig { returns(String) }
2170
+ attr_accessor :name
2171
+
2172
+ sig { params(id: String, name: String).returns(T.attached_class) }
2173
+ def self.new(id:, name:)
2174
+ end
2175
+
2176
+ sig { override.returns({ id: String, name: String }) }
2177
+ def to_hash
2178
+ end
2179
+ end
2180
+
2181
+ # Whether the call is inbound or outbound.
2182
+ module Direction
2183
+ extend Revox::Internal::Type::Enum
2184
+
2185
+ TaggedSymbol =
2186
+ T.type_alias do
2187
+ T.all(
2188
+ Symbol,
2189
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Direction
2190
+ )
2191
+ end
2192
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2193
+
2194
+ INBOUND =
2195
+ T.let(
2196
+ :inbound,
2197
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Direction::TaggedSymbol
2198
+ )
2199
+ OUTBOUND =
2200
+ T.let(
2201
+ :outbound,
2202
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Direction::TaggedSymbol
2203
+ )
2204
+
2205
+ sig do
2206
+ override.returns(
2207
+ T::Array[
2208
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Direction::TaggedSymbol
2209
+ ]
2210
+ )
2211
+ end
2212
+ def self.values
2213
+ end
2214
+ end
2215
+
2216
+ class LastCallAttempt < Revox::Internal::Type::BaseModel
2217
+ OrHash =
2218
+ T.type_alias do
2219
+ T.any(
2220
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt,
2221
+ Revox::Internal::AnyHash
2222
+ )
2223
+ end
2224
+
2225
+ # The ID of the call attempt.
2226
+ sig { returns(String) }
2227
+ attr_accessor :id
2228
+
2229
+ # The time the call was answered.
2230
+ sig { returns(T.anything) }
2231
+ attr_accessor :answered_at
2232
+
2233
+ # The SIP error that occurred.
2234
+ sig do
2235
+ returns(
2236
+ T.nilable(
2237
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::DialError::TaggedSymbol
2238
+ )
2239
+ )
2240
+ end
2241
+ attr_accessor :dial_error
2242
+
2243
+ # The time the call ended.
2244
+ sig { returns(T.anything) }
2245
+ attr_accessor :ended_at
2246
+
2247
+ # The phone number that was called. Formatted in E.164 format. Example:
2248
+ # +1234567890
2249
+ sig { returns(String) }
2250
+ attr_accessor :phone_number
2251
+
2252
+ # The URL of the audio recording of the call.
2253
+ sig { returns(T.nilable(String)) }
2254
+ attr_accessor :recording_url
2255
+
2256
+ sig do
2257
+ returns(
2258
+ T.nilable(
2259
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Result::TaggedSymbol
2260
+ )
2261
+ )
2262
+ end
2263
+ attr_accessor :result
2264
+
2265
+ # The time the call started.
2266
+ sig { returns(T.anything) }
2267
+ attr_accessor :started_at
2268
+
2269
+ # The status of the call attempt.
2270
+ sig do
2271
+ returns(
2272
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Status::TaggedSymbol
2273
+ )
2274
+ end
2275
+ attr_accessor :status
2276
+
2277
+ # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
2278
+ # 'voicemail', 'transfer', 'ivr_no_navigate'.
2279
+ sig { returns(T.nilable(String)) }
2280
+ attr_accessor :end_reason
2281
+
2282
+ # Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or
2283
+ # 'system' (e.g. max duration limit).
2284
+ sig do
2285
+ returns(
2286
+ T.nilable(
2287
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::EndedBy::TaggedSymbol
2288
+ )
2289
+ )
2290
+ end
2291
+ attr_accessor :ended_by
2292
+
2293
+ # The data extracted from the call, using the structured output config from the
2294
+ # parent call object.
2295
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
2296
+ attr_accessor :structured_output
2297
+
2298
+ # The transcript of the call.
2299
+ sig do
2300
+ returns(
2301
+ T.nilable(
2302
+ T::Array[
2303
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Transcript
2304
+ ]
2305
+ )
2306
+ )
2307
+ end
2308
+ attr_accessor :transcript
2309
+
2310
+ # This represent a single call attempt. A call attempt is a single call made to
2311
+ # the phone number.
2312
+ sig do
2313
+ params(
2314
+ id: String,
2315
+ answered_at: T.anything,
2316
+ dial_error:
2317
+ T.nilable(
2318
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::DialError::OrSymbol
2319
+ ),
2320
+ ended_at: T.anything,
2321
+ phone_number: String,
2322
+ recording_url: T.nilable(String),
2323
+ result:
2324
+ T.nilable(
2325
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Result::OrSymbol
2326
+ ),
2327
+ started_at: T.anything,
2328
+ status:
2329
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Status::OrSymbol,
2330
+ end_reason: T.nilable(String),
2331
+ ended_by:
2332
+ T.nilable(
2333
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::EndedBy::OrSymbol
2334
+ ),
2335
+ structured_output: T.nilable(T::Hash[Symbol, T.anything]),
2336
+ transcript:
2337
+ T.nilable(
2338
+ T::Array[
2339
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Transcript::OrHash
2340
+ ]
2341
+ )
2342
+ ).returns(T.attached_class)
2343
+ end
2344
+ def self.new(
2345
+ # The ID of the call attempt.
2346
+ id:,
2347
+ # The time the call was answered.
2348
+ answered_at:,
2349
+ # The SIP error that occurred.
2350
+ dial_error:,
2351
+ # The time the call ended.
2352
+ ended_at:,
2353
+ # The phone number that was called. Formatted in E.164 format. Example:
2354
+ # +1234567890
2355
+ phone_number:,
2356
+ # The URL of the audio recording of the call.
2357
+ recording_url:,
2358
+ result:,
2359
+ # The time the call started.
2360
+ started_at:,
2361
+ # The status of the call attempt.
2362
+ status:,
2363
+ # Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call',
2364
+ # 'voicemail', 'transfer', 'ivr_no_navigate'.
2365
+ end_reason: nil,
2366
+ # Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or
2367
+ # 'system' (e.g. max duration limit).
2368
+ ended_by: nil,
2369
+ # The data extracted from the call, using the structured output config from the
2370
+ # parent call object.
2371
+ structured_output: nil,
2372
+ # The transcript of the call.
2373
+ transcript: nil
2374
+ )
2375
+ end
2376
+
2377
+ sig do
2378
+ override.returns(
2379
+ {
2380
+ id: String,
2381
+ answered_at: T.anything,
2382
+ dial_error:
2383
+ T.nilable(
2384
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::DialError::TaggedSymbol
2385
+ ),
2386
+ ended_at: T.anything,
2387
+ phone_number: String,
2388
+ recording_url: T.nilable(String),
2389
+ result:
2390
+ T.nilable(
2391
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Result::TaggedSymbol
2392
+ ),
2393
+ started_at: T.anything,
2394
+ status:
2395
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Status::TaggedSymbol,
2396
+ end_reason: T.nilable(String),
2397
+ ended_by:
2398
+ T.nilable(
2399
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::EndedBy::TaggedSymbol
2400
+ ),
2401
+ structured_output: T.nilable(T::Hash[Symbol, T.anything]),
2402
+ transcript:
2403
+ T.nilable(
2404
+ T::Array[
2405
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Transcript
2406
+ ]
2407
+ )
2408
+ }
2409
+ )
2410
+ end
2411
+ def to_hash
2412
+ end
2413
+
2414
+ # The SIP error that occurred.
2415
+ module DialError
2416
+ extend Revox::Internal::Type::Enum
2417
+
2418
+ TaggedSymbol =
2419
+ T.type_alias do
2420
+ T.all(
2421
+ Symbol,
2422
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::DialError
2423
+ )
2424
+ end
2425
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2426
+
2427
+ NUMBER_NON_ATTRIBUTED =
2428
+ T.let(
2429
+ :number_non_attributed,
2430
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::DialError::TaggedSymbol
2431
+ )
2432
+ TOO_MANY_CALLS =
2433
+ T.let(
2434
+ :too_many_calls,
2435
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::DialError::TaggedSymbol
2436
+ )
2437
+ BUSY =
2438
+ T.let(
2439
+ :busy,
2440
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::DialError::TaggedSymbol
2441
+ )
2442
+ TEMPORARILY_UNAVAILABLE =
2443
+ T.let(
2444
+ :temporarily_unavailable,
2445
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::DialError::TaggedSymbol
2446
+ )
2447
+ NO_ANSWER =
2448
+ T.let(
2449
+ :no_answer,
2450
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::DialError::TaggedSymbol
2451
+ )
2452
+ NO_INTERNATIONAL_PERMISSION =
2453
+ T.let(
2454
+ :no_international_permission,
2455
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::DialError::TaggedSymbol
2456
+ )
2457
+ PRECONDITION_FAILED =
2458
+ T.let(
2459
+ :precondition_failed,
2460
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::DialError::TaggedSymbol
2461
+ )
2462
+ NON_CLASSIFIED_ERROR =
2463
+ T.let(
2464
+ :non_classified_error,
2465
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::DialError::TaggedSymbol
2466
+ )
2467
+
2468
+ sig do
2469
+ override.returns(
2470
+ T::Array[
2471
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::DialError::TaggedSymbol
2472
+ ]
2473
+ )
2474
+ end
2475
+ def self.values
2476
+ end
2477
+ end
2478
+
2479
+ module Result
2480
+ extend Revox::Internal::Type::Enum
2481
+
2482
+ TaggedSymbol =
2483
+ T.type_alias do
2484
+ T.all(
2485
+ Symbol,
2486
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Result
2487
+ )
2488
+ end
2489
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2490
+
2491
+ IVR =
2492
+ T.let(
2493
+ :IVR,
2494
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Result::TaggedSymbol
2495
+ )
2496
+ VOICEMAIL =
2497
+ T.let(
2498
+ :voicemail,
2499
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Result::TaggedSymbol
2500
+ )
2501
+ HUMAN =
2502
+ T.let(
2503
+ :human,
2504
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Result::TaggedSymbol
2505
+ )
2506
+ UNKNOWN =
2507
+ T.let(
2508
+ :unknown,
2509
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Result::TaggedSymbol
2510
+ )
2511
+ IOS_SCREENING_FILTER =
2512
+ T.let(
2513
+ :"ios-screening-filter",
2514
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Result::TaggedSymbol
2515
+ )
2516
+
2517
+ sig do
2518
+ override.returns(
2519
+ T::Array[
2520
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Result::TaggedSymbol
2521
+ ]
2522
+ )
2523
+ end
2524
+ def self.values
2525
+ end
2526
+ end
2527
+
2528
+ # The status of the call attempt.
2529
+ module Status
2530
+ extend Revox::Internal::Type::Enum
2531
+
2532
+ TaggedSymbol =
2533
+ T.type_alias do
2534
+ T.all(
2535
+ Symbol,
2536
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Status
2537
+ )
2538
+ end
2539
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2540
+
2541
+ QUEUED =
2542
+ T.let(
2543
+ :queued,
2544
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Status::TaggedSymbol
2545
+ )
2546
+ RINGING =
2547
+ T.let(
2548
+ :ringing,
2549
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Status::TaggedSymbol
2550
+ )
2551
+ ONGOING =
2552
+ T.let(
2553
+ :ongoing,
2554
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Status::TaggedSymbol
2555
+ )
2556
+ COMPLETED =
2557
+ T.let(
2558
+ :completed,
2559
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Status::TaggedSymbol
2560
+ )
2561
+ ERROR =
2562
+ T.let(
2563
+ :error,
2564
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Status::TaggedSymbol
2565
+ )
2566
+
2567
+ sig do
2568
+ override.returns(
2569
+ T::Array[
2570
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Status::TaggedSymbol
2571
+ ]
2572
+ )
2573
+ end
2574
+ def self.values
2575
+ end
2576
+ end
2577
+
2578
+ # Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or
2579
+ # 'system' (e.g. max duration limit).
2580
+ module EndedBy
2581
+ extend Revox::Internal::Type::Enum
2582
+
2583
+ TaggedSymbol =
2584
+ T.type_alias do
2585
+ T.all(
2586
+ Symbol,
2587
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::EndedBy
2588
+ )
2589
+ end
2590
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2591
+
2592
+ AGENT =
2593
+ T.let(
2594
+ :agent,
2595
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::EndedBy::TaggedSymbol
2596
+ )
2597
+ USER =
2598
+ T.let(
2599
+ :user,
2600
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::EndedBy::TaggedSymbol
2601
+ )
2602
+ SYSTEM =
2603
+ T.let(
2604
+ :system,
2605
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::EndedBy::TaggedSymbol
2606
+ )
2607
+
2608
+ sig do
2609
+ override.returns(
2610
+ T::Array[
2611
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::EndedBy::TaggedSymbol
2612
+ ]
2613
+ )
2614
+ end
2615
+ def self.values
2616
+ end
2617
+ end
2618
+
2619
+ class Transcript < Revox::Internal::Type::BaseModel
2620
+ OrHash =
2621
+ T.type_alias do
2622
+ T.any(
2623
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Transcript,
2624
+ Revox::Internal::AnyHash
2625
+ )
2626
+ end
2627
+
2628
+ sig { returns(String) }
2629
+ attr_accessor :content
2630
+
2631
+ sig do
2632
+ returns(
2633
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Transcript::Role::TaggedSymbol
2634
+ )
2635
+ end
2636
+ attr_accessor :role
2637
+
2638
+ sig do
2639
+ returns(
2640
+ T.nilable(
2641
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Transcript::ToolArguments::Variants
2642
+ )
2643
+ )
2644
+ end
2645
+ attr_reader :tool_arguments
2646
+
2647
+ sig do
2648
+ params(
2649
+ tool_arguments:
2650
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Transcript::ToolArguments::Variants
2651
+ ).void
2652
+ end
2653
+ attr_writer :tool_arguments
2654
+
2655
+ sig { returns(T.nilable(T::Boolean)) }
2656
+ attr_reader :tool_is_error
2657
+
2658
+ sig { params(tool_is_error: T::Boolean).void }
2659
+ attr_writer :tool_is_error
2660
+
2661
+ sig { returns(T.nilable(String)) }
2662
+ attr_reader :tool_name
2663
+
2664
+ sig { params(tool_name: String).void }
2665
+ attr_writer :tool_name
2666
+
2667
+ sig do
2668
+ params(
2669
+ content: String,
2670
+ role:
2671
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Transcript::Role::OrSymbol,
2672
+ tool_arguments:
2673
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Transcript::ToolArguments::Variants,
2674
+ tool_is_error: T::Boolean,
2675
+ tool_name: String
2676
+ ).returns(T.attached_class)
2677
+ end
2678
+ def self.new(
2679
+ content:,
2680
+ role:,
2681
+ tool_arguments: nil,
2682
+ tool_is_error: nil,
2683
+ tool_name: nil
2684
+ )
2685
+ end
2686
+
2687
+ sig do
2688
+ override.returns(
2689
+ {
2690
+ content: String,
2691
+ role:
2692
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Transcript::Role::TaggedSymbol,
2693
+ tool_arguments:
2694
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Transcript::ToolArguments::Variants,
2695
+ tool_is_error: T::Boolean,
2696
+ tool_name: String
2697
+ }
2698
+ )
2699
+ end
2700
+ def to_hash
2701
+ end
2702
+
2703
+ module Role
2704
+ extend Revox::Internal::Type::Enum
2705
+
2706
+ TaggedSymbol =
2707
+ T.type_alias do
2708
+ T.all(
2709
+ Symbol,
2710
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Transcript::Role
2711
+ )
2712
+ end
2713
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2714
+
2715
+ USER =
2716
+ T.let(
2717
+ :user,
2718
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Transcript::Role::TaggedSymbol
2719
+ )
2720
+ ASSISTANT =
2721
+ T.let(
2722
+ :assistant,
2723
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Transcript::Role::TaggedSymbol
2724
+ )
2725
+ TOOL =
2726
+ T.let(
2727
+ :tool,
2728
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Transcript::Role::TaggedSymbol
2729
+ )
2730
+
2731
+ sig do
2732
+ override.returns(
2733
+ T::Array[
2734
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Transcript::Role::TaggedSymbol
2735
+ ]
2736
+ )
2737
+ end
2738
+ def self.values
2739
+ end
2740
+ end
2741
+
2742
+ module ToolArguments
2743
+ extend Revox::Internal::Type::Union
2744
+
2745
+ Variants =
2746
+ T.type_alias { T.any(T::Hash[Symbol, T.anything], String) }
2747
+
2748
+ sig do
2749
+ override.returns(
2750
+ T::Array[
2751
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LastCallAttempt::Transcript::ToolArguments::Variants
2752
+ ]
2753
+ )
2754
+ end
2755
+ def self.variants
2756
+ end
2757
+
2758
+ UnionMember0Map =
2759
+ T.let(
2760
+ Revox::Internal::Type::HashOf[
2761
+ Revox::Internal::Type::Unknown
2762
+ ],
2763
+ Revox::Internal::Type::Converter
2764
+ )
2765
+ end
2766
+ end
2767
+ end
2768
+
2769
+ module LlmModel
2770
+ extend Revox::Internal::Type::Union
2771
+
2772
+ Variants =
2773
+ T.type_alias do
2774
+ T.any(
2775
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LlmModel::UnionMember0,
2776
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LlmModel::UnionMember1
2777
+ )
2778
+ end
2779
+
2780
+ class UnionMember0 < Revox::Internal::Type::BaseModel
2781
+ OrHash =
2782
+ T.type_alias do
2783
+ T.any(
2784
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LlmModel::UnionMember0,
2785
+ Revox::Internal::AnyHash
2786
+ )
2787
+ end
2788
+
2789
+ sig do
2790
+ returns(
2791
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LlmModel::UnionMember0::Name::TaggedSymbol
2792
+ )
2793
+ end
2794
+ attr_accessor :name
2795
+
2796
+ sig { returns(Symbol) }
2797
+ attr_accessor :type
2798
+
2799
+ sig do
2800
+ params(
2801
+ name:
2802
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LlmModel::UnionMember0::Name::OrSymbol,
2803
+ type: Symbol
2804
+ ).returns(T.attached_class)
2805
+ end
2806
+ def self.new(name:, type: :"dedicated-instance")
2807
+ end
2808
+
2809
+ sig do
2810
+ override.returns(
2811
+ {
2812
+ name:
2813
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LlmModel::UnionMember0::Name::TaggedSymbol,
2814
+ type: Symbol
2815
+ }
2816
+ )
2817
+ end
2818
+ def to_hash
2819
+ end
2820
+
2821
+ module Name
2822
+ extend Revox::Internal::Type::Enum
2823
+
2824
+ TaggedSymbol =
2825
+ T.type_alias do
2826
+ T.all(
2827
+ Symbol,
2828
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LlmModel::UnionMember0::Name
2829
+ )
2830
+ end
2831
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2832
+
2833
+ GPT_4_1 =
2834
+ T.let(
2835
+ :"gpt-4.1",
2836
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LlmModel::UnionMember0::Name::TaggedSymbol
2837
+ )
2838
+ MINISTRAL_3_8B_INSTRUCT =
2839
+ T.let(
2840
+ :"ministral-3-8b-instruct",
2841
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LlmModel::UnionMember0::Name::TaggedSymbol
2842
+ )
2843
+
2844
+ sig do
2845
+ override.returns(
2846
+ T::Array[
2847
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LlmModel::UnionMember0::Name::TaggedSymbol
2848
+ ]
2849
+ )
2850
+ end
2851
+ def self.values
2852
+ end
2853
+ end
2854
+ end
2855
+
2856
+ class UnionMember1 < Revox::Internal::Type::BaseModel
2857
+ OrHash =
2858
+ T.type_alias do
2859
+ T.any(
2860
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LlmModel::UnionMember1,
2861
+ Revox::Internal::AnyHash
2862
+ )
2863
+ end
2864
+
2865
+ # The model ID to use from OpenRouter. eg: openai/gpt-4.1
2866
+ sig { returns(String) }
2867
+ attr_accessor :openrouter_model_id
2868
+
2869
+ # The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
2870
+ sig { returns(String) }
2871
+ attr_accessor :openrouter_provider
2872
+
2873
+ # Use a model from OpenRouter.
2874
+ sig { returns(Symbol) }
2875
+ attr_accessor :type
2876
+
2877
+ sig do
2878
+ params(
2879
+ openrouter_model_id: String,
2880
+ openrouter_provider: String,
2881
+ type: Symbol
2882
+ ).returns(T.attached_class)
2883
+ end
2884
+ def self.new(
2885
+ # The model ID to use from OpenRouter. eg: openai/gpt-4.1
2886
+ openrouter_model_id:,
2887
+ # The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
2888
+ openrouter_provider:,
2889
+ # Use a model from OpenRouter.
2890
+ type: :openrouter
2891
+ )
2892
+ end
2893
+
2894
+ sig do
2895
+ override.returns(
2896
+ {
2897
+ openrouter_model_id: String,
2898
+ openrouter_provider: String,
2899
+ type: Symbol
2900
+ }
2901
+ )
2902
+ end
2903
+ def to_hash
2904
+ end
2905
+ end
2906
+
2907
+ sig do
2908
+ override.returns(
2909
+ T::Array[
2910
+ Revox::Models::CampaignGetRowsResponse::Row::Call::LlmModel::Variants
2911
+ ]
2912
+ )
2913
+ end
2914
+ def self.variants
2915
+ end
2916
+ end
2917
+
2918
+ # The status of the call.
2919
+ module Status
2920
+ extend Revox::Internal::Type::Enum
2921
+
2922
+ TaggedSymbol =
2923
+ T.type_alias do
2924
+ T.all(
2925
+ Symbol,
2926
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Status
2927
+ )
2928
+ end
2929
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2930
+
2931
+ INITIALIZING =
2932
+ T.let(
2933
+ :initializing,
2934
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Status::TaggedSymbol
2935
+ )
2936
+ QUEUED_FOR_CALLING =
2937
+ T.let(
2938
+ :queued_for_calling,
2939
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Status::TaggedSymbol
2940
+ )
2941
+ CALLING =
2942
+ T.let(
2943
+ :calling,
2944
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Status::TaggedSymbol
2945
+ )
2946
+ SCHEDULED =
2947
+ T.let(
2948
+ :scheduled,
2949
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Status::TaggedSymbol
2950
+ )
2951
+ COMPLETED =
2952
+ T.let(
2953
+ :completed,
2954
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Status::TaggedSymbol
2955
+ )
2956
+ CANCELLED =
2957
+ T.let(
2958
+ :cancelled,
2959
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Status::TaggedSymbol
2960
+ )
2961
+ ERRORED =
2962
+ T.let(
2963
+ :errored,
2964
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Status::TaggedSymbol
2965
+ )
2966
+
2967
+ sig do
2968
+ override.returns(
2969
+ T::Array[
2970
+ Revox::Models::CampaignGetRowsResponse::Row::Call::Status::TaggedSymbol
2971
+ ]
2972
+ )
2973
+ end
2974
+ def self.values
2975
+ end
2976
+ end
2977
+ end
2978
+ end
2979
+ end
2980
+ end
2981
+ end