trycourier 6.0.0 → 6.2.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 (94) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -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/notification_get_metrics_params.rb +83 -0
  26. data/lib/courier/models/notification_metrics_response.rb +165 -0
  27. data/lib/courier/models/users/topic_preference.rb +21 -1
  28. data/lib/courier/models.rb +28 -0
  29. data/lib/courier/resources/automations/runs.rb +80 -0
  30. data/lib/courier/resources/automations.rb +6 -0
  31. data/lib/courier/resources/journeys/runs.rb +104 -0
  32. data/lib/courier/resources/journeys.rb +8 -2
  33. data/lib/courier/resources/notifications.rb +53 -0
  34. data/lib/courier/version.rb +1 -1
  35. data/lib/courier.rb +21 -0
  36. data/rbi/courier/models/automation_run_list_item.rbi +87 -0
  37. data/rbi/courier/models/automation_run_list_response.rbi +47 -0
  38. data/rbi/courier/models/automation_run_step.rbi +96 -0
  39. data/rbi/courier/models/automation_run_steps_response.rbi +28 -0
  40. data/rbi/courier/models/automations/run_list_params.rbi +114 -0
  41. data/rbi/courier/models/automations/run_list_steps_params.rbi +40 -0
  42. data/rbi/courier/models/create_journey_request.rbi +6 -0
  43. data/rbi/courier/models/journey_audience_trigger_node.rbi +162 -0
  44. data/rbi/courier/models/journey_node.rbi +2 -0
  45. data/rbi/courier/models/journey_response.rbi +2 -0
  46. data/rbi/courier/models/journey_run.rbi +97 -0
  47. data/rbi/courier/models/journey_run_list_item.rbi +79 -0
  48. data/rbi/courier/models/journey_run_list_response.rbi +58 -0
  49. data/rbi/courier/models/journey_run_response.rbi +33 -0
  50. data/rbi/courier/models/journey_run_step.rbi +97 -0
  51. data/rbi/courier/models/journey_run_steps_response.rbi +28 -0
  52. data/rbi/courier/models/journey_segment_trigger_node.rbi +9 -1
  53. data/rbi/courier/models/journey_webhook_trigger_node.rbi +174 -0
  54. data/rbi/courier/models/journeys/run_list_params.rbi +111 -0
  55. data/rbi/courier/models/journeys/run_list_steps_params.rbi +40 -0
  56. data/rbi/courier/models/journeys/run_retrieve_params.rbi +40 -0
  57. data/rbi/courier/models/notification_get_metrics_params.rbi +167 -0
  58. data/rbi/courier/models/notification_metrics_response.rbi +269 -0
  59. data/rbi/courier/models/users/topic_preference.rbi +33 -3
  60. data/rbi/courier/models.rbi +28 -0
  61. data/rbi/courier/resources/automations/runs.rbi +69 -0
  62. data/rbi/courier/resources/automations.rbi +5 -0
  63. data/rbi/courier/resources/journeys/runs.rbi +87 -0
  64. data/rbi/courier/resources/journeys.rbi +9 -0
  65. data/rbi/courier/resources/notifications.rbi +57 -0
  66. data/sig/courier/models/automation_run_list_item.rbs +46 -0
  67. data/sig/courier/models/automation_run_list_response.rbs +24 -0
  68. data/sig/courier/models/automation_run_step.rbs +53 -0
  69. data/sig/courier/models/automation_run_steps_response.rbs +14 -0
  70. data/sig/courier/models/automations/run_list_params.rbs +65 -0
  71. data/sig/courier/models/automations/run_list_steps_params.rbs +22 -0
  72. data/sig/courier/models/journey_audience_trigger_node.rbs +66 -0
  73. data/sig/courier/models/journey_node.rbs +2 -0
  74. data/sig/courier/models/journey_run.rbs +53 -0
  75. data/sig/courier/models/journey_run_list_item.rbs +46 -0
  76. data/sig/courier/models/journey_run_list_response.rbs +34 -0
  77. data/sig/courier/models/journey_run_response.rbs +13 -0
  78. data/sig/courier/models/journey_run_step.rbs +53 -0
  79. data/sig/courier/models/journey_run_steps_response.rbs +14 -0
  80. data/sig/courier/models/journey_segment_trigger_node.rbs +2 -1
  81. data/sig/courier/models/journey_webhook_trigger_node.rbs +73 -0
  82. data/sig/courier/models/journeys/run_list_params.rbs +65 -0
  83. data/sig/courier/models/journeys/run_list_steps_params.rbs +25 -0
  84. data/sig/courier/models/journeys/run_retrieve_params.rbs +25 -0
  85. data/sig/courier/models/notification_get_metrics_params.rbs +69 -0
  86. data/sig/courier/models/notification_metrics_response.rbs +127 -0
  87. data/sig/courier/models/users/topic_preference.rbs +17 -3
  88. data/sig/courier/models.rbs +28 -0
  89. data/sig/courier/resources/automations/runs.rbs +24 -0
  90. data/sig/courier/resources/automations.rbs +2 -0
  91. data/sig/courier/resources/journeys/runs.rbs +29 -0
  92. data/sig/courier/resources/journeys.rbs +2 -0
  93. data/sig/courier/resources/notifications.rbs +9 -0
  94. metadata +65 -2
@@ -0,0 +1,65 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class JourneyRunStep < Courier::Internal::Type::BaseModel
6
+ # @!attribute action
7
+ # The kind of node that ran, e.g. `send`, `delay`, or `exit`.
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 node_id
34
+ # The id of the node in the published Journey that this step executed.
35
+ #
36
+ # @return [String, nil]
37
+ optional :node_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, node_id: nil, updated_at: nil)
46
+ # Some parameter documentations has been truncated, see
47
+ # {Courier::Models::JourneyRunStep} for more details.
48
+ #
49
+ # One executed node of a Journey run. `node_id` is the id of the node in the
50
+ # published Journey, so a step maps directly onto the Journey graph.
51
+ #
52
+ # @param action [String] The kind of node that ran, e.g. `send`, `delay`, or `exit`.
53
+ #
54
+ # @param status [String] The state of the step: the seven run statuses, plus `SKIPPED` and `COMPUTING`. N
55
+ #
56
+ # @param created_at [String] When the step started, as an ISO 8601 timestamp.
57
+ #
58
+ # @param message_id [String] The message this step produced, present on send steps. Pass it to `GET /messages
59
+ #
60
+ # @param node_id [String] The id of the node in the published Journey that this step executed.
61
+ #
62
+ # @param updated_at [String] When the step last changed state, as an ISO 8601 timestamp.
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class JourneyRunStepsResponse < Courier::Internal::Type::BaseModel
6
+ # @!attribute steps
7
+ #
8
+ # @return [Array<Courier::Models::JourneyRunStep>]
9
+ required :steps, -> { Courier::Internal::Type::ArrayOf[Courier::JourneyRunStep] }
10
+
11
+ # @!method initialize(steps:)
12
+ # Every step of a Journey run. Not paginated.
13
+ #
14
+ # @param steps [Array<Courier::Models::JourneyRunStep>]
15
+ end
16
+ end
17
+ end
@@ -40,7 +40,10 @@ module Courier
40
40
  # Some parameter documentations has been truncated, see
41
41
  # {Courier::Models::JourneySegmentTriggerNode} for more details.
42
42
  #
43
- # Trigger fired by a segment event (`identify`, `group`, or `track`).
43
+ # Trigger fired by a segment event (`identify`, `group`, `track`, or `page`). A
44
+ # trigger with no `event_id` fires on any event of its type — the only shape
45
+ # `identify` and `group` can take, and the one that catches a stock
46
+ # `analytics.page()` call.
44
47
  #
45
48
  # @param request_type [Symbol, Courier::Models::JourneySegmentTriggerNode::RequestType]
46
49
  #
@@ -61,6 +64,7 @@ module Courier
61
64
  IDENTIFY = :identify
