trycourier 4.9.0 → 4.10.1

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.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/lib/courier/internal/util.rb +3 -1
  4. data/lib/courier/models/associated_notification_list_response.rb +24 -0
  5. data/lib/courier/models/element_with_checksums.rb +60 -0
  6. data/lib/courier/models/notification_content_get_response.rb +26 -0
  7. data/lib/courier/models/notification_content_mutation_response.rb +61 -0
  8. data/lib/courier/models/notification_content_put_request.rb +51 -0
  9. data/lib/courier/models/notification_element_put_request.rb +62 -0
  10. data/lib/courier/models/notification_get_content.rb +0 -1
  11. data/lib/courier/models/notification_locale_put_request.rb +39 -0
  12. data/lib/courier/models/notification_put_content_params.rb +20 -0
  13. data/lib/courier/models/notification_put_element_params.rb +26 -0
  14. data/lib/courier/models/notification_put_locale_params.rb +26 -0
  15. data/lib/courier/models/notification_retrieve_content_params.rb +14 -1
  16. data/lib/courier/models/notification_retrieve_content_response.rb +21 -0
  17. data/lib/courier/models/notification_template_get_response.rb +1 -1
  18. data/lib/courier/models/notification_template_state.rb +16 -0
  19. data/lib/courier/models/provider_update_params.rb +3 -2
  20. data/lib/courier/models/routing_strategy_get_response.rb +1 -1
  21. data/lib/courier/models/routing_strategy_list_notifications_params.rb +37 -0
  22. data/lib/courier/models.rb +24 -4
  23. data/lib/courier/resources/notifications.rb +128 -13
  24. data/lib/courier/resources/providers.rb +7 -5
  25. data/lib/courier/resources/routing_strategies.rb +32 -4
  26. data/lib/courier/version.rb +1 -1
  27. data/lib/courier.rb +13 -4
  28. data/rbi/courier/models/associated_notification_list_response.rbi +45 -0
  29. data/rbi/courier/models/element_with_checksums.rbi +109 -0
  30. data/rbi/courier/models/notification_content_get_response.rbi +45 -0
  31. data/rbi/courier/models/notification_content_mutation_response.rbi +95 -0
  32. data/rbi/courier/models/notification_content_put_request.rbi +145 -0
  33. data/rbi/courier/models/notification_element_put_request.rbi +98 -0
  34. data/rbi/courier/models/notification_locale_put_request.rbi +79 -0
  35. data/rbi/courier/models/notification_put_content_params.rbi +38 -0
  36. data/rbi/courier/models/notification_put_element_params.rbi +46 -0
  37. data/rbi/courier/models/notification_put_locale_params.rbi +46 -0
  38. data/rbi/courier/models/notification_retrieve_content_params.rbi +21 -2
  39. data/rbi/courier/models/notification_retrieve_content_response.rbi +29 -0
  40. data/rbi/courier/models/notification_template_state.rbi +26 -0
  41. data/rbi/courier/models/provider_update_params.rbi +4 -2
  42. data/rbi/courier/models/routing_strategy_list_notifications_params.rbi +63 -0
  43. data/rbi/courier/models.rbi +28 -6
  44. data/rbi/courier/resources/notifications.rbi +105 -7
  45. data/rbi/courier/resources/providers.rbi +7 -4
  46. data/rbi/courier/resources/routing_strategies.rbi +23 -2
  47. data/sig/courier/models/associated_notification_list_response.rbs +25 -0
  48. data/sig/courier/models/element_with_checksums.rbs +60 -0
  49. data/sig/courier/models/notification_content_get_response.rbs +22 -0
  50. data/sig/courier/models/notification_content_mutation_response.rbs +47 -0
  51. data/sig/courier/models/notification_content_put_request.rbs +50 -0
  52. data/sig/courier/models/notification_element_put_request.rbs +64 -0
  53. data/sig/courier/models/notification_locale_put_request.rbs +39 -0
  54. data/sig/courier/models/notification_put_content_params.rbs +22 -0
  55. data/sig/courier/models/notification_put_element_params.rbs +32 -0
  56. data/sig/courier/models/notification_put_locale_params.rbs +32 -0
  57. data/sig/courier/models/notification_retrieve_content_params.rbs +12 -2
  58. data/sig/courier/models/notification_retrieve_content_response.rbs +12 -0
  59. data/sig/courier/models/notification_template_state.rbs +14 -0
  60. data/sig/courier/models/routing_strategy_list_notifications_params.rbs +34 -0
  61. data/sig/courier/models.rbs +24 -4
  62. data/sig/courier/resources/notifications.rbs +32 -5
  63. data/sig/courier/resources/routing_strategies.rbs +9 -2
  64. metadata +41 -14
  65. data/lib/courier/models/notification_template_mutation_response.rb +0 -51
  66. data/lib/courier/models/notifications/draft_retrieve_content_params.rb +0 -22
  67. data/lib/courier/models/routing_strategy_mutation_response.rb +0 -19
  68. data/lib/courier/resources/notifications/draft.rb +0 -33
  69. data/rbi/courier/models/notification_template_mutation_response.rbi +0 -121
  70. data/rbi/courier/models/notifications/draft_retrieve_content_params.rbi +0 -40
  71. data/rbi/courier/models/routing_strategy_mutation_response.rbi +0 -31
  72. data/rbi/courier/resources/notifications/draft.rbi +0 -23
  73. data/sig/courier/models/notification_template_mutation_response.rbs +0 -46
  74. data/sig/courier/models/notifications/draft_retrieve_content_params.rbs +0 -22
  75. data/sig/courier/models/routing_strategy_mutation_response.rbs +0 -13
  76. data/sig/courier/resources/notifications/draft.rbs +0 -14
