trycourier 4.15.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 +4 -4
- data/CHANGELOG.md +13 -0
- data/lib/courier/models/journeys/template_put_content_params.rb +28 -0
- data/lib/courier/models/journeys/template_put_locale_params.rb +34 -0
- data/lib/courier/models/journeys/template_retrieve_content_params.rb +42 -0
- data/lib/courier/resources/journeys/templates.rb +113 -0
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +5 -2
- data/rbi/courier/models/journeys/template_put_content_params.rbi +48 -0
- data/rbi/courier/models/journeys/template_put_locale_params.rbi +58 -0
- data/rbi/courier/models/journeys/template_retrieve_content_params.rbi +65 -0
- data/rbi/courier/resources/journeys/templates.rbi +78 -0
- data/sig/courier/models/journeys/template_put_content_params.rbs +34 -0
- data/sig/courier/models/journeys/template_put_locale_params.rbs +40 -0
- data/sig/courier/models/journeys/template_retrieve_content_params.rbs +36 -0
- data/sig/courier/resources/journeys/templates.rbs +24 -0
- metadata +11 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 76179334776f39db558748f8c3787c82edfee017d5a1a9eeb4a06593b1dd559e
|
|
4
|
+
data.tar.gz: a42dc6fb130e7991fa52cbb683fc8d4d0a562ec06d8a79a647cdc15cbc15ff3b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 55b1ecd065e30b3c435d09df5f39a9237706ff4eb037a67d6e2ada6610187350403b17f446f0c2f3da9e59e2e0c3d4711303312e67258d3ccad3679f29cd8765
|
|
7
|
+
data.tar.gz: af2d0c62c7146d14047ae2ca71c1f09c95e856708d223e6f32df0e67b64dfef667664d8ee9a7dc95c828a10f9d17bc12ba19d870ffaf218b8c381b66f152e539
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
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
|
+
|
|
3
16
|
## 4.15.0 (2026-06-17)
|
|
4
17
|
|
|
5
18
|
Full Changelog: [v4.14.0...v4.15.0](https://github.com/trycourier/courier-ruby/compare/v4.14.0...v4.15.0)
|
|
@@ -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]
|
data/lib/courier/version.rb
CHANGED
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"
|
|
@@ -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:)
|
|
@@ -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.
|
|
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-
|
|
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
|