trycourier 4.24.0 → 4.25.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92699878aa77a9b29adce8e814e87b0c2369708e4eaff80d4cb39281d2a2fac3
4
- data.tar.gz: 47907b5604d18e1f827398c5a24c21b80ed4b1fb4660d7c45c0cf3b15d5f3099
3
+ metadata.gz: 6479592040b865063a1f1d9bec5fbea1650cdd5025a335068c39feefb4ae6fd9
4
+ data.tar.gz: da1ecb2bc7246befec1f12882a02c59d95e6e28b51f3348fbd75286c416cc1c1
5
5
  SHA512:
6
- metadata.gz: 42442c5a895cc9f1403944cef33abf7cb6673ba331d177291b3355239489c5f0fd991bd1201d3867a48e5b28fac32a43dc4de819157ad59639bc69c9a6ddc355
7
- data.tar.gz: 3d90bfd02cfa4270aff7e8af390d966137481c6849be7c3062b171675311aa462f3a56272e879b79be6755e1989171ab3bd8e277650b028e5d5cc5a3036216e9
6
+ metadata.gz: a2550c508b661f15771d19f7c3d090641f439bd10031a5cbfa9a4323e09c42ce866d58575b53333255adeeb41fe462a7108c5505dc7123b434596c62bd331412
7
+ data.tar.gz: 4e3d97189c87af8c1165756d3a7a9fe69d583b0d4c3a9e223bdcefadd782e7f371aeff7c5e9548908547e85e107e34aaf11e21bd3a0c29cd5e79ab99cbddcc1b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.25.0 (2026-08-04)
4
+
5
+ Full Changelog: [v4.24.0...v4.25.0](https://github.com/trycourier/courier-ruby/compare/v4.24.0...v4.25.0)
6
+
7
+ ### Features
8
+
9
+ * Merge pull request [#178](https://github.com/trycourier/courier-ruby/issues/178) from trycourier/geraldosilva/c-19484-elemental-formatting-controls ([00857bd](https://github.com/trycourier/courier-ruby/commit/00857bd332c959f343c6344b58e4cc19ff916700))
10
+
3
11
  ## 4.24.0 (2026-08-03)
4
12
 
5
13
  Full Changelog: [v4.23.0...v4.24.0](https://github.com/trycourier/courier-ruby/compare/v4.23.0...v4.24.0)
@@ -10,6 +10,28 @@ module Courier
10
10
  # @return [String, nil]
11
11
  optional :channel, String
12
12
 
13
+ # @!attribute font_size
14
+ # Email only. Document-level base font size (CSS px, e.g. `16px`) for body content
15
+ # — text, quote, list and action button labels. Heading styles (`h1`/`h2`/`h3`)
16
+ # and `subtext` keep their preset sizes.
17
+ #
18
+ # @return [String, nil]
19
+ optional :font_size, String, nil?: true
20
+
21
+ # @!attribute line_height
22
+ # Email only. Document-level line height (CSS px or unitless multiplier, e.g.
23
+ # `24px` or `1.5`) applied to all body content unless overridden per block.
24
+ #
25
+ # @return [String, nil]
26
+ optional :line_height, String, nil?: true
27
+
28
+ # @!attribute padding
29
+ # Email only. Document-level body padding applied once around the email body, as a
30
+ # CSS px shorthand (1–4 values), e.g. `48px 64px`.
31
+ #
32
+ # @return [String, nil]
33
+ optional :padding, String, nil?: true
34
+
13
35
  # @!attribute raw
14
36
  # Raw data to apply to the channel. If `elements` has not been specified, `raw` is
15
37
  # required.
@@ -17,7 +39,7 @@ module Courier
17
39
  # @return [Hash{Symbol=>Object}, nil]
18
40
  optional :raw, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown], nil?: true
19
41
 
20
- # @!method initialize(channel: nil, raw: nil)
42
+ # @!method initialize(channel: nil, font_size: nil, line_height: nil, padding: nil, raw: nil)
21
43
  # Some parameter documentations has been truncated, see
22
44
  # {Courier::Models::ElementalChannelNode} for more details.
23
45
  #
@@ -34,6 +56,12 @@ module Courier
34
56
  #
35
57
  # @param channel [String] The channel the contents of this element should be applied to. Can be `email`,
36
58
  #
59
+ # @param font_size [String, nil] Email only. Document-level base font size (CSS px, e.g. `16px`) for body content
60
+ #
61
+ # @param line_height [String, nil] Email only. Document-level line height (CSS px or unitless multiplier, e.g. `24p
62
+ #
63
+ # @param padding [String, nil] Email only. Document-level body padding applied once around the email body, as a
64
+ #
37
65
  # @param raw [Hash{Symbol=>Object}, nil] Raw data to apply to the channel. If `elements` has not been specified, `raw` is
38
66
  end
39
67
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Courier
4
- VERSION = "4.24.0"
4
+ VERSION = "4.25.0"
5
5
  end
@@ -16,6 +16,22 @@ module Courier
16
16
  sig { params(channel: String).void }
17
17
  attr_writer :channel
18
18
 
19
+ # Email only. Document-level base font size (CSS px, e.g. `16px`) for body content
20
+ # — text, quote, list and action button labels. Heading styles (`h1`/`h2`/`h3`)
21
+ # and `subtext` keep their preset sizes.
22
+ sig { returns(T.nilable(String)) }
23
+ attr_accessor :font_size
24
+
25
+ # Email only. Document-level line height (CSS px or unitless multiplier, e.g.
26
+ # `24px` or `1.5`) applied to all body content unless overridden per block.
27
+ sig { returns(T.nilable(String)) }
28
+ attr_accessor :line_height
29
+
30
+ # Email only. Document-level body padding applied once around the email body, as a
31
+ # CSS px shorthand (1–4 values), e.g. `48px 64px`.
32
+ sig { returns(T.nilable(String)) }
33
+ attr_accessor :padding
34
+
19
35
  # Raw data to apply to the channel. If `elements` has not been specified, `raw` is
20
36
  # required.
21
37
  sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
@@ -34,6 +50,9 @@ module Courier
34
50
  sig do
35
51
  params(
36
52
  channel: String,
53
+ font_size: T.nilable(String),
54
+ line_height: T.nilable(String),
55
+ padding: T.nilable(String),
37
56
  raw: T.nilable(T::Hash[Symbol, T.anything])
38
57
  ).returns(T.attached_class)
39
58
  end
@@ -41,6 +60,16 @@ module Courier
41
60
  # The channel the contents of this element should be applied to. Can be `email`,
42
61
  # `push`, `direct_message`, `sms` or a provider such as slack
43
62
  channel: nil,
63
+ # Email only. Document-level base font size (CSS px, e.g. `16px`) for body content
64
+ # — text, quote, list and action button labels. Heading styles (`h1`/`h2`/`h3`)
65
+ # and `subtext` keep their preset sizes.
66
+ font_size: nil,
67
+ # Email only. Document-level line height (CSS px or unitless multiplier, e.g.
68
+ # `24px` or `1.5`) applied to all body content unless overridden per block.
69
+ line_height: nil,
70
+ # Email only. Document-level body padding applied once around the email body, as a
71
+ # CSS px shorthand (1–4 values), e.g. `48px 64px`.
72
+ padding: nil,
44
73
  # Raw data to apply to the channel. If `elements` has not been specified, `raw` is
45
74
  # required.
46
75
  raw: nil
@@ -49,7 +78,13 @@ module Courier
49
78
 
50
79
  sig do
51
80
  override.returns(
52
- { channel: String, raw: T.nilable(T::Hash[Symbol, T.anything]) }
81
+ {
82
+ channel: String,
83
+ font_size: T.nilable(String),
84
+ line_height: T.nilable(String),
85
+ padding: T.nilable(String),
86
+ raw: T.nilable(T::Hash[Symbol, T.anything])
87
+ }
53
88
  )
54
89
  end
55
90
  def to_hash
@@ -1,19 +1,50 @@
1
1
  module Courier
2
2
  module Models
3
- type elemental_channel_node = { channel: String, raw: ::Hash[Symbol, top]? }
3
+ type elemental_channel_node =
4
+ {
5
+ channel: String,
6
+ font_size: String?,
7
+ line_height: String?,
8
+ padding: String?,
9
+ raw: ::Hash[Symbol, top]?
10
+ }
4
11
 
5
12
  class ElementalChannelNode < Courier::Models::ElementalBaseNode
6
13
  def channel: -> String?
7
14
 
8
15
  def channel=: (String _) -> String
9
16
 
17
+ def font_size: -> String?
18
+
19
+ def font_size=: (String? _) -> String?
20
+
21
+ def line_height: -> String?
22
+
23
+ def line_height=: (String? _) -> String?
24
+
25
+ def padding: -> String?
26
+
27
+ def padding=: (String? _) -> String?
28
+
10
29
  def raw: -> ::Hash[Symbol, top]?
11
30
 
12
31
  def raw=: (::Hash[Symbol, top]? _) -> ::Hash[Symbol, top]?
13
32
 
14
- def initialize: (?channel: String, ?raw: ::Hash[Symbol, top]?) -> void
33
+ def initialize: (
34
+ ?channel: String,
35
+ ?font_size: String?,
36
+ ?line_height: String?,
37
+ ?padding: String?,
38
+ ?raw: ::Hash[Symbol, top]?
39
+ ) -> void
15
40
 
16
- def to_hash: -> { channel: String, raw: ::Hash[Symbol, top]? }
41
+ def to_hash: -> {
42
+ channel: String,
43
+ font_size: String?,
44
+ line_height: String?,
45
+ padding: String?,
46
+ raw: ::Hash[Symbol, top]?
47
+ }
17
48
  end
18
49
  end
19
50
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trycourier
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.24.0
4
+ version: 4.25.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Courier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-08-03 00:00:00.000000000 Z
11
+ date: 2026-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi