trycourier 4.11.0 → 4.13.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 +17 -0
- data/lib/courier/client.rb +4 -0
- data/lib/courier/models/brand_create_params.rb +7 -7
- data/lib/courier/models/create_journey_request.rb +2 -2
- data/lib/courier/models/digest_category.rb +53 -0
- data/lib/courier/models/digest_instance.rb +98 -0
- data/lib/courier/models/digest_instance_list_response.rb +72 -0
- data/lib/courier/models/digests/schedule_list_instances_params.rb +43 -0
- data/lib/courier/models/digests/schedule_release_params.rb +22 -0
- data/lib/courier/models/journey_node.rb +157 -1
- data/lib/courier/models/journey_response.rb +2 -2
- data/lib/courier/models.rb +8 -0
- data/lib/courier/resources/brands.rb +4 -3
- data/lib/courier/resources/digests/schedules.rb +72 -0
- data/lib/courier/resources/digests.rb +18 -0
- data/lib/courier/resources/journeys.rb +2 -2
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +7 -0
- data/rbi/courier/client.rbi +3 -0
- data/rbi/courier/models/brand_create_params.rbi +8 -8
- data/rbi/courier/models/create_journey_request.rbi +3 -0
- data/rbi/courier/models/digest_category.rbi +82 -0
- data/rbi/courier/models/digest_instance.rbi +138 -0
- data/rbi/courier/models/digest_instance_list_response.rbi +104 -0
- data/rbi/courier/models/digests/schedule_list_instances_params.rbi +70 -0
- data/rbi/courier/models/digests/schedule_release_params.rbi +40 -0
- data/rbi/courier/models/journey_node.rbi +315 -0
- data/rbi/courier/models/journey_response.rbi +1 -0
- data/rbi/courier/models.rbi +8 -0
- data/rbi/courier/resources/brands.rbi +4 -9
- data/rbi/courier/resources/digests/schedules.rbi +54 -0
- data/rbi/courier/resources/digests.rbi +15 -0
- data/rbi/courier/resources/journeys.rbi +2 -0
- data/sig/courier/client.rbs +2 -0
- data/sig/courier/models/brand_create_params.rbs +5 -5
- data/sig/courier/models/digest_category.rbs +46 -0
- data/sig/courier/models/digest_instance.rbs +83 -0
- data/sig/courier/models/digest_instance_list_response.rbs +57 -0
- data/sig/courier/models/digests/schedule_list_instances_params.rbs +38 -0
- data/sig/courier/models/digests/schedule_release_params.rbs +25 -0
- data/sig/courier/models/journey_node.rbs +130 -0
- data/sig/courier/models.rbs +8 -0
- data/sig/courier/resources/brands.rbs +1 -1
- data/sig/courier/resources/digests/schedules.rbs +21 -0
- data/sig/courier/resources/digests.rbs +9 -0
- metadata +23 -2
|
@@ -21,11 +21,326 @@ module Courier
|
|
|
21
21
|
Courier::JourneyAINode,
|
|
22
22
|
Courier::JourneyThrottleStaticNode,
|
|
23
23
|
Courier::JourneyThrottleDynamicNode,
|
|
24
|
+
Courier::JourneyNode::JourneyBatchNode,
|
|
24
25
|
Courier::JourneyExitNode,
|
|
25
26
|
Courier::JourneyNode::JourneyBranchNode
|
|
26
27
|
)
|
|
27
28
|
end
|
|
28
29
|
|
|
30
|
+
class JourneyBatchNode < Courier::Internal::Type::BaseModel
|
|
31
|
+
OrHash =
|
|
32
|
+
T.type_alias do
|
|
33
|
+
T.any(
|
|
34
|
+
Courier::JourneyNode::JourneyBatchNode,
|
|
35
|
+
Courier::Internal::AnyHash
|
|
36
|
+
)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# ISO 8601 duration. Hard ceiling from the first event into the batch; releases
|
|
40
|
+
# the batch unconditionally when it elapses.
|
|
41
|
+
sig { returns(String) }
|
|
42
|
+
attr_accessor :max_wait_period
|
|
43
|
+
|
|
44
|
+
# How to select which collected events to retain in the aggregated payload when
|
|
45
|
+
# the batch releases.
|
|
46
|
+
sig { returns(Courier::JourneyNode::JourneyBatchNode::Retain) }
|
|
47
|
+
attr_reader :retain
|
|
48
|
+
|
|
49
|
+
sig do
|
|
50
|
+
params(
|
|
51
|
+
retain: Courier::JourneyNode::JourneyBatchNode::Retain::OrHash
|
|
52
|
+
).void
|
|
53
|
+
end
|
|
54
|
+
attr_writer :retain
|
|
55
|
+
|
|
56
|
+
sig { returns(Courier::JourneyNode::JourneyBatchNode::Scope::OrSymbol) }
|
|
57
|
+
attr_accessor :scope
|
|
58
|
+
|
|
59
|
+
sig { returns(Courier::JourneyNode::JourneyBatchNode::Type::OrSymbol) }
|
|
60
|
+
attr_accessor :type
|
|
61
|
+
|
|
62
|
+
# ISO 8601 duration. Quiet window that releases the batch when it elapses with no
|
|
63
|
+
# new contributing events. Must be less than `max_wait_period`.
|
|
64
|
+
sig { returns(String) }
|
|
65
|
+
attr_accessor :wait_period
|
|
66
|
+
|
|
67
|
+
sig { returns(T.nilable(String)) }
|
|
68
|
+
attr_reader :id
|
|
69
|
+
|
|
70
|
+
sig { params(id: String).void }
|
|
71
|
+
attr_writer :id
|
|
72
|
+
|
|
73
|
+
# Optional partition key. Events with the same `category_key` are batched
|
|
74
|
+
# together; events with different values are batched separately.
|
|
75
|
+
sig { returns(T.nilable(String)) }
|
|
76
|
+
attr_reader :category_key
|
|
77
|
+
|
|
78
|
+
sig { params(category_key: String).void }
|
|
79
|
+
attr_writer :category_key
|
|
80
|
+
|
|
81
|
+
# Condition spec for a journey node. Accepts a single condition atom, an AND/OR
|
|
82
|
+
# group, or an AND/OR nested group. Omit the `conditions` property entirely to
|
|
83
|
+
# express "no conditions".
|
|
84
|
+
sig do
|
|
85
|
+
returns(
|
|
86
|
+
T.nilable(
|
|
87
|
+
T.any(
|
|
88
|
+
T::Array[String],
|
|
89
|
+
Courier::JourneyConditionGroup,
|
|
90
|
+
Courier::JourneyConditionNestedGroup
|
|
91
|
+
)
|
|
92
|
+
)
|
|
93
|
+
)
|
|
94
|
+
end
|
|
95
|
+
attr_reader :conditions
|
|
96
|
+
|
|
97
|
+
sig do
|
|
98
|
+
params(
|
|
99
|
+
conditions:
|
|
100
|
+
T.any(
|
|
101
|
+
T::Array[String],
|
|
102
|
+
Courier::JourneyConditionGroup::OrHash,
|
|
103
|
+
Courier::JourneyConditionNestedGroup::OrHash
|
|
104
|
+
)
|
|
105
|
+
).void
|
|
106
|
+
end
|
|
107
|
+
attr_writer :conditions
|
|
108
|
+
|
|
109
|
+
# Releases the batch once this many events have been collected.
|
|
110
|
+
sig { returns(T.nilable(Integer)) }
|
|
111
|
+
attr_reader :max_items
|
|
112
|
+
|
|
113
|
+
sig { params(max_items: Integer).void }
|
|
114
|
+
attr_writer :max_items
|
|
115
|
+
|
|
116
|
+
# Collect events arriving at the node into a single batch and fire one downstream
|
|
117
|
+
# step with the aggregated payload. The first event into a batch owns the run;
|
|
118
|
+
# later contributing events terminate at the batch step. The batch releases when
|
|
119
|
+
# any of `max_items` is reached, a quiet window of `wait_period` elapses, or the
|
|
120
|
+
# `max_wait_period` ceiling hits.
|
|
121
|
+
sig do
|
|
122
|
+
params(
|
|
123
|
+
max_wait_period: String,
|
|
124
|
+
retain: Courier::JourneyNode::JourneyBatchNode::Retain::OrHash,
|
|
125
|
+
scope: Courier::JourneyNode::JourneyBatchNode::Scope::OrSymbol,
|
|
126
|
+
type: Courier::JourneyNode::JourneyBatchNode::Type::OrSymbol,
|
|
127
|
+
wait_period: String,
|
|
128
|
+
id: String,
|
|
129
|
+
category_key: String,
|
|
130
|
+
conditions:
|
|
131
|
+
T.any(
|
|
132
|
+
T::Array[String],
|
|
133
|
+
Courier::JourneyConditionGroup::OrHash,
|
|
134
|
+
Courier::JourneyConditionNestedGroup::OrHash
|
|
135
|
+
),
|
|
136
|
+
max_items: Integer
|
|
137
|
+
).returns(T.attached_class)
|
|
138
|
+
end
|
|
139
|
+
def self.new(
|
|
140
|
+
# ISO 8601 duration. Hard ceiling from the first event into the batch; releases
|
|
141
|
+
# the batch unconditionally when it elapses.
|
|
142
|
+
max_wait_period:,
|
|
143
|
+
# How to select which collected events to retain in the aggregated payload when
|
|
144
|
+
# the batch releases.
|
|
145
|
+
retain:,
|
|
146
|
+
scope:,
|
|
147
|
+
type:,
|
|
148
|
+
# ISO 8601 duration. Quiet window that releases the batch when it elapses with no
|
|
149
|
+
# new contributing events. Must be less than `max_wait_period`.
|
|
150
|
+
wait_period:,
|
|
151
|
+
id: nil,
|
|
152
|
+
# Optional partition key. Events with the same `category_key` are batched
|
|
153
|
+
# together; events with different values are batched separately.
|
|
154
|
+
category_key: nil,
|
|
155
|
+
# Condition spec for a journey node. Accepts a single condition atom, an AND/OR
|
|
156
|
+
# group, or an AND/OR nested group. Omit the `conditions` property entirely to
|
|
157
|
+
# express "no conditions".
|
|
158
|
+
conditions: nil,
|
|
159
|
+
# Releases the batch once this many events have been collected.
|
|
160
|
+
max_items: nil
|
|
161
|
+
)
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
sig do
|
|
165
|
+
override.returns(
|
|
166
|
+
{
|
|
167
|
+
max_wait_period: String,
|
|
168
|
+
retain: Courier::JourneyNode::JourneyBatchNode::Retain,
|
|
169
|
+
scope: Courier::JourneyNode::JourneyBatchNode::Scope::OrSymbol,
|
|
170
|
+
type: Courier::JourneyNode::JourneyBatchNode::Type::OrSymbol,
|
|
171
|
+
wait_period: String,
|
|
172
|
+
id: String,
|
|
173
|
+
category_key: String,
|
|
174
|
+
conditions:
|
|
175
|
+
T.any(
|
|
176
|
+
T::Array[String],
|
|
177
|
+
Courier::JourneyConditionGroup,
|
|
178
|
+
Courier::JourneyConditionNestedGroup
|
|
179
|
+
),
|
|
180
|
+
max_items: Integer
|
|
181
|
+
}
|
|
182
|
+
)
|
|
183
|
+
end
|
|
184
|
+
def to_hash
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
class Retain < Courier::Internal::Type::BaseModel
|
|
188
|
+
OrHash =
|
|
189
|
+
T.type_alias do
|
|
190
|
+
T.any(
|
|
191
|
+
Courier::JourneyNode::JourneyBatchNode::Retain,
|
|
192
|
+
Courier::Internal::AnyHash
|
|
193
|
+
)
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
sig { returns(Integer) }
|
|
197
|
+
attr_accessor :count
|
|
198
|
+
|
|
199
|
+
sig do
|
|
200
|
+
returns(
|
|
201
|
+
Courier::JourneyNode::JourneyBatchNode::Retain::Type::OrSymbol
|
|
202
|
+
)
|
|
203
|
+
end
|
|
204
|
+
attr_accessor :type
|
|
205
|
+
|
|
206
|
+
# Dot-path into the event payload (e.g. `data.priority`). Required when `type` is
|
|
207
|
+
# `highest` or `lowest`.
|
|
208
|
+
sig { returns(T.nilable(String)) }
|
|
209
|
+
attr_reader :sort_key
|
|
210
|
+
|
|
211
|
+
sig { params(sort_key: String).void }
|
|
212
|
+
attr_writer :sort_key
|
|
213
|
+
|
|
214
|
+
# How to select which collected events to retain in the aggregated payload when
|
|
215
|
+
# the batch releases.
|
|
216
|
+
sig do
|
|
217
|
+
params(
|
|
218
|
+
count: Integer,
|
|
219
|
+
type:
|
|
220
|
+
Courier::JourneyNode::JourneyBatchNode::Retain::Type::OrSymbol,
|
|
221
|
+
sort_key: String
|
|
222
|
+
).returns(T.attached_class)
|
|
223
|
+
end
|
|
224
|
+
def self.new(
|
|
225
|
+
count:,
|
|
226
|
+
type:,
|
|
227
|
+
# Dot-path into the event payload (e.g. `data.priority`). Required when `type` is
|
|
228
|
+
# `highest` or `lowest`.
|
|
229
|
+
sort_key: nil
|
|
230
|
+
)
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
sig do
|
|
234
|
+
override.returns(
|
|
235
|
+
{
|
|
236
|
+
count: Integer,
|
|
237
|
+
type:
|
|
238
|
+
Courier::JourneyNode::JourneyBatchNode::Retain::Type::OrSymbol,
|
|
239
|
+
sort_key: String
|
|
240
|
+
}
|
|
241
|
+
)
|
|
242
|
+
end
|
|
243
|
+
def to_hash
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
module Type
|
|
247
|
+
extend Courier::Internal::Type::Enum
|
|
248
|
+
|
|
249
|
+
TaggedSymbol =
|
|
250
|
+
T.type_alias do
|
|
251
|
+
T.all(
|
|
252
|
+
Symbol,
|
|
253
|
+
Courier::JourneyNode::JourneyBatchNode::Retain::Type
|
|
254
|
+
)
|
|
255
|
+
end
|
|
256
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
257
|
+
|
|
258
|
+
FIRST =
|
|
259
|
+
T.let(
|
|
260
|
+
:first,
|
|
261
|
+
Courier::JourneyNode::JourneyBatchNode::Retain::Type::TaggedSymbol
|
|
262
|
+
)
|
|
263
|
+
LAST =
|
|
264
|
+
T.let(
|
|
265
|
+
:last,
|
|
266
|
+
Courier::JourneyNode::JourneyBatchNode::Retain::Type::TaggedSymbol
|
|
267
|
+
)
|
|
268
|
+
HIGHEST =
|
|
269
|
+
T.let(
|
|
270
|
+
:highest,
|
|
271
|
+
Courier::JourneyNode::JourneyBatchNode::Retain::Type::TaggedSymbol
|
|
272
|
+
)
|
|
273
|
+
LOWEST =
|
|
274
|
+
T.let(
|
|
275
|
+
:lowest,
|
|
276
|
+
Courier::JourneyNode::JourneyBatchNode::Retain::Type::TaggedSymbol
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
sig do
|
|
280
|
+
override.returns(
|
|
281
|
+
T::Array[
|
|
282
|
+
Courier::JourneyNode::JourneyBatchNode::Retain::Type::TaggedSymbol
|
|
283
|
+
]
|
|
284
|
+
)
|
|
285
|
+
end
|
|
286
|
+
def self.values
|
|
287
|
+
end
|
|
288
|
+
end
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
module Scope
|
|
292
|
+
extend Courier::Internal::Type::Enum
|
|
293
|
+
|
|
294
|
+
TaggedSymbol =
|
|
295
|
+
T.type_alias do
|
|
296
|
+
T.all(Symbol, Courier::JourneyNode::JourneyBatchNode::Scope)
|
|
297
|
+
end
|
|
298
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
299
|
+
|
|
300
|
+
USER =
|
|
301
|
+
T.let(
|
|
302
|
+
:user,
|
|
303
|
+
Courier::JourneyNode::JourneyBatchNode::Scope::TaggedSymbol
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
sig do
|
|
307
|
+
override.returns(
|
|
308
|
+
T::Array[
|
|
309
|
+
Courier::JourneyNode::JourneyBatchNode::Scope::TaggedSymbol
|
|
310
|
+
]
|
|
311
|
+
)
|
|
312
|
+
end
|
|
313
|
+
def self.values
|
|
314
|
+
end
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
module Type
|
|
318
|
+
extend Courier::Internal::Type::Enum
|
|
319
|
+
|
|
320
|
+
TaggedSymbol =
|
|
321
|
+
T.type_alias do
|
|
322
|
+
T.all(Symbol, Courier::JourneyNode::JourneyBatchNode::Type)
|
|
323
|
+
end
|
|
324
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
325
|
+
|
|
326
|
+
BATCH =
|
|
327
|
+
T.let(
|
|
328
|
+
:batch,
|
|
329
|
+
Courier::JourneyNode::JourneyBatchNode::Type::TaggedSymbol
|
|
330
|
+
)
|
|
331
|
+
|
|
332
|
+
sig do
|
|
333
|
+
override.returns(
|
|
334
|
+
T::Array[
|
|
335
|
+
Courier::JourneyNode::JourneyBatchNode::Type::TaggedSymbol
|
|
336
|
+
]
|
|
337
|
+
)
|
|
338
|
+
end
|
|
339
|
+
def self.values
|
|
340
|
+
end
|
|
341
|
+
end
|
|
342
|
+
end
|
|
343
|
+
|
|
29
344
|
class JourneyBranchNode < Courier::Internal::Type::BaseModel
|
|
30
345
|
OrHash =
|
|
31
346
|
T.type_alias do
|
|
@@ -60,6 +60,7 @@ module Courier
|
|
|
60
60
|
Courier::JourneyAINode::OrHash,
|
|
61
61
|
Courier::JourneyThrottleStaticNode::OrHash,
|
|
62
62
|
Courier::JourneyThrottleDynamicNode::OrHash,
|
|
63
|
+
Courier::JourneyNode::JourneyBatchNode::OrHash,
|
|
63
64
|
Courier::JourneyExitNode::OrHash,
|
|
64
65
|
Courier::JourneyNode::JourneyBranchNode::OrHash
|
|
65
66
|
)
|
data/rbi/courier/models.rbi
CHANGED
|
@@ -103,6 +103,14 @@ module Courier
|
|
|
103
103
|
|
|
104
104
|
DeviceType = Courier::Models::DeviceType
|
|
105
105
|
|
|
106
|
+
DigestCategory = Courier::Models::DigestCategory
|
|
107
|
+
|
|
108
|
+
DigestInstance = Courier::Models::DigestInstance
|
|
109
|
+
|
|
110
|
+
DigestInstanceListResponse = Courier::Models::DigestInstanceListResponse
|
|
111
|
+
|
|
112
|
+
Digests = Courier::Models::Digests
|
|
113
|
+
|
|
106
114
|
Discord = Courier::Models::Discord
|
|
107
115
|
|
|
108
116
|
ElementalActionNodeWithType = Courier::Models::ElementalActionNodeWithType
|
|
@@ -3,23 +3,18 @@
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Resources
|
|
5
5
|
class Brands
|
|
6
|
-
# Create a new brand
|
|
6
|
+
# Create a new brand. Requires `name` and `settings` (with at least
|
|
7
|
+
# `colors.primary` and `colors.secondary`).
|
|
7
8
|
sig do
|
|
8
9
|
params(
|
|
9
10
|
name: String,
|
|
11
|
+
settings: Courier::BrandSettings::OrHash,
|
|
10
12
|
id: T.nilable(String),
|
|
11
|
-
settings: T.nilable(Courier::BrandSettings::OrHash),
|
|
12
13
|
snippets: T.nilable(Courier::BrandSnippets::OrHash),
|
|
13
14
|
request_options: Courier::RequestOptions::OrHash
|
|
14
15
|
).returns(Courier::Brand)
|
|
15
16
|
end
|
|
16
|
-
def create(
|
|
17
|
-
name:,
|
|
18
|
-
id: nil,
|
|
19
|
-
settings: nil,
|
|
20
|
-
snippets: nil,
|
|
21
|
-
request_options: {}
|
|
22
|
-
)
|
|
17
|
+
def create(name:, settings:, id: nil, snippets: nil, request_options: {})
|
|
23
18
|
end
|
|
24
19
|
|
|
25
20
|
# Fetch a specific brand by brand ID.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Resources
|
|
5
|
+
class Digests
|
|
6
|
+
class Schedules
|
|
7
|
+
# List the digest instances for a schedule. Each instance represents the events
|
|
8
|
+
# accumulated for a single user against the schedule, and can be used to monitor
|
|
9
|
+
# digest accumulation before the digest is released.
|
|
10
|
+
sig do
|
|
11
|
+
params(
|
|
12
|
+
schedule_id: String,
|
|
13
|
+
cursor: String,
|
|
14
|
+
limit: Integer,
|
|
15
|
+
request_options: Courier::RequestOptions::OrHash
|
|
16
|
+
).returns(Courier::DigestInstanceListResponse)
|
|
17
|
+
end
|
|
18
|
+
def list_instances(
|
|
19
|
+
# The ID of the digest schedule, in the form `sch/{uuid}`. The value must be
|
|
20
|
+
# URL-encoded (e.g. `sch%2F00000000-0000-0000-0000-000000000000`).
|
|
21
|
+
schedule_id,
|
|
22
|
+
# A cursor token from a previous response, used to fetch the next page of results.
|
|
23
|
+
cursor: nil,
|
|
24
|
+
# The maximum number of digest instances to return. Defaults to 20, with a maximum
|
|
25
|
+
# of 100.
|
|
26
|
+
limit: nil,
|
|
27
|
+
request_options: {}
|
|
28
|
+
)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Send a digest now instead of waiting for its scheduled time, so your users get
|
|
32
|
+
# what they have collected so far right away.
|
|
33
|
+
sig do
|
|
34
|
+
params(
|
|
35
|
+
schedule_id: String,
|
|
36
|
+
request_options: Courier::RequestOptions::OrHash
|
|
37
|
+
).void
|
|
38
|
+
end
|
|
39
|
+
def release(
|
|
40
|
+
# The ID of the digest schedule to release, in the form `sch/{uuid}`. The value
|
|
41
|
+
# must be URL-encoded (e.g. `sch%2F00000000-0000-0000-0000-000000000000`).
|
|
42
|
+
schedule_id,
|
|
43
|
+
request_options: {}
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# @api private
|
|
48
|
+
sig { params(client: Courier::Client).returns(T.attached_class) }
|
|
49
|
+
def self.new(client:)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Resources
|
|
5
|
+
class Digests
|
|
6
|
+
sig { returns(Courier::Resources::Digests::Schedules) }
|
|
7
|
+
attr_reader :schedules
|
|
8
|
+
|
|
9
|
+
# @api private
|
|
10
|
+
sig { params(client: Courier::Client).returns(T.attached_class) }
|
|
11
|
+
def self.new(client:)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -28,6 +28,7 @@ module Courier
|
|
|
28
28
|
Courier::JourneyAINode::OrHash,
|
|
29
29
|
Courier::JourneyThrottleStaticNode::OrHash,
|
|
30
30
|
Courier::JourneyThrottleDynamicNode::OrHash,
|
|
31
|
+
Courier::JourneyNode::JourneyBatchNode::OrHash,
|
|
31
32
|
Courier::JourneyExitNode::OrHash,
|
|
32
33
|
Courier::JourneyNode::JourneyBranchNode::OrHash
|
|
33
34
|
)
|
|
@@ -187,6 +188,7 @@ module Courier
|
|
|
187
188
|
Courier::JourneyAINode::OrHash,
|
|
188
189
|
Courier::JourneyThrottleStaticNode::OrHash,
|
|
189
190
|
Courier::JourneyThrottleDynamicNode::OrHash,
|
|
191
|
+
Courier::JourneyNode::JourneyBatchNode::OrHash,
|
|
190
192
|
Courier::JourneyExitNode::OrHash,
|
|
191
193
|
Courier::JourneyNode::JourneyBranchNode::OrHash
|
|
192
194
|
)
|
data/sig/courier/client.rbs
CHANGED
|
@@ -3,8 +3,8 @@ module Courier
|
|
|
3
3
|
type brand_create_params =
|
|
4
4
|
{
|
|
5
5
|
name: String,
|
|
6
|
+
settings: Courier::BrandSettings,
|
|
6
7
|
id: String?,
|
|
7
|
-
settings: Courier::BrandSettings?,
|
|
8
8
|
snippets: Courier::BrandSnippets?
|
|
9
9
|
}
|
|
10
10
|
& Courier::Internal::Type::request_parameters
|
|
@@ -15,24 +15,24 @@ module Courier
|
|
|
15
15
|
|
|
16
16
|
attr_accessor name: String
|
|
17
17
|
|
|
18
|
-
attr_accessor
|
|
18
|
+
attr_accessor settings: Courier::BrandSettings
|
|
19
19
|
|
|
20
|
-
attr_accessor
|
|
20
|
+
attr_accessor id: String?
|
|
21
21
|
|
|
22
22
|
attr_accessor snippets: Courier::BrandSnippets?
|
|
23
23
|
|
|
24
24
|
def initialize: (
|
|
25
25
|
name: String,
|
|
26
|
+
settings: Courier::BrandSettings,
|
|
26
27
|
?id: String?,
|
|
27
|
-
?settings: Courier::BrandSettings?,
|
|
28
28
|
?snippets: Courier::BrandSnippets?,
|
|
29
29
|
?request_options: Courier::request_opts
|
|
30
30
|
) -> void
|
|
31
31
|
|
|
32
32
|
def to_hash: -> {
|
|
33
33
|
name: String,
|
|
34
|
+
settings: Courier::BrandSettings,
|
|
34
35
|
id: String?,
|
|
35
|
-
settings: Courier::BrandSettings?,
|
|
36
36
|
snippets: Courier::BrandSnippets?,
|
|
37
37
|
request_options: Courier::RequestOptions
|
|
38
38
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type digest_category =
|
|
4
|
+
{
|
|
5
|
+
category_key: String,
|
|
6
|
+
retain: Courier::Models::DigestCategory::retain,
|
|
7
|
+
sort_key: String
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
class DigestCategory < Courier::Internal::Type::BaseModel
|
|
11
|
+
attr_accessor category_key: String
|
|
12
|
+
|
|
13
|
+
attr_accessor retain: Courier::Models::DigestCategory::retain
|
|
14
|
+
|
|
15
|
+
attr_reader sort_key: String?
|
|
16
|
+
|
|
17
|
+
def sort_key=: (String) -> String
|
|
18
|
+
|
|
19
|
+
def initialize: (
|
|
20
|
+
category_key: String,
|
|
21
|
+
retain: Courier::Models::DigestCategory::retain,
|
|
22
|
+
?sort_key: String
|
|
23
|
+
) -> void
|
|
24
|
+
|
|
25
|
+
def to_hash: -> {
|
|
26
|
+
category_key: String,
|
|
27
|
+
retain: Courier::Models::DigestCategory::retain,
|
|
28
|
+
sort_key: String
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
type retain = :first | :last | :highest | :lowest | :none
|
|
32
|
+
|
|
33
|
+
module Retain
|
|
34
|
+
extend Courier::Internal::Type::Enum
|
|
35
|
+
|
|
36
|
+
FIRST: :first
|
|
37
|
+
LAST: :last
|
|
38
|
+
HIGHEST: :highest
|
|
39
|
+
LOWEST: :lowest
|
|
40
|
+
NONE: :none
|
|
41
|
+
|
|
42
|
+
def self?.values: -> ::Array[Courier::Models::DigestCategory::retain]
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type digest_instance =
|
|
4
|
+
{
|
|
5
|
+
digest_instance_id: String,
|
|
6
|
+
event_count: Integer,
|
|
7
|
+
status: Courier::Models::DigestInstance::status,
|
|
8
|
+
user_id: String,
|
|
9
|
+
categories: ::Array[Courier::DigestCategory],
|
|
10
|
+
category_key_counts: ::Hash[Symbol, Integer],
|
|
11
|
+
created_at: String,
|
|
12
|
+
disabled: bool,
|
|
13
|
+
tenant_id: String?
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
class DigestInstance < Courier::Internal::Type::BaseModel
|
|
17
|
+
attr_accessor digest_instance_id: String
|
|
18
|
+
|
|
19
|
+
attr_accessor event_count: Integer
|
|
20
|
+
|
|
21
|
+
attr_accessor status: Courier::Models::DigestInstance::status
|
|
22
|
+
|
|
23
|
+
attr_accessor user_id: String
|
|
24
|
+
|
|
25
|
+
attr_reader categories: ::Array[Courier::DigestCategory]?
|
|
26
|
+
|
|
27
|
+
def categories=: (
|
|
28
|
+
::Array[Courier::DigestCategory]
|
|
29
|
+
) -> ::Array[Courier::DigestCategory]
|
|
30
|
+
|
|
31
|
+
attr_reader category_key_counts: ::Hash[Symbol, Integer]?
|
|
32
|
+
|
|
33
|
+
def category_key_counts=: (
|
|
34
|
+
::Hash[Symbol, Integer]
|
|
35
|
+
) -> ::Hash[Symbol, Integer]
|
|
36
|
+
|
|
37
|
+
attr_reader created_at: String?
|
|
38
|
+
|
|
39
|
+
def created_at=: (String) -> String
|
|
40
|
+
|
|
41
|
+
attr_reader disabled: bool?
|
|
42
|
+
|
|
43
|
+
def disabled=: (bool) -> bool
|
|
44
|
+
|
|
45
|
+
attr_accessor tenant_id: String?
|
|
46
|
+
|
|
47
|
+
def initialize: (
|
|
48
|
+
digest_instance_id: String,
|
|
49
|
+
event_count: Integer,
|
|
50
|
+
status: Courier::Models::DigestInstance::status,
|
|
51
|
+
user_id: String,
|
|
52
|
+
?categories: ::Array[Courier::DigestCategory],
|
|
53
|
+
?category_key_counts: ::Hash[Symbol, Integer],
|
|
54
|
+
?created_at: String,
|
|
55
|
+
?disabled: bool,
|
|
56
|
+
?tenant_id: String?
|
|
57
|
+
) -> void
|
|
58
|
+
|
|
59
|
+
def to_hash: -> {
|
|
60
|
+
digest_instance_id: String,
|
|
61
|
+
event_count: Integer,
|
|
62
|
+
status: Courier::Models::DigestInstance::status,
|
|
63
|
+
user_id: String,
|
|
64
|
+
categories: ::Array[Courier::DigestCategory],
|
|
65
|
+
category_key_counts: ::Hash[Symbol, Integer],
|
|
66
|
+
created_at: String,
|
|
67
|
+
disabled: bool,
|
|
68
|
+
tenant_id: String?
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
type status = :IN_PROGRESS | :COMPLETED
|
|
72
|
+
|
|
73
|
+
module Status
|
|
74
|
+
extend Courier::Internal::Type::Enum
|
|
75
|
+
|
|
76
|
+
IN_PROGRESS: :IN_PROGRESS
|
|
77
|
+
COMPLETED: :COMPLETED
|
|
78
|
+
|
|
79
|
+
def self?.values: -> ::Array[Courier::Models::DigestInstance::status]
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type digest_instance_list_response =
|
|
4
|
+
{
|
|
5
|
+
has_more: bool,
|
|
6
|
+
items: ::Array[Courier::DigestInstance],
|
|
7
|
+
type: Courier::Models::DigestInstanceListResponse::type_,
|
|
8
|
+
cursor: String?,
|
|
9
|
+
next_url: String?,
|
|
10
|
+
url: String
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class DigestInstanceListResponse < Courier::Internal::Type::BaseModel
|
|
14
|
+
attr_accessor has_more: bool
|
|
15
|
+
|
|
16
|
+
attr_accessor items: ::Array[Courier::DigestInstance]
|
|
17
|
+
|
|
18
|
+
attr_accessor type: Courier::Models::DigestInstanceListResponse::type_
|
|
19
|
+
|
|
20
|
+
attr_accessor cursor: String?
|
|
21
|
+
|
|
22
|
+
attr_accessor next_url: String?
|
|
23
|
+
|
|
24
|
+
attr_reader url: String?
|
|
25
|
+
|
|
26
|
+
def url=: (String) -> String
|
|
27
|
+
|
|
28
|
+
def initialize: (
|
|
29
|
+
has_more: bool,
|
|
30
|
+
items: ::Array[Courier::DigestInstance],
|
|
31
|
+
type: Courier::Models::DigestInstanceListResponse::type_,
|
|
32
|
+
?cursor: String?,
|
|
33
|
+
?next_url: String?,
|
|
34
|
+
?url: String
|
|
35
|
+
) -> void
|
|
36
|
+
|
|
37
|
+
def to_hash: -> {
|
|
38
|
+
has_more: bool,
|
|
39
|
+
items: ::Array[Courier::DigestInstance],
|
|
40
|
+
type: Courier::Models::DigestInstanceListResponse::type_,
|
|
41
|
+
cursor: String?,
|
|
42
|
+
next_url: String?,
|
|
43
|
+
url: String
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
type type_ = :list
|
|
47
|
+
|
|
48
|
+
module Type
|
|
49
|
+
extend Courier::Internal::Type::Enum
|
|
50
|
+
|
|
51
|
+
LIST: :list
|
|
52
|
+
|
|
53
|
+
def self?.values: -> ::Array[Courier::Models::DigestInstanceListResponse::type_]
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|