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
@@ -0,0 +1,40 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ module Journeys
6
+ class RunListStepsParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Courier::Journeys::RunListStepsParams,
14
+ Courier::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :run_id
20
+
21
+ sig do
22
+ params(
23
+ run_id: String,
24
+ request_options: Courier::RequestOptions::OrHash
25
+ ).returns(T.attached_class)
26
+ end
27
+ def self.new(run_id:, request_options: {})
28
+ end
29
+
30
+ sig do
31
+ override.returns(
32
+ { run_id: String, request_options: Courier::RequestOptions }
33
+ )
34
+ end
35
+ def to_hash
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,40 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ module Journeys
6
+ class RunRetrieveParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Courier::Journeys::RunRetrieveParams,
14
+ Courier::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :run_id
20
+
21
+ sig do
22
+ params(
23
+ run_id: String,
24
+ request_options: Courier::RequestOptions::OrHash
25
+ ).returns(T.attached_class)
26
+ end
27
+ def self.new(run_id:, request_options: {})
28
+ end
29
+
30
+ sig do
31
+ override.returns(
32
+ { run_id: String, request_options: Courier::RequestOptions }
33
+ )
34
+ end
35
+ def to_hash
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -43,6 +43,24 @@ module Courier
43
43
  sig { returns(T.nilable(T::Boolean)) }
44
44
  attr_accessor :has_custom_routing
45
45
 
46
+ # The unique identifier of the section this topic belongs to. Always present when
47
+ # listing a user's preferences; omitted by the single-topic read when the topic
48
+ # has no resolvable section.
49
+ sig { returns(T.nilable(String)) }
50
+ attr_reader :section_id
51
+
52
+ sig { params(section_id: String).void }
53
+ attr_writer :section_id
54
+
55
+ # The display name of the section this topic belongs to. Always present when
56
+ # listing a user's preferences; omitted by the single-topic read when the topic
57
+ # has no resolvable section.
58
+ sig { returns(T.nilable(String)) }
59
+ attr_reader :section_name
60
+
61
+ sig { params(section_name: String).void }
62
+ attr_writer :section_name
63
+
46
64
  sig do
47
65
  params(
48
66
  default_status: Courier::PreferenceStatus::OrSymbol,
@@ -51,7 +69,9 @@ module Courier
51
69
  topic_name: String,
52
70
  custom_routing:
53
71
  T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
54
- has_custom_routing: T.nilable(T::Boolean)
72
+ has_custom_routing: T.nilable(T::Boolean),
73
+ section_id: String,
74
+ section_name: String
55
75
  ).returns(T.attached_class)
56
76
  end
57
77
  def self.new(
@@ -72,7 +92,15 @@ module Courier
72
92
  custom_routing: nil,
73
93
  # Whether the user has chosen specific delivery channels for this topic (listed in
74
94
  # custom_routing) rather than the topic's default routing.
75
- has_custom_routing: nil
95
+ has_custom_routing: nil,
96
+ # The unique identifier of the section this topic belongs to. Always present when
97
+ # listing a user's preferences; omitted by the single-topic read when the topic
98
+ # has no resolvable section.
99
+ section_id: nil,
100
+ # The display name of the section this topic belongs to. Always present when
101
+ # listing a user's preferences; omitted by the single-topic read when the topic
102
+ # has no resolvable section.
103
+ section_name: nil
76
104
  )
77
105
  end
78
106
 
@@ -87,7 +115,9 @@ module Courier
87
115
  T.nilable(
88
116
  T::Array[Courier::ChannelClassification::TaggedSymbol]
89
117
  ),
90
- has_custom_routing: T.nilable(T::Boolean)
118
+ has_custom_routing: T.nilable(T::Boolean),
119
+ section_id: String,
120
+ section_name: String
91
121
  }
92
122
  )
93
123
  end
@@ -42,6 +42,14 @@ module Courier
42
42
 
