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,1482 @@
1
+ # typed: strong
2
+
3
+ module Revox
4
+ module Models
5
+ class CampaignListResponse < Revox::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Revox::Models::CampaignListResponse, Revox::Internal::AnyHash)
9
+ end
10
+
11
+ sig { returns(T::Array[Revox::Models::CampaignListResponse::Campaign]) }
12
+ attr_accessor :campaigns
13
+
14
+ sig do
15
+ params(
16
+ campaigns:
17
+ T::Array[Revox::Models::CampaignListResponse::Campaign::OrHash]
18
+ ).returns(T.attached_class)
19
+ end
20
+ def self.new(campaigns:)
21
+ end
22
+
23
+ sig do
24
+ override.returns(
25
+ { campaigns: T::Array[Revox::Models::CampaignListResponse::Campaign] }
26
+ )
27
+ end
28
+ def to_hash
29
+ end
30
+
31
+ class Campaign < Revox::Internal::Type::BaseModel
32
+ OrHash =
33
+ T.type_alias do
34
+ T.any(
35
+ Revox::Models::CampaignListResponse::Campaign,
36
+ Revox::Internal::AnyHash
37
+ )
38
+ end
39
+
40
+ sig { returns(String) }
41
+ attr_accessor :id
42
+
43
+ sig { returns(String) }
44
+ attr_accessor :assistant_id
45
+
46
+ sig { returns(T.anything) }
47
+ attr_accessor :created_at
48
+
49
+ sig { returns(T::Boolean) }
50
+ attr_accessor :is_cancelled
51
+
52
+ sig { returns(String) }
53
+ attr_accessor :name
54
+
55
+ sig { returns(String) }
56
+ attr_accessor :organization_id
57
+
58
+ sig do
59
+ returns(
60
+ Revox::Models::CampaignListResponse::Campaign::Status::TaggedSymbol
61
+ )
62
+ end
63
+ attr_accessor :status
64
+
65
+ sig { returns(T.anything) }
66
+ attr_accessor :updated_at
67
+
68
+ sig do
69
+ returns(
70
+ T.nilable(Revox::Models::CampaignListResponse::Campaign::Assistant)
71
+ )
72
+ end
73
+ attr_reader :assistant
74
+
75
+ sig do
76
+ params(
77
+ assistant:
78
+ Revox::Models::CampaignListResponse::Campaign::Assistant::OrHash
79
+ ).void
80
+ end
81
+ attr_writer :assistant
82
+
83
+ # Configuration for call retry behavior including time windows, delays, and max
84
+ # iterations. If not provided, defaults will be used.
85
+ sig do
86
+ returns(
87
+ T.nilable(
88
+ Revox::Models::CampaignListResponse::Campaign::CallRetryConfig
89
+ )
90
+ )
91
+ end
92
+ attr_reader :call_retry_config
93
+
94
+ sig do
95
+ params(
96
+ call_retry_config:
97
+ T.nilable(
98
+ Revox::Models::CampaignListResponse::Campaign::CallRetryConfig::OrHash
99
+ )
100
+ ).void
101
+ end
102
+ attr_writer :call_retry_config
103
+
104
+ sig { returns(T.nilable(String)) }
105
+ attr_accessor :from_phone_number
106
+
107
+ sig { returns(T.nilable(Float)) }
108
+ attr_accessor :max_concurrent_calls
109
+
110
+ sig do
111
+ returns(
112
+ T.nilable(Revox::Models::CampaignListResponse::Campaign::RowStats)
113
+ )
114
+ end
115
+ attr_reader :row_stats
116
+
117
+ sig do
118
+ params(
119
+ row_stats:
120
+ Revox::Models::CampaignListResponse::Campaign::RowStats::OrHash
121
+ ).void
122
+ end
123
+ attr_writer :row_stats
124
+
125
+ sig { returns(T.nilable(T.anything)) }
126
+ attr_reader :scheduled_at
127
+
128
+ sig { params(scheduled_at: T.anything).void }
129
+ attr_writer :scheduled_at
130
+
131
+ sig do
132
+ params(
133
+ id: String,
134
+ assistant_id: String,
135
+ created_at: T.anything,
136
+ is_cancelled: T::Boolean,
137
+ name: String,
138
+ organization_id: String,
139
+ status:
140
+ Revox::Models::CampaignListResponse::Campaign::Status::OrSymbol,
141
+ updated_at: T.anything,
142
+ assistant:
143
+ Revox::Models::CampaignListResponse::Campaign::Assistant::OrHash,
144
+ call_retry_config:
145
+ T.nilable(
146
+ Revox::Models::CampaignListResponse::Campaign::CallRetryConfig::OrHash
147
+ ),
148
+ from_phone_number: T.nilable(String),
149
+ max_concurrent_calls: T.nilable(Float),
150
+ row_stats:
151
+ Revox::Models::CampaignListResponse::Campaign::RowStats::OrHash,
152
+ scheduled_at: T.anything
153
+ ).returns(T.attached_class)
154
+ end
155
+ def self.new(
156
+ id:,
157
+ assistant_id:,
158
+ created_at:,
159
+ is_cancelled:,
160
+ name:,
161
+ organization_id:,
162
+ status:,
163
+ updated_at:,
164
+ assistant: nil,
165
+ # Configuration for call retry behavior including time windows, delays, and max
166
+ # iterations. If not provided, defaults will be used.
167
+ call_retry_config: nil,
168
+ from_phone_number: nil,
169
+ max_concurrent_calls: nil,
170
+ row_stats: nil,
171
+ scheduled_at: nil
172
+ )
173
+ end
174
+
175
+ sig do
176
+ override.returns(
177
+ {
178
+ id: String,
179
+ assistant_id: String,
180
+ created_at: T.anything,
181
+ is_cancelled: T::Boolean,
182
+ name: String,
183
+ organization_id: String,
184
+ status:
185
+ Revox::Models::CampaignListResponse::Campaign::Status::TaggedSymbol,
186
+ updated_at: T.anything,
187
+ assistant:
188
+ Revox::Models::CampaignListResponse::Campaign::Assistant,
189
+ call_retry_config:
190
+ T.nilable(
191
+ Revox::Models::CampaignListResponse::Campaign::CallRetryConfig
192
+ ),
193
+ from_phone_number: T.nilable(String),
194
+ max_concurrent_calls: T.nilable(Float),
195
+ row_stats:
196
+ Revox::Models::CampaignListResponse::Campaign::RowStats,
197
+ scheduled_at: T.anything
198
+ }
199
+ )
200
+ end
201
+ def to_hash
202
+ end
203
+
204
+ module Status
205
+ extend Revox::Internal::Type::Enum
206
+
207
+ TaggedSymbol =
208
+ T.type_alias do
209
+ T.all(
210
+ Symbol,
211
+ Revox::Models::CampaignListResponse::Campaign::Status
212
+ )
213
+ end
214
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
215
+
216
+ DRAFT =
217
+ T.let(
218
+ :draft,
219
+ Revox::Models::CampaignListResponse::Campaign::Status::TaggedSymbol
220
+ )
221
+ RUNNING =
222
+ T.let(
223
+ :running,
224
+ Revox::Models::CampaignListResponse::Campaign::Status::TaggedSymbol
225
+ )
226
+ PAUSED =
227
+ T.let(
228
+ :paused,
229
+ Revox::Models::CampaignListResponse::Campaign::Status::TaggedSymbol
230
+ )
231
+ COMPLETED =
232
+ T.let(
233
+ :completed,
234
+ Revox::Models::CampaignListResponse::Campaign::Status::TaggedSymbol
235
+ )
236
+
237
+ sig do
238
+ override.returns(
239
+ T::Array[
240
+ Revox::Models::CampaignListResponse::Campaign::Status::TaggedSymbol
241
+ ]
242
+ )
243
+ end
244
+ def self.values
245
+ end
246
+ end
247
+
248
+ class Assistant < Revox::Internal::Type::BaseModel
249
+ OrHash =
250
+ T.type_alias do
251
+ T.any(
252
+ Revox::Models::CampaignListResponse::Campaign::Assistant,
253
+ Revox::Internal::AnyHash
254
+ )
255
+ end
256
+
257
+ sig { returns(String) }
258
+ attr_accessor :id
259
+
260
+ # The background sound to play during the call. Useful to give the impression that
261
+ # your AI agent is in an office.
262
+ sig do
263
+ returns(
264
+ T.nilable(
265
+ Revox::Models::CampaignListResponse::Campaign::Assistant::BackgroundSound::TaggedSymbol
266
+ )
267
+ )
268
+ end
269
+ attr_accessor :background_sound
270
+
271
+ sig do
272
+ returns(
273
+ T.nilable(
274
+ Revox::Models::CampaignListResponse::Campaign::Assistant::Calendly
275
+ )
276
+ )
277
+ end
278
+ attr_reader :calendly
279
+
280
+ sig do
281
+ params(
282
+ calendly:
283
+ T.nilable(
284
+ Revox::Models::CampaignListResponse::Campaign::Assistant::Calendly::OrHash
285
+ )
286
+ ).void
287
+ end
288
+ attr_writer :calendly
289
+
290
+ # Configuration for call retry behavior including time windows, delays, and max
291
+ # iterations. If not provided, defaults will be used.
292
+ sig do
293
+ returns(
294
+ T.nilable(
295
+ Revox::Models::CampaignListResponse::Campaign::Assistant::CallRetryConfig
296
+ )
297
+ )
298
+ end
299
+ attr_reader :call_retry_config
300
+
301
+ sig do
302
+ params(
303
+ call_retry_config:
304
+ T.nilable(
305
+ Revox::Models::CampaignListResponse::Campaign::Assistant::CallRetryConfig::OrHash
306
+ )
307
+ ).void
308
+ end
309
+ attr_writer :call_retry_config
310
+
311
+ sig { returns(T.anything) }
312
+ attr_accessor :created_at
313
+
314
+ sig { returns(T.nilable(String)) }
315
+ attr_accessor :end_of_call_sentence
316
+
317
+ sig { returns(T.nilable(String)) }
318
+ attr_accessor :first_sentence
319
+
320
+ # Delay in milliseconds before speaking the first sentence. Default: 400.
321
+ sig { returns(Integer) }
322
+ attr_accessor :first_sentence_delay_ms
323
+
324
+ sig do
325
+ returns(
326
+ Revox::Models::CampaignListResponse::Campaign::Assistant::FirstSentenceMode::TaggedSymbol
327
+ )
328
+ end
329
+ attr_accessor :first_sentence_mode
330
+
331
+ # Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
332
+ # skip turns to navigate phone menus.
333
+ sig { returns(T::Boolean) }
334
+ attr_accessor :ivr_navigation_enabled
335
+
336
+ sig do
337
+ returns(
338
+ Revox::Models::CampaignListResponse::Campaign::Assistant::LlmModel::Variants
339
+ )
340
+ end
341
+ attr_accessor :llm_model
342
+
343
+ # The maximum duration of the call in seconds. This is the maximum time the call
344
+ # will be allowed to run.
345
+ sig { returns(Float) }
346
+ attr_accessor :max_call_duration_secs
347
+
348
+ sig { returns(String) }
349
+ attr_accessor :name
350
+
351
+ sig { returns(String) }
352
+ attr_accessor :organization_id
353
+
354
+ sig { returns(String) }
355
+ attr_accessor :prompt
356
+
357
+ # The structured output config to use for the call. This is used to extract the
358
+ # data from the call (like email, name, company name, etc.).
359
+ sig do
360
+ returns(
361
+ T.nilable(
362
+ T::Array[
363
+ Revox::Models::CampaignListResponse::Campaign::Assistant::StructuredOutputConfig
364
+ ]
365
+ )
366
+ )
367
+ end
368
+ attr_accessor :structured_output_config
369
+
370
+ # Phone number to transfer calls to when users request to speak to a human agent.
371
+ sig { returns(T.nilable(String)) }
372
+ attr_accessor :transfer_phone_number
373
+
374
+ sig { returns(T.anything) }
375
+ attr_accessor :updated_at
376
+
377
+ sig do
378
+ returns(
379
+ T.nilable(
380
+ Revox::Models::CampaignListResponse::Campaign::Assistant::Voice
381
+ )
382
+ )
383
+ end
384
+ attr_reader :voice
385
+
386
+ sig do
387
+ params(
388
+ voice:
389
+ T.nilable(
390
+ Revox::Models::CampaignListResponse::Campaign::Assistant::Voice::OrHash
391
+ )
392
+ ).void
393
+ end
394
+ attr_writer :voice
395
+
396
+ # If set, when voicemail is detected the agent will speak this message then hang
397
+ # up; if null, hang up immediately.
398
+ sig { returns(T.nilable(String)) }
399
+ attr_accessor :voicemail_message
400
+
401
+ # The webhook URL to call when the call is completed.
402
+ sig { returns(T.nilable(String)) }
403
+ attr_accessor :webhook_url
404
+
405
+ sig do
406
+ returns(
407
+ T.nilable(
408
+ T::Array[
409
+ Revox::Models::CampaignListResponse::Campaign::Assistant::FaqItem
410
+ ]
411
+ )
412
+ )
413
+ end
414
+ attr_reader :faq_items
415
+
416
+ sig do
417
+ params(
418
+ faq_items:
419
+ T::Array[
420
+ Revox::Models::CampaignListResponse::Campaign::Assistant::FaqItem::OrHash
421
+ ]
422
+ ).void
423
+ end
424
+ attr_writer :faq_items
425
+
426
+ sig { returns(T.nilable(Float)) }
427
+ attr_reader :pending_faq_count
428
+
429
+ sig { params(pending_faq_count: Float).void }
430
+ attr_writer :pending_faq_count
431
+
432
+ sig do
433
+ params(
434
+ id: String,
435
+ background_sound:
436
+ T.nilable(
437
+ Revox::Models::CampaignListResponse::Campaign::Assistant::BackgroundSound::OrSymbol
438
+ ),
439
+ calendly:
440
+ T.nilable(
441
+ Revox::Models::CampaignListResponse::Campaign::Assistant::Calendly::OrHash
442
+ ),
443
+ call_retry_config:
444
+ T.nilable(
445
+ Revox::Models::CampaignListResponse::Campaign::Assistant::CallRetryConfig::OrHash
446
+ ),
447
+ created_at: T.anything,
448
+ end_of_call_sentence: T.nilable(String),
449
+ first_sentence: T.nilable(String),
450
+ first_sentence_delay_ms: Integer,
451
+ first_sentence_mode:
452
+ Revox::Models::CampaignListResponse::Campaign::Assistant::FirstSentenceMode::OrSymbol,
453
+ ivr_navigation_enabled: T::Boolean,
454
+ llm_model:
455
+ T.any(
456
+ Revox::Models::CampaignListResponse::Campaign::Assistant::LlmModel::UnionMember0::OrHash,
457
+ Revox::Models::CampaignListResponse::Campaign::Assistant::LlmModel::UnionMember1::OrHash
458
+ ),
459
+ max_call_duration_secs: Float,
460
+ name: String,
461
+ organization_id: String,
462
+ prompt: String,
463
+ structured_output_config:
464
+ T.nilable(
465
+ T::Array[
466
+ Revox::Models::CampaignListResponse::Campaign::Assistant::StructuredOutputConfig::OrHash
467
+ ]
468
+ ),
469
+ transfer_phone_number: T.nilable(String),
470
+ updated_at: T.anything,
471
+ voice:
472
+ T.nilable(
473
+ Revox::Models::CampaignListResponse::Campaign::Assistant::Voice::OrHash
474
+ ),
475
+ voicemail_message: T.nilable(String),
476
+ webhook_url: T.nilable(String),
477
+ faq_items:
478
+ T::Array[
479
+ Revox::Models::CampaignListResponse::Campaign::Assistant::FaqItem::OrHash
480
+ ],
481
+ pending_faq_count: Float
482
+ ).returns(T.attached_class)
483
+ end
484
+ def self.new(
485
+ id:,
486
+ # The background sound to play during the call. Useful to give the impression that
487
+ # your AI agent is in an office.
488
+ background_sound:,
489
+ calendly:,
490
+ # Configuration for call retry behavior including time windows, delays, and max
491
+ # iterations. If not provided, defaults will be used.
492
+ call_retry_config:,
493
+ created_at:,
494
+ end_of_call_sentence:,
495
+ first_sentence:,
496
+ # Delay in milliseconds before speaking the first sentence. Default: 400.
497
+ first_sentence_delay_ms:,
498
+ first_sentence_mode:,
499
+ # Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
500
+ # skip turns to navigate phone menus.
501
+ ivr_navigation_enabled:,
502
+ llm_model:,
503
+ # The maximum duration of the call in seconds. This is the maximum time the call
504
+ # will be allowed to run.
505
+ max_call_duration_secs:,
506
+ name:,
507
+ organization_id:,
508
+ prompt:,
509
+ # The structured output config to use for the call. This is used to extract the
510
+ # data from the call (like email, name, company name, etc.).
511
+ structured_output_config:,
512
+ # Phone number to transfer calls to when users request to speak to a human agent.
513
+ transfer_phone_number:,
514
+ updated_at:,
515
+ voice:,
516
+ # If set, when voicemail is detected the agent will speak this message then hang
517
+ # up; if null, hang up immediately.
518
+ voicemail_message:,
519
+ # The webhook URL to call when the call is completed.
520
+ webhook_url:,
521
+ faq_items: nil,
522
+ pending_faq_count: nil
523
+ )
524
+ end
525
+
526
+ sig do
527
+ override.returns(
528
+ {
529
+ id: String,
530
+ background_sound:
531
+ T.nilable(
532
+ Revox::Models::CampaignListResponse::Campaign::Assistant::BackgroundSound::TaggedSymbol
533
+ ),
534
+ calendly:
535
+ T.nilable(
536
+ Revox::Models::CampaignListResponse::Campaign::Assistant::Calendly
537
+ ),
538
+ call_retry_config:
539
+ T.nilable(
540
+ Revox::Models::CampaignListResponse::Campaign::Assistant::CallRetryConfig
541
+ ),
542
+ created_at: T.anything,
543
+ end_of_call_sentence: T.nilable(String),
544
+ first_sentence: T.nilable(String),
545
+ first_sentence_delay_ms: Integer,
546
+ first_sentence_mode:
547
+ Revox::Models::CampaignListResponse::Campaign::Assistant::FirstSentenceMode::TaggedSymbol,
548
+ ivr_navigation_enabled: T::Boolean,
549
+ llm_model:
550
+ Revox::Models::CampaignListResponse::Campaign::Assistant::LlmModel::Variants,
551
+ max_call_duration_secs: Float,
552
+ name: String,
553
+ organization_id: String,
554
+ prompt: String,
555
+ structured_output_config:
556
+ T.nilable(
557
+ T::Array[
558
+ Revox::Models::CampaignListResponse::Campaign::Assistant::StructuredOutputConfig
559
+ ]
560
+ ),
561
+ transfer_phone_number: T.nilable(String),
562
+ updated_at: T.anything,
563
+ voice:
564
+ T.nilable(
565
+ Revox::Models::CampaignListResponse::Campaign::Assistant::Voice
566
+ ),
567
+ voicemail_message: T.nilable(String),
568
+ webhook_url: T.nilable(String),
569
+ faq_items:
570
+ T::Array[
571
+ Revox::Models::CampaignListResponse::Campaign::Assistant::FaqItem
572
+ ],
573
+ pending_faq_count: Float
574
+ }
575
+ )
576
+ end
577
+ def to_hash
578
+ end
579
+
580
+ # The background sound to play during the call. Useful to give the impression that
581
+ # your AI agent is in an office.
582
+ module BackgroundSound
583
+ extend Revox::Internal::Type::Enum
584
+
585
+ TaggedSymbol =
586
+ T.type_alias do
587
+ T.all(
588
+ Symbol,
589
+ Revox::Models::CampaignListResponse::Campaign::Assistant::BackgroundSound
590
+ )
591
+ end
592
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
593
+
594
+ AUDIO_OFFICE_OGG =
595
+ T.let(
596
+ :"audio/office.ogg",
597
+ Revox::Models::CampaignListResponse::Campaign::Assistant::BackgroundSound::TaggedSymbol
598
+ )
599
+
600
+ sig do
601
+ override.returns(
602
+ T::Array[
603
+ Revox::Models::CampaignListResponse::Campaign::Assistant::BackgroundSound::TaggedSymbol
604
+ ]
605
+ )
606
+ end
607
+ def self.values
608
+ end
609
+ end
610
+
611
+ class Calendly < Revox::Internal::Type::BaseModel
612
+ OrHash =
613
+ T.type_alias do
614
+ T.any(
615
+ Revox::Models::CampaignListResponse::Campaign::Assistant::Calendly,
616
+ Revox::Internal::AnyHash
617
+ )
618
+ end
619
+
620
+ # The connection ID representing the link between your Calendly account and Revox.
621
+ sig { returns(String) }
622
+ attr_accessor :connection_id
623
+
624
+ # The event type ID representing the event type to schedule. (eg:
625
+ # https://api.calendly.com/event_types/b2330295-2a91-4a1d-bb73-99e7707663d5)
626
+ sig { returns(String) }
627
+ attr_accessor :event_type_id
628
+
629
+ sig do
630
+ params(connection_id: String, event_type_id: String).returns(
631
+ T.attached_class
632
+ )
633
+ end
634
+ def self.new(
635
+ # The connection ID representing the link between your Calendly account and Revox.
636
+ connection_id:,
637
+ # The event type ID representing the event type to schedule. (eg:
638
+ # https://api.calendly.com/event_types/b2330295-2a91-4a1d-bb73-99e7707663d5)
639
+ event_type_id:
640
+ )
641
+ end
642
+
643
+ sig do
644
+ override.returns({ connection_id: String, event_type_id: String })
645
+ end
646
+ def to_hash
647
+ end
648
+ end
649
+
650
+ class CallRetryConfig < Revox::Internal::Type::BaseModel
651
+ OrHash =
652
+ T.type_alias do
653
+ T.any(
654
+ Revox::Models::CampaignListResponse::Campaign::Assistant::CallRetryConfig,
655
+ Revox::Internal::AnyHash
656
+ )
657
+ end
658
+
659
+ sig do
660
+ returns(
661
+ T::Array[
662
+ Revox::Models::CampaignListResponse::Campaign::Assistant::CallRetryConfig::CallingWindow
663
+ ]
664
+ )
665
+ end
666
+ attr_accessor :calling_windows
667
+
668
+ # Maximum number of call retry attempts. Default: 3.
669
+ sig { returns(Integer) }
670
+ attr_accessor :max_retry_attempts
671
+
672
+ # Optional IANA timezone identifier to override the automatic timezone detection
673
+ # from phone number. If not provided, timezone is determined from the recipient's
674
+ # phone number country code. Examples: 'America/New_York', 'Europe/Paris'.
675
+ sig { returns(T.nilable(String)) }
676
+ attr_accessor :timezone
677
+
678
+ # Configuration for call retry behavior including time windows, delays, and max
679
+ # iterations. If not provided, defaults will be used.
680
+ sig do
681
+ params(
682
+ calling_windows:
683
+ T::Array[
684
+ Revox::Models::CampaignListResponse::Campaign::Assistant::CallRetryConfig::CallingWindow::OrHash
685
+ ],
686
+ max_retry_attempts: Integer,
687
+ timezone: T.nilable(String)
688
+ ).returns(T.attached_class)
689
+ end
690
+ def self.new(
691
+ calling_windows:,
692
+ # Maximum number of call retry attempts. Default: 3.
693
+ max_retry_attempts:,
694
+ # Optional IANA timezone identifier to override the automatic timezone detection
695
+ # from phone number. If not provided, timezone is determined from the recipient's
696
+ # phone number country code. Examples: 'America/New_York', 'Europe/Paris'.
697
+ timezone: nil
698
+ )
699
+ end
700
+
701
+ sig do
702
+ override.returns(
703
+ {
704
+ calling_windows:
705
+ T::Array[
706
+ Revox::Models::CampaignListResponse::Campaign::Assistant::CallRetryConfig::CallingWindow
707
+ ],
708
+ max_retry_attempts: Integer,
709
+ timezone: T.nilable(String)
710
+ }
711
+ )
712
+ end
713
+ def to_hash
714
+ end
715
+
716
+ class CallingWindow < Revox::Internal::Type::BaseModel
717
+ OrHash =
718
+ T.type_alias do
719
+ T.any(
720
+ Revox::Models::CampaignListResponse::Campaign::Assistant::CallRetryConfig::CallingWindow,
721
+ Revox::Internal::AnyHash
722
+ )
723
+ end
724
+
725
+ # End time for the calling window in the recipient's timezone (or
726
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
727
+ # Examples: '17:00', '6pm'. Default: '18:00'.
728
+ sig { returns(String) }
729
+ attr_accessor :calling_window_end_time
730
+
731
+ # Start time for the calling window in the recipient's timezone (or
732
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
733
+ # Examples: '09:00', '10am'. Default: '10:00'.
734
+ sig { returns(String) }
735
+ attr_accessor :calling_window_start_time
736
+
737
+ # Delay between retry attempts in seconds. Default: 7200 (2 hours).
738
+ sig { returns(Integer) }
739
+ attr_accessor :retry_delay_seconds
740
+
741
+ sig do
742
+ params(
743
+ calling_window_end_time: String,
744
+ calling_window_start_time: String,
745
+ retry_delay_seconds: Integer
746
+ ).returns(T.attached_class)
747
+ end
748
+ def self.new(
749
+ # End time for the calling window in the recipient's timezone (or
750
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
751
+ # Examples: '17:00', '6pm'. Default: '18:00'.
752
+ calling_window_end_time:,
753
+ # Start time for the calling window in the recipient's timezone (or
754
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
755
+ # Examples: '09:00', '10am'. Default: '10:00'.
756
+ calling_window_start_time:,
757
+ # Delay between retry attempts in seconds. Default: 7200 (2 hours).
758
+ retry_delay_seconds:
759
+ )
760
+ end
761
+
762
+ sig do
763
+ override.returns(
764
+ {
765
+ calling_window_end_time: String,
766
+ calling_window_start_time: String,
767
+ retry_delay_seconds: Integer
768
+ }
769
+ )
770
+ end
771
+ def to_hash
772
+ end
773
+ end
774
+ end
775
+
776
+ module FirstSentenceMode
777
+ extend Revox::Internal::Type::Enum
778
+
779
+ TaggedSymbol =
780
+ T.type_alias do
781
+ T.all(
782
+ Symbol,
783
+ Revox::Models::CampaignListResponse::Campaign::Assistant::FirstSentenceMode
784
+ )
785
+ end
786
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
787
+
788
+ GENERATED =
789
+ T.let(
790
+ :generated,
791
+ Revox::Models::CampaignListResponse::Campaign::Assistant::FirstSentenceMode::TaggedSymbol
792
+ )
793
+ STATIC =
794
+ T.let(
795
+ :static,
796
+ Revox::Models::CampaignListResponse::Campaign::Assistant::FirstSentenceMode::TaggedSymbol
797
+ )
798
+ NONE =
799
+ T.let(
800
+ :none,
801
+ Revox::Models::CampaignListResponse::Campaign::Assistant::FirstSentenceMode::TaggedSymbol
802
+ )
803
+
804
+ sig do
805
+ override.returns(
806
+ T::Array[
807
+ Revox::Models::CampaignListResponse::Campaign::Assistant::FirstSentenceMode::TaggedSymbol
808
+ ]
809
+ )
810
+ end
811
+ def self.values
812
+ end
813
+ end
814
+
815
+ module LlmModel
816
+ extend Revox::Internal::Type::Union
817
+
818
+ Variants =
819
+ T.type_alias do
820
+ T.any(
821
+ Revox::Models::CampaignListResponse::Campaign::Assistant::LlmModel::UnionMember0,
822
+ Revox::Models::CampaignListResponse::Campaign::Assistant::LlmModel::UnionMember1
823
+ )
824
+ end
825
+
826
+ class UnionMember0 < Revox::Internal::Type::BaseModel
827
+ OrHash =
828
+ T.type_alias do
829
+ T.any(
830
+ Revox::Models::CampaignListResponse::Campaign::Assistant::LlmModel::UnionMember0,
831
+ Revox::Internal::AnyHash
832
+ )
833
+ end
834
+
835
+ sig do
836
+ returns(
837
+ Revox::Models::CampaignListResponse::Campaign::Assistant::LlmModel::UnionMember0::Name::TaggedSymbol
838
+ )
839
+ end
840
+ attr_accessor :name
841
+
842
+ sig { returns(Symbol) }
843
+ attr_accessor :type
844
+
845
+ sig do
846
+ params(
847
+ name:
848
+ Revox::Models::CampaignListResponse::Campaign::Assistant::LlmModel::UnionMember0::Name::OrSymbol,
849
+ type: Symbol
850
+ ).returns(T.attached_class)
851
+ end
852
+ def self.new(name:, type: :"dedicated-instance")
853
+ end
854
+
855
+ sig do
856
+ override.returns(
857
+ {
858
+ name:
859
+ Revox::Models::CampaignListResponse::Campaign::Assistant::LlmModel::UnionMember0::Name::TaggedSymbol,
860
+ type: Symbol
861
+ }
862
+ )
863
+ end
864
+ def to_hash
865
+ end
866
+
867
+ module Name
868
+ extend Revox::Internal::Type::Enum
869
+
870
+ TaggedSymbol =
871
+ T.type_alias do
872
+ T.all(
873
+ Symbol,
874
+ Revox::Models::CampaignListResponse::Campaign::Assistant::LlmModel::UnionMember0::Name
875
+ )
876
+ end
877
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
878
+
879
+ GPT_4_1 =
880
+ T.let(
881
+ :"gpt-4.1",
882
+ Revox::Models::CampaignListResponse::Campaign::Assistant::LlmModel::UnionMember0::Name::TaggedSymbol
883
+ )
884
+ MINISTRAL_3_8B_INSTRUCT =
885
+ T.let(
886
+ :"ministral-3-8b-instruct",
887
+ Revox::Models::CampaignListResponse::Campaign::Assistant::LlmModel::UnionMember0::Name::TaggedSymbol
888
+ )
889
+
890
+ sig do
891
+ override.returns(
892
+ T::Array[
893
+ Revox::Models::CampaignListResponse::Campaign::Assistant::LlmModel::UnionMember0::Name::TaggedSymbol
894
+ ]
895
+ )
896
+ end
897
+ def self.values
898
+ end
899
+ end
900
+ end
901
+
902
+ class UnionMember1 < Revox::Internal::Type::BaseModel
903
+ OrHash =
904
+ T.type_alias do
905
+ T.any(
906
+ Revox::Models::CampaignListResponse::Campaign::Assistant::LlmModel::UnionMember1,
907
+ Revox::Internal::AnyHash
908
+ )
909
+ end
910
+
911
+ # The model ID to use from OpenRouter. eg: openai/gpt-4.1
912
+ sig { returns(String) }
913
+ attr_accessor :openrouter_model_id
914
+
915
+ # The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
916
+ sig { returns(String) }
917
+ attr_accessor :openrouter_provider
918
+
919
+ # Use a model from OpenRouter.
920
+ sig { returns(Symbol) }
921
+ attr_accessor :type
922
+
923
+ sig do
924
+ params(
925
+ openrouter_model_id: String,
926
+ openrouter_provider: String,
927
+ type: Symbol
928
+ ).returns(T.attached_class)
929
+ end
930
+ def self.new(
931
+ # The model ID to use from OpenRouter. eg: openai/gpt-4.1
932
+ openrouter_model_id:,
933
+ # The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
934
+ openrouter_provider:,
935
+ # Use a model from OpenRouter.
936
+ type: :openrouter
937
+ )
938
+ end
939
+
940
+ sig do
941
+ override.returns(
942
+ {
943
+ openrouter_model_id: String,
944
+ openrouter_provider: String,
945
+ type: Symbol
946
+ }
947
+ )
948
+ end
949
+ def to_hash
950
+ end
951
+ end
952
+
953
+ sig do
954
+ override.returns(
955
+ T::Array[
956
+ Revox::Models::CampaignListResponse::Campaign::Assistant::LlmModel::Variants
957
+ ]
958
+ )
959
+ end
960
+ def self.variants
961
+ end
962
+ end
963
+
964
+ class StructuredOutputConfig < Revox::Internal::Type::BaseModel
965
+ OrHash =
966
+ T.type_alias do
967
+ T.any(
968
+ Revox::Models::CampaignListResponse::Campaign::Assistant::StructuredOutputConfig,
969
+ Revox::Internal::AnyHash
970
+ )
971
+ end
972
+
973
+ sig { returns(String) }
974
+ attr_accessor :name
975
+
976
+ sig { returns(T::Boolean) }
977
+ attr_accessor :required
978
+
979
+ sig do
980
+ returns(
981
+ Revox::Models::CampaignListResponse::Campaign::Assistant::StructuredOutputConfig::Type::TaggedSymbol
982
+ )
983
+ end
984
+ attr_accessor :type
985
+
986
+ sig { returns(T.nilable(String)) }
987
+ attr_reader :description
988
+
989
+ sig { params(description: String).void }
990
+ attr_writer :description
991
+
992
+ sig { returns(T.nilable(T::Array[String])) }
993
+ attr_reader :enum_options
994
+
995
+ sig { params(enum_options: T::Array[String]).void }
996
+ attr_writer :enum_options
997
+
998
+ sig do
999
+ params(
1000
+ name: String,
1001
+ required: T::Boolean,
1002
+ type:
1003
+ Revox::Models::CampaignListResponse::Campaign::Assistant::StructuredOutputConfig::Type::OrSymbol,
1004
+ description: String,
1005
+ enum_options: T::Array[String]
1006
+ ).returns(T.attached_class)
1007
+ end
1008
+ def self.new(
1009
+ name:,
1010
+ required:,
1011
+ type:,
1012
+ description: nil,
1013
+ enum_options: nil
1014
+ )
1015
+ end
1016
+
1017
+ sig do
1018
+ override.returns(
1019
+ {
1020
+ name: String,
1021
+ required: T::Boolean,
1022
+ type:
1023
+ Revox::Models::CampaignListResponse::Campaign::Assistant::StructuredOutputConfig::Type::TaggedSymbol,
1024
+ description: String,
1025
+ enum_options: T::Array[String]
1026
+ }
1027
+ )
1028
+ end
1029
+ def to_hash
1030
+ end
1031
+
1032
+ module Type
1033
+ extend Revox::Internal::Type::Enum
1034
+
1035
+ TaggedSymbol =
1036
+ T.type_alias do
1037
+ T.all(
1038
+ Symbol,
1039
+ Revox::Models::CampaignListResponse::Campaign::Assistant::StructuredOutputConfig::Type
1040
+ )
1041
+ end
1042
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1043
+
1044
+ STRING =
1045
+ T.let(
1046
+ :string,
1047
+ Revox::Models::CampaignListResponse::Campaign::Assistant::StructuredOutputConfig::Type::TaggedSymbol
1048
+ )
1049
+ NUMBER =
1050
+ T.let(
1051
+ :number,
1052
+ Revox::Models::CampaignListResponse::Campaign::Assistant::StructuredOutputConfig::Type::TaggedSymbol
1053
+ )
1054
+ BOOLEAN =
1055
+ T.let(
1056
+ :boolean,
1057
+ Revox::Models::CampaignListResponse::Campaign::Assistant::StructuredOutputConfig::Type::TaggedSymbol
1058
+ )
1059
+ ENUM =
1060
+ T.let(
1061
+ :enum,
1062
+ Revox::Models::CampaignListResponse::Campaign::Assistant::StructuredOutputConfig::Type::TaggedSymbol
1063
+ )
1064
+ DATE =
1065
+ T.let(
1066
+ :date,
1067
+ Revox::Models::CampaignListResponse::Campaign::Assistant::StructuredOutputConfig::Type::TaggedSymbol
1068
+ )
1069
+ DATETIME =
1070
+ T.let(
1071
+ :datetime,
1072
+ Revox::Models::CampaignListResponse::Campaign::Assistant::StructuredOutputConfig::Type::TaggedSymbol
1073
+ )
1074
+
1075
+ sig do
1076
+ override.returns(
1077
+ T::Array[
1078
+ Revox::Models::CampaignListResponse::Campaign::Assistant::StructuredOutputConfig::Type::TaggedSymbol
1079
+ ]
1080
+ )
1081
+ end
1082
+ def self.values
1083
+ end
1084
+ end
1085
+ end
1086
+
1087
+ class Voice < Revox::Internal::Type::BaseModel
1088
+ OrHash =
1089
+ T.type_alias do
1090
+ T.any(
1091
+ Revox::Models::CampaignListResponse::Campaign::Assistant::Voice,
1092
+ Revox::Internal::AnyHash
1093
+ )
1094
+ end
1095
+
1096
+ # The ID of the voice.
1097
+ sig { returns(String) }
1098
+ attr_accessor :id
1099
+
1100
+ # The provider of the voice.
1101
+ sig do
1102
+ returns(
1103
+ Revox::Models::CampaignListResponse::Campaign::Assistant::Voice::Provider::TaggedSymbol
1104
+ )
1105
+ end
1106
+ attr_accessor :provider
1107
+
1108
+ # The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
1109
+ # 0.7–1.2. Default is 1.0.
1110
+ sig { returns(T.nilable(Float)) }
1111
+ attr_reader :speed
1112
+
1113
+ sig { params(speed: Float).void }
1114
+ attr_writer :speed
1115
+
1116
+ sig do
1117
+ params(
1118
+ id: String,
1119
+ provider:
1120
+ Revox::Models::CampaignListResponse::Campaign::Assistant::Voice::Provider::OrSymbol,
1121
+ speed: Float
1122
+ ).returns(T.attached_class)
1123
+ end
1124
+ def self.new(
1125
+ # The ID of the voice.
1126
+ id:,
1127
+ # The provider of the voice.
1128
+ provider:,
1129
+ # The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
1130
+ # 0.7–1.2. Default is 1.0.
1131
+ speed: nil
1132
+ )
1133
+ end
1134
+
1135
+ sig do
1136
+ override.returns(
1137
+ {
1138
+ id: String,
1139
+ provider:
1140
+ Revox::Models::CampaignListResponse::Campaign::Assistant::Voice::Provider::TaggedSymbol,
1141
+ speed: Float
1142
+ }
1143
+ )
1144
+ end
1145
+ def to_hash
1146
+ end
1147
+
1148
+ # The provider of the voice.
1149
+ module Provider
1150
+ extend Revox::Internal::Type::Enum
1151
+
1152
+ TaggedSymbol =
1153
+ T.type_alias do
1154
+ T.all(
1155
+ Symbol,
1156
+ Revox::Models::CampaignListResponse::Campaign::Assistant::Voice::Provider
1157
+ )
1158
+ end
1159
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1160
+
1161
+ CARTESIA =
1162
+ T.let(
1163
+ :cartesia,
1164
+ Revox::Models::CampaignListResponse::Campaign::Assistant::Voice::Provider::TaggedSymbol
1165
+ )
1166
+ ELEVENLABS =
1167
+ T.let(
1168
+ :elevenlabs,
1169
+ Revox::Models::CampaignListResponse::Campaign::Assistant::Voice::Provider::TaggedSymbol
1170
+ )
1171
+
1172
+ sig do
1173
+ override.returns(
1174
+ T::Array[
1175
+ Revox::Models::CampaignListResponse::Campaign::Assistant::Voice::Provider::TaggedSymbol
1176
+ ]
1177
+ )
1178
+ end
1179
+ def self.values
1180
+ end
1181
+ end
1182
+ end
1183
+
1184
+ class FaqItem < Revox::Internal::Type::BaseModel
1185
+ OrHash =
1186
+ T.type_alias do
1187
+ T.any(
1188
+ Revox::Models::CampaignListResponse::Campaign::Assistant::FaqItem,
1189
+ Revox::Internal::AnyHash
1190
+ )
1191
+ end
1192
+
1193
+ sig { returns(String) }
1194
+ attr_accessor :answer
1195
+
1196
+ sig { returns(String) }
1197
+ attr_accessor :question
1198
+
1199
+ sig { returns(T.nilable(String)) }
1200
+ attr_reader :id
1201
+
1202
+ sig { params(id: String).void }
1203
+ attr_writer :id
1204
+
1205
+ sig { returns(T.nilable(T::Boolean)) }
1206
+ attr_reader :needs_human_answer
1207
+
1208
+ sig { params(needs_human_answer: T::Boolean).void }
1209
+ attr_writer :needs_human_answer
1210
+
1211
+ sig do
1212
+ returns(
1213
+ T.nilable(
1214
+ Revox::Models::CampaignListResponse::Campaign::Assistant::FaqItem::Source::TaggedSymbol
1215
+ )
1216
+ )
1217
+ end
1218
+ attr_reader :source
1219
+
1220
+ sig do
1221
+ params(
1222
+ source:
1223
+ Revox::Models::CampaignListResponse::Campaign::Assistant::FaqItem::Source::OrSymbol
1224
+ ).void
1225
+ end
1226
+ attr_writer :source
1227
+
1228
+ sig do
1229
+ params(
1230
+ answer: String,
1231
+ question: String,
1232
+ id: String,
1233
+ needs_human_answer: T::Boolean,
1234
+ source:
1235
+ Revox::Models::CampaignListResponse::Campaign::Assistant::FaqItem::Source::OrSymbol
1236
+ ).returns(T.attached_class)
1237
+ end
1238
+ def self.new(
1239
+ answer:,
1240
+ question:,
1241
+ id: nil,
1242
+ needs_human_answer: nil,
1243
+ source: nil
1244
+ )
1245
+ end
1246
+
1247
+ sig do
1248
+ override.returns(
1249
+ {
1250
+ answer: String,
1251
+ question: String,
1252
+ id: String,
1253
+ needs_human_answer: T::Boolean,
1254
+ source:
1255
+ Revox::Models::CampaignListResponse::Campaign::Assistant::FaqItem::Source::TaggedSymbol
1256
+ }
1257
+ )
1258
+ end
1259
+ def to_hash
1260
+ end
1261
+
1262
+ module Source
1263
+ extend Revox::Internal::Type::Enum
1264
+
1265
+ TaggedSymbol =
1266
+ T.type_alias do
1267
+ T.all(
1268
+ Symbol,
1269
+ Revox::Models::CampaignListResponse::Campaign::Assistant::FaqItem::Source
1270
+ )
1271
+ end
1272
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1273
+
1274
+ HUMAN =
1275
+ T.let(
1276
+ :human,
1277
+ Revox::Models::CampaignListResponse::Campaign::Assistant::FaqItem::Source::TaggedSymbol
1278
+ )
1279
+ AI =
1280
+ T.let(
1281
+ :ai,
1282
+ Revox::Models::CampaignListResponse::Campaign::Assistant::FaqItem::Source::TaggedSymbol
1283
+ )
1284
+
1285
+ sig do
1286
+ override.returns(
1287
+ T::Array[
1288
+ Revox::Models::CampaignListResponse::Campaign::Assistant::FaqItem::Source::TaggedSymbol
1289
+ ]
1290
+ )
1291
+ end
1292
+ def self.values
1293
+ end
1294
+ end
1295
+ end
1296
+ end
1297
+
1298
+ class CallRetryConfig < Revox::Internal::Type::BaseModel
1299
+ OrHash =
1300
+ T.type_alias do
1301
+ T.any(
1302
+ Revox::Models::CampaignListResponse::Campaign::CallRetryConfig,
1303
+ Revox::Internal::AnyHash
1304
+ )
1305
+ end
1306
+
1307
+ sig do
1308
+ returns(
1309
+ T::Array[
1310
+ Revox::Models::CampaignListResponse::Campaign::CallRetryConfig::CallingWindow
1311
+ ]
1312
+ )
1313
+ end
1314
+ attr_accessor :calling_windows
1315
+
1316
+ # Maximum number of call retry attempts. Default: 3.
1317
+ sig { returns(Integer) }
1318
+ attr_accessor :max_retry_attempts
1319
+
1320
+ # Optional IANA timezone identifier to override the automatic timezone detection
1321
+ # from phone number. If not provided, timezone is determined from the recipient's
1322
+ # phone number country code. Examples: 'America/New_York', 'Europe/Paris'.
1323
+ sig { returns(T.nilable(String)) }
1324
+ attr_accessor :timezone
1325
+
1326
+ # Configuration for call retry behavior including time windows, delays, and max
1327
+ # iterations. If not provided, defaults will be used.
1328
+ sig do
1329
+ params(
1330
+ calling_windows:
1331
+ T::Array[
1332
+ Revox::Models::CampaignListResponse::Campaign::CallRetryConfig::CallingWindow::OrHash
1333
+ ],
1334
+ max_retry_attempts: Integer,
1335
+ timezone: T.nilable(String)
1336
+ ).returns(T.attached_class)
1337
+ end
1338
+ def self.new(
1339
+ calling_windows:,
1340
+ # Maximum number of call retry attempts. Default: 3.
1341
+ max_retry_attempts:,
1342
+ # Optional IANA timezone identifier to override the automatic timezone detection
1343
+ # from phone number. If not provided, timezone is determined from the recipient's
1344
+ # phone number country code. Examples: 'America/New_York', 'Europe/Paris'.
1345
+ timezone: nil
1346
+ )
1347
+ end
1348
+
1349
+ sig do
1350
+ override.returns(
1351
+ {
1352
+ calling_windows:
1353
+ T::Array[
1354
+ Revox::Models::CampaignListResponse::Campaign::CallRetryConfig::CallingWindow
1355
+ ],
1356
+ max_retry_attempts: Integer,
1357
+ timezone: T.nilable(String)
1358
+ }
1359
+ )
1360
+ end
1361
+ def to_hash
1362
+ end
1363
+
1364
+ class CallingWindow < Revox::Internal::Type::BaseModel
1365
+ OrHash =
1366
+ T.type_alias do
1367
+ T.any(
1368
+ Revox::Models::CampaignListResponse::Campaign::CallRetryConfig::CallingWindow,
1369
+ Revox::Internal::AnyHash
1370
+ )
1371
+ end
1372
+
1373
+ # End time for the calling window in the recipient's timezone (or
1374
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
1375
+ # Examples: '17:00', '6pm'. Default: '18:00'.
1376
+ sig { returns(String) }
1377
+ attr_accessor :calling_window_end_time
1378
+
1379
+ # Start time for the calling window in the recipient's timezone (or
1380
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
1381
+ # Examples: '09:00', '10am'. Default: '10:00'.
1382
+ sig { returns(String) }
1383
+ attr_accessor :calling_window_start_time
1384
+
1385
+ # Delay between retry attempts in seconds. Default: 7200 (2 hours).
1386
+ sig { returns(Integer) }
1387
+ attr_accessor :retry_delay_seconds
1388
+
1389
+ sig do
1390
+ params(
1391
+ calling_window_end_time: String,
1392
+ calling_window_start_time: String,
1393
+ retry_delay_seconds: Integer
1394
+ ).returns(T.attached_class)
1395
+ end
1396
+ def self.new(
1397
+ # End time for the calling window in the recipient's timezone (or
1398
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
1399
+ # Examples: '17:00', '6pm'. Default: '18:00'.
1400
+ calling_window_end_time:,
1401
+ # Start time for the calling window in the recipient's timezone (or
1402
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
1403
+ # Examples: '09:00', '10am'. Default: '10:00'.
1404
+ calling_window_start_time:,
1405
+ # Delay between retry attempts in seconds. Default: 7200 (2 hours).
1406
+ retry_delay_seconds:
1407
+ )
1408
+ end
1409
+
1410
+ sig do
1411
+ override.returns(
1412
+ {
1413
+ calling_window_end_time: String,
1414
+ calling_window_start_time: String,
1415
+ retry_delay_seconds: Integer
1416
+ }
1417
+ )
1418
+ end
1419
+ def to_hash
1420
+ end
1421
+ end
1422
+ end
1423
+
1424
+ class RowStats < Revox::Internal::Type::BaseModel
1425
+ OrHash =
1426
+ T.type_alias do
1427
+ T.any(
1428
+ Revox::Models::CampaignListResponse::Campaign::RowStats,
1429
+ Revox::Internal::AnyHash
1430
+ )
1431
+ end
1432
+
1433
+ sig { returns(Float) }
1434
+ attr_accessor :calling
1435
+
1436
+ sig { returns(Float) }
1437
+ attr_accessor :completed
1438
+
1439
+ sig { returns(Float) }
1440
+ attr_accessor :failed
1441
+
1442
+ sig { returns(Float) }
1443
+ attr_accessor :pending
1444
+
1445
+ sig { returns(Float) }
1446
+ attr_accessor :retry_
1447
+
1448
+ sig { returns(Float) }
1449
+ attr_accessor :total
1450
+
1451
+ sig do
1452
+ params(
1453
+ calling: Float,
1454
+ completed: Float,
1455
+ failed: Float,
1456
+ pending: Float,
1457
+ retry_: Float,
1458
+ total: Float
1459
+ ).returns(T.attached_class)
1460
+ end
1461
+ def self.new(calling:, completed:, failed:, pending:, retry_:, total:)
1462
+ end
1463
+
1464
+ sig do
1465
+ override.returns(
1466
+ {
1467
+ calling: Float,
1468
+ completed: Float,
1469
+ failed: Float,
1470
+ pending: Float,
1471
+ retry_: Float,
1472
+ total: Float
1473
+ }
1474
+ )
1475
+ end
1476
+ def to_hash
1477
+ end
1478
+ end
1479
+ end
1480
+ end
1481
+ end
1482
+ end