trycourier 6.4.0 → 6.4.2

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.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -1
  4. data/lib/courier/models/elemental_action_node.rb +123 -0
  5. data/lib/courier/models/elemental_action_node_with_type.rb +3 -1
  6. data/lib/courier/models/elemental_channel_node.rb +1 -1
  7. data/lib/courier/models/elemental_divider_node.rb +18 -0
  8. data/lib/courier/models/elemental_divider_node_with_type.rb +3 -1
  9. data/lib/courier/models/elemental_html_node.rb +33 -0
  10. data/lib/courier/models/elemental_html_node_with_type.rb +5 -1
  11. data/lib/courier/models/elemental_image_node.rb +74 -0
  12. data/lib/courier/models/elemental_image_node_with_type.rb +3 -1
  13. data/lib/courier/models/elemental_meta_node.rb +23 -0
  14. data/lib/courier/models/elemental_meta_node_with_type.rb +5 -1
  15. data/lib/courier/models/elemental_node.rb +9 -18
  16. data/lib/courier/models/elemental_quote_node.rb +72 -0
  17. data/lib/courier/models/elemental_quote_node_with_type.rb +3 -1
  18. data/lib/courier/models/elemental_text_node.rb +134 -0
  19. data/lib/courier/models/elemental_text_node_with_type.rb +3 -1
  20. data/lib/courier/models/locales.rb +18 -0
  21. data/lib/courier/models.rb +19 -0
  22. data/lib/courier/version.rb +1 -1
  23. data/lib/courier.rb +8 -0
  24. data/rbi/courier/models/elemental_action_node.rbi +153 -0
  25. data/rbi/courier/models/elemental_action_node_with_type.rbi +2 -1
  26. data/rbi/courier/models/elemental_divider_node.rbi +28 -0
  27. data/rbi/courier/models/elemental_divider_node_with_type.rbi +2 -1
  28. data/rbi/courier/models/elemental_html_node.rbi +52 -0
  29. data/rbi/courier/models/elemental_html_node_with_type.rbi +4 -1
  30. data/rbi/courier/models/elemental_image_node.rbi +94 -0
  31. data/rbi/courier/models/elemental_image_node_with_type.rbi +2 -1
  32. data/rbi/courier/models/elemental_meta_node.rbi +30 -0
  33. data/rbi/courier/models/elemental_meta_node_with_type.rbi +4 -1
  34. data/rbi/courier/models/elemental_node.rbi +1 -10
  35. data/rbi/courier/models/elemental_quote_node.rbi +95 -0
  36. data/rbi/courier/models/elemental_quote_node_with_type.rbi +2 -1
  37. data/rbi/courier/models/elemental_text_node.rbi +177 -0
  38. data/rbi/courier/models/elemental_text_node_with_type.rbi +2 -1
  39. data/rbi/courier/models/locales.rbi +27 -0
  40. data/rbi/courier/models.rbi +18 -0
  41. data/sig/courier/models/elemental_action_node.rbs +112 -0
  42. data/sig/courier/models/elemental_action_node_with_type.rbs +1 -1
  43. data/sig/courier/models/elemental_divider_node.rbs +15 -0
  44. data/sig/courier/models/elemental_divider_node_with_type.rbs +1 -1
  45. data/sig/courier/models/elemental_html_node.rbs +23 -0
  46. data/sig/courier/models/elemental_html_node_with_type.rbs +1 -1
  47. data/sig/courier/models/elemental_image_node.rbs +71 -0
  48. data/sig/courier/models/elemental_image_node_with_type.rbs +1 -1
  49. data/sig/courier/models/elemental_meta_node.rbs +15 -0
  50. data/sig/courier/models/elemental_meta_node_with_type.rbs +1 -1
  51. data/sig/courier/models/elemental_quote_node.rbs +66 -0
  52. data/sig/courier/models/elemental_quote_node_with_type.rbs +1 -1
  53. data/sig/courier/models/elemental_text_node.rbs +127 -0
  54. data/sig/courier/models/elemental_text_node_with_type.rbs +1 -1
  55. data/sig/courier/models/locales.rbs +17 -0
  56. data/sig/courier/models.rbs +18 -0
  57. metadata +26 -2
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Courier
4
4
  module Models
