trycourier 4.8.0 → 4.10.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 +41 -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/associated_notification_list_response.rb +24 -0
- data/lib/courier/models/channel.rb +75 -0
- data/lib/courier/models/channel_metadata.rb +15 -0
- data/lib/courier/models/element_with_checksums.rb +60 -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_content_get_response.rb +26 -0
- data/lib/courier/models/notification_content_mutation_response.rb +61 -0
- data/lib/courier/models/notification_content_put_request.rb +51 -0
- data/lib/courier/models/notification_create_params.rb +14 -0
- data/lib/courier/models/notification_element_put_request.rb +62 -0
- data/lib/courier/models/notification_get_content.rb +0 -1
- 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_locale_put_request.rb +39 -0
- data/lib/courier/models/notification_publish_params.rb +20 -0
- data/lib/courier/models/notification_put_content_params.rb +20 -0
- data/lib/courier/models/notification_put_element_params.rb +26 -0
- data/lib/courier/models/notification_put_locale_params.rb +26 -0
- data/lib/courier/models/notification_replace_params.rb +20 -0
- data/lib/courier/models/notification_retrieve_content_params.rb +14 -1
- data/lib/courier/models/notification_retrieve_content_response.rb +21 -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_state.rb +16 -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_notifications_params.rb +37 -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 +110 -0
- data/lib/courier/resources/notifications.rb +289 -12
- data/lib/courier/resources/providers/catalog.rb +49 -0
- data/lib/courier/resources/providers.rb +150 -0
- data/lib/courier/resources/routing_strategies.rb +179 -0
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +60 -2
- data/rbi/courier/client.rbi +6 -0
- data/rbi/courier/internal/util.rbi +8 -0
- data/rbi/courier/models/associated_notification_list_response.rbi +45 -0
- data/rbi/courier/models/channel.rbi +106 -0
- data/rbi/courier/models/channel_metadata.rbi +28 -0
- data/rbi/courier/models/element_with_checksums.rbi +109 -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_content_get_response.rbi +45 -0
- data/rbi/courier/models/notification_content_mutation_response.rbi +95 -0
- data/rbi/courier/models/notification_content_put_request.rbi +145 -0
- data/rbi/courier/models/notification_create_params.rbi +27 -0
- data/rbi/courier/models/notification_element_put_request.rbi +98 -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_locale_put_request.rbi +79 -0
- data/rbi/courier/models/notification_publish_params.rbi +35 -0
- data/rbi/courier/models/notification_put_content_params.rbi +38 -0
- data/rbi/courier/models/notification_put_element_params.rbi +46 -0
- data/rbi/courier/models/notification_put_locale_params.rbi +46 -0
- data/rbi/courier/models/notification_replace_params.rbi +35 -0
- data/rbi/courier/models/notification_retrieve_content_params.rbi +21 -2
- data/rbi/courier/models/notification_retrieve_content_response.rbi +29 -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_state.rbi +26 -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_notifications_params.rbi +63 -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 +122 -0
- data/rbi/courier/resources/notifications.rbi +222 -6
- data/rbi/courier/resources/providers/catalog.rbi +38 -0
- data/rbi/courier/resources/providers.rbi +116 -0
- data/rbi/courier/resources/routing_strategies.rbi +147 -0
- data/sig/courier/client.rbs +4 -0
- data/sig/courier/internal/util.rbs +4 -0
- data/sig/courier/models/associated_notification_list_response.rbs +25 -0
- data/sig/courier/models/channel.rbs +61 -0
- data/sig/courier/models/channel_metadata.rbs +13 -0
- data/sig/courier/models/element_with_checksums.rbs +60 -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_content_get_response.rbs +22 -0
- data/sig/courier/models/notification_content_mutation_response.rbs +47 -0
- data/sig/courier/models/notification_content_put_request.rbs +50 -0
- data/sig/courier/models/notification_create_params.rbs +15 -0
- data/sig/courier/models/notification_element_put_request.rbs +64 -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_locale_put_request.rbs +39 -0
- data/sig/courier/models/notification_publish_params.rbs +22 -0
- data/sig/courier/models/notification_put_content_params.rbs +22 -0
- data/sig/courier/models/notification_put_element_params.rbs +32 -0
- data/sig/courier/models/notification_put_locale_params.rbs +32 -0
- data/sig/courier/models/notification_replace_params.rbs +22 -0
- data/sig/courier/models/notification_retrieve_content_params.rbs +12 -2
- data/sig/courier/models/notification_retrieve_content_response.rbs +12 -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_state.rbs +14 -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_notifications_params.rbs +34 -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 +108 -0
- data/sig/courier/resources/notifications.rbs +65 -3
- data/sig/courier/resources/providers/catalog.rbs +16 -0
- data/sig/courier/resources/providers.rbs +38 -0
- data/sig/courier/resources/routing_strategies.rbs +48 -0
- metadata +182 -8
- data/lib/courier/models/notifications/draft_retrieve_content_params.rb +0 -22
- data/lib/courier/resources/notifications/draft.rb +0 -33
- data/rbi/courier/models/notifications/draft_retrieve_content_params.rbi +0 -40
- data/rbi/courier/resources/notifications/draft.rbi +0 -23
- data/sig/courier/models/notifications/draft_retrieve_content_params.rbs +0 -22
- data/sig/courier/resources/notifications/draft.rbs +0 -14
data/lib/courier/models.rb
CHANGED
|
@@ -45,6 +45,8 @@ module Courier
|
|
|
45
45
|
|
|
46
46
|
Alignment = Courier::Models::Alignment
|
|
47
47
|
|
|
48
|
+
AssociatedNotificationListResponse = Courier::Models::AssociatedNotificationListResponse
|
|
49
|
+
|
|
48
50
|
Audience = Courier::Models::Audience
|
|
49
51
|
|
|
50
52
|
AudienceDeleteParams = Courier::Models::AudienceDeleteParams
|
|
@@ -121,8 +123,12 @@ module Courier
|
|
|
121
123
|
|
|
122
124
|
BulkRunJobParams = Courier::Models::BulkRunJobParams
|
|
123
125
|
|
|
126
|
+
Channel = Courier::Models::Channel
|
|
127
|
+
|
|
124
128
|
ChannelClassification = Courier::Models::ChannelClassification
|
|
125
129
|
|
|
130
|
+
ChannelMetadata = Courier::Models::ChannelMetadata
|
|
131
|
+
|
|
126
132
|
ChannelPreference = Courier::Models::ChannelPreference
|
|
127
133
|
|
|
128
134
|
Check = Courier::Models::Check
|
|
@@ -147,6 +153,8 @@ module Courier
|
|
|
147
153
|
|
|
148
154
|
ElementalDividerNodeWithType = Courier::Models::ElementalDividerNodeWithType
|
|
149
155
|
|
|
156
|
+
ElementalHTMLNodeWithType = Courier::Models::ElementalHTMLNodeWithType
|
|
157
|
+
|
|
150
158
|
ElementalImageNodeWithType = Courier::Models::ElementalImageNodeWithType
|
|
151
159
|
|
|
152
160
|
ElementalMetaNodeWithType = Courier::Models::ElementalMetaNodeWithType
|
|
@@ -157,6 +165,8 @@ module Courier
|
|
|
157
165
|
|
|
158
166
|
ElementalTextNodeWithType = Courier::Models::ElementalTextNodeWithType
|
|
159
167
|
|
|
168
|
+
ElementWithChecksums = Courier::Models::ElementWithChecksums
|
|
169
|
+
|
|
160
170
|
EmailFooter = Courier::Models::EmailFooter
|
|
161
171
|
|
|
162
172
|
EmailHead = Courier::Models::EmailHead
|
|
@@ -213,6 +223,9 @@ module Courier
|
|
|
213
223
|
|
|
214
224
|
MessageCancelParams = Courier::Models::MessageCancelParams
|
|
215
225
|
|
|
226
|
+
# @type [Courier::Internal::Type::Converter]
|
|
227
|
+
MessageChannels = Courier::Models::MessageChannels
|
|
228
|
+
|
|
216
229
|
MessageContentParams = Courier::Models::MessageContentParams
|
|
217
230
|
|
|
218
231
|
MessageContext = Courier::Models::MessageContext
|
|
@@ -223,12 +236,19 @@ module Courier
|
|
|
223
236
|
|
|
224
237
|
MessageListParams = Courier::Models::MessageListParams
|
|
225
238
|
|
|
239
|
+
# @type [Courier::Internal::Type::Converter]
|
|
240
|
+
MessageProviders = Courier::Models::MessageProviders
|
|
241
|
+
|
|
242
|
+
MessageProvidersType = Courier::Models::MessageProvidersType
|
|
243
|
+
|
|
226
244
|
MessageRetrieveParams = Courier::Models::MessageRetrieveParams
|
|
227
245
|
|
|
228
246
|
MessageRouting = Courier::Models::MessageRouting
|
|
229
247
|
|
|
230
248
|
MessageRoutingChannel = Courier::Models::MessageRoutingChannel
|
|
231
249
|
|
|
250
|
+
Metadata = Courier::Models::Metadata
|
|
251
|
+
|
|
232
252
|
MsTeams = Courier::Models::MsTeams
|
|
233
253
|
|
|
234
254
|
MsTeamsBaseProperties = Courier::Models::MsTeamsBaseProperties
|
|
@@ -237,16 +257,62 @@ module Courier
|
|
|
237
257
|
|
|
238
258
|
MultipleTokens = Courier::Models::MultipleTokens
|
|
239
259
|
|
|
260
|
+
NotificationArchiveParams = Courier::Models::NotificationArchiveParams
|
|
261
|
+
|
|
262
|
+
NotificationContentGetResponse = Courier::Models::NotificationContentGetResponse
|
|
263
|
+
|
|
264
|
+
NotificationContentMutationResponse = Courier::Models::NotificationContentMutationResponse
|
|
265
|
+
|
|
266
|
+
NotificationContentPutRequest = Courier::Models::NotificationContentPutRequest
|
|
267
|
+
|
|
268
|
+
NotificationCreateParams = Courier::Models::NotificationCreateParams
|
|
269
|
+
|
|
270
|
+
NotificationElementPutRequest = Courier::Models::NotificationElementPutRequest
|
|
271
|
+
|
|
240
272
|
NotificationGetContent = Courier::Models::NotificationGetContent
|
|
241
273
|
|
|
242
274
|
NotificationListParams = Courier::Models::NotificationListParams
|
|
243
275
|
|
|
276
|
+
NotificationListVersionsParams = Courier::Models::NotificationListVersionsParams
|
|
277
|
+
|
|
278
|
+
NotificationLocalePutRequest = Courier::Models::NotificationLocalePutRequest
|
|
279
|
+
|
|
244
280
|
NotificationPreferenceDetails = Courier::Models::NotificationPreferenceDetails
|
|
245
281
|
|
|
282
|
+
NotificationPublishParams = Courier::Models::NotificationPublishParams
|
|
283
|
+
|
|
284
|
+
NotificationPutContentParams = Courier::Models::NotificationPutContentParams
|
|
285
|
+
|
|
286
|
+
NotificationPutElementParams = Courier::Models::NotificationPutElementParams
|
|
287
|
+
|
|
288
|
+
NotificationPutLocaleParams = Courier::Models::NotificationPutLocaleParams
|
|
289
|
+
|
|
290
|
+
NotificationReplaceParams = Courier::Models::NotificationReplaceParams
|
|
291
|
+
|
|
246
292
|
NotificationRetrieveContentParams = Courier::Models::NotificationRetrieveContentParams
|
|
247
293
|
|
|
294
|
+
NotificationRetrieveParams = Courier::Models::NotificationRetrieveParams
|
|
295
|
+
|
|
248
296
|
Notifications = Courier::Models::Notifications
|
|
249
297
|
|
|
298
|
+
NotificationTemplateCreateRequest = Courier::Models::NotificationTemplateCreateRequest
|
|
299
|
+
|
|
300
|
+
NotificationTemplateGetResponse = Courier::Models::NotificationTemplateGetResponse
|
|
301
|
+
|
|
302
|
+
NotificationTemplateMutationResponse = Courier::Models::NotificationTemplateMutationResponse
|
|
303
|
+
|
|
304
|
+
NotificationTemplatePayload = Courier::Models::NotificationTemplatePayload
|
|
305
|
+
|
|
306
|
+
NotificationTemplatePublishRequest = Courier::Models::NotificationTemplatePublishRequest
|
|
307
|
+
|
|
308
|
+
NotificationTemplateState = Courier::Models::NotificationTemplateState
|
|
309
|
+
|
|
310
|
+
NotificationTemplateSummary = Courier::Models::NotificationTemplateSummary
|
|
311
|
+
|
|
312
|
+
NotificationTemplateUpdateRequest = Courier::Models::NotificationTemplateUpdateRequest
|
|
313
|
+
|
|
314
|
+
NotificationTemplateVersionListResponse = Courier::Models::NotificationTemplateVersionListResponse
|
|
315
|
+
|
|
250
316
|
Pagerduty = Courier::Models::Pagerduty
|
|
251
317
|
|
|
252
318
|
PagerdutyRecipient = Courier::Models::PagerdutyRecipient
|
|
@@ -273,6 +339,22 @@ module Courier
|
|
|
273
339
|
|
|
274
340
|
ProfileUpdateParams = Courier::Models::ProfileUpdateParams
|
|
275
341
|
|
|
342
|
+
Provider = Courier::Models::Provider
|
|
343
|
+
|
|
344
|
+
ProviderCreateParams = Courier::Models::ProviderCreateParams
|
|
345
|
+
|
|
346
|
+
ProviderDeleteParams = Courier::Models::ProviderDeleteParams
|
|
347
|
+
|
|
348
|
+
ProviderListParams = Courier::Models::ProviderListParams
|
|
349
|
+
|
|
350
|
+
ProviderRetrieveParams = Courier::Models::ProviderRetrieveParams
|
|
351
|
+
|
|
352
|
+
Providers = Courier::Models::Providers
|
|
353
|
+
|
|
354
|
+
ProvidersCatalogEntry = Courier::Models::ProvidersCatalogEntry
|
|
355
|
+
|
|
356
|
+
ProviderUpdateParams = Courier::Models::ProviderUpdateParams
|
|
357
|
+
|
|
276
358
|
PutSubscriptionsRecipient = Courier::Models::PutSubscriptionsRecipient
|
|
277
359
|
|
|
278
360
|
PutTenantTemplateRequest = Courier::Models::PutTenantTemplateRequest
|
|
@@ -283,6 +365,30 @@ module Courier
|
|
|
283
365
|
|
|
284
366
|
RequestArchiveParams = Courier::Models::RequestArchiveParams
|
|
285
367
|
|
|
368
|
+
RoutingStrategyArchiveParams = Courier::Models::RoutingStrategyArchiveParams
|
|
369
|
+
|
|
370
|
+
RoutingStrategyCreateParams = Courier::Models::RoutingStrategyCreateParams
|
|
371
|
+
|
|
372
|
+
RoutingStrategyCreateRequest = Courier::Models::RoutingStrategyCreateRequest
|
|
373
|
+
|
|
374
|
+
RoutingStrategyGetResponse = Courier::Models::RoutingStrategyGetResponse
|
|
375
|
+
|
|
376
|
+
RoutingStrategyListNotificationsParams = Courier::Models::RoutingStrategyListNotificationsParams
|
|
377
|
+
|
|
378
|
+
RoutingStrategyListParams = Courier::Models::RoutingStrategyListParams
|
|
379
|
+
|
|
380
|
+
RoutingStrategyListResponse = Courier::Models::RoutingStrategyListResponse
|
|
381
|
+
|
|
382
|
+
RoutingStrategyMutationResponse = Courier::Models::RoutingStrategyMutationResponse
|
|
383
|
+
|
|
384
|
+
RoutingStrategyReplaceParams = Courier::Models::RoutingStrategyReplaceParams
|
|
385
|
+
|
|
386
|
+
RoutingStrategyReplaceRequest = Courier::Models::RoutingStrategyReplaceRequest
|
|
387
|
+
|
|
388
|
+
RoutingStrategyRetrieveParams = Courier::Models::RoutingStrategyRetrieveParams
|
|
389
|
+
|
|
390
|
+
RoutingStrategySummary = Courier::Models::RoutingStrategySummary
|
|
391
|
+
|
|
286
392
|
Rule = Courier::Models::Rule
|
|
287
393
|
|
|
288
394
|
SendDirectMessage = Courier::Models::SendDirectMessage
|
|
@@ -339,6 +445,8 @@ module Courier
|
|
|
339
445
|
|
|
340
446
|
TextStyle = Courier::Models::TextStyle
|
|
341
447
|
|
|
448
|
+
Timeouts = Courier::Models::Timeouts
|
|
449
|
+
|
|
342
450
|
Token = Courier::Models::Token
|
|
343
451
|
|
|
344
452
|
TranslationRetrieveParams = Courier::Models::TranslationRetrieveParams
|
|
@@ -355,6 +463,8 @@ module Courier
|
|
|
355
463
|
|
|
356
464
|
Utm = Courier::Models::Utm
|
|
357
465
|
|
|
466
|
+
VersionNode = Courier::Models::VersionNode
|
|
467
|
+
|
|
358
468
|
WebhookAuthentication = Courier::Models::WebhookAuthentication
|
|
359
469
|
|
|
360
470
|
WebhookAuthMode = Courier::Models::WebhookAuthMode
|
|
@@ -3,17 +3,75 @@
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Resources
|
|
5
5
|
class Notifications
|
|
6
|
-
# @return [Courier::Resources::Notifications::Draft]
|
|
7
|
-
attr_reader :draft
|
|
8
|
-
|
|
9
6
|
# @return [Courier::Resources::Notifications::Checks]
|
|
10
7
|
attr_reader :checks
|
|
11
8
|
|
|
12
|
-
#
|
|
9
|
+
# Some parameter documentations has been truncated, see
|
|
10
|
+
# {Courier::Models::NotificationCreateParams} for more details.
|
|
11
|
+
#
|
|
12
|
+
# Create a notification template. Requires all fields in the notification object.
|
|
13
|
+
# Templates are created in draft state by default.
|
|
14
|
+
#
|
|
15
|
+
# @overload create(notification:, state: nil, request_options: {})
|
|
16
|
+
#
|
|
17
|
+
# @param notification [Courier::Models::NotificationTemplatePayload] Full document shape used in POST and PUT request bodies, and returned inside the
|
|
18
|
+
#
|
|
19
|
+
# @param state [Symbol, Courier::Models::NotificationTemplateCreateRequest::State] Template state after creation. Case-insensitive input, normalized to uppercase i
|
|
20
|
+
#
|
|
21
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
22
|
+
#
|
|
23
|
+
# @return [Courier::Models::NotificationTemplateMutationResponse]
|
|
24
|
+
#
|
|
25
|
+
# @see Courier::Models::NotificationCreateParams
|
|
26
|
+
def create(params)
|
|
27
|
+
parsed, options = Courier::NotificationCreateParams.dump_request(params)
|
|
28
|
+
@client.request(
|
|
29
|
+
method: :post,
|
|
30
|
+
path: "notifications",
|
|
31
|
+
body: parsed,
|
|
32
|
+
model: Courier::NotificationTemplateMutationResponse,
|
|
33
|
+
options: options
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Some parameter documentations has been truncated, see
|
|
38
|
+
# {Courier::Models::NotificationRetrieveParams} for more details.
|
|
39
|
+
#
|
|
40
|
+
# Retrieve a notification template by ID. Returns the published version by
|
|
41
|
+
# default. Pass version=draft to retrieve an unpublished template.
|
|
42
|
+
#
|
|
43
|
+
# @overload retrieve(id, version: nil, request_options: {})
|
|
44
|
+
#
|
|
45
|
+
# @param id [String] Template ID (nt\_ prefix).
|
|
46
|
+
#
|
|
47
|
+
# @param version [String] Version to retrieve. One of "draft", "published", or a version string like "v001
|
|
48
|
+
#
|
|
49
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
50
|
+
#
|
|
51
|
+
# @return [Courier::Models::NotificationTemplateGetResponse]
|
|
52
|
+
#
|
|
53
|
+
# @see Courier::Models::NotificationRetrieveParams
|
|
54
|
+
def retrieve(id, params = {})
|
|
55
|
+
parsed, options = Courier::NotificationRetrieveParams.dump_request(params)
|
|
56
|
+
query = Courier::Internal::Util.encode_query_params(parsed)
|
|
57
|
+
@client.request(
|
|
58
|
+
method: :get,
|
|
59
|
+
path: ["notifications/%1$s", id],
|
|
60
|
+
query: query,
|
|
61
|
+
model: Courier::NotificationTemplateGetResponse,
|
|
62
|
+
options: options
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# List notification templates in your workspace.
|
|
67
|
+
#
|
|
68
|
+
# @overload list(cursor: nil, event_id: nil, notes: nil, request_options: {})
|
|
13
69
|
#
|
|
14
|
-
# @param cursor [String, nil]
|
|
70
|
+
# @param cursor [String, nil] Opaque pagination cursor from a previous response. Omit for the first page.
|
|
15
71
|
#
|
|
16
|
-
# @param
|
|
72
|
+
# @param event_id [String] Filter to templates linked to this event map ID.
|
|
73
|
+
#
|
|
74
|
+
# @param notes [Boolean, nil] Include template notes in the response. Only applies to legacy templates.
|
|
17
75
|
#
|
|
18
76
|
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
19
77
|
#
|
|
@@ -32,20 +90,240 @@ module Courier
|
|
|
32
90
|
)
|
|
33
91
|
end
|
|
34
92
|
|
|
35
|
-
#
|
|
93
|
+
# Archive a notification template.
|
|
94
|
+
#
|
|
95
|
+
# @overload archive(id, request_options: {})
|
|
96
|
+
#
|
|
97
|
+
# @param id [String] Template ID (nt\_ prefix).
|
|
36
98
|
#
|
|
37
|
-
# @param id [String]
|
|
38
99
|
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
39
100
|
#
|
|
40
|
-
# @return [
|
|
101
|
+
# @return [nil]
|
|
102
|
+
#
|
|
103
|
+
# @see Courier::Models::NotificationArchiveParams
|
|
104
|
+
def archive(id, params = {})
|
|
105
|
+
@client.request(
|
|
106
|
+
method: :delete,
|
|
107
|
+
path: ["notifications/%1$s", id],
|
|
108
|
+
model: NilClass,
|
|
109
|
+
options: params[:request_options]
|
|
110
|
+
)
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# List versions of a notification template.
|
|
114
|
+
#
|
|
115
|
+
# @overload list_versions(id, cursor: nil, limit: nil, request_options: {})
|
|
116
|
+
#
|
|
117
|
+
# @param id [String] Template ID (nt\_ prefix).
|
|
118
|
+
#
|
|
119
|
+
# @param cursor [String] Opaque pagination cursor from a previous response. Omit for the first page.
|
|
120
|
+
#
|
|
121
|
+
# @param limit [Integer] Maximum number of versions to return per page. Default 10, max 10.
|
|
122
|
+
#
|
|
123
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
124
|
+
#
|
|
125
|
+
# @return [Courier::Models::NotificationTemplateVersionListResponse]
|
|
126
|
+
#
|
|
127
|
+
# @see Courier::Models::NotificationListVersionsParams
|
|
128
|
+
def list_versions(id, params = {})
|
|
129
|
+
parsed, options = Courier::NotificationListVersionsParams.dump_request(params)
|
|
130
|
+
query = Courier::Internal::Util.encode_query_params(parsed)
|
|
131
|
+
@client.request(
|
|
132
|
+
method: :get,
|
|
133
|
+
path: ["notifications/%1$s/versions", id],
|
|
134
|
+
query: query,
|
|
135
|
+
model: Courier::NotificationTemplateVersionListResponse,
|
|
136
|
+
options: options
|
|
137
|
+
)
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Publish a notification template. Publishes the current draft by default. Pass a
|
|
141
|
+
# version in the request body to publish a specific historical version.
|
|
142
|
+
#
|
|
143
|
+
# @overload publish(id, version: nil, request_options: {})
|
|
144
|
+
#
|
|
145
|
+
# @param id [String] Template ID (nt\_ prefix).
|
|
146
|
+
#
|
|
147
|
+
# @param version [String] Historical version to publish (e.g. "v001"). Omit to publish the current draft.
|
|
148
|
+
#
|
|
149
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
150
|
+
#
|
|
151
|
+
# @return [nil]
|
|
152
|
+
#
|
|
153
|
+
# @see Courier::Models::NotificationPublishParams
|
|
154
|
+
def publish(id, params = {})
|
|
155
|
+
parsed, options = Courier::NotificationPublishParams.dump_request(params)
|
|
156
|
+
@client.request(
|
|
157
|
+
method: :post,
|
|
158
|
+
path: ["notifications/%1$s/publish", id],
|
|
159
|
+
body: parsed,
|
|
160
|
+
model: NilClass,
|
|
161
|
+
options: options
|
|
162
|
+
)
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Replace the elemental content of a notification template. Overwrites all
|
|
166
|
+
# elements in the template with the provided content. Only supported for V2
|
|
167
|
+
# (elemental) templates.
|
|
168
|
+
#
|
|
169
|
+
# @overload put_content(id, content:, state: nil, request_options: {})
|
|
170
|
+
#
|
|
171
|
+
# @param id [String] Notification template ID (`nt_` prefix).
|
|
172
|
+
#
|
|
173
|
+
# @param content [Courier::Models::NotificationContentPutRequest::Content] Elemental content payload. The server defaults `version` when omitted.
|
|
174
|
+
#
|
|
175
|
+
# @param state [Symbol, Courier::Models::NotificationTemplateState] Template state. Defaults to `DRAFT`.
|
|
176
|
+
#
|
|
177
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
178
|
+
#
|
|
179
|
+
# @return [Courier::Models::NotificationContentMutationResponse]
|
|
180
|
+
#
|
|
181
|
+
# @see Courier::Models::NotificationPutContentParams
|
|
182
|
+
def put_content(id, params)
|
|
183
|
+
parsed, options = Courier::NotificationPutContentParams.dump_request(params)
|
|
184
|
+
@client.request(
|
|
185
|
+
method: :put,
|
|
186
|
+
path: ["notifications/%1$s/content", id],
|
|
187
|
+
body: parsed,
|
|
188
|
+
model: Courier::NotificationContentMutationResponse,
|
|
189
|
+
options: options
|
|
190
|
+
)
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Update a single element within a notification template. Only supported for V2
|
|
194
|
+
# (elemental) templates.
|
|
195
|
+
#
|
|
196
|
+
# @overload put_element(element_id, id:, type:, channels: nil, data: nil, if_: nil, loop_: nil, ref: nil, state: nil, request_options: {})
|
|
197
|
+
#
|
|
198
|
+
# @param element_id [String] Path param: Element ID within the template.
|
|
199
|
+
#
|
|
200
|
+
# @param id [String] Path param: Notification template ID (`nt_` prefix).
|
|
201
|
+
#
|
|
202
|
+
# @param type [String] Body param: Element type (text, meta, action, image, etc.).
|
|
203
|
+
#
|
|
204
|
+
# @param channels [Array<String>] Body param
|
|
205
|
+
#
|
|
206
|
+
# @param data [Hash{Symbol=>Object}] Body param
|
|
207
|
+
#
|
|
208
|
+
# @param if_ [String] Body param
|
|
209
|
+
#
|
|
210
|
+
# @param loop_ [String] Body param
|
|
211
|
+
#
|
|
212
|
+
# @param ref [String] Body param
|
|
213
|
+
#
|
|
214
|
+
# @param state [Symbol, Courier::Models::NotificationTemplateState] Body param: Template state. Defaults to `DRAFT`.
|
|
215
|
+
#
|
|
216
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
217
|
+
#
|
|
218
|
+
# @return [Courier::Models::NotificationContentMutationResponse]
|
|
219
|
+
#
|
|
220
|
+
# @see Courier::Models::NotificationPutElementParams
|
|
221
|
+
def put_element(element_id, params)
|
|
222
|
+
parsed, options = Courier::NotificationPutElementParams.dump_request(params)
|
|
223
|
+
id =
|
|
224
|
+
parsed.delete(:id) do
|
|
225
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
226
|
+
end
|
|
227
|
+
@client.request(
|
|
228
|
+
method: :put,
|
|
229
|
+
path: ["notifications/%1$s/elements/%2$s", id, element_id],
|
|
230
|
+
body: parsed,
|
|
231
|
+
model: Courier::NotificationContentMutationResponse,
|
|
232
|
+
options: options
|
|
233
|
+
)
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Set locale-specific content overrides for a notification template. Each element
|
|
237
|
+
# override must reference an existing element by ID. Only supported for V2
|
|
238
|
+
# (elemental) templates.
|
|
239
|
+
#
|
|
240
|
+
# @overload put_locale(locale_id, id:, elements:, state: nil, request_options: {})
|
|
241
|
+
#
|
|
242
|
+
# @param locale_id [String] Path param: Locale code (e.g., `es`, `fr`, `pt-BR`).
|
|
243
|
+
#
|
|
244
|
+
# @param id [String] Path param: Notification template ID (`nt_` prefix).
|
|
245
|
+
#
|
|
246
|
+
# @param elements [Array<Courier::Models::NotificationLocalePutRequest::Element>] Body param: Elements with locale-specific content overrides.
|
|
247
|
+
#
|
|
248
|
+
# @param state [Symbol, Courier::Models::NotificationTemplateState] Body param: Template state. Defaults to `DRAFT`.
|
|
249
|
+
#
|
|
250
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
251
|
+
#
|
|
252
|
+
# @return [Courier::Models::NotificationContentMutationResponse]
|
|
253
|
+
#
|
|
254
|
+
# @see Courier::Models::NotificationPutLocaleParams
|
|
255
|
+
def put_locale(locale_id, params)
|
|
256
|
+
parsed, options = Courier::NotificationPutLocaleParams.dump_request(params)
|
|
257
|
+
id =
|
|
258
|
+
parsed.delete(:id) do
|
|
259
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
260
|
+
end
|
|
261
|
+
@client.request(
|
|
262
|
+
method: :put,
|
|
263
|
+
path: ["notifications/%1$s/locales/%2$s", id, locale_id],
|
|
264
|
+
body: parsed,
|
|
265
|
+
model: Courier::NotificationContentMutationResponse,
|
|
266
|
+
options: options
|
|
267
|
+
)
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
# Some parameter documentations has been truncated, see
|
|
271
|
+
# {Courier::Models::NotificationReplaceParams} for more details.
|
|
272
|
+
#
|
|
273
|
+
# Replace a notification template. All fields are required.
|
|
274
|
+
#
|
|
275
|
+
# @overload replace(id, notification:, state: nil, request_options: {})
|
|
276
|
+
#
|
|
277
|
+
# @param id [String] Template ID (nt\_ prefix).
|
|
278
|
+
#
|
|
279
|
+
# @param notification [Courier::Models::NotificationTemplatePayload] Full document shape used in POST and PUT request bodies, and returned inside the
|
|
280
|
+
#
|
|
281
|
+
# @param state [Symbol, Courier::Models::NotificationTemplateUpdateRequest::State] Template state after update. Case-insensitive input, normalized to uppercase in
|
|
282
|
+
#
|
|
283
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
284
|
+
#
|
|
285
|
+
# @return [Courier::Models::NotificationTemplateMutationResponse]
|
|
286
|
+
#
|
|
287
|
+
# @see Courier::Models::NotificationReplaceParams
|
|
288
|
+
def replace(id, params)
|
|
289
|
+
parsed, options = Courier::NotificationReplaceParams.dump_request(params)
|
|
290
|
+
@client.request(
|
|
291
|
+
method: :put,
|
|
292
|
+
path: ["notifications/%1$s", id],
|
|
293
|
+
body: parsed,
|
|
294
|
+
model: Courier::NotificationTemplateMutationResponse,
|
|
295
|
+
options: options
|
|
296
|
+
)
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
# Some parameter documentations has been truncated, see
|
|
300
|
+
# {Courier::Models::NotificationRetrieveContentParams} for more details.
|
|
301
|
+
#
|
|
302
|
+
# Retrieve the content of a notification template. The response shape depends on
|
|
303
|
+
# whether the template uses V1 (blocks/channels) or V2 (elemental) content. Use
|
|
304
|
+
# the `version` query parameter to select draft, published, or a specific
|
|
305
|
+
# historical version.
|
|
306
|
+
#
|
|
307
|
+
# @overload retrieve_content(id, version: nil, request_options: {})
|
|
308
|
+
#
|
|
309
|
+
# @param id [String] Notification template ID (`nt_` prefix).
|
|
310
|
+
#
|
|
311
|
+
# @param version [String] Accepts `draft`, `published`, or a version string (e.g., `v001`). Defaults to `p
|
|
312
|
+
#
|
|
313
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
314
|
+
#
|
|
315
|
+
# @return [Courier::Models::NotificationContentGetResponse, Courier::Models::NotificationGetContent]
|
|
41
316
|
#
|
|
42
317
|
# @see Courier::Models::NotificationRetrieveContentParams
|
|
43
318
|
def retrieve_content(id, params = {})
|
|
319
|
+
parsed, options = Courier::NotificationRetrieveContentParams.dump_request(params)
|
|
320
|
+
query = Courier::Internal::Util.encode_query_params(parsed)
|
|
44
321
|
@client.request(
|
|
45
322
|
method: :get,
|
|
46
323
|
path: ["notifications/%1$s/content", id],
|
|
47
|
-
|
|
48
|
-
|
|
324
|
+
query: query,
|
|
325
|
+
model: Courier::Models::NotificationRetrieveContentResponse,
|
|
326
|
+
options: options
|
|
49
327
|
)
|
|
50
328
|
end
|
|
51
329
|
|
|
@@ -54,7 +332,6 @@ module Courier
|
|
|
54
332
|
# @param client [Courier::Client]
|
|
55
333
|
def initialize(client:)
|
|
56
334
|
@client = client
|
|
57
|
-
@draft = Courier::Resources::Notifications::Draft.new(client: client)
|
|
58
335
|
@checks = Courier::Resources::Notifications::Checks.new(client: client)
|
|
59
336
|
end
|
|
60
337
|
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Resources
|
|
5
|
+
class Providers
|
|
6
|
+
class Catalog
|
|
7
|
+
# Some parameter documentations has been truncated, see
|
|
8
|
+
# {Courier::Models::Providers::CatalogListParams} for more details.
|
|
9
|
+
#
|
|
10
|
+
# Returns the catalog of available provider types with their display names,
|
|
11
|
+
# descriptions, and configuration schema fields (snake_case, with `type` and
|
|
12
|
+
# `required`). Providers with no configurable schema return only `provider`,
|
|
13
|
+
# `name`, and `description`.
|
|
14
|
+
#
|
|
15
|
+
# @overload list(channel: nil, keys: nil, name: nil, request_options: {})
|
|
16
|
+
#
|
|
17
|
+
# @param channel [String] Exact match (case-insensitive) against the provider channel taxonomy (e.g. `emai
|
|
18
|
+
#
|
|
19
|
+
# @param keys [String] Comma-separated provider keys to filter by (e.g. `sendgrid,twilio`).
|
|
20
|
+
#
|
|
21
|
+
# @param name [String] Case-insensitive substring match against the provider display name.
|
|
22
|
+
#
|
|
23
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
24
|
+
#
|
|
25
|
+
# @return [Courier::Models::Providers::CatalogListResponse]
|
|
26
|
+
#
|
|
27
|
+
# @see Courier::Models::Providers::CatalogListParams
|
|
28
|
+
def list(params = {})
|
|
29
|
+
parsed, options = Courier::Providers::CatalogListParams.dump_request(params)
|
|
30
|
+
query = Courier::Internal::Util.encode_query_params(parsed)
|
|
31
|
+
@client.request(
|
|
32
|
+
method: :get,
|
|
33
|
+
path: "providers/catalog",
|
|
34
|
+
query: query,
|
|
35
|
+
model: Courier::Models::Providers::CatalogListResponse,
|
|
36
|
+
options: options
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# @api private
|
|
41
|
+
#
|
|
42
|
+
# @param client [Courier::Client]
|
|
43
|
+
def initialize(client:)
|
|
44
|
+
@client = client
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|