revox 0.4.0 → 0.5.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.
data/rbi/revox/models.rbi CHANGED
@@ -41,6 +41,8 @@ module Revox
41
41
 
42
42
  CampaignGetRowsParams = Revox::Models::CampaignGetRowsParams
43
43
 
44
+ CampaignLaunchParams = Revox::Models::CampaignLaunchParams
45
+
44
46
  CampaignListParams = Revox::Models::CampaignListParams
45
47
 
46
48
  CampaignPauseParams = Revox::Models::CampaignPauseParams
@@ -133,6 +133,32 @@ module Revox
133
133
  def get_rows(id, request_options: {})
134
134
  end
135
135
 
136
+ # Send the campaign's calls matching a selection. In ai_first mode each call is
137
+ # handed to the admission scheduler at the requested time and follows the retry
138
+ # configuration from there. In speed_dial mode a live operator session dials them,
139
+ # and any call waiting on an AI retry is un-scheduled first so the same contact is
140
+ # never dialed twice. Calls the AI is already dialing are skipped, as are calls
141
+ # whose attempt budget is spent.
142
+ sig do
143
+ params(
144
+ id: String,
145
+ mode: Revox::CampaignLaunchParams::Mode::OrSymbol,
146
+ selection: Revox::CampaignLaunchParams::Selection::OrHash,
147
+ scheduled_at: Time,
148
+ request_options: Revox::RequestOptions::OrHash
149
+ ).returns(Revox::Models::CampaignLaunchResponse)
150
+ end
151
+ def launch(
152
+ id,
153
+ mode:,
154
+ selection:,
155
+ # When to place the calls (ISO 8601). Omit to launch now. ai_first only — a speed
156
+ # dial session cannot be scheduled.
157
+ scheduled_at: nil,
158
+ request_options: {}
159
+ )
160
+ end
161
+
136
162
  # Pause a running campaign so no further calls are placed. In-progress calls are
137
163
  # allowed to finish; pending and scheduled calls are held until the campaign is
138
164
  # resumed. Scheduled retry timers keep counting down, so a call resumed before its
