trycourier 4.22.0 → 4.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/lib/courier/client.rb +6 -4
- data/lib/courier/models/broadcast.rb +132 -0
- data/lib/courier/models/broadcast_archive_params.rb +20 -0
- data/lib/courier/models/broadcast_cancel_params.rb +20 -0
- data/lib/courier/models/broadcast_create_params.rb +14 -0
- data/lib/courier/models/broadcast_duplicate_params.rb +20 -0
- data/lib/courier/models/broadcast_list_params.rb +30 -0
- data/lib/courier/models/broadcast_list_response.rb +24 -0
- data/lib/courier/models/broadcast_put_content_params.rb +20 -0
- data/lib/courier/models/broadcast_retrieve_content_params.rb +33 -0
- data/lib/courier/models/broadcast_retrieve_params.rb +20 -0
- data/lib/courier/models/broadcast_schedule.rb +59 -0
- data/lib/courier/models/broadcast_schedule_params.rb +20 -0
- data/lib/courier/models/broadcast_send_params.rb +20 -0
- data/lib/courier/models/broadcast_update_params.rb +20 -0
- data/lib/courier/models/create_broadcast_request.rb +43 -0
- data/lib/courier/models/journey_node.rb +1 -1
- data/lib/courier/models/journey_send_node.rb +46 -3
- data/lib/courier/models/schedule_broadcast_request.rb +59 -0
- data/lib/courier/models/send_broadcast_request.rb +39 -0
- data/lib/courier/models/update_broadcast_request.rb +18 -0
- data/lib/courier/models.rb +36 -2
- data/lib/courier/resources/broadcasts.rb +292 -0
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +20 -5
- data/rbi/courier/client.rbi +5 -3
- data/rbi/courier/models/broadcast.rbi +164 -0
- data/rbi/courier/models/broadcast_archive_params.rbi +35 -0
- data/rbi/courier/models/broadcast_cancel_params.rbi +35 -0
- data/rbi/courier/models/broadcast_create_params.rbi +27 -0
- data/rbi/courier/models/broadcast_duplicate_params.rbi +35 -0
- data/rbi/courier/models/broadcast_list_params.rbi +54 -0
- data/rbi/courier/models/broadcast_list_response.rbi +39 -0
- data/rbi/courier/models/broadcast_put_content_params.rbi +35 -0
- data/rbi/courier/models/broadcast_retrieve_content_params.rbi +57 -0
- data/rbi/courier/models/broadcast_retrieve_params.rbi +35 -0
- data/rbi/courier/models/broadcast_schedule.rbi +92 -0
- data/rbi/courier/models/broadcast_schedule_params.rbi +35 -0
- data/rbi/courier/models/broadcast_send_params.rbi +35 -0
- data/rbi/courier/models/broadcast_update_params.rbi +35 -0
- data/rbi/courier/models/create_broadcast_request.rbi +81 -0
- data/rbi/courier/models/journey_send_node.rbi +72 -3
- data/rbi/courier/models/schedule_broadcast_request.rbi +103 -0
- data/rbi/courier/models/send_broadcast_request.rbi +77 -0
- data/rbi/courier/models/update_broadcast_request.rbi +28 -0
- data/rbi/courier/models.rbi +37 -2
- data/rbi/courier/resources/broadcasts.rbi +201 -0
- data/sig/courier/client.rbs +2 -2
- data/sig/courier/models/broadcast.rbs +98 -0
- data/sig/courier/models/broadcast_archive_params.rbs +23 -0
- data/sig/courier/models/broadcast_cancel_params.rbs +23 -0
- data/sig/courier/models/broadcast_create_params.rbs +15 -0
- data/sig/courier/models/broadcast_duplicate_params.rbs +23 -0
- data/sig/courier/models/broadcast_list_params.rbs +30 -0
- data/sig/courier/models/broadcast_list_response.rbs +22 -0
- data/sig/courier/models/broadcast_put_content_params.rbs +25 -0
- data/sig/courier/models/broadcast_retrieve_content_params.rbs +30 -0
- data/sig/courier/models/broadcast_retrieve_params.rbs +23 -0
- data/sig/courier/models/broadcast_schedule.rbs +46 -0
- data/sig/courier/models/broadcast_schedule_params.rbs +25 -0
- data/sig/courier/models/broadcast_send_params.rbs +25 -0
- data/sig/courier/models/broadcast_update_params.rbs +25 -0
- data/sig/courier/models/create_broadcast_request.rbs +40 -0
- data/sig/courier/models/journey_send_node.rbs +19 -0
- data/sig/courier/models/schedule_broadcast_request.rbs +48 -0
- data/sig/courier/models/send_broadcast_request.rbs +36 -0
- data/sig/courier/models/update_broadcast_request.rbs +13 -0
- data/sig/courier/models.rbs +36 -2
- data/sig/courier/resources/broadcasts.rbs +74 -0
- metadata +59 -14
- data/lib/courier/models/inbox/message_delete_params.rb +0 -22
- data/lib/courier/models/inbox/message_restore_params.rb +0 -22
- data/lib/courier/resources/inbox/messages.rb +0 -58
- data/lib/courier/resources/inbox.rb +0 -19
- data/rbi/courier/models/inbox/message_delete_params.rbi +0 -40
- data/rbi/courier/models/inbox/message_restore_params.rbi +0 -40
- data/rbi/courier/resources/inbox/messages.rbi +0 -44
- data/rbi/courier/resources/inbox.rbi +0 -16
- data/sig/courier/models/inbox/message_delete_params.rbs +0 -25
- data/sig/courier/models/inbox/message_restore_params.rbs +0 -25
- data/sig/courier/resources/inbox/messages.rbs +0 -19
- data/sig/courier/resources/inbox.rbs +0 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 92699878aa77a9b29adce8e814e87b0c2369708e4eaff80d4cb39281d2a2fac3
|
|
4
|
+
data.tar.gz: 47907b5604d18e1f827398c5a24c21b80ed4b1fb4660d7c45c0cf3b15d5f3099
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 42442c5a895cc9f1403944cef33abf7cb6673ba331d177291b3355239489c5f0fd991bd1201d3867a48e5b28fac32a43dc4de819157ad59639bc69c9a6ddc355
|
|
7
|
+
data.tar.gz: 3d90bfd02cfa4270aff7e8af390d966137481c6849be7c3062b171675311aa462f3a56272e879b79be6755e1989171ab3bd8e277650b028e5d5cc5a3036216e9
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.24.0 (2026-08-03)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v4.23.0...v4.24.0](https://github.com/trycourier/courier-ruby/compare/v4.23.0...v4.24.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* Merge pull request [#183](https://github.com/trycourier/courier-ruby/issues/183) from trycourier/dantran/c-19684-api-spec-document-messagecontexttenant_id-on-journey-send ([aedb9a8](https://github.com/trycourier/courier-ruby/commit/aedb9a8a3a7bc1ed7a5a63cf1c4330bc119a6155))
|
|
10
|
+
* spec: remove inbox message delete/restore endpoints for now (C-19268) ([#182](https://github.com/trycourier/courier-ruby/issues/182)) ([d98f978](https://github.com/trycourier/courier-ruby/commit/d98f9786a8396cb9258d4f798240dc53d57c7b98))
|
|
11
|
+
* spec: reorder API reference sections to match the Studio nav ([#180](https://github.com/trycourier/courier-ruby/issues/180)) ([fe03907](https://github.com/trycourier/courier-ruby/commit/fe03907ebe05595a7e9edf4ff7ecf11711c3156b))
|
|
12
|
+
|
|
13
|
+
## 4.23.0 (2026-07-29)
|
|
14
|
+
|
|
15
|
+
Full Changelog: [v4.22.0...v4.23.0](https://github.com/trycourier/courier-ruby/compare/v4.22.0...v4.23.0)
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **broadcasts:** document Broadcasts CRUD REST API ([#170](https://github.com/trycourier/courier-ruby/issues/170)) ([122e598](https://github.com/trycourier/courier-ruby/commit/122e5984cc48c30473a81fd3003c4fd899fc1cc6))
|
|
20
|
+
|
|
3
21
|
## 4.22.0 (2026-07-29)
|
|
4
22
|
|
|
5
23
|
Full Changelog: [v4.21.0...v4.22.0](https://github.com/trycourier/courier-ruby/compare/v4.21.0...v4.22.0)
|
data/lib/courier/client.rb
CHANGED
|
@@ -53,6 +53,11 @@ module Courier
|
|
|
53
53
|
# @return [Courier::Resources::Journeys]
|
|
54
54
|
attr_reader :journeys
|
|
55
55
|
|
|
56
|
+
# Create a one-off send to a list or audience, author its content, then send it
|
|
57
|
+
# immediately or schedule it for later.
|
|
58
|
+
# @return [Courier::Resources::Broadcasts]
|
|
59
|
+
attr_reader :broadcasts
|
|
60
|
+
|
|
56
61
|
# Manage the logos, colors, and layout that give the templates you send a
|
|
57
62
|
# consistent look.
|
|
58
63
|
# @return [Courier::Resources::Brands]
|
|
@@ -70,9 +75,6 @@ module Courier
|
|
|
70
75
|
# @return [Courier::Resources::Lists]
|
|
71
76
|
attr_reader :lists
|
|
72
77
|
|
|
73
|
-
# @return [Courier::Resources::Inbox]
|
|
74
|
-
attr_reader :inbox
|
|
75
|
-
|
|
76
78
|
# Look up the messages Courier has accepted, inspect their delivery history and
|
|
77
79
|
# rendered output, and cancel, resend, or archive them.
|
|
78
80
|
# @return [Courier::Resources::Messages]
|
|
@@ -184,11 +186,11 @@ module Courier
|
|
|
184
186
|
@auth = Courier::Resources::Auth.new(client: self)
|
|
185
187
|
@automations = Courier::Resources::Automations.new(client: self)
|
|
186
188
|
@journeys = Courier::Resources::Journeys.new(client: self)
|
|
189
|
+
@broadcasts = Courier::Resources::Broadcasts.new(client: self)
|
|
187
190
|
@brands = Courier::Resources::Brands.new(client: self)
|
|
188
191
|
@digests = Courier::Resources::Digests.new(client: self)
|
|
189
192
|
@inbound = Courier::Resources::Inbound.new(client: self)
|
|
190
193
|
@lists = Courier::Resources::Lists.new(client: self)
|
|
191
|
-
@inbox = Courier::Resources::Inbox.new(client: self)
|
|
192
194
|
@messages = Courier::Resources::Messages.new(client: self)
|
|
193
195
|
@requests = Courier::Resources::Requests.new(client: self)
|
|
194
196
|
@notifications = Courier::Resources::Notifications.new(client: self)
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#create
|
|
6
|
+
class Broadcast < Courier::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The broadcast ID (bst\_ prefix).
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute channel
|
|
14
|
+
# The broadcast's delivery channel.
|
|
15
|
+
#
|
|
16
|
+
# @return [Symbol, Courier::Models::Broadcast::Channel]
|
|
17
|
+
required :channel, enum: -> { Courier::Broadcast::Channel }
|
|
18
|
+
|
|
19
|
+
# @!attribute created_at
|
|
20
|
+
# ISO 8601 timestamp when the broadcast was created.
|
|
21
|
+
#
|
|
22
|
+
# @return [String]
|
|
23
|
+
required :created_at, String
|
|
24
|
+
|
|
25
|
+
# @!attribute created_by
|
|
26
|
+
# Actor that created the broadcast.
|
|
27
|
+
#
|
|
28
|
+
# @return [String]
|
|
29
|
+
required :created_by, String
|
|
30
|
+
|
|
31
|
+
# @!attribute name
|
|
32
|
+
# Human-readable name.
|
|
33
|
+
#
|
|
34
|
+
# @return [String]
|
|
35
|
+
required :name, String
|
|
36
|
+
|
|
37
|
+
# @!attribute status
|
|
38
|
+
# Lifecycle status of the broadcast.
|
|
39
|
+
#
|
|
40
|
+
# @return [Symbol, Courier::Models::Broadcast::Status]
|
|
41
|
+
required :status, enum: -> { Courier::Broadcast::Status }
|
|
42
|
+
|
|
43
|
+
# @!attribute updated_at
|
|
44
|
+
# ISO 8601 timestamp of the last update.
|
|
45
|
+
#
|
|
46
|
+
# @return [String]
|
|
47
|
+
required :updated_at, String
|
|
48
|
+
|
|
49
|
+
# @!attribute updated_by
|
|
50
|
+
# Actor that last updated the broadcast.
|
|
51
|
+
#
|
|
52
|
+
# @return [String]
|
|
53
|
+
required :updated_by, String
|
|
54
|
+
|
|
55
|
+
# @!attribute archived_at
|
|
56
|
+
# ISO 8601 timestamp when the broadcast was archived, if archived.
|
|
57
|
+
#
|
|
58
|
+
# @return [String, nil]
|
|
59
|
+
optional :archived_at, String, nil?: true
|
|
60
|
+
|
|
61
|
+
# @!attribute archived_by
|
|
62
|
+
# Actor that archived the broadcast, if archived.
|
|
63
|
+
#
|
|
64
|
+
# @return [String, nil]
|
|
65
|
+
optional :archived_by, String, nil?: true
|
|
66
|
+
|
|
67
|
+
# @!attribute schedule
|
|
68
|
+
# The delivery schedule and recipient targeting for a broadcast.
|
|
69
|
+
#
|
|
70
|
+
# @return [Courier::Models::BroadcastSchedule, nil]
|
|
71
|
+
optional :schedule, -> { Courier::BroadcastSchedule }, nil?: true
|
|
72
|
+
|
|
73
|
+
# @!method initialize(id:, channel:, created_at:, created_by:, name:, status:, updated_at:, updated_by:, archived_at: nil, archived_by: nil, schedule: nil)
|
|
74
|
+
# A broadcast — a single-channel message delivered to a known set of recipients (a
|
|
75
|
+
# list or audience).
|
|
76
|
+
#
|
|
77
|
+
# @param id [String] The broadcast ID (bst\_ prefix).
|
|
78
|
+
#
|
|
79
|
+
# @param channel [Symbol, Courier::Models::Broadcast::Channel] The broadcast's delivery channel.
|
|
80
|
+
#
|
|
81
|
+
# @param created_at [String] ISO 8601 timestamp when the broadcast was created.
|
|
82
|
+
#
|
|
83
|
+
# @param created_by [String] Actor that created the broadcast.
|
|
84
|
+
#
|
|
85
|
+
# @param name [String] Human-readable name.
|
|
86
|
+
#
|
|
87
|
+
# @param status [Symbol, Courier::Models::Broadcast::Status] Lifecycle status of the broadcast.
|
|
88
|
+
#
|
|
89
|
+
# @param updated_at [String] ISO 8601 timestamp of the last update.
|
|
90
|
+
#
|
|
91
|
+
# @param updated_by [String] Actor that last updated the broadcast.
|
|
92
|
+
#
|
|
93
|
+
# @param archived_at [String, nil] ISO 8601 timestamp when the broadcast was archived, if archived.
|
|
94
|
+
#
|
|
95
|
+
# @param archived_by [String, nil] Actor that archived the broadcast, if archived.
|
|
96
|
+
#
|
|
97
|
+
# @param schedule [Courier::Models::BroadcastSchedule, nil] The delivery schedule and recipient targeting for a broadcast.
|
|
98
|
+
|
|
99
|
+
# The broadcast's delivery channel.
|
|
100
|
+
#
|
|
101
|
+
# @see Courier::Models::Broadcast#channel
|
|
102
|
+
module Channel
|
|
103
|
+
extend Courier::Internal::Type::Enum
|
|
104
|
+
|
|
105
|
+
EMAIL = :email
|
|
106
|
+
SMS = :sms
|
|
107
|
+
PUSH = :push
|
|
108
|
+
INBOX = :inbox
|
|
109
|
+
SLACK = :slack
|
|
110
|
+
MSTEAMS = :msteams
|
|
111
|
+
|
|
112
|
+
# @!method self.values
|
|
113
|
+
# @return [Array<Symbol>]
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Lifecycle status of the broadcast.
|
|
117
|
+
#
|
|
118
|
+
# @see Courier::Models::Broadcast#status
|
|
119
|
+
module Status
|
|
120
|
+
extend Courier::Internal::Type::Enum
|
|
121
|
+
|
|
122
|
+
DRAFT = :draft
|
|
123
|
+
SCHEDULED = :scheduled
|
|
124
|
+
SENDING = :sending
|
|
125
|
+
SENT = :sent
|
|
126
|
+
|
|
127
|
+
# @!method self.values
|
|
128
|
+
# @return [Array<Symbol>]
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#archive
|
|
6
|
+
class BroadcastArchiveParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute broadcast_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :broadcast_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(broadcast_id:, request_options: {})
|
|
16
|
+
# @param broadcast_id [String]
|
|
17
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#cancel
|
|
6
|
+
class BroadcastCancelParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute broadcast_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :broadcast_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(broadcast_id:, request_options: {})
|
|
16
|
+
# @param broadcast_id [String]
|
|
17
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#create
|
|
6
|
+
class BroadcastCreateParams < Courier::Models::CreateBroadcastRequest
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#duplicate
|
|
6
|
+
class BroadcastDuplicateParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute broadcast_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :broadcast_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(broadcast_id:, request_options: {})
|
|
16
|
+
# @param broadcast_id [String]
|
|
17
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#list
|
|
6
|
+
class BroadcastListParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute cursor
|
|
11
|
+
# Opaque pagination cursor from a previous response. Omit for the first page.
|
|
12
|
+
#
|
|
13
|
+
# @return [String, nil]
|
|
14
|
+
optional :cursor, String, nil?: true
|
|
15
|
+
|
|
16
|
+
# @!attribute limit
|
|
17
|
+
# Maximum number of results per page.
|
|
18
|
+
#
|
|
19
|
+
# @return [Integer, nil]
|
|
20
|
+
optional :limit, Integer
|
|
21
|
+
|
|
22
|
+
# @!method initialize(cursor: nil, limit: nil, request_options: {})
|
|
23
|
+
# @param cursor [String, nil] Opaque pagination cursor from a previous response. Omit for the first page.
|
|
24
|
+
#
|
|
25
|
+
# @param limit [Integer] Maximum number of results per page.
|
|
26
|
+
#
|
|
27
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#list
|
|
6
|
+
class BroadcastListResponse < Courier::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute paging
|
|
8
|
+
#
|
|
9
|
+
# @return [Courier::Models::Paging]
|
|
10
|
+
required :paging, -> { Courier::Paging }
|
|
11
|
+
|
|
12
|
+
# @!attribute results
|
|
13
|
+
#
|
|
14
|
+
# @return [Array<Courier::Models::Broadcast>]
|
|
15
|
+
required :results, -> { Courier::Internal::Type::ArrayOf[Courier::Broadcast] }
|
|
16
|
+
|
|
17
|
+
# @!method initialize(paging:, results:)
|
|
18
|
+
# Paginated list of broadcasts.
|
|
19
|
+
#
|
|
20
|
+
# @param paging [Courier::Models::Paging]
|
|
21
|
+
# @param results [Array<Courier::Models::Broadcast>]
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#put_content
|
|
6
|
+
class BroadcastPutContentParams < Courier::Models::NotificationContentPutRequest
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute broadcast_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :broadcast_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(broadcast_id:, request_options: {})
|
|
16
|
+
# @param broadcast_id [String]
|
|
17
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#retrieve_content
|
|
6
|
+
class BroadcastRetrieveContentParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute broadcast_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :broadcast_id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute version
|
|
16
|
+
# Accepts `draft`, `published`, or a version string (e.g. `v001`). Defaults to
|
|
17
|
+
# `draft`.
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :version, String
|
|
21
|
+
|
|
22
|
+
# @!method initialize(broadcast_id:, version: nil, request_options: {})
|
|
23
|
+
# Some parameter documentations has been truncated, see
|
|
24
|
+
# {Courier::Models::BroadcastRetrieveContentParams} for more details.
|
|
25
|
+
#
|
|
26
|
+
# @param broadcast_id [String]
|
|
27
|
+
#
|
|
28
|
+
# @param version [String] Accepts `draft`, `published`, or a version string (e.g. `v001`). Defaults to `dr
|
|
29
|
+
#
|
|
30
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#retrieve
|
|
6
|
+
class BroadcastRetrieveParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute broadcast_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :broadcast_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(broadcast_id:, request_options: {})
|
|
16
|
+
# @param broadcast_id [String]
|
|
17
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class BroadcastSchedule < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute recipient_id
|
|
7
|
+
# ID of the target list or audience.
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :recipient_id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute recipient_type
|
|
13
|
+
# Whether the broadcast targets a list or an audience.
|
|
14
|
+
#
|
|
15
|
+
# @return [Symbol, Courier::Models::BroadcastSchedule::RecipientType]
|
|
16
|
+
required :recipient_type, enum: -> { Courier::BroadcastSchedule::RecipientType }
|
|
17
|
+
|
|
18
|
+
# @!attribute scheduled_to
|
|
19
|
+
# Wall-clock timestamp of the scheduled send, no timezone offset (e.g.
|
|
20
|
+
# "2026-07-21T20:00:00").
|
|
21
|
+
#
|
|
22
|
+
# @return [String, nil]
|
|
23
|
+
optional :scheduled_to, String, nil?: true
|
|
24
|
+
|
|
25
|
+
# @!attribute timezone
|
|
26
|
+
# IANA timezone for the scheduled send (e.g. America/New_York).
|
|
27
|
+
#
|
|
28
|
+
# @return [String, nil]
|
|
29
|
+
optional :timezone, String, nil?: true
|
|
30
|
+
|
|
31
|
+
# @!method initialize(recipient_id:, recipient_type:, scheduled_to: nil, timezone: nil)
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {Courier::Models::BroadcastSchedule} for more details.
|
|
34
|
+
#
|
|
35
|
+
# The delivery schedule and recipient targeting for a broadcast.
|
|
36
|
+
#
|
|
37
|
+
# @param recipient_id [String] ID of the target list or audience.
|
|
38
|
+
#
|
|
39
|
+
# @param recipient_type [Symbol, Courier::Models::BroadcastSchedule::RecipientType] Whether the broadcast targets a list or an audience.
|
|
40
|
+
#
|
|
41
|
+
# @param scheduled_to [String, nil] Wall-clock timestamp of the scheduled send, no timezone offset (e.g. "2026-07-21
|
|
42
|
+
#
|
|
43
|
+
# @param timezone [String, nil] IANA timezone for the scheduled send (e.g. America/New_York).
|
|
44
|
+
|
|
45
|
+
# Whether the broadcast targets a list or an audience.
|
|
46
|
+
#
|
|
47
|
+
# @see Courier::Models::BroadcastSchedule#recipient_type
|
|
48
|
+
module RecipientType
|
|
49
|
+
extend Courier::Internal::Type::Enum
|
|
50
|
+
|
|
51
|
+
LIST = :list
|
|
52
|
+
AUDIENCE = :audience
|
|
53
|
+
|
|
54
|
+
# @!method self.values
|
|
55
|
+
# @return [Array<Symbol>]
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#schedule
|
|
6
|
+
class BroadcastScheduleParams < Courier::Models::ScheduleBroadcastRequest
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute broadcast_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :broadcast_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(broadcast_id:, request_options: {})
|
|
16
|
+
# @param broadcast_id [String]
|
|
17
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#send_
|
|
6
|
+
class BroadcastSendParams < Courier::Models::SendBroadcastRequest
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute broadcast_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :broadcast_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(broadcast_id:, request_options: {})
|
|
16
|
+
# @param broadcast_id [String]
|
|
17
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Broadcasts#update
|
|
6
|
+
class BroadcastUpdateParams < Courier::Models::UpdateBroadcastRequest
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute broadcast_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :broadcast_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(broadcast_id:, request_options: {})
|
|
16
|
+
# @param broadcast_id [String]
|
|
17
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class CreateBroadcastRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute channel
|
|
7
|
+
# The single delivery channel for this broadcast.
|
|
8
|
+
#
|
|
9
|
+
# @return [Symbol, Courier::Models::CreateBroadcastRequest::Channel]
|
|
10
|
+
required :channel, enum: -> { Courier::CreateBroadcastRequest::Channel }
|
|
11
|
+
|
|
12
|
+
# @!attribute name
|
|
13
|
+
# Human-readable name.
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :name, String
|
|
17
|
+
|
|
18
|
+
# @!method initialize(channel:, name:)
|
|
19
|
+
# Request body for creating a broadcast.
|
|
20
|
+
#
|
|
21
|
+
# @param channel [Symbol, Courier::Models::CreateBroadcastRequest::Channel] The single delivery channel for this broadcast.
|
|
22
|
+
#
|
|
23
|
+
# @param name [String] Human-readable name.
|
|
24
|
+
|
|
25
|
+
# The single delivery channel for this broadcast.
|
|
26
|
+
#
|
|
27
|
+
# @see Courier::Models::CreateBroadcastRequest#channel
|
|
28
|
+
module Channel
|
|
29
|
+
extend Courier::Internal::Type::Enum
|
|
30
|
+
|
|
31
|
+
EMAIL = :email
|
|
32
|
+
SMS = :sms
|
|
33
|
+
PUSH = :push
|
|
34
|
+
INBOX = :inbox
|
|
35
|
+
SLACK = :slack
|
|
36
|
+
MSTEAMS = :msteams
|
|
37
|
+
|
|
38
|
+
# @!method self.values
|
|
39
|
+
# @return [Array<Symbol>]
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -14,7 +14,7 @@ module Courier
|
|
|
14
14
|
# Trigger fired by a segment event (`identify`, `group`, or `track`).
|
|
15
15
|
variant -> { Courier::JourneySegmentTriggerNode }
|
|
16
16
|
|
|
17
|
-
# 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, delay the send, or attach `data`.
|
|
17
|
+
# 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
18
|
variant -> { Courier::JourneySendNode }
|
|
19
19
|
|
|
20
20
|
# Pause the journey run for a fixed `duration`.
|
|
@@ -41,8 +41,8 @@ module Courier
|
|
|
41
41
|
# Send to the recipient. A send node sources its content from EXACTLY ONE of
|
|
42
42
|
# `message.template` (a single notification template) or `experiment` (an A/B
|
|
43
43
|
# split across weighted template variants) — supplying both, or neither, is
|
|
44
|
-
# rejected. Optionally override the recipient address,
|
|
45
|
-
# `data`.
|
|
44
|
+
# rejected. Optionally override the recipient address, send as a tenant, delay the
|
|
45
|
+
# send, or attach `data`.
|
|
46
46
|
#
|
|
47
47
|
# @param message [Courier::Models::JourneySendNode::Message]
|
|
48
48
|
#
|
|
@@ -56,6 +56,13 @@ module Courier
|
|
|
56
56
|
|
|
57
57
|
# @see Courier::Models::JourneySendNode#message
|
|
58
58
|
class Message < Courier::Internal::Type::BaseModel
|
|
59
|
+
# @!attribute context
|
|
60
|
+
# Tenant context for this send. Set it to deliver on behalf of one of your
|
|
61
|
+
# customers, so the message uses that tenant's brand and settings.
|
|
62
|
+
#
|
|
63
|
+
# @return [Courier::Models::JourneySendNode::Message::Context, nil]
|
|
64
|
+
optional :context, -> { Courier::JourneySendNode::Message::Context }
|
|
65
|
+
|
|
59
66
|
# @!attribute data
|
|
60
67
|
#
|
|
61
68
|
# @return [Hash{Symbol=>Object}, nil]
|
|
@@ -76,12 +83,48 @@ module Courier
|
|
|
76
83
|
# @return [Courier::Models::JourneySendNode::Message::To, nil]
|
|
77
84
|
optional :to, -> { Courier::JourneySendNode::Message::To }
|
|
78
85
|
|
|
79
|
-
# @!method initialize(data: nil, delay: nil, template: nil, to: nil)
|
|
86
|
+
# @!method initialize(context: nil, data: nil, delay: nil, template: nil, to: nil)
|
|
87
|
+
# Some parameter documentations has been truncated, see
|
|
88
|
+
# {Courier::Models::JourneySendNode::Message} for more details.
|
|
89
|
+
#
|
|
90
|
+
# @param context [Courier::Models::JourneySendNode::Message::Context] Tenant context for this send. Set it to deliver on behalf of one of your custome
|
|
91
|
+
#
|
|
80
92
|
# @param data [Hash{Symbol=>Object}]
|
|
93
|
+
#
|
|
81
94
|
# @param delay [Courier::Models::JourneySendNode::Message::Delay]
|
|
95
|
+
#
|
|
82
96
|
# @param template [String]
|
|
97
|
+
#
|
|
83
98
|
# @param to [Courier::Models::JourneySendNode::Message::To]
|
|
84
99
|
|
|
100
|
+
# @see Courier::Models::JourneySendNode::Message#context
|
|
101
|
+
class Context < Courier::Internal::Type::BaseModel
|
|
102
|
+
# @!attribute tenant_id
|
|
103
|
+
# The tenant to send as. Accepts either a literal tenant id (`acme-tenant`) or a
|
|
104
|
+
# whole-string mustache reference to a value the run already holds —
|
|
105
|
+
# `{{data.tenant_id}}` from the invocation payload, or `{{f1.body.tenant_id}}`
|
|
106
|
+
# from the response of an earlier fetch node with id `f1`. A reference is resolved
|
|
107
|
+
# separately on every run, so a single journey can deliver as many tenants. Two
|
|
108
|
+
# forms are rejected with `400`: mid-string interpolation such as
|
|
109
|
+
# `tenant-{{data.region}}`, and any value beginning with `refs.`, which is
|
|
110
|
+
# reserved for internal use. A reference that resolves to nothing at run time does
|
|
111
|
+
# not stop the run — the message is still sent, with no tenant context — so make
|
|
112
|
+
# sure the referenced value is always present. `GET` returns the value in the same
|
|
113
|
+
# form it was supplied.
|
|
114
|
+
#
|
|
115
|
+
# @return [String]
|
|
116
|
+
required :tenant_id, String
|
|
117
|
+
|
|
118
|
+
# @!method initialize(tenant_id:)
|
|
119
|
+
# Some parameter documentations has been truncated, see
|
|
120
|
+
# {Courier::Models::JourneySendNode::Message::Context} for more details.
|
|
121
|
+
#
|
|
122
|
+
# Tenant context for this send. Set it to deliver on behalf of one of your
|
|
123
|
+
# customers, so the message uses that tenant's brand and settings.
|
|
124
|
+
#
|
|
125
|
+
# @param tenant_id [String] The tenant to send as. Accepts either a literal tenant id (`acme-tenant`) or a w
|
|
126
|
+
end
|
|
127
|
+
|
|
85
128
|
# @see Courier::Models::JourneySendNode::Message#delay
|
|
86
129
|
class Delay < Courier::Internal::Type::BaseModel
|
|
87
130
|
# @!attribute until_
|