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
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class Broadcast < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias { T.any(Courier::Broadcast, Courier::Internal::AnyHash) }
|
|
8
|
+
|
|
9
|
+
# The broadcast ID (bst\_ prefix).
|
|
10
|
+
sig { returns(String) }
|
|
11
|
+
attr_accessor :id
|
|
12
|
+
|
|
13
|
+
# The broadcast's delivery channel.
|
|
14
|
+
sig { returns(Courier::Broadcast::Channel::TaggedSymbol) }
|
|
15
|
+
attr_accessor :channel
|
|
16
|
+
|
|
17
|
+
# ISO 8601 timestamp when the broadcast was created.
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :created_at
|
|
20
|
+
|
|
21
|
+
# Actor that created the broadcast.
|
|
22
|
+
sig { returns(String) }
|
|
23
|
+
attr_accessor :created_by
|
|
24
|
+
|
|
25
|
+
# Human-readable name.
|
|
26
|
+
sig { returns(String) }
|
|
27
|
+
attr_accessor :name
|
|
28
|
+
|
|
29
|
+
# Lifecycle status of the broadcast.
|
|
30
|
+
sig { returns(Courier::Broadcast::Status::TaggedSymbol) }
|
|
31
|
+
attr_accessor :status
|
|
32
|
+
|
|
33
|
+
# ISO 8601 timestamp of the last update.
|
|
34
|
+
sig { returns(String) }
|
|
35
|
+
attr_accessor :updated_at
|
|
36
|
+
|
|
37
|
+
# Actor that last updated the broadcast.
|
|
38
|
+
sig { returns(String) }
|
|
39
|
+
attr_accessor :updated_by
|
|
40
|
+
|
|
41
|
+
# ISO 8601 timestamp when the broadcast was archived, if archived.
|
|
42
|
+
sig { returns(T.nilable(String)) }
|
|
43
|
+
attr_accessor :archived_at
|
|
44
|
+
|
|
45
|
+
# Actor that archived the broadcast, if archived.
|
|
46
|
+
sig { returns(T.nilable(String)) }
|
|
47
|
+
attr_accessor :archived_by
|
|
48
|
+
|
|
49
|
+
# The delivery schedule and recipient targeting for a broadcast.
|
|
50
|
+
sig { returns(T.nilable(Courier::BroadcastSchedule)) }
|
|
51
|
+
attr_reader :schedule
|
|
52
|
+
|
|
53
|
+
sig do
|
|
54
|
+
params(schedule: T.nilable(Courier::BroadcastSchedule::OrHash)).void
|
|
55
|
+
end
|
|
56
|
+
attr_writer :schedule
|
|
57
|
+
|
|
58
|
+
# A broadcast — a single-channel message delivered to a known set of recipients (a
|
|
59
|
+
# list or audience).
|
|
60
|
+
sig do
|
|
61
|
+
params(
|
|
62
|
+
id: String,
|
|
63
|
+
channel: Courier::Broadcast::Channel::OrSymbol,
|
|
64
|
+
created_at: String,
|
|
65
|
+
created_by: String,
|
|
66
|
+
name: String,
|
|
67
|
+
status: Courier::Broadcast::Status::OrSymbol,
|
|
68
|
+
updated_at: String,
|
|
69
|
+
updated_by: String,
|
|
70
|
+
archived_at: T.nilable(String),
|
|
71
|
+
archived_by: T.nilable(String),
|
|
72
|
+
schedule: T.nilable(Courier::BroadcastSchedule::OrHash)
|
|
73
|
+
).returns(T.attached_class)
|
|
74
|
+
end
|
|
75
|
+
def self.new(
|
|
76
|
+
# The broadcast ID (bst\_ prefix).
|
|
77
|
+
id:,
|
|
78
|
+
# The broadcast's delivery channel.
|
|
79
|
+
channel:,
|
|
80
|
+
# ISO 8601 timestamp when the broadcast was created.
|
|
81
|
+
created_at:,
|
|
82
|
+
# Actor that created the broadcast.
|
|
83
|
+
created_by:,
|
|
84
|
+
# Human-readable name.
|
|
85
|
+
name:,
|
|
86
|
+
# Lifecycle status of the broadcast.
|
|
87
|
+
status:,
|
|
88
|
+
# ISO 8601 timestamp of the last update.
|
|
89
|
+
updated_at:,
|
|
90
|
+
# Actor that last updated the broadcast.
|
|
91
|
+
updated_by:,
|
|
92
|
+
# ISO 8601 timestamp when the broadcast was archived, if archived.
|
|
93
|
+
archived_at: nil,
|
|
94
|
+
# Actor that archived the broadcast, if archived.
|
|
95
|
+
archived_by: nil,
|
|
96
|
+
# The delivery schedule and recipient targeting for a broadcast.
|
|
97
|
+
schedule: nil
|
|
98
|
+
)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
sig do
|
|
102
|
+
override.returns(
|
|
103
|
+
{
|
|
104
|
+
id: String,
|
|
105
|
+
channel: Courier::Broadcast::Channel::TaggedSymbol,
|
|
106
|
+
created_at: String,
|
|
107
|
+
created_by: String,
|
|
108
|
+
name: String,
|
|
109
|
+
status: Courier::Broadcast::Status::TaggedSymbol,
|
|
110
|
+
updated_at: String,
|
|
111
|
+
updated_by: String,
|
|
112
|
+
archived_at: T.nilable(String),
|
|
113
|
+
archived_by: T.nilable(String),
|
|
114
|
+
schedule: T.nilable(Courier::BroadcastSchedule)
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
end
|
|
118
|
+
def to_hash
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# The broadcast's delivery channel.
|
|
122
|
+
module Channel
|
|
123
|
+
extend Courier::Internal::Type::Enum
|
|
124
|
+
|
|
125
|
+
TaggedSymbol =
|
|
126
|
+
T.type_alias { T.all(Symbol, Courier::Broadcast::Channel) }
|
|
127
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
128
|
+
|
|
129
|
+
EMAIL = T.let(:email, Courier::Broadcast::Channel::TaggedSymbol)
|
|
130
|
+
SMS = T.let(:sms, Courier::Broadcast::Channel::TaggedSymbol)
|
|
131
|
+
PUSH = T.let(:push, Courier::Broadcast::Channel::TaggedSymbol)
|
|
132
|
+
INBOX = T.let(:inbox, Courier::Broadcast::Channel::TaggedSymbol)
|
|
133
|
+
SLACK = T.let(:slack, Courier::Broadcast::Channel::TaggedSymbol)
|
|
134
|
+
MSTEAMS = T.let(:msteams, Courier::Broadcast::Channel::TaggedSymbol)
|
|
135
|
+
|
|
136
|
+
sig do
|
|
137
|
+
override.returns(T::Array[Courier::Broadcast::Channel::TaggedSymbol])
|
|
138
|
+
end
|
|
139
|
+
def self.values
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Lifecycle status of the broadcast.
|
|
144
|
+
module Status
|
|
145
|
+
extend Courier::Internal::Type::Enum
|
|
146
|
+
|
|
147
|
+
TaggedSymbol =
|
|
148
|
+
T.type_alias { T.all(Symbol, Courier::Broadcast::Status) }
|
|
149
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
150
|
+
|
|
151
|
+
DRAFT = T.let(:draft, Courier::Broadcast::Status::TaggedSymbol)
|
|
152
|
+
SCHEDULED = T.let(:scheduled, Courier::Broadcast::Status::TaggedSymbol)
|
|
153
|
+
SENDING = T.let(:sending, Courier::Broadcast::Status::TaggedSymbol)
|
|
154
|
+
SENT = T.let(:sent, Courier::Broadcast::Status::TaggedSymbol)
|
|
155
|
+
|
|
156
|
+
sig do
|
|
157
|
+
override.returns(T::Array[Courier::Broadcast::Status::TaggedSymbol])
|
|
158
|
+
end
|
|
159
|
+
def self.values
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class BroadcastArchiveParams < Courier::Internal::Type::BaseModel
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Courier::BroadcastArchiveParams, Courier::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :broadcast_id
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(
|
|
19
|
+
broadcast_id: String,
|
|
20
|
+
request_options: Courier::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
22
|
+
end
|
|
23
|
+
def self.new(broadcast_id:, request_options: {})
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ broadcast_id: String, request_options: Courier::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
def to_hash
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class BroadcastCancelParams < Courier::Internal::Type::BaseModel
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Courier::BroadcastCancelParams, Courier::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :broadcast_id
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(
|
|
19
|
+
broadcast_id: String,
|
|
20
|
+
request_options: Courier::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
22
|
+
end
|
|
23
|
+
def self.new(broadcast_id:, request_options: {})
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ broadcast_id: String, request_options: Courier::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
def to_hash
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class BroadcastCreateParams < Courier::Models::CreateBroadcastRequest
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Courier::BroadcastCreateParams, Courier::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig do
|
|
15
|
+
params(request_options: Courier::RequestOptions::OrHash).returns(
|
|
16
|
+
T.attached_class
|
|
17
|
+
)
|
|
18
|
+
end
|
|
19
|
+
def self.new(request_options: {})
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
sig { override.returns({ request_options: Courier::RequestOptions }) }
|
|
23
|
+
def to_hash
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class BroadcastDuplicateParams < Courier::Internal::Type::BaseModel
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Courier::BroadcastDuplicateParams, Courier::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :broadcast_id
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(
|
|
19
|
+
broadcast_id: String,
|
|
20
|
+
request_options: Courier::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
22
|
+
end
|
|
23
|
+
def self.new(broadcast_id:, request_options: {})
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ broadcast_id: String, request_options: Courier::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
def to_hash
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class BroadcastListParams < Courier::Internal::Type::BaseModel
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Courier::BroadcastListParams, Courier::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Opaque pagination cursor from a previous response. Omit for the first page.
|
|
15
|
+
sig { returns(T.nilable(String)) }
|
|
16
|
+
attr_accessor :cursor
|
|
17
|
+
|
|
18
|
+
# Maximum number of results per page.
|
|
19
|
+
sig { returns(T.nilable(Integer)) }
|
|
20
|
+
attr_reader :limit
|
|
21
|
+
|
|
22
|
+
sig { params(limit: Integer).void }
|
|
23
|
+
attr_writer :limit
|
|
24
|
+
|
|
25
|
+
sig do
|
|
26
|
+
params(
|
|
27
|
+
cursor: T.nilable(String),
|
|
28
|
+
limit: Integer,
|
|
29
|
+
request_options: Courier::RequestOptions::OrHash
|
|
30
|
+
).returns(T.attached_class)
|
|
31
|
+
end
|
|
32
|
+
def self.new(
|
|
33
|
+
# Opaque pagination cursor from a previous response. Omit for the first page.
|
|
34
|
+
cursor: nil,
|
|
35
|
+
# Maximum number of results per page.
|
|
36
|
+
limit: nil,
|
|
37
|
+
request_options: {}
|
|
38
|
+
)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
sig do
|
|
42
|
+
override.returns(
|
|
43
|
+
{
|
|
44
|
+
cursor: T.nilable(String),
|
|
45
|
+
limit: Integer,
|
|
46
|
+
request_options: Courier::RequestOptions
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
end
|
|
50
|
+
def to_hash
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class BroadcastListResponse < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Courier::BroadcastListResponse, Courier::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
sig { returns(Courier::Paging) }
|
|
12
|
+
attr_reader :paging
|
|
13
|
+
|
|
14
|
+
sig { params(paging: Courier::Paging::OrHash).void }
|
|
15
|
+
attr_writer :paging
|
|
16
|
+
|
|
17
|
+
sig { returns(T::Array[Courier::Broadcast]) }
|
|
18
|
+
attr_accessor :results
|
|
19
|
+
|
|
20
|
+
# Paginated list of broadcasts.
|
|
21
|
+
sig do
|
|
22
|
+
params(
|
|
23
|
+
paging: Courier::Paging::OrHash,
|
|
24
|
+
results: T::Array[Courier::Broadcast::OrHash]
|
|
25
|
+
).returns(T.attached_class)
|
|
26
|
+
end
|
|
27
|
+
def self.new(paging:, results:)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
override.returns(
|
|
32
|
+
{ paging: Courier::Paging, results: T::Array[Courier::Broadcast] }
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
def to_hash
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class BroadcastPutContentParams < Courier::Models::NotificationContentPutRequest
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Courier::BroadcastPutContentParams, Courier::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :broadcast_id
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(
|
|
19
|
+
broadcast_id: String,
|
|
20
|
+
request_options: Courier::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
22
|
+
end
|
|
23
|
+
def self.new(broadcast_id:, request_options: {})
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ broadcast_id: String, request_options: Courier::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
def to_hash
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class BroadcastRetrieveContentParams < Courier::Internal::Type::BaseModel
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Courier::BroadcastRetrieveContentParams,
|
|
13
|
+
Courier::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :broadcast_id
|
|
19
|
+
|
|
20
|
+
# Accepts `draft`, `published`, or a version string (e.g. `v001`). Defaults to
|
|
21
|
+
# `draft`.
|
|
22
|
+
sig { returns(T.nilable(String)) }
|
|
23
|
+
attr_reader :version
|
|
24
|
+
|
|
25
|
+
sig { params(version: String).void }
|
|
26
|
+
attr_writer :version
|
|
27
|
+
|
|
28
|
+
sig do
|
|
29
|
+
params(
|
|
30
|
+
broadcast_id: String,
|
|
31
|
+
version: String,
|
|
32
|
+
request_options: Courier::RequestOptions::OrHash
|
|
33
|
+
).returns(T.attached_class)
|
|
34
|
+
end
|
|
35
|
+
def self.new(
|
|
36
|
+
broadcast_id:,
|
|
37
|
+
# Accepts `draft`, `published`, or a version string (e.g. `v001`). Defaults to
|
|
38
|
+
# `draft`.
|
|
39
|
+
version: nil,
|
|
40
|
+
request_options: {}
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
sig do
|
|
45
|
+
override.returns(
|
|
46
|
+
{
|
|
47
|
+
broadcast_id: String,
|
|
48
|
+
version: String,
|
|
49
|
+
request_options: Courier::RequestOptions
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
end
|
|
53
|
+
def to_hash
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class BroadcastRetrieveParams < Courier::Internal::Type::BaseModel
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Courier::BroadcastRetrieveParams, Courier::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :broadcast_id
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(
|
|
19
|
+
broadcast_id: String,
|
|
20
|
+
request_options: Courier::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
22
|
+
end
|
|
23
|
+
def self.new(broadcast_id:, request_options: {})
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ broadcast_id: String, request_options: Courier::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
def to_hash
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class BroadcastSchedule < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Courier::BroadcastSchedule, Courier::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# ID of the target list or audience.
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
attr_accessor :recipient_id
|
|
14
|
+
|
|
15
|
+
# Whether the broadcast targets a list or an audience.
|
|
16
|
+
sig { returns(Courier::BroadcastSchedule::RecipientType::TaggedSymbol) }
|
|
17
|
+
attr_accessor :recipient_type
|
|
18
|
+
|
|
19
|
+
# Wall-clock timestamp of the scheduled send, no timezone offset (e.g.
|
|
20
|
+
# "2026-07-21T20:00:00").
|
|
21
|
+
sig { returns(T.nilable(String)) }
|
|
22
|
+
attr_accessor :scheduled_to
|
|
23
|
+
|
|
24
|
+
# IANA timezone for the scheduled send (e.g. America/New_York).
|
|
25
|
+
sig { returns(T.nilable(String)) }
|
|
26
|
+
attr_accessor :timezone
|
|
27
|
+
|
|
28
|
+
# The delivery schedule and recipient targeting for a broadcast.
|
|
29
|
+
sig do
|
|
30
|
+
params(
|
|
31
|
+
recipient_id: String,
|
|
32
|
+
recipient_type: Courier::BroadcastSchedule::RecipientType::OrSymbol,
|
|
33
|
+
scheduled_to: T.nilable(String),
|
|
34
|
+
timezone: T.nilable(String)
|
|
35
|
+
).returns(T.attached_class)
|
|
36
|
+
end
|
|
37
|
+
def self.new(
|
|
38
|
+
# ID of the target list or audience.
|
|
39
|
+
recipient_id:,
|
|
40
|
+
# Whether the broadcast targets a list or an audience.
|
|
41
|
+
recipient_type:,
|
|
42
|
+
# Wall-clock timestamp of the scheduled send, no timezone offset (e.g.
|
|
43
|
+
# "2026-07-21T20:00:00").
|
|
44
|
+
scheduled_to: nil,
|
|
45
|
+
# IANA timezone for the scheduled send (e.g. America/New_York).
|
|
46
|
+
timezone: nil
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
sig do
|
|
51
|
+
override.returns(
|
|
52
|
+
{
|
|
53
|
+
recipient_id: String,
|
|
54
|
+
recipient_type:
|
|
55
|
+
Courier::BroadcastSchedule::RecipientType::TaggedSymbol,
|
|
56
|
+
scheduled_to: T.nilable(String),
|
|
57
|
+
timezone: T.nilable(String)
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
def to_hash
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Whether the broadcast targets a list or an audience.
|
|
65
|
+
module RecipientType
|
|
66
|
+
extend Courier::Internal::Type::Enum
|
|
67
|
+
|
|
68
|
+
TaggedSymbol =
|
|
69
|
+
T.type_alias do
|
|
70
|
+
T.all(Symbol, Courier::BroadcastSchedule::RecipientType)
|
|
71
|
+
end
|
|
72
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
73
|
+
|
|
74
|
+
LIST =
|
|
75
|
+
T.let(:list, Courier::BroadcastSchedule::RecipientType::TaggedSymbol)
|
|
76
|
+
AUDIENCE =
|
|
77
|
+
T.let(
|
|
78
|
+
:audience,
|
|
79
|
+
Courier::BroadcastSchedule::RecipientType::TaggedSymbol
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
sig do
|
|
83
|
+
override.returns(
|
|
84
|
+
T::Array[Courier::BroadcastSchedule::RecipientType::TaggedSymbol]
|
|
85
|
+
)
|
|
86
|
+
end
|
|
87
|
+
def self.values
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class BroadcastScheduleParams < Courier::Models::ScheduleBroadcastRequest
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Courier::BroadcastScheduleParams, Courier::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :broadcast_id
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(
|
|
19
|
+
broadcast_id: String,
|
|
20
|
+
request_options: Courier::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
22
|
+
end
|
|
23
|
+
def self.new(broadcast_id:, request_options: {})
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ broadcast_id: String, request_options: Courier::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
def to_hash
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class BroadcastSendParams < Courier::Models::SendBroadcastRequest
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Courier::BroadcastSendParams, Courier::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :broadcast_id
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(
|
|
19
|
+
broadcast_id: String,
|
|
20
|
+
request_options: Courier::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
22
|
+
end
|
|
23
|
+
def self.new(broadcast_id:, request_options: {})
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ broadcast_id: String, request_options: Courier::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
def to_hash
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|