62
65
  GROUP = :group
63
66
  TRACK = :track
67
+ PAGE = :page
64
68
 
65
69
  # @!method self.values
66
70
  # @return [Array<Symbol>]
@@ -0,0 +1,85 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class JourneyWebhookTriggerNode < Courier::Internal::Type::BaseModel
6
+ # @!attribute event_source
7
+ # The provider key the webhook URL is minted for. Required, and must not contain a
8
+ # forward slash.
9
+ #
10
+ # @return [String]
11
+ required :event_source, String
12
+
13
+ # @!attribute trigger_type
14
+ #
15
+ # @return [Symbol, Courier::Models::JourneyWebhookTriggerNode::TriggerType]
16
+ required :trigger_type, enum: -> { Courier::JourneyWebhookTriggerNode::TriggerType }
17
+
18
+ # @!attribute type
19
+ #
20
+ # @return [Symbol, Courier::Models::JourneyWebhookTriggerNode::Type]
21
+ required :type, enum: -> { Courier::JourneyWebhookTriggerNode::Type }
22
+
23
+ # @!attribute id
24
+ #
25
+ # @return [String, nil]
26
+ optional :id, String
27
+
28
+ # @!attribute conditions
29
+ # Condition spec for a journey node. Accepts a single condition atom, an AND/OR
30
+ # group, or an AND/OR nested group. Omit the `conditions` property entirely to
31
+ # express "no conditions".
32
+ #
33
+ # @return [Array<String>, Courier::Models::JourneyConditionGroup, Courier::Models::JourneyConditionNestedGroup, nil]
34
+ optional :conditions, union: -> { Courier::JourneyConditionsField }
35
+
36
+ # @!attribute event_id
37
+ # An optional event filter, matched against the payload's `event` field. A sender
38
+ # that supplies no `event` matches the literal `custom`. Must not contain a
39
+ # forward slash. Omit to accept every event delivered to the URL.
40
+ #
41
+ # @return [String, nil]
42
+ optional :event_id, String
43
+
44
+ # @!method initialize(event_source:, trigger_type:, type:, id: nil, conditions: nil, event_id: nil)
45
+ # Some parameter documentations has been truncated, see
46
+ # {Courier::Models::JourneyWebhookTriggerNode} for more details.
47
+ #
48
+ # Trigger fired when an external system POSTs to the webhook URL minted for
49
+ # `event_source`. Narrow it to one event with `event_id`, or omit `event_id` to
50
+ # accept every event delivered to the URL.
51
+ #
52
+ # @param event_source [String] The provider key the webhook URL is minted for. Required, and must not contain a
53
+ #
54
+ # @param trigger_type [Symbol, Courier::Models::JourneyWebhookTriggerNode::TriggerType]
55
+ #
56
+ # @param type [Symbol, Courier::Models::JourneyWebhookTriggerNode::Type]
57
+ #
58
+ # @param id [String]
59
+ #
60
+ # @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
61
+ #
62
+ # @param event_id [String] An optional event filter, matched against the payload's `event` field. A sender
63
+
64
+ # @see Courier::Models::JourneyWebhookTriggerNode#trigger_type
65
+ module TriggerType
66
+ extend Courier::Internal::Type::Enum
67
+
68
+ WEBHOOK = :webhook
69
+
70
+ # @!method self.values
71
+ # @return [Array<Symbol>]
72
+ end
73
+
74
+ # @see Courier::Models::JourneyWebhookTriggerNode#type
75
+ module Type
76
+ extend Courier::Internal::Type::Enum
77
+
78
+ TRIGGER = :trigger
79
+
80
+ # @!method self.values
81
+ # @return [Array<Symbol>]
82
+ end
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ module Journeys
6
+ # @see Courier::Resources::Journeys::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 Journey 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::Journeys::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 Journey 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 Journeys
6
+ # @see Courier::Resources::Journeys::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 run_id
12
+ #
13
+ # @return [String]
14
+ required :run_id, String
15
+
16
+ # @!method initialize(run_id:, request_options: {})
17
+ # @param run_id [String]
18
+ # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ module Journeys
6
+ # @see Courier::Resources::Journeys::Runs#retrieve
7
+ class RunRetrieveParams < Courier::Internal::Type::BaseModel
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ # @!attribute run_id
12
+ #
13
+ # @return [String]
14
+ required :run_id, String
15
+
16
+ # @!method initialize(run_id:, request_options: {})
17
+ # @param run_id [String]
18
+ # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,83 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ # @see Courier::Resources::Notifications#get_metrics
6
+ class NotificationGetMetricsParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ # @!attribute id
11
+ #
12
+ # @return [String]
13
+ required :id, String
14
+
15
+ # @!attribute end_
16
+ # The end of the window, as an ISO 8601 timestamp with an offset. Must be supplied
17
+ # together with `start`. An `end` in the future is accepted and not clamped — the
18
+ # trailing buckets come back empty.
19
+ #
20
+ # @return [Time, nil]
21
+ optional :end_, Time
22
+
23
+ # @!attribute granularity
24
+ # The size of each bucket in the series. Defaults to `DAY`. `WEEK` buckets start
25
+ # on Sunday. A fine granularity caps the window it can cover: `HOUR` spans at most
26
+ # 7 days and `DAY` at most 90 days, and a wider window returns `400` — request a
27
+ # coarser granularity instead. `WEEK` and `MONTH` are uncapped, subject to the
28
+ # 1000-bucket limit on a single response.
29
+ #
30
+ # @return [Symbol, Courier::Models::NotificationGetMetricsParams::Granularity, nil]
31
+ optional :granularity, enum: -> { Courier::NotificationGetMetricsParams::Granularity }
32
+
33
+ # @!attribute lookback
34
+ # The length of the window, counted back from now, as an ISO 8601 duration
35
+ # (`P30D`, `P12W`, `PT12H`). Defaults to `P30D`, and is ignored when `start` and
36
+ # `end` are supplied. A malformed or non-positive duration returns `400`.
37
+ #
38
+ # @return [String, nil]
39
+ optional :lookback, String
40
+
41
+ # @!attribute start
42
+ # The inclusive start of the window, as an ISO 8601 timestamp with an offset
43
+ # (`2026-04-01T00:00:00Z`). Must be supplied together with `end` and be earlier
44
+ # than it; either one alone returns `400`.
45
+ #
46
+ # @return [Time, nil]
47
+ optional :start, Time
48
+
49
+ # @!method initialize(id:, end_: nil, granularity: nil, lookback: nil, start: nil, request_options: {})
50
+ # Some parameter documentations has been truncated, see
51
+ # {Courier::Models::NotificationGetMetricsParams} for more details.
52
+ #
53
+ # @param id [String]
54
+ #
55
+ # @param end_ [Time] The end of the window, as an ISO 8601 timestamp with an offset. Must be supplied
56
+ #
57
+ # @param granularity [Symbol, Courier::Models::NotificationGetMetricsParams::Granularity] The size of each bucket in the series. Defaults to `DAY`. `WEEK` buckets start o
58
+ #
59
+ # @param lookback [String] The length of the window, counted back from now, as an ISO 8601 duration (`P30D`
60
+ #
61
+ # @param start [Time] The inclusive start of the window, as an ISO 8601 timestamp with an offset (`202
62
+ #
63
+ # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
64
+
65
+ # The size of each bucket in the series. Defaults to `DAY`. `WEEK` buckets start
66
+ # on Sunday. A fine granularity caps the window it can cover: `HOUR` spans at most
67
+ # 7 days and `DAY` at most 90 days, and a wider window returns `400` — request a
68
+ # coarser granularity instead. `WEEK` and `MONTH` are uncapped, subject to the
69
+ # 1000-bucket limit on a single response.
70
+ module Granularity
71
+ extend Courier::Internal::Type::Enum
72
+
73
+ HOUR = :HOUR
74
+ DAY = :DAY
75
+ WEEK = :WEEK
76
+ MONTH = :MONTH
77
+
78
+ # @!method self.values
79
+ # @return [Array<Symbol>]
80
+ end
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,165 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ # @see Courier::Resources::Notifications#get_metrics
6
+ class NotificationMetricsResponse < Courier::Internal::Type::BaseModel
7
+ # @!attribute end_
8
+ # End of the window actually queried, ceiled onto the granularity grid.
9
+ # Second-precision UTC.
10
+ #
11
+ # @return [Time]
12
+ required :end_, Time, api_name: :end
13
+
14
+ # @!attribute granularity
15
+ # Bucket size the series was built at.
16
+ #
17
+ # @return [Symbol, Courier::Models::NotificationMetricsResponse::Granularity]
18
+ required :granularity, enum: -> { Courier::NotificationMetricsResponse::Granularity }
19
+
20
+ # @!attribute notification_id
21
+ # The template the series describes, echoed from the request.
22
+ #
23
+ # @return [String]
24
+ required :notification_id, String, api_name: :notificationId
25
+
26
+ # @!attribute series
27
+ # One entry per bucket between `start` and `end`, oldest first, including buckets
28
+ # with no activity.
29
+ #
30
+ # @return [Array<Courier::Models::NotificationMetricsResponse::Series>]
31
+ required :series, -> { Courier::Internal::Type::ArrayOf[Courier::NotificationMetricsResponse::Series] }
32
+
33
+ # @!attribute start
34
+ # Inclusive start of the window actually queried, floored onto the granularity
35
+ # grid. Second-precision UTC.
36
+ #
37
+ # @return [Time]
38
+ required :start, Time
39
+
40
+ # @!method initialize(end_:, granularity:, notification_id:, series:, start:)
41
+ # Some parameter documentations has been truncated, see
42
+ # {Courier::Models::NotificationMetricsResponse} for more details.
43
+ #
44
+ # @param end_ [Time] End of the window actually queried, ceiled onto the granularity grid. Second-pre
45
+ #
46
+ # @param granularity [Symbol, Courier::Models::NotificationMetricsResponse::Granularity] Bucket size the series was built at.
47
+ #
48
+ # @param notification_id [String] The template the series describes, echoed from the request.
49
+ #
50
+ # @param series [Array<Courier::Models::NotificationMetricsResponse::Series>] One entry per bucket between `start` and `end`, oldest first, including buckets
51
+ #
52
+ # @param start [Time] Inclusive start of the window actually queried, floored onto the granularity gri
53
+
54
+ # Bucket size the series was built at.
55
+ #
56
+ # @see Courier::Models::NotificationMetricsResponse#granularity
57
+ module Granularity
58
+ extend Courier::Internal::Type::Enum
59
+
60
+ HOUR = :HOUR
61
+ DAY = :DAY
62
+ WEEK = :WEEK
63
+ MONTH = :MONTH
64
+
65
+ # @!method self.values
66
+ # @return [Array<Symbol>]
67
+ end
68
+
69
+ class Series < Courier::Internal::Type::BaseModel
70
+ # @!attribute data
71
+ # One entry per provider and channel that handled a message in this bucket. Empty
72
+ # when nothing was sent.
73
+ #
74
+ # @return [Array<Courier::Models::NotificationMetricsResponse::Series::Data>]
75
+ required :data,
76
+ -> { Courier::Internal::Type::ArrayOf[Courier::NotificationMetricsResponse::Series::Data] }
77
+
78
+ # @!attribute period
79
+ # Start of the bucket, second-precision UTC.
80
+ #
81
+ # @return [Time]
82
+ required :period, Time
83
+
84
+ # @!method initialize(data:, period:)
85
+ # Some parameter documentations has been truncated, see
86
+ # {Courier::Models::NotificationMetricsResponse::Series} for more details.
87
+ #
88
+ # @param data [Array<Courier::Models::NotificationMetricsResponse::Series::Data>] One entry per provider and channel that handled a message in this bucket. Empty
89
+ #
90
+ # @param period [Time] Start of the bucket, second-precision UTC.
91
+
92
+ class Data < Courier::Internal::Type::BaseModel
93
+ # @!attribute channel
94
+ # Channel the provider delivered on, e.g. `email`.
95
+ #
96
+ # @return [String]
97
+ required :channel, String
98
+
99
+ # @!attribute clicked
100
+ # Messages with at least one tracked link click.
101
+ #
102
+ # @return [Integer]
103
+ required :clicked, Integer
104
+
105
+ # @!attribute delivered
106
+ # Messages the provider confirmed as delivered.
107
+ #
108
+ # @return [Integer]
109
+ required :delivered, Integer
110
+
111
+ # @!attribute errors
112
+ # Messages the provider rejected or failed on, including ones a later provider
113
+ # then delivered.
114
+ #
115
+ # @return [Integer]
116
+ required :errors, Integer
117
+
118
+ # @!attribute opened
119
+ # Messages opened at least once. Always `0` on channels with no open tracking.
120
+ #
121
+ # @return [Integer]
122
+ required :opened, Integer
123
+
124
+ # @!attribute provider
125
+ # Provider that handled the messages, e.g. `sendgrid`.
126
+ #
127
+ # @return [String]
128
+ required :provider, String
129
+
130
+ # @!attribute sent
131
+ # Messages handed to the provider.
132
+ #
133
+ # @return [Integer]
134
+ required :sent, Integer
135
+
136
+ # @!attribute undeliverable
137
+ # Messages Courier could not deliver on any provider for the channel.
138
+ #
139
+ # @return [Integer]
140
+ required :undeliverable, Integer
141
+
142
+ # @!method initialize(channel:, clicked:, delivered:, errors:, opened:, provider:, sent:, undeliverable:)
143
+ # Some parameter documentations has been truncated, see
144
+ # {Courier::Models::NotificationMetricsResponse::Series::Data} for more details.
145
+ #
146
+ # @param channel [String] Channel the provider delivered on, e.g. `email`.
147
+ #
148
+ # @param clicked [Integer] Messages with at least one tracked link click.
149
+ #
150
+ # @param delivered [Integer] Messages the provider confirmed as delivered.
151
+ #
152
+ # @param errors [Integer] Messages the provider rejected or failed on, including ones a later provider the
153
+ #
154
+ # @param opened [Integer] Messages opened at least once. Always `0` on channels with no open tracking.
155
+ #
156
+ # @param provider [String] Provider that handled the messages, e.g. `sendgrid`.
157
+ #
158
+ # @param sent [Integer] Messages handed to the provider.
159
+ #
160
+ # @param undeliverable [Integer] Messages Courier could not deliver on any provider for the channel.
161
+ end
162
+ end
163
+ end
164
+ end
165
+ end
@@ -48,7 +48,23 @@ module Courier
48
48
  # @return [Boolean, nil]
