trycourier 4.10.2 → 4.12.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 +30 -0
- data/lib/courier/client.rb +15 -1
- data/lib/courier/internal/transport/base_client.rb +2 -0
- data/lib/courier/models/brand_create_params.rb +7 -7
- data/lib/courier/models/create_journey_request.rb +39 -0
- data/lib/courier/models/journey_ai_node.rb +77 -0
- data/lib/courier/models/journey_api_invoke_trigger_node.rb +73 -0
- data/lib/courier/models/journey_archive_params.rb +20 -0
- data/lib/courier/models/journey_condition_atom.rb +8 -0
- data/lib/courier/models/journey_condition_group.rb +26 -0
- data/lib/courier/models/journey_condition_nested_group.rb +24 -0
- data/lib/courier/models/journey_conditions_field.rb +37 -0
- data/lib/courier/models/journey_create_params.rb +14 -0
- data/lib/courier/models/journey_delay_duration_node.rb +71 -0
- data/lib/courier/models/journey_delay_until_node.rb +71 -0
- data/lib/courier/models/journey_exit_node.rb +33 -0
- data/lib/courier/models/journey_fetch_get_delete_node.rb +103 -0
- data/lib/courier/models/journey_fetch_post_put_node.rb +110 -0
- data/lib/courier/models/journey_list_versions_params.rb +20 -0
- data/lib/courier/models/journey_merge_strategy.rb +18 -0
- data/lib/courier/models/journey_node.rb +295 -0
- data/lib/courier/models/journey_publish_params.rb +20 -0
- data/lib/courier/models/journey_publish_request.rb +18 -0
- data/lib/courier/models/journey_replace_params.rb +20 -0
- data/lib/courier/models/journey_response.rb +82 -0
- data/lib/courier/models/journey_retrieve_params.rb +29 -0
- data/lib/courier/models/journey_segment_trigger_node.rb +90 -0
- data/lib/courier/models/journey_send_node.rb +124 -0
- data/lib/courier/models/journey_state.rb +16 -0
- data/lib/courier/models/journey_template_create_request.rb +138 -0
- data/lib/courier/models/journey_template_get_response.rb +154 -0
- data/lib/courier/models/journey_template_list_response.rb +23 -0
- data/lib/courier/models/journey_template_publish_request.rb +18 -0
- data/lib/courier/models/journey_template_replace_request.rb +126 -0
- data/lib/courier/models/journey_template_summary.rb +60 -0
- data/lib/courier/models/journey_throttle_dynamic_node.rb +86 -0
- data/lib/courier/models/journey_throttle_static_node.rb +80 -0
- data/lib/courier/models/journey_version_item.rb +41 -0
- data/lib/courier/models/journey_versions_list_response.rb +24 -0
- data/lib/courier/models/journeys/template_archive_params.rb +28 -0
- data/lib/courier/models/journeys/template_create_params.rb +22 -0
- data/lib/courier/models/journeys/template_list_params.rb +39 -0
- data/lib/courier/models/journeys/template_list_versions_params.rb +28 -0
- data/lib/courier/models/journeys/template_publish_params.rb +28 -0
- data/lib/courier/models/journeys/template_replace_params.rb +28 -0
- data/lib/courier/models/journeys/template_retrieve_params.rb +28 -0
- data/lib/courier/models/tenants/template_delete_params.rb +28 -0
- data/lib/courier/models.rb +73 -0
- data/lib/courier/resources/brands.rb +4 -3
- data/lib/courier/resources/journeys/templates.rb +224 -0
- data/lib/courier/resources/journeys.rb +167 -2
- data/lib/courier/resources/tenants/templates.rb +32 -0
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +44 -0
- data/rbi/courier/models/brand_create_params.rbi +8 -8
- data/rbi/courier/models/create_journey_request.rbi +116 -0
- data/rbi/courier/models/journey_ai_node.rbi +141 -0
- data/rbi/courier/models/journey_api_invoke_trigger_node.rbi +164 -0
- data/rbi/courier/models/journey_archive_params.rbi +35 -0
- data/rbi/courier/models/journey_condition_atom.rbi +11 -0
- data/rbi/courier/models/journey_condition_group.rbi +43 -0
- data/rbi/courier/models/journey_condition_nested_group.rbi +51 -0
- data/rbi/courier/models/journey_conditions_field.rbi +27 -0
- data/rbi/courier/models/journey_create_params.rbi +27 -0
- data/rbi/courier/models/journey_delay_duration_node.rbi +146 -0
- data/rbi/courier/models/journey_delay_until_node.rbi +139 -0
- data/rbi/courier/models/journey_exit_node.rbi +57 -0
- data/rbi/courier/models/journey_fetch_get_delete_node.rbi +186 -0
- data/rbi/courier/models/journey_fetch_post_put_node.rbi +190 -0
- data/rbi/courier/models/journey_list_versions_params.rbi +35 -0
- data/rbi/courier/models/journey_merge_strategy.rbi +26 -0
- data/rbi/courier/models/journey_node.rbi +542 -0
- data/rbi/courier/models/journey_publish_params.rbi +35 -0
- data/rbi/courier/models/journey_publish_request.rbi +28 -0
- data/rbi/courier/models/journey_replace_params.rbi +35 -0
- data/rbi/courier/models/journey_response.rbi +109 -0
- data/rbi/courier/models/journey_retrieve_params.rbi +52 -0
- data/rbi/courier/models/journey_segment_trigger_node.rbi +200 -0
- data/rbi/courier/models/journey_send_node.rbi +254 -0
- data/rbi/courier/models/journey_state.rbi +20 -0
- data/rbi/courier/models/journey_template_create_request.rbi +381 -0
- data/rbi/courier/models/journey_template_get_response.rbi +334 -0
- data/rbi/courier/models/journey_template_list_response.rbi +45 -0
- data/rbi/courier/models/journey_template_publish_request.rbi +31 -0
- data/rbi/courier/models/journey_template_replace_request.rbi +368 -0
- data/rbi/courier/models/journey_template_summary.rbi +85 -0
- data/rbi/courier/models/journey_throttle_dynamic_node.rbi +162 -0
- data/rbi/courier/models/journey_throttle_static_node.rbi +158 -0
- data/rbi/courier/models/journey_version_item.rbi +54 -0
- data/rbi/courier/models/journey_versions_list_response.rbi +45 -0
- data/rbi/courier/models/journeys/template_archive_params.rbi +48 -0
- data/rbi/courier/models/journeys/template_create_params.rbi +40 -0
- data/rbi/courier/models/journeys/template_list_params.rbi +68 -0
- data/rbi/courier/models/journeys/template_list_versions_params.rbi +48 -0
- data/rbi/courier/models/journeys/template_publish_params.rbi +48 -0
- data/rbi/courier/models/journeys/template_replace_params.rbi +48 -0
- data/rbi/courier/models/journeys/template_retrieve_params.rbi +48 -0
- data/rbi/courier/models/tenants/template_delete_params.rbi +48 -0
- data/rbi/courier/models.rbi +76 -0
- data/rbi/courier/resources/brands.rbi +4 -9
- data/rbi/courier/resources/journeys/templates.rbi +160 -0
- data/rbi/courier/resources/journeys.rbi +158 -3
- data/rbi/courier/resources/tenants/templates.rbi +22 -0
- data/sig/courier/models/brand_create_params.rbs +5 -5
- data/sig/courier/models/create_journey_request.rbs +41 -0
- data/sig/courier/models/journey_ai_node.rbs +72 -0
- data/sig/courier/models/journey_api_invoke_trigger_node.rbs +68 -0
- data/sig/courier/models/journey_archive_params.rbs +23 -0
- data/sig/courier/models/journey_condition_atom.rbs +7 -0
- data/sig/courier/models/journey_condition_group.rbs +33 -0
- data/sig/courier/models/journey_condition_nested_group.rbs +33 -0
- data/sig/courier/models/journey_conditions_field.rbs +14 -0
- data/sig/courier/models/journey_create_params.rbs +15 -0
- data/sig/courier/models/journey_delay_duration_node.rbs +66 -0
- data/sig/courier/models/journey_delay_until_node.rbs +66 -0
- data/sig/courier/models/journey_exit_node.rbs +34 -0
- data/sig/courier/models/journey_fetch_get_delete_node.rbs +93 -0
- data/sig/courier/models/journey_fetch_post_put_node.rbs +100 -0
- data/sig/courier/models/journey_list_versions_params.rbs +23 -0
- data/sig/courier/models/journey_merge_strategy.rbs +16 -0
- data/sig/courier/models/journey_node.rbs +247 -0
- data/sig/courier/models/journey_publish_params.rbs +25 -0
- data/sig/courier/models/journey_publish_request.rbs +15 -0
- data/sig/courier/models/journey_replace_params.rbs +25 -0
- data/sig/courier/models/journey_response.rbs +65 -0
- data/sig/courier/models/journey_retrieve_params.rbs +30 -0
- data/sig/courier/models/journey_segment_trigger_node.rbs +85 -0
- data/sig/courier/models/journey_send_node.rbs +140 -0
- data/sig/courier/models/journey_state.rbs +14 -0
- data/sig/courier/models/journey_template_create_request.rbs +148 -0
- data/sig/courier/models/journey_template_get_response.rbs +157 -0
- data/sig/courier/models/journey_template_list_response.rbs +25 -0
- data/sig/courier/models/journey_template_publish_request.rbs +15 -0
- data/sig/courier/models/journey_template_replace_request.rbs +136 -0
- data/sig/courier/models/journey_template_summary.rbs +59 -0
- data/sig/courier/models/journey_throttle_dynamic_node.rbs +76 -0
- data/sig/courier/models/journey_throttle_static_node.rbs +72 -0
- data/sig/courier/models/journey_version_item.rbs +40 -0
- data/sig/courier/models/journey_versions_list_response.rbs +22 -0
- data/sig/courier/models/journeys/template_archive_params.rbs +30 -0
- data/sig/courier/models/journeys/template_create_params.rbs +27 -0
- data/sig/courier/models/journeys/template_list_params.rbs +38 -0
- data/sig/courier/models/journeys/template_list_versions_params.rbs +30 -0
- data/sig/courier/models/journeys/template_publish_params.rbs +34 -0
- data/sig/courier/models/journeys/template_replace_params.rbs +34 -0
- data/sig/courier/models/journeys/template_retrieve_params.rbs +30 -0
- data/sig/courier/models/tenants/template_delete_params.rbs +30 -0
- data/sig/courier/models.rbs +72 -0
- data/sig/courier/resources/brands.rbs +1 -1
- data/sig/courier/resources/journeys/templates.rbs +58 -0
- data/sig/courier/resources/journeys.rbs +41 -0
- data/sig/courier/resources/tenants/templates.rbs +6 -0
- metadata +134 -2
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class JourneyTemplateReplaceRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute notification
|
|
7
|
+
#
|
|
8
|
+
# @return [Courier::Models::JourneyTemplateReplaceRequest::Notification]
|
|
9
|
+
required :notification, -> { Courier::JourneyTemplateReplaceRequest::Notification }
|
|
10
|
+
|
|
11
|
+
# @!attribute state
|
|
12
|
+
#
|
|
13
|
+
# @return [String, nil]
|
|
14
|
+
optional :state, String
|
|
15
|
+
|
|
16
|
+
# @!method initialize(notification:, state: nil)
|
|
17
|
+
# Request body for replacing a journey-scoped notification template draft.
|
|
18
|
+
#
|
|
19
|
+
# @param notification [Courier::Models::JourneyTemplateReplaceRequest::Notification]
|
|
20
|
+
# @param state [String]
|
|
21
|
+
|
|
22
|
+
# @see Courier::Models::JourneyTemplateReplaceRequest#notification
|
|
23
|
+
class Notification < Courier::Internal::Type::BaseModel
|
|
24
|
+
# @!attribute brand
|
|
25
|
+
#
|
|
26
|
+
# @return [Courier::Models::JourneyTemplateReplaceRequest::Notification::Brand, nil]
|
|
27
|
+
required :brand, -> { Courier::JourneyTemplateReplaceRequest::Notification::Brand }, nil?: true
|
|
28
|
+
|
|
29
|
+
# @!attribute content
|
|
30
|
+
#
|
|
31
|
+
# @return [Courier::Models::JourneyTemplateReplaceRequest::Notification::Content]
|
|
32
|
+
required :content, -> { Courier::JourneyTemplateReplaceRequest::Notification::Content }
|
|
33
|
+
|
|
34
|
+
# @!attribute name
|
|
35
|
+
#
|
|
36
|
+
# @return [String]
|
|
37
|
+
required :name, String
|
|
38
|
+
|
|
39
|
+
# @!attribute subscription
|
|
40
|
+
#
|
|
41
|
+
# @return [Courier::Models::JourneyTemplateReplaceRequest::Notification::Subscription, nil]
|
|
42
|
+
required :subscription,
|
|
43
|
+
-> { Courier::JourneyTemplateReplaceRequest::Notification::Subscription },
|
|
44
|
+
nil?: true
|
|
45
|
+
|
|
46
|
+
# @!attribute tags
|
|
47
|
+
#
|
|
48
|
+
# @return [Array<String>]
|
|
49
|
+
required :tags, Courier::Internal::Type::ArrayOf[String]
|
|
50
|
+
|
|
51
|
+
# @!method initialize(brand:, content:, name:, subscription:, tags:)
|
|
52
|
+
# @param brand [Courier::Models::JourneyTemplateReplaceRequest::Notification::Brand, nil]
|
|
53
|
+
# @param content [Courier::Models::JourneyTemplateReplaceRequest::Notification::Content]
|
|
54
|
+
# @param name [String]
|
|
55
|
+
# @param subscription [Courier::Models::JourneyTemplateReplaceRequest::Notification::Subscription, nil]
|
|
56
|
+
# @param tags [Array<String>]
|
|
57
|
+
|
|
58
|
+
# @see Courier::Models::JourneyTemplateReplaceRequest::Notification#brand
|
|
59
|
+
class Brand < Courier::Internal::Type::BaseModel
|
|
60
|
+
# @!attribute id
|
|
61
|
+
#
|
|
62
|
+
# @return [String]
|
|
63
|
+
required :id, String
|
|
64
|
+
|
|
65
|
+
# @!method initialize(id:)
|
|
66
|
+
# @param id [String]
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# @see Courier::Models::JourneyTemplateReplaceRequest::Notification#content
|
|
70
|
+
class Content < Courier::Internal::Type::BaseModel
|
|
71
|
+
# @!attribute elements
|
|
72
|
+
#
|
|
73
|
+
# @return [Array<Courier::Models::ElementalTextNodeWithType, Courier::Models::ElementalMetaNodeWithType, Courier::Models::ElementalChannelNodeWithType, Courier::Models::ElementalImageNodeWithType, Courier::Models::ElementalActionNodeWithType, Courier::Models::ElementalDividerNodeWithType, Courier::Models::ElementalQuoteNodeWithType, Courier::Models::ElementalHTMLNodeWithType>]
|
|
74
|
+
required :elements, -> { Courier::Internal::Type::ArrayOf[union: Courier::ElementalNode] }
|
|
75
|
+
|
|
76
|
+
# @!attribute version
|
|
77
|
+
#
|
|
78
|
+
# @return [Symbol, Courier::Models::JourneyTemplateReplaceRequest::Notification::Content::Version]
|
|
79
|
+
required :version, enum: -> { Courier::JourneyTemplateReplaceRequest::Notification::Content::Version }
|
|
80
|
+
|
|
81
|
+
# @!attribute scope
|
|
82
|
+
#
|
|
83
|
+
# @return [Symbol, Courier::Models::JourneyTemplateReplaceRequest::Notification::Content::Scope, nil]
|
|
84
|
+
optional :scope, enum: -> { Courier::JourneyTemplateReplaceRequest::Notification::Content::Scope }
|
|
85
|
+
|
|
86
|
+
# @!method initialize(elements:, version:, scope: nil)
|
|
87
|
+
# @param elements [Array<Courier::Models::ElementalTextNodeWithType, Courier::Models::ElementalMetaNodeWithType, Courier::Models::ElementalChannelNodeWithType, Courier::Models::ElementalImageNodeWithType, Courier::Models::ElementalActionNodeWithType, Courier::Models::ElementalDividerNodeWithType, Courier::Models::ElementalQuoteNodeWithType, Courier::Models::ElementalHTMLNodeWithType>]
|
|
88
|
+
# @param version [Symbol, Courier::Models::JourneyTemplateReplaceRequest::Notification::Content::Version]
|
|
89
|
+
# @param scope [Symbol, Courier::Models::JourneyTemplateReplaceRequest::Notification::Content::Scope]
|
|
90
|
+
|
|
91
|
+
# @see Courier::Models::JourneyTemplateReplaceRequest::Notification::Content#version
|
|
92
|
+
module Version
|
|
93
|
+
extend Courier::Internal::Type::Enum
|
|
94
|
+
|
|
95
|
+
VERSION_2022_01_01 = :"2022-01-01"
|
|
96
|
+
|
|
97
|
+
# @!method self.values
|
|
98
|
+
# @return [Array<Symbol>]
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# @see Courier::Models::JourneyTemplateReplaceRequest::Notification::Content#scope
|
|
102
|
+
module Scope
|
|
103
|
+
extend Courier::Internal::Type::Enum
|
|
104
|
+
|
|
105
|
+
DEFAULT = :default
|
|
106
|
+
STRICT = :strict
|
|
107
|
+
|
|
108
|
+
# @!method self.values
|
|
109
|
+
# @return [Array<Symbol>]
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# @see Courier::Models::JourneyTemplateReplaceRequest::Notification#subscription
|
|
114
|
+
class Subscription < Courier::Internal::Type::BaseModel
|
|
115
|
+
# @!attribute topic_id
|
|
116
|
+
#
|
|
117
|
+
# @return [String]
|
|
118
|
+
required :topic_id, String
|
|
119
|
+
|
|
120
|
+
# @!method initialize(topic_id:)
|
|
121
|
+
# @param topic_id [String]
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
end
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class JourneyTemplateSummary < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute id
|
|
7
|
+
#
|
|
8
|
+
# @return [String]
|
|
9
|
+
required :id, String
|
|
10
|
+
|
|
11
|
+
# @!attribute created
|
|
12
|
+
#
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
required :created, Integer
|
|
15
|
+
|
|
16
|
+
# @!attribute creator
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :creator, String
|
|
20
|
+
|
|
21
|
+
# @!attribute name
|
|
22
|
+
#
|
|
23
|
+
# @return [String]
|
|
24
|
+
required :name, String
|
|
25
|
+
|
|
26
|
+
# @!attribute state
|
|
27
|
+
#
|
|
28
|
+
# @return [String]
|
|
29
|
+
required :state, String
|
|
30
|
+
|
|
31
|
+
# @!attribute tags
|
|
32
|
+
#
|
|
33
|
+
# @return [Array<String>]
|
|
34
|
+
required :tags, Courier::Internal::Type::ArrayOf[String]
|
|
35
|
+
|
|
36
|
+
# @!attribute updated
|
|
37
|
+
#
|
|
38
|
+
# @return [Integer, nil]
|
|
39
|
+
optional :updated, Integer
|
|
40
|
+
|
|
41
|
+
# @!attribute updater
|
|
42
|
+
#
|
|
43
|
+
# @return [String, nil]
|
|
44
|
+
optional :updater, String
|
|
45
|
+
|
|
46
|
+
# @!method initialize(id:, created:, creator:, name:, state:, tags:, updated: nil, updater: nil)
|
|
47
|
+
# Summary fields of a journey-scoped notification template returned in list
|
|
48
|
+
# responses.
|
|
49
|
+
#
|
|
50
|
+
# @param id [String]
|
|
51
|
+
# @param created [Integer]
|
|
52
|
+
# @param creator [String]
|
|
53
|
+
# @param name [String]
|
|
54
|
+
# @param state [String]
|
|
55
|
+
# @param tags [Array<String>]
|
|
56
|
+
# @param updated [Integer]
|
|
57
|
+
# @param updater [String]
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class JourneyThrottleDynamicNode < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute max_allowed
|
|
7
|
+
#
|
|
8
|
+
# @return [Integer]
|
|
9
|
+
required :max_allowed, Integer
|
|
10
|
+
|
|
11
|
+
# @!attribute period
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :period, String
|
|
15
|
+
|
|
16
|
+
# @!attribute scope
|
|
17
|
+
#
|
|
18
|
+
# @return [Symbol, Courier::Models::JourneyThrottleDynamicNode::Scope]
|
|
19
|
+
required :scope, enum: -> { Courier::JourneyThrottleDynamicNode::Scope }
|
|
20
|
+
|
|
21
|
+
# @!attribute throttle_key
|
|
22
|
+
#
|
|
23
|
+
# @return [String]
|
|
24
|
+
required :throttle_key, String
|
|
25
|
+
|
|
26
|
+
# @!attribute type
|
|
27
|
+
#
|
|
28
|
+
# @return [Symbol, Courier::Models::JourneyThrottleDynamicNode::Type]
|
|
29
|
+
required :type, enum: -> { Courier::JourneyThrottleDynamicNode::Type }
|
|
30
|
+
|
|
31
|
+
# @!attribute id
|
|
32
|
+
#
|
|
33
|
+
# @return [String, nil]
|
|
34
|
+
optional :id, String
|
|
35
|
+
|
|
36
|
+
# @!attribute conditions
|
|
37
|
+
# Condition spec for a journey node. Accepts a single condition atom, an AND/OR
|
|
38
|
+
# group, or an AND/OR nested group. Omit the `conditions` property entirely to
|
|
39
|
+
# express "no conditions".
|
|
40
|
+
#
|
|
41
|
+
# @return [Array<String>, Courier::Models::JourneyConditionGroup, Courier::Models::JourneyConditionNestedGroup, nil]
|
|
42
|
+
optional :conditions, union: -> { Courier::JourneyConditionsField }
|
|
43
|
+
|
|
44
|
+
# @!method initialize(max_allowed:, period:, scope:, throttle_key:, type:, id: nil, conditions: nil)
|
|
45
|
+
# Some parameter documentations has been truncated, see
|
|
46
|
+
# {Courier::Models::JourneyThrottleDynamicNode} for more details.
|
|
47
|
+
#
|
|
48
|
+
# Throttle the journey by a dynamic `throttle_key`, allowing at most `max_allowed`
|
|
49
|
+
# invocations per `period`.
|
|
50
|
+
#
|
|
51
|
+
# @param max_allowed [Integer]
|
|
52
|
+
#
|
|
53
|
+
# @param period [String]
|
|
54
|
+
#
|
|
55
|
+
# @param scope [Symbol, Courier::Models::JourneyThrottleDynamicNode::Scope]
|
|
56
|
+
#
|
|
57
|
+
# @param throttle_key [String]
|
|
58
|
+
#
|
|
59
|
+
# @param type [Symbol, Courier::Models::JourneyThrottleDynamicNode::Type]
|
|
60
|
+
#
|
|
61
|
+
# @param id [String]
|
|
62
|
+
#
|
|
63
|
+
# @param conditions [Array<String>, Courier::Models::JourneyConditionGroup, Courier::Models::JourneyConditionNestedGroup] Condition spec for a journey node. Accepts a single condition atom, an AND/OR gr
|
|
64
|
+
|
|
65
|
+
# @see Courier::Models::JourneyThrottleDynamicNode#scope
|
|
66
|
+
module Scope
|
|
67
|
+
extend Courier::Internal::Type::Enum
|
|
68
|
+
|
|
69
|
+
DYNAMIC = :dynamic
|
|
70
|
+
|
|
71
|
+
# @!method self.values
|
|
72
|
+
# @return [Array<Symbol>]
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# @see Courier::Models::JourneyThrottleDynamicNode#type
|
|
76
|
+
module Type
|
|
77
|
+
extend Courier::Internal::Type::Enum
|
|
78
|
+
|
|
79
|
+
THROTTLE = :throttle
|
|
80
|
+
|
|
81
|
+
# @!method self.values
|
|
82
|
+
# @return [Array<Symbol>]
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class JourneyThrottleStaticNode < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute max_allowed
|
|
7
|
+
#
|
|
8
|
+
# @return [Integer]
|
|
9
|
+
required :max_allowed, Integer
|
|
10
|
+
|
|
11
|
+
# @!attribute period
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :period, String
|
|
15
|
+
|
|
16
|
+
# @!attribute scope
|
|
17
|
+
#
|
|
18
|
+
# @return [Symbol, Courier::Models::JourneyThrottleStaticNode::Scope]
|
|
19
|
+
required :scope, enum: -> { Courier::JourneyThrottleStaticNode::Scope }
|
|
20
|
+
|
|
21
|
+
# @!attribute type
|
|
22
|
+
#
|
|
23
|
+
# @return [Symbol, Courier::Models::JourneyThrottleStaticNode::Type]
|
|
24
|
+
required :type, enum: -> { Courier::JourneyThrottleStaticNode::Type }
|
|
25
|
+
|
|
26
|
+
# @!attribute id
|
|
27
|
+
#
|
|
28
|
+
# @return [String, nil]
|
|
29
|
+
optional :id, String
|
|
30
|
+
|
|
31
|
+
# @!attribute conditions
|
|
32
|
+
# Condition spec for a journey node. Accepts a single condition atom, an AND/OR
|
|
33
|
+
# group, or an AND/OR nested group. Omit the `conditions` property entirely to
|
|
34
|
+
# express "no conditions".
|
|
35
|
+
#
|
|
36
|
+
# @return [Array<String>, Courier::Models::JourneyConditionGroup, Courier::Models::JourneyConditionNestedGroup, nil]
|
|
37
|
+
optional :conditions, union: -> { Courier::JourneyConditionsField }
|
|
38
|
+
|
|
39
|
+
# @!method initialize(max_allowed:, period:, scope:, type:, id: nil, conditions: nil)
|
|
40
|
+
# Some parameter documentations has been truncated, see
|
|
41
|
+
# {Courier::Models::JourneyThrottleStaticNode} for more details.
|
|
42
|
+
#
|
|
43
|
+
# Throttle the journey by a static `scope` (`user` or `global`), allowing at most
|
|
44
|
+
# `max_allowed` invocations per `period`.
|
|
45
|
+
#
|
|
46
|
+
# @param max_allowed [Integer]
|
|
47
|
+
#
|
|
48
|
+
# @param period [String]
|
|
49
|
+
#
|
|
50
|
+
# @param scope [Symbol, Courier::Models::JourneyThrottleStaticNode::Scope]
|
|
51
|
+
#
|
|
52
|
+
# @param type [Symbol, Courier::Models::JourneyThrottleStaticNode::Type]
|
|
53
|
+
#
|
|
54
|
+
# @param id [String]
|
|
55
|
+
#
|
|
56
|
+
# @param conditions [Array<String>, Courier::Models::JourneyConditionGroup, Courier::Models::JourneyConditionNestedGroup] Condition spec for a journey node. Accepts a single condition atom, an AND/OR gr
|
|
57
|
+
|
|
58
|
+
# @see Courier::Models::JourneyThrottleStaticNode#scope
|
|
59
|
+
module Scope
|
|
60
|
+
extend Courier::Internal::Type::Enum
|
|
61
|
+
|
|
62
|
+
USER = :user
|
|
63
|
+
GLOBAL = :global
|
|
64
|
+
|
|
65
|
+
# @!method self.values
|
|
66
|
+
# @return [Array<Symbol>]
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# @see Courier::Models::JourneyThrottleStaticNode#type
|
|
70
|
+
module Type
|
|
71
|
+
extend Courier::Internal::Type::Enum
|
|
72
|
+
|
|
73
|
+
THROTTLE = :throttle
|
|
74
|
+
|
|
75
|
+
# @!method self.values
|
|
76
|
+
# @return [Array<Symbol>]
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class JourneyVersionItem < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute created
|
|
7
|
+
#
|
|
8
|
+
# @return [Integer, nil]
|
|
9
|
+
required :created, Integer, nil?: true
|
|
10
|
+
|
|
11
|
+
# @!attribute creator
|
|
12
|
+
#
|
|
13
|
+
# @return [String, nil]
|
|
14
|
+
required :creator, String, nil?: true
|
|
15
|
+
|
|
16
|
+
# @!attribute name
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :name, String
|
|
20
|
+
|
|
21
|
+
# @!attribute published
|
|
22
|
+
#
|
|
23
|
+
# @return [Integer, nil]
|
|
24
|
+
required :published, Integer, nil?: true
|
|
25
|
+
|
|
26
|
+
# @!attribute version
|
|
27
|
+
#
|
|
28
|
+
# @return [String]
|
|
29
|
+
required :version, String
|
|
30
|
+
|
|
31
|
+
# @!method initialize(created:, creator:, name:, published:, version:)
|
|
32
|
+
# A published version of a journey.
|
|
33
|
+
#
|
|
34
|
+
# @param created [Integer, nil]
|
|
35
|
+
# @param creator [String, nil]
|
|
36
|
+
# @param name [String]
|
|
37
|
+
# @param published [Integer, nil]
|
|
38
|
+
# @param version [String]
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Journeys#list_versions
|
|
6
|
+
class JourneyVersionsListResponse < Courier::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute paging
|
|
8
|
+
#
|
|
9
|
+
# @return [Courier::Models::Paging]
|
|
10
|
+
required :paging, -> { Courier::Paging }
|
|
11
|
+
|
|
12
|
+
# @!attribute results
|
|
13
|
+
#
|
|
14
|
+
# @return [Array<Courier::Models::JourneyVersionItem>]
|
|
15
|
+
required :results, -> { Courier::Internal::Type::ArrayOf[Courier::JourneyVersionItem] }
|
|
16
|
+
|
|
17
|
+
# @!method initialize(paging:, results:)
|
|
18
|
+
# Paged list of published journey versions, most recent first.
|
|
19
|
+
#
|
|
20
|
+
# @param paging [Courier::Models::Paging]
|
|
21
|
+
# @param results [Array<Courier::Models::JourneyVersionItem>]
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Journeys
|
|
6
|
+
# @see Courier::Resources::Journeys::Templates#archive
|
|
7
|
+
class TemplateArchiveParams < Courier::Internal::Type::BaseModel
|
|
8
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Courier::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute template_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :template_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute notification_id
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :notification_id, String
|
|
20
|
+
|
|
21
|
+
# @!method initialize(template_id:, notification_id:, request_options: {})
|
|
22
|
+
# @param template_id [String]
|
|
23
|
+
# @param notification_id [String]
|
|
24
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Journeys
|
|
6
|
+
# @see Courier::Resources::Journeys::Templates#create
|
|
7
|
+
class TemplateCreateParams < Courier::Models::JourneyTemplateCreateRequest
|
|
8
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Courier::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute template_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :template_id, String
|
|
15
|
+
|
|
16
|
+
# @!method initialize(template_id:, request_options: {})
|
|
17
|
+
# @param template_id [String]
|
|
18
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Journeys
|
|
6
|
+
# @see Courier::Resources::Journeys::Templates#list
|
|
7
|
+
class TemplateListParams < Courier::Internal::Type::BaseModel
|
|
8
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Courier::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute template_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :template_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute cursor
|
|
17
|
+
# Pagination cursor from a prior response.
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :cursor, String
|
|
21
|
+
|
|
22
|
+
# @!attribute limit
|
|
23
|
+
# Page size. Minimum 1, maximum 100.
|
|
24
|
+
#
|
|
25
|
+
# @return [Integer, nil]
|
|
26
|
+
optional :limit, Integer
|
|
27
|
+
|
|
28
|
+
# @!method initialize(template_id:, cursor: nil, limit: nil, request_options: {})
|
|
29
|
+
# @param template_id [String]
|
|
30
|
+
#
|
|
31
|
+
# @param cursor [String] Pagination cursor from a prior response.
|
|
32
|
+
#
|
|
33
|
+
# @param limit [Integer] Page size. Minimum 1, maximum 100.
|
|
34
|
+
#
|
|
35
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Journeys
|
|
6
|
+
# @see Courier::Resources::Journeys::Templates#list_versions
|
|
7
|
+
class TemplateListVersionsParams < Courier::Internal::Type::BaseModel
|
|
8
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Courier::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute template_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :template_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute notification_id
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :notification_id, String
|
|
20
|
+
|
|
21
|
+
# @!method initialize(template_id:, notification_id:, request_options: {})
|
|
22
|
+
# @param template_id [String]
|
|
23
|
+
# @param notification_id [String]
|
|
24
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Journeys
|
|
6
|
+
# @see Courier::Resources::Journeys::Templates#publish
|
|
7
|
+
class TemplatePublishParams < Courier::Models::JourneyTemplatePublishRequest
|
|
8
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Courier::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute template_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :template_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute notification_id
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :notification_id, String
|
|
20
|
+
|
|
21
|
+
# @!method initialize(template_id:, notification_id:, request_options: {})
|
|
22
|
+
# @param template_id [String]
|
|
23
|
+
# @param notification_id [String]
|
|
24
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Journeys
|
|
6
|
+
# @see Courier::Resources::Journeys::Templates#replace
|
|
7
|
+
class TemplateReplaceParams < Courier::Models::JourneyTemplateReplaceRequest
|
|
8
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Courier::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute template_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :template_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute notification_id
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :notification_id, String
|
|
20
|
+
|
|
21
|
+
# @!method initialize(template_id:, notification_id:, request_options: {})
|
|
22
|
+
# @param template_id [String]
|
|
23
|
+
# @param notification_id [String]
|
|
24
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Journeys
|
|
6
|
+
# @see Courier::Resources::Journeys::Templates#retrieve
|
|
7
|
+
class TemplateRetrieveParams < Courier::Internal::Type::BaseModel
|
|
8
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Courier::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute template_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :template_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute notification_id
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :notification_id, String
|
|
20
|
+
|
|
21
|
+
# @!method initialize(template_id:, notification_id:, request_options: {})
|
|
22
|
+
# @param template_id [String]
|
|
23
|
+
# @param notification_id [String]
|
|
24
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Tenants
|
|
6
|
+
# @see Courier::Resources::Tenants::Templates#delete
|
|
7
|
+
class TemplateDeleteParams < Courier::Internal::Type::BaseModel
|
|
8
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Courier::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute tenant_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :tenant_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute template_id
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :template_id, String
|
|
20
|
+
|
|
21
|
+
# @!method initialize(tenant_id:, template_id:, request_options: {})
|
|
22
|
+
# @param tenant_id [String]
|
|
23
|
+
# @param template_id [String]
|
|
24
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|