trycourier 4.8.0 → 4.9.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 +32 -0
- data/README.md +1 -1
- data/lib/courier/client.rb +8 -0
- data/lib/courier/internal/util.rb +19 -6
- data/lib/courier/models/channel.rb +75 -0
- data/lib/courier/models/channel_metadata.rb +15 -0
- data/lib/courier/models/elemental_content.rb +2 -2
- data/lib/courier/models/elemental_html_node_with_type.rb +24 -0
- data/lib/courier/models/elemental_node.rb +3 -1
- data/lib/courier/models/message_channels.rb +8 -0
- data/lib/courier/models/message_providers.rb +8 -0
- data/lib/courier/models/message_providers_type.rb +38 -0
- data/lib/courier/models/metadata.rb +15 -0
- data/lib/courier/models/notification_archive_params.rb +20 -0
- data/lib/courier/models/notification_create_params.rb +14 -0
- data/lib/courier/models/notification_list_params.rb +13 -4
- data/lib/courier/models/notification_list_response.rb +108 -93
- data/lib/courier/models/notification_list_versions_params.rb +37 -0
- data/lib/courier/models/notification_publish_params.rb +20 -0
- data/lib/courier/models/notification_replace_params.rb +20 -0
- data/lib/courier/models/notification_retrieve_params.rb +33 -0
- data/lib/courier/models/notification_template_create_request.rb +45 -0
- data/lib/courier/models/notification_template_get_response.rb +92 -0
- data/lib/courier/models/notification_template_mutation_response.rb +51 -0
- data/lib/courier/models/notification_template_payload.rb +98 -0
- data/lib/courier/models/notification_template_publish_request.rb +19 -0
- data/lib/courier/models/notification_template_summary.rb +81 -0
- data/lib/courier/models/notification_template_update_request.rb +46 -0
- data/lib/courier/models/notification_template_version_list_response.rb +22 -0
- data/lib/courier/models/provider.rb +67 -0
- data/lib/courier/models/provider_create_params.rb +52 -0
- data/lib/courier/models/provider_delete_params.rb +20 -0
- data/lib/courier/models/provider_list_params.rb +22 -0
- data/lib/courier/models/provider_list_response.rb +24 -0
- data/lib/courier/models/provider_retrieve_params.rb +20 -0
- data/lib/courier/models/provider_update_params.rb +58 -0
- data/lib/courier/models/providers/catalog_list_params.rb +44 -0
- data/lib/courier/models/providers/catalog_list_response.rb +26 -0
- data/lib/courier/models/providers_catalog_entry.rb +86 -0
- data/lib/courier/models/routing_strategy_archive_params.rb +20 -0
- data/lib/courier/models/routing_strategy_create_params.rb +14 -0
- data/lib/courier/models/routing_strategy_create_request.rb +58 -0
- data/lib/courier/models/routing_strategy_get_response.rb +99 -0
- data/lib/courier/models/routing_strategy_list_params.rb +30 -0
- data/lib/courier/models/routing_strategy_list_response.rb +24 -0
- data/lib/courier/models/routing_strategy_mutation_response.rb +19 -0
- data/lib/courier/models/routing_strategy_replace_params.rb +20 -0
- data/lib/courier/models/routing_strategy_replace_request.rb +59 -0
- data/lib/courier/models/routing_strategy_retrieve_params.rb +20 -0
- data/lib/courier/models/routing_strategy_summary.rb +75 -0
- data/lib/courier/models/send_message_params.rb +6 -154
- data/lib/courier/models/tenant_template_input.rb +6 -152
- data/lib/courier/models/timeouts.rb +21 -0
- data/lib/courier/models/version_node.rb +46 -0
- data/lib/courier/models.rb +86 -0
- data/lib/courier/resources/notifications.rb +165 -3
- data/lib/courier/resources/providers/catalog.rb +49 -0
- data/lib/courier/resources/providers.rb +150 -0
- data/lib/courier/resources/routing_strategies.rb +151 -0
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +47 -0
- data/rbi/courier/client.rbi +6 -0
- data/rbi/courier/internal/util.rbi +8 -0
- data/rbi/courier/models/channel.rbi +106 -0
- data/rbi/courier/models/channel_metadata.rbi +28 -0
- data/rbi/courier/models/elemental_content.rbi +6 -3
- data/rbi/courier/models/elemental_html_node_with_type.rbi +59 -0
- data/rbi/courier/models/elemental_node.rbi +2 -1
- data/rbi/courier/models/message_channels.rbi +11 -0
- data/rbi/courier/models/message_providers.rbi +11 -0
- data/rbi/courier/models/message_providers_type.rbi +60 -0
- data/rbi/courier/models/metadata.rbi +26 -0
- data/rbi/courier/models/notification_archive_params.rbi +35 -0
- data/rbi/courier/models/notification_create_params.rbi +27 -0
- data/rbi/courier/models/notification_list_params.rbi +15 -2
- data/rbi/courier/models/notification_list_response.rbi +159 -119
- data/rbi/courier/models/notification_list_versions_params.rbi +66 -0
- data/rbi/courier/models/notification_publish_params.rbi +35 -0
- data/rbi/courier/models/notification_replace_params.rbi +35 -0
- data/rbi/courier/models/notification_retrieve_params.rbi +54 -0
- data/rbi/courier/models/notification_template_create_request.rbi +102 -0
- data/rbi/courier/models/notification_template_get_response.rbi +162 -0
- data/rbi/courier/models/notification_template_mutation_response.rbi +121 -0
- data/rbi/courier/models/notification_template_payload.rbi +183 -0
- data/rbi/courier/models/notification_template_publish_request.rbi +35 -0
- data/rbi/courier/models/notification_template_summary.rbi +124 -0
- data/rbi/courier/models/notification_template_update_request.rbi +103 -0
- data/rbi/courier/models/notification_template_version_list_response.rbi +41 -0
- data/rbi/courier/models/provider.rbi +87 -0
- data/rbi/courier/models/provider_create_params.rbi +82 -0
- data/rbi/courier/models/provider_delete_params.rbi +35 -0
- data/rbi/courier/models/provider_list_params.rbi +43 -0
- data/rbi/courier/models/provider_list_response.rbi +42 -0
- data/rbi/courier/models/provider_retrieve_params.rbi +35 -0
- data/rbi/courier/models/provider_update_params.rbi +86 -0
- data/rbi/courier/models/providers/catalog_list_params.rbi +75 -0
- data/rbi/courier/models/providers/catalog_list_response.rbi +47 -0
- data/rbi/courier/models/providers_catalog_entry.rbi +129 -0
- data/rbi/courier/models/routing_strategy_archive_params.rbi +38 -0
- data/rbi/courier/models/routing_strategy_create_params.rbi +30 -0
- data/rbi/courier/models/routing_strategy_create_request.rbi +86 -0
- data/rbi/courier/models/routing_strategy_get_response.rbi +121 -0
- data/rbi/courier/models/routing_strategy_list_params.rbi +54 -0
- data/rbi/courier/models/routing_strategy_list_response.rbi +45 -0
- data/rbi/courier/models/routing_strategy_mutation_response.rbi +31 -0
- data/rbi/courier/models/routing_strategy_replace_params.rbi +38 -0
- data/rbi/courier/models/routing_strategy_replace_request.rbi +87 -0
- data/rbi/courier/models/routing_strategy_retrieve_params.rbi +38 -0
- data/rbi/courier/models/routing_strategy_summary.rbi +95 -0
- data/rbi/courier/models/send_message_params.rbi +6 -362
- data/rbi/courier/models/tenant_template_input.rbi +8 -336
- data/rbi/courier/models/timeouts.rbi +33 -0
- data/rbi/courier/models/version_node.rbi +65 -0
- data/rbi/courier/models.rbi +94 -0
- data/rbi/courier/resources/notifications.rbi +119 -1
- data/rbi/courier/resources/providers/catalog.rbi +38 -0
- data/rbi/courier/resources/providers.rbi +116 -0
- data/rbi/courier/resources/routing_strategies.rbi +126 -0
- data/sig/courier/client.rbs +4 -0
- data/sig/courier/internal/util.rbs +4 -0
- data/sig/courier/models/channel.rbs +61 -0
- data/sig/courier/models/channel_metadata.rbs +13 -0
- data/sig/courier/models/elemental_html_node_with_type.rbs +32 -0
- data/sig/courier/models/elemental_node.rbs +1 -0
- data/sig/courier/models/message_channels.rbs +7 -0
- data/sig/courier/models/message_providers.rbs +7 -0
- data/sig/courier/models/message_providers_type.rbs +35 -0
- data/sig/courier/models/metadata.rbs +13 -0
- data/sig/courier/models/notification_archive_params.rbs +20 -0
- data/sig/courier/models/notification_create_params.rbs +15 -0
- data/sig/courier/models/notification_list_params.rbs +7 -1
- data/sig/courier/models/notification_list_response.rbs +81 -71
- data/sig/courier/models/notification_list_versions_params.rbs +36 -0
- data/sig/courier/models/notification_publish_params.rbs +22 -0
- data/sig/courier/models/notification_replace_params.rbs +22 -0
- data/sig/courier/models/notification_retrieve_params.rbs +30 -0
- data/sig/courier/models/notification_template_create_request.rbs +40 -0
- data/sig/courier/models/notification_template_get_response.rbs +72 -0
- data/sig/courier/models/notification_template_mutation_response.rbs +46 -0
- data/sig/courier/models/notification_template_payload.rbs +75 -0
- data/sig/courier/models/notification_template_publish_request.rbs +15 -0
- data/sig/courier/models/notification_template_summary.rbs +70 -0
- data/sig/courier/models/notification_template_update_request.rbs +40 -0
- data/sig/courier/models/notification_template_version_list_response.rbs +22 -0
- data/sig/courier/models/provider.rbs +52 -0
- data/sig/courier/models/provider_create_params.rbs +47 -0
- data/sig/courier/models/provider_delete_params.rbs +20 -0
- data/sig/courier/models/provider_list_params.rbs +25 -0
- data/sig/courier/models/provider_list_response.rbs +22 -0
- data/sig/courier/models/provider_retrieve_params.rbs +20 -0
- data/sig/courier/models/provider_update_params.rbs +52 -0
- data/sig/courier/models/providers/catalog_list_params.rbs +40 -0
- data/sig/courier/models/providers/catalog_list_response.rbs +27 -0
- data/sig/courier/models/providers_catalog_entry.rbs +64 -0
- data/sig/courier/models/routing_strategy_archive_params.rbs +20 -0
- data/sig/courier/models/routing_strategy_create_params.rbs +15 -0
- data/sig/courier/models/routing_strategy_create_request.rbs +45 -0
- data/sig/courier/models/routing_strategy_get_response.rbs +70 -0
- data/sig/courier/models/routing_strategy_list_params.rbs +30 -0
- data/sig/courier/models/routing_strategy_list_response.rbs +25 -0
- data/sig/courier/models/routing_strategy_mutation_response.rbs +13 -0
- data/sig/courier/models/routing_strategy_replace_params.rbs +22 -0
- data/sig/courier/models/routing_strategy_replace_request.rbs +45 -0
- data/sig/courier/models/routing_strategy_retrieve_params.rbs +20 -0
- data/sig/courier/models/routing_strategy_summary.rbs +55 -0
- data/sig/courier/models/send_message_params.rbs +8 -130
- data/sig/courier/models/tenant_template_input.rbs +12 -134
- data/sig/courier/models/timeouts.rbs +15 -0
- data/sig/courier/models/version_node.rbs +32 -0
- data/sig/courier/models.rbs +84 -0
- data/sig/courier/resources/notifications.rbs +35 -0
- data/sig/courier/resources/providers/catalog.rbs +16 -0
- data/sig/courier/resources/providers.rbs +38 -0
- data/sig/courier/resources/routing_strategies.rbs +41 -0
- metadata +143 -2
data/lib/courier/version.rb
CHANGED
data/lib/courier.rb
CHANGED
|
@@ -60,6 +60,12 @@ require_relative "courier/models/subscription_topic_new"
|
|
|
60
60
|
require_relative "courier/models/elemental_channel_node"
|
|
61
61
|
require_relative "courier/models/journeys_invoke_request"
|
|
62
62
|
require_relative "courier/models/message_details"
|
|
63
|
+
require_relative "courier/models/notification_template_create_request"
|
|
64
|
+
require_relative "courier/models/notification_template_publish_request"
|
|
65
|
+
require_relative "courier/models/notification_template_update_request"
|
|
66
|
+
require_relative "courier/models/notification_template_payload"
|
|
67
|
+
require_relative "courier/models/routing_strategy_create_request"
|
|
68
|
+
require_relative "courier/models/routing_strategy_replace_request"
|
|
63
69
|
require_relative "courier/models/base_template_tenant_association"
|
|
64
70
|
require_relative "courier/models/post_tenant_template_publish_request"
|
|
65
71
|
require_relative "courier/models/put_tenant_template_request"
|
|
@@ -112,7 +118,9 @@ require_relative "courier/models/bulk_list_users_response"
|
|
|
112
118
|
require_relative "courier/models/bulk_retrieve_job_params"
|
|
113
119
|
require_relative "courier/models/bulk_retrieve_job_response"
|
|
114
120
|
require_relative "courier/models/bulk_run_job_params"
|
|
121
|
+
require_relative "courier/models/channel"
|
|
115
122
|
require_relative "courier/models/channel_classification"
|
|
123
|
+
require_relative "courier/models/channel_metadata"
|
|
116
124
|
require_relative "courier/models/channel_preference"
|
|
117
125
|
require_relative "courier/models/check"
|
|
118
126
|
require_relative "courier/models/default_preferences"
|
|
@@ -123,6 +131,7 @@ require_relative "courier/models/elemental_channel_node_with_type"
|
|
|
123
131
|
require_relative "courier/models/elemental_content"
|
|
124
132
|
require_relative "courier/models/elemental_content_sugar"
|
|
125
133
|
require_relative "courier/models/elemental_divider_node_with_type"
|
|
134
|
+
require_relative "courier/models/elemental_html_node_with_type"
|
|
126
135
|
require_relative "courier/models/elemental_image_node_with_type"
|
|
127
136
|
require_relative "courier/models/elemental_meta_node_with_type"
|
|
128
137
|
require_relative "courier/models/elemental_node"
|
|
@@ -161,6 +170,7 @@ require_relative "courier/models/lists/subscription_unsubscribe_user_params"
|
|
|
161
170
|
require_relative "courier/models/list_update_params"
|
|
162
171
|
require_relative "courier/models/logo"
|
|
163
172
|
require_relative "courier/models/message_cancel_params"
|
|
173
|
+
require_relative "courier/models/message_channels"
|
|
164
174
|
require_relative "courier/models/message_content_params"
|
|
165
175
|
require_relative "courier/models/message_content_response"
|
|
166
176
|
require_relative "courier/models/message_context"
|
|
@@ -168,25 +178,38 @@ require_relative "courier/models/message_history_params"
|
|
|
168
178
|
require_relative "courier/models/message_history_response"
|
|
169
179
|
require_relative "courier/models/message_list_params"
|
|
170
180
|
require_relative "courier/models/message_list_response"
|
|
181
|
+
require_relative "courier/models/message_providers"
|
|
182
|
+
require_relative "courier/models/message_providers_type"
|
|
171
183
|
require_relative "courier/models/message_retrieve_params"
|
|
172
184
|
require_relative "courier/models/message_retrieve_response"
|
|
173
185
|
require_relative "courier/models/message_routing"
|
|
174
186
|
require_relative "courier/models/message_routing_channel"
|
|
187
|
+
require_relative "courier/models/metadata"
|
|
175
188
|
require_relative "courier/models/ms_teams"
|
|
176
189
|
require_relative "courier/models/ms_teams_base_properties"
|
|
177
190
|
require_relative "courier/models/ms_teams_recipient"
|
|
178
191
|
require_relative "courier/models/multiple_tokens"
|
|
192
|
+
require_relative "courier/models/notification_archive_params"
|
|
193
|
+
require_relative "courier/models/notification_create_params"
|
|
179
194
|
require_relative "courier/models/notification_get_content"
|
|
180
195
|
require_relative "courier/models/notification_list_params"
|
|
181
196
|
require_relative "courier/models/notification_list_response"
|
|
197
|
+
require_relative "courier/models/notification_list_versions_params"
|
|
182
198
|
require_relative "courier/models/notification_preference_details"
|
|
199
|
+
require_relative "courier/models/notification_publish_params"
|
|
200
|
+
require_relative "courier/models/notification_replace_params"
|
|
183
201
|
require_relative "courier/models/notification_retrieve_content_params"
|
|
202
|
+
require_relative "courier/models/notification_retrieve_params"
|
|
184
203
|
require_relative "courier/models/notifications/check_delete_params"
|
|
185
204
|
require_relative "courier/models/notifications/check_list_params"
|
|
186
205
|
require_relative "courier/models/notifications/check_list_response"
|
|
187
206
|
require_relative "courier/models/notifications/check_update_params"
|
|
188
207
|
require_relative "courier/models/notifications/check_update_response"
|
|
189
208
|
require_relative "courier/models/notifications/draft_retrieve_content_params"
|
|
209
|
+
require_relative "courier/models/notification_template_get_response"
|
|
210
|
+
require_relative "courier/models/notification_template_mutation_response"
|
|
211
|
+
require_relative "courier/models/notification_template_summary"
|
|
212
|
+
require_relative "courier/models/notification_template_version_list_response"
|
|
190
213
|
require_relative "courier/models/pagerduty"
|
|
191
214
|
require_relative "courier/models/pagerduty_recipient"
|
|
192
215
|
require_relative "courier/models/paging"
|
|
@@ -207,10 +230,29 @@ require_relative "courier/models/profiles/list_retrieve_response"
|
|
|
207
230
|
require_relative "courier/models/profiles/list_subscribe_params"
|
|
208
231
|
require_relative "courier/models/profiles/list_subscribe_response"
|
|
209
232
|
require_relative "courier/models/profile_update_params"
|
|
233
|
+
require_relative "courier/models/provider"
|
|
234
|
+
require_relative "courier/models/provider_create_params"
|
|
235
|
+
require_relative "courier/models/provider_delete_params"
|
|
236
|
+
require_relative "courier/models/provider_list_params"
|
|
237
|
+
require_relative "courier/models/provider_list_response"
|
|
238
|
+
require_relative "courier/models/provider_retrieve_params"
|
|
239
|
+
require_relative "courier/models/providers/catalog_list_params"
|
|
240
|
+
require_relative "courier/models/providers/catalog_list_response"
|
|
241
|
+
require_relative "courier/models/providers_catalog_entry"
|
|
242
|
+
require_relative "courier/models/provider_update_params"
|
|
210
243
|
require_relative "courier/models/put_subscriptions_recipient"
|
|
211
244
|
require_relative "courier/models/put_tenant_template_response"
|
|
212
245
|
require_relative "courier/models/recipient_preferences"
|
|
213
246
|
require_relative "courier/models/request_archive_params"
|
|
247
|
+
require_relative "courier/models/routing_strategy_archive_params"
|
|
248
|
+
require_relative "courier/models/routing_strategy_create_params"
|
|
249
|
+
require_relative "courier/models/routing_strategy_get_response"
|
|
250
|
+
require_relative "courier/models/routing_strategy_list_params"
|
|
251
|
+
require_relative "courier/models/routing_strategy_list_response"
|
|
252
|
+
require_relative "courier/models/routing_strategy_mutation_response"
|
|
253
|
+
require_relative "courier/models/routing_strategy_replace_params"
|
|
254
|
+
require_relative "courier/models/routing_strategy_retrieve_params"
|
|
255
|
+
require_relative "courier/models/routing_strategy_summary"
|
|
214
256
|
require_relative "courier/models/rule"
|
|
215
257
|
require_relative "courier/models/send_direct_message"
|
|
216
258
|
require_relative "courier/models/send_message_params"
|
|
@@ -248,6 +290,7 @@ require_relative "courier/models/tenants/templates/version_retrieve_params"
|
|
|
248
290
|
require_relative "courier/models/tenant_template_input"
|
|
249
291
|
require_relative "courier/models/tenant_update_params"
|
|
250
292
|
require_relative "courier/models/text_style"
|
|
293
|
+
require_relative "courier/models/timeouts"
|
|
251
294
|
require_relative "courier/models/token"
|
|
252
295
|
require_relative "courier/models/translation_retrieve_params"
|
|
253
296
|
require_relative "courier/models/translation_retrieve_response"
|
|
@@ -277,6 +320,7 @@ require_relative "courier/models/users/token_retrieve_response"
|
|
|
277
320
|
require_relative "courier/models/users/token_update_params"
|
|
278
321
|
require_relative "courier/models/users/topic_preference"
|
|
279
322
|
require_relative "courier/models/utm"
|
|
323
|
+
require_relative "courier/models/version_node"
|
|
280
324
|
require_relative "courier/models/webhook_authentication"
|
|
281
325
|
require_relative "courier/models/webhook_auth_mode"
|
|
282
326
|
require_relative "courier/models/webhook_method"
|
|
@@ -302,7 +346,10 @@ require_relative "courier/resources/notifications/checks"
|
|
|
302
346
|
require_relative "courier/resources/notifications/draft"
|
|
303
347
|
require_relative "courier/resources/profiles"
|
|
304
348
|
require_relative "courier/resources/profiles/lists"
|
|
349
|
+
require_relative "courier/resources/providers"
|
|
350
|
+
require_relative "courier/resources/providers/catalog"
|
|
305
351
|
require_relative "courier/resources/requests"
|
|
352
|
+
require_relative "courier/resources/routing_strategies"
|
|
306
353
|
require_relative "courier/resources/send"
|
|
307
354
|
require_relative "courier/resources/tenants"
|
|
308
355
|
require_relative "courier/resources/tenants/preferences"
|
data/rbi/courier/client.rbi
CHANGED
|
@@ -19,6 +19,9 @@ module Courier
|
|
|
19
19
|
sig { returns(Courier::Resources::Audiences) }
|
|
20
20
|
attr_reader :audiences
|
|
21
21
|
|
|
22
|
+
sig { returns(Courier::Resources::Providers) }
|
|
23
|
+
attr_reader :providers
|
|
24
|
+
|
|
22
25
|
sig { returns(Courier::Resources::AuditEvents) }
|
|
23
26
|
attr_reader :audit_events
|
|
24
27
|
|
|
@@ -52,6 +55,9 @@ module Courier
|
|
|
52
55
|
sig { returns(Courier::Resources::Notifications) }
|
|
53
56
|
attr_reader :notifications
|
|
54
57
|
|
|
58
|
+
sig { returns(Courier::Resources::RoutingStrategies) }
|
|
59
|
+
attr_reader :routing_strategies
|
|
60
|
+
|
|
55
61
|
sig { returns(Courier::Resources::Profiles) }
|
|
56
62
|
attr_reader :profiles
|
|
57
63
|
|
|
@@ -148,12 +148,20 @@ module Courier
|
|
|
148
148
|
end
|
|
149
149
|
end
|
|
150
150
|
|
|
151
|
+
# https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3
|
|
152
|
+
RFC_3986_NOT_PCHARS = T.let(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/, Regexp)
|
|
153
|
+
|
|
151
154
|
class << self
|
|
152
155
|
# @api private
|
|
153
156
|
sig { params(uri: URI::Generic).returns(String) }
|
|
154
157
|
def uri_origin(uri)
|
|
155
158
|
end
|
|
156
159
|
|
|
160
|
+
# @api private
|
|
161
|
+
sig { params(path: T.any(String, Integer)).returns(String) }
|
|
162
|
+
def encode_path(path)
|
|
163
|
+
end
|
|
164
|
+
|
|
157
165
|
# @api private
|
|
158
166
|
sig { params(path: T.any(String, T::Array[String])).returns(String) }
|
|
159
167
|
def interpolate_path(path)
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class Channel < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias { T.any(Courier::Channel, Courier::Internal::AnyHash) }
|
|
8
|
+
|
|
9
|
+
# Brand id used for rendering.
|
|
10
|
+
sig { returns(T.nilable(String)) }
|
|
11
|
+
attr_accessor :brand_id
|
|
12
|
+
|
|
13
|
+
# JS conditional with access to data/profile.
|
|
14
|
+
sig { returns(T.nilable(String)) }
|
|
15
|
+
attr_accessor :if_
|
|
16
|
+
|
|
17
|
+
sig { returns(T.nilable(Courier::ChannelMetadata)) }
|
|
18
|
+
attr_reader :metadata
|
|
19
|
+
|
|
20
|
+
sig { params(metadata: T.nilable(Courier::ChannelMetadata::OrHash)).void }
|
|
21
|
+
attr_writer :metadata
|
|
22
|
+
|
|
23
|
+
# Channel specific overrides.
|
|
24
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
25
|
+
attr_accessor :override
|
|
26
|
+
|
|
27
|
+
# Providers enabled for this channel.
|
|
28
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
29
|
+
attr_accessor :providers
|
|
30
|
+
|
|
31
|
+
# Defaults to `single`.
|
|
32
|
+
sig { returns(T.nilable(Courier::Channel::RoutingMethod::OrSymbol)) }
|
|
33
|
+
attr_accessor :routing_method
|
|
34
|
+
|
|
35
|
+
sig { returns(T.nilable(Courier::Timeouts)) }
|
|
36
|
+
attr_reader :timeouts
|
|
37
|
+
|
|
38
|
+
sig { params(timeouts: T.nilable(Courier::Timeouts::OrHash)).void }
|
|
39
|
+
attr_writer :timeouts
|
|
40
|
+
|
|
41
|
+
sig do
|
|
42
|
+
params(
|
|
43
|
+
brand_id: T.nilable(String),
|
|
44
|
+
if_: T.nilable(String),
|
|
45
|
+
metadata: T.nilable(Courier::ChannelMetadata::OrHash),
|
|
46
|
+
override: T.nilable(T::Hash[Symbol, T.anything]),
|
|
47
|
+
providers: T.nilable(T::Array[String]),
|
|
48
|
+
routing_method: T.nilable(Courier::Channel::RoutingMethod::OrSymbol),
|
|
49
|
+
timeouts: T.nilable(Courier::Timeouts::OrHash)
|
|
50
|
+
).returns(T.attached_class)
|
|
51
|
+
end
|
|
52
|
+
def self.new(
|
|
53
|
+
# Brand id used for rendering.
|
|
54
|
+
brand_id: nil,
|
|
55
|
+
# JS conditional with access to data/profile.
|
|
56
|
+
if_: nil,
|
|
57
|
+
metadata: nil,
|
|
58
|
+
# Channel specific overrides.
|
|
59
|
+
override: nil,
|
|
60
|
+
# Providers enabled for this channel.
|
|
61
|
+
providers: nil,
|
|
62
|
+
# Defaults to `single`.
|
|
63
|
+
routing_method: nil,
|
|
64
|
+
timeouts: nil
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
sig do
|
|
69
|
+
override.returns(
|
|
70
|
+
{
|
|
71
|
+
brand_id: T.nilable(String),
|
|
72
|
+
if_: T.nilable(String),
|
|
73
|
+
metadata: T.nilable(Courier::ChannelMetadata),
|
|
74
|
+
override: T.nilable(T::Hash[Symbol, T.anything]),
|
|
75
|
+
providers: T.nilable(T::Array[String]),
|
|
76
|
+
routing_method:
|
|
77
|
+
T.nilable(Courier::Channel::RoutingMethod::OrSymbol),
|
|
78
|
+
timeouts: T.nilable(Courier::Timeouts)
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
end
|
|
82
|
+
def to_hash
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Defaults to `single`.
|
|
86
|
+
module RoutingMethod
|
|
87
|
+
extend Courier::Internal::Type::Enum
|
|
88
|
+
|
|
89
|
+
TaggedSymbol =
|
|
90
|
+
T.type_alias { T.all(Symbol, Courier::Channel::RoutingMethod) }
|
|
91
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
92
|
+
|
|
93
|
+
ALL = T.let(:all, Courier::Channel::RoutingMethod::TaggedSymbol)
|
|
94
|
+
SINGLE = T.let(:single, Courier::Channel::RoutingMethod::TaggedSymbol)
|
|
95
|
+
|
|
96
|
+
sig do
|
|
97
|
+
override.returns(
|
|
98
|
+
T::Array[Courier::Channel::RoutingMethod::TaggedSymbol]
|
|
99
|
+
)
|
|
100
|
+
end
|
|
101
|
+
def self.values
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class ChannelMetadata < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Courier::ChannelMetadata, Courier::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
sig { returns(T.nilable(Courier::Utm)) }
|
|
12
|
+
attr_reader :utm
|
|
13
|
+
|
|
14
|
+
sig { params(utm: T.nilable(Courier::Utm::OrHash)).void }
|
|
15
|
+
attr_writer :utm
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(utm: T.nilable(Courier::Utm::OrHash)).returns(T.attached_class)
|
|
19
|
+
end
|
|
20
|
+
def self.new(utm: nil)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
sig { override.returns({ utm: T.nilable(Courier::Utm) }) }
|
|
24
|
+
def to_hash
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -18,7 +18,8 @@ module Courier
|
|
|
18
18
|
Courier::ElementalImageNodeWithType,
|
|
19
19
|
Courier::ElementalActionNodeWithType,
|
|
20
20
|
Courier::ElementalDividerNodeWithType,
|
|
21
|
-
Courier::ElementalQuoteNodeWithType
|
|
21
|
+
Courier::ElementalQuoteNodeWithType,
|
|
22
|
+
Courier::ElementalHTMLNodeWithType
|
|
22
23
|
)
|
|
23
24
|
]
|
|
24
25
|
)
|
|
@@ -40,7 +41,8 @@ module Courier
|
|
|
40
41
|
Courier::ElementalImageNodeWithType::OrHash,
|
|
41
42
|
Courier::ElementalActionNodeWithType::OrHash,
|
|
42
43
|
Courier::ElementalDividerNodeWithType::OrHash,
|
|
43
|
-
Courier::ElementalQuoteNodeWithType::OrHash
|
|
44
|
+
Courier::ElementalQuoteNodeWithType::OrHash,
|
|
45
|
+
Courier::ElementalHTMLNodeWithType::OrHash
|
|
44
46
|
)
|
|
45
47
|
],
|
|
46
48
|
version: String
|
|
@@ -65,7 +67,8 @@ module Courier
|
|
|
65
67
|
Courier::ElementalImageNodeWithType,
|
|
66
68
|
Courier::ElementalActionNodeWithType,
|
|
67
69
|
Courier::ElementalDividerNodeWithType,
|
|
68
|
-
Courier::ElementalQuoteNodeWithType
|
|
70
|
+
Courier::ElementalQuoteNodeWithType,
|
|
71
|
+
Courier::ElementalHTMLNodeWithType
|
|
69
72
|
)
|
|
70
73
|
],
|
|
71
74
|
version: String
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class ElementalHTMLNodeWithType < Courier::Models::ElementalBaseNode
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Courier::ElementalHTMLNodeWithType, Courier::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
sig do
|
|
12
|
+
returns(T.nilable(Courier::ElementalHTMLNodeWithType::Type::OrSymbol))
|
|
13
|
+
end
|
|
14
|
+
attr_reader :type
|
|
15
|
+
|
|
16
|
+
sig do
|
|
17
|
+
params(type: Courier::ElementalHTMLNodeWithType::Type::OrSymbol).void
|
|
18
|
+
end
|
|
19
|
+
attr_writer :type
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
params(
|
|
23
|
+
type: Courier::ElementalHTMLNodeWithType::Type::OrSymbol
|
|
24
|
+
).returns(T.attached_class)
|
|
25
|
+
end
|
|
26
|
+
def self.new(type: nil)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
{ type: Courier::ElementalHTMLNodeWithType::Type::OrSymbol }
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
def to_hash
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
module Type
|
|
38
|
+
extend Courier::Internal::Type::Enum
|
|
39
|
+
|
|
40
|
+
TaggedSymbol =
|
|
41
|
+
T.type_alias do
|
|
42
|
+
T.all(Symbol, Courier::ElementalHTMLNodeWithType::Type)
|
|
43
|
+
end
|
|
44
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
45
|
+
|
|
46
|
+
HTML =
|
|
47
|
+
T.let(:html, Courier::ElementalHTMLNodeWithType::Type::TaggedSymbol)
|
|
48
|
+
|
|
49
|
+
sig do
|
|
50
|
+
override.returns(
|
|
51
|
+
T::Array[Courier::ElementalHTMLNodeWithType::Type::TaggedSymbol]
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
def self.values
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -24,7 +24,8 @@ module Courier
|
|
|
24
24
|
Courier::ElementalImageNodeWithType,
|
|
25
25
|
Courier::ElementalActionNodeWithType,
|
|
26
26
|
Courier::ElementalDividerNodeWithType,
|
|
27
|
-
Courier::ElementalQuoteNodeWithType
|
|
27
|
+
Courier::ElementalQuoteNodeWithType,
|
|
28
|
+
Courier::ElementalHTMLNodeWithType
|
|
28
29
|
)
|
|
29
30
|
end
|
|
30
31
|
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class MessageProvidersType < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Courier::MessageProvidersType, Courier::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# JS conditional with access to data/profile.
|
|
12
|
+
sig { returns(T.nilable(String)) }
|
|
13
|
+
attr_accessor :if_
|
|
14
|
+
|
|
15
|
+
sig { returns(T.nilable(Courier::Metadata)) }
|
|
16
|
+
attr_reader :metadata
|
|
17
|
+
|
|
18
|
+
sig { params(metadata: T.nilable(Courier::Metadata::OrHash)).void }
|
|
19
|
+
attr_writer :metadata
|
|
20
|
+
|
|
21
|
+
# Provider-specific overrides.
|
|
22
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
23
|
+
attr_accessor :override
|
|
24
|
+
|
|
25
|
+
sig { returns(T.nilable(Integer)) }
|
|
26
|
+
attr_accessor :timeouts
|
|
27
|
+
|
|
28
|
+
sig do
|
|
29
|
+
params(
|
|
30
|
+
if_: T.nilable(String),
|
|
31
|
+
metadata: T.nilable(Courier::Metadata::OrHash),
|
|
32
|
+
override: T.nilable(T::Hash[Symbol, T.anything]),
|
|
33
|
+
timeouts: T.nilable(Integer)
|
|
34
|
+
).returns(T.attached_class)
|
|
35
|
+
end
|
|
36
|
+
def self.new(
|
|
37
|
+
# JS conditional with access to data/profile.
|
|
38
|
+
if_: nil,
|
|
39
|
+
metadata: nil,
|
|
40
|
+
# Provider-specific overrides.
|
|
41
|
+
override: nil,
|
|
42
|
+
timeouts: nil
|
|
43
|
+
)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
sig do
|
|
47
|
+
override.returns(
|
|
48
|
+
{
|
|
49
|
+
if_: T.nilable(String),
|
|
50
|
+
metadata: T.nilable(Courier::Metadata),
|
|
51
|
+
override: T.nilable(T::Hash[Symbol, T.anything]),
|
|
52
|
+
timeouts: T.nilable(Integer)
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
def to_hash
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class Metadata < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias { T.any(Courier::Metadata, Courier::Internal::AnyHash) }
|
|
8
|
+
|
|
9
|
+
sig { returns(T.nilable(Courier::Utm)) }
|
|
10
|
+
attr_reader :utm
|
|
11
|
+
|
|
12
|
+
sig { params(utm: T.nilable(Courier::Utm::OrHash)).void }
|
|
13
|
+
attr_writer :utm
|
|
14
|
+
|
|
15
|
+
sig do
|
|
16
|
+
params(utm: T.nilable(Courier::Utm::OrHash)).returns(T.attached_class)
|
|
17
|
+
end
|
|
18
|
+
def self.new(utm: nil)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
sig { override.returns({ utm: T.nilable(Courier::Utm) }) }
|
|
22
|
+
def to_hash
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationArchiveParams < 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::NotificationArchiveParams, Courier::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(
|
|
19
|
+
id: String,
|
|
20
|
+
request_options: Courier::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
22
|
+
end
|
|
23
|
+
def self.new(id:, request_options: {})
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ 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 NotificationCreateParams < Courier::Models::NotificationTemplateCreateRequest
|
|
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::NotificationCreateParams, 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
|
|
@@ -11,23 +11,35 @@ module Courier
|
|
|
11
11
|
T.any(Courier::NotificationListParams, Courier::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
# Opaque pagination cursor from a previous response. Omit for the first page.
|
|
14
15
|
sig { returns(T.nilable(String)) }
|
|
15
16
|
attr_accessor :cursor
|
|
16
17
|
|
|
17
|
-
#
|
|
18
|
+
# Filter to templates linked to this event map ID.
|
|
19
|
+
sig { returns(T.nilable(String)) }
|
|
20
|
+
attr_reader :event_id
|
|
21
|
+
|
|
22
|
+
sig { params(event_id: String).void }
|
|
23
|
+
attr_writer :event_id
|
|
24
|
+
|
|
25
|
+
# Include template notes in the response. Only applies to legacy templates.
|
|
18
26
|
sig { returns(T.nilable(T::Boolean)) }
|
|
19
27
|
attr_accessor :notes
|
|
20
28
|
|
|
21
29
|
sig do
|
|
22
30
|
params(
|
|
23
31
|
cursor: T.nilable(String),
|
|
32
|
+
event_id: String,
|
|
24
33
|
notes: T.nilable(T::Boolean),
|
|
25
34
|
request_options: Courier::RequestOptions::OrHash
|
|
26
35
|
).returns(T.attached_class)
|
|
27
36
|
end
|
|
28
37
|
def self.new(
|
|
38
|
+
# Opaque pagination cursor from a previous response. Omit for the first page.
|
|
29
39
|
cursor: nil,
|
|
30
|
-
#
|
|
40
|
+
# Filter to templates linked to this event map ID.
|
|
41
|
+
event_id: nil,
|
|
42
|
+
# Include template notes in the response. Only applies to legacy templates.
|
|
31
43
|
notes: nil,
|
|
32
44
|
request_options: {}
|
|
33
45
|
)
|
|
@@ -37,6 +49,7 @@ module Courier
|
|
|
37
49
|
override.returns(
|
|
38
50
|
{
|
|
39
51
|
cursor: T.nilable(String),
|
|
52
|
+
event_id: String,
|
|
40
53
|
notes: T.nilable(T::Boolean),
|
|
41
54
|
request_options: Courier::RequestOptions
|
|
42
55
|
}
|