49
49
  optional :has_custom_routing, Courier::Internal::Type::Boolean, nil?: true
50
50
 
51
- # @!method initialize(default_status:, status:, topic_id:, topic_name:, custom_routing: nil, has_custom_routing: nil)
51
+ # @!attribute section_id
52
+ # The unique identifier of the section this topic belongs to. Always present when
53
+ # listing a user's preferences; omitted by the single-topic read when the topic
54
+ # has no resolvable section.
55
+ #
56
+ # @return [String, nil]
57
+ optional :section_id, String
58
+
59
+ # @!attribute section_name
60
+ # The display name of the section this topic belongs to. Always present when
61
+ # listing a user's preferences; omitted by the single-topic read when the topic
62
+ # has no resolvable section.
63
+ #
64
+ # @return [String, nil]
65
+ optional :section_name, String
66
+
67
+ # @!method initialize(default_status:, status:, topic_id:, topic_name:, custom_routing: nil, has_custom_routing: nil, section_id: nil, section_name: nil)
52
68
  # Some parameter documentations has been truncated, see
53
69
  # {Courier::Models::Users::TopicPreference} for more details.
54
70
  #
@@ -63,6 +79,10 @@ module Courier
63
79
  # @param custom_routing [Array<Symbol, Courier::Models::ChannelClassification>, nil] The channels the user has chosen to receive this topic on, present only when has