@@ -0,0 +1,233 @@
1
+ module Revox
2
+ module Models
3
+ type campaign_launch_params =
4
+ {
5
+ id: String,
6
+ mode: Revox::Models::CampaignLaunchParams::mode,
7
+ selection: Revox::CampaignLaunchParams::Selection,
8
+ scheduled_at: Time
9
+ }
10
+ & Revox::Internal::Type::request_parameters
11
+
12
+ class CampaignLaunchParams < Revox::Internal::Type::BaseModel
13
+ extend Revox::Internal::Type::RequestParameters::Converter
14
+ include Revox::Internal::Type::RequestParameters
15
+
16
+ attr_accessor id: String
17
+
18
+ attr_accessor mode: Revox::Models::CampaignLaunchParams::mode
19
+
20
+ attr_accessor selection: Revox::CampaignLaunchParams::Selection
21
+
22
+ attr_reader scheduled_at: Time?
23
+
24
+ def scheduled_at=: (Time) -> Time
25
+
26
+ def initialize: (
27
+ id: String,
28
+ mode: Revox::Models::CampaignLaunchParams::mode,
29
+ selection: Revox::CampaignLaunchParams::Selection,
30
+ ?scheduled_at: Time,
31
+ ?request_options: Revox::request_opts
32
+ ) -> void
33
+
34
+ def to_hash: -> {
35
+ id: String,
36
+ mode: Revox::Models::CampaignLaunchParams::mode,
37
+ selection: Revox::CampaignLaunchParams::Selection,
38
+ scheduled_at: Time,
39
+ request_options: Revox::RequestOptions
40
+ }
41
+
42
+ type mode = :ai_first | :speed_dial
43
+
44
+ module Mode
45
+ extend Revox::Internal::Type::Enum
46
+
47
+ AI_FIRST: :ai_first
48
+ SPEED_DIAL: :speed_dial
49
+
50
+ def self?.values: -> ::Array[Revox::Models::CampaignLaunchParams::mode]
51
+ end
52
+
53
+ type selection =
54
+ {
55
+ filters: Revox::CampaignLaunchParams::Selection::Filters,
56
+ rows: Revox::CampaignLaunchParams::Selection::Rows
57
+ }
58
+
59
+ class Selection < Revox::Internal::Type::BaseModel
60
+ attr_accessor filters: Revox::CampaignLaunchParams::Selection::Filters
61
+
62
+ attr_accessor rows: Revox::CampaignLaunchParams::Selection::Rows
63
+
64
+ def initialize: (
65
+ filters: Revox::CampaignLaunchParams::Selection::Filters,
66
+ rows: Revox::CampaignLaunchParams::Selection::Rows
67
+ ) -> void
68
+
69
+ def to_hash: -> {
70
+ filters: Revox::CampaignLaunchParams::Selection::Filters,
71
+ rows: Revox::CampaignLaunchParams::Selection::Rows
72
+ }
73
+
74
+ type filters =
75
+ {
76
+ assignee_ids: ::Array[String],
77
+ directions: ::Array[Revox::Models::CampaignLaunchParams::Selection::Filters::direction],
78
+ outcomes: ::Array[Revox::Models::CampaignLaunchParams::Selection::Filters::outcome],
79
+ results: ::Array[Revox::Models::CampaignLaunchParams::Selection::Filters::result],
80
+ statuses: ::Array[Revox::Models::CampaignLaunchParams::Selection::Filters::status],
81
+ query: String
82
+ }
83
+
84
+ class Filters < Revox::Internal::Type::BaseModel
85
+ attr_accessor assignee_ids: ::Array[String]
86
+
87
+ attr_accessor directions: ::Array[Revox::Models::CampaignLaunchParams::Selection::Filters::direction]
88
+
89
+ attr_accessor outcomes: ::Array[Revox::Models::CampaignLaunchParams::Selection::Filters::outcome]
90
+
91
+ attr_accessor results: ::Array[Revox::Models::CampaignLaunchParams::Selection::Filters::result]
92
+
93
+ attr_accessor statuses: ::Array[Revox::Models::CampaignLaunchParams::Selection::Filters::status]
94
+
95
+ attr_reader query: String?
96
+
97
+ def query=: (String) -> String
98
+
99
+ def initialize: (
100
+ assignee_ids: ::Array[String],
101
+ directions: ::Array[Revox::Models::CampaignLaunchParams::Selection::Filters::direction],
102
+ outcomes: ::Array[Revox::Models::CampaignLaunchParams::Selection::Filters::outcome],
103
+ results: ::Array[Revox::Models::CampaignLaunchParams::Selection::Filters::result],
104
+ statuses: ::Array[Revox::Models::CampaignLaunchParams::Selection::Filters::status],
105
+ ?query: String
106
+ ) -> void
107
+
108
+ def to_hash: -> {
109
+ assignee_ids: ::Array[String],
110
+ directions: ::Array[Revox::Models::CampaignLaunchParams::Selection::Filters::direction],
111
+ outcomes: ::Array[Revox::Models::CampaignLaunchParams::Selection::Filters::outcome],
112
+ results: ::Array[Revox::Models::CampaignLaunchParams::Selection::Filters::result],
113
+ statuses: ::Array[Revox::Models::CampaignLaunchParams::Selection::Filters::status],
114
+ query: String
115
+ }
116
+
117
+ type direction = :inbound | :outbound
118
+
119
+ module Direction
120
+ extend Revox::Internal::Type::Enum
121
+
122
+ INBOUND: :inbound
123
+ OUTBOUND: :outbound
124
+
125
+ def self?.values: -> ::Array[Revox::Models::CampaignLaunchParams::Selection::Filters::direction]
126
+ end
127
+
128
+ type outcome =
129
+ :not_interested
130
+ | :interested
131
+ | :completed
132
+ | :requested_callback_later
133
+ | :none
134
+
135
+ module Outcome
136
+ extend Revox::Internal::Type::Enum
137
+
138
+ NOT_INTERESTED: :not_interested
139
+ INTERESTED: :interested
140
+ COMPLETED: :completed
141
+ REQUESTED_CALLBACK_LATER: :requested_callback_later
142
+ NONE: :none
143
+
144
+ def self?.values: -> ::Array[Revox::Models::CampaignLaunchParams::Selection::Filters::outcome]
145
+ end
146
+
147
+ type result =
148
+ :IVR
149
+ | :voicemail
150
+ | :human
151
+ | :unknown
152
+ | :"ios-screening-filter"
153
+ | :none
154
+
155
+ module Result
156
+ extend Revox::Internal::Type::Enum
157
+
158
+ IVR: :IVR
159
+ VOICEMAIL: :voicemail
160
+ HUMAN: :human
161
+ UNKNOWN: :unknown
162
+ IOS_SCREENING_FILTER: :"ios-screening-filter"
163
+ NONE: :none
164
+
165
+ def self?.values: -> ::Array[Revox::Models::CampaignLaunchParams::Selection::Filters::result]
166
+ end
167
+
168
+ type status =
169
+ :initializing
170
+ | :queued_for_calling
171
+ | :calling
172
+ | :post_processing
173
+ | :not_launched
174
+ | :scheduled
175
+ | :paused
176
+ | :completed
177
+ | :cancelled
178
+ | :errored
179
+
180
+ module Status
181
+ extend Revox::Internal::Type::Enum
182
+
183
+ INITIALIZING: :initializing
184
+ QUEUED_FOR_CALLING: :queued_for_calling
185
+ CALLING: :calling
186
+ POST_PROCESSING: :post_processing
187
+ NOT_LAUNCHED: :not_launched
188
+ SCHEDULED: :scheduled
189
+ PAUSED: :paused
190
+ COMPLETED: :completed
191
+ CANCELLED: :cancelled
192
+ ERRORED: :errored
193
+
194
+ def self?.values: -> ::Array[Revox::Models::CampaignLaunchParams::Selection::Filters::status]
195
+ end
196
+ end
197
+
198
+ type rows =
199
+ {
200
+ call_ids: ::Array[String],
201
+ mode: Revox::Models::CampaignLaunchParams::Selection::Rows::mode
202
+ }
203
+
204
+ class Rows < Revox::Internal::Type::BaseModel
205
+ attr_accessor call_ids: ::Array[String]
206
+
207
+ attr_accessor mode: Revox::Models::CampaignLaunchParams::Selection::Rows::mode
208
+
209
+ def initialize: (
210
+ call_ids: ::Array[String],
211
+ mode: Revox::Models::CampaignLaunchParams::Selection::Rows::mode
212
+ ) -> void
213
+
214
+ def to_hash: -> {
215
+ call_ids: ::Array[String],
216
+ mode: Revox::Models::CampaignLaunchParams::Selection::Rows::mode
217
+ }
218
+
219
+ type mode = :all_except | :only
220
+
221
+ module Mode
222
+ extend Revox::Internal::Type::Enum
223
+
224
+ ALL_EXCEPT: :all_except
225
+ ONLY: :only
226
+
227
+ def self?.values: -> ::Array[Revox::Models::CampaignLaunchParams::Selection::Rows::mode]
228
+ end
229
+ end
230
+ end
231
+ end
232
+ end
233
+ end