trycourier 6.3.0 → 6.4.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: 93e2579390eb091bbda837c472c4554b06267a4e1dfb01b3b7cc63098f4a0d19
4
- data.tar.gz: 2c0beb4dfe94f8d7cf39d222fd1ffb8cd9e3dc54e334e86546ac31d9919b286e
3
+ metadata.gz: 77a40579016778bf7fd2be413c80a59a514bda2c1a2a6de1f6c1649cd6f28ce4
4
+ data.tar.gz: 071bdbb767a79675af2f55eaaeec7ad23ef5bac415f5d9f9eac2311407ae2a2a
5
5
  SHA512:
6
- metadata.gz: 7a321f3202f3ca7858c453483d0fa0e537433a7c73afadd8cccc30d213fb18f6bb02f54db13a373a608e6f29595d0bf34bf3623b4086525da19773745e1c9a21
7
- data.tar.gz: 33ef6a817cc05de26e64963c146c7ede6f8842ed1175949ba81ada5937261b0986ba9006522fd74e4dbf4cf5c0d5863021ab0e9e53ad5c3a839b35f7dc1f746f
6
+ metadata.gz: 0c5d00663ef98a7494db3b618a08b2f9a103355077cfa7e77def4b9f63686c46bbdbb487d7e9184507bb7b5a95bfb739c38864884736aeca01a56a3fd18069db
7
+ data.tar.gz: 2c2acf11904f5f0234aefbb0f5867ebef9e39787fe16aa5238495e1e221adf39087e62a1d6cd5db185c5810d701feeb7c64434e735830af86657915b02b2a448
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [6.4.0](https://github.com/trycourier/courier-ruby/compare/v6.3.0...v6.4.0) (2026-08-28)
4
+
5
+
6
+ ### Features
7
+
8
+ * **api:** document channel on journey send nodes [C-20309] ([#138](https://github.com/trycourier/courier-ruby/issues/138)) ([f758237](https://github.com/trycourier/courier-ruby/commit/f75823779abef7a0df0d9927d3aae98696eff79a))
9
+
3
10
  ## [6.3.0](https://github.com/trycourier/courier-ruby/compare/v6.2.0...v6.3.0) (2026-08-27)
4
11
 
5
12
 
data/README.md CHANGED
@@ -9,7 +9,7 @@ Add the gem to your `Gemfile`:
9
9
  <!-- x-release-please-start-version -->
10
10
 
11
11
  ```ruby
12
- gem "trycourier", "~> 6.3.0"
12
+ gem "trycourier", "~> 6.4.0"
13
13
  ```
14
14
 
15
15
  <!-- x-release-please-end -->
@@ -18,6 +18,15 @@ module Courier
18
18
  # @return [String, nil]
19
19
  optional :id, String
20
20
 
21
+ # @!attribute channel
22
+ # The channel this node sends through. Optional — when omitted, the field is
23
+ # absent from the node, including on `GET`; nodes created before this field
24
+ # existed have it unset. Setting it makes the node's channel explicit to any
25
+ # client reading the journey.
26
+ #
27
+ # @return [Symbol, Courier::Models::JourneySendNode::Channel, nil]
28
+ optional :channel, enum: -> { Courier::JourneySendNode::Channel }
29
+
21
30
  # @!attribute conditions
22
31
  # Condition spec for a journey node. Accepts a single condition atom, an AND/OR
23
32
  # group, or an AND/OR nested group. Omit the `conditions` property entirely to
@@ -34,7 +43,7 @@ module Courier
34
43
  # @return [Courier::Models::JourneyExperiment, nil]
35
44
  optional :experiment, -> { Courier::JourneyExperiment }
36
45
 
37
- # @!method initialize(message:, type:, id: nil, conditions: nil, experiment: nil)
46
+ # @!method initialize(message:, type:, id: nil, channel: nil, conditions: nil, experiment: nil)
38
47
  # Some parameter documentations has been truncated, see
39
48
  # {Courier::Models::JourneySendNode} for more details.
40
49
  #
@@ -50,6 +59,8 @@ module Courier
50
59
  #
51
60
  # @param id [String]
52
61
  #
62
+ # @param channel [Symbol, Courier::Models::JourneySendNode::Channel] The channel this node sends through. Optional — when omitted, the field is absen
63
+ #
53
64
  # @param conditions [Array<String>, Courier::Models::JourneyConditionGroup, Courier::Models::JourneyConditionNestedGroup] Condition spec for a journey node. Accepts a single condition atom, an AND/OR gr
54
65
  #
55
66
  # @param experiment [Courier::Models::JourneyExperiment] A/B experiment config for a send node. The recipient is deterministically bucket
@@ -211,6 +222,26 @@ module Courier
211
222
  # @!method self.values
212
223
  # @return [Array<Symbol>]
213
224
  end
225
+
226
+ # The channel this node sends through. Optional — when omitted, the field is
227
+ # absent from the node, including on `GET`; nodes created before this field
228
+ # existed have it unset. Setting it makes the node's channel explicit to any
229
+ # client reading the journey.
230
+ #
231
+ # @see Courier::Models::JourneySendNode#channel
232
+ module Channel
233
+ extend Courier::Internal::Type::Enum
234
+
235
+ EMAIL = :email
236
+ SMS = :sms
237
+ PUSH = :push
238
+ INBOX = :inbox
239
+ SLACK = :slack
240
+ MSTEAMS = :msteams
241
+
242
+ # @!method self.values
243
+ # @return [Array<Symbol>]
244
+ end
214
245
  end
215
246
  end
216
247
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Courier
4
- VERSION = "6.3.0"
4
+ VERSION = "6.4.0"
5
5
  end
@@ -23,6 +23,16 @@ module Courier
23
23
  sig { params(id: String).void }
24
24
  attr_writer :id
25
25
 
26
+ # The channel this node sends through. Optional — when omitted, the field is
27
+ # absent from the node, including on `GET`; nodes created before this field
28
+ # existed have it unset. Setting it makes the node's channel explicit to any
29
+ # client reading the journey.
30
+ sig { returns(T.nilable(Courier::JourneySendNode::Channel::OrSymbol)) }
31
+ attr_reader :channel
32
+
33
+ sig { params(channel: Courier::JourneySendNode::Channel::OrSymbol).void }
34
+ attr_writer :channel
35
+
26
36
  # Condition spec for a journey node. Accepts a single condition atom, an AND/OR
27
37
  # group, or an AND/OR nested group. Omit the `conditions` property entirely to
28
38
  # express "no conditions".
@@ -70,6 +80,7 @@ module Courier
70
80
  message: Courier::JourneySendNode::Message::OrHash,
71
81
  type: Courier::JourneySendNode::Type::OrSymbol,
72
82
  id: String,
83
+ channel: Courier::JourneySendNode::Channel::OrSymbol,
73
84
  conditions:
74
85
  T.any(
75
86
  T::Array[String],
@@ -83,6 +94,11 @@ module Courier
83
94
  message:,
84
95
  type:,
85
96
  id: nil,
97
+ # The channel this node sends through. Optional — when omitted, the field is
98
+ # absent from the node, including on `GET`; nodes created before this field
99
+ # existed have it unset. Setting it makes the node's channel explicit to any
100
+ # client reading the journey.
101
+ channel: nil,
86
102
  # Condition spec for a journey node. Accepts a single condition atom, an AND/OR
87
103
  # group, or an AND/OR nested group. Omit the `conditions` property entirely to
88
104
  # express "no conditions".
@@ -100,6 +116,7 @@ module Courier
100
116
  message: Courier::JourneySendNode::Message,
101
117
  type: Courier::JourneySendNode::Type::OrSymbol,
102
118
  id: String,
119
+ channel: Courier::JourneySendNode::Channel::OrSymbol,
103
120
  conditions:
104
121
  T.any(
105
122
  T::Array[String],
@@ -417,6 +434,34 @@ module Courier
417
434
  def self.values
418
435
  end
419
436
  end
437
+
438
+ # The channel this node sends through. Optional — when omitted, the field is
439
+ # absent from the node, including on `GET`; nodes created before this field
440
+ # existed have it unset. Setting it makes the node's channel explicit to any
441
+ # client reading the journey.
442
+ module Channel
443
+ extend Courier::Internal::Type::Enum
444
+
445
+ TaggedSymbol =
446
+ T.type_alias { T.all(Symbol, Courier::JourneySendNode::Channel) }
447
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
448
+
449
+ EMAIL = T.let(:email, Courier::JourneySendNode::Channel::TaggedSymbol)
450
+ SMS = T.let(:sms, Courier::JourneySendNode::Channel::TaggedSymbol)
451
+ PUSH = T.let(:push, Courier::JourneySendNode::Channel::TaggedSymbol)
452
+ INBOX = T.let(:inbox, Courier::JourneySendNode::Channel::TaggedSymbol)
453
+ SLACK = T.let(:slack, Courier::JourneySendNode::Channel::TaggedSymbol)
454
+ MSTEAMS =
455
+ T.let(:msteams, Courier::JourneySendNode::Channel::TaggedSymbol)
456
+
457
+ sig do
458
+ override.returns(
459
+ T::Array[Courier::JourneySendNode::Channel::TaggedSymbol]
460
+ )
461
+ end
462
+ def self.values
463
+ end
464
+ end
420
465
  end
421
466
  end
422
467
  end
@@ -5,6 +5,7 @@ module Courier
5
5
  message: Courier::JourneySendNode::Message,
6
6
  type: Courier::Models::JourneySendNode::type_,
7
7
  id: String,
8
+ channel: Courier::Models::JourneySendNode::channel,
8
9
  conditions: Courier::Models::journey_conditions_field,
9
10
  experiment: Courier::JourneyExperiment
10
11
  }
@@ -18,6 +19,12 @@ module Courier
18
19
 
19
20
  def id=: (String) -> String
20
21
 
22
+ attr_reader channel: Courier::Models::JourneySendNode::channel?
23
+
24
+ def channel=: (
25
+ Courier::Models::JourneySendNode::channel
26
+ ) -> Courier::Models::JourneySendNode::channel
27
+
21
28
  attr_reader conditions: Courier::Models::journey_conditions_field?
22
29
 
23
30
  def conditions=: (
@@ -34,6 +41,7 @@ module Courier
34
41
  message: Courier::JourneySendNode::Message,
35
42
  type: Courier::Models::JourneySendNode::type_,
36
43
  ?id: String,
44
+ ?channel: Courier::Models::JourneySendNode::channel,
37
45
  ?conditions: Courier::Models::journey_conditions_field,
38
46
  ?experiment: Courier::JourneyExperiment
39
47
  ) -> void
@@ -42,6 +50,7 @@ module Courier
42
50
  message: Courier::JourneySendNode::Message,
43
51
  type: Courier::Models::JourneySendNode::type_,
44
52
  id: String,
53
+ channel: Courier::Models::JourneySendNode::channel,
45
54
  conditions: Courier::Models::journey_conditions_field,
46
55
  experiment: Courier::JourneyExperiment
47
56
  }
@@ -183,6 +192,21 @@ module Courier
183
192
 
184
193
  def self?.values: -> ::Array[Courier::Models::JourneySendNode::type_]
185
194
  end
195
+
196
+ type channel = :email | :sms | :push | :inbox | :slack | :msteams
197
+
198
+ module Channel
199
+ extend Courier::Internal::Type::Enum
200
+
201
+ EMAIL: :email
202
+ SMS: :sms
203
+ PUSH: :push
204
+ INBOX: :inbox
205
+ SLACK: :slack
206
+ MSTEAMS: :msteams
207
+
208
+ def self?.values: -> ::Array[Courier::Models::JourneySendNode::channel]
209
+ end
186
210
  end
187
211
  end
188
212
  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: 6.3.0
4
+ version: 6.4.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-27 00:00:00.000000000 Z
11
+ date: 2026-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi