trycourier 4.14.0 → 4.16.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62e50b0f394c9b71492f5a8edcf141e73349df61df527661a0e43660de5540d9
4
- data.tar.gz: a9e4059917b03248a4fbbc198d1f3c809a4130b0ed39642be34c682b0d165eda
3
+ metadata.gz: 76179334776f39db558748f8c3787c82edfee017d5a1a9eeb4a06593b1dd559e
4
+ data.tar.gz: a42dc6fb130e7991fa52cbb683fc8d4d0a562ec06d8a79a647cdc15cbc15ff3b
5
5
  SHA512:
6
- metadata.gz: eb6d9b6d9b9edf0a1c51ad9305366b6e7a5a1cea3d8fa59a126c9f59d87b1108b3b17f0bb8ce00374692df294c69153389b08810527904f0b774086ffb54d71a
7
- data.tar.gz: 498be96be04f5399ec5a6395e00b2f1a41e70983ea2d980657b231080fac0fc5b2f2165197bc3030a85b68767434b505f1da6aa649c95c692dae41b913a29903
6
+ metadata.gz: 55b1ecd065e30b3c435d09df5f39a9237706ff4eb037a67d6e2ada6610187350403b17f446f0c2f3da9e59e2e0c3d4711303312e67258d3ccad3679f29cd8765
7
+ data.tar.gz: af2d0c62c7146d14047ae2ca71c1f09c95e856708d223e6f32df0e67b64dfef667664d8ee9a7dc95c828a10f9d17bc12ba19d870ffaf218b8c381b66f152e539
data/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.16.0 (2026-06-23)
4
+
5
+ Full Changelog: [v4.15.0...v4.16.0](https://github.com/trycourier/courier-ruby/compare/v4.15.0...v4.16.0)
6
+
7
+ ### Features
8
+
9
+ * **journeys:** add content + locale endpoints to journey-scoped templates ([9309361](https://github.com/trycourier/courier-ruby/commit/93093616ebe031a0d3c4b5ffe5b365affa5d0c6a))
10
+
11
+
12
+ ### Documentation
13
+
14
+ * **journeys:** clarify checksum usage + re-trigger docs sync for journey content endpoints ([dfff96b](https://github.com/trycourier/courier-ruby/commit/dfff96ba54ef12d492fff54f5c1d973a3e3d9028))
15
+
16
+ ## 4.15.0 (2026-06-17)
17
+
18
+ Full Changelog: [v4.14.0...v4.15.0](https://github.com/trycourier/courier-ruby/compare/v4.14.0...v4.15.0)
19
+
20
+ ### Features
21
+
22
+ * **openapi:** add add-to-digest JourneyNode variant ([55fdd8f](https://github.com/trycourier/courier-ruby/commit/55fdd8feb37743d64201641e86d95f56ce22c603))
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * **client:** send content-type header for requests with an omitted optional body ([1e1b51c](https://github.com/trycourier/courier-ruby/commit/1e1b51ce2b17c5bc05193efca068828cd64ce81f))
28
+
3
29
  ## 4.14.0 (2026-06-16)
4
30
 
5
31
  Full Changelog: [v4.13.0...v4.14.0](https://github.com/trycourier/courier-ruby/compare/v4.13.0...v4.14.0)
@@ -306,7 +306,10 @@ module Courier
306
306
  Courier::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
307
307
  end
308
308
 
309
- headers.delete("content-type") if body.nil?
309
+ # Generated methods always pass `req[:body]` for operations that define a
310
+ # request body, so only elide the content-type header when the operation
311
+ # has no body at all, not when an optional body param was omitted.
312
+ headers.delete("content-type") if body.nil? && !req.key?(:body)
310
313
 
311
314
  url = Courier::Internal::Util.join_parsed_uri(
312
315
  @base_url_components,
@@ -10,7 +10,7 @@ module Courier
10
10
 
11
11
  # @!attribute nodes
12
12
  #
13
- # @return [Array<Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
13
+ # @return [Array<Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyNode::JourneyAddToDigestNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
14
14
  required :nodes, -> { Courier::Internal::Type::ArrayOf[union: Courier::JourneyNode] }
15
15
 
16
16
  # @!attribute enabled
@@ -29,7 +29,7 @@ module Courier
29
29
  #
30
30
  # @param name [String]
31
31
  #
32
- # @param nodes [Array<Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
32
+ # @param nodes [Array<Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyNode::JourneyAddToDigestNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
33
33
  #
34
34
  # @param enabled [Boolean]
35
35
  #
@@ -41,6 +41,9 @@ module Courier
41
41
  # Collect events arriving at the node into a single batch and fire one downstream step with the aggregated payload. The first event into a batch owns the run; later contributing events terminate at the batch step. The batch releases when any of `max_items` is reached, a quiet window of `wait_period` elapses, or the `max_wait_period` ceiling hits.
42
42
  variant -> { Courier::JourneyNode::JourneyBatchNode }
43
43
 
44
+ # Add the current event to a digest keyed by the given subscription topic. The digest accumulates events and releases them on the schedule configured for the topic.
45
+ variant -> { Courier::JourneyNode::JourneyAddToDigestNode }
46
+
44
47
  # Terminate the journey run.
45
48
  variant -> { Courier::JourneyExitNode }
46
49
 
@@ -200,6 +203,58 @@ module Courier
200
203
  end
201
204
  end
202
205
 
206
+ class JourneyAddToDigestNode < Courier::Internal::Type::BaseModel
207
+ # @!attribute subscription_topic_id
208
+ # The subscription topic that owns the digest the event is added to.
209
+ #
210
+ # @return [String]
211
+ required :subscription_topic_id, String
212
+
213
+ # @!attribute type
214
+ #
215
+ # @return [Symbol, Courier::Models::JourneyNode::JourneyAddToDigestNode::Type]
216
+ required :type, enum: -> { Courier::JourneyNode::JourneyAddToDigestNode::Type }
217
+
218
+ # @!attribute id
219
+ #
220
+ # @return [String, nil]
221
+ optional :id, String
222
+
223
+ # @!attribute conditions
224
+ # Condition spec for a journey node. Accepts a single condition atom, an AND/OR
225
+ # group, or an AND/OR nested group. Omit the `conditions` property entirely to
226
+ # express "no conditions".
227
+ #
228
+ # @return [Array<String>, Courier::Models::JourneyConditionGroup, Courier::Models::JourneyConditionNestedGroup, nil]
229
+ optional :conditions, union: -> { Courier::JourneyConditionsField }
230
+
231
+ # @!method initialize(subscription_topic_id:, type:, id: nil, conditions: nil)
232
+ # Some parameter documentations has been truncated, see
233
+ # {Courier::Models::JourneyNode::JourneyAddToDigestNode} for more details.
234
+ #
235
+ # Add the current event to a digest keyed by the given subscription topic. The
236
+ # digest accumulates events and releases them on the schedule configured for the
237
+ # topic.
238
+ #
239
+ # @param subscription_topic_id [String] The subscription topic that owns the digest the event is added to.
240
+ #
241
+ # @param type [Symbol, Courier::Models::JourneyNode::JourneyAddToDigestNode::Type]
242
+ #
243
+ # @param id [String]
244
+ #
245
+ # @param conditions [Array<String>, Courier::Models::JourneyConditionGroup, Courier::Models::JourneyConditionNestedGroup] Condition spec for a journey node. Accepts a single condition atom, an AND/OR gr
246
+
247
+ # @see Courier::Models::JourneyNode::JourneyAddToDigestNode#type
248
+ module Type
249
+ extend Courier::Internal::Type::Enum
250
+
251
+ ADD_TO_DIGEST = :"add-to-digest"
252
+
253
+ # @!method self.values
254
+ # @return [Array<Symbol>]
255
+ end
256
+ end
257
+
203
258
  class JourneyBranchNode < Courier::Internal::Type::BaseModel
204
259
  # @!attribute default
205
260
  #
@@ -289,7 +344,7 @@ module Courier
289
344
  end
290
345
 
291
346
  # @!method self.variants
292
- # @return [Array(Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode)]
347
+ # @return [Array(Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyNode::JourneyAddToDigestNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode)]
293
348
  end
294
349
  end
295
350
  end
@@ -31,7 +31,7 @@ module Courier
31
31
 
32
32
  # @!attribute nodes
33
33
  #
34
- # @return [Array<Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
34
+ # @return [Array<Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyNode::JourneyAddToDigestNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
35
35
  required :nodes, -> { Courier::Internal::Type::ArrayOf[union: Courier::JourneyNode] }
36
36
 
37
37
  # @!attribute published
@@ -68,7 +68,7 @@ module Courier
68
68
  #
69
69
  # @param name [String]
70
70
  #
71
- # @param nodes [Array<Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
71
+ # @param nodes [Array<Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyNode::JourneyAddToDigestNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
72
72
  #
73
73
  # @param published [Integer, nil]
74
74
  #
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ module Journeys
6
+ # @see Courier::Resources::Journeys::Templates#put_content
7
+ class TemplatePutContentParams < Courier::Models::NotificationContentPutRequest
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ # @!attribute template_id
12
+ #
13
+ # @return [String]
14
+ required :template_id, String
15
+
16
+ # @!attribute notification_id
17
+ #
18
+ # @return [String]
19
+ required :notification_id, String
20
+
21
+ # @!method initialize(template_id:, notification_id:, request_options: {})
22
+ # @param template_id [String]
23
+ # @param notification_id [String]
24
+ # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ module Journeys
6
+ # @see Courier::Resources::Journeys::Templates#put_locale
7
+ class TemplatePutLocaleParams < Courier::Models::NotificationLocalePutRequest
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ # @!attribute template_id
12
+ #
13
+ # @return [String]
14
+ required :template_id, String
15
+
16
+ # @!attribute notification_id
17
+ #
18
+ # @return [String]
19
+ required :notification_id, String
20
+
21
+ # @!attribute locale_id
22
+ #
23
+ # @return [String]
24
+ required :locale_id, String
25
+
26
+ # @!method initialize(template_id:, notification_id:, locale_id:, request_options: {})
27
+ # @param template_id [String]
28
+ # @param notification_id [String]
29
+ # @param locale_id [String]
30
+ # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ module Journeys
6
+ # @see Courier::Resources::Journeys::Templates#retrieve_content
7
+ class TemplateRetrieveContentParams < Courier::Internal::Type::BaseModel
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ # @!attribute template_id
12
+ #
13
+ # @return [String]
14
+ required :template_id, String
15
+
16
+ # @!attribute notification_id
17
+ #
18
+ # @return [String]
19
+ required :notification_id, String
20
+
21
+ # @!attribute version
22
+ # Accepts `draft`, `published`, or a version string (e.g., `v001`). Defaults to
23
+ # `published`.
24
+ #
25
+ # @return [String, nil]
26
+ optional :version, String
27
+
28
+ # @!method initialize(template_id:, notification_id:, version: nil, request_options: {})
29
+ # Some parameter documentations has been truncated, see
30
+ # {Courier::Models::Journeys::TemplateRetrieveContentParams} for more details.
31
+ #
32
+ # @param template_id [String]
33
+ #
34
+ # @param notification_id [String]
35
+ #
36
+ # @param version [String] Accepts `draft`, `published`, or a version string (e.g., `v001`). Defaults to `p
37
+ #
38
+ # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
39
+ end
40
+ end
41
+ end
42
+ end
@@ -180,6 +180,81 @@ module Courier
180
180
  )
181
181
  end
182
182
 
183
+ # Some parameter documentations has been truncated, see
184
+ # {Courier::Models::Journeys::TemplatePutContentParams} for more details.
185
+ #
186
+ # Replace the elemental content of a journey-scoped notification template.
187
+ # Overwrites all elements in the template draft with the provided content.
188
+ #
189
+ # @overload put_content(notification_id, template_id:, content:, state: nil, request_options: {})
190
+ #
191
+ # @param notification_id [String] Path param: Notification template id
192
+ #
193
+ # @param template_id [String] Path param: Journey id
194
+ #
195
+ # @param content [Courier::Models::NotificationContentPutRequest::Content] Body param: Elemental content payload. The server defaults `version` when omitte
196
+ #
197
+ # @param state [Symbol, Courier::Models::NotificationTemplateState] Body param: Template state. Defaults to `DRAFT`.
198
+ #
199
+ # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
200
+ #
201
+ # @return [Courier::Models::NotificationContentMutationResponse]
202
+ #
203
+ # @see Courier::Models::Journeys::TemplatePutContentParams
204
+ def put_content(notification_id, params)
205
+ parsed, options = Courier::Journeys::TemplatePutContentParams.dump_request(params)
206
+ template_id =
207
+ parsed.delete(:template_id) do
208
+ raise ArgumentError.new("missing required path argument #{_1}")
209
+ end
210
+ @client.request(
211
+ method: :put,
212
+ path: ["journeys/%1$s/templates/%2$s/content", template_id, notification_id],
213
+ body: parsed,
214
+ model: Courier::NotificationContentMutationResponse,
215
+ options: options
216
+ )
217
+ end
218
+
219
+ # Set locale-specific content overrides for a journey-scoped notification
220
+ # template. Each element override must reference an existing element by ID.
221
+ #
222
+ # @overload put_locale(locale_id, template_id:, notification_id:, elements:, state: nil, request_options: {})
223
+ #
224
+ # @param locale_id [String] Path param: Locale code (e.g., `es`, `fr`, `pt-BR`).
225
+ #
226
+ # @param template_id [String] Path param: Journey id
227
+ #
228
+ # @param notification_id [String] Path param: Notification template id
229
+ #
230
+ # @param elements [Array<Courier::Models::NotificationLocalePutRequest::Element>] Body param: Elements with locale-specific content overrides.
231
+ #
232
+ # @param state [Symbol, Courier::Models::NotificationTemplateState] Body param: Template state. Defaults to `DRAFT`.
233
+ #
234
+ # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
235
+ #
236
+ # @return [Courier::Models::NotificationContentMutationResponse]
237
+ #
238
+ # @see Courier::Models::Journeys::TemplatePutLocaleParams
239
+ def put_locale(locale_id, params)
240
+ parsed, options = Courier::Journeys::TemplatePutLocaleParams.dump_request(params)
241
+ template_id =
242
+ parsed.delete(:template_id) do
243
+ raise ArgumentError.new("missing required path argument #{_1}")
244
+ end
245
+ notification_id =
246
+ parsed.delete(:notification_id) do
247
+ raise ArgumentError.new("missing required path argument #{_1}")
248
+ end
249
+ @client.request(
250
+ method: :put,
251
+ path: ["journeys/%1$s/templates/%2$s/locales/%3$s", template_id, notification_id, locale_id],
252
+ body: parsed,
253
+ model: Courier::NotificationContentMutationResponse,
254
+ options: options
255
+ )
256
+ end
257
+
183
258
  # Replace the journey-scoped notification template draft.
184
259
  #
185
260
  # @overload replace(notification_id, template_id:, notification:, state: nil, request_options: {})
@@ -212,6 +287,44 @@ module Courier
212
287
  )
213
288
  end
214
289
 
290
+ # Some parameter documentations has been truncated, see
291
+ # {Courier::Models::Journeys::TemplateRetrieveContentParams} for more details.
292
+ #
293
+ # Retrieve the elemental content of a journey-scoped notification template. The
294
+ # response contains the versioned elements along with their content checksums,
295
+ # which can be used to detect changes between versions. Pass `?version=draft`
296
+ # (default `published`) to retrieve the working draft, or `?version=vN` for a
297
+ # historical version.
298
+ #
299
+ # @overload retrieve_content(notification_id, template_id:, version: nil, request_options: {})
300
+ #
301
+ # @param notification_id [String] Path param: Notification template id
302
+ #
303
+ # @param template_id [String] Path param: Journey id
304
+ #
305
+ # @param version [String] Query param: Accepts `draft`, `published`, or a version string (e.g., `v001`). D
306
+ #
307
+ # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
308
+ #
309
+ # @return [Courier::Models::NotificationContentGetResponse]
310
+ #
311
+ # @see Courier::Models::Journeys::TemplateRetrieveContentParams
312
+ def retrieve_content(notification_id, params)
313
+ parsed, options = Courier::Journeys::TemplateRetrieveContentParams.dump_request(params)
314
+ query = Courier::Internal::Util.encode_query_params(parsed)
315
+ template_id =
316
+ parsed.delete(:template_id) do
317
+ raise ArgumentError.new("missing required path argument #{_1}")
318
+ end
319
+ @client.request(
320
+ method: :get,
321
+ path: ["journeys/%1$s/templates/%2$s/content", template_id, notification_id],
322
+ query: query,
323
+ model: Courier::NotificationContentGetResponse,
324
+ options: options
325
+ )
326
+ end
327
+
215
328
  # @api private
216
329
  #
217
330
  # @param client [Courier::Client]
@@ -17,7 +17,7 @@ module Courier
17
17
  #
18
18
  # @param name [String]
19
19
  #
20
- # @param nodes [Array<Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
20
+ # @param nodes [Array<Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyNode::JourneyAddToDigestNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
21
21
  #
22
22
  # @param enabled [Boolean]
23
23
  #
@@ -204,7 +204,7 @@ module Courier
204
204
  #
205
205
  # @param name [String]
206
206
  #
207
- # @param nodes [Array<Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
207
+ # @param nodes [Array<Courier::Models::JourneyAPIInvokeTriggerNode, Courier::Models::JourneySegmentTriggerNode, Courier::Models::JourneySendNode, Courier::Models::JourneyDelayDurationNode, Courier::Models::JourneyDelayUntilNode, Courier::Models::JourneyFetchGetDeleteNode, Courier::Models::JourneyFetchPostPutNode, Courier::Models::JourneyAINode, Courier::Models::JourneyThrottleStaticNode, Courier::Models::JourneyThrottleDynamicNode, Courier::Models::JourneyNode::JourneyBatchNode, Courier::Models::JourneyNode::JourneyAddToDigestNode, Courier::Models::JourneyExitNode, Courier::Models::JourneyNode::JourneyBranchNode>]
208
208
  #
209
209
  # @param enabled [Boolean]
210
210
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Courier
4
- VERSION = "4.14.0"
4
+ VERSION = "4.16.0"
5
5
  end
data/lib/courier.rb CHANGED
@@ -63,13 +63,13 @@ require_relative "courier/models/journeys_invoke_request"
63
63
  require_relative "courier/models/journey_publish_request"
64
64
  require_relative "courier/models/journey_template_create_request"
65
65
  require_relative "courier/models/journey_template_publish_request"
66
+ require_relative "courier/models/notification_content_put_request"
67
+ require_relative "courier/models/notification_locale_put_request"
66
68
  require_relative "courier/models/journey_template_replace_request"
67
69
  require_relative "courier/models/message_details"
68
70
  require_relative "courier/models/notification_template_create_request"
69
71
  require_relative "courier/models/notification_template_publish_request"
70
- require_relative "courier/models/notification_content_put_request"
71
72
  require_relative "courier/models/notification_element_put_request"
72
- require_relative "courier/models/notification_locale_put_request"
73
73
  require_relative "courier/models/notification_template_update_request"
74
74
  require_relative "courier/models/notification_template_payload"
75
75
  require_relative "courier/models/routing_strategy_create_request"
@@ -191,7 +191,10 @@ require_relative "courier/models/journeys/template_create_params"
191
191
  require_relative "courier/models/journeys/template_list_params"
192
192
  require_relative "courier/models/journeys/template_list_versions_params"
193
193
  require_relative "courier/models/journeys/template_publish_params"
194
+ require_relative "courier/models/journeys/template_put_content_params"
195
+ require_relative "courier/models/journeys/template_put_locale_params"
194
196
  require_relative "courier/models/journeys/template_replace_params"
197
+ require_relative "courier/models/journeys/template_retrieve_content_params"
195
198
  require_relative "courier/models/journeys/template_retrieve_params"
196
199
  require_relative "courier/models/journey_segment_trigger_node"
197
200
  require_relative "courier/models/journey_send_node"
@@ -26,6 +26,7 @@ module Courier
26
26
  Courier::JourneyThrottleStaticNode,
27
27
  Courier::JourneyThrottleDynamicNode,
28
28
  Courier::JourneyNode::JourneyBatchNode,
29
+ Courier::JourneyNode::JourneyAddToDigestNode,
29
30
  Courier::JourneyExitNode,
30
31
  Courier::JourneyNode::JourneyBranchNode
31
32
  )
@@ -65,6 +66,7 @@ module Courier
65
66
  Courier::JourneyThrottleStaticNode::OrHash,
66
67
  Courier::JourneyThrottleDynamicNode::OrHash,
67
68
  Courier::JourneyNode::JourneyBatchNode::OrHash,
69
+ Courier::JourneyNode::JourneyAddToDigestNode::OrHash,
68
70
  Courier::JourneyExitNode::OrHash,
69
71
  Courier::JourneyNode::JourneyBranchNode::OrHash
70
72
  )
@@ -100,6 +102,7 @@ module Courier
100
102
  Courier::JourneyThrottleStaticNode,
101
103
  Courier::JourneyThrottleDynamicNode,
102
104
  Courier::JourneyNode::JourneyBatchNode,
105
+ Courier::JourneyNode::JourneyAddToDigestNode,
103
106
  Courier::JourneyExitNode,
104
107
  Courier::JourneyNode::JourneyBranchNode
105
108
  )
@@ -22,6 +22,7 @@ module Courier
22
22
  Courier::JourneyThrottleStaticNode,
23
23
  Courier::JourneyThrottleDynamicNode,
24
24
  Courier::JourneyNode::JourneyBatchNode,
25
+ Courier::JourneyNode::JourneyAddToDigestNode,
25
26
  Courier::JourneyExitNode,
26
27
  Courier::JourneyNode::JourneyBranchNode
27
28
  )
@@ -341,6 +342,132 @@ module Courier
341
342
  end
342
343
  end
343
344
 
345
+ class JourneyAddToDigestNode < Courier::Internal::Type::BaseModel
346
+ OrHash =
347
+ T.type_alias do
348
+ T.any(
349
+ Courier::JourneyNode::JourneyAddToDigestNode,
350
+ Courier::Internal::AnyHash
351
+ )
352
+ end
353
+
354
+ # The subscription topic that owns the digest the event is added to.
355
+ sig { returns(String) }
356
+ attr_accessor :subscription_topic_id
357
+
358
+ sig do
359
+ returns(Courier::JourneyNode::JourneyAddToDigestNode::Type::OrSymbol)
360
+ end
361
+ attr_accessor :type
362
+
363
+ sig { returns(T.nilable(String)) }
364
+ attr_reader :id
365
+
366
+ sig { params(id: String).void }
367
+ attr_writer :id
368
+
369
+ # Condition spec for a journey node. Accepts a single condition atom, an AND/OR
370
+ # group, or an AND/OR nested group. Omit the `conditions` property entirely to
371
+ # express "no conditions".
372
+ sig do
373
+ returns(
374
+ T.nilable(
375
+ T.any(
376
+ T::Array[String],
377
+ Courier::JourneyConditionGroup,
378
+ Courier::JourneyConditionNestedGroup
379
+ )
380
+ )
381
+ )
382
+ end
383
+ attr_reader :conditions
384
+
385
+ sig do
386
+ params(
387
+ conditions:
388
+ T.any(
389
+ T::Array[String],
390
+ Courier::JourneyConditionGroup::OrHash,
391
+ Courier::JourneyConditionNestedGroup::OrHash
392
+ )
393
+ ).void
394
+ end
395
+ attr_writer :conditions
396
+
397
+ # Add the current event to a digest keyed by the given subscription topic. The
398
+ # digest accumulates events and releases them on the schedule configured for the
399
+ # topic.
400
+ sig do
401
+ params(
402
+ subscription_topic_id: String,
403
+ type: Courier::JourneyNode::JourneyAddToDigestNode::Type::OrSymbol,
404
+ id: String,
405
+ conditions:
406
+ T.any(
407
+ T::Array[String],
408
+ Courier::JourneyConditionGroup::OrHash,
409
+ Courier::JourneyConditionNestedGroup::OrHash
410
+ )
411
+ ).returns(T.attached_class)
412
+ end
413
+ def self.new(
414
+ # The subscription topic that owns the digest the event is added to.
415
+ subscription_topic_id:,
416
+ type:,
417
+ id: nil,
418
+ # Condition spec for a journey node. Accepts a single condition atom, an AND/OR
419
+ # group, or an AND/OR nested group. Omit the `conditions` property entirely to
420
+ # express "no conditions".
421
+ conditions: nil
422
+ )
423
+ end
424
+
425
+ sig do
426
+ override.returns(
427
+ {
428
+ subscription_topic_id: String,
429
+ type:
430
+ Courier::JourneyNode::JourneyAddToDigestNode::Type::OrSymbol,
431
+ id: String,
432
+ conditions:
433
+ T.any(
434
+ T::Array[String],
435
+ Courier::JourneyConditionGroup,
436
+ Courier::JourneyConditionNestedGroup
437
+ )
438
+ }
439
+ )
440
+ end
441
+ def to_hash
442
+ end
443
+
444
+ module Type
445
+ extend Courier::Internal::Type::Enum
446
+
447
+ TaggedSymbol =
448
+ T.type_alias do
449
+ T.all(Symbol, Courier::JourneyNode::JourneyAddToDigestNode::Type)
450
+ end
451
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
452
+
453
+ ADD_TO_DIGEST =
454
+ T.let(
455
+ :"add-to-digest",
456
+ Courier::JourneyNode::JourneyAddToDigestNode::Type::TaggedSymbol
457
+ )
458
+
459
+ sig do
460
+ override.returns(
461
+ T::Array[
462
+ Courier::JourneyNode::JourneyAddToDigestNode::Type::TaggedSymbol
463
+ ]
464
+ )
465
+ end
466
+ def self.values
467
+ end
468
+ end
469
+ end
470
+
344
471
  class JourneyBranchNode < Courier::Internal::Type::BaseModel
345
472
  OrHash =
346
473
  T.type_alias do
@@ -61,6 +61,7 @@ module Courier
61
61
  Courier::JourneyThrottleStaticNode::OrHash,
62
62
  Courier::JourneyThrottleDynamicNode::OrHash,
63
63
  Courier::JourneyNode::JourneyBatchNode::OrHash,
64
+ Courier::JourneyNode::JourneyAddToDigestNode::OrHash,
64
65
  Courier::JourneyExitNode::OrHash,
65
66
  Courier::JourneyNode::JourneyBranchNode::OrHash
66
67
  )
@@ -0,0 +1,48 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ module Journeys
6
+ class TemplatePutContentParams < Courier::Models::NotificationContentPutRequest
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Courier::Journeys::TemplatePutContentParams,
14
+ Courier::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :template_id
20
+
21
+ sig { returns(String) }
22
+ attr_accessor :notification_id
23
+
24
+ sig do
25
+ params(
26
+ template_id: String,
27
+ notification_id: String,
28
+ request_options: Courier::RequestOptions::OrHash
29
+ ).returns(T.attached_class)
30
+ end
31
+ def self.new(template_id:, notification_id:, request_options: {})
32
+ end
33
+
34
+ sig do
35
+ override.returns(
36
+ {
37
+ template_id: String,
38
+ notification_id: String,
39
+ request_options: Courier::RequestOptions
40
+ }
41
+ )
42
+ end
43
+ def to_hash
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,58 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ module Journeys
6
+ class TemplatePutLocaleParams < Courier::Models::NotificationLocalePutRequest
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Courier::Journeys::TemplatePutLocaleParams,
14
+ Courier::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :template_id
20
+
21
+ sig { returns(String) }
22
+ attr_accessor :notification_id
23
+
24
+ sig { returns(String) }
25
+ attr_accessor :locale_id
26
+
27
+ sig do
28
+ params(
29
+ template_id: String,
30
+ notification_id: String,
31
+ locale_id: String,
32
+ request_options: Courier::RequestOptions::OrHash
33
+ ).returns(T.attached_class)
34
+ end
35
+ def self.new(
36
+ template_id:,
37
+ notification_id:,
38
+ locale_id:,
39
+ request_options: {}
40
+ )
41
+ end
42
+
43
+ sig do
44
+ override.returns(
45
+ {
46
+ template_id: String,
47
+ notification_id: String,
48
+ locale_id: String,
49
+ request_options: Courier::RequestOptions
50
+ }
51
+ )
52
+ end
53
+ def to_hash
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,65 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ module Journeys
6
+ class TemplateRetrieveContentParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Courier::Journeys::TemplateRetrieveContentParams,
14
+ Courier::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :template_id
20
+
21
+ sig { returns(String) }
22
+ attr_accessor :notification_id
23
+
24
+ # Accepts `draft`, `published`, or a version string (e.g., `v001`). Defaults to
25
+ # `published`.
26
+ sig { returns(T.nilable(String)) }
27
+ attr_reader :version
28
+
29
+ sig { params(version: String).void }
30
+ attr_writer :version
31
+
32
+ sig do
33
+ params(
34
+ template_id: String,
35
+ notification_id: String,
36
+ version: String,
37
+ request_options: Courier::RequestOptions::OrHash
38
+ ).returns(T.attached_class)
39
+ end
40
+ def self.new(
41
+ template_id:,
42
+ notification_id:,
43
+ # Accepts `draft`, `published`, or a version string (e.g., `v001`). Defaults to
44
+ # `published`.
45
+ version: nil,
46
+ request_options: {}
47
+ )
48
+ end
49
+
50
+ sig do
51
+ override.returns(
52
+ {
53
+ template_id: String,
54
+ notification_id: String,
55
+ version: String,
56
+ request_options: Courier::RequestOptions
57
+ }
58
+ )
59
+ end
60
+ def to_hash
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
@@ -126,6 +126,59 @@ module Courier
126
126
  )
127
127
  end
128
128
 
129
+ # Replace the elemental content of a journey-scoped notification template.
130
+ # Overwrites all elements in the template draft with the provided content.
131
+ sig do
132
+ params(
133
+ notification_id: String,
134
+ template_id: String,
135
+ content: Courier::NotificationContentPutRequest::Content::OrHash,
136
+ state: Courier::NotificationTemplateState::OrSymbol,
137
+ request_options: Courier::RequestOptions::OrHash
138
+ ).returns(Courier::NotificationContentMutationResponse)
139
+ end
140
+ def put_content(
141
+ # Path param: Notification template id
142
+ notification_id,
143
+ # Path param: Journey id
144
+ template_id:,
145
+ # Body param: Elemental content payload. The server defaults `version` when
146
+ # omitted.
147
+ content:,
148
+ # Body param: Template state. Defaults to `DRAFT`.
149
+ state: nil,
150
+ request_options: {}
151
+ )
152
+ end
153
+
154
+ # Set locale-specific content overrides for a journey-scoped notification
155
+ # template. Each element override must reference an existing element by ID.
156
+ sig do
157
+ params(
158
+ locale_id: String,
159
+ template_id: String,
160
+ notification_id: String,
161
+ elements:
162
+ T::Array[Courier::NotificationLocalePutRequest::Element::OrHash],
163
+ state: Courier::NotificationTemplateState::OrSymbol,
164
+ request_options: Courier::RequestOptions::OrHash
165
+ ).returns(Courier::NotificationContentMutationResponse)
166
+ end
167
+ def put_locale(
168
+ # Path param: Locale code (e.g., `es`, `fr`, `pt-BR`).
169
+ locale_id,
170
+ # Path param: Journey id
171
+ template_id:,
172
+ # Path param: Notification template id
173
+ notification_id:,
174
+ # Body param: Elements with locale-specific content overrides.
175
+ elements:,
176
+ # Body param: Template state. Defaults to `DRAFT`.
177
+ state: nil,
178
+ request_options: {}
179
+ )
180
+ end
181
+
129
182
  # Replace the journey-scoped notification template draft.
130
183
  sig do
131
184
  params(
@@ -150,6 +203,31 @@ module Courier
150
203
  )
151
204
  end
152
205
 
206
+ # Retrieve the elemental content of a journey-scoped notification template. The
207
+ # response contains the versioned elements along with their content checksums,
208
+ # which can be used to detect changes between versions. Pass `?version=draft`
209
+ # (default `published`) to retrieve the working draft, or `?version=vN` for a
210
+ # historical version.
211
+ sig do
212
+ params(
213
+ notification_id: String,
214
+ template_id: String,
215
+ version: String,
216
+ request_options: Courier::RequestOptions::OrHash
217
+ ).returns(Courier::NotificationContentGetResponse)
218
+ end
219
+ def retrieve_content(
220
+ # Path param: Notification template id
221
+ notification_id,
222
+ # Path param: Journey id
223
+ template_id:,
224
+ # Query param: Accepts `draft`, `published`, or a version string (e.g., `v001`).
225
+ # Defaults to `published`.
226
+ version: nil,
227
+ request_options: {}
228
+ )
229
+ end
230
+
153
231
  # @api private
154
232
  sig { params(client: Courier::Client).returns(T.attached_class) }
155
233
  def self.new(client:)
@@ -29,6 +29,7 @@ module Courier
29
29
  Courier::JourneyThrottleStaticNode::OrHash,
30
30
  Courier::JourneyThrottleDynamicNode::OrHash,
31
31
  Courier::JourneyNode::JourneyBatchNode::OrHash,
32
+ Courier::JourneyNode::JourneyAddToDigestNode::OrHash,
32
33
  Courier::JourneyExitNode::OrHash,
33
34
  Courier::JourneyNode::JourneyBranchNode::OrHash
34
35
  )
@@ -189,6 +190,7 @@ module Courier
189
190
  Courier::JourneyThrottleStaticNode::OrHash,
190
191
  Courier::JourneyThrottleDynamicNode::OrHash,
191
192
  Courier::JourneyNode::JourneyBatchNode::OrHash,
193
+ Courier::JourneyNode::JourneyAddToDigestNode::OrHash,
192
194
  Courier::JourneyExitNode::OrHash,
193
195
  Courier::JourneyNode::JourneyBranchNode::OrHash
194
196
  )
@@ -12,6 +12,7 @@ module Courier
12
12
  | Courier::JourneyThrottleStaticNode
13
13
  | Courier::JourneyThrottleDynamicNode
14
14
  | Courier::JourneyNode::JourneyBatchNode
15
+ | Courier::JourneyNode::JourneyAddToDigestNode
15
16
  | Courier::JourneyExitNode
16
17
  | Courier::JourneyNode::JourneyBranchNode
17
18
 
@@ -147,6 +148,54 @@ module Courier
147
148
  end
148
149
  end
149
150
 
151
+ type journey_add_to_digest_node =
152
+ {
153
+ subscription_topic_id: String,
154
+ type: Courier::Models::JourneyNode::JourneyAddToDigestNode::type_,
155
+ id: String,
156
+ conditions: Courier::Models::journey_conditions_field
157
+ }
158
+
159
+ class JourneyAddToDigestNode < Courier::Internal::Type::BaseModel
160
+ attr_accessor subscription_topic_id: String
161
+
162
+ attr_accessor type: Courier::Models::JourneyNode::JourneyAddToDigestNode::type_
163
+
164
+ attr_reader id: String?
165
+
166
+ def id=: (String) -> String
167
+
168
+ attr_reader conditions: Courier::Models::journey_conditions_field?
169
+
170
+ def conditions=: (
171
+ Courier::Models::journey_conditions_field
172
+ ) -> Courier::Models::journey_conditions_field
173
+
174
+ def initialize: (
175
+ subscription_topic_id: String,
176
+ type: Courier::Models::JourneyNode::JourneyAddToDigestNode::type_,
177
+ ?id: String,
178
+ ?conditions: Courier::Models::journey_conditions_field
179
+ ) -> void
180
+
181
+ def to_hash: -> {
182
+ subscription_topic_id: String,
183
+ type: Courier::Models::JourneyNode::JourneyAddToDigestNode::type_,
184
+ id: String,
185
+ conditions: Courier::Models::journey_conditions_field
186
+ }
187
+
188
+ type type_ = :"add-to-digest"
189
+
190
+ module Type
191
+ extend Courier::Internal::Type::Enum
192
+
193
+ ADD_TO_DIGEST: :"add-to-digest"
194
+
195
+ def self?.values: -> ::Array[Courier::Models::JourneyNode::JourneyAddToDigestNode::type_]
196
+ end
197
+ end
198
+
150
199
  type journey_branch_node =
151
200
  {
152
201
  default: Courier::JourneyNode::JourneyBranchNode::Default,
@@ -0,0 +1,34 @@
1
+ module Courier
2
+ module Models
3
+ module Journeys
4
+ type template_put_content_params =
5
+ { template_id: String, notification_id: String }
6
+ & Courier::Internal::Type::request_parameters
7
+
8
+ class TemplatePutContentParams < Courier::Models::NotificationContentPutRequest
9
+ extend Courier::Internal::Type::RequestParameters::Converter
10
+ include Courier::Internal::Type::RequestParameters
11
+
12
+ def template_id: -> String
13
+
14
+ def template_id=: (String _) -> String
15
+
16
+ def notification_id: -> String
17
+
18
+ def notification_id=: (String _) -> String
19
+
20
+ def initialize: (
21
+ template_id: String,
22
+ notification_id: String,
23
+ ?request_options: Courier::request_opts
24
+ ) -> void
25
+
26
+ def to_hash: -> {
27
+ template_id: String,
28
+ notification_id: String,
29
+ request_options: Courier::RequestOptions
30
+ }
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,40 @@
1
+ module Courier
2
+ module Models
3
+ module Journeys
4
+ type template_put_locale_params =
5
+ { template_id: String, notification_id: String, locale_id: String }
6
+ & Courier::Internal::Type::request_parameters
7
+
8
+ class TemplatePutLocaleParams < Courier::Models::NotificationLocalePutRequest
9
+ extend Courier::Internal::Type::RequestParameters::Converter
10
+ include Courier::Internal::Type::RequestParameters
11
+
12
+ def template_id: -> String
13
+
14
+ def template_id=: (String _) -> String
15
+
16
+ def notification_id: -> String
17
+
18
+ def notification_id=: (String _) -> String
19
+
20
+ def locale_id: -> String
21
+
22
+ def locale_id=: (String _) -> String
23
+
24
+ def initialize: (
25
+ template_id: String,
26
+ notification_id: String,
27
+ locale_id: String,
28
+ ?request_options: Courier::request_opts
29
+ ) -> void
30
+
31
+ def to_hash: -> {
32
+ template_id: String,
33
+ notification_id: String,
34
+ locale_id: String,
35
+ request_options: Courier::RequestOptions
36
+ }
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,36 @@
1
+ module Courier
2
+ module Models
3
+ module Journeys
4
+ type template_retrieve_content_params =
5
+ { template_id: String, notification_id: String, version: String }
6
+ & Courier::Internal::Type::request_parameters
7
+
8
+ class TemplateRetrieveContentParams < Courier::Internal::Type::BaseModel
9
+ extend Courier::Internal::Type::RequestParameters::Converter
10
+ include Courier::Internal::Type::RequestParameters
11
+
12
+ attr_accessor template_id: String
13
+
14
+ attr_accessor notification_id: String
15
+
16
+ attr_reader version: String?
17
+
18
+ def version=: (String) -> String
19
+
20
+ def initialize: (
21
+ template_id: String,
22
+ notification_id: String,
23
+ ?version: String,
24
+ ?request_options: Courier::request_opts
25
+ ) -> void
26
+
27
+ def to_hash: -> {
28
+ template_id: String,
29
+ notification_id: String,
30
+ version: String,
31
+ request_options: Courier::RequestOptions
32
+ }
33
+ end
34
+ end
35
+ end
36
+ end
@@ -43,6 +43,23 @@ module Courier
43
43
  ?request_options: Courier::request_opts
44
44
  ) -> nil
45
45
 
46
+ def put_content: (
47
+ String notification_id,
48
+ template_id: String,
49
+ content: Courier::NotificationContentPutRequest::Content,
50
+ ?state: Courier::Models::notification_template_state,
51
+ ?request_options: Courier::request_opts
52
+ ) -> Courier::NotificationContentMutationResponse
53
+
54
+ def put_locale: (
55
+ String locale_id,
56
+ template_id: String,
57
+ notification_id: String,
58
+ elements: ::Array[Courier::NotificationLocalePutRequest::Element],
59
+ ?state: Courier::Models::notification_template_state,
60
+ ?request_options: Courier::request_opts
61
+ ) -> Courier::NotificationContentMutationResponse
62
+
46
63
  def replace: (
47
64
  String notification_id,
48
65
  template_id: String,
@@ -51,6 +68,13 @@ module Courier
51
68
  ?request_options: Courier::request_opts
52
69
  ) -> Courier::JourneyTemplateGetResponse
53
70
 
71
+ def retrieve_content: (
72
+ String notification_id,
73
+ template_id: String,
74
+ ?version: String,
75
+ ?request_options: Courier::request_opts
76
+ ) -> Courier::NotificationContentGetResponse
77
+
54
78
  def initialize: (client: Courier::Client) -> void
55
79
  end
56
80
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trycourier
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.14.0
4
+ version: 4.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Courier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-16 00:00:00.000000000 Z
11
+ date: 2026-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi
@@ -203,7 +203,10 @@ files:
203
203
  - lib/courier/models/journeys/template_list_params.rb
204
204
  - lib/courier/models/journeys/template_list_versions_params.rb
205
205
  - lib/courier/models/journeys/template_publish_params.rb
206
+ - lib/courier/models/journeys/template_put_content_params.rb
207
+ - lib/courier/models/journeys/template_put_locale_params.rb
206
208
  - lib/courier/models/journeys/template_replace_params.rb
209
+ - lib/courier/models/journeys/template_retrieve_content_params.rb
207
210
  - lib/courier/models/journeys/template_retrieve_params.rb
208
211
  - lib/courier/models/journeys_invoke_request.rb
209
212
  - lib/courier/models/journeys_invoke_response.rb
@@ -594,7 +597,10 @@ files:
594
597
  - rbi/courier/models/journeys/template_list_params.rbi
595
598
  - rbi/courier/models/journeys/template_list_versions_params.rbi
596
599
  - rbi/courier/models/journeys/template_publish_params.rbi
600
+ - rbi/courier/models/journeys/template_put_content_params.rbi
601
+ - rbi/courier/models/journeys/template_put_locale_params.rbi
597
602
  - rbi/courier/models/journeys/template_replace_params.rbi
603
+ - rbi/courier/models/journeys/template_retrieve_content_params.rbi
598
604
  - rbi/courier/models/journeys/template_retrieve_params.rbi
599
605
  - rbi/courier/models/journeys_invoke_request.rbi
600
606
  - rbi/courier/models/journeys_invoke_response.rbi
@@ -984,7 +990,10 @@ files:
984
990
  - sig/courier/models/journeys/template_list_params.rbs
985
991
  - sig/courier/models/journeys/template_list_versions_params.rbs
986
992
  - sig/courier/models/journeys/template_publish_params.rbs
993
+ - sig/courier/models/journeys/template_put_content_params.rbs
994
+ - sig/courier/models/journeys/template_put_locale_params.rbs
987
995
  - sig/courier/models/journeys/template_replace_params.rbs
996
+ - sig/courier/models/journeys/template_retrieve_content_params.rbs
988
997
  - sig/courier/models/journeys/template_retrieve_params.rbs
989
998
  - sig/courier/models/journeys_invoke_request.rbs
990
999
  - sig/courier/models/journeys_invoke_response.rbs