trycourier 6.0.0 → 6.1.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.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +1 -1
  4. data/lib/courier/models/automation_run_list_item.rb +57 -0
  5. data/lib/courier/models/automation_run_list_response.rb +25 -0
  6. data/lib/courier/models/automation_run_step.rb +64 -0
  7. data/lib/courier/models/automation_run_steps_response.rb +17 -0
  8. data/lib/courier/models/automations/run_list_params.rb +71 -0
  9. data/lib/courier/models/automations/run_list_steps_params.rb +22 -0
  10. data/lib/courier/models/create_journey_request.rb +2 -2
  11. data/lib/courier/models/journey_audience_trigger_node.rb +77 -0
  12. data/lib/courier/models/journey_node.rb +8 -2
  13. data/lib/courier/models/journey_response.rb +2 -2
  14. data/lib/courier/models/journey_run.rb +66 -0
  15. data/lib/courier/models/journey_run_list_item.rb +50 -0
  16. data/lib/courier/models/journey_run_list_response.rb +33 -0
  17. data/lib/courier/models/journey_run_response.rb +22 -0
  18. data/lib/courier/models/journey_run_step.rb +65 -0
  19. data/lib/courier/models/journey_run_steps_response.rb +17 -0
  20. data/lib/courier/models/journey_segment_trigger_node.rb +5 -1
  21. data/lib/courier/models/journey_webhook_trigger_node.rb +85 -0
  22. data/lib/courier/models/journeys/run_list_params.rb +71 -0
  23. data/lib/courier/models/journeys/run_list_steps_params.rb +22 -0
  24. data/lib/courier/models/journeys/run_retrieve_params.rb +22 -0
  25. data/lib/courier/models/users/topic_preference.rb +21 -1
  26. data/lib/courier/models.rb +24 -0
  27. data/lib/courier/resources/automations/runs.rb +80 -0
  28. data/lib/courier/resources/automations.rb +6 -0
  29. data/lib/courier/resources/journeys/runs.rb +104 -0
  30. data/lib/courier/resources/journeys.rb +8 -2
  31. data/lib/courier/version.rb +1 -1
  32. data/lib/courier.rb +19 -0
  33. data/rbi/courier/models/automation_run_list_item.rbi +87 -0
  34. data/rbi/courier/models/automation_run_list_response.rbi +47 -0
  35. data/rbi/courier/models/automation_run_step.rbi +96 -0
  36. data/rbi/courier/models/automation_run_steps_response.rbi +28 -0
  37. data/rbi/courier/models/automations/run_list_params.rbi +114 -0
  38. data/rbi/courier/models/automations/run_list_steps_params.rbi +40 -0
  39. data/rbi/courier/models/create_journey_request.rbi +6 -0
  40. data/rbi/courier/models/journey_audience_trigger_node.rbi +162 -0
  41. data/rbi/courier/models/journey_node.rbi +2 -0
  42. data/rbi/courier/models/journey_response.rbi +2 -0
  43. data/rbi/courier/models/journey_run.rbi +97 -0
  44. data/rbi/courier/models/journey_run_list_item.rbi +79 -0
  45. data/rbi/courier/models/journey_run_list_response.rbi +58 -0
  46. data/rbi/courier/models/journey_run_response.rbi +33 -0
  47. data/rbi/courier/models/journey_run_step.rbi +97 -0
  48. data/rbi/courier/models/journey_run_steps_response.rbi +28 -0
  49. data/rbi/courier/models/journey_segment_trigger_node.rbi +9 -1
  50. data/rbi/courier/models/journey_webhook_trigger_node.rbi +174 -0
  51. data/rbi/courier/models/journeys/run_list_params.rbi +111 -0
  52. data/rbi/courier/models/journeys/run_list_steps_params.rbi +40 -0
  53. data/rbi/courier/models/journeys/run_retrieve_params.rbi +40 -0
  54. data/rbi/courier/models/users/topic_preference.rbi +33 -3
  55. data/rbi/courier/models.rbi +24 -0
  56. data/rbi/courier/resources/automations/runs.rbi +69 -0
  57. data/rbi/courier/resources/automations.rbi +5 -0
  58. data/rbi/courier/resources/journeys/runs.rbi +87 -0
  59. data/rbi/courier/resources/journeys.rbi +9 -0
  60. data/sig/courier/models/automation_run_list_item.rbs +46 -0
  61. data/sig/courier/models/automation_run_list_response.rbs +24 -0
  62. data/sig/courier/models/automation_run_step.rbs +53 -0
  63. data/sig/courier/models/automation_run_steps_response.rbs +14 -0
  64. data/sig/courier/models/automations/run_list_params.rbs +65 -0
  65. data/sig/courier/models/automations/run_list_steps_params.rbs +22 -0
  66. data/sig/courier/models/journey_audience_trigger_node.rbs +66 -0
  67. data/sig/courier/models/journey_node.rbs +2 -0
  68. data/sig/courier/models/journey_run.rbs +53 -0
  69. data/sig/courier/models/journey_run_list_item.rbs +46 -0
  70. data/sig/courier/models/journey_run_list_response.rbs +34 -0
  71. data/sig/courier/models/journey_run_response.rbs +13 -0
  72. data/sig/courier/models/journey_run_step.rbs +53 -0
  73. data/sig/courier/models/journey_run_steps_response.rbs +14 -0
  74. data/sig/courier/models/journey_segment_trigger_node.rbs +2 -1
  75. data/sig/courier/models/journey_webhook_trigger_node.rbs +73 -0
  76. data/sig/courier/models/journeys/run_list_params.rbs +65 -0
  77. data/sig/courier/models/journeys/run_list_steps_params.rbs +25 -0
  78. data/sig/courier/models/journeys/run_retrieve_params.rbs +25 -0
  79. data/sig/courier/models/users/topic_preference.rbs +17 -3
  80. data/sig/courier/models.rbs +24 -0
  81. data/sig/courier/resources/automations/runs.rbs +24 -0
  82. data/sig/courier/resources/automations.rbs +2 -0
  83. data/sig/courier/resources/journeys/runs.rbs +29 -0
  84. data/sig/courier/resources/journeys.rbs +2 -0
  85. metadata +59 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ed641b11a038a01c22274260fc705dea6b9b111be8cd53b64e422aff9406454f
