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,62 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationElementPutRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute type
|
|
7
|
+
# Element type (text, meta, action, image, etc.).
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :type, String
|
|
11
|
+
|
|
12
|
+
# @!attribute channels
|
|
13
|
+
#
|
|
14
|
+
# @return [Array<String>, nil]
|
|
15
|
+
optional :channels, Courier::Internal::Type::ArrayOf[String]
|
|
16
|
+
|
|
17
|
+
# @!attribute data
|
|
18
|
+
#
|
|
19
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
20
|
+
optional :data, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown]
|
|
21
|
+
|
|
22
|
+
# @!attribute if_
|
|
23
|
+
#
|
|
24
|
+
# @return [String, nil]
|
|
25
|
+
optional :if_, String, api_name: :if
|
|
26
|
+
|
|
27
|
+
# @!attribute loop_
|
|
28
|
+
#
|
|
29
|
+
# @return [String, nil]
|
|
30
|
+
optional :loop_, String, api_name: :loop
|
|
31
|
+
|
|
32
|
+
# @!attribute ref
|
|
33
|
+
#
|
|
34
|
+
# @return [String, nil]
|
|
35
|
+
optional :ref, String
|
|
36
|
+
|
|
37
|
+
# @!attribute state
|
|
38
|
+
# Template state. Defaults to `DRAFT`.
|
|
39
|
+
#
|
|
40
|
+
# @return [Symbol, Courier::Models::NotificationTemplateState, nil]
|
|
41
|
+
optional :state, enum: -> { Courier::NotificationTemplateState }
|
|
42
|
+
|
|
43
|
+
# @!method initialize(type:, channels: nil, data: nil, if_: nil, loop_: nil, ref: nil, state: nil)
|
|
44
|
+
# Request body for updating a single element. Additional type-specific fields are
|
|
45
|
+
# allowed.
|
|
46
|
+
#
|
|
47
|
+
# @param type [String] Element type (text, meta, action, image, etc.).
|
|
48
|
+
#
|
|
49
|
+
# @param channels [Array<String>]
|
|
50
|
+
#
|
|
51
|
+
# @param data [Hash{Symbol=>Object}]
|
|
52
|
+
#
|
|
53
|
+
# @param if_ [String]
|
|
54
|
+
#
|
|
55
|
+
# @param loop_ [String]
|
|
56
|
+
#
|
|
57
|
+
# @param ref [String]
|
|
58
|
+
#
|
|
59
|
+
# @param state [Symbol, Courier::Models::NotificationTemplateState] Template state. Defaults to `DRAFT`.
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -8,20 +8,29 @@ module Courier
|
|
|
8
8
|
include Courier::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
# @!attribute cursor
|
|
11
|
+
# Opaque pagination cursor from a previous response. Omit for the first page.
|
|
11
12
|
#
|
|
12
13
|
# @return [String, nil]
|
|
13
14
|
optional :cursor, String, nil?: true
|
|
14
15
|
|
|
16
|
+
# @!attribute event_id
|
|
17
|
+
# Filter to templates linked to this event map ID.
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :event_id, String
|
|
21
|
+
|
|
15
22
|
# @!attribute notes
|
|
16
|
-
#
|
|
23
|
+
# Include template notes in the response. Only applies to legacy templates.
|
|
17
24
|
#
|
|
18
25
|
# @return [Boolean, nil]
|
|
19
26
|
optional :notes, Courier::Internal::Type::Boolean, nil?: true
|
|
20
27
|
|
|
21
|
-
# @!method initialize(cursor: nil, notes: nil, request_options: {})
|
|
22
|
-
# @param cursor [String, nil]
|
|
28
|
+
# @!method initialize(cursor: nil, event_id: nil, notes: nil, request_options: {})
|
|
29
|
+
# @param cursor [String, nil] Opaque pagination cursor from a previous response. Omit for the first page.
|
|
30
|
+
#
|
|
31
|
+
# @param event_id [String] Filter to templates linked to this event map ID.
|
|
23
32
|
#
|
|
24
|
-
# @param notes [Boolean, nil]
|
|
33
|
+
# @param notes [Boolean, nil] Include template notes in the response. Only applies to legacy templates.
|
|
25
34
|
#
|
|
26
35
|
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
27
36
|
end
|
|
@@ -10,108 +10,123 @@ module Courier
|
|
|
10
10
|
required :paging, -> { Courier::Paging }
|
|
11
11
|
|
|
12
12
|
# @!attribute results
|
|
13
|
+
# Notification templates in this workspace.
|
|
13
14
|
#
|
|
14
|
-
# @return [Array<Courier::Models::NotificationListResponse::Result>]
|
|
15
|
+
# @return [Array<Courier::Models::NotificationListResponse::Result::Notification, Courier::Models::NotificationTemplateSummary>]
|
|
15
16
|
required :results,
|
|
16
|
-
-> { Courier::Internal::Type::ArrayOf[Courier::Models::NotificationListResponse::Result] }
|
|
17
|
+
-> { Courier::Internal::Type::ArrayOf[union: Courier::Models::NotificationListResponse::Result] }
|
|
17
18
|
|
|
18
19
|
# @!method initialize(paging:, results:)
|
|
19
20
|
# @param paging [Courier::Models::Paging]
|
|
20
|
-
#
|
|
21
|
-
|
|
22
|
-
class Result < Courier::Internal::Type::BaseModel
|
|
23
|
-
# @!attribute id
|
|
24
|
-
#
|
|
25
|
-
# @return [String]
|
|
26
|
-
required :id, String
|
|
27
|
-
|
|
28
|
-
# @!attribute created_at
|
|
29
|
-
#
|
|
30
|
-
# @return [Integer]
|
|
31
|
-
required :created_at, Integer
|
|
32
|
-
|
|
33
|
-
# @!attribute event_ids
|
|
34
|
-
# Array of event IDs associated with this notification
|
|
35
|
-
#
|
|
36
|
-
# @return [Array<String>]
|
|
37
|
-
required :event_ids, Courier::Internal::Type::ArrayOf[String]
|
|
38
|
-
|
|
39
|
-
# @!attribute note
|
|
40
|
-
#
|
|
41
|
-
# @return [String]
|
|
42
|
-
required :note, String
|
|
43
|
-
|
|
44
|
-
# @!attribute routing
|
|
45
|
-
#
|
|
46
|
-
# @return [Courier::Models::MessageRouting]
|
|
47
|
-
required :routing, -> { Courier::MessageRouting }
|
|
48
|
-
|
|
49
|
-
# @!attribute topic_id
|
|
50
|
-
#
|
|
51
|
-
# @return [String]
|
|
52
|
-
required :topic_id, String
|
|
53
|
-
|
|
54
|
-
# @!attribute updated_at
|
|
55
|
-
#
|
|
56
|
-
# @return [Integer]
|
|
57
|
-
required :updated_at, Integer
|
|
58
|
-
|
|
59
|
-
# @!attribute tags
|
|
60
|
-
#
|
|
61
|
-
# @return [Courier::Models::NotificationListResponse::Result::Tags, nil]
|
|
62
|
-
optional :tags, -> { Courier::Models::NotificationListResponse::Result::Tags }, nil?: true
|
|
63
|
-
|
|
64
|
-
# @!attribute title
|
|
65
|
-
#
|
|
66
|
-
# @return [String, nil]
|
|
67
|
-
optional :title, String, nil?: true
|
|
68
|
-
|
|
69
|
-
# @!method initialize(id:, created_at:, event_ids:, note:, routing:, topic_id:, updated_at:, tags: nil, title: nil)
|
|
70
|
-
# @param id [String]
|
|
71
|
-
#
|
|
72
|
-
# @param created_at [Integer]
|
|
73
|
-
#
|
|
74
|
-
# @param event_ids [Array<String>] Array of event IDs associated with this notification
|
|
75
|
-
#
|
|
76
|
-
# @param note [String]
|
|
77
|
-
#
|
|
78
|
-
# @param routing [Courier::Models::MessageRouting]
|
|
79
|
-
#
|
|
80
|
-
# @param topic_id [String]
|
|
81
|
-
#
|
|
82
|
-
# @param updated_at [Integer]
|
|
83
|
-
#
|
|
84
|
-
# @param tags [Courier::Models::NotificationListResponse::Result::Tags, nil]
|
|
85
|
-
#
|
|
86
|
-
# @param title [String, nil]
|
|
87
|
-
|
|
88
|
-
# @see Courier::Models::NotificationListResponse::Result#tags
|
|
89
|
-
class Tags < Courier::Internal::Type::BaseModel
|
|
90
|
-
# @!attribute data
|
|
91
|
-
#
|
|
92
|
-
# @return [Array<Courier::Models::NotificationListResponse::Result::Tags::Data>]
|
|
93
|
-
required :data,
|
|
94
|
-
-> { Courier::Internal::Type::ArrayOf[Courier::Models::NotificationListResponse::Result::Tags::Data] }
|
|
95
|
-
|
|
96
|
-
# @!method initialize(data:)
|
|
97
|
-
# @param data [Array<Courier::Models::NotificationListResponse::Result::Tags::Data>]
|
|
98
|
-
|
|
99
|
-
class Data < Courier::Internal::Type::BaseModel
|
|
100
|
-
# @!attribute id
|
|
101
|
-
#
|
|
102
|
-
# @return [String]
|
|
103
|
-
required :id, String
|
|
21
|
+
#
|
|
22
|
+
# @param results [Array<Courier::Models::NotificationListResponse::Result::Notification, Courier::Models::NotificationTemplateSummary>] Notification templates in this workspace.
|
|
104
23
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
24
|
+
# V2 (CDS) template summary returned in list responses.
|
|
25
|
+
module Result
|
|
26
|
+
extend Courier::Internal::Type::Union
|
|
27
|
+
|
|
28
|
+
variant -> { Courier::Models::NotificationListResponse::Result::Notification }
|
|
29
|
+
|
|
30
|
+
# V2 (CDS) template summary returned in list responses.
|
|
31
|
+
variant -> { Courier::NotificationTemplateSummary }
|
|
32
|
+
|
|
33
|
+
class Notification < Courier::Internal::Type::BaseModel
|
|
34
|
+
# @!attribute id
|
|
35
|
+
#
|
|
36
|
+
# @return [String]
|
|
37
|
+
required :id, String
|
|
38
|
+
|
|
39
|
+
# @!attribute created_at
|
|
40
|
+
#
|
|
41
|
+
# @return [Integer]
|
|
42
|
+
required :created_at, Integer
|
|
43
|
+
|
|
44
|
+
# @!attribute event_ids
|
|
45
|
+
# Array of event IDs associated with this notification
|
|
46
|
+
#
|
|
47
|
+
# @return [Array<String>]
|
|
48
|
+
required :event_ids, Courier::Internal::Type::ArrayOf[String]
|
|
49
|
+
|
|
50
|
+
# @!attribute note
|
|
51
|
+
#
|
|
52
|
+
# @return [String]
|
|
53
|
+
required :note, String
|
|
54
|
+
|
|
55
|
+
# @!attribute routing
|
|
56
|
+
#
|
|
57
|
+
# @return [Courier::Models::MessageRouting]
|
|
58
|
+
required :routing, -> { Courier::MessageRouting }
|
|
59
|
+
|
|
60
|
+
# @!attribute topic_id
|
|
61
|
+
#
|
|
62
|
+
# @return [String]
|
|
63
|
+
required :topic_id, String
|
|
109
64
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
65
|
+
# @!attribute updated_at
|
|
66
|
+
#
|
|
67
|
+
# @return [Integer]
|
|
68
|
+
required :updated_at, Integer
|
|
69
|
+
|
|
70
|
+
# @!attribute tags
|
|
71
|
+
#
|
|
72
|
+
# @return [Courier::Models::NotificationListResponse::Result::Notification::Tags, nil]
|
|
73
|
+
optional :tags, -> { Courier::Models::NotificationListResponse::Result::Notification::Tags }, nil?: true
|
|
74
|
+
|
|
75
|
+
# @!attribute title
|
|
76
|
+
#
|
|
77
|
+
# @return [String, nil]
|
|
78
|
+
optional :title, String, nil?: true
|
|
79
|
+
|
|
80
|
+
# @!method initialize(id:, created_at:, event_ids:, note:, routing:, topic_id:, updated_at:, tags: nil, title: nil)
|
|
81
|
+
# @param id [String]
|
|
82
|
+
#
|
|
83
|
+
# @param created_at [Integer]
|
|
84
|
+
#
|
|
85
|
+
# @param event_ids [Array<String>] Array of event IDs associated with this notification
|
|
86
|
+
#
|
|
87
|
+
# @param note [String]
|
|
88
|
+
#
|
|
89
|
+
# @param routing [Courier::Models::MessageRouting]
|
|
90
|
+
#
|
|
91
|
+
# @param topic_id [String]
|
|
92
|
+
#
|
|
93
|
+
# @param updated_at [Integer]
|
|
94
|
+
#
|
|
95
|
+
# @param tags [Courier::Models::NotificationListResponse::Result::Notification::Tags, nil]
|
|
96
|
+
#
|
|
97
|
+
# @param title [String, nil]
|
|
98
|
+
|
|
99
|
+
# @see Courier::Models::NotificationListResponse::Result::Notification#tags
|
|
100
|
+
class Tags < Courier::Internal::Type::BaseModel
|
|
101
|
+
# @!attribute data
|
|
102
|
+
#
|
|
103
|
+
# @return [Array<Courier::Models::NotificationListResponse::Result::Notification::Tags::Data>]
|
|
104
|
+
required :data,
|
|
105
|
+
-> { Courier::Internal::Type::ArrayOf[Courier::Models::NotificationListResponse::Result::Notification::Tags::Data] }
|
|
106
|
+
|
|
107
|
+
# @!method initialize(data:)
|
|
108
|
+
# @param data [Array<Courier::Models::NotificationListResponse::Result::Notification::Tags::Data>]
|
|
109
|
+
|
|
110
|
+
class Data < Courier::Internal::Type::BaseModel
|
|
111
|
+
# @!attribute id
|
|
112
|
+
#
|
|
113
|
+
# @return [String]
|
|
114
|
+
required :id, String
|
|
115
|
+
|
|
116
|
+
# @!attribute name
|
|
117
|
+
#
|
|
118
|
+
# @return [String]
|
|
119
|
+
required :name, String
|
|
120
|
+
|
|
121
|
+
# @!method initialize(id:, name:)
|
|
122
|
+
# @param id [String]
|
|
123
|
+
# @param name [String]
|
|
124
|
+
end
|
|
113
125
|
end
|
|
114
126
|
end
|
|
127
|
+
|
|
128
|
+
# @!method self.variants
|
|
129
|
+
# @return [Array(Courier::Models::NotificationListResponse::Result::Notification, Courier::Models::NotificationTemplateSummary)]
|
|
115
130
|
end
|
|
116
131
|
end
|
|
117
132
|
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Notifications#list_versions
|
|
6
|
+
class NotificationListVersionsParams < 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
|
|
20
|
+
|
|
21
|
+
# @!attribute limit
|
|
22
|
+
# Maximum number of versions to return per page. Default 10, max 10.
|
|
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] Opaque pagination cursor from a previous response. Omit for the first page.
|
|
31
|
+
#
|
|
32
|
+
# @param limit [Integer] Maximum number of versions to return per page. Default 10, max 10.
|
|
33
|
+
#
|
|
34
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationLocalePutRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute elements
|
|
7
|
+
# Elements with locale-specific content overrides.
|
|
8
|
+
#
|
|
9
|
+
# @return [Array<Courier::Models::NotificationLocalePutRequest::Element>]
|
|
10
|
+
required :elements,
|
|
11
|
+
-> { Courier::Internal::Type::ArrayOf[Courier::NotificationLocalePutRequest::Element] }
|
|
12
|
+
|
|
13
|
+
# @!attribute state
|
|
14
|
+
# Template state. Defaults to `DRAFT`.
|
|
15
|
+
#
|
|
16
|
+
# @return [Symbol, Courier::Models::NotificationTemplateState, nil]
|
|
17
|
+
optional :state, enum: -> { Courier::NotificationTemplateState }
|
|
18
|
+
|
|
19
|
+
# @!method initialize(elements:, state: nil)
|
|
20
|
+
# Request body for setting locale-specific content overrides. Each element
|
|
21
|
+
# override must include the target element ID.
|
|
22
|
+
#
|
|
23
|
+
# @param elements [Array<Courier::Models::NotificationLocalePutRequest::Element>] Elements with locale-specific content overrides.
|
|
24
|
+
#
|
|
25
|
+
# @param state [Symbol, Courier::Models::NotificationTemplateState] Template state. Defaults to `DRAFT`.
|
|
26
|
+
|
|
27
|
+
class Element < Courier::Internal::Type::BaseModel
|
|
28
|
+
# @!attribute id
|
|
29
|
+
# Target element ID.
|
|
30
|
+
#
|
|
31
|
+
# @return [String]
|
|
32
|
+
required :id, String
|
|
33
|
+
|
|
34
|
+
# @!method initialize(id:)
|
|
35
|
+
# @param id [String] Target element ID.
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Notifications#publish
|
|
6
|
+
class NotificationPublishParams < Courier::Models::NotificationTemplatePublishRequest
|
|
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,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Notifications#put_content
|
|
6
|
+
class NotificationPutContentParams < Courier::Models::NotificationContentPutRequest
|
|
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,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Notifications#put_element
|
|
6
|
+
class NotificationPutElementParams < Courier::Models::NotificationElementPutRequest
|
|
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 element_id
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
required :element_id, String
|
|
19
|
+
|
|
20
|
+
# @!method initialize(id:, element_id:, request_options: {})
|
|
21
|
+
# @param id [String]
|
|
22
|
+
# @param element_id [String]
|
|
23
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Notifications#put_locale
|
|
6
|
+
class NotificationPutLocaleParams < Courier::Models::NotificationLocalePutRequest
|
|
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 locale_id
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
required :locale_id, String
|
|
19
|
+
|
|
20
|
+
# @!method initialize(id:, locale_id:, request_options: {})
|
|
21
|
+
# @param id [String]
|
|
22
|
+
# @param locale_id [String]
|
|
23
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Notifications#replace
|
|
6
|
+
class NotificationReplaceParams < Courier::Models::NotificationTemplateUpdateRequest
|
|
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
|
|
@@ -12,8 +12,21 @@ module Courier
|
|
|
12
12
|
# @return [String]
|
|
13
13
|
required :id, String
|
|
14
14
|
|
|
15
|
-
# @!
|
|
15
|
+
# @!attribute version
|
|
16
|
+
# Accepts `draft`, `published`, or a version string (e.g., `v001`). Defaults to
|
|
17
|
+
# `published`.
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :version, String
|
|
21
|
+
|
|
22
|
+
# @!method initialize(id:, version: nil, request_options: {})
|
|
23
|
+
# Some parameter documentations has been truncated, see
|
|
24
|
+
# {Courier::Models::NotificationRetrieveContentParams} for more details.
|
|
25
|
+
#
|
|
16
26
|
# @param id [String]
|
|
27
|
+
#
|
|
28
|
+
# @param version [String] Accepts `draft`, `published`, or a version string (e.g., `v001`). Defaults to `p
|
|
29
|
+
#
|
|
17
30
|
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
31
|
end
|
|
19
32
|
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# Elemental content response for V2 templates. Contains versioned elements with
|
|
6
|
+
# content checksums.
|
|
7
|
+
#
|
|
8
|
+
# @see Courier::Resources::Notifications#retrieve_content
|
|
9
|
+
module NotificationRetrieveContentResponse
|
|
10
|
+
extend Courier::Internal::Type::Union
|
|
11
|
+
|
|
12
|
+
# Elemental content response for V2 templates. Contains versioned elements with content checksums.
|
|
13
|
+
variant -> { Courier::NotificationContentGetResponse }
|
|
14
|
+
|
|
15
|
+
variant -> { Courier::NotificationGetContent }
|
|
16
|
+
|
|
17
|
+
# @!method self.variants
|
|
18
|
+
# @return [Array(Courier::Models::NotificationContentGetResponse, Courier::Models::NotificationGetContent)]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Notifications#retrieve
|
|
6
|
+
class NotificationRetrieveParams < 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 version
|
|
16
|
+
# Version to retrieve. One of "draft", "published", or a version string like
|
|
17
|
+
# "v001". Defaults to "published".
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :version, String
|
|
21
|
+
|
|
22
|
+
# @!method initialize(id:, version: nil, request_options: {})
|
|
23
|
+
# Some parameter documentations has been truncated, see
|
|
24
|
+
# {Courier::Models::NotificationRetrieveParams} for more details.
|
|
25
|
+
#
|
|
26
|
+
# @param id [String]
|
|
27
|
+
#
|
|
28
|
+
# @param version [String] Version to retrieve. One of "draft", "published", or a version string like "v001
|
|
29
|
+
#
|
|
30
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationTemplateCreateRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute notification
|
|
7
|
+
# Full document shape used in POST and PUT request bodies, and returned inside the
|
|
8
|
+
# GET response envelope.
|
|
9
|
+
#
|
|
10
|
+
# @return [Courier::Models::NotificationTemplatePayload]
|
|
11
|
+
required :notification, -> { Courier::NotificationTemplatePayload }
|
|
12
|
+
|
|
13
|
+
# @!attribute state
|
|
14
|
+
# Template state after creation. Case-insensitive input, normalized to uppercase
|
|
15
|
+
# in the response. Defaults to "DRAFT".
|
|
16
|
+
#
|
|
17
|
+
# @return [Symbol, Courier::Models::NotificationTemplateCreateRequest::State, nil]
|
|
18
|
+
optional :state, enum: -> { Courier::NotificationTemplateCreateRequest::State }
|
|
19
|
+
|
|
20
|
+
# @!method initialize(notification:, state: nil)
|
|
21
|
+
# Some parameter documentations has been truncated, see
|
|
22
|
+
# {Courier::Models::NotificationTemplateCreateRequest} for more details.
|
|
23
|
+
#
|
|
24
|
+
# Request body for creating a notification template.
|
|
25
|
+
#
|
|
26
|
+
# @param notification [Courier::Models::NotificationTemplatePayload] Full document shape used in POST and PUT request bodies, and returned inside the
|
|
27
|
+
#
|
|
28
|
+
# @param state [Symbol, Courier::Models::NotificationTemplateCreateRequest::State] Template state after creation. Case-insensitive input, normalized to uppercase i
|
|
29
|
+
|
|
30
|
+
# Template state after creation. Case-insensitive input, normalized to uppercase
|
|
31
|
+
# in the response. Defaults to "DRAFT".
|
|
32
|
+
#
|
|
33
|
+
# @see Courier::Models::NotificationTemplateCreateRequest#state
|
|
34
|
+
module State
|
|
35
|
+
extend Courier::Internal::Type::Enum
|
|
36
|
+
|
|
37
|
+
DRAFT = :DRAFT
|
|
38
|
+
PUBLISHED = :PUBLISHED
|
|
39
|
+
|
|
40
|
+
# @!method self.values
|
|
41
|
+
# @return [Array<Symbol>]
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|