43
43
  AutomationListParams = Courier::Models::AutomationListParams
44
44
 
45
+ AutomationRunListItem = Courier::Models::AutomationRunListItem
46
+
47
+ AutomationRunListResponse = Courier::Models::AutomationRunListResponse
48
+
49
+ AutomationRunStep = Courier::Models::AutomationRunStep
50
+
51
+ AutomationRunStepsResponse = Courier::Models::AutomationRunStepsResponse
52
+
45
53
  Automations = Courier::Models::Automations
46
54
 
47
55
  AutomationTemplate = Courier::Models::AutomationTemplate
@@ -210,6 +218,8 @@ module Courier
210
218
 
211
219
  JourneyArchiveParams = Courier::Models::JourneyArchiveParams
212
220
 
221
+ JourneyAudienceTriggerNode = Courier::Models::JourneyAudienceTriggerNode
222
+
213
223
  JourneyCancelParams = Courier::Models::JourneyCancelParams
214
224
 
215
225
  JourneyConditionAtom =
@@ -260,6 +270,18 @@ module Courier
260
270
 
261
271
  JourneyRetrieveParams = Courier::Models::JourneyRetrieveParams
262
272
 
273
+ JourneyRun = Courier::Models::JourneyRun
274
+
275
+ JourneyRunListItem = Courier::Models::JourneyRunListItem
276
+
277
+ JourneyRunListResponse = Courier::Models::JourneyRunListResponse
278
+
279
+ JourneyRunResponse = Courier::Models::JourneyRunResponse
280
+
281
+ JourneyRunStep = Courier::Models::JourneyRunStep
282
+
283
+ JourneyRunStepsResponse = Courier::Models::JourneyRunStepsResponse
284
+
263
285
  Journeys = Courier::Models::Journeys
264
286
 
265
287
  JourneySegmentTriggerNode = Courier::Models::JourneySegmentTriggerNode
@@ -294,6 +316,8 @@ module Courier
294
316
 
295
317
  JourneyVersionsListResponse = Courier::Models::JourneyVersionsListResponse
296
318
 
319
+ JourneyWebhookTriggerNode = Courier::Models::JourneyWebhookTriggerNode
320
+
297
321
  ListDeleteParams = Courier::Models::ListDeleteParams
298
322
 
299
323
  ListFilter = Courier::Models::ListFilter
@@ -0,0 +1,69 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Resources
5
+ class Automations
6
+ # Invoke a stored automation template or an ad hoc automation defined in the
7
+ # request.
8
+ class Runs
9
+ # List runs of the workspace's v2 Automations, newest first, filtered by status,
10
+ # Template, or date range and paged by cursor. Journey (v3) runs are listed by
11
+ # `GET /journeys/runs` instead — the two surfaces never return each other's runs.
12
+ # Runs are retained for 95 days.
13
+ sig do
14
+ params(
15
+ cursor: String,
16
+ end_date: String,
17
+ limit: String,
18
+ start_date: String,
19
+ status: String,
20
+ template_id: String,
21
+ request_options: Courier::RequestOptions::OrHash
22
+ ).returns(Courier::AutomationRunListResponse)
23
+ end
24
+ def list(
25
+ # A cursor token for pagination. Use the `next_cursor` from the previous response
26
+ # to fetch the next page of results. Treat it as opaque.
27
+ cursor: nil,
28
+ # An inclusive upper bound on `created_at`, in the same format as `start_date`.
29
+ end_date: nil,
30
+ # The number of runs to return per page, between `1` and `50`. Defaults to `20`.
31
+ # Values outside the range are clamped, and a non-numeric value falls back to
32
+ # `20`.
33
+ limit: nil,
34
+ # An inclusive lower bound on `created_at`, as an ISO 8601 date or timestamp (e.g.
35
+ # `2026-08-18` or `2026-08-18T20:06:36.259Z`). Any other format returns `400`.
36
+ start_date: nil,
37
+ # A comma-separated list of run statuses to filter on, e.g. `PROCESSED,ERROR`.
38
+ status: nil,
39
+ # A comma-separated list of Automation Template ids to filter on.
40
+ template_id: nil,
41
+ request_options: {}
42
+ )
43
+ end
44
+
45
+ # List the per-step state of one Automation run, in full — this endpoint is not
46
+ # paginated. `message_id` is present on send steps that produced a message; follow
47
+ # it to `GET /messages/{message_id}` for delivery status. A send to a List or an
48
+ # Audience yields one `message_id` for the request, not one per recipient.
49
+ sig do
50
+ params(
51
+ id: String,
52
+ request_options: Courier::RequestOptions::OrHash
53
+ ).returns(Courier::AutomationRunStepsResponse)
54
+ end
55
+ def list_steps(
56
+ # A unique identifier representing the Automation run.
57
+ id,
58
+ request_options: {}
59
+ )
60
+ end
61
+
62
+ # @api private
63
+ sig { params(client: Courier::Client).returns(T.attached_class) }
64
+ def self.new(client:)
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
@@ -10,6 +10,11 @@ module Courier
10
10
  sig { returns(Courier::Resources::Automations::Invoke) }