@@ -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
@@ -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 =
@@ -246,14 +269,13 @@ module Courier
246
269
  NotificationTemplateGetResponse =
247
270
  Courier::Models::NotificationTemplateGetResponse
248
271
 
249
- NotificationTemplateMutationResponse =
250
- Courier::Models::NotificationTemplateMutationResponse
251
-
252
272
  NotificationTemplatePayload = Courier::Models::NotificationTemplatePayload
253
273
 
254
274
  NotificationTemplatePublishRequest =
255
275
  Courier::Models::NotificationTemplatePublishRequest
256
276
 
277
+ NotificationTemplateState = Courier::Models::NotificationTemplateState
278
+
257
279
  NotificationTemplateSummary = Courier::Models::NotificationTemplateSummary
258
280
 
259
281
  NotificationTemplateUpdateRequest =
@@ -324,13 +346,13 @@ module Courier
324
346
 
325
347
  RoutingStrategyGetResponse = Courier::Models::RoutingStrategyGetResponse
326
348
 
349
+ RoutingStrategyListNotificationsParams =
350
+ Courier::Models::RoutingStrategyListNotificationsParams
351
+
327
352
  RoutingStrategyListParams = Courier::Models::RoutingStrategyListParams
328
353
 
329
354
  RoutingStrategyListResponse = Courier::Models::RoutingStrategyListResponse
330
355
 
331
- RoutingStrategyMutationResponse =
332
- Courier::Models::RoutingStrategyMutationResponse
333
-
334
356
  RoutingStrategyReplaceParams = Courier::Models::RoutingStrategyReplaceParams
335
357
 
336
358
  RoutingStrategyReplaceRequest = Courier::Models::RoutingStrategyReplaceRequest
@@ -3,9 +3,6 @@
3
3
  module Courier
4
4
  module Resources
5
5
  class Notifications
6
- sig { returns(Courier::Resources::Notifications::Draft) }
7
- attr_reader :draft
8
-
9
6
  sig { returns(Courier::Resources::Notifications::Checks) }
10
7
  attr_reader :checks
11
8
 
@@ -16,7 +13,7 @@ module Courier
16
13
  notification: Courier::NotificationTemplatePayload::OrHash,
17
14
  state: Courier::NotificationTemplateCreateRequest::State::OrSymbol,
18
15
  request_options: Courier::RequestOptions::OrHash
19
- ).returns(Courier::NotificationTemplateMutationResponse)
16
+ ).returns(Courier::NotificationTemplateGetResponse)
20
17
  end
21
18
  def create(
22
19
  # Full document shape used in POST and PUT request bodies, and returned inside the
@@ -120,6 +117,93 @@ module Courier
120
117
  )
121
118
  end
122
119
 