64
80
  #
65
81
  # @param has_custom_routing [Boolean, nil] Whether the user has chosen specific delivery channels for this topic (listed in
82
+ #
83
+ # @param section_id [String] The unique identifier of the section this topic belongs to. Always present when
84
+ #
85
+ # @param section_name [String] The display name of the section this topic belongs to. Always present when listi
66
86
  end
67
87
  end
68
88
  end
@@ -79,6 +79,14 @@ module Courier
79
79
 
80
80
  AutomationListParams = Courier::Models::AutomationListParams
81
81
 
82
+ AutomationRunListItem = Courier::Models::AutomationRunListItem
83
+
84
+ AutomationRunListResponse = Courier::Models::AutomationRunListResponse
85
+
86
+ AutomationRunStep = Courier::Models::AutomationRunStep
87
+
88
+ AutomationRunStepsResponse = Courier::Models::AutomationRunStepsResponse
89
+
82
90
  Automations = Courier::Models::Automations
83
91
 
84
92
  AutomationTemplate = Courier::Models::AutomationTemplate
@@ -245,6 +253,8 @@ module Courier
245
253
 
246
254
  JourneyArchiveParams = Courier::Models::JourneyArchiveParams
247
255
 
256
+ JourneyAudienceTriggerNode = Courier::Models::JourneyAudienceTriggerNode
257
+
248
258
  JourneyCancelParams = Courier::Models::JourneyCancelParams
