trycourier 4.11.0 → 4.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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -0
  3. data/lib/courier/client.rb +4 -0
  4. data/lib/courier/models/brand_create_params.rb +7 -7
  5. data/lib/courier/models/create_journey_request.rb +2 -2
  6. data/lib/courier/models/digest_category.rb +53 -0
  7. data/lib/courier/models/digest_instance.rb +98 -0
  8. data/lib/courier/models/digest_instance_list_response.rb +72 -0
  9. data/lib/courier/models/digests/schedule_list_instances_params.rb +43 -0
  10. data/lib/courier/models/digests/schedule_release_params.rb +22 -0
  11. data/lib/courier/models/journey_node.rb +157 -1
  12. data/lib/courier/models/journey_response.rb +2 -2
  13. data/lib/courier/models.rb +8 -0
  14. data/lib/courier/resources/brands.rb +4 -3
  15. data/lib/courier/resources/digests/schedules.rb +72 -0
  16. data/lib/courier/resources/digests.rb +18 -0
  17. data/lib/courier/resources/journeys.rb +2 -2
  18. data/lib/courier/version.rb +1 -1
  19. data/lib/courier.rb +7 -0
  20. data/rbi/courier/client.rbi +3 -0
  21. data/rbi/courier/models/brand_create_params.rbi +8 -8
  22. data/rbi/courier/models/create_journey_request.rbi +3 -0
  23. data/rbi/courier/models/digest_category.rbi +82 -0
  24. data/rbi/courier/models/digest_instance.rbi +138 -0
  25. data/rbi/courier/models/digest_instance_list_response.rbi +104 -0
  26. data/rbi/courier/models/digests/schedule_list_instances_params.rbi +70 -0
  27. data/rbi/courier/models/digests/schedule_release_params.rbi +40 -0
  28. data/rbi/courier/models/journey_node.rbi +315 -0
  29. data/rbi/courier/models/journey_response.rbi +1 -0
  30. data/rbi/courier/models.rbi +8 -0
  31. data/rbi/courier/resources/brands.rbi +4 -9
  32. data/rbi/courier/resources/digests/schedules.rbi +54 -0
  33. data/rbi/courier/resources/digests.rbi +15 -0
  34. data/rbi/courier/resources/journeys.rbi +2 -0
  35. data/sig/courier/client.rbs +2 -0
  36. data/sig/courier/models/brand_create_params.rbs +5 -5
  37. data/sig/courier/models/digest_category.rbs +46 -0
  38. data/sig/courier/models/digest_instance.rbs +83 -0
  39. data/sig/courier/models/digest_instance_list_response.rbs +57 -0
  40. data/sig/courier/models/digests/schedule_list_instances_params.rbs +38 -0
  41. data/sig/courier/models/digests/schedule_release_params.rbs +25 -0
  42. data/sig/courier/models/journey_node.rbs +130 -0
  43. data/sig/courier/models.rbs +8 -0
  44. data/sig/courier/resources/brands.rbs +1 -1
  45. data/sig/courier/resources/digests/schedules.rbs +21 -0
  46. data/sig/courier/resources/digests.rbs +9 -0
  47. metadata +23 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 07ec887deae40e31444ee6401c3b00061e0bbc4156700f5ff1361e1366fab649
4
- data.tar.gz: 9167f8538d2652a8cd9e6723ab309f331f7487e1a96f69fa72abea27e4d76c25
3
+ metadata.gz: 37aa19773ceb09212a579b95cece20b1d95e2d9c284986234c2982ab5c99dd29
4
+ data.tar.gz: b44f8bfc0a5af5fd6cbc74caa6c2129e2e3effeddb4c785bd8e5558fefbb1db2
5
5
  SHA512:
6
- metadata.gz: bdd2bb582d89b2d3c4ebaa5f7d2c70a6cfb72ca9c2288322cb4ce8d21f14deafe67e6546a1d1dd7b007910e5b1fcff183b41336a6ac11fe7eee3706b2104e415
7
- data.tar.gz: 98365664a918844655cd990b7195323dc6c60185b5efcaf9a667e12a81d40ec35fc426fbdd98920cfc6f34299101c8b7d6e7e27b1f765698158260ab94c3fa42
6
+ metadata.gz: 3bfd8cc5bd06c32e4840af2f2a30a1b9526606988d789ea40789023f0c33358f34a4b7be8832427e74141d8245c76beabea559e934b0c32773ac37dd50b512b6
7
+ data.tar.gz: 7449070ddd94cbf33a51a69b907b7b9f44b01db49f3e70e2682d3b9c9d1f2d3bbc18a6038c3e86395bc494a0938fb8069db6b9871001dafe60e4f200dd3fc36f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.13.0 (2026-06-12)
4
+
5
+ Full Changelog: [v4.12.0...v4.13.0](https://github.com/trycourier/courier-ruby/compare/v4.12.0...v4.13.0)
6
+
7
+ ### Features
8
+
9
+ * **digests:** document digest REST endpoints in OpenAPI spec ([6fdd4fc](https://github.com/trycourier/courier-ruby/commit/6fdd4fc94c104e0f3ca8905108a18eeafd9c5abc))
10
+
11
+ ## 4.12.0 (2026-05-28)
12
+
13
+ Full Changelog: [v4.11.0...v4.12.0](https://github.com/trycourier/courier-ruby/compare/v4.11.0...v4.12.0)
14
+
15
+ ### Features
16
+
17
+ * C-18612 Add Journeys `batch` node variant to OpenAPI spec ([046a5de](https://github.com/trycourier/courier-ruby/commit/046a5de8a353a40c44f3901313151bf62105c19c))
18
+ * Mark `settings` as required on POST /brands ([72fb020](https://github.com/trycourier/courier-ruby/commit/72fb020cc45f9c4b5384d7492fb8908ac3e82379))
19
+
3
20
  ## 4.11.0 (2026-05-19)
4
21
 
5
22
  Full Changelog: [v4.10.2...v4.11.0](https://github.com/trycourier/courier-ruby/compare/v4.10.2...v4.11.0)
@@ -45,6 +45,9 @@ module Courier
45
45
  # @return [Courier::Resources::Bulk]
46
46
  attr_reader :bulk
47
47
 
48
+ # @return [Courier::Resources::Digests]
49
+ attr_reader :digests
50
+
48
51
  # @return [Courier::Resources::Inbound]
49
52
  attr_reader :inbound
50
53
 
@@ -145,6 +148,7 @@ module Courier
145
148
  @journeys = Courier::Resources::Journeys.new(client: self)
146
149
  @brands = Courier::Resources::Brands.new(client: self)
147
150
  @bulk = Courier::Resources::Bulk.new(client: self)
151
+ @digests = Courier::Resources::Digests.new(client: self)
148
152
  @inbound = Courier::Resources::Inbound.new(client: self)
149
153
  @lists = Courier::Resources::Lists.new(client: self)
150
154
  @messages = Courier::Resources::Messages.new(client: self)
@@ -12,25 +12,25 @@ module Courier
12
12
  # @return [String]
13
13
  required :name, String
14
14
 
15
+ # @!attribute settings
16
+ #
17
+ # @return [Courier::Models::BrandSettings]
18
+ required :settings, -> { Courier::BrandSettings }
19
+
15
20
  # @!attribute id
16
21
  #
17
22
  # @return [String, nil]
18
23
  optional :id, String, nil?: true
19
24
 
20
- # @!attribute settings
21
- #
22
- # @return [Courier::Models::BrandSettings, nil]
23
- optional :settings, -> { Courier::BrandSettings }, nil?: true
24
-
25
25
  # @!attribute snippets
26
26
  #
27
27
  # @return [Courier::Models::BrandSnippets, nil]
28
28
  optional :snippets, -> { Courier::BrandSnippets }, nil?: true
29
29
 
30
- # @!method initialize(name:, id: nil, settings: nil, snippets: nil, request_options: {})
30
+ # @!method initialize(name:, settings:, id: nil, snippets: nil, request_options: {})
31
31
  # @param name [String]
32
+ # @param settings [Courier::Models::BrandSettings]
32
33
  # @param id [String, nil]
33
- # @param settings [Courier::Models::BrandSettings, nil]
34
34
  # @param snippets [Courier::Models::BrandSnippets, nil]
35
35
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
36
36
  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::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
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::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::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
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::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
33
33
  #
34
34
  # @param enabled [Boolean]
35
35
  #
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class DigestCategory < Courier::Internal::Type::BaseModel
6
+ # @!attribute category_key
7
+ # The key that identifies the category within the digest.
8
+ #
9
+ # @return [String]
10
+ required :category_key, String
11
+
12
+ # @!attribute retain
13
+ # Which events to keep when the number of events exceeds the retention limit for
14
+ # the category.
15
+ #
16
+ # @return [Symbol, Courier::Models::DigestCategory::Retain]
17
+ required :retain, enum: -> { Courier::DigestCategory::Retain }
18
+
19
+ # @!attribute sort_key
20
+ # The data key used to order events when `retain` is `highest` or `lowest`.
21
+ #
22
+ # @return [String, nil]
23
+ optional :sort_key, String
24
+
25
+ # @!method initialize(category_key:, retain:, sort_key: nil)
26
+ # Some parameter documentations has been truncated, see
27
+ # {Courier::Models::DigestCategory} for more details.
28
+ #
29
+ # @param category_key [String] The key that identifies the category within the digest.
30
+ #
31
+ # @param retain [Symbol, Courier::Models::DigestCategory::Retain] Which events to keep when the number of events exceeds the retention limit for t
32
+ #
33
+ # @param sort_key [String] The data key used to order events when `retain` is `highest` or `lowest`.
34
+
35
+ # Which events to keep when the number of events exceeds the retention limit for
36
+ # the category.
37
+ #
38
+ # @see Courier::Models::DigestCategory#retain
39
+ module Retain
40
+ extend Courier::Internal::Type::Enum
41
+
42
+ FIRST = :first
43
+ LAST = :last
44
+ HIGHEST = :highest
45
+ LOWEST = :lowest
46
+ NONE = :none
47
+
48
+ # @!method self.values
49
+ # @return [Array<Symbol>]
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,98 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class DigestInstance < Courier::Internal::Type::BaseModel
6
+ # @!attribute digest_instance_id
7
+ # A unique identifier for the digest instance.
8
+ #
9
+ # @return [String]
10
+ required :digest_instance_id, String
11
+
12
+ # @!attribute event_count
13
+ # The total number of events received for this instance.
14
+ #
15
+ # @return [Integer]
16
+ required :event_count, Integer
17
+
18
+ # @!attribute status
19
+ # The status of the digest instance. `IN_PROGRESS` instances are still
20
+ # accumulating events; `COMPLETED` instances have been released.
21
+ #
22
+ # @return [Symbol, Courier::Models::DigestInstance::Status]
23
+ required :status, enum: -> { Courier::DigestInstance::Status }
24
+
25
+ # @!attribute user_id
26
+ # The ID of the user this digest instance belongs to.
27
+ #
28
+ # @return [String]
29
+ required :user_id, String
30
+
31
+ # @!attribute categories
32
+ # The categories configured for the digest.
33
+ #
34
+ # @return [Array<Courier::Models::DigestCategory>, nil]
35
+ optional :categories, -> { Courier::Internal::Type::ArrayOf[Courier::DigestCategory] }
36
+
37
+ # @!attribute category_key_counts
38
+ # A map of category key to the number of events received for that category.
39
+ #
40
+ # @return [Hash{Symbol=>Integer}, nil]
41
+ optional :category_key_counts, Courier::Internal::Type::HashOf[Integer]
42
+
43
+ # @!attribute created_at
44
+ # An ISO 8601 timestamp of when the digest instance was created.
45
+ #
46
+ # @return [String, nil]
47
+ optional :created_at, String
48
+
49
+ # @!attribute disabled
50
+ # Whether the digest instance has been disabled.
51
+ #
52
+ # @return [Boolean, nil]
53
+ optional :disabled, Courier::Internal::Type::Boolean
54
+
55
+ # @!attribute tenant_id
56
+ # The ID of the tenant this digest instance belongs to, if any.
57
+ #
58
+ # @return [String, nil]
59
+ optional :tenant_id, String, nil?: true
60
+
61
+ # @!method initialize(digest_instance_id:, event_count:, status:, user_id:, categories: nil, category_key_counts: nil, created_at: nil, disabled: nil, tenant_id: nil)
62
+ # Some parameter documentations has been truncated, see
63
+ # {Courier::Models::DigestInstance} for more details.
64
+ #
65
+ # @param digest_instance_id [String] A unique identifier for the digest instance.
66
+ #
67
+ # @param event_count [Integer] The total number of events received for this instance.
68
+ #
69
+ # @param status [Symbol, Courier::Models::DigestInstance::Status] The status of the digest instance. `IN_PROGRESS` instances are still accumulatin
70
+ #
71
+ # @param user_id [String] The ID of the user this digest instance belongs to.
72
+ #
73
+ # @param categories [Array<Courier::Models::DigestCategory>] The categories configured for the digest.
74
+ #
75
+ # @param category_key_counts [Hash{Symbol=>Integer}] A map of category key to the number of events received for that category.
76
+ #
77
+ # @param created_at [String] An ISO 8601 timestamp of when the digest instance was created.
78
+ #
79
+ # @param disabled [Boolean] Whether the digest instance has been disabled.
80
+ #
81
+ # @param tenant_id [String, nil] The ID of the tenant this digest instance belongs to, if any.
82
+
83
+ # The status of the digest instance. `IN_PROGRESS` instances are still
84
+ # accumulating events; `COMPLETED` instances have been released.
85
+ #
86
+ # @see Courier::Models::DigestInstance#status
87
+ module Status
88
+ extend Courier::Internal::Type::Enum
89
+
90
+ IN_PROGRESS = :IN_PROGRESS
91
+ COMPLETED = :COMPLETED
92
+
93
+ # @!method self.values
94
+ # @return [Array<Symbol>]
95
+ end
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,72 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class DigestInstanceListResponse < Courier::Internal::Type::BaseModel
6
+ # @!attribute has_more
7
+ # Whether there are more digest instances to fetch using the cursor.
8
+ #
9
+ # @return [Boolean]
10
+ required :has_more, Courier::Internal::Type::Boolean
11
+
12
+ # @!attribute items
13
+ # The digest instances for this page of results.
14
+ #
15
+ # @return [Array<Courier::Models::DigestInstance>]
16
+ required :items, -> { Courier::Internal::Type::ArrayOf[Courier::DigestInstance] }
17
+
18
+ # @!attribute type
19
+ # Always `list` for a paginated list response.
20
+ #
21
+ # @return [Symbol, Courier::Models::DigestInstanceListResponse::Type]
22
+ required :type, enum: -> { Courier::DigestInstanceListResponse::Type }
23
+
24
+ # @!attribute cursor
25
+ # A cursor token for fetching the next page of results, or null when there are
26
+ # none.
27
+ #
28
+ # @return [String, nil]
29
+ optional :cursor, String, nil?: true
30
+
31
+ # @!attribute next_url
32
+ # The path to fetch the next page of results, or null when there are none.
33
+ #
34
+ # @return [String, nil]
35
+ optional :next_url, String, nil?: true
36
+
37
+ # @!attribute url
38
+ # The path of the current request.
39
+ #
40
+ # @return [String, nil]
41
+ optional :url, String
42
+
43
+ # @!method initialize(has_more:, items:, type:, cursor: nil, next_url: nil, url: nil)
44
+ # Some parameter documentations has been truncated, see
45
+ # {Courier::Models::DigestInstanceListResponse} for more details.
46
+ #
47
+ # @param has_more [Boolean] Whether there are more digest instances to fetch using the cursor.
48
+ #
49
+ # @param items [Array<Courier::Models::DigestInstance>] The digest instances for this page of results.
50
+ #
51
+ # @param type [Symbol, Courier::Models::DigestInstanceListResponse::Type] Always `list` for a paginated list response.
52
+ #
53
+ # @param cursor [String, nil] A cursor token for fetching the next page of results, or null when there are non
54
+ #
55
+ # @param next_url [String, nil] The path to fetch the next page of results, or null when there are none.
56
+ #
57
+ # @param url [String] The path of the current request.
58
+
59
+ # Always `list` for a paginated list response.
60
+ #
61
+ # @see Courier::Models::DigestInstanceListResponse#type
62
+ module Type
63
+ extend Courier::Internal::Type::Enum
64
+
65
+ LIST = :list
66
+
67
+ # @!method self.values
68
+ # @return [Array<Symbol>]
69
+ end
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ module Digests
6
+ # @see Courier::Resources::Digests::Schedules#list_instances
7
+ class ScheduleListInstancesParams < Courier::Internal::Type::BaseModel
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ # @!attribute schedule_id
12
+ #
13
+ # @return [String]
14
+ required :schedule_id, String
15
+
16
+ # @!attribute cursor
17
+ # A cursor token from a previous response, used to fetch the next page of results.
18
+ #
19
+ # @return [String, nil]
20
+ optional :cursor, String
21
+
22
+ # @!attribute limit
23
+ # The maximum number of digest instances to return. Defaults to 20, with a maximum
24
+ # of 100.
25
+ #
26
+ # @return [Integer, nil]
27
+ optional :limit, Integer
28
+
29
+ # @!method initialize(schedule_id:, cursor: nil, limit: nil, request_options: {})
30
+ # Some parameter documentations has been truncated, see
31
+ # {Courier::Models::Digests::ScheduleListInstancesParams} for more details.
32
+ #
33
+ # @param schedule_id [String]
34
+ #
35
+ # @param cursor [String] A cursor token from a previous response, used to fetch the next page of results.
36
+ #
37
+ # @param limit [Integer] The maximum number of digest instances to return. Defaults to 20, with a maximum
38
+ #
39
+ # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ module Digests
6
+ # @see Courier::Resources::Digests::Schedules#release
7
+ class ScheduleReleaseParams < Courier::Internal::Type::BaseModel
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ # @!attribute schedule_id
12
+ #
13
+ # @return [String]
14
+ required :schedule_id, String
15
+
16
+ # @!method initialize(schedule_id:, request_options: {})
17
+ # @param schedule_id [String]
18
+ # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
19
+ end
20
+ end
21
+ end
22
+ end
@@ -38,12 +38,168 @@ module Courier
38
38
  # Throttle the journey by a dynamic `throttle_key`, allowing at most `max_allowed` invocations per `period`.
39
39
  variant -> { Courier::JourneyThrottleDynamicNode }
40
40
 
41
+ # Collect events arriving at the node into a single batch and fire one downstream step with the aggregated payload. The first event into a batch owns the run; later contributing events terminate at the batch step. The batch releases when any of `max_items` is reached, a quiet window of `wait_period` elapses, or the `max_wait_period` ceiling hits.
42
+ variant -> { Courier::JourneyNode::JourneyBatchNode }
43
+
41
44
  # Terminate the journey run.
42
45
  variant -> { Courier::JourneyExitNode }
43
46
 
44
47
  # Branch node. Routes to the first entry in `paths[]` whose `conditions` match, else falls through to `default.nodes`.
45
48
  variant -> { Courier::JourneyNode::JourneyBranchNode }
46
49
 
50
+ class JourneyBatchNode < Courier::Internal::Type::BaseModel
51
+ # @!attribute max_wait_period
52
+ # ISO 8601 duration. Hard ceiling from the first event into the batch; releases
53
+ # the batch unconditionally when it elapses.
54
+ #
55
+ # @return [String]
56
+ required :max_wait_period, String
57
+
58
+ # @!attribute retain
59
+ # How to select which collected events to retain in the aggregated payload when
60
+ # the batch releases.
61
+ #
62
+ # @return [Courier::Models::JourneyNode::JourneyBatchNode::Retain]
63
+ required :retain, -> { Courier::JourneyNode::JourneyBatchNode::Retain }
64
+
65
+ # @!attribute scope
66
+ #
67
+ # @return [Symbol, Courier::Models::JourneyNode::JourneyBatchNode::Scope]
68
+ required :scope, enum: -> { Courier::JourneyNode::JourneyBatchNode::Scope }
69
+
70
+ # @!attribute type
71
+ #
72
+ # @return [Symbol, Courier::Models::JourneyNode::JourneyBatchNode::Type]
73
+ required :type, enum: -> { Courier::JourneyNode::JourneyBatchNode::Type }
74
+
75
+ # @!attribute wait_period
76
+ # ISO 8601 duration. Quiet window that releases the batch when it elapses with no
77
+ # new contributing events. Must be less than `max_wait_period`.
78
+ #
79
+ # @return [String]
80
+ required :wait_period, String
81
+
82
+ # @!attribute id
83
+ #
84
+ # @return [String, nil]
85
+ optional :id, String
86
+
87
+ # @!attribute category_key
88
+ # Optional partition key. Events with the same `category_key` are batched
89
+ # together; events with different values are batched separately.
90
+ #
91
+ # @return [String, nil]
92
+ optional :category_key, String
93
+
94
+ # @!attribute conditions
95
+ # Condition spec for a journey node. Accepts a single condition atom, an AND/OR
96
+ # group, or an AND/OR nested group. Omit the `conditions` property entirely to
97
+ # express "no conditions".
98
+ #
99
+ # @return [Array<String>, Courier::Models::JourneyConditionGroup, Courier::Models::JourneyConditionNestedGroup, nil]
100
+ optional :conditions, union: -> { Courier::JourneyConditionsField }
101
+
102
+ # @!attribute max_items
103
+ # Releases the batch once this many events have been collected.
104
+ #
105
+ # @return [Integer, nil]
106
+ optional :max_items, Integer
107
+
108
+ # @!method initialize(max_wait_period:, retain:, scope:, type:, wait_period:, id: nil, category_key: nil, conditions: nil, max_items: nil)
109
+ # Some parameter documentations has been truncated, see
110
+ # {Courier::Models::JourneyNode::JourneyBatchNode} for more details.
111
+ #
112
+ # Collect events arriving at the node into a single batch and fire one downstream
113
+ # step with the aggregated payload. The first event into a batch owns the run;
114
+ # later contributing events terminate at the batch step. The batch releases when
115
+ # any of `max_items` is reached, a quiet window of `wait_period` elapses, or the
116
+ # `max_wait_period` ceiling hits.
117
+ #
118
+ # @param max_wait_period [String] ISO 8601 duration. Hard ceiling from the first event into the batch; releases th
119
+ #
120
+ # @param retain [Courier::Models::JourneyNode::JourneyBatchNode::Retain] How to select which collected events to retain in the aggregated payload when th
121
+ #
122
+ # @param scope [Symbol, Courier::Models::JourneyNode::JourneyBatchNode::Scope]
123
+ #
124
+ # @param type [Symbol, Courier::Models::JourneyNode::JourneyBatchNode::Type]
125
+ #
126
+ # @param wait_period [String] ISO 8601 duration. Quiet window that releases the batch when it elapses with no
127
+ #
128
+ # @param id [String]
129
+ #
130
+ # @param category_key [String] Optional partition key. Events with the same `category_key` are batched together
131
+ #
132
+ # @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
133
+ #
134
+ # @param max_items [Integer] Releases the batch once this many events have been collected.
135
+
136
+ # @see Courier::Models::JourneyNode::JourneyBatchNode#retain
137
+ class Retain < Courier::Internal::Type::BaseModel
138
+ # @!attribute count
139
+ #
140
+ # @return [Integer]
141
+ required :count, Integer
142
+
143
+ # @!attribute type
144
+ #
145
+ # @return [Symbol, Courier::Models::JourneyNode::JourneyBatchNode::Retain::Type]
146
+ required :type, enum: -> { Courier::JourneyNode::JourneyBatchNode::Retain::Type }
147
+
148
+ # @!attribute sort_key
149
+ # Dot-path into the event payload (e.g. `data.priority`). Required when `type` is
150
+ # `highest` or `lowest`.
151
+ #
152
+ # @return [String, nil]
153
+ optional :sort_key, String
154
+
155
+ # @!method initialize(count:, type:, sort_key: nil)
156
+ # Some parameter documentations has been truncated, see
157
+ # {Courier::Models::JourneyNode::JourneyBatchNode::Retain} for more details.
158
+ #
159
+ # How to select which collected events to retain in the aggregated payload when
160
+ # the batch releases.
161
+ #
162
+ # @param count [Integer]
163
+ #
164
+ # @param type [Symbol, Courier::Models::JourneyNode::JourneyBatchNode::Retain::Type]
165
+ #
166
+ # @param sort_key [String] Dot-path into the event payload (e.g. `data.priority`). Required when `type` is
167
+
168
+ # @see Courier::Models::JourneyNode::JourneyBatchNode::Retain#type
169
+ module Type
170
+ extend Courier::Internal::Type::Enum
171
+
172
+ FIRST = :first
173
+ LAST = :last
174
+ HIGHEST = :highest
175
+ LOWEST = :lowest
176
+
177
+ # @!method self.values
178
+ # @return [Array<Symbol>]
179
+ end
180
+ end
181
+
182
+ # @see Courier::Models::JourneyNode::JourneyBatchNode#scope
183
+ module Scope
184
+ extend Courier::Internal::Type::Enum
185
+
186
+ USER = :user
187
+
188
+ # @!method self.values
189
+ # @return [Array<Symbol>]
190
+ end
191
+
192
+ # @see Courier::Models::JourneyNode::JourneyBatchNode#type
193
+ module Type
194
+ extend Courier::Internal::Type::Enum
195
+
196
+ BATCH = :batch
197
+
198
+ # @!method self.values
199
+ # @return [Array<Symbol>]
200
+ end
201
+ end
202
+
47
203
  class JourneyBranchNode < Courier::Internal::Type::BaseModel
48
204
  # @!attribute default
49
205
  #
@@ -133,7 +289,7 @@ module Courier
133
289
  end
134
290
 
135
291
  # @!method self.variants
136
- # @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::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode)]
292
+ # @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::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode)]
137
293
  end
138
294
  end
139
295
  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::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
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::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::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
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::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
72
72
  #
73
73
  # @param published [Integer, nil]
74
74
  #
@@ -139,6 +139,14 @@ module Courier
139
139
 
140
140
  DeviceType = Courier::Models::DeviceType
141
141
 
142
+ DigestCategory = Courier::Models::DigestCategory
143
+
144
+ DigestInstance = Courier::Models::DigestInstance
145
+
146
+ DigestInstanceListResponse = Courier::Models::DigestInstanceListResponse
147
+
148
+ Digests = Courier::Models::Digests
149
+
142
150
  Discord = Courier::Models::Discord
143
151
 
144
152
  ElementalActionNodeWithType = Courier::Models::ElementalActionNodeWithType
@@ -3,13 +3,14 @@
3
3
  module Courier
4
4
  module Resources
5
5
  class Brands
6
- # Create a new brand
6
+ # Create a new brand. Requires `name` and `settings` (with at least
7
+ # `colors.primary` and `colors.secondary`).
7
8
  #
8
- # @overload create(name:, id: nil, settings: nil, snippets: nil, request_options: {})
9
+ # @overload create(name:, settings:, id: nil, snippets: nil, request_options: {})
9
10
  #
10
11
  # @param name [String]
12
+ # @param settings [Courier::Models::BrandSettings]
11
13
  # @param id [String, nil]
12
- # @param settings [Courier::Models::BrandSettings, nil]
13
14
  # @param snippets [Courier::Models::BrandSnippets, nil]
14
15
  # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
15
16
  #