5
- class ElementalMetaNodeWithType < Courier::Models::ElementalBaseNode
5
+ class ElementalMetaNodeWithType < Courier::Models::ElementalMetaNode
6
6
  OrHash =
7
7
  T.type_alias do
8
8
  T.any(Courier::ElementalMetaNodeWithType, Courier::Internal::AnyHash)
@@ -18,6 +18,9 @@ module Courier
18
18
  end
19
19
  attr_writer :type
20
20
 
21
+ # The meta element contains information describing the notification that may be
22
+ # used by a particular channel or provider. One important field is the title field
23
+ # which will be used as the title for channels that support it.
21
24
  sig do
22
25
  params(
23
26
  type: Courier::ElementalMetaNodeWithType::Type::OrSymbol
@@ -2,16 +2,7 @@
2
2
 
3
3
  module Courier
4
4
  module Models
5
- # The channel element allows a notification to be customized based on which
6
- # channel it is sent through. For example, you may want to display a detailed
7
- # message when the notification is sent through email, and a more concise message
8
- # in a push notification. Channel elements are only valid as top-level elements;
9
- # you cannot nest channel elements. If there is a channel element specified at the
10
- # top-level of the document, all sibling elements must be channel elements. Note:
11
- # As an alternative, most elements support a `channel` property. Which allows you
12
- # to selectively display an individual element on a per channel basis. See the
13
- # [control flow docs](https://www.courier.com/docs/platform/content/elemental/control-flow/)
14
- # for more details.
5
+ # Represents a body of text to be rendered inside of the notification.
15
6
  module ElementalNode
16
7
  extend Courier::Internal::Type::Union
17
8
 
@@ -0,0 +1,95 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ class ElementalQuoteNode < Courier::Models::ElementalBaseNode
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Courier::ElementalQuoteNode, Courier::Internal::AnyHash)
9
+ end
10
+
11
+ # The text value of the quote.
12
+ sig { returns(String) }
13
+ attr_accessor :content
14
+
15
+ # Alignment of the quote.
16
+ sig { returns(T.nilable(Courier::Alignment::OrSymbol)) }
17
+ attr_accessor :align
18
+
19
+ # CSS border color property. For example, `#fff`
20
+ sig { returns(T.nilable(String)) }
21
+ attr_accessor :border_color
22
+
23
+ # CSS px font size for this quote block, e.g. `16px`. Overrides the size of the
24
+ # `text_style` preset. Email only.
25
+ sig { returns(T.nilable(String)) }
26
+ attr_accessor :font_size
27
+
28
+ # CSS line height for this quote block, as a px value or a unitless multiplier,
29
+ # e.g. `24px` or `1.5`. Email only.
30
+ sig { returns(T.nilable(String)) }
31
+ attr_accessor :line_height
32
+
33
+ # Region specific content. See
34
+ # [locales docs](https://www.courier.com/docs/platform/content/elemental/locales/)
35
+ # for more details.
36
+ sig { returns(T.nilable(T::Hash[Symbol, Courier::LocaleItem])) }
37
+ attr_accessor :locales
38
+
39
+ sig { returns(T.nilable(Courier::TextStyle::OrSymbol)) }
40
+ attr_reader :text_style
41
+
42
+ sig { params(text_style: Courier::TextStyle::OrSymbol).void }
43
+ attr_writer :text_style
44
+
45
+ # Renders a quote block.
46
+ sig do
47
+ params(
48
+ content: String,
49
+ align: T.nilable(Courier::Alignment::OrSymbol),
50
+ border_color: T.nilable(String),
51
+ font_size: T.nilable(String),
52
+ line_height: T.nilable(String),
53
+ locales: T.nilable(T::Hash[Symbol, Courier::LocaleItem::OrHash]),
54
+ text_style: Courier::TextStyle::OrSymbol
55
+ ).returns(T.attached_class)
56
+ end
57
+ def self.new(
58
+ # The text value of the quote.
59
+ content:,
60
+ # Alignment of the quote.
61
+ align: nil,
62
+ # CSS border color property. For example, `#fff`
63
+ border_color: nil,
64
+ # CSS px font size for this quote block, e.g. `16px`. Overrides the size of the
65
+ # `text_style` preset. Email only.
66
+ font_size: nil,
67
+ # CSS line height for this quote block, as a px value or a unitless multiplier,
68
+ # e.g. `24px` or `1.5`. Email only.
69
+ line_height: nil,
70
+ # Region specific content. See
71
+ # [locales docs](https://www.courier.com/docs/platform/content/elemental/locales/)
72
+ # for more details.
73
+ locales: nil,
74
+ text_style: nil
75
+ )
76
+ end
77
+
78
+ sig do
79
+ override.returns(
80
+ {
81
+ content: String,
82
+ align: T.nilable(Courier::Alignment::OrSymbol),
83
+ border_color: T.nilable(String),
84
+ font_size: T.nilable(String),
85
+ line_height: T.nilable(String),
86
+ locales: T.nilable(T::Hash[Symbol, Courier::LocaleItem]),
87
+ text_style: Courier::TextStyle::OrSymbol
88
+ }
89
+ )
90
+ end
91
+ def to_hash
92
+ end
93
+ end
94
+ end
95
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Courier
4
4
  module Models
