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