120
+ # Replace the elemental content of a notification template. Overwrites all
121
+ # elements in the template with the provided content. Only supported for V2
122
+ # (elemental) templates.
123
+ sig do
124
+ params(
125
+ id: String,
126
+ content: Courier::NotificationContentPutRequest::Content::OrHash,
127
+ state: Courier::NotificationTemplateState::OrSymbol,
128
+ request_options: Courier::RequestOptions::OrHash
129
+ ).returns(Courier::NotificationContentMutationResponse)
130
+ end
131
+ def put_content(
132
+ # Notification template ID (`nt_` prefix).
133
+ id,
134
+ # Elemental content payload. The server defaults `version` when omitted.
135
+ content:,
136
+ # Template state. Defaults to `DRAFT`.
137
+ state: nil,
138
+ request_options: {}
139
+ )
140
+ end
141
+
142
+ # Update a single element within a notification template. Only supported for V2
143
+ # (elemental) templates.
144
+ sig do
145
+ params(
146
+ element_id: String,
147
+ id: String,
148
+ type: String,
149
+ channels: T::Array[String],
150
+ data: T::Hash[Symbol, T.anything],
151
+ if_: String,
152
+ loop_: String,
153
+ ref: String,
154
+ state: Courier::NotificationTemplateState::OrSymbol,
155
+ request_options: Courier::RequestOptions::OrHash
156
+ ).returns(Courier::NotificationContentMutationResponse)
157
+ end
158
+ def put_element(
159
+ # Path param: Element ID within the template.
160
+ element_id,
161
+ # Path param: Notification template ID (`nt_` prefix).
162
+ id:,
163
+ # Body param: Element type (text, meta, action, image, etc.).
164
+ type:,
165
+ # Body param
166
+ channels: nil,
167
+ # Body param
168
+ data: nil,
169
+ # Body param
170
+ if_: nil,
171
+ # Body param
172
+ loop_: nil,
173
+ # Body param
174
+ ref: nil,
175
+ # Body param: Template state. Defaults to `DRAFT`.
176
+ state: nil,
177
+ request_options: {}
178
+ )
179
+ end
180
+
181
+ # Set locale-specific content overrides for a notification template. Each element
182
+ # override must reference an existing element by ID. Only supported for V2
183
+ # (elemental) templates.
184
+ sig do
185
+ params(
186
+ locale_id: String,
187
+ id: String,
188
+ elements:
189
+ T::Array[Courier::NotificationLocalePutRequest::Element::OrHash],
190
+ state: Courier::NotificationTemplateState::OrSymbol,
191
+ request_options: Courier::RequestOptions::OrHash
192
+ ).returns(Courier::NotificationContentMutationResponse)
193
+ end
194
+ def put_locale(
195
+ # Path param: Locale code (e.g., `es`, `fr`, `pt-BR`).
196
+ locale_id,
197
+ # Path param: Notification template ID (`nt_` prefix).
198
+ id:,
199
+ # Body param: Elements with locale-specific content overrides.
200
+ elements:,
201
+ # Body param: Template state. Defaults to `DRAFT`.
202
+ state: nil,
203
+ request_options: {}
204
+ )
205
+ end
206
+
123
207
  # Replace a notification template. All fields are required.
124
208
  sig do
125
209
  params(
@@ -127,7 +211,7 @@ module Courier
127
211
  notification: Courier::NotificationTemplatePayload::OrHash,
128
212
  state: Courier::NotificationTemplateUpdateRequest::State::OrSymbol,
129
213
  request_options: Courier::RequestOptions::OrHash
130
- ).returns(Courier::NotificationTemplateMutationResponse)
214
+ ).returns(Courier::NotificationTemplateGetResponse)
131
215
  end
132
216
  def replace(
133
217
  # Template ID (nt\_ prefix).
@@ -142,13 +226,27 @@ module Courier
142
226
  )
143
227
  end
144
228
 
229
+ # Retrieve the content of a notification template. The response shape depends on
230
+ # whether the template uses V1 (blocks/channels) or V2 (elemental) content. Use
231
+ # the `version` query parameter to select draft, published, or a specific
232
+ # historical version.
145
233
  sig do
146
234
  params(
147
235
  id: String,
236
+ version: String,
148
237
  request_options: Courier::RequestOptions::OrHash
149
- ).returns(Courier::NotificationGetContent)
238
+ ).returns(
239
+ Courier::Models::NotificationRetrieveContentResponse::Variants
240
+ )
150
241
  end
151
- def retrieve_content(id, request_options: {})
242
+ def retrieve_content(
243
+ # Notification template ID (`nt_` prefix).
244
+ id,
245
+ # Accepts `draft`, `published`, or a version string (e.g., `v001`). Defaults to
246
+ # `published`.
247
+ version: nil,
248
+ request_options: {}
249
+ )
152
250
  end
153
251
 
154
252
  # @api private
@@ -47,9 +47,11 @@ module Courier
47
47
  )
48
48
  end
49
49
 
50
- # Update an existing provider configuration. The `provider` key is required. All
51
- # other fields are optional omitted fields are cleared from the stored
52
- # configuration (this is a full replacement, not a partial merge).
50
+ # Replace an existing provider configuration. The `provider` key is required and
51
+ # determines which provider-specific settings schema is applied. All other fields
52
+ # are optional omitted fields are cleared from the stored configuration (this is
53
+ # a full replacement, not a partial merge). Changing the provider type for an
54
+ # existing configuration is not supported.
53
55
  sig do