11
11
  attr_reader :invoke
12
12
 
13
+ # Invoke a stored automation template or an ad hoc automation defined in the
14
+ # request.
15
+ sig { returns(Courier::Resources::Automations::Runs) }
16
+ attr_reader :runs
17
+
13
18
  # Lists the workspace's saved automation templates, each with its id and a cursor
14
19
  # for paging to the next page of results.
15
20
  sig do
@@ -0,0 +1,87 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Resources
5
+ class Journeys
6
+ # Build, version, publish, invoke, and cancel multi-step notification workflows,
7
+ # along with the templates scoped to them.
8
+ class Runs
9
+ # Fetch one Journey run by id. Returns `404` for an unknown run, a run belonging
10
+ # to another workspace, a run past the 95-day retention window, or an Automation
11
+ # run id — the same body in every case, so the response never reveals whether a
12
+ # run exists elsewhere.
13
+ sig do
14
+ params(
15
+ run_id: String,
16
+ request_options: Courier::RequestOptions::OrHash
17
+ ).returns(Courier::JourneyRunResponse)
18
+ end
19
+ def retrieve(
20
+ # A unique identifier representing the Journey run.
21
+ run_id,
22
+ request_options: {}
23
+ )
24
+ end
25
+
26
+ # List runs of the workspace's Journeys, newest first, filtered by status,
27
+ # Journey, or date range and paged by cursor. Runs of v2 Automations are listed by
28
+ # `GET /automations/runs` instead — the two surfaces never return each other's
29
+ # runs. Runs are retained for 95 days.
30
+ sig do
31
+ params(
32
+ cursor: String,
33
+ end_date: String,
34
+ limit: String,
35
+ start_date: String,
36
+ status: String,
37
+ template_id: String,
38
+ request_options: Courier::RequestOptions::OrHash
39
+ ).returns(Courier::JourneyRunListResponse)
40
+ end
41
+ def list(
42
+ # A cursor token for pagination. Use the `next_cursor` from the previous response
43
+ # to fetch the next page of results. Treat it as opaque.
44
+ cursor: nil,
45
+ # An inclusive upper bound on `created_at`, in the same format as `start_date`.
46
+ end_date: nil,
47
+ # The number of runs to return per page, between `1` and `50`. Defaults to `20`.
48
+ # Values outside the range are clamped, and a non-numeric value falls back to
49
+ # `20`.
50
+ limit: nil,
51
+ # An inclusive lower bound on `created_at`, as an ISO 8601 date or timestamp (e.g.
52
+ # `2026-08-18` or `2026-08-18T20:06:36.259Z`). Any other format returns `400`.
53
+ start_date: nil,
54
+ # A comma-separated list of run statuses to filter on, e.g. `PROCESSED,ERROR`.
55
+ status: nil,
56
+ # A comma-separated list of Journey ids to filter on.
57
+ template_id: nil,
58
+ request_options: {}
59
+ )
60
+ end
61
+
62
+ # List the per-node state of one Journey run, in full — this endpoint is not
63
+ # paginated. Each step's `node_id` is the id of the node in the published Journey,
64
+ # so a step maps directly onto the Journey graph. `message_id` is present on send
65
+ # steps that produced a message; follow it to `GET /messages/{message_id}` for
66
+ # delivery status.
67
+ sig do
68
+ params(
69
+ run_id: String,
70
+ request_options: Courier::RequestOptions::OrHash
71
+ ).returns(Courier::JourneyRunStepsResponse)
72
+ end
73
+ def list_steps(
74
+ # A unique identifier representing the Journey run.
75
+ run_id,
76
+ request_options: {}
77
+ )
78
+ end
79
+
80
+ # @api private
81
+ sig { params(client: Courier::Client).returns(T.attached_class) }
82
+ def self.new(client:)
83
+ end
84
+ end
85
+ end
86
+ end
87
+ end
@@ -10,6 +10,11 @@ module Courier
10
10
  sig { returns(Courier::Resources::Journeys::Templates) }
