trycourier 6.9.0 → 6.11.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 +14 -0
- data/README.md +1 -1
- data/lib/courier/client.rb +6 -0
- data/lib/courier/models/create_device_set_request.rb +27 -0
- data/lib/courier/models/device_set.rb +63 -0
- data/lib/courier/models/device_set_list_response.rb +18 -0
- data/lib/courier/models/notifications/previews/create_preview_run_request.rb +68 -0
- data/lib/courier/models/notifications/previews/preview_result.rb +67 -0
- data/lib/courier/models/notifications/previews/preview_result_failure_reason.rb +24 -0
- data/lib/courier/models/notifications/previews/preview_result_status.rb +29 -0
- data/lib/courier/models/notifications/previews/preview_run.rb +84 -0
- data/lib/courier/models/notifications/previews/preview_run_detail.rb +93 -0
- data/lib/courier/models/notifications/previews/preview_run_failure_reason.rb +28 -0
- data/lib/courier/models/notifications/previews/preview_run_list_response.rb +30 -0
- data/lib/courier/models/notifications/previews/preview_run_status.rb +28 -0
- data/lib/courier/models/notifications/previews/run_create_params.rb +36 -0
- data/lib/courier/models/notifications/previews/run_list_params.rb +41 -0
- data/lib/courier/models/notifications/previews/run_retrieve_params.rb +30 -0
- data/lib/courier/models/preference_change_log_entry.rb +94 -0
- data/lib/courier/models/preference_change_log_value.rb +32 -0
- data/lib/courier/models/preference_logs_list_response.rb +24 -0
- data/lib/courier/models/preview_archive_device_set_params.rb +20 -0
- data/lib/courier/models/preview_create_device_set_params.rb +14 -0
- data/lib/courier/models/preview_device.rb +125 -0
- data/lib/courier/models/preview_device_list_response.rb +18 -0
- data/lib/courier/models/preview_list_device_sets_params.rb +14 -0
- data/lib/courier/models/preview_list_devices_params.rb +14 -0
- data/lib/courier/models/preview_retrieve_device_set_params.rb +20 -0
- data/lib/courier/models/preview_update_device_set_params.rb +20 -0
- data/lib/courier/models/workspace_preference_list_logs_params.rb +61 -0
- data/lib/courier/models.rb +30 -0
- data/lib/courier/resources/notifications/previews/runs.rb +148 -0
- data/lib/courier/resources/notifications/previews.rb +22 -0
- data/lib/courier/resources/notifications.rb +4 -0
- data/lib/courier/resources/previews.rb +153 -0
- data/lib/courier/resources/workspace_preferences.rb +37 -0
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +30 -0
- data/rbi/courier/client.rbi +5 -0
- data/rbi/courier/models/create_device_set_request.rbi +39 -0
- data/rbi/courier/models/device_set.rbi +81 -0
- data/rbi/courier/models/device_set_list_response.rbi +28 -0
- data/rbi/courier/models/notifications/previews/create_preview_run_request.rbi +110 -0
- data/rbi/courier/models/notifications/previews/preview_result.rbi +117 -0
- data/rbi/courier/models/notifications/previews/preview_result_failure_reason.rbi +44 -0
- data/rbi/courier/models/notifications/previews/preview_result_status.rbi +69 -0
- data/rbi/courier/models/notifications/previews/preview_run.rbi +134 -0
- data/rbi/courier/models/notifications/previews/preview_run_detail.rbi +148 -0
- data/rbi/courier/models/notifications/previews/preview_run_failure_reason.rbi +64 -0
- data/rbi/courier/models/notifications/previews/preview_run_list_response.rbi +54 -0
- data/rbi/courier/models/notifications/previews/preview_run_status.rbi +61 -0
- data/rbi/courier/models/notifications/previews/run_create_params.rbi +66 -0
- data/rbi/courier/models/notifications/previews/run_list_params.rbi +67 -0
- data/rbi/courier/models/notifications/previews/run_retrieve_params.rbi +50 -0
- data/rbi/courier/models/preference_change_log_entry.rbi +122 -0
- data/rbi/courier/models/preference_change_log_value.rbi +54 -0
- data/rbi/courier/models/preference_logs_list_response.rbi +46 -0
- data/rbi/courier/models/preview_archive_device_set_params.rbi +38 -0
- data/rbi/courier/models/preview_create_device_set_params.rbi +30 -0
- data/rbi/courier/models/preview_device.rbi +168 -0
- data/rbi/courier/models/preview_device_list_response.rbi +28 -0
- data/rbi/courier/models/preview_list_device_sets_params.rbi +30 -0
- data/rbi/courier/models/preview_list_devices_params.rbi +27 -0
- data/rbi/courier/models/preview_retrieve_device_set_params.rbi +38 -0
- data/rbi/courier/models/preview_update_device_set_params.rbi +38 -0
- data/rbi/courier/models/workspace_preference_list_logs_params.rbi +101 -0
- data/rbi/courier/models.rbi +32 -0
- data/rbi/courier/resources/notifications/previews/runs.rbi +136 -0
- data/rbi/courier/resources/notifications/previews.rbi +19 -0
- data/rbi/courier/resources/notifications.rbi +3 -0
- data/rbi/courier/resources/previews.rbi +106 -0
- data/rbi/courier/resources/workspace_preferences.rbi +33 -0
- data/sig/courier/client.rbs +2 -0
- data/sig/courier/models/create_device_set_request.rbs +16 -0
- data/sig/courier/models/device_set.rbs +47 -0
- data/sig/courier/models/device_set_list_response.rbs +13 -0
- data/sig/courier/models/notifications/previews/create_preview_run_request.rbs +54 -0
- data/sig/courier/models/notifications/previews/preview_result.rbs +50 -0
- data/sig/courier/models/notifications/previews/preview_result_failure_reason.rbs +19 -0
- data/sig/courier/models/notifications/previews/preview_result_status.rbs +30 -0
- data/sig/courier/models/notifications/previews/preview_run.rbs +62 -0
- data/sig/courier/models/notifications/previews/preview_run_detail.rbs +67 -0
- data/sig/courier/models/notifications/previews/preview_run_failure_reason.rbs +28 -0
- data/sig/courier/models/notifications/previews/preview_run_list_response.rbs +31 -0
- data/sig/courier/models/notifications/previews/preview_run_status.rbs +24 -0
- data/sig/courier/models/notifications/previews/run_create_params.rbs +46 -0
- data/sig/courier/models/notifications/previews/run_list_params.rbs +38 -0
- data/sig/courier/models/notifications/previews/run_retrieve_params.rbs +32 -0
- data/sig/courier/models/preference_change_log_entry.rbs +71 -0
- data/sig/courier/models/preference_change_log_value.rbs +30 -0
- data/sig/courier/models/preference_logs_list_response.rbs +25 -0
- data/sig/courier/models/preview_archive_device_set_params.rbs +23 -0
- data/sig/courier/models/preview_create_device_set_params.rbs +15 -0
- data/sig/courier/models/preview_device.rbs +83 -0
- data/sig/courier/models/preview_device_list_response.rbs +14 -0
- data/sig/courier/models/preview_list_device_sets_params.rbs +15 -0
- data/sig/courier/models/preview_list_devices_params.rbs +15 -0
- data/sig/courier/models/preview_retrieve_device_set_params.rbs +23 -0
- data/sig/courier/models/preview_update_device_set_params.rbs +25 -0
- data/sig/courier/models/workspace_preference_list_logs_params.rbs +56 -0
- data/sig/courier/models.rbs +30 -0
- data/sig/courier/resources/notifications/previews/runs.rbs +36 -0
- data/sig/courier/resources/notifications/previews.rbs +11 -0
- data/sig/courier/resources/notifications.rbs +2 -0
- data/sig/courier/resources/previews.rbs +38 -0
- data/sig/courier/resources/workspace_preferences.rbs +9 -0
- metadata +91 -1
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Resources
|
|
5
|
+
# Render a template's email content on real email clients and read back the
|
|
6
|
+
# screenshots, so you can check how it looks before you send it.
|
|
7
|
+
class Previews
|
|
8
|
+
# Archive a device set. This is a soft delete — the archived set is returned and
|
|
9
|
+
# no longer appears in list results. Runs already created against it keep their
|
|
10
|
+
# own copy of the device list and are unaffected. The Courier-provided default set
|
|
11
|
+
# cannot be archived and returns 409.
|
|
12
|
+
sig do
|
|
13
|
+
params(
|
|
14
|
+
device_set_id: String,
|
|
15
|
+
request_options: Courier::RequestOptions::OrHash
|
|
16
|
+
).returns(Courier::DeviceSet)
|
|
17
|
+
end
|
|
18
|
+
def archive_device_set(
|
|
19
|
+
# The preview set to archive.
|
|
20
|
+
device_set_id,
|
|
21
|
+
request_options: {}
|
|
22
|
+
)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Create a named, reusable set of preview devices. Every id must be one listed by
|
|
26
|
+
# `GET /previews/devices`; any other is a 422.
|
|
27
|
+
sig do
|
|
28
|
+
params(
|
|
29
|
+
device_ids: T::Array[String],
|
|
30
|
+
name: String,
|
|
31
|
+
request_options: Courier::RequestOptions::OrHash
|
|
32
|
+
).returns(Courier::DeviceSet)
|
|
33
|
+
end
|
|
34
|
+
def create_device_set(
|
|
35
|
+
# The devices the set contains, by `PreviewDevice.id`. At least one is required.
|
|
36
|
+
device_ids:,
|
|
37
|
+
# Human-readable name.
|
|
38
|
+
name:,
|
|
39
|
+
request_options: {}
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# List the workspace's preview sets. Archived sets are not returned.
|
|
44
|
+
sig do
|
|
45
|
+
params(request_options: Courier::RequestOptions::OrHash).returns(
|
|
46
|
+
Courier::DeviceSetListResponse
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
def list_device_sets(request_options: {})
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# List the devices a preview can be rendered on. Reference data, identical for
|
|
53
|
+
# every workspace — these ids are what a device set is built from and what a run
|
|
54
|
+
# reports results for.
|
|
55
|
+
sig do
|
|
56
|
+
params(request_options: Courier::RequestOptions::OrHash).returns(
|
|
57
|
+
Courier::PreviewDeviceListResponse
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
def list_devices(request_options: {})
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Retrieve a preview set by ID. Archived sets return 404.
|
|
64
|
+
sig do
|
|
65
|
+
params(
|
|
66
|
+
device_set_id: String,
|
|
67
|
+
request_options: Courier::RequestOptions::OrHash
|
|
68
|
+
).returns(Courier::DeviceSet)
|
|
69
|
+
end
|
|
70
|
+
def retrieve_device_set(
|
|
71
|
+
# The preview set to retrieve, identified by the `id` returned when it was
|
|
72
|
+
# created.
|
|
73
|
+
device_set_id,
|
|
74
|
+
request_options: {}
|
|
75
|
+
)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Replace a device set. This is a full replace, not a patch — both the name and
|
|
79
|
+
# the device list are always written. The Courier-provided default set cannot be
|
|
80
|
+
# changed and returns 409.
|
|
81
|
+
sig do
|
|
82
|
+
params(
|
|
83
|
+
device_set_id: String,
|
|
84
|
+
device_ids: T::Array[String],
|
|
85
|
+
name: String,
|
|
86
|
+
request_options: Courier::RequestOptions::OrHash
|
|
87
|
+
).returns(Courier::DeviceSet)
|
|
88
|
+
end
|
|
89
|
+
def update_device_set(
|
|
90
|
+
# The preview set to replace.
|
|
91
|
+
device_set_id,
|
|
92
|
+
# The devices the set contains, by `PreviewDevice.id`. At least one is required.
|
|
93
|
+
device_ids:,
|
|
94
|
+
# Human-readable name.
|
|
95
|
+
name:,
|
|
96
|
+
request_options: {}
|
|
97
|
+
)
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# @api private
|
|
101
|
+
sig { params(client: Courier::Client).returns(T.attached_class) }
|
|
102
|
+
def self.new(client:)
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
@@ -90,6 +90,39 @@ module Courier
|
|
|
90
90
|
)
|
|
91
91
|
end
|
|
92
92
|
|
|
93
|
+
# Returns the history of preference changes in this environment, newest first.
|
|
94
|
+
# Each entry records one change a user made to one subscription topic, and carries
|
|
95
|
+
# the value before it where there was one. Supply user_id to read a single user's
|
|
96
|
+
# history instead of the whole environment.
|
|
97
|
+
sig do
|
|
98
|
+
params(
|
|
99
|
+
cursor: String,
|
|
100
|
+
limit: Integer,
|
|
101
|
+
since: String,
|
|
102
|
+
tenant_id: String,
|
|
103
|
+
user_id: String,
|
|
104
|
+
request_options: Courier::RequestOptions::OrHash
|
|
105
|
+
).returns(Courier::PreferenceLogsListResponse)
|
|
106
|
+
end
|
|
107
|
+
def list_logs(
|
|
108
|
+
# A cursor from a previous response's paging.cursor. Continue only while
|
|
109
|
+
# paging.more is true; the cursor is omitted on the last page.
|
|
110
|
+
cursor: nil,
|
|
111
|
+
# How many entries to return. Defaults to 25.
|
|
112
|
+
limit: nil,
|
|
113
|
+
# Return only changes at or after this time, as an ISO-8601 date or date-time. A
|
|
114
|
+
# date alone is read as the start of that day in UTC.
|
|
115
|
+
since: nil,
|
|
116
|
+
# Narrow to the changes this user made in one tenant context. Only valid together
|
|
117
|
+
# with user_id.
|
|
118
|
+
tenant_id: nil,
|
|
119
|
+
# Return only this user's changes. Omit it to read every change in the
|
|
120
|
+
# environment.
|
|
121
|
+
user_id: nil,
|
|
122
|
+
request_options: {}
|
|
123
|
+
)
|
|
124
|
+
end
|
|
125
|
+
|
|
93
126
|
# Publishes the workspace preference page, snapshotting every preference and
|
|
94
127
|
# topic, and returns the page id and a preview URL.
|
|
95
128
|
sig do
|
data/sig/courier/client.rbs
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type create_device_set_request =
|
|
4
|
+
{ device_ids: ::Array[String], name: String }
|
|
5
|
+
|
|
6
|
+
class CreateDeviceSetRequest < Courier::Internal::Type::BaseModel
|
|
7
|
+
attr_accessor device_ids: ::Array[String]
|
|
8
|
+
|
|
9
|
+
attr_accessor name: String
|
|
10
|
+
|
|
11
|
+
def initialize: (device_ids: ::Array[String], name: String) -> void
|
|
12
|
+
|
|
13
|
+
def to_hash: -> { device_ids: ::Array[String], name: String }
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type device_set =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
created_at: String,
|
|
7
|
+
device_ids: ::Array[String],
|
|
8
|
+
name: String,
|
|
9
|
+
updated_at: String,
|
|
10
|
+
archived_at: String
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class DeviceSet < Courier::Internal::Type::BaseModel
|
|
14
|
+
attr_accessor id: String
|
|
15
|
+
|
|
16
|
+
attr_accessor created_at: String
|
|
17
|
+
|
|
18
|
+
attr_accessor device_ids: ::Array[String]
|
|
19
|
+
|
|
20
|
+
attr_accessor name: String
|
|
21
|
+
|
|
22
|
+
attr_accessor updated_at: String
|
|
23
|
+
|
|
24
|
+
attr_reader archived_at: String?
|
|
25
|
+
|
|
26
|
+
def archived_at=: (String) -> String
|
|
27
|
+
|
|
28
|
+
def initialize: (
|
|
29
|
+
id: String,
|
|
30
|
+
created_at: String,
|
|
31
|
+
device_ids: ::Array[String],
|
|
32
|
+
name: String,
|
|
33
|
+
updated_at: String,
|
|
34
|
+
?archived_at: String
|
|
35
|
+
) -> void
|
|
36
|
+
|
|
37
|
+
def to_hash: -> {
|
|
38
|
+
id: String,
|
|
39
|
+
created_at: String,
|
|
40
|
+
device_ids: ::Array[String],
|
|
41
|
+
name: String,
|
|
42
|
+
updated_at: String,
|
|
43
|
+
archived_at: String
|
|
44
|
+
}
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type device_set_list_response = { results: ::Array[Courier::DeviceSet] }
|
|
4
|
+
|
|
5
|
+
class DeviceSetListResponse < Courier::Internal::Type::BaseModel
|
|
6
|
+
attr_accessor results: ::Array[Courier::DeviceSet]
|
|
7
|
+
|
|
8
|
+
def initialize: (results: ::Array[Courier::DeviceSet]) -> void
|
|
9
|
+
|
|
10
|
+
def to_hash: -> { results: ::Array[Courier::DeviceSet] }
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
module Notifications
|
|
4
|
+
module Previews
|
|
5
|
+
type create_preview_run_request =
|
|
6
|
+
{
|
|
7
|
+
data: ::Hash[Symbol, top],
|
|
8
|
+
device_ids: ::Array[String],
|
|
9
|
+
device_set_id: String,
|
|
10
|
+
locale: String,
|
|
11
|
+
template_version: String
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class CreatePreviewRunRequest < Courier::Internal::Type::BaseModel
|
|
15
|
+
attr_reader data: ::Hash[Symbol, top]?
|
|
16
|
+
|
|
17
|
+
def data=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
|
18
|
+
|
|
19
|
+
attr_reader device_ids: ::Array[String]?
|
|
20
|
+
|
|
21
|
+
def device_ids=: (::Array[String]) -> ::Array[String]
|
|
22
|
+
|
|
23
|
+
attr_reader device_set_id: String?
|
|
24
|
+
|
|
25
|
+
def device_set_id=: (String) -> String
|
|
26
|
+
|
|
27
|
+
attr_reader locale: String?
|
|
28
|
+
|
|
29
|
+
def locale=: (String) -> String
|
|
30
|
+
|
|
31
|
+
attr_reader template_version: String?
|
|
32
|
+
|
|
33
|
+
def template_version=: (String) -> String
|
|
34
|
+
|
|
35
|
+
def initialize: (
|
|
36
|
+
?data: ::Hash[Symbol, top],
|
|
37
|
+
?device_ids: ::Array[String],
|
|
38
|
+
?device_set_id: String,
|
|
39
|
+
?locale: String,
|
|
40
|
+
?template_version: String
|
|
41
|
+
) -> void
|
|
42
|
+
|
|
43
|
+
def to_hash: -> {
|
|
44
|
+
data: ::Hash[Symbol, top],
|
|
45
|
+
device_ids: ::Array[String],
|
|
46
|
+
device_set_id: String,
|
|
47
|
+
locale: String,
|
|
48
|
+
template_version: String
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
module Notifications
|
|
4
|
+
class PreviewResult = Previews::PreviewResult
|
|
5
|
+
|
|
6
|
+
module Previews
|
|
7
|
+
type preview_result =
|
|
8
|
+
{
|
|
9
|
+
device_id: String,
|
|
10
|
+
screenshot_url: String?,
|
|
11
|
+
status: Courier::Models::Notifications::Previews::preview_result_status,
|
|
12
|
+
thumbnail_url: String?,
|
|
13
|
+
failure_reason: Courier::Models::Notifications::Previews::preview_result_failure_reason
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
class PreviewResult < Courier::Internal::Type::BaseModel
|
|
17
|
+
attr_accessor device_id: String
|
|
18
|
+
|
|
19
|
+
attr_accessor screenshot_url: String?
|
|
20
|
+
|
|
21
|
+
attr_accessor status: Courier::Models::Notifications::Previews::preview_result_status
|
|
22
|
+
|
|
23
|
+
attr_accessor thumbnail_url: String?
|
|
24
|
+
|
|
25
|
+
attr_reader failure_reason: Courier::Models::Notifications::Previews::preview_result_failure_reason?
|
|
26
|
+
|
|
27
|
+
def failure_reason=: (
|
|
28
|
+
Courier::Models::Notifications::Previews::preview_result_failure_reason
|
|
29
|
+
) -> Courier::Models::Notifications::Previews::preview_result_failure_reason
|
|
30
|
+
|
|
31
|
+
def initialize: (
|
|
32
|
+
device_id: String,
|
|
33
|
+
screenshot_url: String?,
|
|
34
|
+
status: Courier::Models::Notifications::Previews::preview_result_status,
|
|
35
|
+
thumbnail_url: String?,
|
|
36
|
+
?failure_reason: Courier::Models::Notifications::Previews::preview_result_failure_reason
|
|
37
|
+
) -> void
|
|
38
|
+
|
|
39
|
+
def to_hash: -> {
|
|
40
|
+
device_id: String,
|
|
41
|
+
screenshot_url: String?,
|
|
42
|
+
status: Courier::Models::Notifications::Previews::preview_result_status,
|
|
43
|
+
thumbnail_url: String?,
|
|
44
|
+
failure_reason: Courier::Models::Notifications::Previews::preview_result_failure_reason
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
module Notifications
|
|
4
|
+
module PreviewResultFailureReason = Previews::PreviewResultFailureReason
|
|
5
|
+
|
|
6
|
+
module Previews
|
|
7
|
+
type preview_result_failure_reason = :DELIVERY_FAILED
|
|
8
|
+
|
|
9
|
+
module PreviewResultFailureReason
|
|
10
|
+
extend Courier::Internal::Type::Enum
|
|
11
|
+
|
|
12
|
+
DELIVERY_FAILED: :DELIVERY_FAILED
|
|
13
|
+
|
|
14
|
+
def self?.values: -> ::Array[Courier::Models::Notifications::Previews::preview_result_failure_reason]
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
module Notifications
|
|
4
|
+
module PreviewResultStatus = Previews::PreviewResultStatus
|
|
5
|
+
|
|
6
|
+
module Previews
|
|
7
|
+
type preview_result_status =
|
|
8
|
+
:PENDING
|
|
9
|
+
| :PROCESSING
|
|
10
|
+
| :COMPLETED
|
|
11
|
+
| :UNSUPPORTED
|
|
12
|
+
| :TIMED_OUT
|
|
13
|
+
| :FAILED
|
|
14
|
+
|
|
15
|
+
module PreviewResultStatus
|
|
16
|
+
extend Courier::Internal::Type::Enum
|
|
17
|
+
|
|
18
|
+
PENDING: :PENDING
|
|
19
|
+
PROCESSING: :PROCESSING
|
|
20
|
+
COMPLETED: :COMPLETED
|
|
21
|
+
UNSUPPORTED: :UNSUPPORTED
|
|
22
|
+
TIMED_OUT: :TIMED_OUT
|
|
23
|
+
FAILED: :FAILED
|
|
24
|
+
|
|
25
|
+
def self?.values: -> ::Array[Courier::Models::Notifications::Previews::preview_result_status]
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
module Notifications
|
|
4
|
+
class PreviewRun = Previews::PreviewRun
|
|
5
|
+
|
|
6
|
+
module Previews
|
|
7
|
+
type preview_run =
|
|
8
|
+
{
|
|
9
|
+
id: String,
|
|
10
|
+
created_at: String,
|
|
11
|
+
device_ids: ::Array[String],
|
|
12
|
+
status: Courier::Models::Notifications::Previews::preview_run_status,
|
|
13
|
+
template_id: String,
|
|
14
|
+
failure_reason: Courier::Models::Notifications::Previews::preview_run_failure_reason,
|
|
15
|
+
template_version: String
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
class PreviewRun < Courier::Internal::Type::BaseModel
|
|
19
|
+
attr_accessor id: String
|
|
20
|
+
|
|
21
|
+
attr_accessor created_at: String
|
|
22
|
+
|
|
23
|
+
attr_accessor device_ids: ::Array[String]
|
|
24
|
+
|
|
25
|
+
attr_accessor status: Courier::Models::Notifications::Previews::preview_run_status
|
|
26
|
+
|
|
27
|
+
attr_accessor template_id: String
|
|
28
|
+
|
|
29
|
+
attr_reader failure_reason: Courier::Models::Notifications::Previews::preview_run_failure_reason?
|
|
30
|
+
|
|
31
|
+
def failure_reason=: (
|
|
32
|
+
Courier::Models::Notifications::Previews::preview_run_failure_reason
|
|
33
|
+
) -> Courier::Models::Notifications::Previews::preview_run_failure_reason
|
|
34
|
+
|
|
35
|
+
attr_reader template_version: String?
|
|
36
|
+
|
|
37
|
+
def template_version=: (String) -> String
|
|
38
|
+
|
|
39
|
+
def initialize: (
|
|
40
|
+
id: String,
|
|
41
|
+
created_at: String,
|
|
42
|
+
device_ids: ::Array[String],
|
|
43
|
+
status: Courier::Models::Notifications::Previews::preview_run_status,
|
|
44
|
+
template_id: String,
|
|
45
|
+
?failure_reason: Courier::Models::Notifications::Previews::preview_run_failure_reason,
|
|
46
|
+
?template_version: String
|
|
47
|
+
) -> void
|
|
48
|
+
|
|
49
|
+
def to_hash: -> {
|
|
50
|
+
id: String,
|
|
51
|
+
created_at: String,
|
|
52
|
+
device_ids: ::Array[String],
|
|
53
|
+
status: Courier::Models::Notifications::Previews::preview_run_status,
|
|
54
|
+
template_id: String,
|
|
55
|
+
failure_reason: Courier::Models::Notifications::Previews::preview_run_failure_reason,
|
|
56
|
+
template_version: String
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
module Notifications
|
|
4
|
+
class PreviewRunDetail = Previews::PreviewRunDetail
|
|
5
|
+
|
|
6
|
+
module Previews
|
|
7
|
+
type preview_run_detail =
|
|
8
|
+
{
|
|
9
|
+
id: String,
|
|
10
|
+
created_at: String,
|
|
11
|
+
device_ids: ::Array[String],
|
|
12
|
+
results: ::Array[Courier::Notifications::Previews::PreviewResult],
|
|
13
|
+
status: Courier::Models::Notifications::Previews::preview_run_status,
|
|
14
|
+
template_id: String,
|
|
15
|
+
failure_reason: Courier::Models::Notifications::Previews::preview_run_failure_reason,
|
|
16
|
+
template_version: String
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
class PreviewRunDetail < Courier::Internal::Type::BaseModel
|
|
20
|
+
attr_accessor id: String
|
|
21
|
+
|
|
22
|
+
attr_accessor created_at: String
|
|
23
|
+
|
|
24
|
+
attr_accessor device_ids: ::Array[String]
|
|
25
|
+
|
|
26
|
+
attr_accessor results: ::Array[Courier::Notifications::Previews::PreviewResult]
|
|
27
|
+
|
|
28
|
+
attr_accessor status: Courier::Models::Notifications::Previews::preview_run_status
|
|
29
|
+
|
|
30
|
+
attr_accessor template_id: String
|
|
31
|
+
|
|
32
|
+
attr_reader failure_reason: Courier::Models::Notifications::Previews::preview_run_failure_reason?
|
|
33
|
+
|
|
34
|
+
def failure_reason=: (
|
|
35
|
+
Courier::Models::Notifications::Previews::preview_run_failure_reason
|
|
36
|
+
) -> Courier::Models::Notifications::Previews::preview_run_failure_reason
|
|
37
|
+
|
|
38
|
+
attr_reader template_version: String?
|
|
39
|
+
|
|
40
|
+
def template_version=: (String) -> String
|
|
41
|
+
|
|
42
|
+
def initialize: (
|
|
43
|
+
id: String,
|
|
44
|
+
created_at: String,
|
|
45
|
+
device_ids: ::Array[String],
|
|
46
|
+
results: ::Array[Courier::Notifications::Previews::PreviewResult],
|
|
47
|
+
status: Courier::Models::Notifications::Previews::preview_run_status,
|
|
48
|
+
template_id: String,
|
|
49
|
+
?failure_reason: Courier::Models::Notifications::Previews::preview_run_failure_reason,
|
|
50
|
+
?template_version: String
|
|
51
|
+
) -> void
|
|
52
|
+
|
|
53
|
+
def to_hash: -> {
|
|
54
|
+
id: String,
|
|
55
|
+
created_at: String,
|
|
56
|
+
device_ids: ::Array[String],
|
|
57
|
+
results: ::Array[Courier::Notifications::Previews::PreviewResult],
|
|
58
|
+
status: Courier::Models::Notifications::Previews::preview_run_status,
|
|
59
|
+
template_id: String,
|
|
60
|
+
failure_reason: Courier::Models::Notifications::Previews::preview_run_failure_reason,
|
|
61
|
+
template_version: String
|
|
62
|
+
}
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
module Notifications
|
|
4
|
+
module PreviewRunFailureReason = Previews::PreviewRunFailureReason
|
|
5
|
+
|
|
6
|
+
module Previews
|
|
7
|
+
type preview_run_failure_reason =
|
|
8
|
+
:TEMPLATE_NOT_SUPPORTED
|
|
9
|
+
| :NO_EMAIL_CHANNEL
|
|
10
|
+
| :RENDER_FAILED
|
|
11
|
+
| :ALL_DEVICES_UNSUPPORTED
|
|
12
|
+
| :VENDOR_ERROR
|
|
13
|
+
|
|
14
|
+
module PreviewRunFailureReason
|
|
15
|
+
extend Courier::Internal::Type::Enum
|
|
16
|
+
|
|
17
|
+
TEMPLATE_NOT_SUPPORTED: :TEMPLATE_NOT_SUPPORTED
|
|
18
|
+
NO_EMAIL_CHANNEL: :NO_EMAIL_CHANNEL
|
|
19
|
+
RENDER_FAILED: :RENDER_FAILED
|
|
20
|
+
ALL_DEVICES_UNSUPPORTED: :ALL_DEVICES_UNSUPPORTED
|
|
21
|
+
VENDOR_ERROR: :VENDOR_ERROR
|
|
22
|
+
|
|
23
|
+
def self?.values: -> ::Array[Courier::Models::Notifications::Previews::preview_run_failure_reason]
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
module Notifications
|
|
4
|
+
class PreviewRunListResponse = Previews::PreviewRunListResponse
|
|
5
|
+
|
|
6
|
+
module Previews
|
|
7
|
+
type preview_run_list_response =
|
|
8
|
+
{
|
|
9
|
+
paging: Courier::Paging,
|
|
10
|
+
results: ::Array[Courier::Notifications::Previews::PreviewRun]
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class PreviewRunListResponse < Courier::Internal::Type::BaseModel
|
|
14
|
+
attr_accessor paging: Courier::Paging
|
|
15
|
+
|
|
16
|
+
attr_accessor results: ::Array[Courier::Notifications::Previews::PreviewRun]
|
|
17
|
+
|
|
18
|
+
def initialize: (
|
|
19
|
+
paging: Courier::Paging,
|
|
20
|
+
results: ::Array[Courier::Notifications::Previews::PreviewRun]
|
|
21
|
+
) -> void
|
|
22
|
+
|
|
23
|
+
def to_hash: -> {
|
|
24
|
+
paging: Courier::Paging,
|
|
25
|
+
results: ::Array[Courier::Notifications::Previews::PreviewRun]
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
module Notifications
|
|
4
|
+
module PreviewRunStatus = Previews::PreviewRunStatus
|
|
5
|
+
|
|
6
|
+
module Previews
|
|
7
|
+
type preview_run_status =
|
|
8
|
+
:PENDING | :RENDERED | :SUBMITTED | :COMPLETED | :FAILED
|
|
9
|
+
|
|
10
|
+
module PreviewRunStatus
|
|
11
|
+
extend Courier::Internal::Type::Enum
|
|
12
|
+
|
|
13
|
+
PENDING: :PENDING
|
|
14
|
+
RENDERED: :RENDERED
|
|
15
|
+
SUBMITTED: :SUBMITTED
|
|
16
|
+
COMPLETED: :COMPLETED
|
|
17
|
+
FAILED: :FAILED
|
|
18
|
+
|
|
19
|
+
def self?.values: -> ::Array[Courier::Models::Notifications::Previews::preview_run_status]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
module Notifications
|
|
4
|
+
module Previews
|
|
5
|
+
type run_create_params =
|
|
6
|
+
{
|
|
7
|
+
id: String,
|
|
8
|
+
idempotency_key: String,
|
|
9
|
+
x_idempotency_expiration: String
|
|
10
|
+
}
|
|
11
|
+
& Courier::Internal::Type::request_parameters
|
|
12
|
+
|
|
13
|
+
class RunCreateParams < Courier::Models::Notifications::Previews::CreatePreviewRunRequest
|
|
14
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
15
|
+
include Courier::Internal::Type::RequestParameters
|
|
16
|
+
|
|
17
|
+
def id: -> String
|
|
18
|
+
|
|
19
|
+
def id=: (String _) -> String
|
|
20
|
+
|
|
21
|
+
def idempotency_key: -> String?
|
|
22
|
+
|
|
23
|
+
def idempotency_key=: (String _) -> String
|
|
24
|
+
|
|
25
|
+
def x_idempotency_expiration: -> String?
|
|
26
|
+
|
|
27
|
+
def x_idempotency_expiration=: (String _) -> String
|
|
28
|
+
|
|
29
|
+
def initialize: (
|
|
30
|
+
id: String,
|
|
31
|
+
?idempotency_key: String,
|
|
32
|
+
?x_idempotency_expiration: String,
|
|
33
|
+
?request_options: Courier::request_opts
|
|
34
|
+
) -> void
|
|
35
|
+
|
|
36
|
+
def to_hash: -> {
|
|
37
|
+
id: String,
|
|
38
|
+
idempotency_key: String,
|
|
39
|
+
x_idempotency_expiration: String,
|
|
40
|
+
request_options: Courier::RequestOptions
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|