trycourier 4.10.1 → 4.11.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/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 +139 -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/notification_list_response.rb +8 -8
- data/lib/courier/models/notification_template_create_request.rb +3 -3
- data/lib/courier/models/notification_template_payload.rb +2 -2
- data/lib/courier/models/notification_template_response.rb +71 -0
- data/lib/courier/models/notification_template_update_request.rb +3 -3
- data/lib/courier/models/tenants/template_delete_params.rb +28 -0
- data/lib/courier/models.rb +75 -2
- data/lib/courier/resources/journeys/templates.rb +224 -0
- data/lib/courier/resources/journeys.rb +167 -2
- data/lib/courier/resources/notifications/checks.rb +16 -6
- data/lib/courier/resources/notifications.rb +8 -8
- data/lib/courier/resources/tenants/templates.rb +32 -0
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +45 -1
- data/rbi/courier/models/create_journey_request.rbi +113 -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 +227 -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 +108 -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/notification_list_response.rbi +9 -6
- data/rbi/courier/models/notification_template_create_request.rbi +4 -4
- data/rbi/courier/models/notification_template_payload.rbi +2 -2
- data/rbi/courier/models/notification_template_response.rbi +120 -0
- data/rbi/courier/models/notification_template_update_request.rbi +4 -4
- data/rbi/courier/models/tenants/template_delete_params.rbi +48 -0
- data/rbi/courier/models.rbi +78 -3
- data/rbi/courier/resources/journeys/templates.rbi +160 -0
- data/rbi/courier/resources/journeys.rbi +156 -3
- data/rbi/courier/resources/notifications/checks.rbi +19 -4
- data/rbi/courier/resources/notifications.rbi +7 -7
- data/rbi/courier/resources/tenants/templates.rbi +22 -0
- 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 +117 -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/notification_list_response.rbs +7 -5
- data/sig/courier/models/notification_template_response.rbs +70 -0
- data/sig/courier/models/tenants/template_delete_params.rbs +30 -0
- data/sig/courier/models.rbs +74 -2
- data/sig/courier/resources/journeys/templates.rbs +58 -0
- data/sig/courier/resources/journeys.rbs +41 -0
- data/sig/courier/resources/notifications.rbs +3 -3
- data/sig/courier/resources/tenants/templates.rbs +6 -0
- metadata +137 -5
- data/lib/courier/models/notification_template_get_response.rb +0 -92
- data/rbi/courier/models/notification_template_get_response.rbi +0 -162
- data/sig/courier/models/notification_template_get_response.rbs +0 -72
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class JourneyThrottleStaticNode < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Courier::JourneyThrottleStaticNode, Courier::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
sig { returns(Integer) }
|
|
12
|
+
attr_accessor :max_allowed
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :period
|
|
16
|
+
|
|
17
|
+
sig { returns(Courier::JourneyThrottleStaticNode::Scope::OrSymbol) }
|
|
18
|
+
attr_accessor :scope
|
|
19
|
+
|
|
20
|
+
sig { returns(Courier::JourneyThrottleStaticNode::Type::OrSymbol) }
|
|
21
|
+
attr_accessor :type
|
|
22
|
+
|
|
23
|
+
sig { returns(T.nilable(String)) }
|
|
24
|
+
attr_reader :id
|
|
25
|
+
|
|
26
|
+
sig { params(id: String).void }
|
|
27
|
+
attr_writer :id
|
|
28
|
+
|
|
29
|
+
# Condition spec for a journey node. Accepts a single condition atom, an AND/OR
|
|
30
|
+
# group, or an AND/OR nested group. Omit the `conditions` property entirely to
|
|
31
|
+
# express "no conditions".
|
|
32
|
+
sig do
|
|
33
|
+
returns(
|
|
34
|
+
T.nilable(
|
|
35
|
+
T.any(
|
|
36
|
+
T::Array[String],
|
|
37
|
+
Courier::JourneyConditionGroup,
|
|
38
|
+
Courier::JourneyConditionNestedGroup
|
|
39
|
+
)
|
|
40
|
+
)
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
attr_reader :conditions
|
|
44
|
+
|
|
45
|
+
sig do
|
|
46
|
+
params(
|
|
47
|
+
conditions:
|
|
48
|
+
T.any(
|
|
49
|
+
T::Array[String],
|
|
50
|
+
Courier::JourneyConditionGroup::OrHash,
|
|
51
|
+
Courier::JourneyConditionNestedGroup::OrHash
|
|
52
|
+
)
|
|
53
|
+
).void
|
|
54
|
+
end
|
|
55
|
+
attr_writer :conditions
|
|
56
|
+
|
|
57
|
+
# Throttle the journey by a static `scope` (`user` or `global`), allowing at most
|
|
58
|
+
# `max_allowed` invocations per `period`.
|
|
59
|
+
sig do
|
|
60
|
+
params(
|
|
61
|
+
max_allowed: Integer,
|
|
62
|
+
period: String,
|
|
63
|
+
scope: Courier::JourneyThrottleStaticNode::Scope::OrSymbol,
|
|
64
|
+
type: Courier::JourneyThrottleStaticNode::Type::OrSymbol,
|
|
65
|
+
id: String,
|
|
66
|
+
conditions:
|
|
67
|
+
T.any(
|
|
68
|
+
T::Array[String],
|
|
69
|
+
Courier::JourneyConditionGroup::OrHash,
|
|
70
|
+
Courier::JourneyConditionNestedGroup::OrHash
|
|
71
|
+
)
|
|
72
|
+
).returns(T.attached_class)
|
|
73
|
+
end
|
|
74
|
+
def self.new(
|
|
75
|
+
max_allowed:,
|
|
76
|
+
period:,
|
|
77
|
+
scope:,
|
|
78
|
+
type:,
|
|
79
|
+
id: nil,
|
|
80
|
+
# Condition spec for a journey node. Accepts a single condition atom, an AND/OR
|
|
81
|
+
# group, or an AND/OR nested group. Omit the `conditions` property entirely to
|
|
82
|
+
# express "no conditions".
|
|
83
|
+
conditions: nil
|
|
84
|
+
)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
sig do
|
|
88
|
+
override.returns(
|
|
89
|
+
{
|
|
90
|
+
max_allowed: Integer,
|
|
91
|
+
period: String,
|
|
92
|
+
scope: Courier::JourneyThrottleStaticNode::Scope::OrSymbol,
|
|
93
|
+
type: Courier::JourneyThrottleStaticNode::Type::OrSymbol,
|
|
94
|
+
id: String,
|
|
95
|
+
conditions:
|
|
96
|
+
T.any(
|
|
97
|
+
T::Array[String],
|
|
98
|
+
Courier::JourneyConditionGroup,
|
|
99
|
+
Courier::JourneyConditionNestedGroup
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
end
|
|
104
|
+
def to_hash
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
module Scope
|
|
108
|
+
extend Courier::Internal::Type::Enum
|
|
109
|
+
|
|
110
|
+
TaggedSymbol =
|
|
111
|
+
T.type_alias do
|
|
112
|
+
T.all(Symbol, Courier::JourneyThrottleStaticNode::Scope)
|
|
113
|
+
end
|
|
114
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
115
|
+
|
|
116
|
+
USER =
|
|
117
|
+
T.let(:user, Courier::JourneyThrottleStaticNode::Scope::TaggedSymbol)
|
|
118
|
+
GLOBAL =
|
|
119
|
+
T.let(
|
|
120
|
+
:global,
|
|
121
|
+
Courier::JourneyThrottleStaticNode::Scope::TaggedSymbol
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
sig do
|
|
125
|
+
override.returns(
|
|
126
|
+
T::Array[Courier::JourneyThrottleStaticNode::Scope::TaggedSymbol]
|
|
127
|
+
)
|
|
128
|
+
end
|
|
129
|
+
def self.values
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
module Type
|
|
134
|
+
extend Courier::Internal::Type::Enum
|
|
135
|
+
|
|
136
|
+
TaggedSymbol =
|
|
137
|
+
T.type_alias do
|
|
138
|
+
T.all(Symbol, Courier::JourneyThrottleStaticNode::Type)
|
|
139
|
+
end
|
|
140
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
141
|
+
|
|
142
|
+
THROTTLE =
|
|
143
|
+
T.let(
|
|
144
|
+
:throttle,
|
|
145
|
+
Courier::JourneyThrottleStaticNode::Type::TaggedSymbol
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
sig do
|
|
149
|
+
override.returns(
|
|
150
|
+
T::Array[Courier::JourneyThrottleStaticNode::Type::TaggedSymbol]
|
|
151
|
+
)
|
|
152
|
+
end
|
|
153
|
+
def self.values
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class JourneyVersionItem < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Courier::JourneyVersionItem, Courier::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
sig { returns(T.nilable(Integer)) }
|
|
12
|
+
attr_accessor :created
|
|
13
|
+
|
|
14
|
+
sig { returns(T.nilable(String)) }
|
|
15
|
+
attr_accessor :creator
|
|
16
|
+
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :name
|
|
19
|
+
|
|
20
|
+
sig { returns(T.nilable(Integer)) }
|
|
21
|
+
attr_accessor :published
|
|
22
|
+
|
|
23
|
+
sig { returns(String) }
|
|
24
|
+
attr_accessor :version
|
|
25
|
+
|
|
26
|
+
# A published version of a journey.
|
|
27
|
+
sig do
|
|
28
|
+
params(
|
|
29
|
+
created: T.nilable(Integer),
|
|
30
|
+
creator: T.nilable(String),
|
|
31
|
+
name: String,
|
|
32
|
+
published: T.nilable(Integer),
|
|
33
|
+
version: String
|
|
34
|
+
).returns(T.attached_class)
|
|
35
|
+
end
|
|
36
|
+
def self.new(created:, creator:, name:, published:, version:)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
sig do
|
|
40
|
+
override.returns(
|
|
41
|
+
{
|
|
42
|
+
created: T.nilable(Integer),
|
|
43
|
+
creator: T.nilable(String),
|
|
44
|
+
name: String,
|
|
45
|
+
published: T.nilable(Integer),
|
|
46
|
+
version: String
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
end
|
|
50
|
+
def to_hash
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class JourneyVersionsListResponse < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Courier::JourneyVersionsListResponse,
|
|
10
|
+
Courier::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(Courier::Paging) }
|
|
15
|
+
attr_reader :paging
|
|
16
|
+
|
|
17
|
+
sig { params(paging: Courier::Paging::OrHash).void }
|
|
18
|
+
attr_writer :paging
|
|
19
|
+
|
|
20
|
+
sig { returns(T::Array[Courier::JourneyVersionItem]) }
|
|
21
|
+
attr_accessor :results
|
|
22
|
+
|
|
23
|
+
# Paged list of published journey versions, most recent first.
|
|
24
|
+
sig do
|
|
25
|
+
params(
|
|
26
|
+
paging: Courier::Paging::OrHash,
|
|
27
|
+
results: T::Array[Courier::JourneyVersionItem::OrHash]
|
|
28
|
+
).returns(T.attached_class)
|
|
29
|
+
end
|
|
30
|
+
def self.new(paging:, results:)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
sig do
|
|
34
|
+
override.returns(
|
|
35
|
+
{
|
|
36
|
+
paging: Courier::Paging,
|
|
37
|
+
results: T::Array[Courier::JourneyVersionItem]
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
def to_hash
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Journeys
|
|
6
|
+
class TemplateArchiveParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Courier::Journeys::TemplateArchiveParams,
|
|
14
|
+
Courier::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :template_id
|
|
20
|
+
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :notification_id
|
|
23
|
+
|
|
24
|
+
sig do
|
|
25
|
+
params(
|
|
26
|
+
template_id: String,
|
|
27
|
+
notification_id: String,
|
|
28
|
+
request_options: Courier::RequestOptions::OrHash
|
|
29
|
+
).returns(T.attached_class)
|
|
30
|
+
end
|
|
31
|
+
def self.new(template_id:, notification_id:, request_options: {})
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
override.returns(
|
|
36
|
+
{
|
|
37
|
+
template_id: String,
|
|
38
|
+
notification_id: String,
|
|
39
|
+
request_options: Courier::RequestOptions
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
def to_hash
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Journeys
|
|
6
|
+
class TemplateCreateParams < Courier::Models::JourneyTemplateCreateRequest
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Courier::Journeys::TemplateCreateParams,
|
|
14
|
+
Courier::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :template_id
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
params(
|
|
23
|
+
template_id: String,
|
|
24
|
+
request_options: Courier::RequestOptions::OrHash
|
|
25
|
+
).returns(T.attached_class)
|
|
26
|
+
end
|
|
27
|
+
def self.new(template_id:, request_options: {})
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
override.returns(
|
|
32
|
+
{ template_id: String, request_options: Courier::RequestOptions }
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
def to_hash
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Journeys
|
|
6
|
+
class TemplateListParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Courier::Journeys::TemplateListParams,
|
|
14
|
+
Courier::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :template_id
|
|
20
|
+
|
|
21
|
+
# Pagination cursor from a prior response.
|
|
22
|
+
sig { returns(T.nilable(String)) }
|
|
23
|
+
attr_reader :cursor
|
|
24
|
+
|
|
25
|
+
sig { params(cursor: String).void }
|
|
26
|
+
attr_writer :cursor
|
|
27
|
+
|
|
28
|
+
# Page size. Minimum 1, maximum 100.
|
|
29
|
+
sig { returns(T.nilable(Integer)) }
|
|
30
|
+
attr_reader :limit
|
|
31
|
+
|
|
32
|
+
sig { params(limit: Integer).void }
|
|
33
|
+
attr_writer :limit
|
|
34
|
+
|
|
35
|
+
sig do
|
|
36
|
+
params(
|
|
37
|
+
template_id: String,
|
|
38
|
+
cursor: String,
|
|
39
|
+
limit: Integer,
|
|
40
|
+
request_options: Courier::RequestOptions::OrHash
|
|
41
|
+
).returns(T.attached_class)
|
|
42
|
+
end
|
|
43
|
+
def self.new(
|
|
44
|
+
template_id:,
|
|
45
|
+
# Pagination cursor from a prior response.
|
|
46
|
+
cursor: nil,
|
|
47
|
+
# Page size. Minimum 1, maximum 100.
|
|
48
|
+
limit: nil,
|
|
49
|
+
request_options: {}
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
sig do
|
|
54
|
+
override.returns(
|
|
55
|
+
{
|
|
56
|
+
template_id: String,
|
|
57
|
+
cursor: String,
|
|
58
|
+
limit: Integer,
|
|
59
|
+
request_options: Courier::RequestOptions
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
end
|
|
63
|
+
def to_hash
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Journeys
|
|
6
|
+
class TemplateListVersionsParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Courier::Journeys::TemplateListVersionsParams,
|
|
14
|
+
Courier::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :template_id
|
|
20
|
+
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :notification_id
|
|
23
|
+
|
|
24
|
+
sig do
|
|
25
|
+
params(
|
|
26
|
+
template_id: String,
|
|
27
|
+
notification_id: String,
|
|
28
|
+
request_options: Courier::RequestOptions::OrHash
|
|
29
|
+
).returns(T.attached_class)
|
|
30
|
+
end
|
|
31
|
+
def self.new(template_id:, notification_id:, request_options: {})
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
override.returns(
|
|
36
|
+
{
|
|
37
|
+
template_id: String,
|
|
38
|
+
notification_id: String,
|
|
39
|
+
request_options: Courier::RequestOptions
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
def to_hash
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Journeys
|
|
6
|
+
class TemplatePublishParams < Courier::Models::JourneyTemplatePublishRequest
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Courier::Journeys::TemplatePublishParams,
|
|
14
|
+
Courier::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :template_id
|
|
20
|
+
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :notification_id
|
|
23
|
+
|
|
24
|
+
sig do
|
|
25
|
+
params(
|
|
26
|
+
template_id: String,
|
|
27
|
+
notification_id: String,
|
|
28
|
+
request_options: Courier::RequestOptions::OrHash
|
|
29
|
+
).returns(T.attached_class)
|
|
30
|
+
end
|
|
31
|
+
def self.new(template_id:, notification_id:, request_options: {})
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
override.returns(
|
|
36
|
+
{
|
|
37
|
+
template_id: String,
|
|
38
|
+
notification_id: String,
|
|
39
|
+
request_options: Courier::RequestOptions
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
def to_hash
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Journeys
|
|
6
|
+
class TemplateReplaceParams < Courier::Models::JourneyTemplateReplaceRequest
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Courier::Journeys::TemplateReplaceParams,
|
|
14
|
+
Courier::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :template_id
|
|
20
|
+
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :notification_id
|
|
23
|
+
|
|
24
|
+
sig do
|
|
25
|
+
params(
|
|
26
|
+
template_id: String,
|
|
27
|
+
notification_id: String,
|
|
28
|
+
request_options: Courier::RequestOptions::OrHash
|
|
29
|
+
).returns(T.attached_class)
|
|
30
|
+
end
|
|
31
|
+
def self.new(template_id:, notification_id:, request_options: {})
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
override.returns(
|
|
36
|
+
{
|
|
37
|
+
template_id: String,
|
|
38
|
+
notification_id: String,
|
|
39
|
+
request_options: Courier::RequestOptions
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
def to_hash
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Journeys
|
|
6
|
+
class TemplateRetrieveParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Courier::Journeys::TemplateRetrieveParams,
|
|
14
|
+
Courier::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :template_id
|
|
20
|
+
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :notification_id
|
|
23
|
+
|
|
24
|
+
sig do
|
|
25
|
+
params(
|
|
26
|
+
template_id: String,
|
|
27
|
+
notification_id: String,
|
|
28
|
+
request_options: Courier::RequestOptions::OrHash
|
|
29
|
+
).returns(T.attached_class)
|
|
30
|
+
end
|
|
31
|
+
def self.new(template_id:, notification_id:, request_options: {})
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
override.returns(
|
|
36
|
+
{
|
|
37
|
+
template_id: String,
|
|
38
|
+
notification_id: String,
|
|
39
|
+
request_options: Courier::RequestOptions
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
def to_hash
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -89,9 +89,6 @@ module Courier
|
|
|
89
89
|
sig { returns(T::Array[String]) }
|
|
90
90
|
attr_accessor :event_ids
|
|
91
91
|
|
|
92
|
-
sig { returns(String) }
|
|
93
|
-
attr_accessor :note
|
|
94
|
-
|
|
95
92
|
sig { returns(Courier::MessageRouting) }
|
|
96
93
|
attr_reader :routing
|
|
97
94
|
|
|
@@ -104,6 +101,12 @@ module Courier
|
|
|
104
101
|
sig { returns(Integer) }
|
|
105
102
|
attr_accessor :updated_at
|
|
106
103
|
|
|
104
|
+
sig { returns(T.nilable(String)) }
|
|
105
|
+
attr_reader :note
|
|
106
|
+
|
|
107
|
+
sig { params(note: String).void }
|
|
108
|
+
attr_writer :note
|
|
109
|
+
|
|
107
110
|
sig do
|
|
108
111
|
returns(
|
|
109
112
|
T.nilable(
|
|
@@ -131,10 +134,10 @@ module Courier
|
|
|
131
134
|
id: String,
|
|
132
135
|
created_at: Integer,
|
|
133
136
|
event_ids: T::Array[String],
|
|
134
|
-
note: String,
|
|
135
137
|
routing: Courier::MessageRouting::OrHash,
|
|
136
138
|
topic_id: String,
|
|
137
139
|
updated_at: Integer,
|
|
140
|
+
note: String,
|
|
138
141
|
tags:
|
|
139
142
|
T.nilable(
|
|
140
143
|
Courier::Models::NotificationListResponse::Result::Notification::Tags::OrHash
|
|
@@ -147,10 +150,10 @@ module Courier
|
|
|
147
150
|
created_at:,
|
|
148
151
|
# Array of event IDs associated with this notification
|
|
149
152
|
event_ids:,
|
|
150
|
-
note:,
|
|
151
153
|
routing:,
|
|
152
154
|
topic_id:,
|
|
153
155
|
updated_at:,
|
|
156
|
+
note: nil,
|
|
154
157
|
tags: nil,
|
|
155
158
|
title: nil
|
|
156
159
|
)
|
|
@@ -162,10 +165,10 @@ module Courier
|
|
|
162
165
|
id: String,
|
|
163
166
|
created_at: Integer,
|
|
164
167
|
event_ids: T::Array[String],
|
|
165
|
-
note: String,
|
|
166
168
|
routing: Courier::MessageRouting,
|
|
167
169
|
topic_id: String,
|
|
168
170
|
updated_at: Integer,
|
|
171
|
+
note: String,
|
|
169
172
|
tags:
|
|
170
173
|
T.nilable(
|
|
171
174
|
Courier::Models::NotificationListResponse::Result::Notification::Tags
|
|
@@ -11,8 +11,8 @@ module Courier
|
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
#
|
|
15
|
-
#
|
|
14
|
+
# Core template fields used in POST and PUT request bodies (nested under a
|
|
15
|
+
# `notification` key) and returned at the top level in responses.
|
|
16
16
|
sig { returns(Courier::NotificationTemplatePayload) }
|
|
17
17
|
attr_reader :notification
|
|
18
18
|
|
|
@@ -45,8 +45,8 @@ module Courier
|
|
|
45
45
|
).returns(T.attached_class)
|
|
46
46
|
end
|
|
47
47
|
def self.new(
|
|
48
|
-
#
|
|
49
|
-
#
|
|
48
|
+
# Core template fields used in POST and PUT request bodies (nested under a
|
|
49
|
+
# `notification` key) and returned at the top level in responses.
|
|
50
50
|
notification:,
|
|
51
51
|
# Template state after creation. Case-insensitive input, normalized to uppercase
|
|
52
52
|
# in the response. Defaults to "DRAFT".
|
|
@@ -65,8 +65,8 @@ module Courier
|
|
|
65
65
|
sig { returns(T::Array[String]) }
|
|
66
66
|
attr_accessor :tags
|
|
67
67
|
|
|
68
|
-
#
|
|
69
|
-
#
|
|
68
|
+
# Core template fields used in POST and PUT request bodies (nested under a
|
|
69
|
+
# `notification` key) and returned at the top level in responses.
|
|
70
70
|
sig do
|
|
71
71
|
params(
|
|
72
72
|
brand: T.nilable(Courier::NotificationTemplatePayload::Brand::OrHash),
|