54
56
  params(
55
57
  id: String,
@@ -63,7 +65,8 @@ module Courier
63
65
  def update(
64
66
  # A unique identifier of the provider configuration to update.
65
67
  id,
66
- # The provider key identifying the type.
68
+ # The provider key identifying the type. Required on every request because it
69
+ # selects the provider-specific settings schema for validation.
67
70
  provider:,
68
71
  # Updated alias. Omit to clear.
69
72
  alias_: nil,
@@ -15,7 +15,7 @@ module Courier
15
15
  T.nilable(T::Hash[Symbol, Courier::MessageProvidersType::OrHash]),
16
16
  tags: T.nilable(T::Array[String]),
17
17
  request_options: Courier::RequestOptions::OrHash
18
- ).returns(Courier::RoutingStrategyMutationResponse)
18
+ ).returns(Courier::RoutingStrategyGetResponse)
19
19
  end
20
20
  def create(
21
21
  # Human-readable name for the routing strategy.
@@ -83,6 +83,27 @@ module Courier
83
83
  )
84
84
  end
85
85
 
86
+ # List notification templates associated with a routing strategy. Includes
87
+ # template metadata only, not full content.
88
+ sig do
89
+ params(
90
+ id: String,
91
+ cursor: T.nilable(String),
92
+ limit: Integer,
93
+ request_options: Courier::RequestOptions::OrHash
94
+ ).returns(Courier::AssociatedNotificationListResponse)
95
+ end
96
+ def list_notifications(
97
+ # Routing strategy ID (`rs_` prefix).
98
+ id,
99
+ # Opaque pagination cursor from a previous response. Omit for the first page.
100
+ cursor: nil,
101
+ # Maximum number of results per page. Default 20, max 100.
102
+ limit: nil,
103
+ request_options: {}
104
+ )
105
+ end
106
+
86
107
  # Replace a routing strategy. Full document replacement; the caller must send the
87
108
  # complete desired state. Missing optional fields are cleared.
88
109
  sig do
@@ -96,7 +117,7 @@ module Courier
96
117
  T.nilable(T::Hash[Symbol, Courier::MessageProvidersType::OrHash]),
97
118
  tags: T.nilable(T::Array[String]),
98
119
  request_options: Courier::RequestOptions::OrHash
99
- ).returns(Courier::RoutingStrategyMutationResponse)
120
+ ).returns(Courier::RoutingStrategyGetResponse)
100
121
  end
101
122
  def replace(
102
123
  # Routing strategy ID (rs\_ prefix).
@@ -0,0 +1,25 @@
1
+ module Courier
2
+ module Models
3
+ type associated_notification_list_response =
4
+ {
5
+ paging: Courier::Paging,
6
+ results: ::Array[Courier::NotificationTemplateSummary]
7
+ }
8
+
9
+ class AssociatedNotificationListResponse < Courier::Internal::Type::BaseModel
10
+ attr_accessor paging: Courier::Paging
11
+
12
+ attr_accessor results: ::Array[Courier::NotificationTemplateSummary]
13
+
14
+ def initialize: (
15
+ paging: Courier::Paging,
16
+ results: ::Array[Courier::NotificationTemplateSummary]
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ paging: Courier::Paging,
21
+ results: ::Array[Courier::NotificationTemplateSummary]
22
+ }
23
+ end
24
+ end
25
+ end
@@ -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,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,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
@@ -0,0 +1,39 @@
1
+ module Courier
2
+ module Models
3
+ type notification_locale_put_request =
4
+ {
5
+ elements: ::Array[Courier::NotificationLocalePutRequest::Element],
6
+ state: Courier::Models::notification_template_state
7
+ }
8
+
9
+ class NotificationLocalePutRequest < Courier::Internal::Type::BaseModel
10
+ attr_accessor elements: ::Array[Courier::NotificationLocalePutRequest::Element]
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
+ elements: ::Array[Courier::NotificationLocalePutRequest::Element],
20
+ ?state: Courier::Models::notification_template_state
21
+ ) -> void
22
+
23
+ def to_hash: -> {
24
+ elements: ::Array[Courier::NotificationLocalePutRequest::Element],
25
+ state: Courier::Models::notification_template_state
26
+ }
27
+
28
+ type element = { id: String }
29
+
30
+ class Element < Courier::Internal::Type::BaseModel
31
+ attr_accessor id: String
32
+
33
+ def initialize: (id: String) -> void
34
+
35
+ def to_hash: -> { id: String }
36
+ end
37
+ end
38
+ end
39
+ end