revox 0.0.2 → 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 +96 -0
- data/README.md +88 -22
- data/lib/revox/client.rb +19 -1
- data/lib/revox/internal/transport/base_client.rb +5 -0
- data/lib/revox/internal/type/base_model.rb +3 -3
- data/lib/revox/internal/util.rb +53 -7
- data/lib/revox/models/assistant_create_params.rb +1036 -11
- data/lib/revox/models/assistant_create_response.rb +1071 -11
- data/lib/revox/models/assistant_delete_params.rb +7 -1
- data/lib/revox/models/assistant_list_response.rb +1070 -11
- data/lib/revox/models/assistant_retrieve_params.rb +7 -1
- data/lib/revox/models/assistant_retrieve_response.rb +1066 -11
- data/lib/revox/models/assistant_update_params.rb +1043 -11
- data/lib/revox/models/assistant_update_response.rb +1097 -12
- data/lib/revox/models/call_create_params.rb +1063 -11
- data/lib/revox/models/call_create_response.rb +2507 -87
- data/lib/revox/models/call_retrieve_params.rb +7 -1
- data/lib/revox/models/call_retrieve_response.rb +2512 -87
- data/lib/revox/models/campaign_cancel_params.rb +20 -0
- data/lib/revox/models/campaign_cancel_response.rb +16 -0
- data/lib/revox/models/campaign_create_params.rb +239 -0
- data/lib/revox/models/campaign_create_response.rb +2030 -0
- data/lib/revox/models/campaign_delete_params.rb +20 -0
- data/lib/revox/models/campaign_delete_response.rb +16 -0
- data/lib/revox/models/campaign_export_rows_params.rb +20 -0
- data/lib/revox/models/campaign_export_rows_response.rb +22 -0
- data/lib/revox/models/campaign_get_rows_params.rb +20 -0
- data/lib/revox/models/campaign_get_rows_response.rb +3176 -0
- data/lib/revox/models/campaign_list_params.rb +14 -0
- data/lib/revox/models/campaign_list_response.rb +2024 -0
- data/lib/revox/models/campaign_retrieve_params.rb +20 -0
- data/lib/revox/models/campaign_retrieve_response.rb +2032 -0
- 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 +43 -3
- data/lib/revox/models/voice_retrieve_params.rb +7 -1
- data/lib/revox/models.rb +14 -2
- data/lib/revox/resources/assistants.rb +138 -6
- data/lib/revox/resources/call.rb +10 -27
- data/lib/revox/resources/campaigns.rb +176 -0
- data/lib/revox/resources/voices.rb +17 -7
- data/lib/revox/version.rb +1 -1
- data/lib/revox.rb +15 -2
- data/rbi/revox/client.rbi +3 -0
- data/rbi/revox/internal/util.rbi +28 -0
- data/rbi/revox/models/assistant_create_params.rbi +2135 -102
- data/rbi/revox/models/assistant_create_response.rbi +2454 -199
- data/rbi/revox/models/assistant_delete_params.rbi +11 -5
- data/rbi/revox/models/assistant_list_response.rbi +2448 -195
- data/rbi/revox/models/assistant_retrieve_params.rbi +11 -5
- data/rbi/revox/models/assistant_retrieve_response.rbi +2401 -210
- data/rbi/revox/models/assistant_update_params.rbi +2139 -100
- data/rbi/revox/models/assistant_update_response.rbi +2504 -198
- data/rbi/revox/models/call_create_params.rbi +2377 -222
- data/rbi/revox/models/call_create_response.rbi +5840 -594
- data/rbi/revox/models/call_retrieve_params.rbi +11 -5
- data/rbi/revox/models/call_retrieve_response.rbi +5872 -618
- data/rbi/revox/models/campaign_cancel_params.rbi +33 -0
- data/rbi/revox/models/campaign_cancel_response.rbi +23 -0
- data/rbi/revox/models/campaign_create_params.rbi +433 -0
- data/rbi/revox/models/campaign_create_response.rbi +4170 -0
- data/rbi/revox/models/campaign_delete_params.rbi +33 -0
- data/rbi/revox/models/campaign_delete_response.rbi +23 -0
- data/rbi/revox/models/campaign_export_rows_params.rbi +33 -0
- data/rbi/revox/models/campaign_export_rows_response.rbi +29 -0
- data/rbi/revox/models/campaign_get_rows_params.rbi +33 -0
- data/rbi/revox/models/campaign_get_rows_response.rbi +6706 -0
- data/rbi/revox/models/campaign_list_params.rbi +27 -0
- data/rbi/revox/models/campaign_list_response.rbi +4156 -0
- data/rbi/revox/models/campaign_retrieve_params.rbi +33 -0
- data/rbi/revox/models/campaign_retrieve_response.rbi +4175 -0
- 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 +60 -2
- data/rbi/revox/models/voice_retrieve_params.rbi +6 -1
- data/rbi/revox/models.rbi +14 -2
- data/rbi/revox/resources/assistants.rbi +301 -6
- data/rbi/revox/resources/call.rbi +10 -19
- data/rbi/revox/resources/campaigns.rbi +121 -0
- data/rbi/revox/resources/voices.rbi +15 -5
- data/sig/revox/client.rbs +2 -0
- data/sig/revox/internal/util.rbs +14 -0
- data/sig/revox/models/assistant_create_params.rbs +841 -4
- data/sig/revox/models/assistant_create_response.rbs +860 -3
- data/sig/revox/models/assistant_delete_params.rbs +8 -3
- data/sig/revox/models/assistant_list_response.rbs +860 -3
- data/sig/revox/models/assistant_retrieve_params.rbs +8 -3
- data/sig/revox/models/assistant_retrieve_response.rbs +859 -3
- data/sig/revox/models/assistant_update_params.rbs +846 -4
- data/sig/revox/models/assistant_update_response.rbs +886 -6
- data/sig/revox/models/call_create_params.rbs +844 -6
- data/sig/revox/models/call_create_response.rbs +2166 -79
- data/sig/revox/models/call_retrieve_params.rbs +9 -3
- data/sig/revox/models/call_retrieve_response.rbs +2166 -79
- data/sig/revox/models/campaign_cancel_params.rbs +20 -0
- data/sig/revox/models/campaign_cancel_response.rbs +13 -0
- data/sig/revox/models/campaign_create_params.rbs +203 -0
- data/sig/revox/models/campaign_create_response.rbs +1694 -0
- data/sig/revox/models/campaign_delete_params.rbs +20 -0
- data/sig/revox/models/campaign_delete_response.rbs +13 -0
- data/sig/revox/models/campaign_export_rows_params.rbs +20 -0
- data/sig/revox/models/campaign_export_rows_response.rbs +15 -0
- data/sig/revox/models/campaign_get_rows_params.rbs +20 -0
- data/sig/revox/models/campaign_get_rows_response.rbs +2688 -0
- data/sig/revox/models/campaign_list_params.rbs +14 -0
- data/sig/revox/models/campaign_list_response.rbs +1694 -0
- data/sig/revox/models/campaign_retrieve_params.rbs +20 -0
- data/sig/revox/models/campaign_retrieve_response.rbs +1694 -0
- 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 +35 -1
- data/sig/revox/models/voice_retrieve_params.rbs +5 -1
- data/sig/revox/models.rbs +14 -2
- data/sig/revox/resources/assistants.rbs +54 -0
- data/sig/revox/resources/call.rbs +0 -6
- data/sig/revox/resources/campaigns.rbs +49 -0
- data/sig/revox/resources/voices.rbs +3 -0
- metadata +47 -8
- data/lib/revox/models/call_list_params.rb +0 -29
- data/lib/revox/models/call_list_response.rb +0 -197
- data/rbi/revox/models/call_list_params.rbi +0 -47
- data/rbi/revox/models/call_list_response.rbi +0 -401
- data/sig/revox/models/call_list_params.rbs +0 -28
- data/sig/revox/models/call_list_response.rbs +0 -171
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Revox
|
|
4
|
+
module Models
|
|
5
|
+
class CampaignCancelParams < Revox::Internal::Type::BaseModel
|
|
6
|
+
extend Revox::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Revox::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Revox::CampaignCancelParams, Revox::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(
|
|
19
|
+
id: String,
|
|
20
|
+
request_options: Revox::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
22
|
+
end
|
|
23
|
+
def self.new(id:, request_options: {})
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
override.returns({ id: String, request_options: Revox::RequestOptions })
|
|
28
|
+
end
|
|
29
|
+
def to_hash
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Revox
|
|
4
|
+
module Models
|
|
5
|
+
class CampaignCancelResponse < Revox::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Revox::Models::CampaignCancelResponse, Revox::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
sig { returns(T::Boolean) }
|
|
12
|
+
attr_accessor :success
|
|
13
|
+
|
|
14
|
+
sig { params(success: T::Boolean).returns(T.attached_class) }
|
|
15
|
+
def self.new(success:)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { override.returns({ success: T::Boolean }) }
|
|
19
|
+
def to_hash
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Revox
|
|
4
|
+
module Models
|
|
5
|
+
class CampaignCreateParams < Revox::Internal::Type::BaseModel
|
|
6
|
+
extend Revox::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Revox::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Revox::CampaignCreateParams, Revox::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The ID of the assistant to use
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :assistant_id
|
|
17
|
+
|
|
18
|
+
# The list of contacts to call
|
|
19
|
+
sig { returns(T::Array[Revox::CampaignCreateParams::Contact]) }
|
|
20
|
+
attr_accessor :contacts
|
|
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
|
+
|
|
26
|
+
# The name of the campaign
|
|
27
|
+
sig { returns(String) }
|
|
28
|
+
attr_accessor :name
|
|
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
|
+
|
|
35
|
+
# Override retry configuration for calls in this campaign. If not provided, uses
|
|
36
|
+
# the assistant's retry config.
|
|
37
|
+
sig { returns(T.nilable(Revox::CampaignCreateParams::CallRetryConfig)) }
|
|
38
|
+
attr_reader :call_retry_config
|
|
39
|
+
|
|
40
|
+
sig do
|
|
41
|
+
params(
|
|
42
|
+
call_retry_config:
|
|
43
|
+
Revox::CampaignCreateParams::CallRetryConfig::OrHash
|
|
44
|
+
).void
|
|
45
|
+
end
|
|
46
|
+
attr_writer :call_retry_config
|
|
47
|
+
|
|
48
|
+
# The phone number to use for outbound calls (E.164 format, e.g., +1234567890)
|
|
49
|
+
sig { returns(T.nilable(String)) }
|
|
50
|
+
attr_reader :from_phone_number
|
|
51
|
+
|
|
52
|
+
sig { params(from_phone_number: String).void }
|
|
53
|
+
attr_writer :from_phone_number
|
|
54
|
+
|
|
55
|
+
# Maximum number of concurrent calls allowed for this campaign
|
|
56
|
+
sig { returns(T.nilable(Float)) }
|
|
57
|
+
attr_reader :max_concurrent_calls
|
|
58
|
+
|
|
59
|
+
sig { params(max_concurrent_calls: Float).void }
|
|
60
|
+
attr_writer :max_concurrent_calls
|
|
61
|
+
|
|
62
|
+
# Schedule all calls in this campaign to start at a specific date and time (ISO
|
|
63
|
+
# 8601 format)
|
|
64
|
+
sig do
|
|
65
|
+
returns(T.nilable(Revox::CampaignCreateParams::ScheduledAt::Variants))
|
|
66
|
+
end
|
|
67
|
+
attr_reader :scheduled_at
|
|
68
|
+
|
|
69
|
+
sig do
|
|
70
|
+
params(
|
|
71
|
+
scheduled_at: Revox::CampaignCreateParams::ScheduledAt::Variants
|
|
72
|
+
).void
|
|
73
|
+
end
|
|
74
|
+
attr_writer :scheduled_at
|
|
75
|
+
|
|
76
|
+
sig do
|
|
77
|
+
params(
|
|
78
|
+
assistant_id: String,
|
|
79
|
+
contacts: T::Array[Revox::CampaignCreateParams::Contact::OrHash],
|
|
80
|
+
launch: T::Boolean,
|
|
81
|
+
name: String,
|
|
82
|
+
type: Revox::CampaignCreateParams::Type::OrSymbol,
|
|
83
|
+
call_retry_config:
|
|
84
|
+
Revox::CampaignCreateParams::CallRetryConfig::OrHash,
|
|
85
|
+
from_phone_number: String,
|
|
86
|
+
max_concurrent_calls: Float,
|
|
87
|
+
scheduled_at: Revox::CampaignCreateParams::ScheduledAt::Variants,
|
|
88
|
+
request_options: Revox::RequestOptions::OrHash
|
|
89
|
+
).returns(T.attached_class)
|
|
90
|
+
end
|
|
91
|
+
def self.new(
|
|
92
|
+
# The ID of the assistant to use
|
|
93
|
+
assistant_id:,
|
|
94
|
+
# The list of contacts to call
|
|
95
|
+
contacts:,
|
|
96
|
+
# Whether to launch the campaign immediately. Set to false to save as a draft.
|
|
97
|
+
launch:,
|
|
98
|
+
# The name of the campaign
|
|
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:,
|
|
103
|
+
# Override retry configuration for calls in this campaign. If not provided, uses
|
|
104
|
+
# the assistant's retry config.
|
|
105
|
+
call_retry_config: nil,
|
|
106
|
+
# The phone number to use for outbound calls (E.164 format, e.g., +1234567890)
|
|
107
|
+
from_phone_number: nil,
|
|
108
|
+
# Maximum number of concurrent calls allowed for this campaign
|
|
109
|
+
max_concurrent_calls: nil,
|
|
110
|
+
# Schedule all calls in this campaign to start at a specific date and time (ISO
|
|
111
|
+
# 8601 format)
|
|
112
|
+
scheduled_at: nil,
|
|
113
|
+
request_options: {}
|
|
114
|
+
)
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
sig do
|
|
118
|
+
override.returns(
|
|
119
|
+
{
|
|
120
|
+
assistant_id: String,
|
|
121
|
+
contacts: T::Array[Revox::CampaignCreateParams::Contact],
|
|
122
|
+
launch: T::Boolean,
|
|
123
|
+
name: String,
|
|
124
|
+
type: Revox::CampaignCreateParams::Type::OrSymbol,
|
|
125
|
+
call_retry_config: Revox::CampaignCreateParams::CallRetryConfig,
|
|
126
|
+
from_phone_number: String,
|
|
127
|
+
max_concurrent_calls: Float,
|
|
128
|
+
scheduled_at: Revox::CampaignCreateParams::ScheduledAt::Variants,
|
|
129
|
+
request_options: Revox::RequestOptions
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
end
|
|
133
|
+
def to_hash
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
class Contact < Revox::Internal::Type::BaseModel
|
|
137
|
+
OrHash =
|
|
138
|
+
T.type_alias do
|
|
139
|
+
T.any(
|
|
140
|
+
Revox::CampaignCreateParams::Contact,
|
|
141
|
+
Revox::Internal::AnyHash
|
|
142
|
+
)
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
sig { returns(T::Hash[Symbol, String]) }
|
|
146
|
+
attr_accessor :prompt_variables
|
|
147
|
+
|
|
148
|
+
sig { returns(String) }
|
|
149
|
+
attr_accessor :to_phone_number
|
|
150
|
+
|
|
151
|
+
sig do
|
|
152
|
+
params(
|
|
153
|
+
prompt_variables: T::Hash[Symbol, String],
|
|
154
|
+
to_phone_number: String
|
|
155
|
+
).returns(T.attached_class)
|
|
156
|
+
end
|
|
157
|
+
def self.new(prompt_variables:, to_phone_number:)
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
sig do
|
|
161
|
+
override.returns(
|
|
162
|
+
{
|
|
163
|
+
prompt_variables: T::Hash[Symbol, String],
|
|
164
|
+
to_phone_number: String
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
end
|
|
168
|
+
def to_hash
|
|
169
|
+
end
|
|
170
|
+
end
|
|
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
|
+
|
|
195
|
+
class CallRetryConfig < Revox::Internal::Type::BaseModel
|
|
196
|
+
OrHash =
|
|
197
|
+
T.type_alias do
|
|
198
|
+
T.any(
|
|
199
|
+
Revox::CampaignCreateParams::CallRetryConfig,
|
|
200
|
+
Revox::Internal::AnyHash
|
|
201
|
+
)
|
|
202
|
+
end
|
|
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
|
+
|
|
222
|
+
sig do
|
|
223
|
+
returns(
|
|
224
|
+
T::Array[
|
|
225
|
+
Revox::CampaignCreateParams::CallRetryConfig::CallingWindow
|
|
226
|
+
]
|
|
227
|
+
)
|
|
228
|
+
end
|
|
229
|
+
attr_accessor :calling_windows
|
|
230
|
+
|
|
231
|
+
# Maximum number of call retry attempts. Default: 3.
|
|
232
|
+
sig { returns(Integer) }
|
|
233
|
+
attr_accessor :max_retry_attempts
|
|
234
|
+
|
|
235
|
+
# Optional IANA timezone identifier to override the automatic timezone detection
|
|
236
|
+
# from phone number. If not provided, timezone is determined from the recipient's
|
|
237
|
+
# phone number country code. Examples: 'America/New_York', 'Europe/Paris'.
|
|
238
|
+
sig { returns(T.nilable(String)) }
|
|
239
|
+
attr_accessor :timezone
|
|
240
|
+
|
|
241
|
+
# Override retry configuration for calls in this campaign. If not provided, uses
|
|
242
|
+
# the assistant's retry config.
|
|
243
|
+
sig do
|
|
244
|
+
params(
|
|
245
|
+
allowed_days:
|
|
246
|
+
T::Array[
|
|
247
|
+
Revox::CampaignCreateParams::CallRetryConfig::AllowedDay::OrSymbol
|
|
248
|
+
],
|
|
249
|
+
call_twice_in_a_row: T::Boolean,
|
|
250
|
+
calling_windows:
|
|
251
|
+
T::Array[
|
|
252
|
+
Revox::CampaignCreateParams::CallRetryConfig::CallingWindow::OrHash
|
|
253
|
+
],
|
|
254
|
+
max_retry_attempts: Integer,
|
|
255
|
+
timezone: T.nilable(String)
|
|
256
|
+
).returns(T.attached_class)
|
|
257
|
+
end
|
|
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:,
|
|
267
|
+
calling_windows:,
|
|
268
|
+
# Maximum number of call retry attempts. Default: 3.
|
|
269
|
+
max_retry_attempts:,
|
|
270
|
+
# Optional IANA timezone identifier to override the automatic timezone detection
|
|
271
|
+
# from phone number. If not provided, timezone is determined from the recipient's
|
|
272
|
+
# phone number country code. Examples: 'America/New_York', 'Europe/Paris'.
|
|
273
|
+
timezone: nil
|
|
274
|
+
)
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
sig do
|
|
278
|
+
override.returns(
|
|
279
|
+
{
|
|
280
|
+
allowed_days:
|
|
281
|
+
T::Array[
|
|
282
|
+
Revox::CampaignCreateParams::CallRetryConfig::AllowedDay::OrSymbol
|
|
283
|
+
],
|
|
284
|
+
call_twice_in_a_row: T::Boolean,
|
|
285
|
+
calling_windows:
|
|
286
|
+
T::Array[
|
|
287
|
+
Revox::CampaignCreateParams::CallRetryConfig::CallingWindow
|
|
288
|
+
],
|
|
289
|
+
max_retry_attempts: Integer,
|
|
290
|
+
timezone: T.nilable(String)
|
|
291
|
+
}
|
|
292
|
+
)
|
|
293
|
+
end
|
|
294
|
+
def to_hash
|
|
295
|
+
end
|
|
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
|
+
|
|
356
|
+
class CallingWindow < Revox::Internal::Type::BaseModel
|
|
357
|
+
OrHash =
|
|
358
|
+
T.type_alias do
|
|
359
|
+
T.any(
|
|
360
|
+
Revox::CampaignCreateParams::CallRetryConfig::CallingWindow,
|
|
361
|
+
Revox::Internal::AnyHash
|
|
362
|
+
)
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
# End time for the calling window in the recipient's timezone (or
|
|
366
|
+
# timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
|
|
367
|
+
# Examples: '17:00', '6pm'. Default: '18:00'.
|
|
368
|
+
sig { returns(String) }
|
|
369
|
+
attr_accessor :calling_window_end_time
|
|
370
|
+
|
|
371
|
+
# Start time for the calling window in the recipient's timezone (or
|
|
372
|
+
# timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
|
|
373
|
+
# Examples: '09:00', '10am'. Default: '10:00'.
|
|
374
|
+
sig { returns(String) }
|
|
375
|
+
attr_accessor :calling_window_start_time
|
|
376
|
+
|
|
377
|
+
# Delay between retry attempts in seconds. Default: 7200 (2 hours).
|
|
378
|
+
sig { returns(Integer) }
|
|
379
|
+
attr_accessor :retry_delay_seconds
|
|
380
|
+
|
|
381
|
+
sig do
|
|
382
|
+
params(
|
|
383
|
+
calling_window_end_time: String,
|
|
384
|
+
calling_window_start_time: String,
|
|
385
|
+
retry_delay_seconds: Integer
|
|
386
|
+
).returns(T.attached_class)
|
|
387
|
+
end
|
|
388
|
+
def self.new(
|
|
389
|
+
# End time for the calling window in the recipient's timezone (or
|
|
390
|
+
# timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
|
|
391
|
+
# Examples: '17:00', '6pm'. Default: '18:00'.
|
|
392
|
+
calling_window_end_time:,
|
|
393
|
+
# Start time for the calling window in the recipient's timezone (or
|
|
394
|
+
# timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour).
|
|
395
|
+
# Examples: '09:00', '10am'. Default: '10:00'.
|
|
396
|
+
calling_window_start_time:,
|
|
397
|
+
# Delay between retry attempts in seconds. Default: 7200 (2 hours).
|
|
398
|
+
retry_delay_seconds:
|
|
399
|
+
)
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
sig do
|
|
403
|
+
override.returns(
|
|
404
|
+
{
|
|
405
|
+
calling_window_end_time: String,
|
|
406
|
+
calling_window_start_time: String,
|
|
407
|
+
retry_delay_seconds: Integer
|
|
408
|
+
}
|
|
409
|
+
)
|
|
410
|
+
end
|
|
411
|
+
def to_hash
|
|
412
|
+
end
|
|
413
|
+
end
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
# Schedule all calls in this campaign to start at a specific date and time (ISO
|
|
417
|
+
# 8601 format)
|
|
418
|
+
module ScheduledAt
|
|
419
|
+
extend Revox::Internal::Type::Union
|
|
420
|
+
|
|
421
|
+
Variants = T.type_alias { T.any(Time, T.anything) }
|
|
422
|
+
|
|
423
|
+
sig do
|
|
424
|
+
override.returns(
|
|
425
|
+
T::Array[Revox::CampaignCreateParams::ScheduledAt::Variants]
|
|
426
|
+
)
|
|
427
|
+
end
|
|
428
|
+
def self.variants
|
|
429
|
+
end
|
|
430
|
+
end
|
|
431
|
+
end
|
|
432
|
+
end
|
|
433
|
+
end
|