trycourier 7.2.0 → 7.3.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 +7 -0
- data/README.md +1 -1
- data/lib/courier/models/journey_template_create_request.rb +1 -18
- data/lib/courier/models/journey_template_get_response.rb +1 -18
- data/lib/courier/models/journey_template_replace_request.rb +1 -18
- data/lib/courier/models/notification_content_put_request.rb +1 -30
- data/lib/courier/models/notification_template_content.rb +27 -0
- data/lib/courier/models/notification_template_payload.rb +3 -3
- data/lib/courier/models.rb +2 -0
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +1 -0
- data/rbi/courier/models/journey_template_create_request.rbi +3 -58
- data/rbi/courier/models/journey_template_get_response.rbi +3 -53
- data/rbi/courier/models/journey_template_replace_request.rbi +3 -58
- data/rbi/courier/models/notification_content_put_request.rbi +0 -71
- data/rbi/courier/models/notification_template_content.rbi +88 -0
- data/rbi/courier/models/notification_template_payload.rbi +4 -4
- data/rbi/courier/models.rbi +2 -0
- data/sig/courier/models/journey_template_create_request.rbs +3 -23
- data/sig/courier/models/journey_template_get_response.rbs +3 -23
- data/sig/courier/models/journey_template_replace_request.rbs +3 -23
- data/sig/courier/models/notification_content_put_request.rbs +1 -24
- data/sig/courier/models/notification_template_content.rbs +22 -0
- data/sig/courier/models/notification_template_payload.rbs +4 -4
- data/sig/courier/models.rbs +2 -0
- metadata +4 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b6daf75e20c5dff5fcde71c94cec6fa9fd11367d7d28f95c3fbd71c0100622a3
|
|
4
|
+
data.tar.gz: 39c0d9ea8cad36fbf32c64815a22e9f0f5ce3df00e2f8574dcd1a9c38543ca2a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4fe33fc1a5ddfbcbe6f27e3581be69a05ea9a359732dd394c93696cd156eb08712016ec64d32e33eec558adbb07be6ad781de41d7e9e1ba5347fefc23b49dd10
|
|
7
|
+
data.tar.gz: ad324aafd2a08df46c148fb3ede39d5366d103b9c49cd62fa53defd7c92e44e05c86c57ef65f7c21e85ae70d6e56653082c7989f44a899992c564f429c770323
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [7.3.0](https://github.com/trycourier/courier-ruby/compare/v7.2.0...v7.3.0) (2026-11-24)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **api:** remove `scope` from v2 notification, journey and broadcast template content ([#199](https://github.com/trycourier/courier-ruby/issues/199)) ([305abc3](https://github.com/trycourier/courier-ruby/commit/305abc3c0282396976e417637c845878804764c8))
|
|
9
|
+
|
|
3
10
|
## [7.2.0](https://github.com/trycourier/courier-ruby/compare/v7.1.0...v7.2.0) (2026-11-23)
|
|
4
11
|
|
|
5
12
|
|
data/README.md
CHANGED
|
@@ -90,15 +90,9 @@ module Courier
|
|
|
90
90
|
# @return [Symbol, Courier::Models::JourneyTemplateCreateRequest::Notification::Content::Version]
|
|
91
91
|
required :version, enum: -> { Courier::JourneyTemplateCreateRequest::Notification::Content::Version }
|
|
92
92
|
|
|
93
|
-
# @!
|
|
94
|
-
#
|
|
95
|
-
# @return [Symbol, Courier::Models::JourneyTemplateCreateRequest::Notification::Content::Scope, nil]
|
|
96
|
-
optional :scope, enum: -> { Courier::JourneyTemplateCreateRequest::Notification::Content::Scope }
|
|
97
|
-
|
|
98
|
-
# @!method initialize(elements:, version:, scope: nil)
|
|
93
|
+
# @!method initialize(elements:, version:)
|
|
99
94
|
# @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>]
|
|
100
95
|
# @param version [Symbol, Courier::Models::JourneyTemplateCreateRequest::Notification::Content::Version]
|
|
101
|
-
# @param scope [Symbol, Courier::Models::JourneyTemplateCreateRequest::Notification::Content::Scope]
|
|
102
96
|
|
|
103
97
|
# @see Courier::Models::JourneyTemplateCreateRequest::Notification::Content#version
|
|
104
98
|
module Version
|
|
@@ -109,17 +103,6 @@ module Courier
|
|
|
109
103
|
# @!method self.values
|
|
110
104
|
# @return [Array<Symbol>]
|
|
111
105
|
end
|
|
112
|
-
|
|
113
|
-
# @see Courier::Models::JourneyTemplateCreateRequest::Notification::Content#scope
|
|
114
|
-
module Scope
|
|
115
|
-
extend Courier::Internal::Type::Enum
|
|
116
|
-
|
|
117
|
-
DEFAULT = :default
|
|
118
|
-
STRICT = :strict
|
|
119
|
-
|
|
120
|
-
# @!method self.values
|
|
121
|
-
# @return [Array<Symbol>]
|
|
122
|
-
end
|
|
123
106
|
end
|
|
124
107
|
|
|
125
108
|
# @see Courier::Models::JourneyTemplateCreateRequest::Notification#subscription
|
|
@@ -96,15 +96,9 @@ module Courier
|
|
|
96
96
|
# @return [Symbol, Courier::Models::JourneyTemplateGetResponse::Content::Version]
|
|
97
97
|
required :version, enum: -> { Courier::JourneyTemplateGetResponse::Content::Version }
|
|
98
98
|
|
|
99
|
-
# @!
|
|
100
|
-
#
|
|
101
|
-
# @return [Symbol, Courier::Models::JourneyTemplateGetResponse::Content::Scope, nil]
|
|
102
|
-
optional :scope, enum: -> { Courier::JourneyTemplateGetResponse::Content::Scope }
|
|
103
|
-
|
|
104
|
-
# @!method initialize(elements:, version:, scope: nil)
|
|
99
|
+
# @!method initialize(elements:, version:)
|
|
105
100
|
# @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>]
|
|
106
101
|
# @param version [Symbol, Courier::Models::JourneyTemplateGetResponse::Content::Version]
|
|
107
|
-
# @param scope [Symbol, Courier::Models::JourneyTemplateGetResponse::Content::Scope]
|
|
108
102
|
|
|
109
103
|
# @see Courier::Models::JourneyTemplateGetResponse::Content#version
|
|
110
104
|
module Version
|
|
@@ -115,17 +109,6 @@ module Courier
|
|
|
115
109
|
# @!method self.values
|
|
116
110
|
# @return [Array<Symbol>]
|
|
117
111
|
end
|
|
118
|
-
|
|
119
|
-
# @see Courier::Models::JourneyTemplateGetResponse::Content#scope
|
|
120
|
-
module Scope
|
|
121
|
-
extend Courier::Internal::Type::Enum
|
|
122
|
-
|
|
123
|
-
DEFAULT = :default
|
|
124
|
-
STRICT = :strict
|
|
125
|
-
|
|
126
|
-
# @!method self.values
|
|
127
|
-
# @return [Array<Symbol>]
|
|
128
|
-
end
|
|
129
112
|
end
|
|
130
113
|
|
|
131
114
|
# @see Courier::Models::JourneyTemplateGetResponse#state
|
|
@@ -78,15 +78,9 @@ module Courier
|
|
|
78
78
|
# @return [Symbol, Courier::Models::JourneyTemplateReplaceRequest::Notification::Content::Version]
|
|
79
79
|
required :version, enum: -> { Courier::JourneyTemplateReplaceRequest::Notification::Content::Version }
|
|
80
80
|
|
|
81
|
-
# @!
|
|
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)
|
|
81
|
+
# @!method initialize(elements:, version:)
|
|
87
82
|
# @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
83
|
# @param version [Symbol, Courier::Models::JourneyTemplateReplaceRequest::Notification::Content::Version]
|
|
89
|
-
# @param scope [Symbol, Courier::Models::JourneyTemplateReplaceRequest::Notification::Content::Scope]
|
|
90
84
|
|
|
91
85
|
# @see Courier::Models::JourneyTemplateReplaceRequest::Notification::Content#version
|
|
92
86
|
module Version
|
|
@@ -97,17 +91,6 @@ module Courier
|
|
|
97
91
|
# @!method self.values
|
|
98
92
|
# @return [Array<Symbol>]
|
|
99
93
|
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
94
|
end
|
|
112
95
|
|
|
113
96
|
# @see Courier::Models::JourneyTemplateReplaceRequest::Notification#subscription
|
|
@@ -29,16 +29,6 @@ module Courier
|
|
|
29
29
|
# @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>]
|
|
30
30
|
required :elements, -> { Courier::Internal::Type::ArrayOf[union: Courier::ElementalNode] }
|
|
31
31
|
|
|
32
|
-
# @!attribute scope
|
|
33
|
-
# How template variables read the data sent with the message. Under `strict`, data
|
|
34
|
-
# fields are read only through the `data.` prefix, as in `{{data.name}}`. Under
|
|
35
|
-
# `default`, `data` is spread onto the root, so `{{name}}` resolves and
|
|
36
|
-
# `{{data.name}}` renders as an empty string. This request replaces the stored
|
|
37
|
-
# content, so omitting `scope` resets it to `default`.
|
|
38
|
-
#
|
|
39
|
-
# @return [Symbol, Courier::Models::NotificationContentPutRequest::Content::Scope, nil]
|
|
40
|
-
optional :scope, enum: -> { Courier::NotificationContentPutRequest::Content::Scope }
|
|
41
|
-
|
|
42
32
|
# @!attribute version
|
|
43
33
|
# Content version identifier (e.g., `2022-01-01`). Optional; server defaults when
|
|
44
34
|
# omitted.
|
|
@@ -46,7 +36,7 @@ module Courier
|
|
|
46
36
|
# @return [String, nil]
|
|
47
37
|
optional :version, String
|
|
48
38
|
|
|
49
|
-
# @!method initialize(elements:,
|
|
39
|
+
# @!method initialize(elements:, version: nil)
|
|
50
40
|
# Some parameter documentations has been truncated, see
|
|
51
41
|
# {Courier::Models::NotificationContentPutRequest::Content} for more details.
|
|
52
42
|
#
|
|
@@ -54,26 +44,7 @@ module Courier
|
|
|
54
44
|
#
|
|
55
45
|
# @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>]
|
|
56
46
|
#
|
|
57
|
-
# @param scope [Symbol, Courier::Models::NotificationContentPutRequest::Content::Scope] How template variables read the data sent with the message. Under `strict`, data
|
|
58
|
-
#
|
|
59
47
|
# @param version [String] Content version identifier (e.g., `2022-01-01`). Optional; server defaults when
|
|
60
|
-
|
|
61
|
-
# How template variables read the data sent with the message. Under `strict`, data
|
|
62
|
-
# fields are read only through the `data.` prefix, as in `{{data.name}}`. Under
|
|
63
|
-
# `default`, `data` is spread onto the root, so `{{name}}` resolves and
|
|
64
|
-
# `{{data.name}}` renders as an empty string. This request replaces the stored
|
|
65
|
-
# content, so omitting `scope` resets it to `default`.
|
|
66
|
-
#
|
|
67
|
-
# @see Courier::Models::NotificationContentPutRequest::Content#scope
|
|
68
|
-
module Scope
|
|
69
|
-
extend Courier::Internal::Type::Enum
|
|
70
|
-
|
|
71
|
-
DEFAULT = :default
|
|
72
|
-
STRICT = :strict
|
|
73
|
-
|
|
74
|
-
# @!method self.values
|
|
75
|
-
# @return [Array<Symbol>]
|
|
76
|
-
end
|
|
77
48
|
end
|
|
78
49
|
end
|
|
79
50
|
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationTemplateContent < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute elements
|
|
7
|
+
#
|
|
8
|
+
# @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>]
|
|
9
|
+
required :elements, -> { Courier::Internal::Type::ArrayOf[union: Courier::ElementalNode] }
|
|
10
|
+
|
|
11
|
+
# @!attribute version
|
|
12
|
+
# For example, "2022-01-01"
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :version, String
|
|
16
|
+
|
|
17
|
+
# @!method initialize(elements:, version:)
|
|
18
|
+
# Elemental content of a notification template. Template variables read the data
|
|
19
|
+
# sent with the message through the `data.` prefix, as in `{{data.name}}`, and the
|
|
20
|
+
# recipient's profile through `profile.`.
|
|
21
|
+
#
|
|
22
|
+
# @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>]
|
|
23
|
+
#
|
|
24
|
+
# @param version [String] For example, "2022-01-01"
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -12,8 +12,8 @@ module Courier
|
|
|
12
12
|
# @!attribute content
|
|
13
13
|
# Elemental content definition.
|
|
14
14
|
#
|
|
15
|
-
# @return [Courier::Models::
|
|
16
|
-
required :content, -> { Courier::
|
|
15
|
+
# @return [Courier::Models::NotificationTemplateContent]
|
|
16
|
+
required :content, -> { Courier::NotificationTemplateContent }
|
|
17
17
|
|
|
18
18
|
# @!attribute name
|
|
19
19
|
# Display name for the template.
|
|
@@ -62,7 +62,7 @@ module Courier
|
|
|
62
62
|
#
|
|
63
63
|
# @param brand [Courier::Models::NotificationTemplatePayload::Brand, nil] Brand reference, or null for no brand.
|
|
64
64
|
#
|
|
65
|
-
# @param content [Courier::Models::
|
|
65
|
+
# @param content [Courier::Models::NotificationTemplateContent] Elemental content definition.
|
|
66
66
|
#
|
|
67
67
|
# @param name [String] Display name for the template.
|
|
68
68
|
#
|
data/lib/courier/models.rb
CHANGED
|
@@ -495,6 +495,8 @@ module Courier
|
|
|
495
495
|
|
|
496
496
|
NotificationTemplateAlias = Courier::Models::NotificationTemplateAlias
|
|
497
497
|
|
|
498
|
+
NotificationTemplateContent = Courier::Models::NotificationTemplateContent
|
|
499
|
+
|
|
498
500
|
NotificationTemplateCreateRequest = Courier::Models::NotificationTemplateCreateRequest
|
|
499
501
|
|
|
500
502
|
NotificationTemplateEmail = Courier::Models::NotificationTemplateEmail
|
data/lib/courier/version.rb
CHANGED
data/lib/courier.rb
CHANGED
|
@@ -350,6 +350,7 @@ require_relative "courier/models/notifications/previews/run_create_params"
|
|
|
350
350
|
require_relative "courier/models/notifications/previews/run_list_params"
|
|
351
351
|
require_relative "courier/models/notifications/previews/run_retrieve_params"
|
|
352
352
|
require_relative "courier/models/notification_template_alias"
|
|
353
|
+
require_relative "courier/models/notification_template_content"
|
|
353
354
|
require_relative "courier/models/notification_template_email"
|
|
354
355
|
require_relative "courier/models/notification_template_response"
|
|
355
356
|
require_relative "courier/models/notification_template_state"
|
|
@@ -224,23 +224,6 @@ module Courier
|
|
|
224
224
|
end
|
|
225
225
|
attr_accessor :version
|
|
226
226
|
|
|
227
|
-
sig do
|
|
228
|
-
returns(
|
|
229
|
-
T.nilable(
|
|
230
|
-
Courier::JourneyTemplateCreateRequest::Notification::Content::Scope::OrSymbol
|
|
231
|
-
)
|
|
232
|
-
)
|
|
233
|
-
end
|
|
234
|
-
attr_reader :scope
|
|
235
|
-
|
|
236
|
-
sig do
|
|
237
|
-
params(
|
|
238
|
-
scope:
|
|
239
|
-
Courier::JourneyTemplateCreateRequest::Notification::Content::Scope::OrSymbol
|
|
240
|
-
).void
|
|
241
|
-
end
|
|
242
|
-
attr_writer :scope
|
|
243
|
-
|
|
244
227
|
sig do
|
|
245
228
|
params(
|
|
246
229
|
elements:
|
|
@@ -257,12 +240,10 @@ module Courier
|
|
|
257
240
|
)
|
|
258
241
|
],
|
|
259
242
|
version:
|
|
260
|
-
Courier::JourneyTemplateCreateRequest::Notification::Content::Version::OrSymbol
|
|
261
|
-
scope:
|
|
262
|
-
Courier::JourneyTemplateCreateRequest::Notification::Content::Scope::OrSymbol
|
|
243
|
+
Courier::JourneyTemplateCreateRequest::Notification::Content::Version::OrSymbol
|
|
263
244
|
).returns(T.attached_class)
|
|
264
245
|
end
|
|
265
|
-
def self.new(elements:, version
|
|
246
|
+
def self.new(elements:, version:)
|
|
266
247
|
end
|
|
267
248
|
|
|
268
249
|
sig do
|
|
@@ -282,9 +263,7 @@ module Courier
|
|
|
282
263
|
)
|
|
283
264
|
],
|
|
284
265
|
version:
|
|
285
|
-
Courier::JourneyTemplateCreateRequest::Notification::Content::Version::OrSymbol
|
|
286
|
-
scope:
|
|
287
|
-
Courier::JourneyTemplateCreateRequest::Notification::Content::Scope::OrSymbol
|
|
266
|
+
Courier::JourneyTemplateCreateRequest::Notification::Content::Version::OrSymbol
|
|
288
267
|
}
|
|
289
268
|
)
|
|
290
269
|
end
|
|
@@ -319,40 +298,6 @@ module Courier
|
|
|
319
298
|
def self.values
|
|
320
299
|
end
|
|
321
300
|
end
|
|
322
|
-
|
|
323
|
-
module Scope
|
|
324
|
-
extend Courier::Internal::Type::Enum
|
|
325
|
-
|
|
326
|
-
TaggedSymbol =
|
|
327
|
-
T.type_alias do
|
|
328
|
-
T.all(
|
|
329
|
-
Symbol,
|
|
330
|
-
Courier::JourneyTemplateCreateRequest::Notification::Content::Scope
|
|
331
|
-
)
|
|
332
|
-
end
|
|
333
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
334
|
-
|
|
335
|
-
DEFAULT =
|
|
336
|
-
T.let(
|
|
337
|
-
:default,
|
|
338
|
-
Courier::JourneyTemplateCreateRequest::Notification::Content::Scope::TaggedSymbol
|
|
339
|
-
)
|
|
340
|
-
STRICT =
|
|
341
|
-
T.let(
|
|
342
|
-
:strict,
|
|
343
|
-
Courier::JourneyTemplateCreateRequest::Notification::Content::Scope::TaggedSymbol
|
|
344
|
-
)
|
|
345
|
-
|
|
346
|
-
sig do
|
|
347
|
-
override.returns(
|
|
348
|
-
T::Array[
|
|
349
|
-
Courier::JourneyTemplateCreateRequest::Notification::Content::Scope::TaggedSymbol
|
|
350
|
-
]
|
|
351
|
-
)
|
|
352
|
-
end
|
|
353
|
-
def self.values
|
|
354
|
-
end
|
|
355
|
-
end
|
|
356
301
|
end
|
|
357
302
|
|
|
358
303
|
class Subscription < Courier::Internal::Type::BaseModel
|
|
@@ -166,22 +166,6 @@ module Courier
|
|
|
166
166
|
end
|
|
167
167
|
attr_accessor :version
|
|
168
168
|
|
|
169
|
-
sig do
|
|
170
|
-
returns(
|
|
171
|
-
T.nilable(
|
|
172
|
-
Courier::JourneyTemplateGetResponse::Content::Scope::TaggedSymbol
|
|
173
|
-
)
|
|
174
|
-
)
|
|
175
|
-
end
|
|
176
|
-
attr_reader :scope
|
|
177
|
-
|
|
178
|
-
sig do
|
|
179
|
-
params(
|
|
180
|
-
scope: Courier::JourneyTemplateGetResponse::Content::Scope::OrSymbol
|
|
181
|
-
).void
|
|
182
|
-
end
|
|
183
|
-
attr_writer :scope
|
|
184
|
-
|
|
185
169
|
sig do
|
|
186
170
|
params(
|
|
187
171
|
elements:
|
|
@@ -198,11 +182,10 @@ module Courier
|
|
|
198
182
|
)
|
|
199
183
|
],
|
|
200
184
|
version:
|
|
201
|
-
Courier::JourneyTemplateGetResponse::Content::Version::OrSymbol
|
|
202
|
-
scope: Courier::JourneyTemplateGetResponse::Content::Scope::OrSymbol
|
|
185
|
+
Courier::JourneyTemplateGetResponse::Content::Version::OrSymbol
|
|
203
186
|
).returns(T.attached_class)
|
|
204
187
|
end
|
|
205
|
-
def self.new(elements:, version
|
|
188
|
+
def self.new(elements:, version:)
|
|
206
189
|
end
|
|
207
190
|
|
|
208
191
|
sig do
|
|
@@ -210,9 +193,7 @@ module Courier
|
|
|
210
193
|
{
|
|
211
194
|
elements: T::Array[Courier::ElementalNode::Variants],
|
|
212
195
|
version:
|
|
213
|
-
Courier::JourneyTemplateGetResponse::Content::Version::TaggedSymbol
|
|
214
|
-
scope:
|
|
215
|
-
Courier::JourneyTemplateGetResponse::Content::Scope::TaggedSymbol
|
|
196
|
+
Courier::JourneyTemplateGetResponse::Content::Version::TaggedSymbol
|
|
216
197
|
}
|
|
217
198
|
)
|
|
218
199
|
end
|
|
@@ -247,37 +228,6 @@ module Courier
|
|
|
247
228
|
def self.values
|
|
248
229
|
end
|
|
249
230
|
end
|
|
250
|
-
|
|
251
|
-
module Scope
|
|
252
|
-
extend Courier::Internal::Type::Enum
|
|
253
|
-
|
|
254
|
-
TaggedSymbol =
|
|
255
|
-
T.type_alias do
|
|
256
|
-
T.all(Symbol, Courier::JourneyTemplateGetResponse::Content::Scope)
|
|
257
|
-
end
|
|
258
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
259
|
-
|
|
260
|
-
DEFAULT =
|
|
261
|
-
T.let(
|
|
262
|
-
:default,
|
|
263
|
-
Courier::JourneyTemplateGetResponse::Content::Scope::TaggedSymbol
|
|
264
|
-
)
|
|
265
|
-
STRICT =
|
|
266
|
-
T.let(
|
|
267
|
-
:strict,
|
|
268
|
-
Courier::JourneyTemplateGetResponse::Content::Scope::TaggedSymbol
|
|
269
|
-
)
|
|
270
|
-
|
|
271
|
-
sig do
|
|
272
|
-
override.returns(
|
|
273
|
-
T::Array[
|
|
274
|
-
Courier::JourneyTemplateGetResponse::Content::Scope::TaggedSymbol
|
|
275
|
-
]
|
|
276
|
-
)
|
|
277
|
-
end
|
|
278
|
-
def self.values
|
|
279
|
-
end
|
|
280
|
-
end
|
|
281
231
|
end
|
|
282
232
|
|
|
283
233
|
module State
|
|
@@ -211,23 +211,6 @@ module Courier
|
|
|
211
211
|
end
|
|
212
212
|
attr_accessor :version
|
|
213
213
|
|
|
214
|
-
sig do
|
|
215
|
-
returns(
|
|
216
|
-
T.nilable(
|
|
217
|
-
Courier::JourneyTemplateReplaceRequest::Notification::Content::Scope::OrSymbol
|
|
218
|
-
)
|
|
219
|
-
)
|
|
220
|
-
end
|
|
221
|
-
attr_reader :scope
|
|
222
|
-
|
|
223
|
-
sig do
|
|
224
|
-
params(
|
|
225
|
-
scope:
|
|
226
|
-
Courier::JourneyTemplateReplaceRequest::Notification::Content::Scope::OrSymbol
|
|
227
|
-
).void
|
|
228
|
-
end
|
|
229
|
-
attr_writer :scope
|
|
230
|
-
|
|
231
214
|
sig do
|
|
232
215
|
params(
|
|
233
216
|
elements:
|
|
@@ -244,12 +227,10 @@ module Courier
|
|
|
244
227
|
)
|
|
245
228
|
],
|
|
246
229
|
version:
|
|
247
|
-
Courier::JourneyTemplateReplaceRequest::Notification::Content::Version::OrSymbol
|
|
248
|
-
scope:
|
|
249
|
-
Courier::JourneyTemplateReplaceRequest::Notification::Content::Scope::OrSymbol
|
|
230
|
+
Courier::JourneyTemplateReplaceRequest::Notification::Content::Version::OrSymbol
|
|
250
231
|
).returns(T.attached_class)
|
|
251
232
|
end
|
|
252
|
-
def self.new(elements:, version
|
|
233
|
+
def self.new(elements:, version:)
|
|
253
234
|
end
|
|
254
235
|
|
|
255
236
|
sig do
|
|
@@ -269,9 +250,7 @@ module Courier
|
|
|
269
250
|
)
|
|
270
251
|
],
|
|
271
252
|
version:
|
|
272
|
-
Courier::JourneyTemplateReplaceRequest::Notification::Content::Version::OrSymbol
|
|
273
|
-
scope:
|
|
274
|
-
Courier::JourneyTemplateReplaceRequest::Notification::Content::Scope::OrSymbol
|
|
253
|
+
Courier::JourneyTemplateReplaceRequest::Notification::Content::Version::OrSymbol
|
|
275
254
|
}
|
|
276
255
|
)
|
|
277
256
|
end
|
|
@@ -306,40 +285,6 @@ module Courier
|
|
|
306
285
|
def self.values
|
|
307
286
|
end
|
|
308
287
|
end
|
|
309
|
-
|
|
310
|
-
module Scope
|
|
311
|
-
extend Courier::Internal::Type::Enum
|
|
312
|
-
|
|
313
|
-
TaggedSymbol =
|
|
314
|
-
T.type_alias do
|
|
315
|
-
T.all(
|
|
316
|
-
Symbol,
|
|
317
|
-
Courier::JourneyTemplateReplaceRequest::Notification::Content::Scope
|
|
318
|
-
)
|
|
319
|
-
end
|
|
320
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
321
|
-
|
|
322
|
-
DEFAULT =
|
|
323
|
-
T.let(
|
|
324
|
-
:default,
|
|
325
|
-
Courier::JourneyTemplateReplaceRequest::Notification::Content::Scope::TaggedSymbol
|
|
326
|
-
)
|
|
327
|
-
STRICT =
|
|
328
|
-
T.let(
|
|
329
|
-
:strict,
|
|
330
|
-
Courier::JourneyTemplateReplaceRequest::Notification::Content::Scope::TaggedSymbol
|
|
331
|
-
)
|
|
332
|
-
|
|
333
|
-
sig do
|
|
334
|
-
override.returns(
|
|
335
|
-
T::Array[
|
|
336
|
-
Courier::JourneyTemplateReplaceRequest::Notification::Content::Scope::TaggedSymbol
|
|
337
|
-
]
|
|
338
|
-
)
|
|
339
|
-
end
|
|
340
|
-
def self.values
|
|
341
|
-
end
|
|
342
|
-
end
|
|
343
288
|
end
|
|
344
289
|
|
|
345
290
|
class Subscription < Courier::Internal::Type::BaseModel
|
|
@@ -82,28 +82,6 @@ module Courier
|
|
|
82
82
|
end
|
|
83
83
|
attr_accessor :elements
|
|
84
84
|
|
|
85
|
-
# How template variables read the data sent with the message. Under `strict`, data
|
|
86
|
-
# fields are read only through the `data.` prefix, as in `{{data.name}}`. Under
|
|
87
|
-
# `default`, `data` is spread onto the root, so `{{name}}` resolves and
|
|
88
|
-
# `{{data.name}}` renders as an empty string. This request replaces the stored
|
|
89
|
-
# content, so omitting `scope` resets it to `default`.
|
|
90
|
-
sig do
|
|
91
|
-
returns(
|
|
92
|
-
T.nilable(
|
|
93
|
-
Courier::NotificationContentPutRequest::Content::Scope::OrSymbol
|
|
94
|
-
)
|
|
95
|
-
)
|
|
96
|
-
end
|
|
97
|
-
attr_reader :scope
|
|
98
|
-
|
|
99
|
-
sig do
|
|
100
|
-
params(
|
|
101
|
-
scope:
|
|
102
|
-
Courier::NotificationContentPutRequest::Content::Scope::OrSymbol
|
|
103
|
-
).void
|
|
104
|
-
end
|
|
105
|
-
attr_writer :scope
|
|
106
|
-
|
|
107
85
|
# Content version identifier (e.g., `2022-01-01`). Optional; server defaults when
|
|
108
86
|
# omitted.
|
|
109
87
|
sig { returns(T.nilable(String)) }
|
|
@@ -128,19 +106,11 @@ module Courier
|
|
|
128
106
|
Courier::ElementalHTMLNodeWithType::OrHash
|
|
129
107
|
)
|
|
130
108
|
],
|
|
131
|
-
scope:
|
|
132
|
-
Courier::NotificationContentPutRequest::Content::Scope::OrSymbol,
|
|
133
109
|
version: String
|
|
134
110
|
).returns(T.attached_class)
|
|
135
111
|
end
|
|
136
112
|
def self.new(
|
|
137
113
|
elements:,
|
|
138
|
-
# How template variables read the data sent with the message. Under `strict`, data
|
|
139
|
-
# fields are read only through the `data.` prefix, as in `{{data.name}}`. Under
|
|
140
|
-
# `default`, `data` is spread onto the root, so `{{name}}` resolves and
|
|
141
|
-
# `{{data.name}}` renders as an empty string. This request replaces the stored
|
|
142
|
-
# content, so omitting `scope` resets it to `default`.
|
|
143
|
-
scope: nil,
|
|
144
114
|
# Content version identifier (e.g., `2022-01-01`). Optional; server defaults when
|
|
145
115
|
# omitted.
|
|
146
116
|
version: nil
|
|
@@ -163,53 +133,12 @@ module Courier
|
|
|
163
133
|
Courier::ElementalHTMLNodeWithType
|
|
164
134
|
)
|
|
165
135
|
],
|
|
166
|
-
scope:
|
|
167
|
-
Courier::NotificationContentPutRequest::Content::Scope::OrSymbol,
|
|
168
136
|
version: String
|
|
169
137
|
}
|
|
170
138
|
)
|
|
171
139
|
end
|
|
172
140
|
def to_hash
|
|
173
141
|
end
|
|
174
|
-
|
|
175
|
-
# How template variables read the data sent with the message. Under `strict`, data
|
|
176
|
-
# fields are read only through the `data.` prefix, as in `{{data.name}}`. Under
|
|
177
|
-
# `default`, `data` is spread onto the root, so `{{name}}` resolves and
|
|
178
|
-
# `{{data.name}}` renders as an empty string. This request replaces the stored
|
|
179
|
-
# content, so omitting `scope` resets it to `default`.
|
|
180
|
-
module Scope
|
|
181
|
-
extend Courier::Internal::Type::Enum
|
|
182
|
-
|
|
183
|
-
TaggedSymbol =
|
|
184
|
-
T.type_alias do
|
|
185
|
-
T.all(
|
|
186
|
-
Symbol,
|
|
187
|
-
Courier::NotificationContentPutRequest::Content::Scope
|
|
188
|
-
)
|
|
189
|
-
end
|
|
190
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
191
|
-
|
|
192
|
-
DEFAULT =
|
|
193
|
-
T.let(
|
|
194
|
-
:default,
|
|
195
|
-
Courier::NotificationContentPutRequest::Content::Scope::TaggedSymbol
|
|
196
|
-
)
|
|
197
|
-
STRICT =
|
|
198
|
-
T.let(
|
|
199
|
-
:strict,
|
|
200
|
-
Courier::NotificationContentPutRequest::Content::Scope::TaggedSymbol
|
|
201
|
-
)
|
|
202
|
-
|
|
203
|
-
sig do
|
|
204
|
-
override.returns(
|
|
205
|
-
T::Array[
|
|
206
|
-
Courier::NotificationContentPutRequest::Content::Scope::TaggedSymbol
|
|
207
|
-
]
|
|
208
|
-
)
|
|
209
|
-
end
|
|
210
|
-
def self.values
|
|
211
|
-
end
|
|
212
|
-
end
|
|
213
142
|
end
|
|
214
143
|
end
|
|
215
144
|
end
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationTemplateContent < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Courier::NotificationTemplateContent,
|
|
10
|
+
Courier::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig do
|
|
15
|
+
returns(
|
|
16
|
+
T::Array[
|
|
17
|
+
T.any(
|
|
18
|
+
Courier::ElementalTextNodeWithType,
|
|
19
|
+
Courier::ElementalMetaNodeWithType,
|
|
20
|
+
Courier::ElementalChannelNodeWithType,
|
|
21
|
+
Courier::ElementalImageNodeWithType,
|
|
22
|
+
Courier::ElementalActionNodeWithType,
|
|
23
|
+
Courier::ElementalDividerNodeWithType,
|
|
24
|
+
Courier::ElementalQuoteNodeWithType,
|
|
25
|
+
Courier::ElementalHTMLNodeWithType
|
|
26
|
+
)
|
|
27
|
+
]
|
|
28
|
+
)
|
|
29
|
+
end
|
|
30
|
+
attr_accessor :elements
|
|
31
|
+
|
|
32
|
+
# For example, "2022-01-01"
|
|
33
|
+
sig { returns(String) }
|
|
34
|
+
attr_accessor :version
|
|
35
|
+
|
|
36
|
+
# Elemental content of a notification template. Template variables read the data
|
|
37
|
+
# sent with the message through the `data.` prefix, as in `{{data.name}}`, and the
|
|
38
|
+
# recipient's profile through `profile.`.
|
|
39
|
+
sig do
|
|
40
|
+
params(
|
|
41
|
+
elements:
|
|
42
|
+
T::Array[
|
|
43
|
+
T.any(
|
|
44
|
+
Courier::ElementalTextNodeWithType::OrHash,
|
|
45
|
+
Courier::ElementalMetaNodeWithType::OrHash,
|
|
46
|
+
Courier::ElementalChannelNodeWithType::OrHash,
|
|
47
|
+
Courier::ElementalImageNodeWithType::OrHash,
|
|
48
|
+
Courier::ElementalActionNodeWithType::OrHash,
|
|
49
|
+
Courier::ElementalDividerNodeWithType::OrHash,
|
|
50
|
+
Courier::ElementalQuoteNodeWithType::OrHash,
|
|
51
|
+
Courier::ElementalHTMLNodeWithType::OrHash
|
|
52
|
+
)
|
|
53
|
+
],
|
|
54
|
+
version: String
|
|
55
|
+
).returns(T.attached_class)
|
|
56
|
+
end
|
|
57
|
+
def self.new(
|
|
58
|
+
elements:,
|
|
59
|
+
# For example, "2022-01-01"
|
|
60
|
+
version:
|
|
61
|
+
)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
sig do
|
|
65
|
+
override.returns(
|
|
66
|
+
{
|
|
67
|
+
elements:
|
|
68
|
+
T::Array[
|
|
69
|
+
T.any(
|
|
70
|
+
Courier::ElementalTextNodeWithType,
|
|
71
|
+
Courier::ElementalMetaNodeWithType,
|
|
72
|
+
Courier::ElementalChannelNodeWithType,
|
|
73
|
+
Courier::ElementalImageNodeWithType,
|
|
74
|
+
Courier::ElementalActionNodeWithType,
|
|
75
|
+
Courier::ElementalDividerNodeWithType,
|
|
76
|
+
Courier::ElementalQuoteNodeWithType,
|
|
77
|
+
Courier::ElementalHTMLNodeWithType
|
|
78
|
+
)
|
|
79
|
+
],
|
|
80
|
+
version: String
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
end
|
|
84
|
+
def to_hash
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
@@ -23,10 +23,10 @@ module Courier
|
|
|
23
23
|
attr_writer :brand
|
|
24
24
|
|
|
25
25
|
# Elemental content definition.
|
|
26
|
-
sig { returns(Courier::
|
|
26
|
+
sig { returns(Courier::NotificationTemplateContent) }
|
|
27
27
|
attr_reader :content
|
|
28
28
|
|
|
29
|
-
sig { params(content: Courier::
|
|
29
|
+
sig { params(content: Courier::NotificationTemplateContent::OrHash).void }
|
|
30
30
|
attr_writer :content
|
|
31
31
|
|
|
32
32
|
# Display name for the template.
|
|
@@ -89,7 +89,7 @@ module Courier
|
|
|
89
89
|
sig do
|
|
90
90
|
params(
|
|
91
91
|
brand: T.nilable(Courier::NotificationTemplatePayload::Brand::OrHash),
|
|
92
|
-
content: Courier::
|
|
92
|
+
content: Courier::NotificationTemplateContent::OrHash,
|
|
93
93
|
name: String,
|
|
94
94
|
routing:
|
|
95
95
|
T.nilable(Courier::NotificationTemplatePayload::Routing::OrHash),
|
|
@@ -131,7 +131,7 @@ module Courier
|
|
|
131
131
|
override.returns(
|
|
132
132
|
{
|
|
133
133
|
brand: T.nilable(Courier::NotificationTemplatePayload::Brand),
|
|
134
|
-
content: Courier::
|
|
134
|
+
content: Courier::NotificationTemplateContent,
|
|
135
135
|
name: String,
|
|
136
136
|
routing: T.nilable(Courier::NotificationTemplatePayload::Routing),
|
|
137
137
|
subscription:
|
data/rbi/courier/models.rbi
CHANGED
|
@@ -466,6 +466,8 @@ module Courier
|
|
|
466
466
|
|
|
467
467
|
NotificationTemplateAlias = Courier::Models::NotificationTemplateAlias
|
|
468
468
|
|
|
469
|
+
NotificationTemplateContent = Courier::Models::NotificationTemplateContent
|
|
470
|
+
|
|
469
471
|
NotificationTemplateCreateRequest =
|
|
470
472
|
Courier::Models::NotificationTemplateCreateRequest
|
|
471
473
|
|
|
@@ -84,8 +84,7 @@ module Courier
|
|
|
84
84
|
type content =
|
|
85
85
|
{
|
|
86
86
|
elements: ::Array[Courier::Models::elemental_node],
|
|
87
|
-
version: Courier::Models::JourneyTemplateCreateRequest::Notification::Content::version
|
|
88
|
-
scope: Courier::Models::JourneyTemplateCreateRequest::Notification::Content::scope
|
|
87
|
+
version: Courier::Models::JourneyTemplateCreateRequest::Notification::Content::version
|
|
89
88
|
}
|
|
90
89
|
|
|
91
90
|
class Content < Courier::Internal::Type::BaseModel
|
|
@@ -93,22 +92,14 @@ module Courier
|
|
|
93
92
|
|
|
94
93
|
attr_accessor version: Courier::Models::JourneyTemplateCreateRequest::Notification::Content::version
|
|
95
94
|
|
|
96
|
-
attr_reader scope: Courier::Models::JourneyTemplateCreateRequest::Notification::Content::scope?
|
|
97
|
-
|
|
98
|
-
def scope=: (
|
|
99
|
-
Courier::Models::JourneyTemplateCreateRequest::Notification::Content::scope
|
|
100
|
-
) -> Courier::Models::JourneyTemplateCreateRequest::Notification::Content::scope
|
|
101
|
-
|
|
102
95
|
def initialize: (
|
|
103
96
|
elements: ::Array[Courier::Models::elemental_node],
|
|
104
|
-
version: Courier::Models::JourneyTemplateCreateRequest::Notification::Content::version
|
|
105
|
-
?scope: Courier::Models::JourneyTemplateCreateRequest::Notification::Content::scope
|
|
97
|
+
version: Courier::Models::JourneyTemplateCreateRequest::Notification::Content::version
|
|
106
98
|
) -> void
|
|
107
99
|
|
|
108
100
|
def to_hash: -> {
|
|
109
101
|
elements: ::Array[Courier::Models::elemental_node],
|
|
110
|
-
version: Courier::Models::JourneyTemplateCreateRequest::Notification::Content::version
|
|
111
|
-
scope: Courier::Models::JourneyTemplateCreateRequest::Notification::Content::scope
|
|
102
|
+
version: Courier::Models::JourneyTemplateCreateRequest::Notification::Content::version
|
|
112
103
|
}
|
|
113
104
|
|
|
114
105
|
type version = :"2022-01-01"
|
|
@@ -120,17 +111,6 @@ module Courier
|
|
|
120
111
|
|
|
121
112
|
def self?.values: -> ::Array[Courier::Models::JourneyTemplateCreateRequest::Notification::Content::version]
|
|
122
113
|
end
|
|
123
|
-
|
|
124
|
-
type scope = :default | :strict
|
|
125
|
-
|
|
126
|
-
module Scope
|
|
127
|
-
extend Courier::Internal::Type::Enum
|
|
128
|
-
|
|
129
|
-
DEFAULT: :default
|
|
130
|
-
STRICT: :strict
|
|
131
|
-
|
|
132
|
-
def self?.values: -> ::Array[Courier::Models::JourneyTemplateCreateRequest::Notification::Content::scope]
|
|
133
|
-
end
|
|
134
114
|
end
|
|
135
115
|
|
|
136
116
|
type subscription = { topic_id: String }
|
|
@@ -83,8 +83,7 @@ module Courier
|
|
|
83
83
|
type content =
|
|
84
84
|
{
|
|
85
85
|
elements: ::Array[Courier::Models::elemental_node],
|
|
86
|
-
version: Courier::Models::JourneyTemplateGetResponse::Content::version
|
|
87
|
-
scope: Courier::Models::JourneyTemplateGetResponse::Content::scope
|
|
86
|
+
version: Courier::Models::JourneyTemplateGetResponse::Content::version
|
|
88
87
|
}
|
|
89
88
|
|
|
90
89
|
class Content < Courier::Internal::Type::BaseModel
|
|
@@ -92,22 +91,14 @@ module Courier
|
|
|
92
91
|
|
|
93
92
|
attr_accessor version: Courier::Models::JourneyTemplateGetResponse::Content::version
|
|
94
93
|
|
|
95
|
-
attr_reader scope: Courier::Models::JourneyTemplateGetResponse::Content::scope?
|
|
96
|
-
|
|
97
|
-
def scope=: (
|
|
98
|
-
Courier::Models::JourneyTemplateGetResponse::Content::scope
|
|
99
|
-
) -> Courier::Models::JourneyTemplateGetResponse::Content::scope
|
|
100
|
-
|
|
101
94
|
def initialize: (
|
|
102
95
|
elements: ::Array[Courier::Models::elemental_node],
|
|
103
|
-
version: Courier::Models::JourneyTemplateGetResponse::Content::version
|
|
104
|
-
?scope: Courier::Models::JourneyTemplateGetResponse::Content::scope
|
|
96
|
+
version: Courier::Models::JourneyTemplateGetResponse::Content::version
|
|
105
97
|
) -> void
|
|
106
98
|
|
|
107
99
|
def to_hash: -> {
|
|
108
100
|
elements: ::Array[Courier::Models::elemental_node],
|
|
109
|
-
version: Courier::Models::JourneyTemplateGetResponse::Content::version
|
|
110
|
-
scope: Courier::Models::JourneyTemplateGetResponse::Content::scope
|
|
101
|
+
version: Courier::Models::JourneyTemplateGetResponse::Content::version
|
|
111
102
|
}
|
|
112
103
|
|
|
113
104
|
type version = :"2022-01-01"
|
|
@@ -119,17 +110,6 @@ module Courier
|
|
|
119
110
|
|
|
120
111
|
def self?.values: -> ::Array[Courier::Models::JourneyTemplateGetResponse::Content::version]
|
|
121
112
|
end
|
|
122
|
-
|
|
123
|
-
type scope = :default | :strict
|
|
124
|
-
|
|
125
|
-
module Scope
|
|
126
|
-
extend Courier::Internal::Type::Enum
|
|
127
|
-
|
|
128
|
-
DEFAULT: :default
|
|
129
|
-
STRICT: :strict
|
|
130
|
-
|
|
131
|
-
def self?.values: -> ::Array[Courier::Models::JourneyTemplateGetResponse::Content::scope]
|
|
132
|
-
end
|
|
133
113
|
end
|
|
134
114
|
|
|
135
115
|
type state = :DRAFT | :PUBLISHED
|
|
@@ -72,8 +72,7 @@ module Courier
|
|
|
72
72
|
type content =
|
|
73
73
|
{
|
|
74
74
|
elements: ::Array[Courier::Models::elemental_node],
|
|
75
|
-
version: Courier::Models::JourneyTemplateReplaceRequest::Notification::Content::version
|
|
76
|
-
scope: Courier::Models::JourneyTemplateReplaceRequest::Notification::Content::scope
|
|
75
|
+
version: Courier::Models::JourneyTemplateReplaceRequest::Notification::Content::version
|
|
77
76
|
}
|
|
78
77
|
|
|
79
78
|
class Content < Courier::Internal::Type::BaseModel
|
|
@@ -81,22 +80,14 @@ module Courier
|
|
|
81
80
|
|
|
82
81
|
attr_accessor version: Courier::Models::JourneyTemplateReplaceRequest::Notification::Content::version
|
|
83
82
|
|
|
84
|
-
attr_reader scope: Courier::Models::JourneyTemplateReplaceRequest::Notification::Content::scope?
|
|
85
|
-
|
|
86
|
-
def scope=: (
|
|
87
|
-
Courier::Models::JourneyTemplateReplaceRequest::Notification::Content::scope
|
|
88
|
-
) -> Courier::Models::JourneyTemplateReplaceRequest::Notification::Content::scope
|
|
89
|
-
|
|
90
83
|
def initialize: (
|
|
91
84
|
elements: ::Array[Courier::Models::elemental_node],
|
|
92
|
-
version: Courier::Models::JourneyTemplateReplaceRequest::Notification::Content::version
|
|
93
|
-
?scope: Courier::Models::JourneyTemplateReplaceRequest::Notification::Content::scope
|
|
85
|
+
version: Courier::Models::JourneyTemplateReplaceRequest::Notification::Content::version
|
|
94
86
|
) -> void
|
|
95
87
|
|
|
96
88
|
def to_hash: -> {
|
|
97
89
|
elements: ::Array[Courier::Models::elemental_node],
|
|
98
|
-
version: Courier::Models::JourneyTemplateReplaceRequest::Notification::Content::version
|
|
99
|
-
scope: Courier::Models::JourneyTemplateReplaceRequest::Notification::Content::scope
|
|
90
|
+
version: Courier::Models::JourneyTemplateReplaceRequest::Notification::Content::version
|
|
100
91
|
}
|
|
101
92
|
|
|
102
93
|
type version = :"2022-01-01"
|
|
@@ -108,17 +99,6 @@ module Courier
|
|
|
108
99
|
|
|
109
100
|
def self?.values: -> ::Array[Courier::Models::JourneyTemplateReplaceRequest::Notification::Content::version]
|
|
110
101
|
end
|
|
111
|
-
|
|
112
|
-
type scope = :default | :strict
|
|
113
|
-
|
|
114
|
-
module Scope
|
|
115
|
-
extend Courier::Internal::Type::Enum
|
|
116
|
-
|
|
117
|
-
DEFAULT: :default
|
|
118
|
-
STRICT: :strict
|
|
119
|
-
|
|
120
|
-
def self?.values: -> ::Array[Courier::Models::JourneyTemplateReplaceRequest::Notification::Content::scope]
|
|
121
|
-
end
|
|
122
102
|
end
|
|
123
103
|
|
|
124
104
|
type subscription = { topic_id: String }
|
|
@@ -26,47 +26,24 @@ module Courier
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
type content =
|
|
29
|
-
{
|
|
30
|
-
elements: ::Array[Courier::Models::elemental_node],
|
|
31
|
-
scope: Courier::Models::NotificationContentPutRequest::Content::scope,
|
|
32
|
-
version: String
|
|
33
|
-
}
|
|
29
|
+
{ elements: ::Array[Courier::Models::elemental_node], version: String }
|
|
34
30
|
|
|
35
31
|
class Content < Courier::Internal::Type::BaseModel
|
|
36
32
|
attr_accessor elements: ::Array[Courier::Models::elemental_node]
|
|
37
33
|
|
|
38
|
-
attr_reader scope: Courier::Models::NotificationContentPutRequest::Content::scope?
|
|
39
|
-
|
|
40
|
-
def scope=: (
|
|
41
|
-
Courier::Models::NotificationContentPutRequest::Content::scope
|
|
42
|
-
) -> Courier::Models::NotificationContentPutRequest::Content::scope
|
|
43
|
-
|
|
44
34
|
attr_reader version: String?
|
|
45
35
|
|
|
46
36
|
def version=: (String) -> String
|
|
47
37
|
|
|
48
38
|
def initialize: (
|
|
49
39
|
elements: ::Array[Courier::Models::elemental_node],
|
|
50
|
-
?scope: Courier::Models::NotificationContentPutRequest::Content::scope,
|
|
51
40
|
?version: String
|
|
52
41
|
) -> void
|
|
53
42
|
|
|
54
43
|
def to_hash: -> {
|
|
55
44
|
elements: ::Array[Courier::Models::elemental_node],
|
|
56
|
-
scope: Courier::Models::NotificationContentPutRequest::Content::scope,
|
|
57
45
|
version: String
|
|
58
46
|
}
|
|
59
|
-
|
|
60
|
-
type scope = :default | :strict
|
|
61
|
-
|
|
62
|
-
module Scope
|
|
63
|
-
extend Courier::Internal::Type::Enum
|
|
64
|
-
|
|
65
|
-
DEFAULT: :default
|
|
66
|
-
STRICT: :strict
|
|
67
|
-
|
|
68
|
-
def self?.values: -> ::Array[Courier::Models::NotificationContentPutRequest::Content::scope]
|
|
69
|
-
end
|
|
70
47
|
end
|
|
71
48
|
end
|
|
72
49
|
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type notification_template_content =
|
|
4
|
+
{ elements: ::Array[Courier::Models::elemental_node], version: String }
|
|
5
|
+
|
|
6
|
+
class NotificationTemplateContent < Courier::Internal::Type::BaseModel
|
|
7
|
+
attr_accessor elements: ::Array[Courier::Models::elemental_node]
|
|
8
|
+
|
|
9
|
+
attr_accessor version: String
|
|
10
|
+
|
|
11
|
+
def initialize: (
|
|
12
|
+
elements: ::Array[Courier::Models::elemental_node],
|
|
13
|
+
version: String
|
|
14
|
+
) -> void
|
|
15
|
+
|
|
16
|
+
def to_hash: -> {
|
|
17
|
+
elements: ::Array[Courier::Models::elemental_node],
|
|
18
|
+
version: String
|
|
19
|
+
}
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -3,7 +3,7 @@ module Courier
|
|
|
3
3
|
type notification_template_payload =
|
|
4
4
|
{
|
|
5
5
|
brand: Courier::NotificationTemplatePayload::Brand?,
|
|
6
|
-
content: Courier::
|
|
6
|
+
content: Courier::NotificationTemplateContent,
|
|
7
7
|
name: String,
|
|
8
8
|
routing: Courier::NotificationTemplatePayload::Routing?,
|
|
9
9
|
subscription: Courier::NotificationTemplatePayload::Subscription?,
|
|
@@ -14,7 +14,7 @@ module Courier
|
|
|
14
14
|
class NotificationTemplatePayload < Courier::Internal::Type::BaseModel
|
|
15
15
|
attr_accessor brand: Courier::NotificationTemplatePayload::Brand?
|
|
16
16
|
|
|
17
|
-
attr_accessor content: Courier::
|
|
17
|
+
attr_accessor content: Courier::NotificationTemplateContent
|
|
18
18
|
|
|
19
19
|
attr_accessor name: String
|
|
20
20
|
|
|
@@ -28,7 +28,7 @@ module Courier
|
|
|
28
28
|
|
|
29
29
|
def initialize: (
|
|
30
30
|
brand: Courier::NotificationTemplatePayload::Brand?,
|
|
31
|
-
content: Courier::
|
|
31
|
+
content: Courier::NotificationTemplateContent,
|
|
32
32
|
name: String,
|
|
33
33
|
routing: Courier::NotificationTemplatePayload::Routing?,
|
|
34
34
|
subscription: Courier::NotificationTemplatePayload::Subscription?,
|
|
@@ -38,7 +38,7 @@ module Courier
|
|
|
38
38
|
|
|
39
39
|
def to_hash: -> {
|
|
40
40
|
brand: Courier::NotificationTemplatePayload::Brand?,
|
|
41
|
-
content: Courier::
|
|
41
|
+
content: Courier::NotificationTemplateContent,
|
|
42
42
|
name: String,
|
|
43
43
|
routing: Courier::NotificationTemplatePayload::Routing?,
|
|
44
44
|
subscription: Courier::NotificationTemplatePayload::Subscription?,
|
data/sig/courier/models.rbs
CHANGED
|
@@ -451,6 +451,8 @@ module Courier
|
|
|
451
451
|
|
|
452
452
|
module NotificationTemplateAlias = Courier::Models::NotificationTemplateAlias
|
|
453
453
|
|
|
454
|
+
class NotificationTemplateContent = Courier::Models::NotificationTemplateContent
|
|
455
|
+
|
|
454
456
|
class NotificationTemplateCreateRequest = Courier::Models::NotificationTemplateCreateRequest
|
|
455
457
|
|
|
456
458
|
class NotificationTemplateEmail = Courier::Models::NotificationTemplateEmail
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: trycourier
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.
|
|
4
|
+
version: 7.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Courier
|
|
@@ -319,6 +319,7 @@ files:
|
|
|
319
319
|
- lib/courier/models/notification_retrieve_content_response.rb
|
|
320
320
|
- lib/courier/models/notification_retrieve_params.rb
|
|
321
321
|
- lib/courier/models/notification_template_alias.rb
|
|
322
|
+
- lib/courier/models/notification_template_content.rb
|
|
322
323
|
- lib/courier/models/notification_template_create_request.rb
|
|
323
324
|
- lib/courier/models/notification_template_email.rb
|
|
324
325
|
- lib/courier/models/notification_template_payload.rb
|
|
@@ -851,6 +852,7 @@ files:
|
|
|
851
852
|
- rbi/courier/models/notification_retrieve_content_response.rbi
|
|
852
853
|
- rbi/courier/models/notification_retrieve_params.rbi
|
|
853
854
|
- rbi/courier/models/notification_template_alias.rbi
|
|
855
|
+
- rbi/courier/models/notification_template_content.rbi
|
|
854
856
|
- rbi/courier/models/notification_template_create_request.rbi
|
|
855
857
|
- rbi/courier/models/notification_template_email.rbi
|
|
856
858
|
- rbi/courier/models/notification_template_payload.rbi
|
|
@@ -1382,6 +1384,7 @@ files:
|
|
|
1382
1384
|
- sig/courier/models/notification_retrieve_content_response.rbs
|
|
1383
1385
|
- sig/courier/models/notification_retrieve_params.rbs
|
|
1384
1386
|
- sig/courier/models/notification_template_alias.rbs
|
|
1387
|
+
- sig/courier/models/notification_template_content.rbs
|
|
1385
1388
|
- sig/courier/models/notification_template_create_request.rbs
|
|
1386
1389
|
- sig/courier/models/notification_template_email.rbs
|
|
1387
1390
|
- sig/courier/models/notification_template_payload.rbs
|