trycourier 4.25.0 → 4.26.1
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 +21 -0
- data/README.md +16 -19
- data/lib/courier/client.rb +4 -0
- data/lib/courier/models/bulk_add_users_params.rb +26 -0
- data/lib/courier/models/bulk_create_job_params.rb +29 -0
- data/lib/courier/models/bulk_create_job_response.rb +16 -0
- data/lib/courier/models/bulk_list_users_params.rb +33 -0
- data/lib/courier/models/bulk_list_users_response.rb +49 -0
- data/lib/courier/models/bulk_retrieve_job_params.rb +20 -0
- data/lib/courier/models/bulk_retrieve_job_response.rb +76 -0
- data/lib/courier/models/bulk_run_job_params.rb +20 -0
- data/lib/courier/models/inbound_bulk_message.rb +91 -0
- data/lib/courier/models/inbound_bulk_message_user.rb +54 -0
- data/lib/courier/models/notification_template_alias.rb +24 -0
- data/lib/courier/models/notification_template_create_request.rb +5 -5
- data/lib/courier/models/notification_template_response.rb +16 -1
- data/lib/courier/models/notification_template_update_request.rb +7 -6
- data/lib/courier/models/notification_template_write_payload.rb +28 -0
- data/lib/courier/models.rb +18 -0
- data/lib/courier/resources/bulk.rb +141 -0
- data/lib/courier/resources/notifications.rb +2 -2
- data/lib/courier/resources/send.rb +2 -1
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +13 -0
- data/rbi/courier/client.rbi +3 -0
- data/rbi/courier/models/bulk_add_users_params.rbi +43 -0
- data/rbi/courier/models/bulk_create_job_params.rbi +54 -0
- data/rbi/courier/models/bulk_create_job_response.rbi +26 -0
- data/rbi/courier/models/bulk_list_users_params.rbi +51 -0
- data/rbi/courier/models/bulk_list_users_response.rbi +125 -0
- data/rbi/courier/models/bulk_retrieve_job_params.rbi +35 -0
- data/rbi/courier/models/bulk_retrieve_job_response.rbi +157 -0
- data/rbi/courier/models/bulk_run_job_params.rbi +35 -0
- data/rbi/courier/models/inbound_bulk_message.rbi +124 -0
- data/rbi/courier/models/inbound_bulk_message_user.rbi +88 -0
- data/rbi/courier/models/notification_template_alias.rbi +28 -0
- data/rbi/courier/models/notification_template_create_request.rbi +10 -8
- data/rbi/courier/models/notification_template_response.rbi +19 -0
- data/rbi/courier/models/notification_template_update_request.rbi +12 -9
- data/rbi/courier/models/notification_template_write_payload.rbi +44 -0
- data/rbi/courier/models.rbi +19 -0
- data/rbi/courier/resources/bulk.rbi +102 -0
- data/rbi/courier/resources/notifications.rbi +6 -6
- data/rbi/courier/resources/send.rbi +2 -1
- data/sig/courier/client.rbs +2 -0
- data/sig/courier/models/bulk_add_users_params.rbs +28 -0
- data/sig/courier/models/bulk_create_job_params.rbs +24 -0
- data/sig/courier/models/bulk_create_job_response.rbs +13 -0
- data/sig/courier/models/bulk_list_users_params.rbs +28 -0
- data/sig/courier/models/bulk_list_users_response.rbs +65 -0
- data/sig/courier/models/bulk_retrieve_job_params.rbs +23 -0
- data/sig/courier/models/bulk_retrieve_job_response.rbs +66 -0
- data/sig/courier/models/bulk_run_job_params.rbs +23 -0
- data/sig/courier/models/inbound_bulk_message.rbs +58 -0
- data/sig/courier/models/inbound_bulk_message_user.rbs +42 -0
- data/sig/courier/models/notification_template_alias.rbs +13 -0
- data/sig/courier/models/notification_template_create_request.rbs +4 -4
- data/sig/courier/models/notification_template_response.rbs +9 -0
- data/sig/courier/models/notification_template_update_request.rbs +4 -4
- data/sig/courier/models/notification_template_write_payload.rbs +15 -0
- data/sig/courier/models.rbs +18 -0
- data/sig/courier/resources/bulk.rbs +34 -0
- data/sig/courier/resources/notifications.rbs +2 -2
- metadata +41 -2
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Resources
|
|
5
|
+
class Bulk
|
|
6
|
+
# Ingest user data into a Bulk Job.
|
|
7
|
+
#
|
|
8
|
+
# **Important**: For email-based bulk jobs, each user must include `profile.email`
|
|
9
|
+
# for provider routing to work correctly. The `to.email` field is not sufficient
|
|
10
|
+
# for email provider routing.
|
|
11
|
+
sig do
|
|
12
|
+
params(
|
|
13
|
+
job_id: String,
|
|
14
|
+
users: T::Array[Courier::InboundBulkMessageUser::OrHash],
|
|
15
|
+
request_options: Courier::RequestOptions::OrHash
|
|
16
|
+
).void
|
|
17
|
+
end
|
|
18
|
+
def add_users(
|
|
19
|
+
# A unique identifier representing the bulk job
|
|
20
|
+
job_id,
|
|
21
|
+
users:,
|
|
22
|
+
request_options: {}
|
|
23
|
+
)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Creates a new bulk job for sending messages to multiple recipients.
|
|
27
|
+
#
|
|
28
|
+
# **Required**: `message.event` (event ID or notification ID)
|
|
29
|
+
#
|
|
30
|
+
# **Optional (V2 format)**: `message.template` (notification ID) or
|
|
31
|
+
# `message.content` (Elemental content) can be provided to override the
|
|
32
|
+
# notification associated with the event.
|
|
33
|
+
sig do
|
|
34
|
+
params(
|
|
35
|
+
message: Courier::InboundBulkMessage::OrHash,
|
|
36
|
+
request_options: Courier::RequestOptions::OrHash
|
|
37
|
+
).returns(Courier::Models::BulkCreateJobResponse)
|
|
38
|
+
end
|
|
39
|
+
def create_job(
|
|
40
|
+
# Bulk message definition. Supports two formats:
|
|
41
|
+
#
|
|
42
|
+
# - V1 format: Requires `event` field (event ID or notification ID)
|
|
43
|
+
# - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
|
|
44
|
+
# content) in addition to `event`
|
|
45
|
+
message:,
|
|
46
|
+
request_options: {}
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Get Bulk Job Users
|
|
51
|
+
sig do
|
|
52
|
+
params(
|
|
53
|
+
job_id: String,
|
|
54
|
+
cursor: T.nilable(String),
|
|
55
|
+
request_options: Courier::RequestOptions::OrHash
|
|
56
|
+
).returns(Courier::Models::BulkListUsersResponse)
|
|
57
|
+
end
|
|
58
|
+
def list_users(
|
|
59
|
+
# A unique identifier representing the bulk job
|
|
60
|
+
job_id,
|
|
61
|
+
# A unique identifier that allows for fetching the next set of users added to the
|
|
62
|
+
# bulk job
|
|
63
|
+
cursor: nil,
|
|
64
|
+
request_options: {}
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Get a bulk job
|
|
69
|
+
sig do
|
|
70
|
+
params(
|
|
71
|
+
job_id: String,
|
|
72
|
+
request_options: Courier::RequestOptions::OrHash
|
|
73
|
+
).returns(Courier::Models::BulkRetrieveJobResponse)
|
|
74
|
+
end
|
|
75
|
+
def retrieve_job(
|
|
76
|
+
# A unique identifier representing the bulk job
|
|
77
|
+
job_id,
|
|
78
|
+
request_options: {}
|
|
79
|
+
)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Run a bulk job
|
|
83
|
+
sig do
|
|
84
|
+
params(
|
|
85
|
+
job_id: String,
|
|
86
|
+
request_options: Courier::RequestOptions::OrHash
|
|
87
|
+
).void
|
|
88
|
+
end
|
|
89
|
+
def run_job(
|
|
90
|
+
# A unique identifier representing the bulk job
|
|
91
|
+
job_id,
|
|
92
|
+
request_options: {}
|
|
93
|
+
)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# @api private
|
|
97
|
+
sig { params(client: Courier::Client).returns(T.attached_class) }
|
|
98
|
+
def self.new(client:)
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|
|
@@ -14,7 +14,7 @@ module Courier
|
|
|
14
14
|
# Templates are created in draft state by default.
|
|
15
15
|
sig do
|
|
16
16
|
params(
|
|
17
|
-
notification: Courier::
|
|
17
|
+
notification: Courier::NotificationTemplateWritePayload::OrHash,
|
|
18
18
|
state: Courier::NotificationTemplateCreateRequest::State::OrSymbol,
|
|
19
19
|
idempotency_key: String,
|
|
20
20
|
x_idempotency_expiration: String,
|
|
@@ -22,8 +22,8 @@ module Courier
|
|
|
22
22
|
).returns(Courier::NotificationTemplateResponse)
|
|
23
23
|
end
|
|
24
24
|
def create(
|
|
25
|
-
# Body param:
|
|
26
|
-
# under a `notification` key
|
|
25
|
+
# Body param: Template fields accepted in POST and PUT request bodies, nested
|
|
26
|
+
# under a `notification` key.
|
|
27
27
|
notification:,
|
|
28
28
|
# Body param: Template state after creation. Case-insensitive input, normalized to
|
|
29
29
|
# uppercase in the response. Defaults to "DRAFT".
|
|
@@ -259,7 +259,7 @@ module Courier
|
|
|
259
259
|
sig do
|
|
260
260
|
params(
|
|
261
261
|
id: String,
|
|
262
|
-
notification: Courier::
|
|
262
|
+
notification: Courier::NotificationTemplateWritePayload::OrHash,
|
|
263
263
|
state: Courier::NotificationTemplateUpdateRequest::State::OrSymbol,
|
|
264
264
|
request_options: Courier::RequestOptions::OrHash
|
|
265
265
|
).returns(Courier::NotificationTemplateResponse)
|
|
@@ -267,8 +267,8 @@ module Courier
|
|
|
267
267
|
def replace(
|
|
268
268
|
# Template ID (nt\_ prefix).
|
|
269
269
|
id,
|
|
270
|
-
#
|
|
271
|
-
# `notification` key
|
|
270
|
+
# Template fields accepted in POST and PUT request bodies, nested under a
|
|
271
|
+
# `notification` key.
|
|
272
272
|
notification:,
|
|
273
273
|
# Template state after update. Case-insensitive input, normalized to uppercase in
|
|
274
274
|
# the response. Defaults to "DRAFT".
|
|
@@ -6,7 +6,8 @@ module Courier
|
|
|
6
6
|
# across every channel you have configured.
|
|
7
7
|
class Send
|
|
8
8
|
# Sends a message to one or more recipients and returns a requestId. Courier
|
|
9
|
-
# routes it to email, SMS, push, chat, or in-app based on your rules.
|
|
9
|
+
# routes it to email, SMS, push, chat, or in-app based on your rules. Use the
|
|
10
|
+
# returned requestId to look up delivery status via the Messages API.
|
|
10
11
|
sig do
|
|
11
12
|
params(
|
|
12
13
|
message: Courier::SendMessageParams::Message::OrHash,
|
data/sig/courier/client.rbs
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type bulk_add_users_params =
|
|
4
|
+
{ job_id: String, users: ::Array[Courier::InboundBulkMessageUser] }
|
|
5
|
+
& Courier::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class BulkAddUsersParams < Courier::Internal::Type::BaseModel
|
|
8
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Courier::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_accessor job_id: String
|
|
12
|
+
|
|
13
|
+
attr_accessor users: ::Array[Courier::InboundBulkMessageUser]
|
|
14
|
+
|
|
15
|
+
def initialize: (
|
|
16
|
+
job_id: String,
|
|
17
|
+
users: ::Array[Courier::InboundBulkMessageUser],
|
|
18
|
+
?request_options: Courier::request_opts
|
|
19
|
+
) -> void
|
|
20
|
+
|
|
21
|
+
def to_hash: -> {
|
|
22
|
+
job_id: String,
|
|
23
|
+
users: ::Array[Courier::InboundBulkMessageUser],
|
|
24
|
+
request_options: Courier::RequestOptions
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type bulk_create_job_params =
|
|
4
|
+
{ message: Courier::InboundBulkMessage }
|
|
5
|
+
& Courier::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class BulkCreateJobParams < Courier::Internal::Type::BaseModel
|
|
8
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Courier::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_accessor message: Courier::InboundBulkMessage
|
|
12
|
+
|
|
13
|
+
def initialize: (
|
|
14
|
+
message: Courier::InboundBulkMessage,
|
|
15
|
+
?request_options: Courier::request_opts
|
|
16
|
+
) -> void
|
|
17
|
+
|
|
18
|
+
def to_hash: -> {
|
|
19
|
+
message: Courier::InboundBulkMessage,
|
|
20
|
+
request_options: Courier::RequestOptions
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type bulk_create_job_response = { job_id: String }
|
|
4
|
+
|
|
5
|
+
class BulkCreateJobResponse < Courier::Internal::Type::BaseModel
|
|
6
|
+
attr_accessor job_id: String
|
|
7
|
+
|
|
8
|
+
def initialize: (job_id: String) -> void
|
|
9
|
+
|
|
10
|
+
def to_hash: -> { job_id: String }
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type bulk_list_users_params =
|
|
4
|
+
{ job_id: String, cursor: String? }
|
|
5
|
+
& Courier::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class BulkListUsersParams < Courier::Internal::Type::BaseModel
|
|
8
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Courier::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_accessor job_id: String
|
|
12
|
+
|
|
13
|
+
attr_accessor cursor: String?
|
|
14
|
+
|
|
15
|
+
def initialize: (
|
|
16
|
+
job_id: String,
|
|
17
|
+
?cursor: String?,
|
|
18
|
+
?request_options: Courier::request_opts
|
|
19
|
+
) -> void
|
|
20
|
+
|
|
21
|
+
def to_hash: -> {
|
|
22
|
+
job_id: String,
|
|
23
|
+
cursor: String?,
|
|
24
|
+
request_options: Courier::RequestOptions
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type bulk_list_users_response =
|
|
4
|
+
{
|
|
5
|
+
items: ::Array[Courier::Models::BulkListUsersResponse::Item],
|
|
6
|
+
paging: Courier::Paging
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
class BulkListUsersResponse < Courier::Internal::Type::BaseModel
|
|
10
|
+
attr_accessor items: ::Array[Courier::Models::BulkListUsersResponse::Item]
|
|
11
|
+
|
|
12
|
+
attr_accessor paging: Courier::Paging
|
|
13
|
+
|
|
14
|
+
def initialize: (
|
|
15
|
+
items: ::Array[Courier::Models::BulkListUsersResponse::Item],
|
|
16
|
+
paging: Courier::Paging
|
|
17
|
+
) -> void
|
|
18
|
+
|
|
19
|
+
def to_hash: -> {
|
|
20
|
+
items: ::Array[Courier::Models::BulkListUsersResponse::Item],
|
|
21
|
+
paging: Courier::Paging
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type item =
|
|
25
|
+
{
|
|
26
|
+
status: Courier::Models::BulkListUsersResponse::Item::status,
|
|
27
|
+
message_id: String?
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
class Item < Courier::Models::InboundBulkMessageUser
|
|
31
|
+
def status: -> Courier::Models::BulkListUsersResponse::Item::status
|
|
32
|
+
|
|
33
|
+
def status=: (
|
|
34
|
+
Courier::Models::BulkListUsersResponse::Item::status _
|
|
35
|
+
) -> Courier::Models::BulkListUsersResponse::Item::status
|
|
36
|
+
|
|
37
|
+
def message_id: -> String?
|
|
38
|
+
|
|
39
|
+
def message_id=: (String? _) -> String?
|
|
40
|
+
|
|
41
|
+
def initialize: (
|
|
42
|
+
status: Courier::Models::BulkListUsersResponse::Item::status,
|
|
43
|
+
?message_id: String?
|
|
44
|
+
) -> void
|
|
45
|
+
|
|
46
|
+
def to_hash: -> {
|
|
47
|
+
status: Courier::Models::BulkListUsersResponse::Item::status,
|
|
48
|
+
message_id: String?
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
type status = :PENDING | :ENQUEUED | :ERROR
|
|
52
|
+
|
|
53
|
+
module Status
|
|
54
|
+
extend Courier::Internal::Type::Enum
|
|
55
|
+
|
|
56
|
+
PENDING: :PENDING
|
|
57
|
+
ENQUEUED: :ENQUEUED
|
|
58
|
+
ERROR: :ERROR
|
|
59
|
+
|
|
60
|
+
def self?.values: -> ::Array[Courier::Models::BulkListUsersResponse::Item::status]
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type bulk_retrieve_job_params =
|
|
4
|
+
{ job_id: String } & Courier::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class BulkRetrieveJobParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
attr_accessor job_id: String
|
|
11
|
+
|
|
12
|
+
def initialize: (
|
|
13
|
+
job_id: String,
|
|
14
|
+
?request_options: Courier::request_opts
|
|
15
|
+
) -> void
|
|
16
|
+
|
|
17
|
+
def to_hash: -> {
|
|
18
|
+
job_id: String,
|
|
19
|
+
request_options: Courier::RequestOptions
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type bulk_retrieve_job_response =
|
|
4
|
+
{ job: Courier::Models::BulkRetrieveJobResponse::Job }
|
|
5
|
+
|
|
6
|
+
class BulkRetrieveJobResponse < Courier::Internal::Type::BaseModel
|
|
7
|
+
attr_accessor job: Courier::Models::BulkRetrieveJobResponse::Job
|
|
8
|
+
|
|
9
|
+
def initialize: (
|
|
10
|
+
job: Courier::Models::BulkRetrieveJobResponse::Job
|
|
11
|
+
) -> void
|
|
12
|
+
|
|
13
|
+
def to_hash: -> { job: Courier::Models::BulkRetrieveJobResponse::Job }
|
|
14
|
+
|
|
15
|
+
type job =
|
|
16
|
+
{
|
|
17
|
+
definition: Courier::InboundBulkMessage,
|
|
18
|
+
enqueued: Integer,
|
|
19
|
+
failures: Integer,
|
|
20
|
+
received: Integer,
|
|
21
|
+
status: Courier::Models::BulkRetrieveJobResponse::Job::status
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
class Job < Courier::Internal::Type::BaseModel
|
|
25
|
+
attr_accessor definition: Courier::InboundBulkMessage
|
|
26
|
+
|
|
27
|
+
attr_accessor enqueued: Integer
|
|
28
|
+
|
|
29
|
+
attr_accessor failures: Integer
|
|
30
|
+
|
|
31
|
+
attr_accessor received: Integer
|
|
32
|
+
|
|
33
|
+
attr_accessor status: Courier::Models::BulkRetrieveJobResponse::Job::status
|
|
34
|
+
|
|
35
|
+
def initialize: (
|
|
36
|
+
definition: Courier::InboundBulkMessage,
|
|
37
|
+
enqueued: Integer,
|
|
38
|
+
failures: Integer,
|
|
39
|
+
received: Integer,
|
|
40
|
+
status: Courier::Models::BulkRetrieveJobResponse::Job::status
|
|
41
|
+
) -> void
|
|
42
|
+
|
|
43
|
+
def to_hash: -> {
|
|
44
|
+
definition: Courier::InboundBulkMessage,
|
|
45
|
+
enqueued: Integer,
|
|
46
|
+
failures: Integer,
|
|
47
|
+
received: Integer,
|
|
48
|
+
status: Courier::Models::BulkRetrieveJobResponse::Job::status
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
type status = :CREATED | :PROCESSING | :COMPLETED | :ERROR
|
|
52
|
+
|
|
53
|
+
module Status
|
|
54
|
+
extend Courier::Internal::Type::Enum
|
|
55
|
+
|
|
56
|
+
CREATED: :CREATED
|
|
57
|
+
PROCESSING: :PROCESSING
|
|
58
|
+
COMPLETED: :COMPLETED
|
|
59
|
+
ERROR: :ERROR
|
|
60
|
+
|
|
61
|
+
def self?.values: -> ::Array[Courier::Models::BulkRetrieveJobResponse::Job::status]
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type bulk_run_job_params =
|
|
4
|
+
{ job_id: String } & Courier::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class BulkRunJobParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
attr_accessor job_id: String
|
|
11
|
+
|
|
12
|
+
def initialize: (
|
|
13
|
+
job_id: String,
|
|
14
|
+
?request_options: Courier::request_opts
|
|
15
|
+
) -> void
|
|
16
|
+
|
|
17
|
+
def to_hash: -> {
|
|
18
|
+
job_id: String,
|
|
19
|
+
request_options: Courier::RequestOptions
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type inbound_bulk_message =
|
|
4
|
+
{
|
|
5
|
+
event: String,
|
|
6
|
+
brand: String?,
|
|
7
|
+
content: Courier::Models::InboundBulkMessage::content?,
|
|
8
|
+
data: ::Hash[Symbol, top]?,
|
|
9
|
+
locale: ::Hash[Symbol, ::Hash[Symbol, top]]?,
|
|
10
|
+
override: ::Hash[Symbol, top]?,
|
|
11
|
+
template: String?
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class InboundBulkMessage < Courier::Internal::Type::BaseModel
|
|
15
|
+
attr_accessor event: String
|
|
16
|
+
|
|
17
|
+
attr_accessor brand: String?
|
|
18
|
+
|
|
19
|
+
attr_accessor content: Courier::Models::InboundBulkMessage::content?
|
|
20
|
+
|
|
21
|
+
attr_accessor data: ::Hash[Symbol, top]?
|
|
22
|
+
|
|
23
|
+
attr_accessor locale: ::Hash[Symbol, ::Hash[Symbol, top]]?
|
|
24
|
+
|
|
25
|
+
attr_accessor override: ::Hash[Symbol, top]?
|
|
26
|
+
|
|
27
|
+
attr_accessor template: String?
|
|
28
|
+
|
|
29
|
+
def initialize: (
|
|
30
|
+
event: String,
|
|
31
|
+
?brand: String?,
|
|
32
|
+
?content: Courier::Models::InboundBulkMessage::content?,
|
|
33
|
+
?data: ::Hash[Symbol, top]?,
|
|
34
|
+
?locale: ::Hash[Symbol, ::Hash[Symbol, top]]?,
|
|
35
|
+
?override: ::Hash[Symbol, top]?,
|
|
36
|
+
?template: String?
|
|
37
|
+
) -> void
|
|
38
|
+
|
|
39
|
+
def to_hash: -> {
|
|
40
|
+
event: String,
|
|
41
|
+
brand: String?,
|
|
42
|
+
content: Courier::Models::InboundBulkMessage::content?,
|
|
43
|
+
data: ::Hash[Symbol, top]?,
|
|
44
|
+
locale: ::Hash[Symbol, ::Hash[Symbol, top]]?,
|
|
45
|
+
override: ::Hash[Symbol, top]?,
|
|
46
|
+
template: String?
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
type content = Courier::ElementalContentSugar | Courier::ElementalContent
|
|
50
|
+
|
|
51
|
+
module Content
|
|
52
|
+
extend Courier::Internal::Type::Union
|
|
53
|
+
|
|
54
|
+
def self?.variants: -> ::Array[Courier::Models::InboundBulkMessage::content]
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type inbound_bulk_message_user =
|
|
4
|
+
{
|
|
5
|
+
data: top,
|
|
6
|
+
preferences: Courier::RecipientPreferences?,
|
|
7
|
+
profile: ::Hash[Symbol, top]?,
|
|
8
|
+
recipient: String?,
|
|
9
|
+
to: Courier::UserRecipient?
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
class InboundBulkMessageUser < Courier::Internal::Type::BaseModel
|
|
13
|
+
attr_reader data: top?
|
|
14
|
+
|
|
15
|
+
def data=: (top) -> top
|
|
16
|
+
|
|
17
|
+
attr_accessor preferences: Courier::RecipientPreferences?
|
|
18
|
+
|
|
19
|
+
attr_accessor profile: ::Hash[Symbol, top]?
|
|
20
|
+
|
|
21
|
+
attr_accessor recipient: String?
|
|
22
|
+
|
|
23
|
+
attr_accessor to: Courier::UserRecipient?
|
|
24
|
+
|
|
25
|
+
def initialize: (
|
|
26
|
+
?data: top,
|
|
27
|
+
?preferences: Courier::RecipientPreferences?,
|
|
28
|
+
?profile: ::Hash[Symbol, top]?,
|
|
29
|
+
?recipient: String?,
|
|
30
|
+
?to: Courier::UserRecipient?
|
|
31
|
+
) -> void
|
|
32
|
+
|
|
33
|
+
def to_hash: -> {
|
|
34
|
+
data: top,
|
|
35
|
+
preferences: Courier::RecipientPreferences?,
|
|
36
|
+
profile: ::Hash[Symbol, top]?,
|
|
37
|
+
recipient: String?,
|
|
38
|
+
to: Courier::UserRecipient?
|
|
39
|
+
}
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type notification_template_alias = String | ::Array[String]
|
|
4
|
+
|
|
5
|
+
module NotificationTemplateAlias
|
|
6
|
+
extend Courier::Internal::Type::Union
|
|
7
|
+
|
|
8
|
+
def self?.variants: -> ::Array[Courier::Models::notification_template_alias]
|
|
9
|
+
|
|
10
|
+
StringArray: Courier::Internal::Type::Converter
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -2,12 +2,12 @@ module Courier
|
|
|
2
2
|
module Models
|
|
3
3
|
type notification_template_create_request =
|
|
4
4
|
{
|
|
5
|
-
notification: Courier::
|
|
5
|
+
notification: Courier::NotificationTemplateWritePayload,
|
|
6
6
|
state: Courier::Models::NotificationTemplateCreateRequest::state
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
class NotificationTemplateCreateRequest < Courier::Internal::Type::BaseModel
|
|
10
|
-
attr_accessor notification: Courier::
|
|
10
|
+
attr_accessor notification: Courier::NotificationTemplateWritePayload
|
|
11
11
|
|
|
12
12
|
attr_reader state: Courier::Models::NotificationTemplateCreateRequest::state?
|
|
13
13
|
|
|
@@ -16,12 +16,12 @@ module Courier
|
|
|
16
16
|
) -> Courier::Models::NotificationTemplateCreateRequest::state
|
|
17
17
|
|
|
18
18
|
def initialize: (
|
|
19
|
-
notification: Courier::
|
|
19
|
+
notification: Courier::NotificationTemplateWritePayload,
|
|
20
20
|
?state: Courier::Models::NotificationTemplateCreateRequest::state
|
|
21
21
|
) -> void
|
|
22
22
|
|
|
23
23
|
def to_hash: -> {
|
|
24
|
-
notification: Courier::
|
|
24
|
+
notification: Courier::NotificationTemplateWritePayload,
|
|
25
25
|
state: Courier::Models::NotificationTemplateCreateRequest::state
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -6,6 +6,7 @@ module Courier
|
|
|
6
6
|
created: Integer,
|
|
7
7
|
creator: String,
|
|
8
8
|
state: Courier::Models::NotificationTemplateResponse::state,
|
|
9
|
+
alias_: Courier::Models::notification_template_alias,
|
|
9
10
|
updated: Integer,
|
|
10
11
|
updater: String
|
|
11
12
|
}
|
|
@@ -29,6 +30,12 @@ module Courier
|
|
|
29
30
|
Courier::Models::NotificationTemplateResponse::state _
|
|
30
31
|
) -> Courier::Models::NotificationTemplateResponse::state
|
|
31
32
|
|
|
33
|
+
def alias_: -> Courier::Models::notification_template_alias?
|
|
34
|
+
|
|
35
|
+
def alias_=: (
|
|
36
|
+
Courier::Models::notification_template_alias _
|
|
37
|
+
) -> Courier::Models::notification_template_alias
|
|
38
|
+
|
|
32
39
|
def updated: -> Integer?
|
|
33
40
|
|
|
34
41
|
def updated=: (Integer _) -> Integer
|
|
@@ -42,6 +49,7 @@ module Courier
|
|
|
42
49
|
created: Integer,
|
|
43
50
|
creator: String,
|
|
44
51
|
state: Courier::Models::NotificationTemplateResponse::state,
|
|
52
|
+
?alias_: Courier::Models::notification_template_alias,
|
|
45
53
|
?updated: Integer,
|
|
46
54
|
?updater: String
|
|
47
55
|
) -> void
|
|
@@ -51,6 +59,7 @@ module Courier
|
|
|
51
59
|
created: Integer,
|
|
52
60
|
creator: String,
|
|
53
61
|
state: Courier::Models::NotificationTemplateResponse::state,
|
|
62
|
+
alias_: Courier::Models::notification_template_alias,
|
|
54
63
|
updated: Integer,
|
|
55
64
|
updater: String
|
|
56
65
|
}
|
|
@@ -2,12 +2,12 @@ module Courier
|
|
|
2
2
|
module Models
|
|
3
3
|
type notification_template_update_request =
|
|
4
4
|
{
|
|
5
|
-
notification: Courier::
|
|
5
|
+
notification: Courier::NotificationTemplateWritePayload,
|
|
6
6
|
state: Courier::Models::NotificationTemplateUpdateRequest::state
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
class NotificationTemplateUpdateRequest < Courier::Internal::Type::BaseModel
|
|
10
|
-
attr_accessor notification: Courier::
|
|
10
|
+
attr_accessor notification: Courier::NotificationTemplateWritePayload
|
|
11
11
|
|
|
12
12
|
attr_reader state: Courier::Models::NotificationTemplateUpdateRequest::state?
|
|
13
13
|
|
|
@@ -16,12 +16,12 @@ module Courier
|
|
|
16
16
|
) -> Courier::Models::NotificationTemplateUpdateRequest::state
|
|
17
17
|
|
|
18
18
|
def initialize: (
|
|
19
|
-
notification: Courier::
|
|
19
|
+
notification: Courier::NotificationTemplateWritePayload,
|
|
20
20
|
?state: Courier::Models::NotificationTemplateUpdateRequest::state
|
|
21
21
|
) -> void
|
|
22
22
|
|
|
23
23
|
def to_hash: -> {
|
|
24
|
-
notification: Courier::
|
|
24
|
+
notification: Courier::NotificationTemplateWritePayload,
|
|
25
25
|
state: Courier::Models::NotificationTemplateUpdateRequest::state
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type notification_template_write_payload = { alias_: String? }
|
|
4
|
+
|
|
5
|
+
class NotificationTemplateWritePayload < Courier::Models::NotificationTemplatePayload
|
|
6
|
+
def alias_: -> String?
|
|
7
|
+
|
|
8
|
+
def alias_=: (String? _) -> String?
|
|
9
|
+
|
|
10
|
+
def initialize: (?alias_: String?) -> void
|
|
11
|
+
|
|
12
|
+
def to_hash: -> { alias_: String? }
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|