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
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class WorkspacePreferenceTopicCreateRequest < Courier::Internal::Type::BaseModel
|
|
6
6
|
# @!attribute default_status
|
|
7
7
|
# The default subscription status applied when a recipient has not set their own.
|
|
8
8
|
#
|
|
9
|
-
# @return [Symbol, Courier::Models::
|
|
10
|
-
required :default_status, enum: -> { Courier::
|
|
9
|
+
# @return [Symbol, Courier::Models::WorkspacePreferenceTopicCreateRequest::DefaultStatus]
|
|
10
|
+
required :default_status, enum: -> { Courier::WorkspacePreferenceTopicCreateRequest::DefaultStatus }
|
|
11
11
|
|
|
12
12
|
# @!attribute name
|
|
13
13
|
# Human-readable name for the preference topic.
|
|
@@ -19,10 +19,10 @@ module Courier
|
|
|
19
19
|
# Preference controls a recipient may customize for this topic. Defaults to empty
|
|
20
20
|
# if omitted.
|
|
21
21
|
#
|
|
22
|
-
# @return [Array<Symbol, Courier::Models::
|
|
22
|
+
# @return [Array<Symbol, Courier::Models::WorkspacePreferenceTopicCreateRequest::AllowedPreference>, nil]
|
|
23
23
|
optional :allowed_preferences,
|
|
24
24
|
-> {
|
|
25
|
-
Courier::Internal::Type::ArrayOf[enum: Courier::
|
|
25
|
+
Courier::Internal::Type::ArrayOf[enum: Courier::WorkspacePreferenceTopicCreateRequest::AllowedPreference]
|
|
26
26
|
},
|
|
27
27
|
nil?: true
|
|
28
28
|
|
|
@@ -48,15 +48,15 @@ module Courier
|
|
|
48
48
|
|
|
49
49
|
# @!method initialize(default_status:, name:, allowed_preferences: nil, include_unsubscribe_header: nil, routing_options: nil, topic_data: nil)
|
|
50
50
|
# Some parameter documentations has been truncated, see
|
|
51
|
-
# {Courier::Models::
|
|
51
|
+
# {Courier::Models::WorkspacePreferenceTopicCreateRequest} for more details.
|
|
52
52
|
#
|
|
53
53
|
# Request body for creating a preference topic.
|
|
54
54
|
#
|
|
55
|
-
# @param default_status [Symbol, Courier::Models::
|
|
55
|
+
# @param default_status [Symbol, Courier::Models::WorkspacePreferenceTopicCreateRequest::DefaultStatus] The default subscription status applied when a recipient has not set their own.
|
|
56
56
|
#
|
|
57
57
|
# @param name [String] Human-readable name for the preference topic.
|
|
58
58
|
#
|
|
59
|
-
# @param allowed_preferences [Array<Symbol, Courier::Models::
|
|
59
|
+
# @param allowed_preferences [Array<Symbol, Courier::Models::WorkspacePreferenceTopicCreateRequest::AllowedPreference>, nil] Preference controls a recipient may customize for this topic. Defaults to empty
|
|
60
60
|
#
|
|
61
61
|
# @param include_unsubscribe_header [Boolean, nil] Whether to include a list-unsubscribe header on emails for this topic.
|
|
62
62
|
#
|
|
@@ -66,7 +66,7 @@ module Courier
|
|
|
66
66
|
|
|
67
67
|
# The default subscription status applied when a recipient has not set their own.
|
|
68
68
|
#
|
|
69
|
-
# @see Courier::Models::
|
|
69
|
+
# @see Courier::Models::WorkspacePreferenceTopicCreateRequest#default_status
|
|
70
70
|
module DefaultStatus
|
|
71
71
|
extend Courier::Internal::Type::Enum
|
|
72
72
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class WorkspacePreferenceTopicGetResponse < Courier::Internal::Type::BaseModel
|
|
6
6
|
# @!attribute id
|
|
7
7
|
# The preference topic id.
|
|
8
8
|
#
|
|
@@ -12,9 +12,9 @@ module Courier
|
|
|
12
12
|
# @!attribute allowed_preferences
|
|
13
13
|
# Preference controls a recipient may customize. May be empty.
|
|
14
14
|
#
|
|
15
|
-
# @return [Array<Symbol, Courier::Models::
|
|
15
|
+
# @return [Array<Symbol, Courier::Models::WorkspacePreferenceTopicGetResponse::AllowedPreference>]
|
|
16
16
|
required :allowed_preferences,
|
|
17
|
-
-> { Courier::Internal::Type::ArrayOf[enum: Courier::
|
|
17
|
+
-> { Courier::Internal::Type::ArrayOf[enum: Courier::WorkspacePreferenceTopicGetResponse::AllowedPreference] }
|
|
18
18
|
|
|
19
19
|
# @!attribute created
|
|
20
20
|
# ISO-8601 timestamp of when the topic was created.
|
|
@@ -25,8 +25,8 @@ module Courier
|
|
|
25
25
|
# @!attribute default_status
|
|
26
26
|
# The default subscription status applied when a recipient has not set their own.
|
|
27
27
|
#
|
|
28
|
-
# @return [Symbol, Courier::Models::
|
|
29
|
-
required :default_status, enum: -> { Courier::
|
|
28
|
+
# @return [Symbol, Courier::Models::WorkspacePreferenceTopicGetResponse::DefaultStatus]
|
|
29
|
+
required :default_status, enum: -> { Courier::WorkspacePreferenceTopicGetResponse::DefaultStatus }
|
|
30
30
|
|
|
31
31
|
# @!attribute include_unsubscribe_header
|
|
32
32
|
# Whether a list-unsubscribe header is included on emails for this topic.
|
|
@@ -75,11 +75,11 @@ module Courier
|
|
|
75
75
|
#
|
|
76
76
|
# @param id [String] The preference topic id.
|
|
77
77
|
#
|
|
78
|
-
# @param allowed_preferences [Array<Symbol, Courier::Models::
|
|
78
|
+
# @param allowed_preferences [Array<Symbol, Courier::Models::WorkspacePreferenceTopicGetResponse::AllowedPreference>] Preference controls a recipient may customize. May be empty.
|
|
79
79
|
#
|
|
80
80
|
# @param created [String] ISO-8601 timestamp of when the topic was created.
|
|
81
81
|
#
|
|
82
|
-
# @param default_status [Symbol, Courier::Models::
|
|
82
|
+
# @param default_status [Symbol, Courier::Models::WorkspacePreferenceTopicGetResponse::DefaultStatus] The default subscription status applied when a recipient has not set their own.
|
|
83
83
|
#
|
|
84
84
|
# @param include_unsubscribe_header [Boolean] Whether a list-unsubscribe header is included on emails for this topic.
|
|
85
85
|
#
|
|
@@ -108,7 +108,7 @@ module Courier
|
|
|
108
108
|
|
|
109
109
|
# The default subscription status applied when a recipient has not set their own.
|
|
110
110
|
#
|
|
111
|
-
# @see Courier::Models::
|
|
111
|
+
# @see Courier::Models::WorkspacePreferenceTopicGetResponse#default_status
|
|
112
112
|
module DefaultStatus
|
|
113
113
|
extend Courier::Internal::Type::Enum
|
|
114
114
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class WorkspacePreferenceTopicListResponse < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute results
|
|
7
|
+
#
|
|
8
|
+
# @return [Array<Courier::Models::WorkspacePreferenceTopicGetResponse>]
|
|
9
|
+
required :results, -> { Courier::Internal::Type::ArrayOf[Courier::WorkspacePreferenceTopicGetResponse] }
|
|
10
|
+
|
|
11
|
+
# @!method initialize(results:)
|
|
12
|
+
# Topics contained in a workspace preference.
|
|
13
|
+
#
|
|
14
|
+
# @param results [Array<Courier::Models::WorkspacePreferenceTopicGetResponse>]
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class WorkspacePreferenceTopicReplaceRequest < Courier::Internal::Type::BaseModel
|
|
6
6
|
# @!attribute default_status
|
|
7
7
|
# The default subscription status applied when a recipient has not set their own.
|
|
8
8
|
#
|
|
9
|
-
# @return [Symbol, Courier::Models::
|
|
10
|
-
required :default_status, enum: -> { Courier::
|
|
9
|
+
# @return [Symbol, Courier::Models::WorkspacePreferenceTopicReplaceRequest::DefaultStatus]
|
|
10
|
+
required :default_status, enum: -> { Courier::WorkspacePreferenceTopicReplaceRequest::DefaultStatus }
|
|
11
11
|
|
|
12
12
|
# @!attribute name
|
|
13
13
|
# Human-readable name for the preference topic.
|
|
@@ -18,10 +18,10 @@ module Courier
|
|
|
18
18
|
# @!attribute allowed_preferences
|
|
19
19
|
# Preference controls a recipient may customize. Omit to clear.
|
|
20
20
|
#
|
|
21
|
-
# @return [Array<Symbol, Courier::Models::
|
|
21
|
+
# @return [Array<Symbol, Courier::Models::WorkspacePreferenceTopicReplaceRequest::AllowedPreference>, nil]
|
|
22
22
|
optional :allowed_preferences,
|
|
23
23
|
-> {
|
|
24
|
-
Courier::Internal::Type::ArrayOf[enum: Courier::
|
|
24
|
+
Courier::Internal::Type::ArrayOf[enum: Courier::WorkspacePreferenceTopicReplaceRequest::AllowedPreference]
|
|
25
25
|
},
|
|
26
26
|
nil?: true
|
|
27
27
|
|
|
@@ -49,11 +49,11 @@ module Courier
|
|
|
49
49
|
# Request body for replacing a preference topic. Full document replacement;
|
|
50
50
|
# missing optional fields are cleared.
|
|
51
51
|
#
|
|
52
|
-
# @param default_status [Symbol, Courier::Models::
|
|
52
|
+
# @param default_status [Symbol, Courier::Models::WorkspacePreferenceTopicReplaceRequest::DefaultStatus] The default subscription status applied when a recipient has not set their own.
|
|
53
53
|
#
|
|
54
54
|
# @param name [String] Human-readable name for the preference topic.
|
|
55
55
|
#
|
|
56
|
-
# @param allowed_preferences [Array<Symbol, Courier::Models::
|
|
56
|
+
# @param allowed_preferences [Array<Symbol, Courier::Models::WorkspacePreferenceTopicReplaceRequest::AllowedPreference>, nil] Preference controls a recipient may customize. Omit to clear.
|
|
57
57
|
#
|
|
58
58
|
# @param include_unsubscribe_header [Boolean, nil] Whether to include a list-unsubscribe header on emails for this topic.
|
|
59
59
|
#
|
|
@@ -63,7 +63,7 @@ module Courier
|
|
|
63
63
|
|
|
64
64
|
# The default subscription status applied when a recipient has not set their own.
|
|
65
65
|
#
|
|
66
|
-
# @see Courier::Models::
|
|
66
|
+
# @see Courier::Models::WorkspacePreferenceTopicReplaceRequest#default_status
|
|
67
67
|
module DefaultStatus
|
|
68
68
|
extend Courier::Internal::Type::Enum
|
|
69
69
|
|
data/lib/courier/models/{preference_sections → workspace_preferences}/topic_archive_params.rb
RENAMED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
module
|
|
6
|
-
# @see Courier::Resources::
|
|
5
|
+
module WorkspacePreferences
|
|
6
|
+
# @see Courier::Resources::WorkspacePreferences::Topics#archive
|
|
7
7
|
class TopicArchiveParams < Courier::Internal::Type::BaseModel
|
|
8
8
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Courier::Internal::Type::RequestParameters
|
data/lib/courier/models/{preference_sections → workspace_preferences}/topic_create_params.rb
RENAMED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
module
|
|
6
|
-
# @see Courier::Resources::
|
|
7
|
-
class TopicCreateParams < Courier::Models::
|
|
5
|
+
module WorkspacePreferences
|
|
6
|
+
# @see Courier::Resources::WorkspacePreferences::Topics#create
|
|
7
|
+
class TopicCreateParams < Courier::Models::WorkspacePreferenceTopicCreateRequest
|
|
8
8
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Courier::Internal::Type::RequestParameters
|
|
10
10
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
module
|
|
6
|
-
# @see Courier::Resources::
|
|
5
|
+
module WorkspacePreferences
|
|
6
|
+
# @see Courier::Resources::WorkspacePreferences::Topics#list
|
|
7
7
|
class TopicListParams < Courier::Internal::Type::BaseModel
|
|
8
8
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Courier::Internal::Type::RequestParameters
|
data/lib/courier/models/{preference_sections → workspace_preferences}/topic_replace_params.rb
RENAMED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
module
|
|
6
|
-
# @see Courier::Resources::
|
|
7
|
-
class TopicReplaceParams < Courier::Models::
|
|
5
|
+
module WorkspacePreferences
|
|
6
|
+
# @see Courier::Resources::WorkspacePreferences::Topics#replace
|
|
7
|
+
class TopicReplaceParams < Courier::Models::WorkspacePreferenceTopicReplaceRequest
|
|
8
8
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Courier::Internal::Type::RequestParameters
|
|
10
10
|
|
data/lib/courier/models/{preference_sections → workspace_preferences}/topic_retrieve_params.rb
RENAMED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
module
|
|
6
|
-
# @see Courier::Resources::
|
|
5
|
+
module WorkspacePreferences
|
|
6
|
+
# @see Courier::Resources::WorkspacePreferences::Topics#retrieve
|
|
7
7
|
class TopicRetrieveParams < Courier::Internal::Type::BaseModel
|
|
8
8
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Courier::Internal::Type::RequestParameters
|
data/lib/courier/models.rb
CHANGED
|
@@ -123,6 +123,10 @@ module Courier
|
|
|
123
123
|
|
|
124
124
|
BulkRunJobParams = Courier::Models::BulkRunJobParams
|
|
125
125
|
|
|
126
|
+
CancelJourneyRequest = Courier::Models::CancelJourneyRequest
|
|
127
|
+
|
|
128
|
+
CancelJourneyResponse = Courier::Models::CancelJourneyResponse
|
|
129
|
+
|
|
126
130
|
Channel = Courier::Models::Channel
|
|
127
131
|
|
|
128
132
|
ChannelClassification = Courier::Models::ChannelClassification
|
|
@@ -207,6 +211,8 @@ module Courier
|
|
|
207
211
|
|
|
208
212
|
JourneyArchiveParams = Courier::Models::JourneyArchiveParams
|
|
209
213
|
|
|
214
|
+
JourneyCancelParams = Courier::Models::JourneyCancelParams
|
|
215
|
+
|
|
210
216
|
# @type [Courier::Internal::Type::Converter]
|
|
211
217
|
JourneyConditionAtom = Courier::Models::JourneyConditionAtom
|
|
212
218
|
|
|
@@ -224,6 +230,10 @@ module Courier
|
|
|
224
230
|
|
|
225
231
|
JourneyExitNode = Courier::Models::JourneyExitNode
|
|
226
232
|
|
|
233
|
+
JourneyExperiment = Courier::Models::JourneyExperiment
|
|
234
|
+
|
|
235
|
+
JourneyExperimentVariant = Courier::Models::JourneyExperimentVariant
|
|
236
|
+
|
|
227
237
|
JourneyFetchGetDeleteNode = Courier::Models::JourneyFetchGetDeleteNode
|
|
228
238
|
|
|
229
239
|
JourneyFetchPostPutNode = Courier::Models::JourneyFetchPostPutNode
|
|
@@ -404,38 +414,8 @@ module Courier
|
|
|
404
414
|
|
|
405
415
|
Preference = Courier::Models::Preference
|
|
406
416
|
|
|
407
|
-
PreferenceSectionArchiveParams = Courier::Models::PreferenceSectionArchiveParams
|
|
408
|
-
|
|
409
|
-
PreferenceSectionCreateParams = Courier::Models::PreferenceSectionCreateParams
|
|
410
|
-
|
|
411
|
-
PreferenceSectionCreateRequest = Courier::Models::PreferenceSectionCreateRequest
|
|
412
|
-
|
|
413
|
-
PreferenceSectionGetResponse = Courier::Models::PreferenceSectionGetResponse
|
|
414
|
-
|
|
415
|
-
PreferenceSectionListParams = Courier::Models::PreferenceSectionListParams
|
|
416
|
-
|
|
417
|
-
PreferenceSectionListResponse = Courier::Models::PreferenceSectionListResponse
|
|
418
|
-
|
|
419
|
-
PreferenceSectionPublishParams = Courier::Models::PreferenceSectionPublishParams
|
|
420
|
-
|
|
421
|
-
PreferenceSectionReplaceParams = Courier::Models::PreferenceSectionReplaceParams
|
|
422
|
-
|
|
423
|
-
PreferenceSectionReplaceRequest = Courier::Models::PreferenceSectionReplaceRequest
|
|
424
|
-
|
|
425
|
-
PreferenceSectionRetrieveParams = Courier::Models::PreferenceSectionRetrieveParams
|
|
426
|
-
|
|
427
|
-
PreferenceSections = Courier::Models::PreferenceSections
|
|
428
|
-
|
|
429
417
|
PreferenceStatus = Courier::Models::PreferenceStatus
|
|
430
418
|
|
|
431
|
-
PreferenceTopicCreateRequest = Courier::Models::PreferenceTopicCreateRequest
|
|
432
|
-
|
|
433
|
-
PreferenceTopicGetResponse = Courier::Models::PreferenceTopicGetResponse
|
|
434
|
-
|
|
435
|
-
PreferenceTopicListResponse = Courier::Models::PreferenceTopicListResponse
|
|
436
|
-
|
|
437
|
-
PreferenceTopicReplaceRequest = Courier::Models::PreferenceTopicReplaceRequest
|
|
438
|
-
|
|
439
419
|
ProfileCreateParams = Courier::Models::ProfileCreateParams
|
|
440
420
|
|
|
441
421
|
ProfileDeleteParams = Courier::Models::ProfileDeleteParams
|
|
@@ -587,4 +567,34 @@ module Courier
|
|
|
587
567
|
WebhookRecipient = Courier::Models::WebhookRecipient
|
|
588
568
|
|
|
589
569
|
WidgetBackground = Courier::Models::WidgetBackground
|
|
570
|
+
|
|
571
|
+
WorkspacePreferenceArchiveParams = Courier::Models::WorkspacePreferenceArchiveParams
|
|
572
|
+
|
|
573
|
+
WorkspacePreferenceCreateParams = Courier::Models::WorkspacePreferenceCreateParams
|
|
574
|
+
|
|
575
|
+
WorkspacePreferenceCreateRequest = Courier::Models::WorkspacePreferenceCreateRequest
|
|
576
|
+
|
|
577
|
+
WorkspacePreferenceGetResponse = Courier::Models::WorkspacePreferenceGetResponse
|
|
578
|
+
|
|
579
|
+
WorkspacePreferenceListParams = Courier::Models::WorkspacePreferenceListParams
|
|
580
|
+
|
|
581
|
+
WorkspacePreferenceListResponse = Courier::Models::WorkspacePreferenceListResponse
|
|
582
|
+
|
|
583
|
+
WorkspacePreferencePublishParams = Courier::Models::WorkspacePreferencePublishParams
|
|
584
|
+
|
|
585
|
+
WorkspacePreferenceReplaceParams = Courier::Models::WorkspacePreferenceReplaceParams
|
|
586
|
+
|
|
587
|
+
WorkspacePreferenceReplaceRequest = Courier::Models::WorkspacePreferenceReplaceRequest
|
|
588
|
+
|
|
589
|
+
WorkspacePreferenceRetrieveParams = Courier::Models::WorkspacePreferenceRetrieveParams
|
|
590
|
+
|
|
591
|
+
WorkspacePreferences = Courier::Models::WorkspacePreferences
|
|
592
|
+
|
|
593
|
+
WorkspacePreferenceTopicCreateRequest = Courier::Models::WorkspacePreferenceTopicCreateRequest
|
|
594
|
+
|
|
595
|
+
WorkspacePreferenceTopicGetResponse = Courier::Models::WorkspacePreferenceTopicGetResponse
|
|
596
|
+
|
|
597
|
+
WorkspacePreferenceTopicListResponse = Courier::Models::WorkspacePreferenceTopicListResponse
|
|
598
|
+
|
|
599
|
+
WorkspacePreferenceTopicReplaceRequest = Courier::Models::WorkspacePreferenceTopicReplaceRequest
|
|
590
600
|
end
|
|
@@ -114,6 +114,36 @@ module Courier
|
|
|
114
114
|
)
|
|
115
115
|
end
|
|
116
116
|
|
|
117
|
+
# Some parameter documentations has been truncated, see
|
|
118
|
+
# {Courier::Models::JourneyCancelParams} for more details.
|
|
119
|
+
#
|
|
120
|
+
# Cancel journey runs. The request body must include EXACTLY ONE of
|
|
121
|
+
# `cancelation_token` (cancels every run associated with the token) or `run_id`
|
|
122
|
+
# (cancels a single tenant-scoped run). Supplying both or neither returns a `400`.
|
|
123
|
+
# A `run_id` that does not match a run for the tenant returns `404`. Cancelation
|
|
124
|
+
# is idempotent: a run that has already finished (`PROCESSED`/`ERROR`) or was
|
|
125
|
+
# already `CANCELED` is left unchanged and its current status is returned.
|
|
126
|
+
#
|
|
127
|
+
# @overload cancel(cancel_journey_request:, request_options: {})
|
|
128
|
+
#
|
|
129
|
+
# @param cancel_journey_request [Courier::Models::CancelJourneyRequest::ByCancelationToken, Courier::Models::CancelJourneyRequest::ByRunID] Request body for `POST /journeys/cancel`. Provide EXACTLY ONE of `cancelation_to
|
|
130
|
+
#
|
|
131
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
132
|
+
#
|
|
133
|
+
# @return [Courier::Models::CancelJourneyResponse::TokenBranch, Courier::Models::CancelJourneyResponse::RunIDBranch]
|
|
134
|
+
#
|
|
135
|
+
# @see Courier::Models::JourneyCancelParams
|
|
136
|
+
def cancel(params)
|
|
137
|
+
parsed, options = Courier::JourneyCancelParams.dump_request(params)
|
|
138
|
+
@client.request(
|
|
139
|
+
method: :post,
|
|
140
|
+
path: "journeys/cancel",
|
|
141
|
+
body: parsed[:cancel_journey_request],
|
|
142
|
+
model: Courier::CancelJourneyResponse,
|
|
143
|
+
options: options
|
|
144
|
+
)
|
|
145
|
+
end
|
|
146
|
+
|
|
117
147
|
# Some parameter documentations has been truncated, see
|
|
118
148
|
# {Courier::Models::JourneyInvokeParams} for more details.
|
|
119
149
|
#
|
|
@@ -4,7 +4,7 @@ module Courier
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Notifications
|
|
6
6
|
class Checks
|
|
7
|
-
# Replace the checks for a notification template
|
|
7
|
+
# Replace the submission checks for a notification template.
|
|
8
8
|
#
|
|
9
9
|
# @overload update(submission_id, id:, checks:, request_options: {})
|
|
10
10
|
#
|
|
@@ -34,7 +34,7 @@ module Courier
|
|
|
34
34
|
)
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
# Retrieve the checks for a notification template
|
|
37
|
+
# Retrieve the submission checks for a notification template.
|
|
38
38
|
#
|
|
39
39
|
# @overload list(submission_id, id:, request_options: {})
|
|
40
40
|
#
|
|
@@ -61,7 +61,7 @@ module Courier
|
|
|
61
61
|
)
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
-
# Cancel a notification template
|
|
64
|
+
# Cancel a submission for a notification template.
|
|
65
65
|
#
|
|
66
66
|
# @overload delete(submission_id, id:, request_options: {})
|
|
67
67
|
#
|
|
@@ -2,23 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Resources
|
|
5
|
-
class
|
|
5
|
+
class WorkspacePreferences
|
|
6
6
|
class Topics
|
|
7
7
|
# Some parameter documentations has been truncated, see
|
|
8
|
-
# {Courier::Models::
|
|
8
|
+
# {Courier::Models::WorkspacePreferences::TopicCreateParams} for more details.
|
|
9
9
|
#
|
|
10
|
-
# Create a subscription preference topic inside a
|
|
11
|
-
#
|
|
10
|
+
# Create a subscription preference topic inside a workspace preference. Fails with
|
|
11
|
+
# 404 if the workspace preference does not exist. The topic id is generated and
|
|
12
|
+
# returned.
|
|
12
13
|
#
|
|
13
14
|
# @overload create(section_id, default_status:, name:, allowed_preferences: nil, include_unsubscribe_header: nil, routing_options: nil, topic_data: nil, request_options: {})
|
|
14
15
|
#
|
|
15
|
-
# @param section_id [String] Id of the preference
|
|
16
|
+
# @param section_id [String] Id of the workspace preference to create the topic in.
|
|
16
17
|
#
|
|
17
|
-
# @param default_status [Symbol, Courier::Models::
|
|
18
|
+
# @param default_status [Symbol, Courier::Models::WorkspacePreferenceTopicCreateRequest::DefaultStatus] The default subscription status applied when a recipient has not set their own.
|
|
18
19
|
#
|
|
19
20
|
# @param name [String] Human-readable name for the preference topic.
|
|
20
21
|
#
|
|
21
|
-
# @param allowed_preferences [Array<Symbol, Courier::Models::
|
|
22
|
+
# @param allowed_preferences [Array<Symbol, Courier::Models::WorkspacePreferenceTopicCreateRequest::AllowedPreference>, nil] Preference controls a recipient may customize for this topic. Defaults to empty
|
|
22
23
|
#
|
|
23
24
|
# @param include_unsubscribe_header [Boolean, nil] Whether to include a list-unsubscribe header on emails for this topic.
|
|
24
25
|
#
|
|
@@ -28,36 +29,37 @@ module Courier
|
|
|
28
29
|
#
|
|
29
30
|
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
30
31
|
#
|
|
31
|
-
# @return [Courier::Models::
|
|
32
|
+
# @return [Courier::Models::WorkspacePreferenceTopicGetResponse]
|
|
32
33
|
#
|
|
33
|
-
# @see Courier::Models::
|
|
34
|
+
# @see Courier::Models::WorkspacePreferences::TopicCreateParams
|
|
34
35
|
def create(section_id, params)
|
|
35
|
-
parsed, options = Courier::
|
|
36
|
+
parsed, options = Courier::WorkspacePreferences::TopicCreateParams.dump_request(params)
|
|
36
37
|
@client.request(
|
|
37
38
|
method: :post,
|
|
38
39
|
path: ["preferences/sections/%1$s/topics", section_id],
|
|
39
40
|
body: parsed,
|
|
40
|
-
model: Courier::
|
|
41
|
+
model: Courier::WorkspacePreferenceTopicGetResponse,
|
|
41
42
|
options: options
|
|
42
43
|
)
|
|
43
44
|
end
|
|
44
45
|
|
|
45
|
-
# Retrieve a topic within a
|
|
46
|
-
# the topic does not exist, or the topic belongs to a
|
|
46
|
+
# Retrieve a topic within a workspace preference. Returns 404 if the workspace
|
|
47
|
+
# preference does not exist, the topic does not exist, or the topic belongs to a
|
|
48
|
+
# different workspace preference.
|
|
47
49
|
#
|
|
48
50
|
# @overload retrieve(topic_id, section_id:, request_options: {})
|
|
49
51
|
#
|
|
50
52
|
# @param topic_id [String] Id of the subscription preference topic.
|
|
51
53
|
#
|
|
52
|
-
# @param section_id [String] Id of the preference
|
|
54
|
+
# @param section_id [String] Id of the workspace preference.
|
|
53
55
|
#
|
|
54
56
|
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
55
57
|
#
|
|
56
|
-
# @return [Courier::Models::
|
|
58
|
+
# @return [Courier::Models::WorkspacePreferenceTopicGetResponse]
|
|
57
59
|
#
|
|
58
|
-
# @see Courier::Models::
|
|
60
|
+
# @see Courier::Models::WorkspacePreferences::TopicRetrieveParams
|
|
59
61
|
def retrieve(topic_id, params)
|
|
60
|
-
parsed, options = Courier::
|
|
62
|
+
parsed, options = Courier::WorkspacePreferences::TopicRetrieveParams.dump_request(params)
|
|
61
63
|
section_id =
|
|
62
64
|
parsed.delete(:section_id) do
|
|
63
65
|
raise ArgumentError.new("missing required path argument #{_1}")
|
|
@@ -65,46 +67,47 @@ module Courier
|
|
|
65
67
|
@client.request(
|
|
66
68
|
method: :get,
|
|
67
69
|
path: ["preferences/sections/%1$s/topics/%2$s", section_id, topic_id],
|
|
68
|
-
model: Courier::
|
|
70
|
+
model: Courier::WorkspacePreferenceTopicGetResponse,
|
|
69
71
|
options: options
|
|
70
72
|
)
|
|
71
73
|
end
|
|
72
74
|
|
|
73
|
-
# List the topics in a preference
|
|
75
|
+
# List the topics in a workspace preference.
|
|
74
76
|
#
|
|
75
77
|
# @overload list(section_id, request_options: {})
|
|
76
78
|
#
|
|
77
|
-
# @param section_id [String] Id of the preference
|
|
79
|
+
# @param section_id [String] Id of the workspace preference.
|
|
78
80
|
#
|
|
79
81
|
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
80
82
|
#
|
|
81
|
-
# @return [Courier::Models::
|
|
83
|
+
# @return [Courier::Models::WorkspacePreferenceTopicListResponse]
|
|
82
84
|
#
|
|
83
|
-
# @see Courier::Models::
|
|
85
|
+
# @see Courier::Models::WorkspacePreferences::TopicListParams
|
|
84
86
|
def list(section_id, params = {})
|
|
85
87
|
@client.request(
|
|
86
88
|
method: :get,
|
|
87
89
|
path: ["preferences/sections/%1$s/topics", section_id],
|
|
88
|
-
model: Courier::
|
|
90
|
+
model: Courier::WorkspacePreferenceTopicListResponse,
|
|
89
91
|
options: params[:request_options]
|
|
90
92
|
)
|
|
91
93
|
end
|
|
92
94
|
|
|
93
|
-
# Archive a topic and remove it from its
|
|
95
|
+
# Archive a topic and remove it from its workspace preference. Same 404 rules as
|
|
96
|
+
# GET.
|
|
94
97
|
#
|
|
95
98
|
# @overload archive(topic_id, section_id:, request_options: {})
|
|
96
99
|
#
|
|
97
100
|
# @param topic_id [String] Id of the subscription preference topic.
|
|
98
101
|
#
|
|
99
|
-
# @param section_id [String] Id of the preference
|
|
102
|
+
# @param section_id [String] Id of the workspace preference.
|
|
100
103
|
#
|
|
101
104
|
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
102
105
|
#
|
|
103
106
|
# @return [nil]
|
|
104
107
|
#
|
|
105
|
-
# @see Courier::Models::
|
|
108
|
+
# @see Courier::Models::WorkspacePreferences::TopicArchiveParams
|
|
106
109
|
def archive(topic_id, params)
|
|
107
|
-
parsed, options = Courier::
|
|
110
|
+
parsed, options = Courier::WorkspacePreferences::TopicArchiveParams.dump_request(params)
|
|
108
111
|
section_id =
|
|
109
112
|
parsed.delete(:section_id) do
|
|
110
113
|
raise ArgumentError.new("missing required path argument #{_1}")
|
|
@@ -118,22 +121,22 @@ module Courier
|
|
|
118
121
|
end
|
|
119
122
|
|
|
120
123
|
# Some parameter documentations has been truncated, see
|
|
121
|
-
# {Courier::Models::
|
|
124
|
+
# {Courier::Models::WorkspacePreferences::TopicReplaceParams} for more details.
|
|
122
125
|
#
|
|
123
|
-
# Replace a topic within a
|
|
124
|
-
# fields are cleared. Same 404 rules as GET.
|
|
126
|
+
# Replace a topic within a workspace preference. Full document replacement;
|
|
127
|
+
# missing optional fields are cleared. Same 404 rules as GET.
|
|
125
128
|
#
|
|
126
129
|
# @overload replace(topic_id, section_id:, default_status:, name:, allowed_preferences: nil, include_unsubscribe_header: nil, routing_options: nil, topic_data: nil, request_options: {})
|
|
127
130
|
#
|
|
128
131
|
# @param topic_id [String] Path param: Id of the subscription preference topic.
|
|
129
132
|
#
|
|
130
|
-
# @param section_id [String] Path param: Id of the preference
|
|
133
|
+
# @param section_id [String] Path param: Id of the workspace preference.
|
|
131
134
|
#
|
|
132
|
-
# @param default_status [Symbol, Courier::Models::
|
|
135
|
+
# @param default_status [Symbol, Courier::Models::WorkspacePreferenceTopicReplaceRequest::DefaultStatus] Body param: The default subscription status applied when a recipient has not set
|
|
133
136
|
#
|
|
134
137
|
# @param name [String] Body param: Human-readable name for the preference topic.
|
|
135
138
|
#
|
|
136
|
-
# @param allowed_preferences [Array<Symbol, Courier::Models::
|
|
139
|
+
# @param allowed_preferences [Array<Symbol, Courier::Models::WorkspacePreferenceTopicReplaceRequest::AllowedPreference>, nil] Body param: Preference controls a recipient may customize. Omit to clear.
|
|
137
140
|
#
|
|
138
141
|
# @param include_unsubscribe_header [Boolean, nil] Body param: Whether to include a list-unsubscribe header on emails for this topi
|
|
139
142
|
#
|
|
@@ -143,11 +146,11 @@ module Courier
|
|
|
143
146
|
#
|
|
144
147
|
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
145
148
|
#
|
|
146
|
-
# @return [Courier::Models::
|
|
149
|
+
# @return [Courier::Models::WorkspacePreferenceTopicGetResponse]
|
|
147
150
|
#
|
|
148
|
-
# @see Courier::Models::
|
|
151
|
+
# @see Courier::Models::WorkspacePreferences::TopicReplaceParams
|
|
149
152
|
def replace(topic_id, params)
|
|
150
|
-
parsed, options = Courier::
|
|
153
|
+
parsed, options = Courier::WorkspacePreferences::TopicReplaceParams.dump_request(params)
|
|
151
154
|
section_id =
|
|
152
155
|
parsed.delete(:section_id) do
|
|
153
156
|
raise ArgumentError.new("missing required path argument #{_1}")
|
|
@@ -156,7 +159,7 @@ module Courier
|
|
|
156
159
|
method: :put,
|
|
157
160
|
path: ["preferences/sections/%1$s/topics/%2$s", section_id, topic_id],
|
|
158
161
|
body: parsed,
|
|
159
|
-
model: Courier::
|
|
162
|
+
model: Courier::WorkspacePreferenceTopicGetResponse,
|
|
160
163
|
options: options
|
|
161
164
|
)
|
|
162
165
|
end
|