11
11
  attr_reader :templates
12
12
 
13
+ # Build, version, publish, invoke, and cancel multi-step notification workflows,
14
+ # along with the templates scoped to them.
15
+ sig { returns(Courier::Resources::Journeys::Runs) }
16
+ attr_reader :runs
17
+
13
18
  # Creates a journey from a set of nodes, in draft state unless you pass a
14
19
  # published state. Send nodes cannot be included until their templates exist.
15
20
  sig do
@@ -20,6 +25,8 @@ module Courier
20
25
  T.any(
21
26
  Courier::JourneyAPIInvokeTriggerNode::OrHash,
22
27
  Courier::JourneySegmentTriggerNode::OrHash,
28
+ Courier::JourneyAudienceTriggerNode::OrHash,
29
+ Courier::JourneyWebhookTriggerNode::OrHash,
23
30
  Courier::JourneySendNode::OrHash,
24
31
  Courier::JourneyDelayDurationNode::OrHash,
25
32
  Courier::JourneyDelayUntilNode::OrHash,
@@ -260,6 +267,8 @@ module Courier
260
267
  T.any(
261
268
  Courier::JourneyAPIInvokeTriggerNode::OrHash,
262
269
  Courier::JourneySegmentTriggerNode::OrHash,
270
+ Courier::JourneyAudienceTriggerNode::OrHash,
271
+ Courier::JourneyWebhookTriggerNode::OrHash,
263
272
  Courier::JourneySendNode::OrHash,
264
273
  Courier::JourneyDelayDurationNode::OrHash,
265
274
  Courier::JourneyDelayUntilNode::OrHash,
@@ -0,0 +1,46 @@
1
+ module Courier
2
+ module Models
3
+ type automation_run_list_item =
4
+ {
5
+ run_id: String,
6
+ source: ::Array[String],
7
+ created_at: String,
8
+ status: String,
9
+ template_id: String
10
+ }
11
+
12
+ class AutomationRunListItem < Courier::Internal::Type::BaseModel
13
+ attr_accessor run_id: String
14
+
15
+ attr_accessor source: ::Array[String]
16
+
17
+ attr_reader created_at: String?
18
+
19
+ def created_at=: (String) -> String
20
+
21
+ attr_reader status: String?
22
+
23
+ def status=: (String) -> String
24
+
25
+ attr_reader template_id: String?
26
+
27
+ def template_id=: (String) -> String
28
+
29
+ def initialize: (
30
+ run_id: String,
31
+ source: ::Array[String],
32
+ ?created_at: String,
33
+ ?status: String,
34
+ ?template_id: String
35
+ ) -> void
36
+
37
+ def to_hash: -> {
38
+ run_id: String,
39
+ source: ::Array[String],
40
+ created_at: String,
41
+ status: String,
42
+ template_id: String
43
+ }
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,24 @@
1
+ module Courier
2
+ module Models
3
+ type automation_run_list_response =
4
+ { runs: ::Array[Courier::AutomationRunListItem], next_cursor: String }
5
+
6
+ class AutomationRunListResponse < Courier::Internal::Type::BaseModel
7
+ attr_accessor runs: ::Array[Courier::AutomationRunListItem]
8
+
9
+ attr_reader next_cursor: String?
10
+
11
+ def next_cursor=: (String) -> String
12
+
13
+ def initialize: (
14
+ runs: ::Array[Courier::AutomationRunListItem],
15
+ ?next_cursor: String
16
+ ) -> void
17
+
18
+ def to_hash: -> {
19
+ runs: ::Array[Courier::AutomationRunListItem],
20
+ next_cursor: String
21
+ }
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,53 @@
1
+ module Courier
2
+ module Models
3
+ type automation_run_step =
4
+ {
5
+ action: String,
6
+ status: String,
7
+ created_at: String,
8
+ message_id: String,
9
+ step_id: String,
10
+ updated_at: String
11
+ }
12
+
13
+ class AutomationRunStep < Courier::Internal::Type::BaseModel
14
+ attr_accessor action: String
15
+
16
+ attr_accessor status: String
17
+
18
+ attr_reader created_at: String?
19
+
20
+ def created_at=: (String) -> String
21
+
22
+ attr_reader message_id: String?
23
+
24
+ def message_id=: (String) -> String
25
+
26
+ attr_reader step_id: String?
27
+
28
+ def step_id=: (String) -> String
29
+
30
+ attr_reader updated_at: String?
31
+
32
+ def updated_at=: (String) -> String
33
+
34
+ def initialize: (
35
+ action: String,
36
+ status: String,
37
+ ?created_at: String,
38
+ ?message_id: String,
39
+ ?step_id: String,
40
+ ?updated_at: String
41
+ ) -> void
42
+
43
+ def to_hash: -> {
44
+ action: String,
45
+ status: String,
46
+ created_at: String,
47
+ message_id: String,
48
+ step_id: String,
49
+ updated_at: String
50
+ }
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,14 @@
1
+ module Courier
2
+ module Models
3
+ type automation_run_steps_response =
4
+ { steps: ::Array[Courier::AutomationRunStep] }
5
+
6
+ class AutomationRunStepsResponse < Courier::Internal::Type::BaseModel
7
+ attr_accessor steps: ::Array[Courier::AutomationRunStep]
8
+
9
+ def initialize: (steps: ::Array[Courier::AutomationRunStep]) -> void
10
+
11
+ def to_hash: -> { steps: ::Array[Courier::AutomationRunStep] }
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,65 @@
1
+ module Courier
2
+ module Models
3
+ module Automations
4
+ type run_list_params =
5
+ {
6
+ cursor: String,
7
+ end_date: String,
8
+ limit: String,
9
+ start_date: String,
10
+ status: String,
11
+ template_id: String
12
+ }
13
+ & Courier::Internal::Type::request_parameters
14
+
15
+ class RunListParams < Courier::Internal::Type::BaseModel
16
+ extend Courier::Internal::Type::RequestParameters::Converter
17
+ include Courier::Internal::Type::RequestParameters
18
+
19
+ attr_reader cursor: String?
20
+
21
+ def cursor=: (String) -> String
22
+
23
+ attr_reader end_date: String?
24
+
25
+ def end_date=: (String) -> String
26
+
27
+ attr_reader limit: String?
28
+
29
+ def limit=: (String) -> String
30
+
31
+ attr_reader start_date: String?
32
+
33
+ def start_date=: (String) -> String
34
+
35
+ attr_reader status: String?
36
+
37
+ def status=: (String) -> String
38
+
39
+ attr_reader template_id: String?
40
+
41
+ def template_id=: (String) -> String
42
+
43
+ def initialize: (
44
+ ?cursor: String,
45
+ ?end_date: String,
46
+ ?limit: String,
47
+ ?start_date: String,
48
+ ?status: String,
49
+ ?template_id: String,
50
+ ?request_options: Courier::request_opts
51
+ ) -> void
52
+
53
+ def to_hash: -> {
54
+ cursor: String,
55
+ end_date: String,
56
+ limit: String,
57
+ start_date: String,
58
+ status: String,
59
+ template_id: String,
60
+ request_options: Courier::RequestOptions
61
+ }
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,22 @@
1
+ module Courier
2
+ module Models
3
+ module Automations
4
+ type run_list_steps_params =
5
+ { id: String } & Courier::Internal::Type::request_parameters
6
+
7
+ class RunListStepsParams < Courier::Internal::Type::BaseModel
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ attr_accessor id: String
12
+
13
+ def initialize: (
14
+ id: String,
15
+ ?request_options: Courier::request_opts
16
+ ) -> void
17
+
18
+ def to_hash: -> { id: String, request_options: Courier::RequestOptions }
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,66 @@
1
+ module Courier
2
+ module Models
3
+ type journey_audience_trigger_node =
4
+ {
5
+ audience_id: String,
6
+ trigger_type: Courier::Models::JourneyAudienceTriggerNode::trigger_type,
7
+ type: Courier::Models::JourneyAudienceTriggerNode::type_,
8
+ id: String,
9
+ conditions: Courier::Models::journey_conditions_field
10
+ }
11
+
12
+ class JourneyAudienceTriggerNode < Courier::Internal::Type::BaseModel
13
+ attr_accessor audience_id: String
14
+
15
+ attr_accessor trigger_type: Courier::Models::JourneyAudienceTriggerNode::trigger_type
16
+
17
+ attr_accessor type: Courier::Models::JourneyAudienceTriggerNode::type_
18
+
19
+ attr_reader id: String?
20
+
21
+ def id=: (String) -> String
22
+
23
+ attr_reader conditions: Courier::Models::journey_conditions_field?
24
+
25
+ def conditions=: (
26
+ Courier::Models::journey_conditions_field
27
+ ) -> Courier::Models::journey_conditions_field
28
+
29
+ def initialize: (
30
+ audience_id: String,
31
+ trigger_type: Courier::Models::JourneyAudienceTriggerNode::trigger_type,
32
+ type: Courier::Models::JourneyAudienceTriggerNode::type_,
33
+ ?id: String,
34
+ ?conditions: Courier::Models::journey_conditions_field
35
+ ) -> void
36
+
37
+ def to_hash: -> {
38
+ audience_id: String,
39
+ trigger_type: Courier::Models::JourneyAudienceTriggerNode::trigger_type,
40
+ type: Courier::Models::JourneyAudienceTriggerNode::type_,
41
+ id: String,
42
+ conditions: Courier::Models::journey_conditions_field
43
+ }
44
+
45
+ type trigger_type = :audience
46
+
47
+ module TriggerType
48
+ extend Courier::Internal::Type::Enum
49
+
50
+ AUDIENCE: :audience
51
+
52
+ def self?.values: -> ::Array[Courier::Models::JourneyAudienceTriggerNode::trigger_type]
53
+ end
54
+
55
+ type type_ = :trigger
56
+
57
+ module Type
58
+ extend Courier::Internal::Type::Enum
59
+
60
+ TRIGGER: :trigger
61
+
62
+ def self?.values: -> ::Array[Courier::Models::JourneyAudienceTriggerNode::type_]
63
+ end
64
+ end
65
+ end
66
+ end