trycourier 6.5.0 → 6.7.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 +25 -0
- data/README.md +1 -1
- data/lib/courier/models/create_journey_request.rb +16 -1
- data/lib/courier/models/digest_day_of_week.rb +21 -0
- data/lib/courier/models/digest_frequency.rb +21 -0
- data/lib/courier/models/journey_conditions_field.rb +11 -1
- data/lib/courier/models/journey_node.rb +17 -2
- data/lib/courier/models/journey_response.rb +14 -1
- data/lib/courier/models/topic_digest_category.rb +71 -0
- data/lib/courier/models/topic_digest_release_request.rb +35 -0
- data/lib/courier/models/topic_digest_request.rb +75 -0
- data/lib/courier/models/topic_digest_response.rb +66 -0
- data/lib/courier/models/topic_digest_schedule_request.rb +99 -0
- data/lib/courier/models/topic_digest_schedule_response.rb +111 -0
- data/lib/courier/models/users/preference_update_or_create_topic_params.rb +13 -1
- data/lib/courier/models/users/topic_preference.rb +17 -1
- data/lib/courier/models/workspace_preference_topic_create_request.rb +97 -1
- data/lib/courier/models/workspace_preference_topic_get_response.rb +9 -1
- data/lib/courier/models/workspace_preference_topic_replace_request.rb +15 -1
- data/lib/courier/models/workspace_preferences/topic_delete_digest_params.rb +28 -0
- data/lib/courier/models/workspace_preferences/topic_release_digest_params.rb +28 -0
- data/lib/courier/models.rb +16 -0
- data/lib/courier/resources/digests/schedules.rb +1 -1
- data/lib/courier/resources/journeys.rb +9 -2
- data/lib/courier/resources/workspace_preferences/topics.rb +77 -4
- data/lib/courier/resources/workspace_preferences.rb +0 -2
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +10 -0
- data/rbi/courier/models/create_journey_request.rbi +19 -0
- data/rbi/courier/models/digest_day_of_week.rbi +25 -0
- data/rbi/courier/models/digest_frequency.rbi +25 -0
- data/rbi/courier/models/journey_node.rbi +12 -1
- data/rbi/courier/models/journey_response.rbi +12 -0
- data/rbi/courier/models/topic_digest_category.rbi +116 -0
- data/rbi/courier/models/topic_digest_release_request.rbi +51 -0
- data/rbi/courier/models/topic_digest_request.rbi +126 -0
- data/rbi/courier/models/topic_digest_response.rbi +98 -0
- data/rbi/courier/models/topic_digest_schedule_request.rbi +147 -0
- data/rbi/courier/models/topic_digest_schedule_response.rbi +175 -0
- data/rbi/courier/models/users/preference_update_or_create_topic_params.rbi +16 -0
- data/rbi/courier/models/users/topic_preference.rbi +27 -0
- data/rbi/courier/models/workspace_preference_topic_create_request.rbi +172 -0
- data/rbi/courier/models/workspace_preference_topic_get_response.rbi +13 -0
- data/rbi/courier/models/workspace_preference_topic_replace_request.rbi +25 -0
- data/rbi/courier/models/workspace_preferences/topic_delete_digest_params.rbi +48 -0
- data/rbi/courier/models/workspace_preferences/topic_release_digest_params.rbi +48 -0
- data/rbi/courier/models.rbi +16 -0
- data/rbi/courier/resources/digests/schedules.rbi +5 -2
- data/rbi/courier/resources/journeys.rbi +14 -0
- data/rbi/courier/resources/workspace_preferences/topics.rbi +80 -2
- data/rbi/courier/resources/workspace_preferences.rbi +0 -2
- data/sig/courier/models/create_journey_request.rbs +7 -0
- data/sig/courier/models/digest_day_of_week.rbs +26 -0
- data/sig/courier/models/digest_frequency.rbs +19 -0
- data/sig/courier/models/journey_response.rbs +5 -0
- data/sig/courier/models/topic_digest_category.rbs +57 -0
- data/sig/courier/models/topic_digest_release_request.rbs +17 -0
- data/sig/courier/models/topic_digest_request.rbs +52 -0
- data/sig/courier/models/topic_digest_response.rbs +58 -0
- data/sig/courier/models/topic_digest_schedule_request.rbs +80 -0
- data/sig/courier/models/topic_digest_schedule_response.rbs +96 -0
- data/sig/courier/models/users/preference_update_or_create_topic_params.rbs +5 -0
- data/sig/courier/models/users/topic_preference.rbs +7 -0
- data/sig/courier/models/workspace_preference_topic_create_request.rbs +50 -0
- data/sig/courier/models/workspace_preference_topic_get_response.rbs +5 -0
- data/sig/courier/models/workspace_preference_topic_replace_request.rbs +5 -0
- data/sig/courier/models/workspace_preferences/topic_delete_digest_params.rbs +30 -0
- data/sig/courier/models/workspace_preferences/topic_release_digest_params.rbs +34 -0
- data/sig/courier/models.rbs +16 -0
- data/sig/courier/resources/journeys.rbs +2 -0
- data/sig/courier/resources/workspace_preferences/topics.rbs +16 -0
- metadata +32 -2
|
@@ -40,6 +40,21 @@ module Courier
|
|
|
40
40
|
sig { returns(T.nilable(String)) }
|
|
41
41
|
attr_accessor :description
|
|
42
42
|
|
|
43
|
+
# A topic's digest configuration: the template that renders it, the cadences it
|
|
44
|
+
# delivers on, and how collected events are retained.
|
|
45
|
+
#
|
|
46
|
+
# Send `null` for the whole object to turn a digest off, which unlinks the
|
|
47
|
+
# template and removes its schedules. There is no `enabled` flag, and
|
|
48
|
+
# `schedules: []` is rejected, because both states are un-deliverable rather than
|
|
49
|
+
# merely off.
|
|
50
|
+
sig { returns(T.nilable(Courier::TopicDigestRequest)) }
|
|
51
|
+
attr_reader :digest
|
|
52
|
+
|
|
53
|
+
sig do
|
|
54
|
+
params(digest: T.nilable(Courier::TopicDigestRequest::OrHash)).void
|
|
55
|
+
end
|
|
56
|
+
attr_writer :digest
|
|
57
|
+
|
|
43
58
|
# Whether to include a list-unsubscribe header on emails for this topic.
|
|
44
59
|
sig { returns(T.nilable(T::Boolean)) }
|
|
45
60
|
attr_accessor :include_unsubscribe_header
|
|
@@ -68,6 +83,7 @@ module Courier
|
|
|
68
83
|
]
|
|
69
84
|
),
|
|
70
85
|
description: T.nilable(String),
|
|
86
|
+
digest: T.nilable(Courier::TopicDigestRequest::OrHash),
|
|
71
87
|
include_unsubscribe_header: T.nilable(T::Boolean),
|
|
72
88
|
routing_options:
|
|
73
89
|
T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
|
|
@@ -84,6 +100,14 @@ module Courier
|
|
|
84
100
|
# Optional description shown under the topic on the hosted preferences page. Omit
|
|
85
101
|
# to clear.
|
|
86
102
|
description: nil,
|
|
103
|
+
# A topic's digest configuration: the template that renders it, the cadences it
|
|
104
|
+
# delivers on, and how collected events are retained.
|
|
105
|
+
#
|
|
106
|
+
# Send `null` for the whole object to turn a digest off, which unlinks the
|
|
107
|
+
# template and removes its schedules. There is no `enabled` flag, and
|
|
108
|
+
# `schedules: []` is rejected, because both states are un-deliverable rather than
|
|
109
|
+
# merely off.
|
|
110
|
+
digest: nil,
|
|
87
111
|
# Whether to include a list-unsubscribe header on emails for this topic.
|
|
88
112
|
include_unsubscribe_header: nil,
|
|
89
113
|
# Default channels delivered for this topic. Omit to clear.
|
|
@@ -106,6 +130,7 @@ module Courier
|
|
|
106
130
|
]
|
|
107
131
|
),
|
|
108
132
|
description: T.nilable(String),
|
|
133
|
+
digest: T.nilable(Courier::TopicDigestRequest),
|
|
109
134
|
include_unsubscribe_header: T.nilable(T::Boolean),
|
|
110
135
|
routing_options:
|
|
111
136
|
T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module WorkspacePreferences
|
|
6
|
+
class TopicDeleteDigestParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Courier::WorkspacePreferences::TopicDeleteDigestParams,
|
|
14
|
+
Courier::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :section_id
|
|
20
|
+
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :topic_id
|
|
23
|
+
|
|
24
|
+
sig do
|
|
25
|
+
params(
|
|
26
|
+
section_id: String,
|
|
27
|
+
topic_id: String,
|
|
28
|
+
request_options: Courier::RequestOptions::OrHash
|
|
29
|
+
).returns(T.attached_class)
|
|
30
|
+
end
|
|
31
|
+
def self.new(section_id:, topic_id:, request_options: {})
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
override.returns(
|
|
36
|
+
{
|
|
37
|
+
section_id: String,
|
|
38
|
+
topic_id: String,
|
|
39
|
+
request_options: Courier::RequestOptions
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
def to_hash
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module WorkspacePreferences
|
|
6
|
+
class TopicReleaseDigestParams < Courier::Models::TopicDigestReleaseRequest
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Courier::WorkspacePreferences::TopicReleaseDigestParams,
|
|
14
|
+
Courier::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :section_id
|
|
20
|
+
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :topic_id
|
|
23
|
+
|
|
24
|
+
sig do
|
|
25
|
+
params(
|
|
26
|
+
section_id: String,
|
|
27
|
+
topic_id: String,
|
|
28
|
+
request_options: Courier::RequestOptions::OrHash
|
|
29
|
+
).returns(T.attached_class)
|
|
30
|
+
end
|
|
31
|
+
def self.new(section_id:, topic_id:, request_options: {})
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
override.returns(
|
|
36
|
+
{
|
|
37
|
+
section_id: String,
|
|
38
|
+
topic_id: String,
|
|
39
|
+
request_options: Courier::RequestOptions
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
def to_hash
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
data/rbi/courier/models.rbi
CHANGED
|
@@ -152,6 +152,10 @@ module Courier
|
|
|
152
152
|
|
|
153
153
|
DigestCategory = Courier::Models::DigestCategory
|
|
154
154
|
|
|
155
|
+
DigestDayOfWeek = Courier::Models::DigestDayOfWeek
|
|
156
|
+
|
|
157
|
+
DigestFrequency = Courier::Models::DigestFrequency
|
|
158
|
+
|
|
155
159
|
DigestInstance = Courier::Models::DigestInstance
|
|
156
160
|
|
|
157
161
|
DigestInstanceListResponse = Courier::Models::DigestInstanceListResponse
|
|
@@ -622,6 +626,18 @@ module Courier
|
|
|
622
626
|
|
|
623
627
|
Token = Courier::Models::Token
|
|
624
628
|
|
|
629
|
+
TopicDigestCategory = Courier::Models::TopicDigestCategory
|
|
630
|
+
|
|
631
|
+
TopicDigestReleaseRequest = Courier::Models::TopicDigestReleaseRequest
|
|
632
|
+
|
|
633
|
+
TopicDigestRequest = Courier::Models::TopicDigestRequest
|
|
634
|
+
|
|
635
|
+
TopicDigestResponse = Courier::Models::TopicDigestResponse
|
|
636
|
+
|
|
637
|
+
TopicDigestScheduleRequest = Courier::Models::TopicDigestScheduleRequest
|
|
638
|
+
|
|
639
|
+
TopicDigestScheduleResponse = Courier::Models::TopicDigestScheduleResponse
|
|
640
|
+
|
|
625
641
|
TranslationRetrieveParams = Courier::Models::TranslationRetrieveParams
|
|
626
642
|
|
|
627
643
|
TranslationUpdateParams = Courier::Models::TranslationUpdateParams
|
|
@@ -38,8 +38,11 @@ module Courier
|
|
|
38
38
|
).void
|
|
39
39
|
end
|
|
40
40
|
def release(
|
|
41
|
-
# The ID of the digest schedule to release
|
|
42
|
-
#
|
|
41
|
+
# The ID of the digest schedule to release. Newer schedules are
|
|
42
|
+
# `sch_01m26xfcn3endt3nxy4e2kx2rh` and need no encoding. Schedules created before
|
|
43
|
+
# that format are `sch/{uuid}` and contain a literal `/`, so those must be
|
|
44
|
+
# URL-encoded (e.g. `sch%2F00000000-0000-0000-0000-000000000000`). Both forms
|
|
45
|
+
# remain valid; existing ids are never migrated.
|
|
43
46
|
schedule_id,
|
|
44
47
|
request_options: {}
|
|
45
48
|
)
|
|
@@ -41,6 +41,7 @@ module Courier
|
|
|
41
41
|
Courier::JourneyNode::JourneyBranchNode::OrHash
|
|
42
42
|
)
|
|
43
43
|
],
|
|
44
|
+
cancelation_token: String,
|
|
44
45
|
enabled: T::Boolean,
|
|
45
46
|
state: Courier::JourneyState::OrSymbol,
|
|
46
47
|
idempotency_key: String,
|
|
@@ -53,6 +54,12 @@ module Courier
|
|
|
53
54
|
name:,
|
|
54
55
|
# Body param
|
|
55
56
|
nodes:,
|
|
57
|
+
# Body param: Cancelation token stored on the journey definition. It tags every
|
|
58
|
+
# run the journey creates so that `POST /journeys/cancel` can later cancel those
|
|
59
|
+
# runs by token. Accepts a templated string such as `order-{{data.order_id}}`,
|
|
60
|
+
# which is resolved per run when the journey is invoked. On a replace, omitting
|
|
61
|
+
# this field preserves any existing token and sending a value replaces it.
|
|
62
|
+
cancelation_token: nil,
|
|
56
63
|
# Body param
|
|
57
64
|
enabled: nil,
|
|
58
65
|
# Body param: Lifecycle state of a journey.
|
|
@@ -283,6 +290,7 @@ module Courier
|
|
|
283
290
|
Courier::JourneyNode::JourneyBranchNode::OrHash
|
|
284
291
|
)
|
|
285
292
|
],
|
|
293
|
+
cancelation_token: String,
|
|
286
294
|
enabled: T::Boolean,
|
|
287
295
|
state: Courier::JourneyState::OrSymbol,
|
|
288
296
|
request_options: Courier::RequestOptions::OrHash
|
|
@@ -293,6 +301,12 @@ module Courier
|
|
|
293
301
|
template_id,
|
|
294
302
|
name:,
|
|
295
303
|
nodes:,
|
|
304
|
+
# Cancelation token stored on the journey definition. It tags every run the
|
|
305
|
+
# journey creates so that `POST /journeys/cancel` can later cancel those runs by
|
|
306
|
+
# token. Accepts a templated string such as `order-{{data.order_id}}`, which is
|
|
307
|
+
# resolved per run when the journey is invoked. On a replace, omitting this field
|
|
308
|
+
# preserves any existing token and sending a value replaces it.
|
|
309
|
+
cancelation_token: nil,
|
|
296
310
|
enabled: nil,
|
|
297
311
|
# Lifecycle state of a journey.
|
|
298
312
|
state: nil,
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Resources
|
|
5
5
|
class WorkspacePreferences
|
|
6
|
-
# Manage the workspace catalog of subscription topics, the sections that group
|
|
7
|
-
# them, and publishing the preference page.
|
|
8
6
|
class Topics
|
|
9
7
|
# Creates a subscription topic inside a workspace preference. The default status
|
|
10
8
|
# sets whether users start opted in, opted out, or required.
|
|
@@ -21,6 +19,10 @@ module Courier
|
|
|
21
19
|
]
|
|
22
20
|
),
|
|
23
21
|
description: T.nilable(String),
|
|
22
|
+
digest:
|
|
23
|
+
T.nilable(
|
|
24
|
+
Courier::WorkspacePreferenceTopicCreateRequest::Digest::OrHash
|
|
25
|
+
),
|
|
24
26
|
include_unsubscribe_header: T.nilable(T::Boolean),
|
|
25
27
|
routing_options:
|
|
26
28
|
T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
|
|
@@ -44,6 +46,19 @@ module Courier
|
|
|
44
46
|
# Body param: Optional description shown under the topic on the hosted preferences
|
|
45
47
|
# page.
|
|
46
48
|
description: nil,
|
|
49
|
+
# Body param: A topic's digest, as supplied when the topic itself is created: the
|
|
50
|
+
# template that renders it, the cadences it delivers on, and how collected events
|
|
51
|
+
# are retained.
|
|
52
|
+
#
|
|
53
|
+
# Identical to `TopicDigestRequest`, which a replace uses, except that `schedules`
|
|
54
|
+
# is required — a topic being created has no stored schedules for an absent key to
|
|
55
|
+
# leave alone.
|
|
56
|
+
#
|
|
57
|
+
# Send `null` for the whole object to turn a digest off, which unlinks the
|
|
58
|
+
# template and removes its schedules. There is no `enabled` flag, and
|
|
59
|
+
# `schedules: []` is rejected, because both states are un-deliverable rather than
|
|
60
|
+
# merely off.
|
|
61
|
+
digest: nil,
|
|
47
62
|
# Body param: Whether to include a list-unsubscribe header on emails for this
|
|
48
63
|
# topic.
|
|
49
64
|
include_unsubscribe_header: nil,
|
|
@@ -119,6 +134,60 @@ module Courier
|
|
|
119
134
|
)
|
|
120
135
|
end
|
|
121
136
|
|
|
137
|
+
# Turn off a topic's digest, leaving the topic itself in place. The template is
|
|
138
|
+
# unlinked and the digest's schedules are removed along with their delivery rules.
|
|
139
|
+
# Equivalent to sending `digest: null` on a topic replace.
|
|
140
|
+
sig do
|
|
141
|
+
params(
|
|
142
|
+
topic_id: String,
|
|
143
|
+
section_id: String,
|
|
144
|
+
request_options: Courier::RequestOptions::OrHash
|
|
145
|
+
).void
|
|
146
|
+
end
|
|
147
|
+
def delete_digest(
|
|
148
|
+
# The preference topic whose digest to turn off.
|
|
149
|
+
topic_id,
|
|
150
|
+
# The preference section containing the topic.
|
|
151
|
+
section_id:,
|
|
152
|
+
request_options: {}
|
|
153
|
+
)
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Send one recipient's held digest now, instead of waiting for its schedule. Use
|
|
157
|
+
# it to preview what a digest will look like, or to let someone flush their own.
|
|
158
|
+
#
|
|
159
|
+
# Keyed on the topic because that is how a held digest is stored: one per
|
|
160
|
+
# recipient per topic, with the schedule recorded on it rather than part of its
|
|
161
|
+
# identity. To flush every recipient on a schedule instead, use
|
|
162
|
+
# `POST /digests/schedules/{schedule_id}/trigger`.
|
|
163
|
+
sig do
|
|
164
|
+
params(
|
|
165
|
+
topic_id: String,
|
|
166
|
+
section_id: String,
|
|
167
|
+
user_id: String,
|
|
168
|
+
tenant_id: String,
|
|
169
|
+
request_options: Courier::RequestOptions::OrHash
|
|
170
|
+
).void
|
|
171
|
+
end
|
|
172
|
+
def release_digest(
|
|
173
|
+
# Path param: The preference topic whose digest to release.
|
|
174
|
+
topic_id,
|
|
175
|
+
# Path param: The preference section containing the topic.
|
|
176
|
+
section_id:,
|
|
177
|
+
# Body param: The recipient whose digest to release. Required: there is no
|
|
178
|
+
# "release everyone on this topic" form, because a whole-schedule flush already
|
|
179
|
+
# has its own endpoint and a body-shaped difference between one recipient and all
|
|
180
|
+
# of them is too easy to get wrong.
|
|
181
|
+
user_id:,
|
|
182
|
+
# Body param: The recipient's tenant, when they were sent to as part of one -- the
|
|
183
|
+
# same value returned as `tenant_id` on a digest instance and sent as
|
|
184
|
+
# `message.context.tenant_id`. It is part of the held digest's key, so a tenanted
|
|
185
|
+
# recipient cannot be found without it. Omit for an ordinary recipient.
|
|
186
|
+
tenant_id: nil,
|
|
187
|
+
request_options: {}
|
|
188
|
+
)
|
|
189
|
+
end
|
|
190
|
+
|
|
122
191
|
# Replace a topic within a workspace preference. Full document replacement;
|
|
123
192
|
# missing optional fields are cleared. Same 404 rules as GET.
|
|
124
193
|
sig do
|
|
@@ -135,6 +204,7 @@ module Courier
|
|
|
135
204
|
]
|
|
136
205
|
),
|
|
137
206
|
description: T.nilable(String),
|
|
207
|
+
digest: T.nilable(Courier::TopicDigestRequest::OrHash),
|
|
138
208
|
include_unsubscribe_header: T.nilable(T::Boolean),
|
|
139
209
|
routing_options:
|
|
140
210
|
T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
|
|
@@ -157,6 +227,14 @@ module Courier
|
|
|
157
227
|
# Body param: Optional description shown under the topic on the hosted preferences
|
|
158
228
|
# page. Omit to clear.
|
|
159
229
|
description: nil,
|
|
230
|
+
# Body param: A topic's digest configuration: the template that renders it, the
|
|
231
|
+
# cadences it delivers on, and how collected events are retained.
|
|
232
|
+
#
|
|
233
|
+
# Send `null` for the whole object to turn a digest off, which unlinks the
|
|
234
|
+
# template and removes its schedules. There is no `enabled` flag, and
|
|
235
|
+
# `schedules: []` is rejected, because both states are un-deliverable rather than
|
|
236
|
+
# merely off.
|
|
237
|
+
digest: nil,
|
|
160
238
|
# Body param: Whether to include a list-unsubscribe header on emails for this
|
|
161
239
|
# topic.
|
|
162
240
|
include_unsubscribe_header: nil,
|
|
@@ -5,8 +5,6 @@ module Courier
|
|
|
5
5
|
# Manage the workspace catalog of subscription topics, the sections that group
|
|
6
6
|
# them, and publishing the preference page.
|
|
7
7
|
class WorkspacePreferences
|
|
8
|
-
# Manage the workspace catalog of subscription topics, the sections that group
|
|
9
|
-
# them, and publishing the preference page.
|
|
10
8
|
sig { returns(Courier::Resources::WorkspacePreferences::Topics) }
|
|
11
9
|
attr_reader :topics
|
|
12
10
|
|
|
@@ -4,6 +4,7 @@ module Courier
|
|
|
4
4
|
{
|
|
5
5
|
name: String,
|
|
6
6
|
nodes: ::Array[Courier::Models::journey_node],
|
|
7
|
+
cancelation_token: String,
|
|
7
8
|
enabled: bool,
|
|
8
9
|
state: Courier::Models::journey_state
|
|
9
10
|
}
|
|
@@ -13,6 +14,10 @@ module Courier
|
|
|
13
14
|
|
|
14
15
|
attr_accessor nodes: ::Array[Courier::Models::journey_node]
|
|
15
16
|
|
|
17
|
+
attr_reader cancelation_token: String?
|
|
18
|
+
|
|
19
|
+
def cancelation_token=: (String) -> String
|
|
20
|
+
|
|
16
21
|
attr_reader enabled: bool?
|
|
17
22
|
|
|
18
23
|
def enabled=: (bool) -> bool
|
|
@@ -26,6 +31,7 @@ module Courier
|
|
|
26
31
|
def initialize: (
|
|
27
32
|
name: String,
|
|
28
33
|
nodes: ::Array[Courier::Models::journey_node],
|
|
34
|
+
?cancelation_token: String,
|
|
29
35
|
?enabled: bool,
|
|
30
36
|
?state: Courier::Models::journey_state
|
|
31
37
|
) -> void
|
|
@@ -33,6 +39,7 @@ module Courier
|
|
|
33
39
|
def to_hash: -> {
|
|
34
40
|
name: String,
|
|
35
41
|
nodes: ::Array[Courier::Models::journey_node],
|
|
42
|
+
cancelation_token: String,
|
|
36
43
|
enabled: bool,
|
|
37
44
|
state: Courier::Models::journey_state
|
|
38
45
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type digest_day_of_week =
|
|
4
|
+
:sunday
|
|
5
|
+
| :monday
|
|
6
|
+
| :tuesday
|
|
7
|
+
| :wednesday
|
|
8
|
+
| :thursday
|
|
9
|
+
| :friday
|
|
10
|
+
| :saturday
|
|
11
|
+
|
|
12
|
+
module DigestDayOfWeek
|
|
13
|
+
extend Courier::Internal::Type::Enum
|
|
14
|
+
|
|
15
|
+
SUNDAY: :sunday
|
|
16
|
+
MONDAY: :monday
|
|
17
|
+
TUESDAY: :tuesday
|
|
18
|
+
WEDNESDAY: :wednesday
|
|
19
|
+
THURSDAY: :thursday
|
|
20
|
+
FRIDAY: :friday
|
|
21
|
+
SATURDAY: :saturday
|
|
22
|
+
|
|
23
|
+
def self?.values: -> ::Array[Courier::Models::digest_day_of_week]
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type digest_frequency =
|
|
4
|
+
:instant | :daily | :weekdays | :weekly | :custom_days | :monthly
|
|
5
|
+
|
|
6
|
+
module DigestFrequency
|
|
7
|
+
extend Courier::Internal::Type::Enum
|
|
8
|
+
|
|
9
|
+
INSTANT: :instant
|
|
10
|
+
DAILY: :daily
|
|
11
|
+
WEEKDAYS: :weekdays
|
|
12
|
+
WEEKLY: :weekly
|
|
13
|
+
CUSTOM_DAYS: :custom_days
|
|
14
|
+
MONTHLY: :monthly
|
|
15
|
+
|
|
16
|
+
def self?.values: -> ::Array[Courier::Models::digest_frequency]
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -3,6 +3,7 @@ module Courier
|
|
|
3
3
|
type journey_response =
|
|
4
4
|
{
|
|
5
5
|
id: String,
|
|
6
|
+
cancelation_token: String?,
|
|
6
7
|
created: Integer?,
|
|
7
8
|
creator: String?,
|
|
8
9
|
enabled: bool,
|
|
@@ -17,6 +18,8 @@ module Courier
|
|
|
17
18
|
class JourneyResponse < Courier::Internal::Type::BaseModel
|
|
18
19
|
attr_accessor id: String
|
|
19
20
|
|
|
21
|
+
attr_accessor cancelation_token: String?
|
|
22
|
+
|
|
20
23
|
attr_accessor created: Integer?
|
|
21
24
|
|
|
22
25
|
attr_accessor creator: String?
|
|
@@ -37,6 +40,7 @@ module Courier
|
|
|
37
40
|
|
|
38
41
|
def initialize: (
|
|
39
42
|
id: String,
|
|
43
|
+
cancelation_token: String?,
|
|
40
44
|
created: Integer?,
|
|
41
45
|
creator: String?,
|
|
42
46
|
enabled: bool,
|
|
@@ -50,6 +54,7 @@ module Courier
|
|
|
50
54
|
|
|
51
55
|
def to_hash: -> {
|
|
52
56
|
id: String,
|
|
57
|
+
cancelation_token: String?,
|
|
53
58
|
created: Integer?,
|
|
54
59
|
creator: String?,
|
|
55
60
|
enabled: bool,
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type topic_digest_category =
|
|
4
|
+
{
|
|
5
|
+
category_key: String,
|
|
6
|
+
limit: Integer,
|
|
7
|
+
retain: Courier::Models::TopicDigestCategory::retain,
|
|
8
|
+
sort_key: String
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class TopicDigestCategory < Courier::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor category_key: String
|
|
13
|
+
|
|
14
|
+
attr_reader limit: Integer?
|
|
15
|
+
|
|
16
|
+
def limit=: (Integer) -> Integer
|
|
17
|
+
|
|
18
|
+
attr_reader retain: Courier::Models::TopicDigestCategory::retain?
|
|
19
|
+
|
|
20
|
+
def retain=: (
|
|
21
|
+
Courier::Models::TopicDigestCategory::retain
|
|
22
|
+
) -> Courier::Models::TopicDigestCategory::retain
|
|
23
|
+
|
|
24
|
+
attr_reader sort_key: String?
|
|
25
|
+
|
|
26
|
+
def sort_key=: (String) -> String
|
|
27
|
+
|
|
28
|
+
def initialize: (
|
|
29
|
+
category_key: String,
|
|
30
|
+
?limit: Integer,
|
|
31
|
+
?retain: Courier::Models::TopicDigestCategory::retain,
|
|
32
|
+
?sort_key: String
|
|
33
|
+
) -> void
|
|
34
|
+
|
|
35
|
+
def to_hash: -> {
|
|
36
|
+
category_key: String,
|
|
37
|
+
limit: Integer,
|
|
38
|
+
retain: Courier::Models::TopicDigestCategory::retain,
|
|
39
|
+
sort_key: String
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
type retain = :FIRST | :LAST | :HIGHEST | :LOWEST | :NONE
|
|
43
|
+
|
|
44
|
+
module Retain
|
|
45
|
+
extend Courier::Internal::Type::Enum
|
|
46
|
+
|
|
47
|
+
FIRST: :FIRST
|
|
48
|
+
LAST: :LAST
|
|
49
|
+
HIGHEST: :HIGHEST
|
|
50
|
+
LOWEST: :LOWEST
|
|
51
|
+
NONE: :NONE
|
|
52
|
+
|
|
53
|
+
def self?.values: -> ::Array[Courier::Models::TopicDigestCategory::retain]
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type topic_digest_release_request = { user_id: String, tenant_id: String }
|
|
4
|
+
|
|
5
|
+
class TopicDigestReleaseRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
attr_accessor user_id: String
|
|
7
|
+
|
|
8
|
+
attr_reader tenant_id: String?
|
|
9
|
+
|
|
10
|
+
def tenant_id=: (String) -> String
|
|
11
|
+
|
|
12
|
+
def initialize: (user_id: String, ?tenant_id: String) -> void
|
|
13
|
+
|
|
14
|
+
def to_hash: -> { user_id: String, tenant_id: String }
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type topic_digest_request =
|
|
4
|
+
{
|
|
5
|
+
template_id: String,
|
|
6
|
+
audience_id: String,
|
|
7
|
+
categories: ::Array[Courier::TopicDigestCategory],
|
|
8
|
+
schedules: ::Array[Courier::TopicDigestScheduleRequest],
|
|
9
|
+
trigger_empty: bool
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
class TopicDigestRequest < Courier::Internal::Type::BaseModel
|
|
13
|
+
attr_accessor template_id: String
|
|
14
|
+
|
|
15
|
+
attr_reader audience_id: String?
|
|
16
|
+
|
|
17
|
+
def audience_id=: (String) -> String
|
|
18
|
+
|
|
19
|
+
attr_reader categories: ::Array[Courier::TopicDigestCategory]?
|
|
20
|
+
|
|
21
|
+
def categories=: (
|
|
22
|
+
::Array[Courier::TopicDigestCategory]
|
|
23
|
+
) -> ::Array[Courier::TopicDigestCategory]
|
|
24
|
+
|
|
25
|
+
attr_reader schedules: ::Array[Courier::TopicDigestScheduleRequest]?
|
|
26
|
+
|
|
27
|
+
def schedules=: (
|
|
28
|
+
::Array[Courier::TopicDigestScheduleRequest]
|
|
29
|
+
) -> ::Array[Courier::TopicDigestScheduleRequest]
|
|
30
|
+
|
|
31
|
+
attr_reader trigger_empty: bool?
|
|
32
|
+
|
|
33
|
+
def trigger_empty=: (bool) -> bool
|
|
34
|
+
|
|
35
|
+
def initialize: (
|
|
36
|
+
template_id: String,
|
|
37
|
+
?audience_id: String,
|
|
38
|
+
?categories: ::Array[Courier::TopicDigestCategory],
|
|
39
|
+
?schedules: ::Array[Courier::TopicDigestScheduleRequest],
|
|
40
|
+
?trigger_empty: bool
|
|
41
|
+
) -> void
|
|
42
|
+
|
|
43
|
+
def to_hash: -> {
|
|
44
|
+
template_id: String,
|
|
45
|
+
audience_id: String,
|
|
46
|
+
categories: ::Array[Courier::TopicDigestCategory],
|
|
47
|
+
schedules: ::Array[Courier::TopicDigestScheduleRequest],
|
|
48
|
+
trigger_empty: bool
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type topic_digest_response =
|
|
4
|
+
{
|
|
5
|
+
categories: ::Array[Courier::TopicDigestCategory],
|
|
6
|
+
schedules: ::Array[Courier::TopicDigestScheduleResponse],
|
|
7
|
+
template_id: String,
|
|
8
|
+
audience_id: String,
|
|
9
|
+
created: String,
|
|
10
|
+
trigger_empty: bool,
|
|
11
|
+
updated: String
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class TopicDigestResponse < Courier::Internal::Type::BaseModel
|
|
15
|
+
attr_accessor categories: ::Array[Courier::TopicDigestCategory]
|
|
16
|
+
|
|
17
|
+
attr_accessor schedules: ::Array[Courier::TopicDigestScheduleResponse]
|
|
18
|
+
|
|
19
|
+
attr_accessor template_id: String
|
|
20
|
+
|
|
21
|
+
attr_reader audience_id: String?
|
|
22
|
+
|
|
23
|
+
def audience_id=: (String) -> String
|
|
24
|
+
|
|
25
|
+
attr_reader created: String?
|
|
26
|
+
|
|
27
|
+
def created=: (String) -> String
|
|
28
|
+
|
|
29
|
+
attr_reader trigger_empty: bool?
|
|
30
|
+
|
|
31
|
+
def trigger_empty=: (bool) -> bool
|
|
32
|
+
|
|
33
|
+
attr_reader updated: String?
|
|
34
|
+
|
|
35
|
+
def updated=: (String) -> String
|
|
36
|
+
|
|
37
|
+
def initialize: (
|
|
38
|
+
categories: ::Array[Courier::TopicDigestCategory],
|
|
39
|
+
schedules: ::Array[Courier::TopicDigestScheduleResponse],
|
|
40
|
+
template_id: String,
|
|
41
|
+
?audience_id: String,
|
|
42
|
+
?created: String,
|
|
43
|
+
?trigger_empty: bool,
|
|
44
|
+
?updated: String
|
|
45
|
+
) -> void
|
|
46
|
+
|
|
47
|
+
def to_hash: -> {
|
|
48
|
+
categories: ::Array[Courier::TopicDigestCategory],
|
|
49
|
+
schedules: ::Array[Courier::TopicDigestScheduleResponse],
|
|
50
|
+
template_id: String,
|
|
51
|
+
audience_id: String,
|
|
52
|
+
created: String,
|
|
53
|
+
trigger_empty: bool,
|
|
54
|
+
updated: String
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|