trycourier 4.9.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 +9 -0
- data/lib/courier/models/associated_notification_list_response.rb +24 -0
- data/lib/courier/models/element_with_checksums.rb +60 -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_element_put_request.rb +62 -0
- data/lib/courier/models/notification_get_content.rb +0 -1
- data/lib/courier/models/notification_locale_put_request.rb +39 -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_retrieve_content_params.rb +14 -1
- data/lib/courier/models/notification_retrieve_content_response.rb +21 -0
- data/lib/courier/models/notification_template_state.rb +16 -0
- data/lib/courier/models/routing_strategy_list_notifications_params.rb +37 -0
- data/lib/courier/models.rb +24 -0
- data/lib/courier/resources/notifications.rb +124 -9
- data/lib/courier/resources/routing_strategies.rb +28 -0
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +13 -2
- data/rbi/courier/models/associated_notification_list_response.rbi +45 -0
- data/rbi/courier/models/element_with_checksums.rbi +109 -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_element_put_request.rbi +98 -0
- data/rbi/courier/models/notification_locale_put_request.rbi +79 -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_retrieve_content_params.rbi +21 -2
- data/rbi/courier/models/notification_retrieve_content_response.rbi +29 -0
- data/rbi/courier/models/notification_template_state.rbi +26 -0
- data/rbi/courier/models/routing_strategy_list_notifications_params.rbi +63 -0
- data/rbi/courier/models.rbi +28 -0
- data/rbi/courier/resources/notifications.rbi +103 -5
- data/rbi/courier/resources/routing_strategies.rbi +21 -0
- data/sig/courier/models/associated_notification_list_response.rbs +25 -0
- data/sig/courier/models/element_with_checksums.rbs +60 -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_element_put_request.rbs +64 -0
- data/sig/courier/models/notification_locale_put_request.rbs +39 -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_retrieve_content_params.rbs +12 -2
- data/sig/courier/models/notification_retrieve_content_response.rbs +12 -0
- data/sig/courier/models/notification_template_state.rbs +14 -0
- data/sig/courier/models/routing_strategy_list_notifications_params.rbs +34 -0
- data/sig/courier/models.rbs +24 -0
- data/sig/courier/resources/notifications.rbs +30 -3
- data/sig/courier/resources/routing_strategies.rbs +7 -0
- metadata +41 -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,145 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationContentPutRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Courier::NotificationContentPutRequest,
|
|
10
|
+
Courier::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Elemental content payload. The server defaults `version` when omitted.
|
|
15
|
+
sig { returns(Courier::NotificationContentPutRequest::Content) }
|
|
16
|
+
attr_reader :content
|
|
17
|
+
|
|
18
|
+
sig do
|
|
19
|
+
params(
|
|
20
|
+
content: Courier::NotificationContentPutRequest::Content::OrHash
|
|
21
|
+
).void
|
|
22
|
+
end
|
|
23
|
+
attr_writer :content
|
|
24
|
+
|
|
25
|
+
# Template state. Defaults to `DRAFT`.
|
|
26
|
+
sig { returns(T.nilable(Courier::NotificationTemplateState::OrSymbol)) }
|
|
27
|
+
attr_reader :state
|
|
28
|
+
|
|
29
|
+
sig { params(state: Courier::NotificationTemplateState::OrSymbol).void }
|
|
30
|
+
attr_writer :state
|
|
31
|
+
|
|
32
|
+
# Request body for replacing the elemental content of a notification template.
|
|
33
|
+
sig do
|
|
34
|
+
params(
|
|
35
|
+
content: Courier::NotificationContentPutRequest::Content::OrHash,
|
|
36
|
+
state: Courier::NotificationTemplateState::OrSymbol
|
|
37
|
+
).returns(T.attached_class)
|
|
38
|
+
end
|
|
39
|
+
def self.new(
|
|
40
|
+
# Elemental content payload. The server defaults `version` when omitted.
|
|
41
|
+
content:,
|
|
42
|
+
# Template state. Defaults to `DRAFT`.
|
|
43
|
+
state: nil
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
sig do
|
|
48
|
+
override.returns(
|
|
49
|
+
{
|
|
50
|
+
content: Courier::NotificationContentPutRequest::Content,
|
|
51
|
+
state: Courier::NotificationTemplateState::OrSymbol
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
def to_hash
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
class Content < Courier::Internal::Type::BaseModel
|
|
59
|
+
OrHash =
|
|
60
|
+
T.type_alias do
|
|
61
|
+
T.any(
|
|
62
|
+
Courier::NotificationContentPutRequest::Content,
|
|
63
|
+
Courier::Internal::AnyHash
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
sig do
|
|
68
|
+
returns(
|
|
69
|
+
T::Array[
|
|
70
|
+
T.any(
|
|
71
|
+
Courier::ElementalTextNodeWithType,
|
|
72
|
+
Courier::ElementalMetaNodeWithType,
|
|
73
|
+
Courier::ElementalChannelNodeWithType,
|
|
74
|
+
Courier::ElementalImageNodeWithType,
|
|
75
|
+
Courier::ElementalActionNodeWithType,
|
|
76
|
+
Courier::ElementalDividerNodeWithType,
|
|
77
|
+
Courier::ElementalQuoteNodeWithType,
|
|
78
|
+
Courier::ElementalHTMLNodeWithType
|
|
79
|
+
)
|
|
80
|
+
]
|
|
81
|
+
)
|
|
82
|
+
end
|
|
83
|
+
attr_accessor :elements
|
|
84
|
+
|
|
85
|
+
# Content version identifier (e.g., `2022-01-01`). Optional; server defaults when
|
|
86
|
+
# omitted.
|
|
87
|
+
sig { returns(T.nilable(String)) }
|
|
88
|
+
attr_reader :version
|
|
89
|
+
|
|
90
|
+
sig { params(version: String).void }
|
|
91
|
+
attr_writer :version
|
|
92
|
+
|
|
93
|
+
# Elemental content payload. The server defaults `version` when omitted.
|
|
94
|
+
sig do
|
|
95
|
+
params(
|
|
96
|
+
elements:
|
|
97
|
+
T::Array[
|
|
98
|
+
T.any(
|
|
99
|
+
Courier::ElementalTextNodeWithType::OrHash,
|
|
100
|
+
Courier::ElementalMetaNodeWithType::OrHash,
|
|
101
|
+
Courier::ElementalChannelNodeWithType::OrHash,
|
|
102
|
+
Courier::ElementalImageNodeWithType::OrHash,
|
|
103
|
+
Courier::ElementalActionNodeWithType::OrHash,
|
|
104
|
+
Courier::ElementalDividerNodeWithType::OrHash,
|
|
105
|
+
Courier::ElementalQuoteNodeWithType::OrHash,
|
|
106
|
+
Courier::ElementalHTMLNodeWithType::OrHash
|
|
107
|
+
)
|
|
108
|
+
],
|
|
109
|
+
version: String
|
|
110
|
+
).returns(T.attached_class)
|
|
111
|
+
end
|
|
112
|
+
def self.new(
|
|
113
|
+
elements:,
|
|
114
|
+
# Content version identifier (e.g., `2022-01-01`). Optional; server defaults when
|
|
115
|
+
# omitted.
|
|
116
|
+
version: nil
|
|
117
|
+
)
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
sig do
|
|
121
|
+
override.returns(
|
|
122
|
+
{
|
|
123
|
+
elements:
|
|
124
|
+
T::Array[
|
|
125
|
+
T.any(
|
|
126
|
+
Courier::ElementalTextNodeWithType,
|
|
127
|
+
Courier::ElementalMetaNodeWithType,
|
|
128
|
+
Courier::ElementalChannelNodeWithType,
|
|
129
|
+
Courier::ElementalImageNodeWithType,
|
|
130
|
+
Courier::ElementalActionNodeWithType,
|
|
131
|
+
Courier::ElementalDividerNodeWithType,
|
|
132
|
+
Courier::ElementalQuoteNodeWithType,
|
|
133
|
+
Courier::ElementalHTMLNodeWithType
|
|
134
|
+
)
|
|
135
|
+
],
|
|
136
|
+
version: String
|
|
137
|
+
}
|
|
138
|
+
)
|
|
139
|
+
end
|
|
140
|
+
def to_hash
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
end
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationElementPutRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Courier::NotificationElementPutRequest,
|
|
10
|
+
Courier::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Element type (text, meta, action, image, etc.).
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :type
|
|
17
|
+
|
|
18
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
19
|
+
attr_reader :channels
|
|
20
|
+
|
|
21
|
+
sig { params(channels: T::Array[String]).void }
|
|
22
|
+
attr_writer :channels
|
|
23
|
+
|
|
24
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
25
|
+
attr_reader :data
|
|
26
|
+
|
|
27
|
+
sig { params(data: T::Hash[Symbol, T.anything]).void }
|
|
28
|
+
attr_writer :data
|
|
29
|
+
|
|
30
|
+
sig { returns(T.nilable(String)) }
|
|
31
|
+
attr_reader :if_
|
|
32
|
+
|
|
33
|
+
sig { params(if_: String).void }
|
|
34
|
+
attr_writer :if_
|
|
35
|
+
|
|
36
|
+
sig { returns(T.nilable(String)) }
|
|
37
|
+
attr_reader :loop_
|
|
38
|
+
|
|
39
|
+
sig { params(loop_: String).void }
|
|
40
|
+
attr_writer :loop_
|
|
41
|
+
|
|
42
|
+
sig { returns(T.nilable(String)) }
|
|
43
|
+
attr_reader :ref
|
|
44
|
+
|
|
45
|
+
sig { params(ref: String).void }
|
|
46
|
+
attr_writer :ref
|
|
47
|
+
|
|
48
|
+
# Template state. Defaults to `DRAFT`.
|
|
49
|
+
sig { returns(T.nilable(Courier::NotificationTemplateState::OrSymbol)) }
|
|
50
|
+
attr_reader :state
|
|
51
|
+
|
|
52
|
+
sig { params(state: Courier::NotificationTemplateState::OrSymbol).void }
|
|
53
|
+
attr_writer :state
|
|
54
|
+
|
|
55
|
+
# Request body for updating a single element. Additional type-specific fields are
|
|
56
|
+
# allowed.
|
|
57
|
+
sig do
|
|
58
|
+
params(
|
|
59
|
+
type: String,
|
|
60
|
+
channels: T::Array[String],
|
|
61
|
+
data: T::Hash[Symbol, T.anything],
|
|
62
|
+
if_: String,
|
|
63
|
+
loop_: String,
|
|
64
|
+
ref: String,
|
|
65
|
+
state: Courier::NotificationTemplateState::OrSymbol
|
|
66
|
+
).returns(T.attached_class)
|
|
67
|
+
end
|
|
68
|
+
def self.new(
|
|
69
|
+
# Element type (text, meta, action, image, etc.).
|
|
70
|
+
type:,
|
|
71
|
+
channels: nil,
|
|
72
|
+
data: nil,
|
|
73
|
+
if_: nil,
|
|
74
|
+
loop_: nil,
|
|
75
|
+
ref: nil,
|
|
76
|
+
# Template state. Defaults to `DRAFT`.
|
|
77
|
+
state: nil
|
|
78
|
+
)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
sig do
|
|
82
|
+
override.returns(
|
|
83
|
+
{
|
|
84
|
+
type: String,
|
|
85
|
+
channels: T::Array[String],
|
|
86
|
+
data: T::Hash[Symbol, T.anything],
|
|
87
|
+
if_: String,
|
|
88
|
+
loop_: String,
|
|
89
|
+
ref: String,
|
|
90
|
+
state: Courier::NotificationTemplateState::OrSymbol
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
end
|
|
94
|
+
def to_hash
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationLocalePutRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Courier::NotificationLocalePutRequest,
|
|
10
|
+
Courier::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Elements with locale-specific content overrides.
|
|
15
|
+
sig { returns(T::Array[Courier::NotificationLocalePutRequest::Element]) }
|
|
16
|
+
attr_accessor :elements
|
|
17
|
+
|
|
18
|
+
# Template state. Defaults to `DRAFT`.
|
|
19
|
+
sig { returns(T.nilable(Courier::NotificationTemplateState::OrSymbol)) }
|
|
20
|
+
attr_reader :state
|
|
21
|
+
|
|
22
|
+
sig { params(state: Courier::NotificationTemplateState::OrSymbol).void }
|
|
23
|
+
attr_writer :state
|
|
24
|
+
|
|
25
|
+
# Request body for setting locale-specific content overrides. Each element
|
|
26
|
+
# override must include the target element ID.
|
|
27
|
+
sig do
|
|
28
|
+
params(
|
|
29
|
+
elements:
|
|
30
|
+
T::Array[Courier::NotificationLocalePutRequest::Element::OrHash],
|
|
31
|
+
state: Courier::NotificationTemplateState::OrSymbol
|
|
32
|
+
).returns(T.attached_class)
|
|
33
|
+
end
|
|
34
|
+
def self.new(
|
|
35
|
+
# Elements with locale-specific content overrides.
|
|
36
|
+
elements:,
|
|
37
|
+
# Template state. Defaults to `DRAFT`.
|
|
38
|
+
state: nil
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
sig do
|
|
43
|
+
override.returns(
|
|
44
|
+
{
|
|
45
|
+
elements: T::Array[Courier::NotificationLocalePutRequest::Element],
|
|
46
|
+
state: Courier::NotificationTemplateState::OrSymbol
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
end
|
|
50
|
+
def to_hash
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
class Element < Courier::Internal::Type::BaseModel
|
|
54
|
+
OrHash =
|
|
55
|
+
T.type_alias do
|
|
56
|
+
T.any(
|
|
57
|
+
Courier::NotificationLocalePutRequest::Element,
|
|
58
|
+
Courier::Internal::AnyHash
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Target element ID.
|
|
63
|
+
sig { returns(String) }
|
|
64
|
+
attr_accessor :id
|
|
65
|
+
|
|
66
|
+
sig { params(id: String).returns(T.attached_class) }
|
|
67
|
+
def self.new(
|
|
68
|
+
# Target element ID.
|
|
69
|
+
id:
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
sig { override.returns({ id: String }) }
|
|
74
|
+
def to_hash
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationPutContentParams < Courier::Models::NotificationContentPutRequest
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Courier::NotificationPutContentParams,
|
|
13
|
+
Courier::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
sig do
|
|
21
|
+
params(
|
|
22
|
+
id: String,
|
|
23
|
+
request_options: Courier::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
25
|
+
end
|
|
26
|
+
def self.new(id:, request_options: {})
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
{ id: String, request_options: Courier::RequestOptions }
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
def to_hash
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationPutElementParams < Courier::Models::NotificationElementPutRequest
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Courier::NotificationPutElementParams,
|
|
13
|
+
Courier::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :element_id
|
|
22
|
+
|
|
23
|
+
sig do
|
|
24
|
+
params(
|
|
25
|
+
id: String,
|
|
26
|
+
element_id: String,
|
|
27
|
+
request_options: Courier::RequestOptions::OrHash
|
|
28
|
+
).returns(T.attached_class)
|
|
29
|
+
end
|
|
30
|
+
def self.new(id:, element_id:, request_options: {})
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
sig do
|
|
34
|
+
override.returns(
|
|
35
|
+
{
|
|
36
|
+
id: String,
|
|
37
|
+
element_id: String,
|
|
38
|
+
request_options: Courier::RequestOptions
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
def to_hash
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationPutLocaleParams < Courier::Models::NotificationLocalePutRequest
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Courier::NotificationPutLocaleParams,
|
|
13
|
+
Courier::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :locale_id
|
|
22
|
+
|
|
23
|
+
sig do
|
|
24
|
+
params(
|
|
25
|
+
id: String,
|
|
26
|
+
locale_id: String,
|
|
27
|
+
request_options: Courier::RequestOptions::OrHash
|
|
28
|
+
).returns(T.attached_class)
|
|
29
|
+
end
|
|
30
|
+
def self.new(id:, locale_id:, request_options: {})
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
sig do
|
|
34
|
+
override.returns(
|
|
35
|
+
{
|
|
36
|
+
id: String,
|
|
37
|
+
locale_id: String,
|
|
38
|
+
request_options: Courier::RequestOptions
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
def to_hash
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -17,18 +17,37 @@ module Courier
|
|
|
17
17
|
sig { returns(String) }
|
|
18
18
|
attr_accessor :id
|
|
19
19
|
|
|
20
|
+
# Accepts `draft`, `published`, or a version string (e.g., `v001`). Defaults to
|
|
21
|
+
# `published`.
|
|
22
|
+
sig { returns(T.nilable(String)) }
|
|
23
|
+
attr_reader :version
|
|
24
|
+
|
|
25
|
+
sig { params(version: String).void }
|
|
26
|
+
attr_writer :version
|
|
27
|
+
|
|
20
28
|
sig do
|
|
21
29
|
params(
|
|
22
30
|
id: String,
|
|
31
|
+
version: String,
|
|
23
32
|
request_options: Courier::RequestOptions::OrHash
|
|
24
33
|
).returns(T.attached_class)
|
|
25
34
|
end
|
|
26
|
-
def self.new(
|
|
35
|
+
def self.new(
|
|
36
|
+
id:,
|
|
37
|
+
# Accepts `draft`, `published`, or a version string (e.g., `v001`). Defaults to
|
|
38
|
+
# `published`.
|
|
39
|
+
version: nil,
|
|
40
|
+
request_options: {}
|
|
41
|
+
)
|
|
27
42
|
end
|
|
28
43
|
|
|
29
44
|
sig do
|
|
30
45
|
override.returns(
|
|
31
|
-
{
|
|
46
|
+
{
|
|
47
|
+
id: String,
|
|
48
|
+
version: String,
|
|
49
|
+
request_options: Courier::RequestOptions
|
|
50
|
+
}
|
|
32
51
|
)
|
|
33
52
|
end
|
|
34
53
|
def to_hash
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# Elemental content response for V2 templates. Contains versioned elements with
|
|
6
|
+
# content checksums.
|
|
7
|
+
module NotificationRetrieveContentResponse
|
|
8
|
+
extend Courier::Internal::Type::Union
|
|
9
|
+
|
|
10
|
+
Variants =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Courier::NotificationContentGetResponse,
|
|
14
|
+
Courier::NotificationGetContent
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig do
|
|
19
|
+
override.returns(
|
|
20
|
+
T::Array[
|
|
21
|
+
Courier::Models::NotificationRetrieveContentResponse::Variants
|
|
22
|
+
]
|
|
23
|
+
)
|
|
24
|
+
end
|
|
25
|
+
def self.variants
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# Template state. Defaults to `DRAFT`.
|
|
6
|
+
module NotificationTemplateState
|
|
7
|
+
extend Courier::Internal::Type::Enum
|
|
8
|
+
|
|
9
|
+
TaggedSymbol =
|
|
10
|
+
T.type_alias { T.all(Symbol, Courier::NotificationTemplateState) }
|
|
11
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
12
|
+
|
|
13
|
+
DRAFT = T.let(:DRAFT, Courier::NotificationTemplateState::TaggedSymbol)
|
|
14
|
+
PUBLISHED =
|
|
15
|
+
T.let(:PUBLISHED, Courier::NotificationTemplateState::TaggedSymbol)
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
override.returns(
|
|
19
|
+
T::Array[Courier::NotificationTemplateState::TaggedSymbol]
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
def self.values
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class RoutingStrategyListNotificationsParams < Courier::Internal::Type::BaseModel
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Courier::RoutingStrategyListNotificationsParams,
|
|
13
|
+
Courier::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
# Opaque pagination cursor from a previous response. Omit for the first page.
|
|
21
|
+
sig { returns(T.nilable(String)) }
|
|
22
|
+
attr_accessor :cursor
|
|
23
|
+
|
|
24
|
+
# Maximum number of results per page. Default 20, max 100.
|
|
25
|
+
sig { returns(T.nilable(Integer)) }
|
|
26
|
+
attr_reader :limit
|
|
27
|
+
|
|
28
|
+
sig { params(limit: Integer).void }
|
|
29
|
+
attr_writer :limit
|
|
30
|
+
|
|
31
|
+
sig do
|
|
32
|
+
params(
|
|
33
|
+
id: String,
|
|
34
|
+
cursor: T.nilable(String),
|
|
35
|
+
limit: Integer,
|
|
36
|
+
request_options: Courier::RequestOptions::OrHash
|
|
37
|
+
).returns(T.attached_class)
|
|
38
|
+
end
|
|
39
|
+
def self.new(
|
|
40
|
+
id:,
|
|
41
|
+
# Opaque pagination cursor from a previous response. Omit for the first page.
|
|
42
|
+
cursor: nil,
|
|
43
|
+
# Maximum number of results per page. Default 20, max 100.
|
|
44
|
+
limit: nil,
|
|
45
|
+
request_options: {}
|
|
46
|
+
)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
sig do
|
|
50
|
+
override.returns(
|
|
51
|
+
{
|
|
52
|
+
id: String,
|
|
53
|
+
cursor: T.nilable(String),
|
|
54
|
+
limit: Integer,
|
|
55
|
+
request_options: Courier::RequestOptions
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
def to_hash
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
data/rbi/courier/models.rbi
CHANGED
|
@@ -7,6 +7,9 @@ module Courier
|
|
|
7
7
|
|
|
8
8
|
Alignment = Courier::Models::Alignment
|
|
9
9
|
|
|
10
|
+
AssociatedNotificationListResponse =
|
|
11
|
+
Courier::Models::AssociatedNotificationListResponse
|
|
12
|
+
|
|
10
13
|
Audience = Courier::Models::Audience
|
|
11
14
|
|
|
12
15
|
AudienceDeleteParams = Courier::Models::AudienceDeleteParams
|
|
@@ -126,6 +129,8 @@ module Courier
|
|
|
126
129
|
|
|
127
130
|
ElementalTextNodeWithType = Courier::Models::ElementalTextNodeWithType
|
|
128
131
|
|
|
132
|
+
ElementWithChecksums = Courier::Models::ElementWithChecksums
|
|
133
|
+
|
|
129
134
|
EmailFooter = Courier::Models::EmailFooter
|
|
130
135
|
|
|
131
136
|
EmailHead = Courier::Models::EmailHead
|
|
@@ -218,8 +223,18 @@ module Courier
|
|
|
218
223
|
|
|
219
224
|
NotificationArchiveParams = Courier::Models::NotificationArchiveParams
|
|
220
225
|
|
|
226
|
+
NotificationContentGetResponse =
|
|
227
|
+
Courier::Models::NotificationContentGetResponse
|
|
228
|
+
|
|
229
|
+
NotificationContentMutationResponse =
|
|
230
|
+
Courier::Models::NotificationContentMutationResponse
|
|
231
|
+
|
|
232
|
+
NotificationContentPutRequest = Courier::Models::NotificationContentPutRequest
|
|
233
|
+
|
|
221
234
|
NotificationCreateParams = Courier::Models::NotificationCreateParams
|
|
222
235
|
|
|
236
|
+
NotificationElementPutRequest = Courier::Models::NotificationElementPutRequest
|
|
237
|
+
|
|
223
238
|
NotificationGetContent = Courier::Models::NotificationGetContent
|
|
224
239
|
|
|
225
240
|
NotificationListParams = Courier::Models::NotificationListParams
|
|
@@ -227,10 +242,18 @@ module Courier
|
|
|
227
242
|
NotificationListVersionsParams =
|
|
228
243
|
Courier::Models::NotificationListVersionsParams
|
|
229
244
|
|
|
245
|
+
NotificationLocalePutRequest = Courier::Models::NotificationLocalePutRequest
|
|
246
|
+
|
|
230
247
|
NotificationPreferenceDetails = Courier::Models::NotificationPreferenceDetails
|
|
231
248
|
|
|
232
249
|
NotificationPublishParams = Courier::Models::NotificationPublishParams
|
|
233
250
|
|
|
251
|
+
NotificationPutContentParams = Courier::Models::NotificationPutContentParams
|
|
252
|
+
|
|
253
|
+
NotificationPutElementParams = Courier::Models::NotificationPutElementParams
|
|
254
|
+
|
|
255
|
+
NotificationPutLocaleParams = Courier::Models::NotificationPutLocaleParams
|
|
256
|
+
|
|
234
257
|
NotificationReplaceParams = Courier::Models::NotificationReplaceParams
|
|
235
258
|
|
|
236
259
|
NotificationRetrieveContentParams =
|
|
@@ -254,6 +277,8 @@ module Courier
|
|
|
254
277
|
NotificationTemplatePublishRequest =
|
|
255
278
|
Courier::Models::NotificationTemplatePublishRequest
|
|
256
279
|
|
|
280
|
+
NotificationTemplateState = Courier::Models::NotificationTemplateState
|
|
281
|
+
|
|
257
282
|
NotificationTemplateSummary = Courier::Models::NotificationTemplateSummary
|
|
258
283
|
|
|
259
284
|
NotificationTemplateUpdateRequest =
|
|
@@ -324,6 +349,9 @@ module Courier
|
|
|
324
349
|
|
|
325
350
|
RoutingStrategyGetResponse = Courier::Models::RoutingStrategyGetResponse
|
|
326
351
|
|
|
352
|
+
RoutingStrategyListNotificationsParams =
|
|
353
|
+
Courier::Models::RoutingStrategyListNotificationsParams
|
|
354
|
+
|
|
327
355
|
RoutingStrategyListParams = Courier::Models::RoutingStrategyListParams
|
|
328
356
|
|
|
329
357
|
RoutingStrategyListResponse = Courier::Models::RoutingStrategyListResponse
|