5
- class ElementalQuoteNodeWithType < Courier::Models::ElementalBaseNode
5
+ class ElementalQuoteNodeWithType < Courier::Models::ElementalQuoteNode
6
6
  OrHash =
7
7
  T.type_alias do
8
8
  T.any(Courier::ElementalQuoteNodeWithType, Courier::Internal::AnyHash)
@@ -18,6 +18,7 @@ module Courier
18
18
  end
19
19
  attr_writer :type
20
20
 
21
+ # Renders a quote block.
21
22
  sig do
22
23
  params(
23
24
  type: Courier::ElementalQuoteNodeWithType::Type::OrSymbol
@@ -0,0 +1,177 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ class ElementalTextNode < Courier::Models::ElementalBaseNode
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Courier::ElementalTextNode, Courier::Internal::AnyHash)
9
+ end
10
+
11
+ # The text content displayed in the notification. Either this field must be
12
+ # specified, or the elements field
13
+ sig { returns(String) }
14
+ attr_accessor :content
15
+
16
+ # Text alignment.
17
+ sig { returns(T.nilable(Courier::ElementalTextNode::Align::OrSymbol)) }
18
+ attr_reader :align
19
+
20
+ sig { params(align: Courier::ElementalTextNode::Align::OrSymbol).void }
21
+ attr_writer :align
22
+
23
+ # Apply bold to the text
24
+ sig { returns(T.nilable(String)) }
25
+ attr_accessor :bold
26
+
27
+ # Specifies the color of text. Can be any valid css color value
28
+ sig { returns(T.nilable(String)) }
29
+ attr_accessor :color
30
+
31
+ # CSS px font size for this text block, e.g. `16px`. Overrides the size of the
32
+ # `text_style` preset. Email only.
33
+ sig { returns(T.nilable(String)) }
34
+ attr_accessor :font_size
35
+
36
+ sig { returns(T.nilable(Courier::ElementalTextNode::Format::OrSymbol)) }
37
+ attr_accessor :format_
38
+
39
+ # Apply italics to the text
40
+ sig { returns(T.nilable(String)) }
41
+ attr_accessor :italic
42
+
43
+ # CSS line height for this text block, as a px value or a unitless multiplier,
44
+ # e.g. `24px` or `1.5`. Email only.
45
+ sig { returns(T.nilable(String)) }
46
+ attr_accessor :line_height
47
+
48
+ # Region specific content. See
49
+ # [locales docs](https://www.courier.com/docs/platform/content/elemental/locales/)
50
+ # for more details.
51
+ sig { returns(T.nilable(T::Hash[Symbol, Courier::LocaleItem])) }
52
+ attr_accessor :locales
53
+
54
+ # Apply a strike through the text
55
+ sig { returns(T.nilable(String)) }
56
+ attr_accessor :strikethrough
57
+
58
+ # Allows the text to be rendered as a heading level.
59
+ sig { returns(T.nilable(Courier::TextStyle::OrSymbol)) }
60
+ attr_accessor :text_style
61
+
62
+ # Apply an underline to the text
63
+ sig { returns(T.nilable(String)) }
64
+ attr_accessor :underline
65
+
66
+ # Represents a body of text to be rendered inside of the notification.
67
+ sig do
68
+ params(
69
+ content: String,
70
+ align: Courier::ElementalTextNode::Align::OrSymbol,
71
+ bold: T.nilable(String),
72
+ color: T.nilable(String),
73
+ font_size: T.nilable(String),
74
+ format_: T.nilable(Courier::ElementalTextNode::Format::OrSymbol),
75
+ italic: T.nilable(String),
76
+ line_height: T.nilable(String),
77
+ locales: T.nilable(T::Hash[Symbol, Courier::LocaleItem::OrHash]),
78
+ strikethrough: T.nilable(String),
79
+ text_style: T.nilable(Courier::TextStyle::OrSymbol),
80
+ underline: T.nilable(String)
81
+ ).returns(T.attached_class)
82
+ end
83
+ def self.new(
84
+ # The text content displayed in the notification. Either this field must be
85
+ # specified, or the elements field
86
+ content:,
87
+ # Text alignment.
88
+ align: nil,
89
+ # Apply bold to the text
90
+ bold: nil,
91
+ # Specifies the color of text. Can be any valid css color value
92
+ color: nil,
93
+ # CSS px font size for this text block, e.g. `16px`. Overrides the size of the
94
+ # `text_style` preset. Email only.
95
+ font_size: nil,
96
+ format_: nil,
97
+ # Apply italics to the text
98
+ italic: nil,
99
+ # CSS line height for this text block, as a px value or a unitless multiplier,
100
+ # e.g. `24px` or `1.5`. Email only.
101
+ line_height: nil,
102
+ # Region specific content. See
103
+ # [locales docs](https://www.courier.com/docs/platform/content/elemental/locales/)
104
+ # for more details.
105
+ locales: nil,
106
+ # Apply a strike through the text
107
+ strikethrough: nil,
108
+ # Allows the text to be rendered as a heading level.
109
+ text_style: nil,
110
+ # Apply an underline to the text
111
+ underline: nil
112
+ )
113
+ end
114
+
115
+ sig do
116
+ override.returns(
117
+ {
118
+ content: String,
119
+ align: Courier::ElementalTextNode::Align::OrSymbol,
120
+ bold: T.nilable(String),
121
+ color: T.nilable(String),
122
+ font_size: T.nilable(String),
123
+ format_: T.nilable(Courier::ElementalTextNode::Format::OrSymbol),
124
+ italic: T.nilable(String),
125
+ line_height: T.nilable(String),
126
+ locales: T.nilable(T::Hash[Symbol, Courier::LocaleItem]),
127
+ strikethrough: T.nilable(String),
128
+ text_style: T.nilable(Courier::TextStyle::OrSymbol),
129
+ underline: T.nilable(String)
130
+ }
131
+ )
132
+ end
133
+ def to_hash
134
+ end
135
+
136
+ # Text alignment.
137
+ module Align
138
+ extend Courier::Internal::Type::Enum
139
+
140
+ TaggedSymbol =
141
+ T.type_alias { T.all(Symbol, Courier::ElementalTextNode::Align) }
142
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
143
+
144
+ LEFT = T.let(:left, Courier::ElementalTextNode::Align::TaggedSymbol)
145
+ CENTER = T.let(:center, Courier::ElementalTextNode::Align::TaggedSymbol)
146
+ RIGHT = T.let(:right, Courier::ElementalTextNode::Align::TaggedSymbol)
147
+
148
+ sig do
149
+ override.returns(
150
+ T::Array[Courier::ElementalTextNode::Align::TaggedSymbol]
151
+ )
152
+ end
153
+ def self.values
154
+ end
155
+ end
156
+
157
+ module Format
158
+ extend Courier::Internal::Type::Enum
159
+
160
+ TaggedSymbol =
161
+ T.type_alias { T.all(Symbol, Courier::ElementalTextNode::Format) }
162
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
163
+
164
+ MARKDOWN =
165
+ T.let(:markdown, Courier::ElementalTextNode::Format::TaggedSymbol)
166
+
167
+ sig do
168
+ override.returns(
169
+ T::Array[Courier::ElementalTextNode::Format::TaggedSymbol]
170
+ )
171
+ end
172
+ def self.values
173
+ end
174
+ end
175
+ end
176
+ end
177
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Courier
4
4
  module Models
