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,60 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type element_with_checksums =
|
|
4
|
+
{
|
|
5
|
+
checksum: String,
|
|
6
|
+
type: String,
|
|
7
|
+
id: String,
|
|
8
|
+
elements: ::Array[Courier::ElementWithChecksums],
|
|
9
|
+
locales: ::Hash[Symbol, Courier::ElementWithChecksums::Locale]
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
class ElementWithChecksums < Courier::Internal::Type::BaseModel
|
|
13
|
+
attr_accessor checksum: String
|
|
14
|
+
|
|
15
|
+
attr_accessor type: String
|
|
16
|
+
|
|
17
|
+
attr_reader id: String?
|
|
18
|
+
|
|
19
|
+
def id=: (String) -> String
|
|
20
|
+
|
|
21
|
+
attr_reader elements: ::Array[Courier::ElementWithChecksums]?
|
|
22
|
+
|
|
23
|
+
def elements=: (
|
|
24
|
+
::Array[Courier::ElementWithChecksums]
|
|
25
|
+
) -> ::Array[Courier::ElementWithChecksums]
|
|
26
|
+
|
|
27
|
+
attr_reader locales: ::Hash[Symbol, Courier::ElementWithChecksums::Locale]?
|
|
28
|
+
|
|
29
|
+
def locales=: (
|
|
30
|
+
::Hash[Symbol, Courier::ElementWithChecksums::Locale]
|
|
31
|
+
) -> ::Hash[Symbol, Courier::ElementWithChecksums::Locale]
|
|
32
|
+
|
|
33
|
+
def initialize: (
|
|
34
|
+
checksum: String,
|
|
35
|
+
type: String,
|
|
36
|
+
?id: String,
|
|
37
|
+
?elements: ::Array[Courier::ElementWithChecksums],
|
|
38
|
+
?locales: ::Hash[Symbol, Courier::ElementWithChecksums::Locale]
|
|
39
|
+
) -> void
|
|
40
|
+
|
|
41
|
+
def to_hash: -> {
|
|
42
|
+
checksum: String,
|
|
43
|
+
type: String,
|
|
44
|
+
id: String,
|
|
45
|
+
elements: ::Array[Courier::ElementWithChecksums],
|
|
46
|
+
locales: ::Hash[Symbol, Courier::ElementWithChecksums::Locale]
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
type locale = { checksum: String }
|
|
50
|
+
|
|
51
|
+
class Locale < Courier::Internal::Type::BaseModel
|
|
52
|
+
attr_accessor checksum: String
|
|
53
|
+
|
|
54
|
+
def initialize: (checksum: String) -> void
|
|
55
|
+
|
|
56
|
+
def to_hash: -> { checksum: String }
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type elemental_html_node_with_type =
|
|
4
|
+
{ type: Courier::Models::ElementalHTMLNodeWithType::type_ }
|
|
5
|
+
|
|
6
|
+
class ElementalHTMLNodeWithType < Courier::Models::ElementalBaseNode
|
|
7
|
+
def `type`: -> Courier::Models::ElementalHTMLNodeWithType::type_?
|
|
8
|
+
|
|
9
|
+
def type=: (
|
|
10
|
+
Courier::Models::ElementalHTMLNodeWithType::type_ _
|
|
11
|
+
) -> Courier::Models::ElementalHTMLNodeWithType::type_
|
|
12
|
+
|
|
13
|
+
def initialize: (
|
|
14
|
+
?type: Courier::Models::ElementalHTMLNodeWithType::type_
|
|
15
|
+
) -> void
|
|
16
|
+
|
|
17
|
+
def to_hash: -> {
|
|
18
|
+
type: Courier::Models::ElementalHTMLNodeWithType::type_
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
type type_ = :html
|
|
22
|
+
|
|
23
|
+
module Type
|
|
24
|
+
extend Courier::Internal::Type::Enum
|
|
25
|
+
|
|
26
|
+
HTML: :html
|
|
27
|
+
|
|
28
|
+
def self?.values: -> ::Array[Courier::Models::ElementalHTMLNodeWithType::type_]
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type message_providers_type =
|
|
4
|
+
{
|
|
5
|
+
if_: String?,
|
|
6
|
+
metadata: Courier::Metadata?,
|
|
7
|
+
override: ::Hash[Symbol, top]?,
|
|
8
|
+
timeouts: Integer?
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class MessageProvidersType < Courier::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor if_: String?
|
|
13
|
+
|
|
14
|
+
attr_accessor metadata: Courier::Metadata?
|
|
15
|
+
|
|
16
|
+
attr_accessor override: ::Hash[Symbol, top]?
|
|
17
|
+
|
|
18
|
+
attr_accessor timeouts: Integer?
|
|
19
|
+
|
|
20
|
+
def initialize: (
|
|
21
|
+
?if_: String?,
|
|
22
|
+
?metadata: Courier::Metadata?,
|
|
23
|
+
?override: ::Hash[Symbol, top]?,
|
|
24
|
+
?timeouts: Integer?
|
|
25
|
+
) -> void
|
|
26
|
+
|
|
27
|
+
def to_hash: -> {
|
|
28
|
+
if_: String?,
|
|
29
|
+
metadata: Courier::Metadata?,
|
|
30
|
+
override: ::Hash[Symbol, top]?,
|
|
31
|
+
timeouts: Integer?
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type metadata = { utm: Courier::Utm? }
|
|
4
|
+
|
|
5
|
+
class Metadata < Courier::Internal::Type::BaseModel
|
|
6
|
+
attr_accessor utm: Courier::Utm?
|
|
7
|
+
|
|
8
|
+
def initialize: (?utm: Courier::Utm?) -> void
|
|
9
|
+
|
|
10
|
+
def to_hash: -> { utm: Courier::Utm? }
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type notification_archive_params =
|
|
4
|
+
{ id: String } & Courier::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class NotificationArchiveParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
attr_accessor id: String
|
|
11
|
+
|
|
12
|
+
def initialize: (
|
|
13
|
+
id: String,
|
|
14
|
+
?request_options: Courier::request_opts
|
|
15
|
+
) -> void
|
|
16
|
+
|
|
17
|
+
def to_hash: -> { id: String, request_options: Courier::RequestOptions }
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type notification_content_get_response =
|
|
4
|
+
{ elements: ::Array[Courier::ElementWithChecksums], version: String }
|
|
5
|
+
|
|
6
|
+
class NotificationContentGetResponse < Courier::Internal::Type::BaseModel
|
|
7
|
+
attr_accessor elements: ::Array[Courier::ElementWithChecksums]
|
|
8
|
+
|
|
9
|
+
attr_accessor version: String
|
|
10
|
+
|
|
11
|
+
def initialize: (
|
|
12
|
+
elements: ::Array[Courier::ElementWithChecksums],
|
|
13
|
+
version: String
|
|
14
|
+
) -> void
|
|
15
|
+
|
|
16
|
+
def to_hash: -> {
|
|
17
|
+
elements: ::Array[Courier::ElementWithChecksums],
|
|
18
|
+
version: String
|
|
19
|
+
}
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type notification_content_mutation_response =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
elements: ::Array[Courier::NotificationContentMutationResponse::Element],
|
|
7
|
+
state: Courier::Models::notification_template_state,
|
|
8
|
+
version: String
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class NotificationContentMutationResponse < Courier::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor id: String
|
|
13
|
+
|
|
14
|
+
attr_accessor elements: ::Array[Courier::NotificationContentMutationResponse::Element]
|
|
15
|
+
|
|
16
|
+
attr_accessor state: Courier::Models::notification_template_state
|
|
17
|
+
|
|
18
|
+
attr_accessor version: String
|
|
19
|
+
|
|
20
|
+
def initialize: (
|
|
21
|
+
id: String,
|
|
22
|
+
elements: ::Array[Courier::NotificationContentMutationResponse::Element],
|
|
23
|
+
state: Courier::Models::notification_template_state,
|
|
24
|
+
version: String
|
|
25
|
+
) -> void
|
|
26
|
+
|
|
27
|
+
def to_hash: -> {
|
|
28
|
+
id: String,
|
|
29
|
+
elements: ::Array[Courier::NotificationContentMutationResponse::Element],
|
|
30
|
+
state: Courier::Models::notification_template_state,
|
|
31
|
+
version: String
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
type element = { id: String, checksum: String }
|
|
35
|
+
|
|
36
|
+
class Element < Courier::Internal::Type::BaseModel
|
|
37
|
+
attr_accessor id: String
|
|
38
|
+
|
|
39
|
+
attr_accessor checksum: String
|
|
40
|
+
|
|
41
|
+
def initialize: (id: String, checksum: String) -> void
|
|
42
|
+
|
|
43
|
+
def to_hash: -> { id: String, checksum: String }
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type notification_content_put_request =
|
|
4
|
+
{
|
|
5
|
+
content: Courier::NotificationContentPutRequest::Content,
|
|
6
|
+
state: Courier::Models::notification_template_state
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
class NotificationContentPutRequest < Courier::Internal::Type::BaseModel
|
|
10
|
+
attr_accessor content: Courier::NotificationContentPutRequest::Content
|
|
11
|
+
|
|
12
|
+
attr_reader state: Courier::Models::notification_template_state?
|
|
13
|
+
|
|
14
|
+
def state=: (
|
|
15
|
+
Courier::Models::notification_template_state
|
|
16
|
+
) -> Courier::Models::notification_template_state
|
|
17
|
+
|
|
18
|
+
def initialize: (
|
|
19
|
+
content: Courier::NotificationContentPutRequest::Content,
|
|
20
|
+
?state: Courier::Models::notification_template_state
|
|
21
|
+
) -> void
|
|
22
|
+
|
|
23
|
+
def to_hash: -> {
|
|
24
|
+
content: Courier::NotificationContentPutRequest::Content,
|
|
25
|
+
state: Courier::Models::notification_template_state
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
type content =
|
|
29
|
+
{ elements: ::Array[Courier::Models::elemental_node], version: String }
|
|
30
|
+
|
|
31
|
+
class Content < Courier::Internal::Type::BaseModel
|
|
32
|
+
attr_accessor elements: ::Array[Courier::Models::elemental_node]
|
|
33
|
+
|
|
34
|
+
attr_reader version: String?
|
|
35
|
+
|
|
36
|
+
def version=: (String) -> String
|
|
37
|
+
|
|
38
|
+
def initialize: (
|
|
39
|
+
elements: ::Array[Courier::Models::elemental_node],
|
|
40
|
+
?version: String
|
|
41
|
+
) -> void
|
|
42
|
+
|
|
43
|
+
def to_hash: -> {
|
|
44
|
+
elements: ::Array[Courier::Models::elemental_node],
|
|
45
|
+
version: String
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type notification_create_params =
|
|
4
|
+
{ } & Courier::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class NotificationCreateParams < Courier::Models::NotificationTemplateCreateRequest
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
def initialize: (?request_options: Courier::request_opts) -> void
|
|
11
|
+
|
|
12
|
+
def to_hash: -> { request_options: Courier::RequestOptions }
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type notification_element_put_request =
|
|
4
|
+
{
|
|
5
|
+
type: String,
|
|
6
|
+
channels: ::Array[String],
|
|
7
|
+
data: ::Hash[Symbol, top],
|
|
8
|
+
if_: String,
|
|
9
|
+
loop_: String,
|
|
10
|
+
ref: String,
|
|
11
|
+
state: Courier::Models::notification_template_state
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class NotificationElementPutRequest < Courier::Internal::Type::BaseModel
|
|
15
|
+
attr_accessor type: String
|
|
16
|
+
|
|
17
|
+
attr_reader channels: ::Array[String]?
|
|
18
|
+
|
|
19
|
+
def channels=: (::Array[String]) -> ::Array[String]
|
|
20
|
+
|
|
21
|
+
attr_reader data: ::Hash[Symbol, top]?
|
|
22
|
+
|
|
23
|
+
def data=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
|
24
|
+
|
|
25
|
+
attr_reader if_: String?
|
|
26
|
+
|
|
27
|
+
def if_=: (String) -> String
|
|
28
|
+
|
|
29
|
+
attr_reader loop_: String?
|
|
30
|
+
|
|
31
|
+
def loop_=: (String) -> String
|
|
32
|
+
|
|
33
|
+
attr_reader ref: String?
|
|
34
|
+
|
|
35
|
+
def ref=: (String) -> String
|
|
36
|
+
|
|
37
|
+
attr_reader state: Courier::Models::notification_template_state?
|
|
38
|
+
|
|
39
|
+
def state=: (
|
|
40
|
+
Courier::Models::notification_template_state
|
|
41
|
+
) -> Courier::Models::notification_template_state
|
|
42
|
+
|
|
43
|
+
def initialize: (
|
|
44
|
+
type: String,
|
|
45
|
+
?channels: ::Array[String],
|
|
46
|
+
?data: ::Hash[Symbol, top],
|
|
47
|
+
?if_: String,
|
|
48
|
+
?loop_: String,
|
|
49
|
+
?ref: String,
|
|
50
|
+
?state: Courier::Models::notification_template_state
|
|
51
|
+
) -> void
|
|
52
|
+
|
|
53
|
+
def to_hash: -> {
|
|
54
|
+
type: String,
|
|
55
|
+
channels: ::Array[String],
|
|
56
|
+
data: ::Hash[Symbol, top],
|
|
57
|
+
if_: String,
|
|
58
|
+
loop_: String,
|
|
59
|
+
ref: String,
|
|
60
|
+
state: Courier::Models::notification_template_state
|
|
61
|
+
}
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module Courier
|
|
2
2
|
module Models
|
|
3
3
|
type notification_list_params =
|
|
4
|
-
{ cursor: String?, notes: bool? }
|
|
4
|
+
{ cursor: String?, event_id: String, notes: bool? }
|
|
5
5
|
& Courier::Internal::Type::request_parameters
|
|
6
6
|
|
|
7
7
|
class NotificationListParams < Courier::Internal::Type::BaseModel
|
|
@@ -10,16 +10,22 @@ module Courier
|
|
|
10
10
|
|
|
11
11
|
attr_accessor cursor: String?
|
|
12
12
|
|
|
13
|
+
attr_reader event_id: String?
|
|
14
|
+
|
|
15
|
+
def event_id=: (String) -> String
|
|
16
|
+
|
|
13
17
|
attr_accessor notes: bool?
|
|
14
18
|
|
|
15
19
|
def initialize: (
|
|
16
20
|
?cursor: String?,
|
|
21
|
+
?event_id: String,
|
|
17
22
|
?notes: bool?,
|
|
18
23
|
?request_options: Courier::request_opts
|
|
19
24
|
) -> void
|
|
20
25
|
|
|
21
26
|
def to_hash: -> {
|
|
22
27
|
cursor: String?,
|
|
28
|
+
event_id: String,
|
|
23
29
|
notes: bool?,
|
|
24
30
|
request_options: Courier::RequestOptions
|
|
25
31
|
}
|
|
@@ -3,108 +3,118 @@ module Courier
|
|
|
3
3
|
type notification_list_response =
|
|
4
4
|
{
|
|
5
5
|
paging: Courier::Paging,
|
|
6
|
-
results: ::Array[Courier::Models::NotificationListResponse::
|
|
6
|
+
results: ::Array[Courier::Models::NotificationListResponse::result]
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
class NotificationListResponse < Courier::Internal::Type::BaseModel
|
|
10
10
|
attr_accessor paging: Courier::Paging
|
|
11
11
|
|
|
12
|
-
attr_accessor results: ::Array[Courier::Models::NotificationListResponse::
|
|
12
|
+
attr_accessor results: ::Array[Courier::Models::NotificationListResponse::result]
|
|
13
13
|
|
|
14
14
|
def initialize: (
|
|
15
15
|
paging: Courier::Paging,
|
|
16
|
-
results: ::Array[Courier::Models::NotificationListResponse::
|
|
16
|
+
results: ::Array[Courier::Models::NotificationListResponse::result]
|
|
17
17
|
) -> void
|
|
18
18
|
|
|
19
19
|
def to_hash: -> {
|
|
20
20
|
paging: Courier::Paging,
|
|
21
|
-
results: ::Array[Courier::Models::NotificationListResponse::
|
|
21
|
+
results: ::Array[Courier::Models::NotificationListResponse::result]
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
type result =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
updated_at: Integer,
|
|
33
|
-
tags: Courier::Models::NotificationListResponse::Result::Tags?,
|
|
34
|
-
title: String?
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
class Result < Courier::Internal::Type::BaseModel
|
|
38
|
-
attr_accessor id: String
|
|
39
|
-
|
|
40
|
-
attr_accessor created_at: Integer
|
|
41
|
-
|
|
42
|
-
attr_accessor event_ids: ::Array[String]
|
|
43
|
-
|
|
44
|
-
attr_accessor note: String
|
|
45
|
-
|
|
46
|
-
attr_accessor routing: Courier::MessageRouting
|
|
47
|
-
|
|
48
|
-
attr_accessor topic_id: String
|
|
49
|
-
|
|
50
|
-
attr_accessor updated_at: Integer
|
|
51
|
-
|
|
52
|
-
attr_accessor tags: Courier::Models::NotificationListResponse::Result::Tags?
|
|
53
|
-
|
|
54
|
-
attr_accessor title: String?
|
|
55
|
-
|
|
56
|
-
def initialize: (
|
|
57
|
-
id: String,
|
|
58
|
-
created_at: Integer,
|
|
59
|
-
event_ids: ::Array[String],
|
|
60
|
-
note: String,
|
|
61
|
-
routing: Courier::MessageRouting,
|
|
62
|
-
topic_id: String,
|
|
63
|
-
updated_at: Integer,
|
|
64
|
-
?tags: Courier::Models::NotificationListResponse::Result::Tags?,
|
|
65
|
-
?title: String?
|
|
66
|
-
) -> void
|
|
67
|
-
|
|
68
|
-
def to_hash: -> {
|
|
69
|
-
id: String,
|
|
70
|
-
created_at: Integer,
|
|
71
|
-
event_ids: ::Array[String],
|
|
72
|
-
note: String,
|
|
73
|
-
routing: Courier::MessageRouting,
|
|
74
|
-
topic_id: String,
|
|
75
|
-
updated_at: Integer,
|
|
76
|
-
tags: Courier::Models::NotificationListResponse::Result::Tags?,
|
|
77
|
-
title: String?
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
type tags =
|
|
25
|
+
Courier::Models::NotificationListResponse::Result::Notification
|
|
26
|
+
| Courier::NotificationTemplateSummary
|
|
27
|
+
|
|
28
|
+
module Result
|
|
29
|
+
extend Courier::Internal::Type::Union
|
|
30
|
+
|
|
31
|
+
type notification =
|
|
81
32
|
{
|
|
82
|
-
|
|
33
|
+
id: String,
|
|
34
|
+
created_at: Integer,
|
|
35
|
+
event_ids: ::Array[String],
|
|
36
|
+
note: String,
|
|
37
|
+
routing: Courier::MessageRouting,
|
|
38
|
+
topic_id: String,
|
|
39
|
+
updated_at: Integer,
|
|
40
|
+
tags: Courier::Models::NotificationListResponse::Result::Notification::Tags?,
|
|
41
|
+
title: String?
|
|
83
42
|
}
|
|
84
43
|
|
|
85
|
-
class
|
|
86
|
-
attr_accessor
|
|
44
|
+
class Notification < Courier::Internal::Type::BaseModel
|
|
45
|
+
attr_accessor id: String
|
|
46
|
+
|
|
47
|
+
attr_accessor created_at: Integer
|
|
48
|
+
|
|
49
|
+
attr_accessor event_ids: ::Array[String]
|
|
50
|
+
|
|
51
|
+
attr_accessor note: String
|
|
52
|
+
|
|
53
|
+
attr_accessor routing: Courier::MessageRouting
|
|
54
|
+
|
|
55
|
+
attr_accessor topic_id: String
|
|
56
|
+
|
|
57
|
+
attr_accessor updated_at: Integer
|
|
58
|
+
|
|
59
|
+
attr_accessor tags: Courier::Models::NotificationListResponse::Result::Notification::Tags?
|
|
60
|
+
|
|
61
|
+
attr_accessor title: String?
|
|
87
62
|
|
|
88
63
|
def initialize: (
|
|
89
|
-
|
|
64
|
+
id: String,
|
|
65
|
+
created_at: Integer,
|
|
66
|
+
event_ids: ::Array[String],
|
|
67
|
+
note: String,
|
|
68
|
+
routing: Courier::MessageRouting,
|
|
69
|
+
topic_id: String,
|
|
70
|
+
updated_at: Integer,
|
|
71
|
+
?tags: Courier::Models::NotificationListResponse::Result::Notification::Tags?,
|
|
72
|
+
?title: String?
|
|
90
73
|
) -> void
|
|
91
74
|
|
|
92
75
|
def to_hash: -> {
|
|
93
|
-
|
|
76
|
+
id: String,
|
|
77
|
+
created_at: Integer,
|
|
78
|
+
event_ids: ::Array[String],
|
|
79
|
+
note: String,
|
|
80
|
+
routing: Courier::MessageRouting,
|
|
81
|
+
topic_id: String,
|
|
82
|
+
updated_at: Integer,
|
|
83
|
+
tags: Courier::Models::NotificationListResponse::Result::Notification::Tags?,
|
|
84
|
+
title: String?
|
|
94
85
|
}
|
|
95
86
|
|
|
96
|
-
type
|
|
87
|
+
type tags =
|
|
88
|
+
{
|
|
89
|
+
data: ::Array[Courier::Models::NotificationListResponse::Result::Notification::Tags::Data]
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
class Tags < Courier::Internal::Type::BaseModel
|
|
93
|
+
attr_accessor data: ::Array[Courier::Models::NotificationListResponse::Result::Notification::Tags::Data]
|
|
94
|
+
|
|
95
|
+
def initialize: (
|
|
96
|
+
data: ::Array[Courier::Models::NotificationListResponse::Result::Notification::Tags::Data]
|
|
97
|
+
) -> void
|
|
97
98
|
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
def to_hash: -> {
|
|
100
|
+
data: ::Array[Courier::Models::NotificationListResponse::Result::Notification::Tags::Data]
|
|
101
|
+
}
|
|
100
102
|
|
|
101
|
-
|
|
103
|
+
type data = { id: String, name: String }
|
|
102
104
|
|
|
103
|
-
|
|
105
|
+
class Data < Courier::Internal::Type::BaseModel
|
|
106
|
+
attr_accessor id: String
|
|
104
107
|
|
|
105
|
-
|
|
108
|
+
attr_accessor name: String
|
|
109
|
+
|
|
110
|
+
def initialize: (id: String, name: String) -> void
|
|
111
|
+
|
|
112
|
+
def to_hash: -> { id: String, name: String }
|
|
113
|
+
end
|
|
106
114
|
end
|
|
107
115
|
end
|
|
116
|
+
|
|
117
|
+
def self?.variants: -> ::Array[Courier::Models::NotificationListResponse::result]
|
|
108
118
|
end
|
|
109
119
|
end
|
|
110
120
|
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type notification_list_versions_params =
|
|
4
|
+
{ id: String, cursor: String, limit: Integer }
|
|
5
|
+
& Courier::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class NotificationListVersionsParams < Courier::Internal::Type::BaseModel
|
|
8
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Courier::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_accessor id: String
|
|
12
|
+
|
|
13
|
+
attr_reader cursor: String?
|
|
14
|
+
|
|
15
|
+
def cursor=: (String) -> String
|
|
16
|
+
|
|
17
|
+
attr_reader limit: Integer?
|
|
18
|
+
|
|
19
|
+
def limit=: (Integer) -> Integer
|
|
20
|
+
|
|
21
|
+
def initialize: (
|
|
22
|
+
id: String,
|
|
23
|
+
?cursor: String,
|
|
24
|
+
?limit: Integer,
|
|
25
|
+
?request_options: Courier::request_opts
|
|
26
|
+
) -> void
|
|
27
|
+
|
|
28
|
+
def to_hash: -> {
|
|
29
|
+
id: String,
|
|
30
|
+
cursor: String,
|
|
31
|
+
limit: Integer,
|
|
32
|
+
request_options: Courier::RequestOptions
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|