4
- data.tar.gz: bcf80f73aa74a8fa95b82c7d2aea347fc8119acc264a9f09f1674a0da6abed60
3
+ metadata.gz: 62f640ccc5d992cd807b750192ee8ca02b3ffe5fa09537eeadf67ba086c518b3
4
+ data.tar.gz: bd638a13b9a78b54e849e76a30614bed55afbcb6e7fb7a1a2edf60a74cb1531b
5
5
  SHA512:
6
- metadata.gz: 1750e07548991a86cb4ad3dcac19af5079dc36802b7564619bb2658b4257752427bd8108c4649f469330278bc6115124174a3f177236fc4b68286257d5ee6bb0
7
- data.tar.gz: ffd4fccb77fbc287d6b1959741ea4e9472e951d1da0736de3ad5182dc7a90d8f310128e7d9e1ae77959c8978089997c6a2a4e91daade9126094029ce9f4146fe
6
+ metadata.gz: ed8c416e8431f1a50aa7fff01b939ba42b03acabe3a42a5a9f14da078f9dcf11bfd8cfe6cb88f642d48444aa0131c3eb9a9164fdbd6fec8a6d80d07c2f360403
7
+ data.tar.gz: 971c6a9a71bfdbc8faec0796d2b591d3635e55aece1ab1c208c6f68f3943a5fb39214c8a5944815b1f70f6e9912b8c77d8db2971d836116c543660a0951ef4a2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## [6.1.0](https://github.com/trycourier/courier-ruby/compare/v6.0.0...v6.1.0) (2026-08-19)
4
+
5
+
6
+ ### Features
7
+
8
+ * **api:** add automation and journey run log endpoints ([#133](https://github.com/trycourier/courier-ruby/issues/133)) ([fe4a26c](https://github.com/trycourier/courier-ruby/commit/fe4a26c09d0e7f77e068f7767fe6bf3458827d85))
9
+ * **api:** document section_id and section_name on a user's topic preference ([#132](https://github.com/trycourier/courier-ruby/issues/132)) ([86c3108](https://github.com/trycourier/courier-ruby/commit/86c31083552978e501795079b0c0a2a998403eed))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **api:** regenerate SDK ([#130](https://github.com/trycourier/courier-ruby/issues/130)) ([6743e28](https://github.com/trycourier/courier-ruby/commit/6743e288b0cbfb9e72635f411417d69593dc3311))
15
+
3
16
  ## [6.0.0](https://github.com/trycourier/courier-ruby/compare/v5.0.0...v6.0.0) (2026-08-17)
4
17
 
5
18
 
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.0.0"
12
+ gem "trycourier", "~> 6.1.0"
13
13
  ```
14
14
 
15
15
  <!-- x-release-please-end -->
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class AutomationRunListItem < Courier::Internal::Type::BaseModel
6
+ # @!attribute run_id
7
+ # A unique identifier representing the run.
8
+ #
9
+ # @return [String]
10
+ required :run_id, String
11
+
12
+ # @!attribute source
13
+ # Internal provenance strings describing what started the run, e.g.
14
+ # `invoke/<template_id>` or `segment/page/Pricing Page`. Diagnostic only — the
15
+ # format is unstable and should not be parsed.
16
+ #
17
+ # @return [Array<String>]
18
+ required :source, Courier::Internal::Type::ArrayOf[String]
19
+
20
+ # @!attribute created_at
21
+ # When the run started, as an ISO 8601 timestamp.
22
+ #
23
+ # @return [String, nil]
24
+ optional :created_at, String
25
+
26
+ # @!attribute status
27
+ # The state of the run: `PROCESSING`, `PROCESSED`, `WAITING`, `CANCELED`, `ERROR`,
28
+ # `THROTTLED`, or `NOT PROCESSED`. Not an enum — new values have been added
29
+ # before.
30
+ #
31
+ # @return [String, nil]
32
+ optional :status, String
33
+
34
+ # @!attribute template_id
35
+ # The id of the Automation Template this run belongs to.
36
+ #
37
+ # @return [String, nil]
38
+ optional :template_id, String
39
+
40
+ # @!method initialize(run_id:, source:, created_at: nil, status: nil, template_id: nil)
41
+ # Some parameter documentations has been truncated, see
42
+ # {Courier::Models::AutomationRunListItem} for more details.
43
+ #
44
+ # An Automation run as it appears in a list response.
45
+ #
46
+ # @param run_id [String] A unique identifier representing the run.
47
+ #
48
+ # @param source [Array<String>] Internal provenance strings describing what started the run, e.g. `invoke/<templ
49
+ #
50
+ # @param created_at [String] When the run started, as an ISO 8601 timestamp.
51
+ #
52
+ # @param status [String] The state of the run: `PROCESSING`, `PROCESSED`, `WAITING`, `CANCELED`, `ERROR`,
53
+ #
54
+ # @param template_id [String] The id of the Automation Template this run belongs to.
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class AutomationRunListResponse < Courier::Internal::Type::BaseModel
6
+ # @!attribute runs
7
+ #
8
+ # @return [Array<Courier::Models::AutomationRunListItem>]
9
+ required :runs, -> { Courier::Internal::Type::ArrayOf[Courier::AutomationRunListItem] }
10
+
11
+ # @!attribute next_cursor
12
+ # Pass back as `cursor` to fetch the next page. Absent on the last page.
13
+ #
14
+ # @return [String, nil]
15
+ optional :next_cursor, String
16
+
17
+ # @!method initialize(runs:, next_cursor: nil)
18
+ # A page of Automation runs.
19
+ #
20
+ # @param runs [Array<Courier::Models::AutomationRunListItem>]
21
+ #
22
+ # @param next_cursor [String] Pass back as `cursor` to fetch the next page. Absent on the last page.
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class AutomationRunStep < Courier::Internal::Type::BaseModel
6
+ # @!attribute action
7
+ # The kind of step that ran, e.g. `send`, `delay`, or `update-profile`.
8
+ #
9
+ # @return [String]
10
+ required :action, String
11
+
12
+ # @!attribute status
13
+ # The state of the step: the seven run statuses, plus `SKIPPED` and `COMPUTING`.
14
+ # Not an enum — new values have been added before.
15
+ #
16
+ # @return [String]
17
+ required :status, String
18
+
19
+ # @!attribute created_at
20
+ # When the step started, as an ISO 8601 timestamp.
21
+ #
22
+ # @return [String, nil]
23
+ optional :created_at, String
24
+
25
+ # @!attribute message_id
26
+ # The message this step produced, present on send steps. Pass it to
27
+ # `GET /messages/{message_id}` for delivery status. A send to a List or an
28
+ # Audience yields one id for the request, not one per recipient.
29
+ #
30
+ # @return [String, nil]
31
+ optional :message_id, String
32
+
33
+ # @!attribute step_id
34
+ # A unique identifier representing the step.
35
+ #
36
+ # @return [String, nil]
37
+ optional :step_id, String
38
+
39
+ # @!attribute updated_at
40
+ # When the step last changed state, as an ISO 8601 timestamp.
41
+ #
42
+ # @return [String, nil]
43
+ optional :updated_at, String
44
+
45
+ # @!method initialize(action:, status:, created_at: nil, message_id: nil, step_id: nil, updated_at: nil)
46
+ # Some parameter documentations has been truncated, see
47
+ # {Courier::Models::AutomationRunStep} for more details.
48
+ #
49
+ # One executed step of an Automation run.
50
+ #
51
+ # @param action [String] The kind of step that ran, e.g. `send`, `delay`, or `update-profile`.
52
+ #
53
+ # @param status [String] The state of the step: the seven run statuses, plus `SKIPPED` and `COMPUTING`. N
54
+ #
55
+ # @param created_at [String] When the step started, as an ISO 8601 timestamp.
56
+ #
57
+ # @param message_id [String] The message this step produced, present on send steps. Pass it to `GET /messages
58
+ #
59
+ # @param step_id [String] A unique identifier representing the step.
60
+ #
61
+ # @param updated_at [String] When the step last changed state, as an ISO 8601 timestamp.
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class AutomationRunStepsResponse < Courier::Internal::Type::BaseModel
6
+ # @!attribute steps
7
+ #
8
+ # @return [Array<Courier::Models::AutomationRunStep>]
9
+ required :steps, -> { Courier::Internal::Type::ArrayOf[Courier::AutomationRunStep] }
10
+
11
+ # @!method initialize(steps:)
12
+ # Every step of an Automation run. Not paginated.
13
+ #
14
+ # @param steps [Array<Courier::Models::AutomationRunStep>]
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ module Automations
6
+ # @see Courier::Resources::Automations::Runs#list
7
+ class RunListParams < Courier::Internal::Type::BaseModel
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ # @!attribute cursor
12
+ # A cursor token for pagination. Use the `next_cursor` from the previous response
13
+ # to fetch the next page of results. Treat it as opaque.
14
+ #
15
+ # @return [String, nil]
16
+ optional :cursor, String
17
+
18
+ # @!attribute end_date
19
+ # An inclusive upper bound on `created_at`, in the same format as `start_date`.
20
+ #
21
+ # @return [String, nil]
22
+ optional :end_date, String
23
+
24
+ # @!attribute limit
25
+ # The number of runs to return per page, between `1` and `50`. Defaults to `20`.
26
+ # Values outside the range are clamped, and a non-numeric value falls back to
27
+ # `20`.
28
+ #
29
+ # @return [String, nil]
30
+ optional :limit, String
31
+
32
+ # @!attribute start_date
33
+ # An inclusive lower bound on `created_at`, as an ISO 8601 date or timestamp (e.g.
34
+ # `2026-08-18` or `2026-08-18T20:06:36.259Z`). Any other format returns `400`.
35
+ #
36
+ # @return [String, nil]
37
+ optional :start_date, String
38
+
39
+ # @!attribute status
40
+ # A comma-separated list of run statuses to filter on, e.g. `PROCESSED,ERROR`.
41
+ #
42
+ # @return [String, nil]
43
+ optional :status, String
44
+
45
+ # @!attribute template_id
46
+ # A comma-separated list of Automation Template ids to filter on.
47
+ #
48
+ # @return [String, nil]
49
+ optional :template_id, String
50
+
51
+ # @!method initialize(cursor: nil, end_date: nil, limit: nil, start_date: nil, status: nil, template_id: nil, request_options: {})
52
+ # Some parameter documentations has been truncated, see
53
+ # {Courier::Models::Automations::RunListParams} for more details.
54
+ #
55
+ # @param cursor [String] A cursor token for pagination. Use the `next_cursor` from the previous response
56
+ #
57
+ # @param end_date [String] An inclusive upper bound on `created_at`, in the same format as `start_date`.
58
+ #
59
+ # @param limit [String] The number of runs to return per page, between `1` and `50`. Defaults to `20`. V
60
+ #
61
+ # @param start_date [String] An inclusive lower bound on `created_at`, as an ISO 8601 date or timestamp (e.g.
62
+ #
63
+ # @param status [String] A comma-separated list of run statuses to filter on, e.g. `PROCESSED,ERROR`.
64
+ #
65
+ # @param template_id [String] A comma-separated list of Automation Template ids to filter on.
66
+ #
67
+ # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
68
+ end
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ module Automations
6
+ # @see Courier::Resources::Automations::Runs#list_steps
7
+ class RunListStepsParams < Courier::Internal::Type::BaseModel
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ # @!attribute id
12
+ #
13
+ # @return [String]
14
+ required :id, String
15
+
16
+ # @!method initialize(id:, request_options: {})
17
+ # @param id [String]
18
+ # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
19
+ end
20
+ end
21
+ end
22
+ end
@@ -10,7 +10,7 @@ module Courier
10
10
 
11
11
  # @!attribute nodes
12
12
  #
13
- # @return [Array<Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyNode::JourneyAddToDigestNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
13
+ # @return [Array<Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneyAudienceTriggerNode, Courier::Models::JourneyWebhookTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyNode::JourneyAddToDigestNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
14
14
  required :nodes, -> { Courier::Internal::Type::ArrayOf[union: Courier::JourneyNode] }
15
15
 
16
16
  # @!attribute enabled
@@ -29,7 +29,7 @@ module Courier
29
29
  #
30
30
  # @param name [String]
31
31
  #
32
- # @param nodes [Array<Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyNode::JourneyAddToDigestNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
32
+ # @param nodes [Array<Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneyAudienceTriggerNode, Courier::Models::JourneyWebhookTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyNode::JourneyAddToDigestNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
33
33
  #
34
34
  # @param enabled [Boolean]
35
35
  #
@@ -0,0 +1,77 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class JourneyAudienceTriggerNode < Courier::Internal::Type::BaseModel
6
+ # @!attribute audience_id
7
+ # The Audience to watch. Must name a single Audience; wildcards are not supported.
8
+ #
9
+ # @return [String]
10
+ required :audience_id, String
11
+
12
+ # @!attribute trigger_type
13
+ #
14
+ # @return [Symbol, Courier::Models::JourneyAudienceTriggerNode::TriggerType]
15
+ required :trigger_type, enum: -> { Courier::JourneyAudienceTriggerNode::TriggerType }
16
+
17
+ # @!attribute type
18
+ #
19
+ # @return [Symbol, Courier::Models::JourneyAudienceTriggerNode::Type]
20
+ required :type, enum: -> { Courier::JourneyAudienceTriggerNode::Type }
21
+
22
+ # @!attribute id
23
+ #
24
+ # @return [String, nil]
25
+ optional :id, String
26
+
27
+ # @!attribute conditions
28
+ # Condition spec for a journey node. Accepts a single condition atom, an AND/OR
29
+ # group, or an AND/OR nested group. Omit the `conditions` property entirely to
30
+ # express "no conditions".
31
+ #
32
+ # @return [Array<String>, Courier::Models::JourneyConditionGroup, Courier::Models::JourneyConditionNestedGroup, nil]
33
+ optional :conditions, union: -> { Courier::JourneyConditionsField }
34
+
35
+ # @!method initialize(audience_id:, trigger_type:, type:, id: nil, conditions: nil)
36
+ # Some parameter documentations has been truncated, see
37
+ # {Courier::Models::JourneyAudienceTriggerNode} for more details.
38
+ #
39
+ # Trigger fired when a user newly matches an Audience. Leaving and re-joining the
40
+ # Audience re-enters the Journey. Membership is new-members-only: users already in
41
+ # the Audience when the Journey is published do not enter. Unlike the v2
42
+ # Automations audience trigger, there is no member scope, event type, or frequency
43
+ # mode to configure, and `audience_id` must name one Audience — wildcards are not
44
+ # supported.
45
+ #
46
+ # @param audience_id [String] The Audience to watch. Must name a single Audience; wildcards are not supported.
47
+ #
48
+ # @param trigger_type [Symbol, Courier::Models::JourneyAudienceTriggerNode::TriggerType]
49
+ #
50
+ # @param type [Symbol, Courier::Models::JourneyAudienceTriggerNode::Type]
51
+ #
52
+ # @param id [String]
53
+ #
54
+ # @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
55
+
56
+ # @see Courier::Models::JourneyAudienceTriggerNode#trigger_type
57
+ module TriggerType
58
+ extend Courier::Internal::Type::Enum
59
+
60
+ AUDIENCE = :audience
61
+
62
+ # @!method self.values
63
+ # @return [Array<Symbol>]
64
+ end
65
+
66
+ # @see Courier::Models::JourneyAudienceTriggerNode#type
67
+ module Type
68
+ extend Courier::Internal::Type::Enum
69
+
70
+ TRIGGER = :trigger
71
+
72
+ # @!method self.values
73
+ # @return [Array<Symbol>]
74
+ end
75
+ end
76
+ end
77
+ end
@@ -11,9 +11,15 @@ module Courier
11
11
  # Trigger fired when the journey is invoked via the API. The optional `schema` field is a JSON Schema that validates the invocation payload.
12
12
  variant -> { Courier::JourneyAPIInvokeTriggerNode }
13
13
 
14
- # Trigger fired by a segment event (`identify`, `group`, or `track`).
14
+ # Trigger fired by a segment event (`identify`, `group`, `track`, or `page`). A trigger with no `event_id` fires on any event of its type — the only shape `identify` and `group` can take, and the one that catches a stock `analytics.page()` call.
15
15
  variant -> { Courier::JourneySegmentTriggerNode }
16
16
 
17
+ # Trigger fired when a user newly matches an Audience. Leaving and re-joining the Audience re-enters the Journey. Membership is new-members-only: users already in the Audience when the Journey is published do not enter. Unlike the v2 Automations audience trigger, there is no member scope, event type, or frequency mode to configure, and `audience_id` must name one Audience — wildcards are not supported.
18
+ variant -> { Courier::JourneyAudienceTriggerNode }
19
+
20
+ # Trigger fired when an external system POSTs to the webhook URL minted for `event_source`. Narrow it to one event with `event_id`, or omit `event_id` to accept every event delivered to the URL.
21
+ variant -> { Courier::JourneyWebhookTriggerNode }
22
+
17
23
  # Send to the recipient. A send node sources its content from EXACTLY ONE of `message.template` (a single notification template) or `experiment` (an A/B split across weighted template variants) — supplying both, or neither, is rejected. Optionally override the recipient address, send as a tenant, delay the send, or attach `data`.
18
24
  variant -> { Courier::JourneySendNode }
19
25
 
@@ -344,7 +350,7 @@ module Courier
344
350
  end
345
351
 
346
352
  # @!method self.variants
347
- # @return [Array(Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyNode::JourneyAddToDigestNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode)]
353
+ # @return [Array(Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneyAudienceTriggerNode, Courier::Models::JourneyWebhookTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyNode::JourneyAddToDigestNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode)]
348
354
  end
349
355
  end
350
356
  end
@@ -31,7 +31,7 @@ module Courier
31
31
 
32
32
  # @!attribute nodes
33
33
  #
34
- # @return [Array<Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyNode::JourneyAddToDigestNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
34
+ # @return [Array<Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneyAudienceTriggerNode, Courier::Models::JourneyWebhookTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyNode::JourneyAddToDigestNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
35
35
  required :nodes, -> { Courier::Internal::Type::ArrayOf[union: Courier::JourneyNode] }
36
36
 
37
37
  # @!attribute published
@@ -68,7 +68,7 @@ module Courier
68
68
  #
69
69
  # @param name [String]
70
70
  #
71
- # @param nodes [Array<Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyNode::JourneyAddToDigestNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
71
+ # @param nodes [Array<Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneyAudienceTriggerNode, Courier::Models::JourneyWebhookTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyNode::JourneyAddToDigestNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
72
72
  #
73
73
  # @param published [Integer, nil]
74
74
  #
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class JourneyRun < Courier::Internal::Type::BaseModel
6
+ # @!attribute run_id
7
+ # A unique identifier representing the run.
8
+ #
9
+ # @return [String]
10
+ required :run_id, String
11
+
12
+ # @!attribute source
13
+ # Internal provenance strings describing what started the run, e.g.
14
+ # `invoke/<journey_id>` or `segment/page/Pricing Page`. Diagnostic only — the
15
+ # format is unstable and should not be parsed.
16
+ #
17
+ # @return [Array<String>]
18
+ required :source, Courier::Internal::Type::ArrayOf[String]
19
+
20
+ # @!attribute created_at
21
+ # When the run started, as an ISO 8601 timestamp.
22
+ #
23
+ # @return [String, nil]
24
+ optional :created_at, String
25
+
26
+ # @!attribute status
27
+ # The state of the run: `PROCESSING`, `PROCESSED`, `WAITING`, `CANCELED`, `ERROR`,
28
+ # `THROTTLED`, or `NOT PROCESSED`. Not an enum — new values have been added
29
+ # before.
30
+ #
31
+ # @return [String, nil]
32
+ optional :status, String
33
+
34
+ # @!attribute template_id
35
+ # The id of the Journey this run belongs to.
36
+ #
37
+ # @return [String, nil]
38
+ optional :template_id, String
39
+
40
+ # @!attribute updated_at
41
+ # When the run last changed state, as an ISO 8601 timestamp.
42
+ #
43
+ # @return [String, nil]
44
+ optional :updated_at, String
45
+
46
+ # @!method initialize(run_id:, source:, created_at: nil, status: nil, template_id: nil, updated_at: nil)
47
+ # Some parameter documentations has been truncated, see
48
+ # {Courier::Models::JourneyRun} for more details.
49
+ #
50
+ # One run of a Journey. `status` and `created_at` are absent on a small number of
51
+ # legacy runs stored without them.
52
+ #
53
+ # @param run_id [String] A unique identifier representing the run.
54
+ #
55
+ # @param source [Array<String>] Internal provenance strings describing what started the run, e.g. `invoke/<journ
56
+ #
57
+ # @param created_at [String] When the run started, as an ISO 8601 timestamp.
58
+ #
59
+ # @param status [String] The state of the run: `PROCESSING`, `PROCESSED`, `WAITING`, `CANCELED`, `ERROR`,
60
+ #
61
+ # @param template_id [String] The id of the Journey this run belongs to.
62
+ #
63
+ # @param updated_at [String] When the run last changed state, as an ISO 8601 timestamp.
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class JourneyRunListItem < Courier::Internal::Type::BaseModel
6
+ # @!attribute run_id
7
+ # A unique identifier representing the run.
8
+ #
9
+ # @return [String]
10
+ required :run_id, String
11
+
12
+ # @!attribute source
13
+ # Internal provenance strings describing what started the run. Diagnostic only.
14
+ #
15
+ # @return [Array<String>]
16
+ required :source, Courier::Internal::Type::ArrayOf[String]
17
+
18
+ # @!attribute created_at
19
+ # When the run started, as an ISO 8601 timestamp.
20
+ #
21
+ # @return [String, nil]
22
+ optional :created_at, String
23
+
24
+ # @!attribute status
25
+ # The state of the run. See `JourneyRun.status` for the values it takes.
26
+ #
27
+ # @return [String, nil]
28
+ optional :status, String
29
+
30
+ # @!attribute template_id
31
+ # The id of the Journey this run belongs to.
32
+ #
33
+ # @return [String, nil]
34
+ optional :template_id, String
35
+
36
+ # @!method initialize(run_id:, source:, created_at: nil, status: nil, template_id: nil)
37
+ # A Journey run as it appears in a list response, without `updated_at`.
38
+ #
39
+ # @param run_id [String] A unique identifier representing the run.
40
+ #
41
+ # @param source [Array<String>] Internal provenance strings describing what started the run. Diagnostic only.
42
+ #
43
+ # @param created_at [String] When the run started, as an ISO 8601 timestamp.
44
+ #
45
+ # @param status [String] The state of the run. See `JourneyRun.status` for the values it takes.
46
+ #
47
+ # @param template_id [String] The id of the Journey this run belongs to.
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class JourneyRunListResponse < Courier::Internal::Type::BaseModel
6
+ # @!attribute runs
7
+ #
8
+ # @return [Array<Courier::Models::JourneyRunListItem>]
9
+ required :runs, -> { Courier::Internal::Type::ArrayOf[Courier::JourneyRunListItem] }
10
+
11
+ # @!attribute next_cursor
12
+ # Pass back as `cursor` to fetch the next page. Absent on the last page.
13
+ #
14
+ # @return [String, nil]
15
+ optional :next_cursor, String
16
+
17
+ # @!attribute prev_cursor
18
+ # Pass back as `cursor` to fetch the previous page. Absent on the first page.
19
+ #
20
+ # @return [String, nil]
21
+ optional :prev_cursor, String
22
+
23
+ # @!method initialize(runs:, next_cursor: nil, prev_cursor: nil)
24
+ # A page of Journey runs.
25
+ #
26
+ # @param runs [Array<Courier::Models::JourneyRunListItem>]
27
+ #
28
+ # @param next_cursor [String] Pass back as `cursor` to fetch the next page. Absent on the last page.
29
+ #
30
+ # @param prev_cursor [String] Pass back as `cursor` to fetch the previous page. Absent on the first page.
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class JourneyRunResponse < Courier::Internal::Type::BaseModel
6
+ # @!attribute run
7
+ # One run of a Journey. `status` and `created_at` are absent on a small number of
8
+ # legacy runs stored without them.
9
+ #
10
+ # @return [Courier::Models::JourneyRun]
11
+ required :run, -> { Courier::JourneyRun }
12
+
13
+ # @!method initialize(run:)
14
+ # Some parameter documentations has been truncated, see
15
+ # {Courier::Models::JourneyRunResponse} for more details.
16
+ #
17
+ # A single Journey run.
18
+ #
19
+ # @param run [Courier::Models::JourneyRun] One run of a Journey. `status` and `created_at` are absent on a small number of
20
+ end
21
+ end
22
+ end