5
- class ElementalTextNodeWithType < Courier::Models::ElementalBaseNode
5
+ class ElementalTextNodeWithType < Courier::Models::ElementalTextNode
6
6
  OrHash =
7
7
  T.type_alias do
8
8
  T.any(Courier::ElementalTextNodeWithType, Courier::Internal::AnyHash)
@@ -18,6 +18,7 @@ module Courier
18
18
  end
19
19
  attr_writer :type
20
20
 
21
+ # Represents a body of text to be rendered inside of the notification.
21
22
  sig do
22
23
  params(
23
24
  type: Courier::ElementalTextNodeWithType::Type::OrSymbol
@@ -0,0 +1,27 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ class LocaleItem < Courier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias { T.any(Courier::LocaleItem, Courier::Internal::AnyHash) }
8
+
9
+ sig { returns(String) }
10
+ attr_accessor :content
11
+
12
+ sig { params(content: String).returns(T.attached_class) }
13
+ def self.new(content:)
14
+ end
15
+
16
+ sig { override.returns({ content: String }) }
17
+ def to_hash
18
+ end
19
+ end
20
+
21
+ Locales =
22
+ T.let(
23
+ Courier::Internal::Type::HashOf[Courier::LocaleItem],
24
+ Courier::Internal::Type::Converter
25
+ )
26
+ end
27
+ end
@@ -160,6 +160,8 @@ module Courier
160
160
 
161
161
  Discord = Courier::Models::Discord
162
162
 
163
+ ElementalActionNode = Courier::Models::ElementalActionNode
164
+
163
165
  ElementalActionNodeWithType = Courier::Models::ElementalActionNodeWithType
164
166
 
165
167
  ElementalBaseNode = Courier::Models::ElementalBaseNode
@@ -172,18 +174,30 @@ module Courier
172
174
 
173
175
  ElementalContentSugar = Courier::Models::ElementalContentSugar
174
176
 
177
+ ElementalDividerNode = Courier::Models::ElementalDividerNode
178
+
175
179
  ElementalDividerNodeWithType = Courier::Models::ElementalDividerNodeWithType
176
180
 
181
+ ElementalHTMLNode = Courier::Models::ElementalHTMLNode
182
+
177
183
  ElementalHTMLNodeWithType = Courier::Models::ElementalHTMLNodeWithType
178
184
 
185
+ ElementalImageNode = Courier::Models::ElementalImageNode
186
+
179
187
  ElementalImageNodeWithType = Courier::Models::ElementalImageNodeWithType
180
188
 
189
+ ElementalMetaNode = Courier::Models::ElementalMetaNode
190
+
181
191
  ElementalMetaNodeWithType = Courier::Models::ElementalMetaNodeWithType
182
192
 
183
193
  ElementalNode = Courier::Models::ElementalNode
184
194
 
195
+ ElementalQuoteNode = Courier::Models::ElementalQuoteNode
196
+
185
197
  ElementalQuoteNodeWithType = Courier::Models::ElementalQuoteNodeWithType
186
198
 
199
+ ElementalTextNode = Courier::Models::ElementalTextNode
200
+
187
201
  ElementalTextNodeWithType = Courier::Models::ElementalTextNodeWithType
188
202
 
189
203
  ElementWithChecksums = Courier::Models::ElementWithChecksums
@@ -346,6 +360,10 @@ module Courier
346
360
 
347
361
  ListUpdateParams = Courier::Models::ListUpdateParams
348
362
 
363
+ LocaleItem = Courier::Models::LocaleItem
364
+
365
+ Locales = T.let(Courier::Models::Locales, Courier::Internal::Type::Converter)
366
+
349
367
  Logo = Courier::Models::Logo
350
368
 
351
369
  MessageCancelParams = Courier::Models::MessageCancelParams
@@ -0,0 +1,112 @@
1
+ module Courier
2
+ module Models
3
+ type elemental_action_node =
4
+ {
5
+ content: String,
6
+ href: String,
7
+ action_id: String?,
8
+ align: Courier::Models::alignment?,
9
+ background_color: String?,
10
+ border_radius: String?,
11
+ border_size: String?,
12
+ disable_tracking: bool?,
13
+ font_size: String?,
14
+ locales: Courier::Models::locales?,
15
+ padding: String?,
16
+ style: Courier::Models::ElementalActionNode::style?
17
+ }
18
+
19
+ class ElementalActionNode < Courier::Models::ElementalBaseNode
20
+ def content: -> String
21
+
22
+ def content=: (String _) -> String
23
+
24
+ def href: -> String
25
+
26
+ def href=: (String _) -> String
27
+
28
+ def action_id: -> String?
29
+
30
+ def action_id=: (String? _) -> String?
31
+
32
+ def align: -> Courier::Models::alignment?
33
+
34
+ def align=: (Courier::Models::alignment? _) -> Courier::Models::alignment?
35
+
36
+ def background_color: -> String?
37
+
38
+ def background_color=: (String? _) -> String?
39
+
40
+ def border_radius: -> String?
41
+
42
+ def border_radius=: (String? _) -> String?
43
+
44
+ def border_size: -> String?
45
+
46
+ def border_size=: (String? _) -> String?
47
+
48
+ def disable_tracking: -> bool?
49
+
50
+ def disable_tracking=: (bool? _) -> bool?
51
+
52
+ def font_size: -> String?
53
+
54
+ def font_size=: (String? _) -> String?
55
+
56
+ def locales: -> Courier::Models::locales?
57
+
58
+ def locales=: (Courier::Models::locales? _) -> Courier::Models::locales?
59
+
60
+ def padding: -> String?
61
+
62
+ def padding=: (String? _) -> String?
63
+
64
+ def style: -> Courier::Models::ElementalActionNode::style?
65
+
66
+ def style=: (
67
+ Courier::Models::ElementalActionNode::style? _
68
+ ) -> Courier::Models::ElementalActionNode::style?
69
+
70
+ def initialize: (
71
+ content: String,
72
+ href: String,
73
+ ?action_id: String?,
74
+ ?align: Courier::Models::alignment?,
75
+ ?background_color: String?,
76
+ ?border_radius: String?,
77
+ ?border_size: String?,
78
+ ?disable_tracking: bool?,
79
+ ?font_size: String?,
80
+ ?locales: Courier::Models::locales?,
81
+ ?padding: String?,
82
+ ?style: Courier::Models::ElementalActionNode::style?
83
+ ) -> void
84
+
85
+ def to_hash: -> {
86
+ content: String,
87
+ href: String,
88
+ action_id: String?,
89
+ align: Courier::Models::alignment?,
90
+ background_color: String?,
91
+ border_radius: String?,
92
+ border_size: String?,
93
+ disable_tracking: bool?,
94
+ font_size: String?,
95
+ locales: Courier::Models::locales?,
96
+ padding: String?,
97
+ style: Courier::Models::ElementalActionNode::style?
98
+ }
99
+
100
+ type style = :button | :link
101
+
102
+ module Style
103
+ extend Courier::Internal::Type::Enum
104
+
105
+ BUTTON: :button
106
+ LINK: :link
107
+
108
+ def self?.values: -> ::Array[Courier::Models::ElementalActionNode::style]
109
+ end
110
+ end
111
+ end
112
+ end
@@ -3,7 +3,7 @@ module Courier
3
3
  type elemental_action_node_with_type =
4
4
  { type: Courier::Models::ElementalActionNodeWithType::type_ }
5
5
 
6
- class ElementalActionNodeWithType < Courier::Models::ElementalBaseNode
6
+ class ElementalActionNodeWithType < Courier::Models::ElementalActionNode
7
7
  def `type`: -> Courier::Models::ElementalActionNodeWithType::type_?
8
8
 
9
9
  def type=: (
@@ -0,0 +1,15 @@
1
+ module Courier
2
+ module Models
3
+ type elemental_divider_node = { color: String? }
4
+
5
+ class ElementalDividerNode < Courier::Models::ElementalBaseNode
6
+ def color: -> String?
7
+
8
+ def color=: (String? _) -> String?
9
+
10
+ def initialize: (?color: String?) -> void
11
+
12
+ def to_hash: -> { color: String? }
13
+ end
14
+ end
15
+ end
@@ -3,7 +3,7 @@ module Courier
3
3
  type elemental_divider_node_with_type =
4
4
  { type: Courier::Models::ElementalDividerNodeWithType::type_ }
5
5
 
6
- class ElementalDividerNodeWithType < Courier::Models::ElementalBaseNode
6
+ class ElementalDividerNodeWithType < Courier::Models::ElementalDividerNode
7
7
  def `type`: -> Courier::Models::ElementalDividerNodeWithType::type_?
8
8
 
9
9
  def type=: (
@@ -0,0 +1,23 @@
1
+ module Courier
2
+ module Models
3
+ type elemental_html_node =
4
+ { content: String, locales: Courier::Models::locales? }
5
+
6
+ class ElementalHTMLNode < Courier::Models::ElementalBaseNode
7
+ def content: -> String
8
+
9
+ def content=: (String _) -> String
10
+
11
+ def locales: -> Courier::Models::locales?
12
+
13
+ def locales=: (Courier::Models::locales? _) -> Courier::Models::locales?
14
+
15
+ def initialize: (
16
+ content: String,
17
+ ?locales: Courier::Models::locales?
18
+ ) -> void
19
+
20
+ def to_hash: -> { content: String, locales: Courier::Models::locales? }
21
+ end
22
+ end
23
+ end
@@ -3,7 +3,7 @@ module Courier
3
3
  type elemental_html_node_with_type =
4
4
  { type: Courier::Models::ElementalHTMLNodeWithType::type_ }
5
5
 
6
- class ElementalHTMLNodeWithType < Courier::Models::ElementalBaseNode
6
+ class ElementalHTMLNodeWithType < Courier::Models::ElementalHTMLNode
7
7
  def `type`: -> Courier::Models::ElementalHTMLNodeWithType::type_?
8
8
 
9
9
  def type=: (
@@ -0,0 +1,71 @@
1
+ module Courier
2
+ module Models
3
+ type elemental_image_node =
4
+ {
5
+ src: String,
6
+ align: Courier::Models::alignment?,
7
+ alt_text: String?,
8
+ border_color: String?,
9
+ border_size: String?,
10
+ href: String?,
11
+ padding: String?,
12
+ width: String?
13
+ }
14
+
15
+ class ElementalImageNode < Courier::Models::ElementalBaseNode
16
+ def src: -> String
17
+
18
+ def src=: (String _) -> String
19
+
20
+ def align: -> Courier::Models::alignment?
21
+
22
+ def align=: (Courier::Models::alignment? _) -> Courier::Models::alignment?
23
+
24
+ def alt_text: -> String?
25
+
26
+ def alt_text=: (String? _) -> String?
27
+
28
+ def border_color: -> String?
29
+
30
+ def border_color=: (String? _) -> String?
31
+
32
+ def border_size: -> String?
33
+
34
+ def border_size=: (String? _) -> String?
35
+
36
+ def href: -> String?
37
+
38
+ def href=: (String? _) -> String?
39
+
40
+ def padding: -> String?
41
+
42
+ def padding=: (String? _) -> String?
43
+
44
+ def width: -> String?
45
+
46
+ def width=: (String? _) -> String?
47
+
48
+ def initialize: (
49
+ src: String,
50
+ ?align: Courier::Models::alignment?,
51
+ ?alt_text: String?,
52
+ ?border_color: String?,
53
+ ?border_size: String?,
54
+ ?href: String?,
55
+ ?padding: String?,
56
+ ?width: String?
57
+ ) -> void
58
+
59
+ def to_hash: -> {
60
+ src: String,
61
+ align: Courier::Models::alignment?,
62
+ alt_text: String?,
63
+ border_color: String?,
64
+ border_size: String?,
65
+ href: String?,
66
+ padding: String?,
67
+ width: String?
68
+ }
69
+ end
70
+ end
71
+ end
@@ -3,7 +3,7 @@ module Courier
3
3
  type elemental_image_node_with_type =
4
4
  { type: Courier::Models::ElementalImageNodeWithType::type_ }
5
5
 
6
- class ElementalImageNodeWithType < Courier::Models::ElementalBaseNode
6
+ class ElementalImageNodeWithType < Courier::Models::ElementalImageNode
7
7
  def `type`: -> Courier::Models::ElementalImageNodeWithType::type_?
8
8
 
9
9
  def type=: (