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