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,58 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Providers#update
|
|
6
|
+
class ProviderUpdateParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute provider
|
|
16
|
+
# The provider key identifying the type.
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :provider, String
|
|
20
|
+
|
|
21
|
+
# @!attribute alias_
|
|
22
|
+
# Updated alias. Omit to clear.
|
|
23
|
+
#
|
|
24
|
+
# @return [String, nil]
|
|
25
|
+
optional :alias_, String, api_name: :alias
|
|
26
|
+
|
|
27
|
+
# @!attribute settings
|
|
28
|
+
# Provider-specific settings (snake_case keys). Replaces the full settings object
|
|
29
|
+
# — omitted settings fields are removed. Use the catalog endpoint to check
|
|
30
|
+
# required fields.
|
|
31
|
+
#
|
|
32
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
33
|
+
optional :settings, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown]
|
|
34
|
+
|
|
35
|
+
# @!attribute title
|
|
36
|
+
# Updated display title.
|
|
37
|
+
#
|
|
38
|
+
# @return [String, nil]
|
|
39
|
+
optional :title, String
|
|
40
|
+
|
|
41
|
+
# @!method initialize(id:, provider:, alias_: nil, settings: nil, title: nil, request_options: {})
|
|
42
|
+
# Some parameter documentations has been truncated, see
|
|
43
|
+
# {Courier::Models::ProviderUpdateParams} for more details.
|
|
44
|
+
#
|
|
45
|
+
# @param id [String]
|
|
46
|
+
#
|
|
47
|
+
# @param provider [String] The provider key identifying the type.
|
|
48
|
+
#
|
|
49
|
+
# @param alias_ [String] Updated alias. Omit to clear.
|
|
50
|
+
#
|
|
51
|
+
# @param settings [Hash{Symbol=>Object}] Provider-specific settings (snake_case keys). Replaces the full settings object
|
|
52
|
+
#
|
|
53
|
+
# @param title [String] Updated display title.
|
|
54
|
+
#
|
|
55
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Providers
|
|
6
|
+
# @see Courier::Resources::Providers::Catalog#list
|
|
7
|
+
class CatalogListParams < Courier::Internal::Type::BaseModel
|
|
8
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Courier::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute channel
|
|
12
|
+
# Exact match (case-insensitive) against the provider channel taxonomy (e.g.
|
|
13
|
+
# `email`, `sms`, `push`).
|
|
14
|
+
#
|
|
15
|
+
# @return [String, nil]
|
|
16
|
+
optional :channel, String
|
|
17
|
+
|
|
18
|
+
# @!attribute keys
|
|
19
|
+
# Comma-separated provider keys to filter by (e.g. `sendgrid,twilio`).
|
|
20
|
+
#
|
|
21
|
+
# @return [String, nil]
|
|
22
|
+
optional :keys, String
|
|
23
|
+
|
|
24
|
+
# @!attribute name
|
|
25
|
+
# Case-insensitive substring match against the provider display name.
|
|
26
|
+
#
|
|
27
|
+
# @return [String, nil]
|
|
28
|
+
optional :name, String
|
|
29
|
+
|
|
30
|
+
# @!method initialize(channel: nil, keys: nil, name: nil, request_options: {})
|
|
31
|
+
# Some parameter documentations has been truncated, see
|
|
32
|
+
# {Courier::Models::Providers::CatalogListParams} for more details.
|
|
33
|
+
#
|
|
34
|
+
# @param channel [String] Exact match (case-insensitive) against the provider channel taxonomy (e.g. `emai
|
|
35
|
+
#
|
|
36
|
+
# @param keys [String] Comma-separated provider keys to filter by (e.g. `sendgrid,twilio`).
|
|
37
|
+
#
|
|
38
|
+
# @param name [String] Case-insensitive substring match against the provider display name.
|
|
39
|
+
#
|
|
40
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Providers
|
|
6
|
+
# @see Courier::Resources::Providers::Catalog#list
|
|
7
|
+
class CatalogListResponse < Courier::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute paging
|
|
9
|
+
#
|
|
10
|
+
# @return [Courier::Models::Paging]
|
|
11
|
+
required :paging, -> { Courier::Paging }
|
|
12
|
+
|
|
13
|
+
# @!attribute results
|
|
14
|
+
#
|
|
15
|
+
# @return [Array<Courier::Models::ProvidersCatalogEntry>]
|
|
16
|
+
required :results, -> { Courier::Internal::Type::ArrayOf[Courier::ProvidersCatalogEntry] }
|
|
17
|
+
|
|
18
|
+
# @!method initialize(paging:, results:)
|
|
19
|
+
# Paginated list of available provider types with their configuration schemas.
|
|
20
|
+
#
|
|
21
|
+
# @param paging [Courier::Models::Paging]
|
|
22
|
+
# @param results [Array<Courier::Models::ProvidersCatalogEntry>]
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class ProvidersCatalogEntry < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute channel
|
|
7
|
+
# Courier taxonomy channel (e.g. email, push, sms, direct_message, inbox,
|
|
8
|
+
# webhook).
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :channel, String
|
|
12
|
+
|
|
13
|
+
# @!attribute description
|
|
14
|
+
# Short description of the provider.
|
|
15
|
+
#
|
|
16
|
+
# @return [String]
|
|
17
|
+
required :description, String
|
|
18
|
+
|
|
19
|
+
# @!attribute name
|
|
20
|
+
# Human-readable display name.
|
|
21
|
+
#
|
|
22
|
+
# @return [String]
|
|
23
|
+
required :name, String
|
|
24
|
+
|
|
25
|
+
# @!attribute provider
|
|
26
|
+
# The provider key (e.g. "sendgrid", "twilio").
|
|
27
|
+
#
|
|
28
|
+
# @return [String]
|
|
29
|
+
required :provider, String
|
|
30
|
+
|
|
31
|
+
# @!attribute settings
|
|
32
|
+
# Map of setting field names (snake_case) to their schema descriptors. Each
|
|
33
|
+
# descriptor has `type` and `required`. Empty when the provider has no
|
|
34
|
+
# configurable schema.
|
|
35
|
+
#
|
|
36
|
+
# @return [Hash{Symbol=>Courier::Models::ProvidersCatalogEntry::Setting}]
|
|
37
|
+
required :settings, -> { Courier::Internal::Type::HashOf[Courier::ProvidersCatalogEntry::Setting] }
|
|
38
|
+
|
|
39
|
+
# @!method initialize(channel:, description:, name:, provider:, settings:)
|
|
40
|
+
# Some parameter documentations has been truncated, see
|
|
41
|
+
# {Courier::Models::ProvidersCatalogEntry} for more details.
|
|
42
|
+
#
|
|
43
|
+
# A provider type from the catalog. Contains the key, display name, description,
|
|
44
|
+
# and a `settings` object describing configuration schema fields.
|
|
45
|
+
#
|
|
46
|
+
# @param channel [String] Courier taxonomy channel (e.g. email, push, sms, direct_message, inbox, webhook)
|
|
47
|
+
#
|
|
48
|
+
# @param description [String] Short description of the provider.
|
|
49
|
+
#
|
|
50
|
+
# @param name [String] Human-readable display name.
|
|
51
|
+
#
|
|
52
|
+
# @param provider [String] The provider key (e.g. "sendgrid", "twilio").
|
|
53
|
+
#
|
|
54
|
+
# @param settings [Hash{Symbol=>Courier::Models::ProvidersCatalogEntry::Setting}] Map of setting field names (snake_case) to their schema descriptors. Each descri
|
|
55
|
+
|
|
56
|
+
class Setting < Courier::Internal::Type::BaseModel
|
|
57
|
+
# @!attribute required
|
|
58
|
+
# Whether this field is required when configuring the provider.
|
|
59
|
+
#
|
|
60
|
+
# @return [Boolean]
|
|
61
|
+
required :required, Courier::Internal::Type::Boolean
|
|
62
|
+
|
|
63
|
+
# @!attribute type
|
|
64
|
+
# The field's data type (e.g. "string", "boolean", "enum").
|
|
65
|
+
#
|
|
66
|
+
# @return [String]
|
|
67
|
+
required :type, String
|
|
68
|
+
|
|
69
|
+
# @!attribute values
|
|
70
|
+
# Allowed values when `type` is "enum".
|
|
71
|
+
#
|
|
72
|
+
# @return [Array<String>, nil]
|
|
73
|
+
optional :values, Courier::Internal::Type::ArrayOf[String]
|
|
74
|
+
|
|
75
|
+
# @!method initialize(required:, type:, values: nil)
|
|
76
|
+
# Describes a single configuration field in the provider catalog.
|
|
77
|
+
#
|
|
78
|
+
# @param required [Boolean] Whether this field is required when configuring the provider.
|
|
79
|
+
#
|
|
80
|
+
# @param type [String] The field's data type (e.g. "string", "boolean", "enum").
|
|
81
|
+
#
|
|
82
|
+
# @param values [Array<String>] Allowed values when `type` is "enum".
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::RoutingStrategies#archive
|
|
6
|
+
class RoutingStrategyArchiveParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(id:, request_options: {})
|
|
16
|
+
# @param id [String]
|
|
17
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::RoutingStrategies#create
|
|
6
|
+
class RoutingStrategyCreateParams < Courier::Models::RoutingStrategyCreateRequest
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class RoutingStrategyCreateRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute name
|
|
7
|
+
# Human-readable name for the routing strategy.
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :name, String
|
|
11
|
+
|
|
12
|
+
# @!attribute routing
|
|
13
|
+
# Routing tree defining channel selection method and order.
|
|
14
|
+
#
|
|
15
|
+
# @return [Courier::Models::MessageRouting]
|
|
16
|
+
required :routing, -> { Courier::MessageRouting }
|
|
17
|
+
|
|
18
|
+
# @!attribute channels
|
|
19
|
+
# Per-channel delivery configuration. Defaults to empty if omitted.
|
|
20
|
+
#
|
|
21
|
+
# @return [Hash{Symbol=>Courier::Models::Channel}, nil]
|
|
22
|
+
optional :channels, -> { Courier::Internal::Type::HashOf[Courier::Channel] }, nil?: true
|
|
23
|
+
|
|
24
|
+
# @!attribute description
|
|
25
|
+
# Optional description of the routing strategy.
|
|
26
|
+
#
|
|
27
|
+
# @return [String, nil]
|
|
28
|
+
optional :description, String, nil?: true
|
|
29
|
+
|
|
30
|
+
# @!attribute providers
|
|
31
|
+
# Per-provider delivery configuration. Defaults to empty if omitted.
|
|
32
|
+
#
|
|
33
|
+
# @return [Hash{Symbol=>Courier::Models::MessageProvidersType}, nil]
|
|
34
|
+
optional :providers, -> { Courier::Internal::Type::HashOf[Courier::MessageProvidersType] }, nil?: true
|
|
35
|
+
|
|
36
|
+
# @!attribute tags
|
|
37
|
+
# Optional tags for categorization.
|
|
38
|
+
#
|
|
39
|
+
# @return [Array<String>, nil]
|
|
40
|
+
optional :tags, Courier::Internal::Type::ArrayOf[String], nil?: true
|
|
41
|
+
|
|
42
|
+
# @!method initialize(name:, routing:, channels: nil, description: nil, providers: nil, tags: nil)
|
|
43
|
+
# Request body for creating a routing strategy.
|
|
44
|
+
#
|
|
45
|
+
# @param name [String] Human-readable name for the routing strategy.
|
|
46
|
+
#
|
|
47
|
+
# @param routing [Courier::Models::MessageRouting] Routing tree defining channel selection method and order.
|
|
48
|
+
#
|
|
49
|
+
# @param channels [Hash{Symbol=>Courier::Models::Channel}, nil] Per-channel delivery configuration. Defaults to empty if omitted.
|
|
50
|
+
#
|
|
51
|
+
# @param description [String, nil] Optional description of the routing strategy.
|
|
52
|
+
#
|
|
53
|
+
# @param providers [Hash{Symbol=>Courier::Models::MessageProvidersType}, nil] Per-provider delivery configuration. Defaults to empty if omitted.
|
|
54
|
+
#
|
|
55
|
+
# @param tags [Array<String>, nil] Optional tags for categorization.
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::RoutingStrategies#retrieve
|
|
6
|
+
class RoutingStrategyGetResponse < Courier::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The routing strategy ID (rs\_ prefix).
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute channels
|
|
14
|
+
# Per-channel delivery configuration. May be empty.
|
|
15
|
+
#
|
|
16
|
+
# @return [Hash{Symbol=>Courier::Models::Channel}]
|
|
17
|
+
required :channels, -> { Courier::Internal::Type::HashOf[Courier::Channel] }
|
|
18
|
+
|
|
19
|
+
# @!attribute created
|
|
20
|
+
# Epoch milliseconds when the strategy was created.
|
|
21
|
+
#
|
|
22
|
+
# @return [Integer]
|
|
23
|
+
required :created, Integer
|
|
24
|
+
|
|
25
|
+
# @!attribute creator
|
|
26
|
+
# User ID of the creator.
|
|
27
|
+
#
|
|
28
|
+
# @return [String]
|
|
29
|
+
required :creator, String
|
|
30
|
+
|
|
31
|
+
# @!attribute name
|
|
32
|
+
# Human-readable name.
|
|
33
|
+
#
|
|
34
|
+
# @return [String]
|
|
35
|
+
required :name, String
|
|
36
|
+
|
|
37
|
+
# @!attribute providers
|
|
38
|
+
# Per-provider delivery configuration. May be empty.
|
|
39
|
+
#
|
|
40
|
+
# @return [Hash{Symbol=>Courier::Models::MessageProvidersType}]
|
|
41
|
+
required :providers, -> { Courier::Internal::Type::HashOf[Courier::MessageProvidersType] }
|
|
42
|
+
|
|
43
|
+
# @!attribute routing
|
|
44
|
+
# Routing tree defining channel selection method and order.
|
|
45
|
+
#
|
|
46
|
+
# @return [Courier::Models::MessageRouting]
|
|
47
|
+
required :routing, -> { Courier::MessageRouting }
|
|
48
|
+
|
|
49
|
+
# @!attribute description
|
|
50
|
+
# Description of the routing strategy.
|
|
51
|
+
#
|
|
52
|
+
# @return [String, nil]
|
|
53
|
+
optional :description, String, nil?: true
|
|
54
|
+
|
|
55
|
+
# @!attribute tags
|
|
56
|
+
# Tags for categorization.
|
|
57
|
+
#
|
|
58
|
+
# @return [Array<String>, nil]
|
|
59
|
+
optional :tags, Courier::Internal::Type::ArrayOf[String], nil?: true
|
|
60
|
+
|
|
61
|
+
# @!attribute updated
|
|
62
|
+
# Epoch milliseconds of last update.
|
|
63
|
+
#
|
|
64
|
+
# @return [Integer, nil]
|
|
65
|
+
optional :updated, Integer, nil?: true
|
|
66
|
+
|
|
67
|
+
# @!attribute updater
|
|
68
|
+
# User ID of the last updater.
|
|
69
|
+
#
|
|
70
|
+
# @return [String, nil]
|
|
71
|
+
optional :updater, String, nil?: true
|
|
72
|
+
|
|
73
|
+
# @!method initialize(id:, channels:, created:, creator:, name:, providers:, routing:, description: nil, tags: nil, updated: nil, updater: nil)
|
|
74
|
+
# Full routing strategy entity returned by GET.
|
|
75
|
+
#
|
|
76
|
+
# @param id [String] The routing strategy ID (rs\_ prefix).
|
|
77
|
+
#
|
|
78
|
+
# @param channels [Hash{Symbol=>Courier::Models::Channel}] Per-channel delivery configuration. May be empty.
|
|
79
|
+
#
|
|
80
|
+
# @param created [Integer] Epoch milliseconds when the strategy was created.
|
|
81
|
+
#
|
|
82
|
+
# @param creator [String] User ID of the creator.
|
|
83
|
+
#
|
|
84
|
+
# @param name [String] Human-readable name.
|
|
85
|
+
#
|
|
86
|
+
# @param providers [Hash{Symbol=>Courier::Models::MessageProvidersType}] Per-provider delivery configuration. May be empty.
|
|
87
|
+
#
|
|
88
|
+
# @param routing [Courier::Models::MessageRouting] Routing tree defining channel selection method and order.
|
|
89
|
+
#
|
|
90
|
+
# @param description [String, nil] Description of the routing strategy.
|
|
91
|
+
#
|
|
92
|
+
# @param tags [Array<String>, nil] Tags for categorization.
|
|
93
|
+
#
|
|
94
|
+
# @param updated [Integer, nil] Epoch milliseconds of last update.
|
|
95
|
+
#
|
|
96
|
+
# @param updater [String, nil] User ID of the last updater.
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::RoutingStrategies#list_notifications
|
|
6
|
+
class RoutingStrategyListNotificationsParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute cursor
|
|
16
|
+
# Opaque pagination cursor from a previous response. Omit for the first page.
|
|
17
|
+
#
|
|
18
|
+
# @return [String, nil]
|
|
19
|
+
optional :cursor, String, nil?: true
|
|
20
|
+
|
|
21
|
+
# @!attribute limit
|
|
22
|
+
# Maximum number of results per page. Default 20, max 100.
|
|
23
|
+
#
|
|
24
|
+
# @return [Integer, nil]
|
|
25
|
+
optional :limit, Integer
|
|
26
|
+
|
|
27
|
+
# @!method initialize(id:, cursor: nil, limit: nil, request_options: {})
|
|
28
|
+
# @param id [String]
|
|
29
|
+
#
|
|
30
|
+
# @param cursor [String, nil] Opaque pagination cursor from a previous response. Omit for the first page.
|
|
31
|
+
#
|
|
32
|
+
# @param limit [Integer] Maximum number of results per page. Default 20, max 100.
|
|
33
|
+
#
|
|
34
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::RoutingStrategies#list
|
|
6
|
+
class RoutingStrategyListParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute cursor
|
|
11
|
+
# Opaque pagination cursor from a previous response. Omit for the first page.
|
|
12
|
+
#
|
|
13
|
+
# @return [String, nil]
|
|
14
|
+
optional :cursor, String, nil?: true
|
|
15
|
+
|
|
16
|
+
# @!attribute limit
|
|
17
|
+
# Maximum number of results per page. Default 20, max 100.
|
|
18
|
+
#
|
|
19
|
+
# @return [Integer, nil]
|
|
20
|
+
optional :limit, Integer
|
|
21
|
+
|
|
22
|
+
# @!method initialize(cursor: nil, limit: nil, request_options: {})
|
|
23
|
+
# @param cursor [String, nil] Opaque pagination cursor from a previous response. Omit for the first page.
|
|
24
|
+
#
|
|
25
|
+
# @param limit [Integer] Maximum number of results per page. Default 20, max 100.
|
|
26
|
+
#
|
|
27
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::RoutingStrategies#list
|
|
6
|
+
class RoutingStrategyListResponse < Courier::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute paging
|
|
8
|
+
#
|
|
9
|
+
# @return [Courier::Models::Paging]
|
|
10
|
+
required :paging, -> { Courier::Paging }
|
|
11
|
+
|
|
12
|
+
# @!attribute results
|
|
13
|
+
#
|
|
14
|
+
# @return [Array<Courier::Models::RoutingStrategySummary>]
|
|
15
|
+
required :results, -> { Courier::Internal::Type::ArrayOf[Courier::RoutingStrategySummary] }
|
|
16
|
+
|
|
17
|
+
# @!method initialize(paging:, results:)
|
|
18
|
+
# Paginated list of routing strategy summaries.
|
|
19
|
+
#
|
|
20
|
+
# @param paging [Courier::Models::Paging]
|
|
21
|
+
# @param results [Array<Courier::Models::RoutingStrategySummary>]
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::RoutingStrategies#create
|
|
6
|
+
class RoutingStrategyMutationResponse < Courier::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The routing strategy ID (rs\_ prefix).
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!method initialize(id:)
|
|
14
|
+
# Response returned by create and replace operations.
|
|
15
|
+
#
|
|
16
|
+
# @param id [String] The routing strategy ID (rs\_ prefix).
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::RoutingStrategies#replace
|
|
6
|
+
class RoutingStrategyReplaceParams < Courier::Models::RoutingStrategyReplaceRequest
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(id:, request_options: {})
|
|
16
|
+
# @param id [String]
|
|
17
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class RoutingStrategyReplaceRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute name
|
|
7
|
+
# Human-readable name for the routing strategy.
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :name, String
|
|
11
|
+
|
|
12
|
+
# @!attribute routing
|
|
13
|
+
# Routing tree defining channel selection method and order.
|
|
14
|
+
#
|
|
15
|
+
# @return [Courier::Models::MessageRouting]
|
|
16
|
+
required :routing, -> { Courier::MessageRouting }
|
|
17
|
+
|
|
18
|
+
# @!attribute channels
|
|
19
|
+
# Per-channel delivery configuration. Omit to clear.
|
|
20
|
+
#
|
|
21
|
+
# @return [Hash{Symbol=>Courier::Models::Channel}, nil]
|
|
22
|
+
optional :channels, -> { Courier::Internal::Type::HashOf[Courier::Channel] }, nil?: true
|
|
23
|
+
|
|
24
|
+
# @!attribute description
|
|
25
|
+
# Optional description. Omit or null to clear.
|
|
26
|
+
#
|
|
27
|
+
# @return [String, nil]
|
|
28
|
+
optional :description, String, nil?: true
|
|
29
|
+
|
|
30
|
+
# @!attribute providers
|
|
31
|
+
# Per-provider delivery configuration. Omit to clear.
|
|
32
|
+
#
|
|
33
|
+
# @return [Hash{Symbol=>Courier::Models::MessageProvidersType}, nil]
|
|
34
|
+
optional :providers, -> { Courier::Internal::Type::HashOf[Courier::MessageProvidersType] }, nil?: true
|
|
35
|
+
|
|
36
|
+
# @!attribute tags
|
|
37
|
+
# Optional tags. Omit or null to clear.
|
|
38
|
+
#
|
|
39
|
+
# @return [Array<String>, nil]
|
|
40
|
+
optional :tags, Courier::Internal::Type::ArrayOf[String], nil?: true
|
|
41
|
+
|
|
42
|
+
# @!method initialize(name:, routing:, channels: nil, description: nil, providers: nil, tags: nil)
|
|
43
|
+
# Request body for replacing a routing strategy. Full document replacement;
|
|
44
|
+
# missing optional fields are cleared.
|
|
45
|
+
#
|
|
46
|
+
# @param name [String] Human-readable name for the routing strategy.
|
|
47
|
+
#
|
|
48
|
+
# @param routing [Courier::Models::MessageRouting] Routing tree defining channel selection method and order.
|
|
49
|
+
#
|
|
50
|
+
# @param channels [Hash{Symbol=>Courier::Models::Channel}, nil] Per-channel delivery configuration. Omit to clear.
|
|
51
|
+
#
|
|
52
|
+
# @param description [String, nil] Optional description. Omit or null to clear.
|
|
53
|
+
#
|
|
54
|
+
# @param providers [Hash{Symbol=>Courier::Models::MessageProvidersType}, nil] Per-provider delivery configuration. Omit to clear.
|
|
55
|
+
#
|
|
56
|
+
# @param tags [Array<String>, nil] Optional tags. Omit or null to clear.
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::RoutingStrategies#retrieve
|
|
6
|
+
class RoutingStrategyRetrieveParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(id:, request_options: {})
|
|
16
|
+
# @param id [String]
|
|
17
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|