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
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class RoutingStrategySummary < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute id
|
|
7
|
+
# The routing strategy ID (rs\_ prefix).
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute created
|
|
13
|
+
# Epoch milliseconds when the strategy was created.
|
|
14
|
+
#
|
|
15
|
+
# @return [Integer]
|
|
16
|
+
required :created, Integer
|
|
17
|
+
|
|
18
|
+
# @!attribute creator
|
|
19
|
+
# User ID of the creator.
|
|
20
|
+
#
|
|
21
|
+
# @return [String]
|
|
22
|
+
required :creator, String
|
|
23
|
+
|
|
24
|
+
# @!attribute name
|
|
25
|
+
# Human-readable name.
|
|
26
|
+
#
|
|
27
|
+
# @return [String]
|
|
28
|
+
required :name, String
|
|
29
|
+
|
|
30
|
+
# @!attribute description
|
|
31
|
+
# Description of the routing strategy.
|
|
32
|
+
#
|
|
33
|
+
# @return [String, nil]
|
|
34
|
+
optional :description, String, nil?: true
|
|
35
|
+
|
|
36
|
+
# @!attribute tags
|
|
37
|
+
# Tags for categorization.
|
|
38
|
+
#
|
|
39
|
+
# @return [Array<String>, nil]
|
|
40
|
+
optional :tags, Courier::Internal::Type::ArrayOf[String], nil?: true
|
|
41
|
+
|
|
42
|
+
# @!attribute updated
|
|
43
|
+
# Epoch milliseconds of last update.
|
|
44
|
+
#
|
|
45
|
+
# @return [Integer, nil]
|
|
46
|
+
optional :updated, Integer, nil?: true
|
|
47
|
+
|
|
48
|
+
# @!attribute updater
|
|
49
|
+
# User ID of the last updater.
|
|
50
|
+
#
|
|
51
|
+
# @return [String, nil]
|
|
52
|
+
optional :updater, String, nil?: true
|
|
53
|
+
|
|
54
|
+
# @!method initialize(id:, created:, creator:, name:, description: nil, tags: nil, updated: nil, updater: nil)
|
|
55
|
+
# Routing strategy metadata returned in list responses. Does not include
|
|
56
|
+
# routing/channels/providers content.
|
|
57
|
+
#
|
|
58
|
+
# @param id [String] The routing strategy ID (rs\_ prefix).
|
|
59
|
+
#
|
|
60
|
+
# @param created [Integer] Epoch milliseconds when the strategy was created.
|
|
61
|
+
#
|
|
62
|
+
# @param creator [String] User ID of the creator.
|
|
63
|
+
#
|
|
64
|
+
# @param name [String] Human-readable name.
|
|
65
|
+
#
|
|
66
|
+
# @param description [String, nil] Description of the routing strategy.
|
|
67
|
+
#
|
|
68
|
+
# @param tags [Array<String>, nil] Tags for categorization.
|
|
69
|
+
#
|
|
70
|
+
# @param updated [Integer, nil] Epoch milliseconds of last update.
|
|
71
|
+
#
|
|
72
|
+
# @param updater [String, nil] User ID of the last updater.
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
@@ -32,10 +32,8 @@ module Courier
|
|
|
32
32
|
# Define run-time configuration for channels. Valid ChannelId's: email, sms, push,
|
|
33
33
|
# inbox, direct_message, banner, webhook.
|
|
34
34
|
#
|
|
35
|
-
# @return [Hash{Symbol=>Courier::Models::
|
|
36
|
-
optional :channels,
|
|
37
|
-
-> { Courier::Internal::Type::HashOf[Courier::SendMessageParams::Message::Channel] },
|
|
38
|
-
nil?: true
|
|
35
|
+
# @return [Hash{Symbol=>Courier::Models::Channel}, nil]
|
|
36
|
+
optional :channels, -> { Courier::Internal::Type::HashOf[Courier::Channel] }, nil?: true
|
|
39
37
|
|
|
40
38
|
# @!attribute content
|
|
41
39
|
# Describes content that will work for email, inbox, push, chat, or any channel
|
|
@@ -76,10 +74,8 @@ module Courier
|
|
|
76
74
|
|
|
77
75
|
# @!attribute providers
|
|
78
76
|
#
|
|
79
|
-
# @return [Hash{Symbol=>Courier::Models::
|
|
80
|
-
optional :providers,
|
|
81
|
-
-> { Courier::Internal::Type::HashOf[Courier::SendMessageParams::Message::Provider] },
|
|
82
|
-
nil?: true
|
|
77
|
+
# @return [Hash{Symbol=>Courier::Models::MessageProvidersType}, nil]
|
|
78
|
+
optional :providers, -> { Courier::Internal::Type::HashOf[Courier::MessageProvidersType] }, nil?: true
|
|
83
79
|
|
|
84
80
|
# @!attribute routing
|
|
85
81
|
# Customize which channels/providers Courier may deliver the message through.
|
|
@@ -112,7 +108,7 @@ module Courier
|
|
|
112
108
|
#
|
|
113
109
|
# @param brand_id [String, nil]
|
|
114
110
|
#
|
|
115
|
-
# @param channels [Hash{Symbol=>Courier::Models::
|
|
111
|
+
# @param channels [Hash{Symbol=>Courier::Models::Channel}, nil] Define run-time configuration for channels. Valid ChannelId's: email, sms, push,
|
|
116
112
|
#
|
|
117
113
|
# @param content [Courier::Models::ElementalContentSugar, Courier::Models::ElementalContent] Describes content that will work for email, inbox, push, chat, or any channel id
|
|
118
114
|
#
|
|
@@ -128,7 +124,7 @@ module Courier
|
|
|
128
124
|
#
|
|
129
125
|
# @param preferences [Courier::Models::SendMessageParams::Message::Preferences, nil]
|
|
130
126
|
#
|
|
131
|
-
# @param providers [Hash{Symbol=>Courier::Models::
|
|
127
|
+
# @param providers [Hash{Symbol=>Courier::Models::MessageProvidersType}, nil]
|
|
132
128
|
#
|
|
133
129
|
# @param routing [Courier::Models::SendMessageParams::Message::Routing, nil] Customize which channels/providers Courier may deliver the message through.
|
|
134
130
|
#
|
|
@@ -138,106 +134,6 @@ module Courier
|
|
|
138
134
|
#
|
|
139
135
|
# @param to [Courier::Models::UserRecipient, Courier::Models::AudienceRecipient, Courier::Models::ListRecipient, Courier::Models::ListPatternRecipient, Courier::Models::SlackRecipient, Courier::Models::MsTeamsRecipient, Courier::Models::PagerdutyRecipient, Courier::Models::WebhookRecipient, Array<Courier::Models::UserRecipient, Courier::Models::AudienceRecipient, Courier::Models::ListRecipient, Courier::Models::ListPatternRecipient, Courier::Models::SlackRecipient, Courier::Models::MsTeamsRecipient, Courier::Models::PagerdutyRecipient, Courier::Models::WebhookRecipient>, nil] The recipient or a list of recipients of the message
|
|
140
136
|
|
|
141
|
-
class Channel < Courier::Internal::Type::BaseModel
|
|
142
|
-
# @!attribute brand_id
|
|
143
|
-
# Brand id used for rendering.
|
|
144
|
-
#
|
|
145
|
-
# @return [String, nil]
|
|
146
|
-
optional :brand_id, String, nil?: true
|
|
147
|
-
|
|
148
|
-
# @!attribute if_
|
|
149
|
-
# JS conditional with access to data/profile.
|
|
150
|
-
#
|
|
151
|
-
# @return [String, nil]
|
|
152
|
-
optional :if_, String, api_name: :if, nil?: true
|
|
153
|
-
|
|
154
|
-
# @!attribute metadata
|
|
155
|
-
#
|
|
156
|
-
# @return [Courier::Models::SendMessageParams::Message::Channel::Metadata, nil]
|
|
157
|
-
optional :metadata, -> { Courier::SendMessageParams::Message::Channel::Metadata }, nil?: true
|
|
158
|
-
|
|
159
|
-
# @!attribute override
|
|
160
|
-
# Channel specific overrides.
|
|
161
|
-
#
|
|
162
|
-
# @return [Hash{Symbol=>Object}, nil]
|
|
163
|
-
optional :override, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown], nil?: true
|
|
164
|
-
|
|
165
|
-
# @!attribute providers
|
|
166
|
-
# Providers enabled for this channel.
|
|
167
|
-
#
|
|
168
|
-
# @return [Array<String>, nil]
|
|
169
|
-
optional :providers, Courier::Internal::Type::ArrayOf[String], nil?: true
|
|
170
|
-
|
|
171
|
-
# @!attribute routing_method
|
|
172
|
-
# Defaults to `single`.
|
|
173
|
-
#
|
|
174
|
-
# @return [Symbol, Courier::Models::SendMessageParams::Message::Channel::RoutingMethod, nil]
|
|
175
|
-
optional :routing_method,
|
|
176
|
-
enum: -> { Courier::SendMessageParams::Message::Channel::RoutingMethod },
|
|
177
|
-
nil?: true
|
|
178
|
-
|
|
179
|
-
# @!attribute timeouts
|
|
180
|
-
#
|
|
181
|
-
# @return [Courier::Models::SendMessageParams::Message::Channel::Timeouts, nil]
|
|
182
|
-
optional :timeouts, -> { Courier::SendMessageParams::Message::Channel::Timeouts }, nil?: true
|
|
183
|
-
|
|
184
|
-
# @!method initialize(brand_id: nil, if_: nil, metadata: nil, override: nil, providers: nil, routing_method: nil, timeouts: nil)
|
|
185
|
-
# @param brand_id [String, nil] Brand id used for rendering.
|
|
186
|
-
#
|
|
187
|
-
# @param if_ [String, nil] JS conditional with access to data/profile.
|
|
188
|
-
#
|
|
189
|
-
# @param metadata [Courier::Models::SendMessageParams::Message::Channel::Metadata, nil]
|
|
190
|
-
#
|
|
191
|
-
# @param override [Hash{Symbol=>Object}, nil] Channel specific overrides.
|
|
192
|
-
#
|
|
193
|
-
# @param providers [Array<String>, nil] Providers enabled for this channel.
|
|
194
|
-
#
|
|
195
|
-
# @param routing_method [Symbol, Courier::Models::SendMessageParams::Message::Channel::RoutingMethod, nil] Defaults to `single`.
|
|
196
|
-
#
|
|
197
|
-
# @param timeouts [Courier::Models::SendMessageParams::Message::Channel::Timeouts, nil]
|
|
198
|
-
|
|
199
|
-
# @see Courier::Models::SendMessageParams::Message::Channel#metadata
|
|
200
|
-
class Metadata < Courier::Internal::Type::BaseModel
|
|
201
|
-
# @!attribute utm
|
|
202
|
-
#
|
|
203
|
-
# @return [Courier::Models::Utm, nil]
|
|
204
|
-
optional :utm, -> { Courier::Utm }, nil?: true
|
|
205
|
-
|
|
206
|
-
# @!method initialize(utm: nil)
|
|
207
|
-
# @param utm [Courier::Models::Utm, nil]
|
|
208
|
-
end
|
|
209
|
-
|
|
210
|
-
# Defaults to `single`.
|
|
211
|
-
#
|
|
212
|
-
# @see Courier::Models::SendMessageParams::Message::Channel#routing_method
|
|
213
|
-
module RoutingMethod
|
|
214
|
-
extend Courier::Internal::Type::Enum
|
|
215
|
-
|
|
216
|
-
ALL = :all
|
|
217
|
-
SINGLE = :single
|
|
218
|
-
|
|
219
|
-
# @!method self.values
|
|
220
|
-
# @return [Array<Symbol>]
|
|
221
|
-
end
|
|
222
|
-
|
|
223
|
-
# @see Courier::Models::SendMessageParams::Message::Channel#timeouts
|
|
224
|
-
class Timeouts < Courier::Internal::Type::BaseModel
|
|
225
|
-
# @!attribute channel
|
|
226
|
-
#
|
|
227
|
-
# @return [Integer, nil]
|
|
228
|
-
optional :channel, Integer, nil?: true
|
|
229
|
-
|
|
230
|
-
# @!attribute provider
|
|
231
|
-
#
|
|
232
|
-
# @return [Integer, nil]
|
|
233
|
-
optional :provider, Integer, nil?: true
|
|
234
|
-
|
|
235
|
-
# @!method initialize(channel: nil, provider: nil)
|
|
236
|
-
# @param channel [Integer, nil]
|
|
237
|
-
# @param provider [Integer, nil]
|
|
238
|
-
end
|
|
239
|
-
end
|
|
240
|
-
|
|
241
137
|
# Describes content that will work for email, inbox, push, chat, or any channel
|
|
242
138
|
# id.
|
|
243
139
|
#
|
|
@@ -362,50 +258,6 @@ module Courier
|
|
|
362
258
|
# @param subscription_topic_id [String] The subscription topic to apply to the message.
|
|
363
259
|
end
|
|
364
260
|
|
|
365
|
-
class Provider < Courier::Internal::Type::BaseModel
|
|
366
|
-
# @!attribute if_
|
|
367
|
-
# JS conditional with access to data/profile.
|
|
368
|
-
#
|
|
369
|
-
# @return [String, nil]
|
|
370
|
-
optional :if_, String, api_name: :if, nil?: true
|
|
371
|
-
|
|
372
|
-
# @!attribute metadata
|
|
373
|
-
#
|
|
374
|
-
# @return [Courier::Models::SendMessageParams::Message::Provider::Metadata, nil]
|
|
375
|
-
optional :metadata, -> { Courier::SendMessageParams::Message::Provider::Metadata }, nil?: true
|
|
376
|
-
|
|
377
|
-
# @!attribute override
|
|
378
|
-
# Provider-specific overrides.
|
|
379
|
-
#
|
|
380
|
-
# @return [Hash{Symbol=>Object}, nil]
|
|
381
|
-
optional :override, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown], nil?: true
|
|
382
|
-
|
|
383
|
-
# @!attribute timeouts
|
|
384
|
-
#
|
|
385
|
-
# @return [Integer, nil]
|
|
386
|
-
optional :timeouts, Integer, nil?: true
|
|
387
|
-
|
|
388
|
-
# @!method initialize(if_: nil, metadata: nil, override: nil, timeouts: nil)
|
|
389
|
-
# @param if_ [String, nil] JS conditional with access to data/profile.
|
|
390
|
-
#
|
|
391
|
-
# @param metadata [Courier::Models::SendMessageParams::Message::Provider::Metadata, nil]
|
|
392
|
-
#
|
|
393
|
-
# @param override [Hash{Symbol=>Object}, nil] Provider-specific overrides.
|
|
394
|
-
#
|
|
395
|
-
# @param timeouts [Integer, nil]
|
|
396
|
-
|
|
397
|
-
# @see Courier::Models::SendMessageParams::Message::Provider#metadata
|
|
398
|
-
class Metadata < Courier::Internal::Type::BaseModel
|
|
399
|
-
# @!attribute utm
|
|
400
|
-
#
|
|
401
|
-
# @return [Courier::Models::Utm, nil]
|
|
402
|
-
optional :utm, -> { Courier::Utm }, nil?: true
|
|
403
|
-
|
|
404
|
-
# @!method initialize(utm: nil)
|
|
405
|
-
# @param utm [Courier::Models::Utm, nil]
|
|
406
|
-
end
|
|
407
|
-
end
|
|
408
|
-
|
|
409
261
|
# @see Courier::Models::SendMessageParams::Message#routing
|
|
410
262
|
class Routing < Courier::Internal::Type::BaseModel
|
|
411
263
|
# @!attribute channels
|
|
@@ -12,15 +12,15 @@ module Courier
|
|
|
12
12
|
# @!attribute channels
|
|
13
13
|
# Channel-specific delivery configuration (email, SMS, push, etc.)
|
|
14
14
|
#
|
|
15
|
-
# @return [Hash{Symbol=>Courier::Models::
|
|
16
|
-
optional :channels, -> { Courier::Internal::Type::HashOf[Courier::
|
|
15
|
+
# @return [Hash{Symbol=>Courier::Models::Channel}, nil]
|
|
16
|
+
optional :channels, -> { Courier::Internal::Type::HashOf[Courier::Channel] }
|
|
17
17
|
|
|
18
18
|
# @!attribute providers
|
|
19
19
|
# Provider-specific delivery configuration for routing to specific email/SMS
|
|
20
20
|
# providers
|
|
21
21
|
#
|
|
22
|
-
# @return [Hash{Symbol=>Courier::Models::
|
|
23
|
-
optional :providers, -> { Courier::Internal::Type::HashOf[Courier::
|
|
22
|
+
# @return [Hash{Symbol=>Courier::Models::MessageProvidersType}, nil]
|
|
23
|
+
optional :providers, -> { Courier::Internal::Type::HashOf[Courier::MessageProvidersType] }
|
|
24
24
|
|
|
25
25
|
# @!attribute routing
|
|
26
26
|
# Message routing configuration for multi-channel delivery strategies
|
|
@@ -36,157 +36,11 @@ module Courier
|
|
|
36
36
|
#
|
|
37
37
|
# @param content [Courier::Models::ElementalContent] Template content configuration including blocks, elements, and message structure
|
|
38
38
|
#
|
|
39
|
-
# @param channels [Hash{Symbol=>Courier::Models::
|
|
39
|
+
# @param channels [Hash{Symbol=>Courier::Models::Channel}] Channel-specific delivery configuration (email, SMS, push, etc.)
|
|
40
40
|
#
|
|
41
|
-
# @param providers [Hash{Symbol=>Courier::Models::
|
|
41
|
+
# @param providers [Hash{Symbol=>Courier::Models::MessageProvidersType}] Provider-specific delivery configuration for routing to specific email/SMS provi
|
|
42
42
|
#
|
|
43
43
|
# @param routing [Courier::Models::MessageRouting] Message routing configuration for multi-channel delivery strategies
|
|
44
|
-
|
|
45
|
-
class Channel < Courier::Internal::Type::BaseModel
|
|
46
|
-
# @!attribute brand_id
|
|
47
|
-
# Brand id used for rendering.
|
|
48
|
-
#
|
|
49
|
-
# @return [String, nil]
|
|
50
|
-
optional :brand_id, String, nil?: true
|
|
51
|
-
|
|
52
|
-
# @!attribute if_
|
|
53
|
-
# JS conditional with access to data/profile.
|
|
54
|
-
#
|
|
55
|
-
# @return [String, nil]
|
|
56
|
-
optional :if_, String, api_name: :if, nil?: true
|
|
57
|
-
|
|
58
|
-
# @!attribute metadata
|
|
59
|
-
#
|
|
60
|
-
# @return [Courier::Models::TenantTemplateInput::Channel::Metadata, nil]
|
|
61
|
-
optional :metadata, -> { Courier::TenantTemplateInput::Channel::Metadata }, nil?: true
|
|
62
|
-
|
|
63
|
-
# @!attribute override
|
|
64
|
-
# Channel specific overrides.
|
|
65
|
-
#
|
|
66
|
-
# @return [Hash{Symbol=>Object}, nil]
|
|
67
|
-
optional :override, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown], nil?: true
|
|
68
|
-
|
|
69
|
-
# @!attribute providers
|
|
70
|
-
# Providers enabled for this channel.
|
|
71
|
-
#
|
|
72
|
-
# @return [Array<String>, nil]
|
|
73
|
-
optional :providers, Courier::Internal::Type::ArrayOf[String], nil?: true
|
|
74
|
-
|
|
75
|
-
# @!attribute routing_method
|
|
76
|
-
# Defaults to `single`.
|
|
77
|
-
#
|
|
78
|
-
# @return [Symbol, Courier::Models::TenantTemplateInput::Channel::RoutingMethod, nil]
|
|
79
|
-
optional :routing_method,
|
|
80
|
-
enum: -> {
|
|
81
|
-
Courier::TenantTemplateInput::Channel::RoutingMethod
|
|
82
|
-
},
|
|
83
|
-
nil?: true
|
|
84
|
-
|
|
85
|
-
# @!attribute timeouts
|
|
86
|
-
#
|
|
87
|
-
# @return [Courier::Models::TenantTemplateInput::Channel::Timeouts, nil]
|
|
88
|
-
optional :timeouts, -> { Courier::TenantTemplateInput::Channel::Timeouts }, nil?: true
|
|
89
|
-
|
|
90
|
-
# @!method initialize(brand_id: nil, if_: nil, metadata: nil, override: nil, providers: nil, routing_method: nil, timeouts: nil)
|
|
91
|
-
# @param brand_id [String, nil] Brand id used for rendering.
|
|
92
|
-
#
|
|
93
|
-
# @param if_ [String, nil] JS conditional with access to data/profile.
|
|
94
|
-
#
|
|
95
|
-
# @param metadata [Courier::Models::TenantTemplateInput::Channel::Metadata, nil]
|
|
96
|
-
#
|
|
97
|
-
# @param override [Hash{Symbol=>Object}, nil] Channel specific overrides.
|
|
98
|
-
#
|
|
99
|
-
# @param providers [Array<String>, nil] Providers enabled for this channel.
|
|
100
|
-
#
|
|
101
|
-
# @param routing_method [Symbol, Courier::Models::TenantTemplateInput::Channel::RoutingMethod, nil] Defaults to `single`.
|
|
102
|
-
#
|
|
103
|
-
# @param timeouts [Courier::Models::TenantTemplateInput::Channel::Timeouts, nil]
|
|
104
|
-
|
|
105
|
-
# @see Courier::Models::TenantTemplateInput::Channel#metadata
|
|
106
|
-
class Metadata < Courier::Internal::Type::BaseModel
|
|
107
|
-
# @!attribute utm
|
|
108
|
-
#
|
|
109
|
-
# @return [Courier::Models::Utm, nil]
|
|
110
|
-
optional :utm, -> { Courier::Utm }, nil?: true
|
|
111
|
-
|
|
112
|
-
# @!method initialize(utm: nil)
|
|
113
|
-
# @param utm [Courier::Models::Utm, nil]
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
# Defaults to `single`.
|
|
117
|
-
#
|
|
118
|
-
# @see Courier::Models::TenantTemplateInput::Channel#routing_method
|
|
119
|
-
module RoutingMethod
|
|
120
|
-
extend Courier::Internal::Type::Enum
|
|
121
|
-
|
|
122
|
-
ALL = :all
|
|
123
|
-
SINGLE = :single
|
|
124
|
-
|
|
125
|
-
# @!method self.values
|
|
126
|
-
# @return [Array<Symbol>]
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
# @see Courier::Models::TenantTemplateInput::Channel#timeouts
|
|
130
|
-
class Timeouts < Courier::Internal::Type::BaseModel
|
|
131
|
-
# @!attribute channel
|
|
132
|
-
#
|
|
133
|
-
# @return [Integer, nil]
|
|
134
|
-
optional :channel, Integer, nil?: true
|
|
135
|
-
|
|
136
|
-
# @!attribute provider
|
|
137
|
-
#
|
|
138
|
-
# @return [Integer, nil]
|
|
139
|
-
optional :provider, Integer, nil?: true
|
|
140
|
-
|
|
141
|
-
# @!method initialize(channel: nil, provider: nil)
|
|
142
|
-
# @param channel [Integer, nil]
|
|
143
|
-
# @param provider [Integer, nil]
|
|
144
|
-
end
|
|
145
|
-
end
|
|
146
|
-
|
|
147
|
-
class Provider < Courier::Internal::Type::BaseModel
|
|
148
|
-
# @!attribute if_
|
|
149
|
-
# JS conditional with access to data/profile.
|
|
150
|
-
#
|
|
151
|
-
# @return [String, nil]
|
|
152
|
-
optional :if_, String, api_name: :if, nil?: true
|
|
153
|
-
|
|
154
|
-
# @!attribute metadata
|
|
155
|
-
#
|
|
156
|
-
# @return [Courier::Models::TenantTemplateInput::Provider::Metadata, nil]
|
|
157
|
-
optional :metadata, -> { Courier::TenantTemplateInput::Provider::Metadata }, nil?: true
|
|
158
|
-
|
|
159
|
-
# @!attribute override
|
|
160
|
-
# Provider-specific overrides.
|
|
161
|
-
#
|
|
162
|
-
# @return [Hash{Symbol=>Object}, nil]
|
|
163
|
-
optional :override, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown], nil?: true
|
|
164
|
-
|
|
165
|
-
# @!attribute timeouts
|
|
166
|
-
#
|
|
167
|
-
# @return [Integer, nil]
|
|
168
|
-
optional :timeouts, Integer, nil?: true
|
|
169
|
-
|
|
170
|
-
# @!method initialize(if_: nil, metadata: nil, override: nil, timeouts: nil)
|
|
171
|
-
# @param if_ [String, nil] JS conditional with access to data/profile.
|
|
172
|
-
#
|
|
173
|
-
# @param metadata [Courier::Models::TenantTemplateInput::Provider::Metadata, nil]
|
|
174
|
-
#
|
|
175
|
-
# @param override [Hash{Symbol=>Object}, nil] Provider-specific overrides.
|
|
176
|
-
#
|
|
177
|
-
# @param timeouts [Integer, nil]
|
|
178
|
-
|
|
179
|
-
# @see Courier::Models::TenantTemplateInput::Provider#metadata
|
|
180
|
-
class Metadata < Courier::Internal::Type::BaseModel
|
|
181
|
-
# @!attribute utm
|
|
182
|
-
#
|
|
183
|
-
# @return [Courier::Models::Utm, nil]
|
|
184
|
-
optional :utm, -> { Courier::Utm }, nil?: true
|
|
185
|
-
|
|
186
|
-
# @!method initialize(utm: nil)
|
|
187
|
-
# @param utm [Courier::Models::Utm, nil]
|
|
188
|
-
end
|
|
189
|
-
end
|
|
190
44
|
end
|
|
191
45
|
end
|
|
192
46
|
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class Timeouts < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute channel
|
|
7
|
+
#
|
|
8
|
+
# @return [Integer, nil]
|
|
9
|
+
optional :channel, Integer, nil?: true
|
|
10
|
+
|
|
11
|
+
# @!attribute provider
|
|
12
|
+
#
|
|
13
|
+
# @return [Integer, nil]
|
|
14
|
+
optional :provider, Integer, nil?: true
|
|
15
|
+
|
|
16
|
+
# @!method initialize(channel: nil, provider: nil)
|
|
17
|
+
# @param channel [Integer, nil]
|
|
18
|
+
# @param provider [Integer, nil]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class VersionNode < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute created
|
|
7
|
+
# Epoch milliseconds when this version was created.
|
|
8
|
+
#
|
|
9
|
+
# @return [Integer]
|
|
10
|
+
required :created, Integer
|
|
11
|
+
|
|
12
|
+
# @!attribute creator
|
|
13
|
+
# User ID of the version creator.
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :creator, String
|
|
17
|
+
|
|
18
|
+
# @!attribute version
|
|
19
|
+
# Version identifier. One of "draft", "published:vNNN" (current published
|
|
20
|
+
# version), or "vNNN" (historical version).
|
|
21
|
+
#
|
|
22
|
+
# @return [String]
|
|
23
|
+
required :version, String
|
|
24
|
+
|
|
25
|
+
# @!attribute has_changes
|
|
26
|
+
# Whether the draft has unpublished changes. Only present on the draft version.
|
|
27
|
+
#
|
|
28
|
+
# @return [Boolean, nil]
|
|
29
|
+
optional :has_changes, Courier::Internal::Type::Boolean
|
|
30
|
+
|
|
31
|
+
# @!method initialize(created:, creator:, version:, has_changes: nil)
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {Courier::Models::VersionNode} for more details.
|
|
34
|
+
#
|
|
35
|
+
# A version entry for a notification template.
|
|
36
|
+
#
|
|
37
|
+
# @param created [Integer] Epoch milliseconds when this version was created.
|
|
38
|
+
#
|
|
39
|
+
# @param creator [String] User ID of the version creator.
|
|
40
|
+
#
|
|
41
|
+
# @param version [String] Version identifier. One of "draft", "published:vNNN" (current published version)
|
|
42
|
+
#
|
|
43
|
+
# @param has_changes [Boolean] Whether the draft has unpublished changes. Only present on the draft version.
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|