revox 0.1.0 → 0.2.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +71 -0
- data/README.md +39 -14
- data/lib/revox/client.rb +15 -1
- data/lib/revox/internal/transport/base_client.rb +5 -0
- data/lib/revox/internal/util.rb +22 -7
- data/lib/revox/models/assistant_create_params.rb +1038 -13
- data/lib/revox/models/assistant_create_response.rb +1071 -11
- data/lib/revox/models/assistant_list_response.rb +1070 -11
- data/lib/revox/models/assistant_retrieve_response.rb +1066 -11
- data/lib/revox/models/assistant_update_params.rb +1038 -13
- data/lib/revox/models/assistant_update_response.rb +1097 -12
- data/lib/revox/models/call_create_params.rb +1065 -13
- data/lib/revox/models/call_create_response.rb +1813 -101
- data/lib/revox/models/call_retrieve_response.rb +1815 -101
- data/lib/revox/models/campaign_create_params.rb +67 -2
- data/lib/revox/models/campaign_create_response.rb +1314 -59
- data/lib/revox/models/campaign_get_rows_params.rb +1 -46
- data/lib/revox/models/campaign_get_rows_response.rb +1837 -129
- data/lib/revox/models/campaign_list_response.rb +1312 -59
- data/lib/revox/models/campaign_retrieve_response.rb +1312 -56
- data/lib/revox/models/users/me_retrieve_response.rb +13 -1
- data/lib/revox/models/users/me_update_response.rb +13 -1
- data/lib/revox/models/voice_list_response.rb +55 -1
- data/lib/revox/models/voice_preview_params.rb +49 -1
- data/lib/revox/models.rb +0 -2
- data/lib/revox/resources/assistants.rb +116 -8
- data/lib/revox/resources/call.rb +0 -29
- data/lib/revox/resources/campaigns.rb +12 -17
- data/lib/revox/resources/voices.rb +16 -10
- data/lib/revox/version.rb +1 -1
- data/lib/revox.rb +0 -2
- data/rbi/revox/internal/util.rbi +8 -0
- data/rbi/revox/models/assistant_create_params.rbi +2138 -103
- data/rbi/revox/models/assistant_create_response.rbi +2454 -199
- data/rbi/revox/models/assistant_list_response.rbi +2448 -195
- data/rbi/revox/models/assistant_retrieve_response.rbi +2401 -210
- data/rbi/revox/models/assistant_update_params.rbi +2138 -103
- data/rbi/revox/models/assistant_update_response.rbi +2504 -198
- data/rbi/revox/models/call_create_params.rbi +2382 -225
- data/rbi/revox/models/call_create_response.rbi +4104 -384
- data/rbi/revox/models/call_retrieve_response.rbi +4104 -382
- data/rbi/revox/models/campaign_create_params.rbi +136 -0
- data/rbi/revox/models/campaign_create_response.rbi +2911 -231
- data/rbi/revox/models/campaign_get_rows_params.rbi +2 -82
- data/rbi/revox/models/campaign_get_rows_response.rbi +4135 -410
- data/rbi/revox/models/campaign_list_response.rbi +2904 -230
- data/rbi/revox/models/campaign_retrieve_response.rbi +2911 -231
- data/rbi/revox/models/users/me_retrieve_response.rbi +13 -3
- data/rbi/revox/models/users/me_update_response.rbi +13 -3
- data/rbi/revox/models/voice_list_response.rbi +105 -3
- data/rbi/revox/models/voice_preview_params.rbi +69 -0
- data/rbi/revox/models.rbi +0 -2
- data/rbi/revox/resources/assistants.rbi +284 -8
- data/rbi/revox/resources/call.rbi +0 -21
- data/rbi/revox/resources/campaigns.rbi +12 -19
- data/rbi/revox/resources/voices.rbi +17 -9
- data/sig/revox/internal/util.rbs +4 -0
- data/sig/revox/models/assistant_create_params.rbs +844 -11
- data/sig/revox/models/assistant_create_response.rbs +860 -3
- data/sig/revox/models/assistant_list_response.rbs +860 -3
- data/sig/revox/models/assistant_retrieve_response.rbs +859 -3
- data/sig/revox/models/assistant_update_params.rbs +844 -11
- data/sig/revox/models/assistant_update_response.rbs +886 -6
- data/sig/revox/models/call_create_params.rbs +847 -13
- data/sig/revox/models/call_create_response.rbs +1514 -34
- data/sig/revox/models/call_retrieve_response.rbs +1514 -34
- data/sig/revox/models/campaign_create_params.rbs +54 -0
- data/sig/revox/models/campaign_create_response.rbs +1034 -6
- data/sig/revox/models/campaign_get_rows_params.rbs +2 -64
- data/sig/revox/models/campaign_get_rows_response.rbs +1522 -54
- data/sig/revox/models/campaign_list_response.rbs +1034 -6
- data/sig/revox/models/campaign_retrieve_response.rbs +1034 -6
- data/sig/revox/models/users/me_retrieve_response.rbs +8 -3
- data/sig/revox/models/users/me_update_response.rbs +8 -3
- data/sig/revox/models/voice_list_response.rbs +45 -3
- data/sig/revox/models/voice_preview_params.rbs +42 -1
- data/sig/revox/models.rbs +0 -2
- data/sig/revox/resources/assistants.rbs +56 -2
- data/sig/revox/resources/call.rbs +0 -7
- data/sig/revox/resources/campaigns.rbs +2 -5
- data/sig/revox/resources/voices.rbs +4 -0
- metadata +2 -8
- data/lib/revox/models/call_list_params.rb +0 -52
- data/lib/revox/models/call_list_response.rb +0 -259
- data/rbi/revox/models/call_list_params.rbi +0 -94
- data/rbi/revox/models/call_list_response.rbi +0 -563
- data/sig/revox/models/call_list_params.rbs +0 -63
- data/sig/revox/models/call_list_response.rbs +0 -226
|
@@ -19,10 +19,19 @@ module Revox
|
|
|
19
19
|
sig { returns(T::Array[Revox::CampaignCreateParams::Contact]) }
|
|
20
20
|
attr_accessor :contacts
|
|
21
21
|
|
|
22
|
+
# Whether to launch the campaign immediately. Set to false to save as a draft.
|
|
23
|
+
sig { returns(T::Boolean) }
|
|
24
|
+
attr_accessor :launch
|
|
25
|
+
|
|
22
26
|
# The name of the campaign
|
|
23
27
|
sig { returns(String) }
|
|
24
28
|
attr_accessor :name
|
|
25
29
|
|
|
30
|
+
# Campaign type. 'jump_in' campaigns only dial while someone is on the campaign
|
|
31
|
+
# page and auto-pause when unattended.
|
|
32
|
+
sig { returns(Revox::CampaignCreateParams::Type::OrSymbol) }
|
|
33
|
+
attr_accessor :type
|
|
34
|
+
|
|
26
35
|
# Override retry configuration for calls in this campaign. If not provided, uses
|
|
27
36
|
# the assistant's retry config.
|
|
28
37
|
sig { returns(T.nilable(Revox::CampaignCreateParams::CallRetryConfig)) }
|
|
@@ -68,7 +77,9 @@ module Revox
|
|
|
68
77
|
params(
|
|
69
78
|
assistant_id: String,
|
|
70
79
|
contacts: T::Array[Revox::CampaignCreateParams::Contact::OrHash],
|
|
80
|
+
launch: T::Boolean,
|
|
71
81
|
name: String,
|
|
82
|
+
type: Revox::CampaignCreateParams::Type::OrSymbol,
|
|
72
83
|
call_retry_config:
|
|
73
84
|
Revox::CampaignCreateParams::CallRetryConfig::OrHash,
|
|
74
85
|
from_phone_number: String,
|
|
@@ -82,8 +93,13 @@ module Revox
|
|
|
82
93
|
assistant_id:,
|
|
83
94
|
# The list of contacts to call
|
|
84
95
|
contacts:,
|
|
96
|
+
# Whether to launch the campaign immediately. Set to false to save as a draft.
|
|
97
|
+
launch:,
|
|
85
98
|
# The name of the campaign
|
|
86
99
|
name:,
|
|
100
|
+
# Campaign type. 'jump_in' campaigns only dial while someone is on the campaign
|
|
101
|
+
# page and auto-pause when unattended.
|
|
102
|
+
type:,
|
|
87
103
|
# Override retry configuration for calls in this campaign. If not provided, uses
|
|
88
104
|
# the assistant's retry config.
|
|
89
105
|
call_retry_config: nil,
|
|
@@ -103,7 +119,9 @@ module Revox
|
|
|
103
119
|
{
|
|
104
120
|
assistant_id: String,
|
|
105
121
|
contacts: T::Array[Revox::CampaignCreateParams::Contact],
|
|
122
|
+
launch: T::Boolean,
|
|
106
123
|
name: String,
|
|
124
|
+
type: Revox::CampaignCreateParams::Type::OrSymbol,
|
|
107
125
|
call_retry_config: Revox::CampaignCreateParams::CallRetryConfig,
|
|
108
126
|
from_phone_number: String,
|
|
109
127
|
max_concurrent_calls: Float,
|
|
@@ -151,6 +169,29 @@ module Revox
|
|
|
151
169
|
end
|
|
152
170
|
end
|
|
153
171
|
|
|
172
|
+
# Campaign type. 'jump_in' campaigns only dial while someone is on the campaign
|
|
173
|
+
# page and auto-pause when unattended.
|
|
174
|
+
module Type
|
|
175
|
+
extend Revox::Internal::Type::Enum
|
|
176
|
+
|
|
177
|
+
TaggedSymbol =
|
|
178
|
+
T.type_alias { T.all(Symbol, Revox::CampaignCreateParams::Type) }
|
|
179
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
180
|
+
|
|
181
|
+
REGULAR =
|
|
182
|
+
T.let(:regular, Revox::CampaignCreateParams::Type::TaggedSymbol)
|
|
183
|
+
JUMP_IN =
|
|
184
|
+
T.let(:jump_in, Revox::CampaignCreateParams::Type::TaggedSymbol)
|
|
185
|
+
|
|
186
|
+
sig do
|
|
187
|
+
override.returns(
|
|
188
|
+
T::Array[Revox::CampaignCreateParams::Type::TaggedSymbol]
|
|
189
|
+
)
|
|
190
|
+
end
|
|
191
|
+
def self.values
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
|
|
154
195
|
class CallRetryConfig < Revox::Internal::Type::BaseModel
|
|
155
196
|
OrHash =
|
|
156
197
|
T.type_alias do
|
|
@@ -160,6 +201,24 @@ module Revox
|
|
|
160
201
|
)
|
|
161
202
|
end
|
|
162
203
|
|
|
204
|
+
# Days of the week when calls are allowed, in the recipient's timezone. Default:
|
|
205
|
+
# Monday through Friday.
|
|
206
|
+
sig do
|
|
207
|
+
returns(
|
|
208
|
+
T::Array[
|
|
209
|
+
Revox::CampaignCreateParams::CallRetryConfig::AllowedDay::OrSymbol
|
|
210
|
+
]
|
|
211
|
+
)
|
|
212
|
+
end
|
|
213
|
+
attr_accessor :allowed_days
|
|
214
|
+
|
|
215
|
+
# If true and max_retry_attempts >= 2, attempt #2 fires immediately (skipping
|
|
216
|
+
# retry_delay_seconds) when attempt #1 didn't reach a human.
|
|
217
|
+
# Calling-window/allowed-days checks still apply. Only affects the 1→2 transition.
|
|
218
|
+
# Default: false.
|
|
219
|
+
sig { returns(T::Boolean) }
|
|
220
|
+
attr_accessor :call_twice_in_a_row
|
|
221
|
+
|
|
163
222
|
sig do
|
|
164
223
|
returns(
|
|
165
224
|
T::Array[
|
|
@@ -183,6 +242,11 @@ module Revox
|
|
|
183
242
|
# the assistant's retry config.
|
|
184
243
|
sig do
|
|
185
244
|
params(
|
|
245
|
+
allowed_days:
|
|
246
|
+
T::Array[
|
|
247
|
+
Revox::CampaignCreateParams::CallRetryConfig::AllowedDay::OrSymbol
|
|
248
|
+
],
|
|
249
|
+
call_twice_in_a_row: T::Boolean,
|
|
186
250
|
calling_windows:
|
|
187
251
|
T::Array[
|
|
188
252
|
Revox::CampaignCreateParams::CallRetryConfig::CallingWindow::OrHash
|
|
@@ -192,6 +256,14 @@ module Revox
|
|
|
192
256
|
).returns(T.attached_class)
|
|
193
257
|
end
|
|
194
258
|
def self.new(
|
|
259
|
+
# Days of the week when calls are allowed, in the recipient's timezone. Default:
|
|
260
|
+
# Monday through Friday.
|
|
261
|
+
allowed_days:,
|
|
262
|
+
# If true and max_retry_attempts >= 2, attempt #2 fires immediately (skipping
|
|
263
|
+
# retry_delay_seconds) when attempt #1 didn't reach a human.
|
|
264
|
+
# Calling-window/allowed-days checks still apply. Only affects the 1→2 transition.
|
|
265
|
+
# Default: false.
|
|
266
|
+
call_twice_in_a_row:,
|
|
195
267
|
calling_windows:,
|
|
196
268
|
# Maximum number of call retry attempts. Default: 3.
|
|
197
269
|
max_retry_attempts:,
|
|
@@ -205,6 +277,11 @@ module Revox
|
|
|
205
277
|
sig do
|
|
206
278
|
override.returns(
|
|
207
279
|
{
|
|
280
|
+
allowed_days:
|
|
281
|
+
T::Array[
|
|
282
|
+
Revox::CampaignCreateParams::CallRetryConfig::AllowedDay::OrSymbol
|
|
283
|
+
],
|
|
284
|
+
call_twice_in_a_row: T::Boolean,
|
|
208
285
|
calling_windows:
|
|
209
286
|
T::Array[
|
|
210
287
|
Revox::CampaignCreateParams::CallRetryConfig::CallingWindow
|
|
@@ -217,6 +294,65 @@ module Revox
|
|
|
217
294
|
def to_hash
|
|
218
295
|
end
|
|
219
296
|
|
|
297
|
+
module AllowedDay
|
|
298
|
+
extend Revox::Internal::Type::Enum
|
|
299
|
+
|
|
300
|
+
TaggedSymbol =
|
|
301
|
+
T.type_alias do
|
|
302
|
+
T.all(
|
|
303
|
+
Symbol,
|
|
304
|
+
Revox::CampaignCreateParams::CallRetryConfig::AllowedDay
|
|
305
|
+
)
|
|
306
|
+
end
|
|
307
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
308
|
+
|
|
309
|
+
MONDAY =
|
|
310
|
+
T.let(
|
|
311
|
+
:monday,
|
|
312
|
+
Revox::CampaignCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
313
|
+
)
|
|
314
|
+
TUESDAY =
|
|
315
|
+
T.let(
|
|
316
|
+
:tuesday,
|
|
317
|
+
Revox::CampaignCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
318
|
+
)
|
|
319
|
+
WEDNESDAY =
|
|
320
|
+
T.let(
|
|
321
|
+
:wednesday,
|
|
322
|
+
Revox::CampaignCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
323
|
+
)
|
|
324
|
+
THURSDAY =
|
|
325
|
+
T.let(
|
|
326
|
+
:thursday,
|
|
327
|
+
Revox::CampaignCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
328
|
+
)
|
|
329
|
+
FRIDAY =
|
|
330
|
+
T.let(
|
|
331
|
+
:friday,
|
|
332
|
+
Revox::CampaignCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
333
|
+
)
|
|
334
|
+
SATURDAY =
|
|
335
|
+
T.let(
|
|
336
|
+
:saturday,
|
|
337
|
+
Revox::CampaignCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
338
|
+
)
|
|
339
|
+
SUNDAY =
|
|
340
|
+
T.let(
|
|
341
|
+
:sunday,
|
|
342
|
+
Revox::CampaignCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
343
|
+
)
|
|
344
|
+
|
|
345
|
+
sig do
|
|
346
|
+
override.returns(
|
|
347
|
+
T::Array[
|
|
348
|
+
Revox::CampaignCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
349
|
+
]
|
|
350
|
+
)
|
|
351
|
+
end
|
|
352
|
+
def self.values
|
|
353
|
+
end
|
|
354
|
+
end
|
|
355
|
+
|
|
220
356
|
class CallingWindow < Revox::Internal::Type::BaseModel
|
|
221
357
|
OrHash =
|
|
222
358
|
T.type_alias do
|