249
259
 
250
260
  # @type [Courier::Internal::Type::Converter]
@@ -292,6 +302,18 @@ module Courier
292
302
 
293
303
  JourneyRetrieveParams = Courier::Models::JourneyRetrieveParams
294
304
 
305
+ JourneyRun = Courier::Models::JourneyRun
306
+
307
+ JourneyRunListItem = Courier::Models::JourneyRunListItem
308
+
309
+ JourneyRunListResponse = Courier::Models::JourneyRunListResponse
310
+
311
+ JourneyRunResponse = Courier::Models::JourneyRunResponse
312
+
313
+ JourneyRunStep = Courier::Models::JourneyRunStep
314
+
315
+ JourneyRunStepsResponse = Courier::Models::JourneyRunStepsResponse
316
+
295
317
  Journeys = Courier::Models::Journeys
296
318
 
297
319
  JourneySegmentTriggerNode = Courier::Models::JourneySegmentTriggerNode
@@ -326,6 +348,8 @@ module Courier
326
348
 
327
349
  JourneyVersionsListResponse = Courier::Models::JourneyVersionsListResponse
328
350
 
351
+ JourneyWebhookTriggerNode = Courier::Models::JourneyWebhookTriggerNode
352
+
329
353
  ListDeleteParams = Courier::Models::ListDeleteParams
330
354
 
331
355
  ListFilter = Courier::Models::ListFilter
@@ -398,12 +422,16 @@ module Courier
398
422
 
399
423
  NotificationGetContent = Courier::Models::NotificationGetContent
400
424
 
425
+ NotificationGetMetricsParams = Courier::Models::NotificationGetMetricsParams
426
+
401
427
  NotificationListParams = Courier::Models::NotificationListParams
402
428
 
403
429
  NotificationListVersionsParams = Courier::Models::NotificationListVersionsParams
404
430
 
405
431
  NotificationLocalePutRequest = Courier::Models::NotificationLocalePutRequest
406
432
 
433
+ NotificationMetricsResponse = Courier::Models::NotificationMetricsResponse
434
+
407
435
  NotificationPreferenceDetails = Courier::Models::NotificationPreferenceDetails
408
436
 
409
437
  NotificationPublishParams = Courier::Models::NotificationPublishParams