trycourier 4.17.0 → 4.18.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 +31 -0
- data/lib/courier/client.rb +3 -3
- data/lib/courier/models/cancel_journey_request.rb +39 -0
- data/lib/courier/models/cancel_journey_response.rb +55 -0
- data/lib/courier/models/{preference_section_list_params.rb → journey_cancel_params.rb} +2 -2
- data/lib/courier/models/journey_experiment.rb +49 -0
- data/lib/courier/models/journey_experiment_variant.rb +44 -0
- data/lib/courier/models/journey_node.rb +1 -1
- data/lib/courier/models/journey_send_node.rb +23 -10
- data/lib/courier/models/publish_preferences_response.rb +1 -1
- data/lib/courier/models/{preference_section_archive_params.rb → workspace_preference_archive_params.rb} +2 -2
- data/lib/courier/models/workspace_preference_create_params.rb +14 -0
- data/lib/courier/models/{preference_section_create_request.rb → workspace_preference_create_request.rb} +8 -8
- data/lib/courier/models/{preference_section_get_response.rb → workspace_preference_get_response.rb} +15 -15
- data/lib/courier/models/{preference_section_publish_params.rb → workspace_preference_list_params.rb} +2 -2
- data/lib/courier/models/workspace_preference_list_response.rb +18 -0
- data/lib/courier/models/{preference_section_create_params.rb → workspace_preference_publish_params.rb} +2 -2
- data/lib/courier/models/{preference_section_replace_params.rb → workspace_preference_replace_params.rb} +2 -2
- data/lib/courier/models/{preference_section_replace_request.rb → workspace_preference_replace_request.rb} +8 -8
- data/lib/courier/models/{preference_section_retrieve_params.rb → workspace_preference_retrieve_params.rb} +2 -2
- data/lib/courier/models/{preference_topic_create_request.rb → workspace_preference_topic_create_request.rb} +9 -9
- data/lib/courier/models/{preference_topic_get_response.rb → workspace_preference_topic_get_response.rb} +8 -8
- data/lib/courier/models/workspace_preference_topic_list_response.rb +17 -0
- data/lib/courier/models/{preference_topic_replace_request.rb → workspace_preference_topic_replace_request.rb} +8 -8
- data/lib/courier/models/{preference_sections → workspace_preferences}/topic_archive_params.rb +2 -2
- data/lib/courier/models/{preference_sections → workspace_preferences}/topic_create_params.rb +3 -3
- data/lib/courier/models/{preference_sections → workspace_preferences}/topic_list_params.rb +2 -2
- data/lib/courier/models/{preference_sections → workspace_preferences}/topic_replace_params.rb +3 -3
- data/lib/courier/models/{preference_sections → workspace_preferences}/topic_retrieve_params.rb +2 -2
- data/lib/courier/models.rb +40 -30
- data/lib/courier/resources/journeys.rb +30 -0
- data/lib/courier/resources/notifications/checks.rb +3 -3
- data/lib/courier/resources/{preference_sections → workspace_preferences}/topics.rb +40 -37
- data/lib/courier/resources/{preference_sections.rb → workspace_preferences.rb} +40 -40
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +26 -21
- data/rbi/courier/client.rbi +2 -2
- data/rbi/courier/models/cancel_journey_request.rbi +68 -0
- data/rbi/courier/models/cancel_journey_response.rbi +81 -0
- data/rbi/courier/models/journey_cancel_params.rbi +27 -0
- data/rbi/courier/models/journey_experiment.rbi +74 -0
- data/rbi/courier/models/journey_experiment_variant.rbi +61 -0
- data/rbi/courier/models/journey_send_node.rbi +32 -11
- data/rbi/courier/models/{preference_section_retrieve_params.rbi → workspace_preference_archive_params.rbi} +2 -2
- data/rbi/courier/models/{preference_section_create_params.rbi → workspace_preference_create_params.rbi} +2 -2
- data/rbi/courier/models/{preference_section_create_request.rbi → workspace_preference_create_request.rbi} +9 -9
- data/rbi/courier/models/{preference_section_get_response.rbi → workspace_preference_get_response.rbi} +17 -16
- data/rbi/courier/models/{preference_section_list_params.rbi → workspace_preference_list_params.rbi} +2 -2
- data/rbi/courier/models/{preference_topic_list_response.rbi → workspace_preference_list_response.rbi} +6 -6
- data/rbi/courier/models/{preference_section_publish_params.rbi → workspace_preference_publish_params.rbi} +2 -2
- data/rbi/courier/models/{preference_section_replace_params.rbi → workspace_preference_replace_params.rbi} +2 -2
- data/rbi/courier/models/{preference_section_replace_request.rbi → workspace_preference_replace_request.rbi} +9 -9
- data/rbi/courier/models/{preference_section_archive_params.rbi → workspace_preference_retrieve_params.rbi} +2 -2
- data/rbi/courier/models/{preference_topic_create_request.rbi → workspace_preference_topic_create_request.rbi} +22 -17
- data/rbi/courier/models/{preference_topic_get_response.rbi → workspace_preference_topic_get_response.rbi} +23 -17
- data/rbi/courier/models/workspace_preference_topic_list_response.rbi +36 -0
- data/rbi/courier/models/{preference_topic_replace_request.rbi → workspace_preference_topic_replace_request.rbi} +22 -17
- data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_archive_params.rbi +2 -2
- data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_create_params.rbi +3 -3
- data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_list_params.rbi +2 -2
- data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_replace_params.rbi +3 -3
- data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_retrieve_params.rbi +2 -2
- data/rbi/courier/models.rbi +53 -36
- data/rbi/courier/resources/journeys.rbi +25 -0
- data/rbi/courier/resources/notifications/checks.rbi +3 -3
- data/rbi/courier/resources/{preference_sections → workspace_preferences}/topics.rbi +25 -22
- data/rbi/courier/resources/{preference_sections.rbi → workspace_preferences.rbi} +27 -27
- data/sig/courier/client.rbs +1 -1
- data/sig/courier/models/cancel_journey_request.rbs +33 -0
- data/sig/courier/models/cancel_journey_response.rbs +35 -0
- data/sig/courier/models/{preference_section_list_params.rbs → journey_cancel_params.rbs} +2 -2
- data/sig/courier/models/journey_experiment.rbs +39 -0
- data/sig/courier/models/journey_experiment_variant.rbs +32 -0
- data/sig/courier/models/journey_send_node.rbs +19 -8
- data/sig/courier/models/{preference_section_retrieve_params.rbs → workspace_preference_archive_params.rbs} +2 -2
- data/sig/courier/models/workspace_preference_create_params.rbs +15 -0
- data/sig/courier/models/{preference_section_replace_request.rbs → workspace_preference_create_request.rbs} +2 -2
- data/sig/courier/models/{preference_section_get_response.rbs → workspace_preference_get_response.rbs} +6 -6
- data/sig/courier/models/{preference_section_publish_params.rbs → workspace_preference_list_params.rbs} +2 -2
- data/sig/courier/models/workspace_preference_list_response.rbs +18 -0
- data/sig/courier/models/{preference_section_create_params.rbs → workspace_preference_publish_params.rbs} +2 -2
- data/sig/courier/models/{preference_section_replace_params.rbs → workspace_preference_replace_params.rbs} +2 -2
- data/sig/courier/models/{preference_section_create_request.rbs → workspace_preference_replace_request.rbs} +2 -2
- data/sig/courier/models/{preference_section_archive_params.rbs → workspace_preference_retrieve_params.rbs} +2 -2
- data/sig/courier/models/{preference_topic_create_request.rbs → workspace_preference_topic_create_request.rbs} +12 -12
- data/sig/courier/models/{preference_topic_get_response.rbs → workspace_preference_topic_get_response.rbs} +12 -12
- data/sig/courier/models/workspace_preference_topic_list_response.rbs +18 -0
- data/sig/courier/models/{preference_topic_replace_request.rbs → workspace_preference_topic_replace_request.rbs} +12 -12
- data/sig/courier/models/{preference_sections → workspace_preferences}/topic_archive_params.rbs +1 -1
- data/sig/courier/models/{preference_sections → workspace_preferences}/topic_create_params.rbs +2 -2
- data/sig/courier/models/{preference_sections → workspace_preferences}/topic_list_params.rbs +1 -1
- data/sig/courier/models/{preference_sections → workspace_preferences}/topic_replace_params.rbs +2 -2
- data/sig/courier/models/{preference_sections → workspace_preferences}/topic_retrieve_params.rbs +1 -1
- data/sig/courier/models.rbs +40 -30
- data/sig/courier/resources/journeys.rbs +5 -0
- data/sig/courier/resources/{preference_sections → workspace_preferences}/topics.rbs +9 -9
- data/sig/courier/resources/{preference_sections.rbs → workspace_preferences.rbs} +6 -6
- metadata +80 -65
- data/lib/courier/models/preference_section_list_response.rb +0 -18
- data/lib/courier/models/preference_topic_list_response.rb +0 -17
- data/rbi/courier/models/preference_section_list_response.rbi +0 -35
- data/sig/courier/models/preference_section_list_response.rbs +0 -18
- data/sig/courier/models/preference_topic_list_response.rbs +0 -16
|
@@ -51,8 +51,20 @@ module Courier
|
|
|
51
51
|
end
|
|
52
52
|
attr_writer :conditions
|
|
53
53
|
|
|
54
|
-
#
|
|
55
|
-
#
|
|
54
|
+
# A/B experiment config for a send node. The recipient is deterministically
|
|
55
|
+
# bucketed by `bucketingKey` and routed to one of the `variants` in proportion to
|
|
56
|
+
# its `weight`. Present on a send node INSTEAD OF `message.template`.
|
|
57
|
+
sig { returns(T.nilable(Courier::JourneyExperiment)) }
|
|
58
|
+
attr_reader :experiment
|
|
59
|
+
|
|
60
|
+
sig { params(experiment: Courier::JourneyExperiment::OrHash).void }
|
|
61
|
+
attr_writer :experiment
|
|
62
|
+
|
|
63
|
+
# Send to the recipient. A send node sources its content from EXACTLY ONE of
|
|
64
|
+
# `message.template` (a single notification template) or `experiment` (an A/B
|
|
65
|
+
# split across weighted template variants) — supplying both, or neither, is
|
|
66
|
+
# rejected. Optionally override the recipient address, delay the send, or attach
|
|
67
|
+
# `data`.
|
|
56
68
|
sig do
|
|
57
69
|
params(
|
|
58
70
|
message: Courier::JourneySendNode::Message::OrHash,
|
|
@@ -63,7 +75,8 @@ module Courier
|
|
|
63
75
|
T::Array[String],
|
|
64
76
|
Courier::JourneyConditionGroup::OrHash,
|
|
65
77
|
Courier::JourneyConditionNestedGroup::OrHash
|
|
66
|
-
)
|
|
78
|
+
),
|
|
79
|
+
experiment: Courier::JourneyExperiment::OrHash
|
|
67
80
|
).returns(T.attached_class)
|
|
68
81
|
end
|
|
69
82
|
def self.new(
|
|
@@ -73,7 +86,11 @@ module Courier
|
|
|
73
86
|
# Condition spec for a journey node. Accepts a single condition atom, an AND/OR
|
|
74
87
|
# group, or an AND/OR nested group. Omit the `conditions` property entirely to
|
|
75
88
|
# express "no conditions".
|
|
76
|
-
conditions: nil
|
|
89
|
+
conditions: nil,
|
|
90
|
+
# A/B experiment config for a send node. The recipient is deterministically
|
|
91
|
+
# bucketed by `bucketingKey` and routed to one of the `variants` in proportion to
|
|
92
|
+
# its `weight`. Present on a send node INSTEAD OF `message.template`.
|
|
93
|
+
experiment: nil
|
|
77
94
|
)
|
|
78
95
|
end
|
|
79
96
|
|
|
@@ -88,7 +105,8 @@ module Courier
|
|
|
88
105
|
T::Array[String],
|
|
89
106
|
Courier::JourneyConditionGroup,
|
|
90
107
|
Courier::JourneyConditionNestedGroup
|
|
91
|
-
)
|
|
108
|
+
),
|
|
109
|
+
experiment: Courier::JourneyExperiment
|
|
92
110
|
}
|
|
93
111
|
)
|
|
94
112
|
end
|
|
@@ -101,9 +119,6 @@ module Courier
|
|
|
101
119
|
T.any(Courier::JourneySendNode::Message, Courier::Internal::AnyHash)
|
|
102
120
|
end
|
|
103
121
|
|
|
104
|
-
sig { returns(String) }
|
|
105
|
-
attr_accessor :template
|
|
106
|
-
|
|
107
122
|
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
108
123
|
attr_reader :data
|
|
109
124
|
|
|
@@ -118,6 +133,12 @@ module Courier
|
|
|
118
133
|
end
|
|
119
134
|
attr_writer :delay
|
|
120
135
|
|
|
136
|
+
sig { returns(T.nilable(String)) }
|
|
137
|
+
attr_reader :template
|
|
138
|
+
|
|
139
|
+
sig { params(template: String).void }
|
|
140
|
+
attr_writer :template
|
|
141
|
+
|
|
121
142
|
sig { returns(T.nilable(Courier::JourneySendNode::Message::To)) }
|
|
122
143
|
attr_reader :to
|
|
123
144
|
|
|
@@ -126,21 +147,21 @@ module Courier
|
|
|
126
147
|
|
|
127
148
|
sig do
|
|
128
149
|
params(
|
|
129
|
-
template: String,
|
|
130
150
|
data: T::Hash[Symbol, T.anything],
|
|
131
151
|
delay: Courier::JourneySendNode::Message::Delay::OrHash,
|
|
152
|
+
template: String,
|
|
132
153
|
to: Courier::JourneySendNode::Message::To::OrHash
|
|
133
154
|
).returns(T.attached_class)
|
|
134
155
|
end
|
|
135
|
-
def self.new(
|
|
156
|
+
def self.new(data: nil, delay: nil, template: nil, to: nil)
|
|
136
157
|
end
|
|
137
158
|
|
|
138
159
|
sig do
|
|
139
160
|
override.returns(
|
|
140
161
|
{
|
|
141
|
-
template: String,
|
|
142
162
|
data: T::Hash[Symbol, T.anything],
|
|
143
163
|
delay: Courier::JourneySendNode::Message::Delay,
|
|
164
|
+
template: String,
|
|
144
165
|
to: Courier::JourneySendNode::Message::To
|
|
145
166
|
}
|
|
146
167
|
)
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class WorkspacePreferenceArchiveParams < Courier::Internal::Type::BaseModel
|
|
6
6
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
7
|
include Courier::Internal::Type::RequestParameters
|
|
8
8
|
|
|
9
9
|
OrHash =
|
|
10
10
|
T.type_alias do
|
|
11
11
|
T.any(
|
|
12
|
-
Courier::
|
|
12
|
+
Courier::WorkspacePreferenceArchiveParams,
|
|
13
13
|
Courier::Internal::AnyHash
|
|
14
14
|
)
|
|
15
15
|
end
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class WorkspacePreferenceCreateParams < Courier::Models::WorkspacePreferenceCreateRequest
|
|
6
6
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
7
|
include Courier::Internal::Type::RequestParameters
|
|
8
8
|
|
|
9
9
|
OrHash =
|
|
10
10
|
T.type_alias do
|
|
11
11
|
T.any(
|
|
12
|
-
Courier::
|
|
12
|
+
Courier::WorkspacePreferenceCreateParams,
|
|
13
13
|
Courier::Internal::AnyHash
|
|
14
14
|
)
|
|
15
15
|
end
|
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class WorkspacePreferenceCreateRequest < Courier::Internal::Type::BaseModel
|
|
6
6
|
OrHash =
|
|
7
7
|
T.type_alias do
|
|
8
8
|
T.any(
|
|
9
|
-
Courier::
|
|
9
|
+
Courier::WorkspacePreferenceCreateRequest,
|
|
10
10
|
Courier::Internal::AnyHash
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# Human-readable name for the
|
|
14
|
+
# Human-readable name for the workspace preference.
|
|
15
15
|
sig { returns(String) }
|
|
16
16
|
attr_accessor :name
|
|
17
17
|
|
|
18
|
-
# Whether the
|
|
18
|
+
# Whether the workspace preference defines custom routing for its topics.
|
|
19
19
|
sig { returns(T.nilable(T::Boolean)) }
|
|
20
20
|
attr_accessor :has_custom_routing
|
|
21
21
|
|
|
22
|
-
# Default channels for the
|
|
22
|
+
# Default channels for the workspace preference. Defaults to empty if omitted.
|
|
23
23
|
sig do
|
|
24
24
|
returns(T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]))
|
|
25
25
|
end
|
|
26
26
|
attr_accessor :routing_options
|
|
27
27
|
|
|
28
|
-
# Request body for creating a preference
|
|
28
|
+
# Request body for creating a workspace preference.
|
|
29
29
|
sig do
|
|
30
30
|
params(
|
|
31
31
|
name: String,
|
|
@@ -35,11 +35,11 @@ module Courier
|
|
|
35
35
|
).returns(T.attached_class)
|
|
36
36
|
end
|
|
37
37
|
def self.new(
|
|
38
|
-
# Human-readable name for the
|
|
38
|
+
# Human-readable name for the workspace preference.
|
|
39
39
|
name:,
|
|
40
|
-
# Whether the
|
|
40
|
+
# Whether the workspace preference defines custom routing for its topics.
|
|
41
41
|
has_custom_routing: nil,
|
|
42
|
-
# Default channels for the
|
|
42
|
+
# Default channels for the workspace preference. Defaults to empty if omitted.
|
|
43
43
|
routing_options: nil
|
|
44
44
|
)
|
|
45
45
|
end
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class WorkspacePreferenceGetResponse < Courier::Internal::Type::BaseModel
|
|
6
6
|
OrHash =
|
|
7
7
|
T.type_alias do
|
|
8
8
|
T.any(
|
|
9
|
-
Courier::
|
|
9
|
+
Courier::WorkspacePreferenceGetResponse,
|
|
10
10
|
Courier::Internal::AnyHash
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# The preference
|
|
14
|
+
# The workspace preference id.
|
|
15
15
|
sig { returns(String) }
|
|
16
16
|
attr_accessor :id
|
|
17
17
|
|
|
18
|
-
# ISO-8601 timestamp of when the
|
|
18
|
+
# ISO-8601 timestamp of when the workspace preference was created.
|
|
19
19
|
sig { returns(String) }
|
|
20
20
|
attr_accessor :created
|
|
21
21
|
|
|
22
|
-
# Whether the
|
|
22
|
+
# Whether the workspace preference defines custom routing for its topics.
|
|
23
23
|
sig { returns(T::Boolean) }
|
|
24
24
|
attr_accessor :has_custom_routing
|
|
25
25
|
|
|
@@ -27,12 +27,12 @@ module Courier
|
|
|
27
27
|
sig { returns(String) }
|
|
28
28
|
attr_accessor :name
|
|
29
29
|
|
|
30
|
-
# Default channels for the
|
|
30
|
+
# Default channels for the workspace preference. May be empty.
|
|
31
31
|
sig { returns(T::Array[Courier::ChannelClassification::TaggedSymbol]) }
|
|
32
32
|
attr_accessor :routing_options
|
|
33
33
|
|
|
34
|
-
# The topics contained in this
|
|
35
|
-
sig { returns(T::Array[Courier::
|
|
34
|
+
# The topics contained in this workspace preference.
|
|
35
|
+
sig { returns(T::Array[Courier::WorkspacePreferenceTopicGetResponse]) }
|
|
36
36
|
attr_accessor :topics
|
|
37
37
|
|
|
38
38
|
# Id of the creator.
|
|
@@ -47,7 +47,7 @@ module Courier
|
|
|
47
47
|
sig { returns(T.nilable(String)) }
|
|
48
48
|
attr_accessor :updater
|
|
49
49
|
|
|
50
|
-
# A preference
|
|
50
|
+
# A workspace preference in your workspace, including its topics.
|
|
51
51
|
sig do
|
|
52
52
|
params(
|
|
53
53
|
id: String,
|
|
@@ -55,24 +55,25 @@ module Courier
|
|
|
55
55
|
has_custom_routing: T::Boolean,
|
|
56
56
|
name: String,
|
|
57
57
|
routing_options: T::Array[Courier::ChannelClassification::OrSymbol],
|
|
58
|
-
topics:
|
|
58
|
+
topics:
|
|
59
|
+
T::Array[Courier::WorkspacePreferenceTopicGetResponse::OrHash],
|
|
59
60
|
creator: T.nilable(String),
|
|
60
61
|
updated: T.nilable(String),
|
|
61
62
|
updater: T.nilable(String)
|
|
62
63
|
).returns(T.attached_class)
|
|
63
64
|
end
|
|
64
65
|
def self.new(
|
|
65
|
-
# The preference
|
|
66
|
+
# The workspace preference id.
|
|
66
67
|
id:,
|
|
67
|
-
# ISO-8601 timestamp of when the
|
|
68
|
+
# ISO-8601 timestamp of when the workspace preference was created.
|
|
68
69
|
created:,
|
|
69
|
-
# Whether the
|
|
70
|
+
# Whether the workspace preference defines custom routing for its topics.
|
|
70
71
|
has_custom_routing:,
|
|
71
72
|
# Human-readable name.
|
|
72
73
|
name:,
|
|
73
|
-
# Default channels for the
|
|
74
|
+
# Default channels for the workspace preference. May be empty.
|
|
74
75
|
routing_options:,
|
|
75
|
-
# The topics contained in this
|
|
76
|
+
# The topics contained in this workspace preference.
|
|
76
77
|
topics:,
|
|
77
78
|
# Id of the creator.
|
|
78
79
|
creator: nil,
|
|
@@ -92,7 +93,7 @@ module Courier
|
|
|
92
93
|
name: String,
|
|
93
94
|
routing_options:
|
|
94
95
|
T::Array[Courier::ChannelClassification::TaggedSymbol],
|
|
95
|
-
topics: T::Array[Courier::
|
|
96
|
+
topics: T::Array[Courier::WorkspacePreferenceTopicGetResponse],
|
|
96
97
|
creator: T.nilable(String),
|
|
97
98
|
updated: T.nilable(String),
|
|
98
99
|
updater: T.nilable(String)
|
data/rbi/courier/models/{preference_section_list_params.rbi → workspace_preference_list_params.rbi}
RENAMED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class WorkspacePreferenceListParams < Courier::Internal::Type::BaseModel
|
|
6
6
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
7
|
include Courier::Internal::Type::RequestParameters
|
|
8
8
|
|
|
9
9
|
OrHash =
|
|
10
10
|
T.type_alias do
|
|
11
11
|
T.any(
|
|
12
|
-
Courier::
|
|
12
|
+
Courier::WorkspacePreferenceListParams,
|
|
13
13
|
Courier::Internal::AnyHash
|
|
14
14
|
)
|
|
15
15
|
end
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class WorkspacePreferenceListResponse < Courier::Internal::Type::BaseModel
|
|
6
6
|
OrHash =
|
|
7
7
|
T.type_alias do
|
|
8
8
|
T.any(
|
|
9
|
-
Courier::
|
|
9
|
+
Courier::WorkspacePreferenceListResponse,
|
|
10
10
|
Courier::Internal::AnyHash
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
sig { returns(T::Array[Courier::
|
|
14
|
+
sig { returns(T::Array[Courier::WorkspacePreferenceGetResponse]) }
|
|
15
15
|
attr_accessor :results
|
|
16
16
|
|
|
17
|
-
#
|
|
17
|
+
# The workspace's preferences, each with its topics.
|
|
18
18
|
sig do
|
|
19
19
|
params(
|
|
20
|
-
results: T::Array[Courier::
|
|
20
|
+
results: T::Array[Courier::WorkspacePreferenceGetResponse::OrHash]
|
|
21
21
|
).returns(T.attached_class)
|
|
22
22
|
end
|
|
23
23
|
def self.new(results:)
|
|
@@ -25,7 +25,7 @@ module Courier
|
|
|
25
25
|
|
|
26
26
|
sig do
|
|
27
27
|
override.returns(
|
|
28
|
-
{ results: T::Array[Courier::
|
|
28
|
+
{ results: T::Array[Courier::WorkspacePreferenceGetResponse] }
|
|
29
29
|
)
|
|
30
30
|
end
|
|
31
31
|
def to_hash
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class WorkspacePreferencePublishParams < Courier::Internal::Type::BaseModel
|
|
6
6
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
7
|
include Courier::Internal::Type::RequestParameters
|
|
8
8
|
|
|
9
9
|
OrHash =
|
|
10
10
|
T.type_alias do
|
|
11
11
|
T.any(
|
|
12
|
-
Courier::
|
|
12
|
+
Courier::WorkspacePreferencePublishParams,
|
|
13
13
|
Courier::Internal::AnyHash
|
|
14
14
|
)
|
|
15
15
|
end
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class WorkspacePreferenceReplaceParams < Courier::Models::WorkspacePreferenceReplaceRequest
|
|
6
6
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
7
|
include Courier::Internal::Type::RequestParameters
|
|
8
8
|
|
|
9
9
|
OrHash =
|
|
10
10
|
T.type_alias do
|
|
11
11
|
T.any(
|
|
12
|
-
Courier::
|
|
12
|
+
Courier::WorkspacePreferenceReplaceParams,
|
|
13
13
|
Courier::Internal::AnyHash
|
|
14
14
|
)
|
|
15
15
|
end
|
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class WorkspacePreferenceReplaceRequest < Courier::Internal::Type::BaseModel
|
|
6
6
|
OrHash =
|
|
7
7
|
T.type_alias do
|
|
8
8
|
T.any(
|
|
9
|
-
Courier::
|
|
9
|
+
Courier::WorkspacePreferenceReplaceRequest,
|
|
10
10
|
Courier::Internal::AnyHash
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# Human-readable name for the
|
|
14
|
+
# Human-readable name for the workspace preference.
|
|
15
15
|
sig { returns(String) }
|
|
16
16
|
attr_accessor :name
|
|
17
17
|
|
|
18
|
-
# Whether the
|
|
18
|
+
# Whether the workspace preference defines custom routing for its topics.
|
|
19
19
|
sig { returns(T.nilable(T::Boolean)) }
|
|
20
20
|
attr_accessor :has_custom_routing
|
|
21
21
|
|
|
22
|
-
# Default channels for the
|
|
22
|
+
# Default channels for the workspace preference. Omit to clear.
|
|
23
23
|
sig do
|
|
24
24
|
returns(T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]))
|
|
25
25
|
end
|
|
26
26
|
attr_accessor :routing_options
|
|
27
27
|
|
|
28
|
-
# Request body for replacing a preference
|
|
28
|
+
# Request body for replacing a workspace preference. Full document replacement;
|
|
29
29
|
# missing optional fields are cleared.
|
|
30
30
|
sig do
|
|
31
31
|
params(
|
|
@@ -36,11 +36,11 @@ module Courier
|
|
|
36
36
|
).returns(T.attached_class)
|
|
37
37
|
end
|
|
38
38
|
def self.new(
|
|
39
|
-
# Human-readable name for the
|
|
39
|
+
# Human-readable name for the workspace preference.
|
|
40
40
|
name:,
|
|
41
|
-
# Whether the
|
|
41
|
+
# Whether the workspace preference defines custom routing for its topics.
|
|
42
42
|
has_custom_routing: nil,
|
|
43
|
-
# Default channels for the
|
|
43
|
+
# Default channels for the workspace preference. Omit to clear.
|
|
44
44
|
routing_options: nil
|
|
45
45
|
)
|
|
46
46
|
end
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class WorkspacePreferenceRetrieveParams < Courier::Internal::Type::BaseModel
|
|
6
6
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
7
|
include Courier::Internal::Type::RequestParameters
|
|
8
8
|
|
|
9
9
|
OrHash =
|
|
10
10
|
T.type_alias do
|
|
11
11
|
T.any(
|
|
12
|
-
Courier::
|
|
12
|
+
Courier::WorkspacePreferenceRetrieveParams,
|
|
13
13
|
Courier::Internal::AnyHash
|
|
14
14
|
)
|
|
15
15
|
end
|
|
@@ -2,18 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class WorkspacePreferenceTopicCreateRequest < Courier::Internal::Type::BaseModel
|
|
6
6
|
OrHash =
|
|
7
7
|
T.type_alias do
|
|
8
8
|
T.any(
|
|
9
|
-
Courier::
|
|
9
|
+
Courier::WorkspacePreferenceTopicCreateRequest,
|
|
10
10
|
Courier::Internal::AnyHash
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
# The default subscription status applied when a recipient has not set their own.
|
|
15
15
|
sig do
|
|
16
|
-
returns(
|
|
16
|
+
returns(
|
|
17
|
+
Courier::WorkspacePreferenceTopicCreateRequest::DefaultStatus::OrSymbol
|
|
18
|
+
)
|
|
17
19
|
end
|
|
18
20
|
attr_accessor :default_status
|
|
19
21
|
|
|
@@ -27,7 +29,7 @@ module Courier
|
|
|
27
29
|
returns(
|
|
28
30
|
T.nilable(
|
|
29
31
|
T::Array[
|
|
30
|
-
Courier::
|
|
32
|
+
Courier::WorkspacePreferenceTopicCreateRequest::AllowedPreference::OrSymbol
|
|
31
33
|
]
|
|
32
34
|
)
|
|
33
35
|
)
|
|
@@ -52,12 +54,12 @@ module Courier
|
|
|
52
54
|
sig do
|
|
53
55
|
params(
|
|
54
56
|
default_status:
|
|
55
|
-
Courier::
|
|
57
|
+
Courier::WorkspacePreferenceTopicCreateRequest::DefaultStatus::OrSymbol,
|
|
56
58
|
name: String,
|
|
57
59
|
allowed_preferences:
|
|
58
60
|
T.nilable(
|
|
59
61
|
T::Array[
|
|
60
|
-
Courier::
|
|
62
|
+
Courier::WorkspacePreferenceTopicCreateRequest::AllowedPreference::OrSymbol
|
|
61
63
|
]
|
|
62
64
|
),
|
|
63
65
|
include_unsubscribe_header: T.nilable(T::Boolean),
|
|
@@ -87,12 +89,12 @@ module Courier
|
|
|
87
89
|
override.returns(
|
|
88
90
|
{
|
|
89
91
|
default_status:
|
|
90
|
-
Courier::
|
|
92
|
+
Courier::WorkspacePreferenceTopicCreateRequest::DefaultStatus::OrSymbol,
|
|
91
93
|
name: String,
|
|
92
94
|
allowed_preferences:
|
|
93
95
|
T.nilable(
|
|
94
96
|
T::Array[
|
|
95
|
-
Courier::
|
|
97
|
+
Courier::WorkspacePreferenceTopicCreateRequest::AllowedPreference::OrSymbol
|
|
96
98
|
]
|
|
97
99
|
),
|
|
98
100
|
include_unsubscribe_header: T.nilable(T::Boolean),
|
|
@@ -111,30 +113,33 @@ module Courier
|
|
|
111
113
|
|
|
112
114
|
TaggedSymbol =
|
|
113
115
|
T.type_alias do
|
|
114
|
-
T.all(
|
|
116
|
+
T.all(
|
|
117
|
+
Symbol,
|
|
118
|
+
Courier::WorkspacePreferenceTopicCreateRequest::DefaultStatus
|
|
119
|
+
)
|
|
115
120
|
end
|
|
116
121
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
117
122
|
|
|
118
123
|
OPTED_OUT =
|
|
119
124
|
T.let(
|
|
120
125
|
:OPTED_OUT,
|
|
121
|
-
Courier::
|
|
126
|
+
Courier::WorkspacePreferenceTopicCreateRequest::DefaultStatus::TaggedSymbol
|
|
122
127
|
)
|
|
123
128
|
OPTED_IN =
|
|
124
129
|
T.let(
|
|
125
130
|
:OPTED_IN,
|
|
126
|
-
Courier::
|
|
131
|
+
Courier::WorkspacePreferenceTopicCreateRequest::DefaultStatus::TaggedSymbol
|
|
127
132
|
)
|
|
128
133
|
REQUIRED =
|
|
129
134
|
T.let(
|
|
130
135
|
:REQUIRED,
|
|
131
|
-
Courier::
|
|
136
|
+
Courier::WorkspacePreferenceTopicCreateRequest::DefaultStatus::TaggedSymbol
|
|
132
137
|
)
|
|
133
138
|
|
|
134
139
|
sig do
|
|
135
140
|
override.returns(
|
|
136
141
|
T::Array[
|
|
137
|
-
Courier::
|
|
142
|
+
Courier::WorkspacePreferenceTopicCreateRequest::DefaultStatus::TaggedSymbol
|
|
138
143
|
]
|
|
139
144
|
)
|
|
140
145
|
end
|
|
@@ -150,7 +155,7 @@ module Courier
|
|
|
150
155
|
T.type_alias do
|
|
151
156
|
T.all(
|
|
152
157
|
Symbol,
|
|
153
|
-
Courier::
|
|
158
|
+
Courier::WorkspacePreferenceTopicCreateRequest::AllowedPreference
|
|
154
159
|
)
|
|
155
160
|
end
|
|
156
161
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -158,18 +163,18 @@ module Courier
|
|
|
158
163
|
SNOOZE =
|
|
159
164
|
T.let(
|
|
160
165
|
:snooze,
|
|
161
|
-
Courier::
|
|
166
|
+
Courier::WorkspacePreferenceTopicCreateRequest::AllowedPreference::TaggedSymbol
|
|
162
167
|
)
|
|
163
168
|
CHANNEL_PREFERENCES =
|
|
164
169
|
T.let(
|
|
165
170
|
:channel_preferences,
|
|
166
|
-
Courier::
|
|
171
|
+
Courier::WorkspacePreferenceTopicCreateRequest::AllowedPreference::TaggedSymbol
|
|
167
172
|
)
|
|
168
173
|
|
|
169
174
|
sig do
|
|
170
175
|
override.returns(
|
|
171
176
|
T::Array[
|
|
172
|
-
Courier::
|
|
177
|
+
Courier::WorkspacePreferenceTopicCreateRequest::AllowedPreference::TaggedSymbol
|
|
173
178
|
]
|
|
174
179
|
)
|
|
175
180
|
end
|