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,775 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Revox
4
+ module Models
5
+ # @see Revox::Resources::Campaigns#create
6
+ class CampaignCreateResponse < Revox::Internal::Type::BaseModel
7
+ # @!attribute campaign
8
+ #
9
+ # @return [Revox::Models::CampaignCreateResponse::Campaign]
10
+ required :campaign, -> { Revox::Models::CampaignCreateResponse::Campaign }
11
+
12
+ # @!method initialize(campaign:)
13
+ # @param campaign [Revox::Models::CampaignCreateResponse::Campaign]
14
+
15
+ # @see Revox::Models::CampaignCreateResponse#campaign
16
+ class Campaign < Revox::Internal::Type::BaseModel
17
+ # @!attribute id
18
+ #
19
+ # @return [String]
20
+ required :id, String
21
+
22
+ # @!attribute assistant_id
23
+ #
24
+ # @return [String]
25
+ required :assistant_id, String
26
+
27
+ # @!attribute created_at
28
+ #
29
+ # @return [Object]
30
+ required :created_at, Revox::Internal::Type::Unknown
31
+
32
+ # @!attribute is_cancelled
33
+ #
34
+ # @return [Boolean]
35
+ required :is_cancelled, Revox::Internal::Type::Boolean
36
+
37
+ # @!attribute name
38
+ #
39
+ # @return [String]
40
+ required :name, String
41
+
42
+ # @!attribute organization_id
43
+ #
44
+ # @return [String]
45
+ required :organization_id, String
46
+
47
+ # @!attribute status
48
+ #
49
+ # @return [Symbol, Revox::Models::CampaignCreateResponse::Campaign::Status]
50
+ required :status, enum: -> { Revox::Models::CampaignCreateResponse::Campaign::Status }
51
+
52
+ # @!attribute updated_at
53
+ #
54
+ # @return [Object]
55
+ required :updated_at, Revox::Internal::Type::Unknown
56
+
57
+ # @!attribute assistant
58
+ #
59
+ # @return [Revox::Models::CampaignCreateResponse::Campaign::Assistant, nil]
60
+ optional :assistant, -> { Revox::Models::CampaignCreateResponse::Campaign::Assistant }
61
+
62
+ # @!attribute call_retry_config
63
+ # Configuration for call retry behavior including time windows, delays, and max
64
+ # iterations. If not provided, defaults will be used.
65
+ #
66
+ # @return [Revox::Models::CampaignCreateResponse::Campaign::CallRetryConfig, nil]
67
+ optional :call_retry_config,
68
+ -> { Revox::Models::CampaignCreateResponse::Campaign::CallRetryConfig },
69
+ nil?: true
70
+
71
+ # @!attribute from_phone_number
72
+ #
73
+ # @return [String, nil]
74
+ optional :from_phone_number, String, nil?: true
75
+
76
+ # @!attribute max_concurrent_calls
77
+ #
78
+ # @return [Float, nil]
79
+ optional :max_concurrent_calls, Float, nil?: true
80
+
81
+ # @!attribute row_stats
82
+ #
83
+ # @return [Revox::Models::CampaignCreateResponse::Campaign::RowStats, nil]
84
+ optional :row_stats, -> { Revox::Models::CampaignCreateResponse::Campaign::RowStats }
85
+
86
+ # @!attribute scheduled_at
87
+ #
88
+ # @return [Object, nil]
89
+ optional :scheduled_at, Revox::Internal::Type::Unknown
90
+
91
+ # @!method initialize(id:, assistant_id:, created_at:, is_cancelled:, name:, organization_id:, status:, updated_at:, assistant: nil, call_retry_config: nil, from_phone_number: nil, max_concurrent_calls: nil, row_stats: nil, scheduled_at: nil)
92
+ # Some parameter documentations has been truncated, see
93
+ # {Revox::Models::CampaignCreateResponse::Campaign} for more details.
94
+ #
95
+ # @param id [String]
96
+ #
97
+ # @param assistant_id [String]
98
+ #
99
+ # @param created_at [Object]
100
+ #
101
+ # @param is_cancelled [Boolean]
102
+ #
103
+ # @param name [String]
104
+ #
105
+ # @param organization_id [String]
106
+ #
107
+ # @param status [Symbol, Revox::Models::CampaignCreateResponse::Campaign::Status]
108
+ #
109
+ # @param updated_at [Object]
110
+ #
111
+ # @param assistant [Revox::Models::CampaignCreateResponse::Campaign::Assistant]
112
+ #
113
+ # @param call_retry_config [Revox::Models::CampaignCreateResponse::Campaign::CallRetryConfig, nil] Configuration for call retry behavior including time windows, delays, and max it
114
+ #
115
+ # @param from_phone_number [String, nil]
116
+ #
117
+ # @param max_concurrent_calls [Float, nil]
118
+ #
119
+ # @param row_stats [Revox::Models::CampaignCreateResponse::Campaign::RowStats]
120
+ #
121
+ # @param scheduled_at [Object]
122
+
123
+ # @see Revox::Models::CampaignCreateResponse::Campaign#status
124
+ module Status
125
+ extend Revox::Internal::Type::Enum
126
+
127
+ DRAFT = :draft
128
+ RUNNING = :running
129
+ PAUSED = :paused
130
+ COMPLETED = :completed
131
+
132
+ # @!method self.values
133
+ # @return [Array<Symbol>]
134
+ end
135
+
136
+ # @see Revox::Models::CampaignCreateResponse::Campaign#assistant
137
+ class Assistant < Revox::Internal::Type::BaseModel
138
+ # @!attribute id
139
+ #
140
+ # @return [String]
141
+ required :id, String
142
+
143
+ # @!attribute background_sound
144
+ # The background sound to play during the call. Useful to give the impression that
145
+ # your AI agent is in an office.
146
+ #
147
+ # @return [Symbol, Revox::Models::CampaignCreateResponse::Campaign::Assistant::BackgroundSound, nil]
148
+ required :background_sound,
149
+ enum: -> { Revox::Models::CampaignCreateResponse::Campaign::Assistant::BackgroundSound },
150
+ nil?: true
151
+
152
+ # @!attribute calendly
153
+ #
154
+ # @return [Revox::Models::CampaignCreateResponse::Campaign::Assistant::Calendly, nil]
155
+ required :calendly,
156
+ -> { Revox::Models::CampaignCreateResponse::Campaign::Assistant::Calendly },
157
+ nil?: true
158
+
159
+ # @!attribute call_retry_config
160
+ # Configuration for call retry behavior including time windows, delays, and max
161
+ # iterations. If not provided, defaults will be used.
162
+ #
163
+ # @return [Revox::Models::CampaignCreateResponse::Campaign::Assistant::CallRetryConfig, nil]
164
+ required :call_retry_config,
165
+ -> { Revox::Models::CampaignCreateResponse::Campaign::Assistant::CallRetryConfig },
166
+ nil?: true
167
+
168
+ # @!attribute created_at
169
+ #
170
+ # @return [Object]
171
+ required :created_at, Revox::Internal::Type::Unknown
172
+
173
+ # @!attribute end_of_call_sentence
174
+ #
175
+ # @return [String, nil]
176
+ required :end_of_call_sentence, String, nil?: true
177
+
178
+ # @!attribute first_sentence
179
+ #
180
+ # @return [String, nil]
181
+ required :first_sentence, String, nil?: true
182
+
183
+ # @!attribute first_sentence_delay_ms
184
+ # Delay in milliseconds before speaking the first sentence. Default: 400.
185
+ #
186
+ # @return [Integer]
187
+ required :first_sentence_delay_ms, Integer
188
+
189
+ # @!attribute first_sentence_mode
190
+ #
191
+ # @return [Symbol, Revox::Models::CampaignCreateResponse::Campaign::Assistant::FirstSentenceMode]
192
+ required :first_sentence_mode,
193
+ enum: -> { Revox::Models::CampaignCreateResponse::Campaign::Assistant::FirstSentenceMode }
194
+
195
+ # @!attribute ivr_navigation_enabled
196
+ # Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
197
+ # skip turns to navigate phone menus.
198
+ #
199
+ # @return [Boolean]
200
+ required :ivr_navigation_enabled, Revox::Internal::Type::Boolean
201
+
202
+ # @!attribute llm_model
203
+ #
204
+ # @return [Revox::Models::CampaignCreateResponse::Campaign::Assistant::LlmModel::UnionMember0, Revox::Models::CampaignCreateResponse::Campaign::Assistant::LlmModel::UnionMember1]
205
+ required :llm_model, union: -> { Revox::Models::CampaignCreateResponse::Campaign::Assistant::LlmModel }
206
+
207
+ # @!attribute max_call_duration_secs
208
+ # The maximum duration of the call in seconds. This is the maximum time the call
209
+ # will be allowed to run.
210
+ #
211
+ # @return [Float]
212
+ required :max_call_duration_secs, Float
213
+
214
+ # @!attribute name
215
+ #
216
+ # @return [String]
217
+ required :name, String
218
+
219
+ # @!attribute organization_id
220
+ #
221
+ # @return [String]
222
+ required :organization_id, String
223
+
224
+ # @!attribute prompt
225
+ #
226
+ # @return [String]
227
+ required :prompt, String
228
+
229
+ # @!attribute structured_output_config
230
+ # The structured output config to use for the call. This is used to extract the
231
+ # data from the call (like email, name, company name, etc.).
232
+ #
233
+ # @return [Array<Revox::Models::CampaignCreateResponse::Campaign::Assistant::StructuredOutputConfig>, nil]
234
+ required :structured_output_config,
235
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignCreateResponse::Campaign::Assistant::StructuredOutputConfig] },
236
+ nil?: true
237
+
238
+ # @!attribute transfer_phone_number
239
+ # Phone number to transfer calls to when users request to speak to a human agent.
240
+ #
241
+ # @return [String, nil]
242
+ required :transfer_phone_number, String, nil?: true
243
+
244
+ # @!attribute updated_at
245
+ #
246
+ # @return [Object]
247
+ required :updated_at, Revox::Internal::Type::Unknown
248
+
249
+ # @!attribute voice
250
+ #
251
+ # @return [Revox::Models::CampaignCreateResponse::Campaign::Assistant::Voice, nil]
252
+ required :voice, -> { Revox::Models::CampaignCreateResponse::Campaign::Assistant::Voice }, nil?: true
253
+
254
+ # @!attribute voicemail_message
255
+ # If set, when voicemail is detected the agent will speak this message then hang
256
+ # up; if null, hang up immediately.
257
+ #
258
+ # @return [String, nil]
259
+ required :voicemail_message, String, nil?: true
260
+
261
+ # @!attribute webhook_url
262
+ # The webhook URL to call when the call is completed.
263
+ #
264
+ # @return [String, nil]
265
+ required :webhook_url, String, nil?: true
266
+
267
+ # @!attribute faq_items
268
+ #
269
+ # @return [Array<Revox::Models::CampaignCreateResponse::Campaign::Assistant::FaqItem>, nil]
270
+ optional :faq_items,
271
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignCreateResponse::Campaign::Assistant::FaqItem] }
272
+
273
+ # @!attribute pending_faq_count
274
+ #
275
+ # @return [Float, nil]
276
+ optional :pending_faq_count, Float
277
+
278
+ # @!method initialize(id:, background_sound:, calendly:, call_retry_config:, created_at:, end_of_call_sentence:, first_sentence:, first_sentence_delay_ms:, first_sentence_mode:, ivr_navigation_enabled:, llm_model:, max_call_duration_secs:, name:, organization_id:, prompt:, structured_output_config:, transfer_phone_number:, updated_at:, voice:, voicemail_message:, webhook_url:, faq_items: nil, pending_faq_count: nil)
279
+ # Some parameter documentations has been truncated, see
280
+ # {Revox::Models::CampaignCreateResponse::Campaign::Assistant} for more details.
281
+ #
282
+ # @param id [String]
283
+ #
284
+ # @param background_sound [Symbol, Revox::Models::CampaignCreateResponse::Campaign::Assistant::BackgroundSound, nil] The background sound to play during the call. Useful to give the impression that
285
+ #
286
+ # @param calendly [Revox::Models::CampaignCreateResponse::Campaign::Assistant::Calendly, nil]
287
+ #
288
+ # @param call_retry_config [Revox::Models::CampaignCreateResponse::Campaign::Assistant::CallRetryConfig, nil] Configuration for call retry behavior including time windows, delays, and max it
289
+ #
290
+ # @param created_at [Object]
291
+ #
292
+ # @param end_of_call_sentence [String, nil]
293
+ #
294
+ # @param first_sentence [String, nil]
295
+ #
296
+ # @param first_sentence_delay_ms [Integer] Delay in milliseconds before speaking the first sentence. Default: 400.
297
+ #
298
+ # @param first_sentence_mode [Symbol, Revox::Models::CampaignCreateResponse::Campaign::Assistant::FirstSentenceMode]
299
+ #
300
+ # @param ivr_navigation_enabled [Boolean] Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
301
+ #
302
+ # @param llm_model [Revox::Models::CampaignCreateResponse::Campaign::Assistant::LlmModel::UnionMember0, Revox::Models::CampaignCreateResponse::Campaign::Assistant::LlmModel::UnionMember1]
303
+ #
304
+ # @param max_call_duration_secs [Float] The maximum duration of the call in seconds. This is the maximum time the call w
305
+ #
306
+ # @param name [String]
307
+ #
308
+ # @param organization_id [String]
309
+ #
310
+ # @param prompt [String]
311
+ #
312
+ # @param structured_output_config [Array<Revox::Models::CampaignCreateResponse::Campaign::Assistant::StructuredOutputConfig>, nil] The structured output config to use for the call. This is used to extract the da
313
+ #
314
+ # @param transfer_phone_number [String, nil] Phone number to transfer calls to when users request to speak to a human agent.
315
+ #
316
+ # @param updated_at [Object]
317
+ #
318
+ # @param voice [Revox::Models::CampaignCreateResponse::Campaign::Assistant::Voice, nil]
319
+ #
320
+ # @param voicemail_message [String, nil] If set, when voicemail is detected the agent will speak this message then hang u
321
+ #
322
+ # @param webhook_url [String, nil] The webhook URL to call when the call is completed.
323
+ #
324
+ # @param faq_items [Array<Revox::Models::CampaignCreateResponse::Campaign::Assistant::FaqItem>]
325
+ #
326
+ # @param pending_faq_count [Float]
327
+
328
+ # The background sound to play during the call. Useful to give the impression that
329
+ # your AI agent is in an office.
330
+ #
331
+ # @see Revox::Models::CampaignCreateResponse::Campaign::Assistant#background_sound
332
+ module BackgroundSound
333
+ extend Revox::Internal::Type::Enum
334
+
335
+ AUDIO_OFFICE_OGG = :"audio/office.ogg"
336
+
337
+ # @!method self.values
338
+ # @return [Array<Symbol>]
339
+ end
340
+
341
+ # @see Revox::Models::CampaignCreateResponse::Campaign::Assistant#calendly
342
+ class Calendly < Revox::Internal::Type::BaseModel
343
+ # @!attribute connection_id
344
+ # The connection ID representing the link between your Calendly account and Revox.
345
+ #
346
+ # @return [String]
347
+ required :connection_id, String
348
+
349
+ # @!attribute event_type_id
350
+ # The event type ID representing the event type to schedule. (eg:
351
+ # https://api.calendly.com/event_types/b2330295-2a91-4a1d-bb73-99e7707663d5)
352
+ #
353
+ # @return [String]
354
+ required :event_type_id, String
355
+
356
+ # @!method initialize(connection_id:, event_type_id:)
357
+ # Some parameter documentations has been truncated, see
358
+ # {Revox::Models::CampaignCreateResponse::Campaign::Assistant::Calendly} for more
359
+ # details.
360
+ #
361
+ # @param connection_id [String] The connection ID representing the link between your Calendly account and Revox.
362
+ #
363
+ # @param event_type_id [String] The event type ID representing the event type to schedule. (eg: https://api.cale
364
+ end
365
+
366
+ # @see Revox::Models::CampaignCreateResponse::Campaign::Assistant#call_retry_config
367
+ class CallRetryConfig < Revox::Internal::Type::BaseModel
368
+ # @!attribute calling_windows
369
+ #
370
+ # @return [Array<Revox::Models::CampaignCreateResponse::Campaign::Assistant::CallRetryConfig::CallingWindow>]
371
+ required :calling_windows,
372
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignCreateResponse::Campaign::Assistant::CallRetryConfig::CallingWindow] }
373
+
374
+ # @!attribute max_retry_attempts
375
+ # Maximum number of call retry attempts. Default: 3.
376
+ #
377
+ # @return [Integer]
378
+ required :max_retry_attempts, Integer
379
+
380
+ # @!attribute timezone
381
+ # Optional IANA timezone identifier to override the automatic timezone detection
382
+ # from phone number. If not provided, timezone is determined from the recipient's
383
+ # phone number country code. Examples: 'America/New_York', 'Europe/Paris'.
384
+ #
385
+ # @return [String, nil]
386
+ optional :timezone, String, nil?: true
387
+
388
+ # @!method initialize(calling_windows:, max_retry_attempts:, timezone: nil)
389
+ # Some parameter documentations has been truncated, see
390
+ # {Revox::Models::CampaignCreateResponse::Campaign::Assistant::CallRetryConfig}
391
+ # for more details.
392
+ #
393
+ # Configuration for call retry behavior including time windows, delays, and max
394
+ # iterations. If not provided, defaults will be used.
395
+ #
396
+ # @param calling_windows [Array<Revox::Models::CampaignCreateResponse::Campaign::Assistant::CallRetryConfig::CallingWindow>]
397
+ #
398
+ # @param max_retry_attempts [Integer] Maximum number of call retry attempts. Default: 3.
399
+ #
400
+ # @param timezone [String, nil] Optional IANA timezone identifier to override the automatic timezone detection f
401
+
402
+ class CallingWindow < Revox::Internal::Type::BaseModel
403
+ # @!attribute calling_window_end_time
404
+ # End time for the calling window in the recipient's timezone (or
405
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
406
+ # Examples: '17:00', '6pm'. Default: '18:00'.
407
+ #
408
+ # @return [String]
409
+ required :calling_window_end_time, String
410
+
411
+ # @!attribute calling_window_start_time
412
+ # Start time for the calling window in the recipient's timezone (or
413
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
414
+ # Examples: '09:00', '10am'. Default: '10:00'.
415
+ #
416
+ # @return [String]
417
+ required :calling_window_start_time, String
418
+
419
+ # @!attribute retry_delay_seconds
420
+ # Delay between retry attempts in seconds. Default: 7200 (2 hours).
421
+ #
422
+ # @return [Integer]
423
+ required :retry_delay_seconds, Integer
424
+
425
+ # @!method initialize(calling_window_end_time:, calling_window_start_time:, retry_delay_seconds:)
426
+ # Some parameter documentations has been truncated, see
427
+ # {Revox::Models::CampaignCreateResponse::Campaign::Assistant::CallRetryConfig::CallingWindow}
428
+ # for more details.
429
+ #
430
+ # @param calling_window_end_time [String] End time for the calling window in the recipient's timezone (or timezone_overrid
431
+ #
432
+ # @param calling_window_start_time [String] Start time for the calling window in the recipient's timezone (or timezone_overr
433
+ #
434
+ # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. Default: 7200 (2 hours).
435
+ end
436
+ end
437
+
438
+ # @see Revox::Models::CampaignCreateResponse::Campaign::Assistant#first_sentence_mode
439
+ module FirstSentenceMode
440
+ extend Revox::Internal::Type::Enum
441
+
442
+ GENERATED = :generated
443
+ STATIC = :static
444
+ NONE = :none
445
+
446
+ # @!method self.values
447
+ # @return [Array<Symbol>]
448
+ end
449
+
450
+ # @see Revox::Models::CampaignCreateResponse::Campaign::Assistant#llm_model
451
+ module LlmModel
452
+ extend Revox::Internal::Type::Union
453
+
454
+ variant -> { Revox::Models::CampaignCreateResponse::Campaign::Assistant::LlmModel::UnionMember0 }
455
+
456
+ variant -> { Revox::Models::CampaignCreateResponse::Campaign::Assistant::LlmModel::UnionMember1 }
457
+
458
+ class UnionMember0 < Revox::Internal::Type::BaseModel
459
+ # @!attribute name
460
+ #
461
+ # @return [Symbol, Revox::Models::CampaignCreateResponse::Campaign::Assistant::LlmModel::UnionMember0::Name]
462
+ required :name,
463
+ enum: -> { Revox::Models::CampaignCreateResponse::Campaign::Assistant::LlmModel::UnionMember0::Name }
464
+
465
+ # @!attribute type
466
+ #
467
+ # @return [Symbol, :"dedicated-instance"]
468
+ required :type, const: :"dedicated-instance"
469
+
470
+ # @!method initialize(name:, type: :"dedicated-instance")
471
+ # @param name [Symbol, Revox::Models::CampaignCreateResponse::Campaign::Assistant::LlmModel::UnionMember0::Name]
472
+ # @param type [Symbol, :"dedicated-instance"]
473
+
474
+ # @see Revox::Models::CampaignCreateResponse::Campaign::Assistant::LlmModel::UnionMember0#name
475
+ module Name
476
+ extend Revox::Internal::Type::Enum
477
+
478
+ GPT_4_1 = :"gpt-4.1"
479
+ MINISTRAL_3_8B_INSTRUCT = :"ministral-3-8b-instruct"
480
+
481
+ # @!method self.values
482
+ # @return [Array<Symbol>]
483
+ end
484
+ end
485
+
486
+ class UnionMember1 < Revox::Internal::Type::BaseModel
487
+ # @!attribute openrouter_model_id
488
+ # The model ID to use from OpenRouter. eg: openai/gpt-4.1
489
+ #
490
+ # @return [String]
491
+ required :openrouter_model_id, String
492
+
493
+ # @!attribute openrouter_provider
494
+ # The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
495
+ #
496
+ # @return [String]
497
+ required :openrouter_provider, String
498
+
499
+ # @!attribute type
500
+ # Use a model from OpenRouter.
501
+ #
502
+ # @return [Symbol, :openrouter]
503
+ required :type, const: :openrouter
504
+
505
+ # @!method initialize(openrouter_model_id:, openrouter_provider:, type: :openrouter)
506
+ # @param openrouter_model_id [String] The model ID to use from OpenRouter. eg: openai/gpt-4.1
507
+ #
508
+ # @param openrouter_provider [String] The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
509
+ #
510
+ # @param type [Symbol, :openrouter] Use a model from OpenRouter.
511
+ end
512
+
513
+ # @!method self.variants
514
+ # @return [Array(Revox::Models::CampaignCreateResponse::Campaign::Assistant::LlmModel::UnionMember0, Revox::Models::CampaignCreateResponse::Campaign::Assistant::LlmModel::UnionMember1)]
515
+ end
516
+
517
+ class StructuredOutputConfig < Revox::Internal::Type::BaseModel
518
+ # @!attribute name
519
+ #
520
+ # @return [String]
521
+ required :name, String
522
+
523
+ # @!attribute required
524
+ #
525
+ # @return [Boolean]
526
+ required :required, Revox::Internal::Type::Boolean
527
+
528
+ # @!attribute type
529
+ #
530
+ # @return [Symbol, Revox::Models::CampaignCreateResponse::Campaign::Assistant::StructuredOutputConfig::Type]
531
+ required :type,
532
+ enum: -> { Revox::Models::CampaignCreateResponse::Campaign::Assistant::StructuredOutputConfig::Type }
533
+
534
+ # @!attribute description
535
+ #
536
+ # @return [String, nil]
537
+ optional :description, String
538
+
539
+ # @!attribute enum_options
540
+ #
541
+ # @return [Array<String>, nil]
542
+ optional :enum_options, Revox::Internal::Type::ArrayOf[String]
543
+
544
+ # @!method initialize(name:, required:, type:, description: nil, enum_options: nil)
545
+ # @param name [String]
546
+ # @param required [Boolean]
547
+ # @param type [Symbol, Revox::Models::CampaignCreateResponse::Campaign::Assistant::StructuredOutputConfig::Type]
548
+ # @param description [String]
549
+ # @param enum_options [Array<String>]
550
+
551
+ # @see Revox::Models::CampaignCreateResponse::Campaign::Assistant::StructuredOutputConfig#type
552
+ module Type
553
+ extend Revox::Internal::Type::Enum
554
+
555
+ STRING = :string
556
+ NUMBER = :number
557
+ BOOLEAN = :boolean
558
+ ENUM = :enum
559
+ DATE = :date
560
+ DATETIME = :datetime
561
+
562
+ # @!method self.values
563
+ # @return [Array<Symbol>]
564
+ end
565
+ end
566
+
567
+ # @see Revox::Models::CampaignCreateResponse::Campaign::Assistant#voice
568
+ class Voice < Revox::Internal::Type::BaseModel
569
+ # @!attribute id
570
+ # The ID of the voice.
571
+ #
572
+ # @return [String]
573
+ required :id, String
574
+
575
+ # @!attribute provider
576
+ # The provider of the voice.
577
+ #
578
+ # @return [Symbol, Revox::Models::CampaignCreateResponse::Campaign::Assistant::Voice::Provider]
579
+ required :provider,
580
+ enum: -> { Revox::Models::CampaignCreateResponse::Campaign::Assistant::Voice::Provider }
581
+
582
+ # @!attribute speed
583
+ # The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
584
+ # 0.7–1.2. Default is 1.0.
585
+ #
586
+ # @return [Float, nil]
587
+ optional :speed, Float
588
+
589
+ # @!method initialize(id:, provider:, speed: nil)
590
+ # Some parameter documentations has been truncated, see
591
+ # {Revox::Models::CampaignCreateResponse::Campaign::Assistant::Voice} for more
592
+ # details.
593
+ #
594
+ # @param id [String] The ID of the voice.
595
+ #
596
+ # @param provider [Symbol, Revox::Models::CampaignCreateResponse::Campaign::Assistant::Voice::Provider] The provider of the voice.
597
+ #
598
+ # @param speed [Float] The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
599
+
600
+ # The provider of the voice.
601
+ #
602
+ # @see Revox::Models::CampaignCreateResponse::Campaign::Assistant::Voice#provider
603
+ module Provider
604
+ extend Revox::Internal::Type::Enum
605
+
606
+ CARTESIA = :cartesia
607
+ ELEVENLABS = :elevenlabs
608
+
609
+ # @!method self.values
610
+ # @return [Array<Symbol>]
611
+ end
612
+ end
613
+
614
+ class FaqItem < Revox::Internal::Type::BaseModel
615
+ # @!attribute answer
616
+ #
617
+ # @return [String]
618
+ required :answer, String
619
+
620
+ # @!attribute question
621
+ #
622
+ # @return [String]
623
+ required :question, String
624
+
625
+ # @!attribute id
626
+ #
627
+ # @return [String, nil]
628
+ optional :id, String
629
+
630
+ # @!attribute needs_human_answer
631
+ #
632
+ # @return [Boolean, nil]
633
+ optional :needs_human_answer, Revox::Internal::Type::Boolean
634
+
635
+ # @!attribute source
636
+ #
637
+ # @return [Symbol, Revox::Models::CampaignCreateResponse::Campaign::Assistant::FaqItem::Source, nil]
638
+ optional :source, enum: -> { Revox::Models::CampaignCreateResponse::Campaign::Assistant::FaqItem::Source }
639
+
640
+ # @!method initialize(answer:, question:, id: nil, needs_human_answer: nil, source: nil)
641
+ # @param answer [String]
642
+ # @param question [String]
643
+ # @param id [String]
644
+ # @param needs_human_answer [Boolean]
645
+ # @param source [Symbol, Revox::Models::CampaignCreateResponse::Campaign::Assistant::FaqItem::Source]
646
+
647
+ # @see Revox::Models::CampaignCreateResponse::Campaign::Assistant::FaqItem#source
648
+ module Source
649
+ extend Revox::Internal::Type::Enum
650
+
651
+ HUMAN = :human
652
+ AI = :ai
653
+
654
+ # @!method self.values
655
+ # @return [Array<Symbol>]
656
+ end
657
+ end
658
+ end
659
+
660
+ # @see Revox::Models::CampaignCreateResponse::Campaign#call_retry_config
661
+ class CallRetryConfig < Revox::Internal::Type::BaseModel
662
+ # @!attribute calling_windows
663
+ #
664
+ # @return [Array<Revox::Models::CampaignCreateResponse::Campaign::CallRetryConfig::CallingWindow>]
665
+ required :calling_windows,
666
+ -> { Revox::Internal::Type::ArrayOf[Revox::Models::CampaignCreateResponse::Campaign::CallRetryConfig::CallingWindow] }
667
+
668
+ # @!attribute max_retry_attempts
669
+ # Maximum number of call retry attempts. Default: 3.
670
+ #
671
+ # @return [Integer]
672
+ required :max_retry_attempts, Integer
673
+
674
+ # @!attribute timezone
675
+ # Optional IANA timezone identifier to override the automatic timezone detection
676
+ # from phone number. If not provided, timezone is determined from the recipient's
677
+ # phone number country code. Examples: 'America/New_York', 'Europe/Paris'.
678
+ #
679
+ # @return [String, nil]
680
+ optional :timezone, String, nil?: true
681
+
682
+ # @!method initialize(calling_windows:, max_retry_attempts:, timezone: nil)
683
+ # Some parameter documentations has been truncated, see
684
+ # {Revox::Models::CampaignCreateResponse::Campaign::CallRetryConfig} for more
685
+ # details.
686
+ #
687
+ # Configuration for call retry behavior including time windows, delays, and max
688
+ # iterations. If not provided, defaults will be used.
689
+ #
690
+ # @param calling_windows [Array<Revox::Models::CampaignCreateResponse::Campaign::CallRetryConfig::CallingWindow>]
691
+ #
692
+ # @param max_retry_attempts [Integer] Maximum number of call retry attempts. Default: 3.
693
+ #
694
+ # @param timezone [String, nil] Optional IANA timezone identifier to override the automatic timezone detection f
695
+
696
+ class CallingWindow < Revox::Internal::Type::BaseModel
697
+ # @!attribute calling_window_end_time
698
+ # End time for the calling window in the recipient's timezone (or
699
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
700
+ # Examples: '17:00', '6pm'. Default: '18:00'.
701
+ #
702
+ # @return [String]
703
+ required :calling_window_end_time, String
704
+
705
+ # @!attribute calling_window_start_time
706
+ # Start time for the calling window in the recipient's timezone (or
707
+ # timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
708
+ # Examples: '09:00', '10am'. Default: '10:00'.
709
+ #
710
+ # @return [String]
711
+ required :calling_window_start_time, String
712
+
713
+ # @!attribute retry_delay_seconds
714
+ # Delay between retry attempts in seconds. Default: 7200 (2 hours).
715
+ #
716
+ # @return [Integer]
717
+ required :retry_delay_seconds, Integer
718
+
719
+ # @!method initialize(calling_window_end_time:, calling_window_start_time:, retry_delay_seconds:)
720
+ # Some parameter documentations has been truncated, see
721
+ # {Revox::Models::CampaignCreateResponse::Campaign::CallRetryConfig::CallingWindow}
722
+ # for more details.
723
+ #
724
+ # @param calling_window_end_time [String] End time for the calling window in the recipient's timezone (or timezone_overrid
725
+ #
726
+ # @param calling_window_start_time [String] Start time for the calling window in the recipient's timezone (or timezone_overr
727
+ #
728
+ # @param retry_delay_seconds [Integer] Delay between retry attempts in seconds. Default: 7200 (2 hours).
729
+ end
730
+ end
731
+
732
+ # @see Revox::Models::CampaignCreateResponse::Campaign#row_stats
733
+ class RowStats < Revox::Internal::Type::BaseModel
734
+ # @!attribute calling
735
+ #
736
+ # @return [Float]
737
+ required :calling, Float
738
+
739
+ # @!attribute completed
740
+ #
741
+ # @return [Float]
742
+ required :completed, Float
743
+
744
+ # @!attribute failed
745
+ #
746
+ # @return [Float]
747
+ required :failed, Float
748
+
749
+ # @!attribute pending
750
+ #
751
+ # @return [Float]
752
+ required :pending, Float
753
+
754
+ # @!attribute retry_
755
+ #
756
+ # @return [Float]
757
+ required :retry_, Float, api_name: :retry
758
+
759
+ # @!attribute total
760
+ #
761
+ # @return [Float]
762
+ required :total, Float
763
+
764
+ # @!method initialize(calling:, completed:, failed:, pending:, retry_:, total:)
765
+ # @param calling [Float]
766
+ # @param completed [Float]
767
+ # @param failed [Float]
768
+ # @param pending [Float]
769
+ # @param retry_ [Float]
770
+ # @param total [Float]
771
+ end
772
+ end
773
+ end
774
+ end
775
+ end