trycourier 6.12.0 → 6.13.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: 26943393679593de932be9962339164bdfdd09c63642b7d27a6f38ee061c8bfd
4
- data.tar.gz: b8ddcc3c806c9ffa4246f53f8dd533a284214be239995b02acd7b1be6c2cbb36
3
+ metadata.gz: adeed3b02658fe1c360d234bbd24ce3c2c3dcd34637b766514178b3ea473cbb5
4
+ data.tar.gz: dfc4345ec2d9db5bbd66bca95fae14eb11fb5a8a19d8afa7b7493a0325786583
5
5
  SHA512:
6
- metadata.gz: b80eb41483e2b7f9d19780b0468709eed4c1ed590264cec819ef26ad25cdae82a82674551d83b404de8876b30e73671bcc649ac03729a867b1231b7dc8c30d10
7
- data.tar.gz: f3659cecd8aca744f5d4e4b5831bbc64fd44b65f86f379a5e261d12245f4ba51e624b600ced5f69433890c89a30bdb9a1b9b1645ac217f43cb3e73d559c5f844
6
+ metadata.gz: 0e7711edd3bc7c6b0602ed7e8545cadadf2c10727de043474aec07e7ad121b1bfe324ac8d8c11efa77a15082a600c3ac26725146198359876a16b49178979b5d
7
+ data.tar.gz: 9cf63697464b8a65544002c1c50552c6a8c835012fad7cecd94373f5fbba7233361fde3bf16f41c4919409f6f5892092d12ea45f5d369bae960d0afc5ce017a1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [6.13.0](https://github.com/trycourier/courier-ruby/compare/v6.12.0...v6.13.0) (2026-10-23)
4
+
5
+
6
+ ### Features
7
+
8
+ * **api:** journey run steps return error and skip_reason ([#179](https://github.com/trycourier/courier-ruby/issues/179)) ([d5a8120](https://github.com/trycourier/courier-ruby/commit/d5a8120a93e5524ea27c5c075819a9f6d2a8b9f4))
9
+
10
+
11
+ ### Chores
12
+
13
+ * **api:** regenerate SDK ([#181](https://github.com/trycourier/courier-ruby/issues/181)) ([eadaf17](https://github.com/trycourier/courier-ruby/commit/eadaf17a4f75bd8d8825522d213eecb513b3c872))
14
+
3
15
  ## [6.12.0](https://github.com/trycourier/courier-ruby/compare/v6.11.3...v6.12.0) (2026-10-21)
4
16
 
5
17
 
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.12.0"
12
+ gem "trycourier", "~> 6.13.0"
13
13
  ```
14
14
 
15
15
  <!-- x-release-please-end -->
@@ -14,7 +14,7 @@ module Courier
14
14
  # `starts with`, `ends with`, `greater than`, `greater than or equal`,
15
15
  # `less than`, `less than or equal`, `was`, `was not`.
16
16
  #
17
- # Example: `["user.tier", "is equal", "gold"]`.
17
+ # Example: `["profile.tier", "is equal", "gold"]`.
18
18
  #
19
19
  # `was` / `was not` compare a `send_status.<nodeId>` path (referencing
20
20
  # an earlier send node's node id) against one of `SENT`, `DELIVERED`,
@@ -29,9 +29,9 @@ module Courier
29
29
  # - Unary form (2 elements): `[path, operator]` where `operator` is
30
30
  # one of `exists`, `does not exist`.
31
31
  #
32
- # Example: `["user.email", "exists"]`.
32
+ # Example: `["profile.email", "exists"]`.
33
33
  #
34
- # The first element is a non-empty dot-path. The second element is the operator (must come from one of the two operator sets above). For the binary form, the third element is the comparison value (string). Runtime validation of the operator value and arity is performed by the backend; SDKs surface this as a string list.
34
+ # The first element is a non-empty dot-path that starts with `data.`, `profile.`, `tenant.` (only when the trigger sets a tenant), or `send_status.<nodeId>`. The second element is the operator (must come from one of the two operator sets above). For the binary form, the third element is the comparison value (string). Runtime validation of the operator value and arity is performed by the backend; SDKs surface this as a string list.
35
35
  variant -> { Courier::JourneyConditionAtom }
36
36
 
37
37
  # A leaf condition group. Exactly one of `AND` or `OR` must be present at runtime; each is a list of `JourneyConditionAtom` tuples.
@@ -9,6 +9,19 @@ module Courier
9
9
  # @return [String]
10
10
  required :action, String
11
11
 
12
+ # @!attribute error
13
+ # Why the step failed. Set when `status` is `ERROR`, `null` otherwise.
14
+ #
15
+ # @return [Courier::Models::JourneyRunStep::Error, nil]
16
+ required :error, -> { Courier::JourneyRunStep::Error }, nil?: true
17
+
18
+ # @!attribute skip_reason
19
+ # Why the step was skipped, e.g. `Node conditions not met`. Set when `status` is
20
+ # `SKIPPED`, `null` otherwise.
21
+ #
22
+ # @return [String, nil]
23
+ required :skip_reason, String, nil?: true
24
+
12
25
  # @!attribute status
13
26
  # The state of the step: the seven run statuses, plus `SKIPPED` and `COMPUTING`.
14
27
  # Not an enum — new values have been added before.
@@ -42,7 +55,7 @@ module Courier
42
55
  # @return [String, nil]
43
56
  optional :updated_at, String
44
57
 
45
- # @!method initialize(action:, status:, created_at: nil, message_id: nil, node_id: nil, updated_at: nil)
58
+ # @!method initialize(action:, error:, skip_reason:, status:, created_at: nil, message_id: nil, node_id: nil, updated_at: nil)
46
59
  # Some parameter documentations has been truncated, see
47
60
  # {Courier::Models::JourneyRunStep} for more details.
48
61
  #
@@ -51,6 +64,10 @@ module Courier
51
64
  #
52
65
  # @param action [String] The kind of node that ran, e.g. `send`, `delay`, or `exit`.
53
66
  #
67
+ # @param error [Courier::Models::JourneyRunStep::Error, nil] Why the step failed. Set when `status` is `ERROR`, `null` otherwise.
68
+ #
69
+ # @param skip_reason [String, nil] Why the step was skipped, e.g. `Node conditions not met`. Set when `status` is `
70
+ #
54
71
  # @param status [String] The state of the step: the seven run statuses, plus `SKIPPED` and `COMPUTING`. N
55
72
  #
56
73
  # @param created_at [String] When the step started, as an ISO 8601 timestamp.
@@ -60,6 +77,24 @@ module Courier
60
77
  # @param node_id [String] The id of the node in the published Journey that this step executed.
61
78
  #
62
79
  # @param updated_at [String] When the step last changed state, as an ISO 8601 timestamp.
80
+
81
+ # @see Courier::Models::JourneyRunStep#error
82
+ class Error < Courier::Internal::Type::BaseModel
83
+ # @!attribute message
84
+ # The reason, e.g. `Fetch failed: GET api.example.com returned 404` or
85
+ # `AI step timed out after 15 minutes`.
86
+ #
87
+ # @return [String]
88
+ required :message, String
89
+
90
+ # @!method initialize(message:)
91
+ # Some parameter documentations has been truncated, see
92
+ # {Courier::Models::JourneyRunStep::Error} for more details.
93
+ #
94
+ # Why the step failed. Set when `status` is `ERROR`, `null` otherwise.
95
+ #
96
+ # @param message [String] The reason, e.g. `Fetch failed: GET api.example.com returned 404` or `AI step ti
97
+ end
63
98
  end
64
99
  end
65
100
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Courier
4
- VERSION = "6.12.0"
4
+ VERSION = "6.13.0"
5
5
  end
@@ -12,6 +12,20 @@ module Courier
12
12
  sig { returns(String) }
13
13
  attr_accessor :action
14
14
 
15
+ # Why the step failed. Set when `status` is `ERROR`, `null` otherwise.
16
+ sig { returns(T.nilable(Courier::JourneyRunStep::Error)) }
17
+ attr_reader :error
18
+
19
+ sig do
20
+ params(error: T.nilable(Courier::JourneyRunStep::Error::OrHash)).void
21
+ end
22
+ attr_writer :error
23
+
24
+ # Why the step was skipped, e.g. `Node conditions not met`. Set when `status` is
25
+ # `SKIPPED`, `null` otherwise.
26
+ sig { returns(T.nilable(String)) }
27
+ attr_accessor :skip_reason
28
+
15
29
  # The state of the step: the seven run statuses, plus `SKIPPED` and `COMPUTING`.
16
30
  # Not an enum — new values have been added before.
17
31
  sig { returns(String) }
@@ -52,6 +66,8 @@ module Courier
52
66
  sig do
53
67
  params(
54
68
  action: String,
69
+ error: T.nilable(Courier::JourneyRunStep::Error::OrHash),
70
+ skip_reason: T.nilable(String),
55
71
  status: String,
56
72
  created_at: String,
57
73
  message_id: String,
@@ -62,6 +78,11 @@ module Courier
62
78
  def self.new(
63
79
  # The kind of node that ran, e.g. `send`, `delay`, or `exit`.
64
80
  action:,
81
+ # Why the step failed. Set when `status` is `ERROR`, `null` otherwise.
82
+ error:,
83
+ # Why the step was skipped, e.g. `Node conditions not met`. Set when `status` is
84
+ # `SKIPPED`, `null` otherwise.
85
+ skip_reason:,
65
86
  # The state of the step: the seven run statuses, plus `SKIPPED` and `COMPUTING`.
66
87
  # Not an enum — new values have been added before.
67
88
  status:,
@@ -82,6 +103,8 @@ module Courier
82
103
  override.returns(
83
104
  {
84
105
  action: String,
106
+ error: T.nilable(Courier::JourneyRunStep::Error),
107
+ skip_reason: T.nilable(String),
85
108
  status: String,
86
109
  created_at: String,
87
110
  message_id: String,
@@ -92,6 +115,31 @@ module Courier
92
115
  end
93
116
  def to_hash
94
117
  end
118
+
119
+ class Error < Courier::Internal::Type::BaseModel
120
+ OrHash =
121
+ T.type_alias do
122
+ T.any(Courier::JourneyRunStep::Error, Courier::Internal::AnyHash)
123
+ end
124
+
125
+ # The reason, e.g. `Fetch failed: GET api.example.com returned 404` or
126
+ # `AI step timed out after 15 minutes`.
127
+ sig { returns(String) }
128
+ attr_accessor :message
129
+
130
+ # Why the step failed. Set when `status` is `ERROR`, `null` otherwise.
131
+ sig { params(message: String).returns(T.attached_class) }
132
+ def self.new(
133
+ # The reason, e.g. `Fetch failed: GET api.example.com returned 404` or
134
+ # `AI step timed out after 15 minutes`.
135
+ message:
136
+ )
137
+ end
138
+
139
+ sig { override.returns({ message: String }) }
140
+ def to_hash
141
+ end
142
+ end
95
143
  end
96
144
  end
97
145
  end
@@ -3,6 +3,8 @@ module Courier
3
3
  type journey_run_step =
4
4
  {
5
5
  action: String,
6
+ error: Courier::JourneyRunStep::Error?,
7
+ skip_reason: String?,
6
8
  status: String,
7
9
  created_at: String,
8
10
  message_id: String,
@@ -13,6 +15,10 @@ module Courier
13
15
  class JourneyRunStep < Courier::Internal::Type::BaseModel
14
16
  attr_accessor action: String
15
17
 
18
+ attr_accessor error: Courier::JourneyRunStep::Error?
19
+
20
+ attr_accessor skip_reason: String?
21
+
16
22
  attr_accessor status: String
17
23
 
18
24
  attr_reader created_at: String?
@@ -33,6 +39,8 @@ module Courier
33
39
 
34
40
  def initialize: (
35
41
  action: String,
42
+ error: Courier::JourneyRunStep::Error?,
43
+ skip_reason: String?,
36
44
  status: String,
37
45
  ?created_at: String,
38
46
  ?message_id: String,
@@ -42,12 +50,24 @@ module Courier
42
50
 
43
51
  def to_hash: -> {
44
52
  action: String,
53
+ error: Courier::JourneyRunStep::Error?,
54
+ skip_reason: String?,
45
55
  status: String,
46
56
  created_at: String,
47
57
  message_id: String,
48
58
  node_id: String,
49
59
  updated_at: String
50
60
  }
61
+
62
+ type error = { message: String }
63
+
64
+ class Error < Courier::Internal::Type::BaseModel
65
+ attr_accessor message: String
66
+
67
+ def initialize: (message: String) -> void
68
+
69
+ def to_hash: -> { message: String }
70
+ end
51
71
  end
52
72
  end
53
73
  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.12.0
4
+ version: 6.13.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-10-21 00:00:00.000000000 Z
11
+ date: 2026-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool