trycourier 4.19.2 → 4.20.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 +11 -0
- data/lib/courier/models/notification_duplicate_params.rb +20 -0
- data/lib/courier/models/notification_template_summary.rb +22 -1
- data/lib/courier/models.rb +2 -0
- data/lib/courier/resources/notifications.rb +25 -0
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +1 -0
- data/rbi/courier/models/notification_duplicate_params.rbi +38 -0
- data/rbi/courier/models/notification_template_summary.rbi +26 -0
- data/rbi/courier/models.rbi +2 -0
- data/rbi/courier/resources/notifications.rbi +19 -0
- data/sig/courier/models/notification_duplicate_params.rbs +20 -0
- data/sig/courier/models/notification_template_summary.rbs +14 -0
- data/sig/courier/models.rbs +2 -0
- data/sig/courier/resources/notifications.rbs +5 -0
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6a432e5519e4d84dc11a93b4a0f4801f76ce5a0f3ef2f898304335a29c2dab09
|
|
4
|
+
data.tar.gz: 1267ecc520dd85dc4953f658a9a251dad688d8eb3668e1cd666f8f8829c1b1c0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a43868c8bb50e8dc543ecb1c9224e85149294f7f88bae99c7e5e4e3625189e2c8b60186ff221c7f76b000cadf10b6a03ea80c1bea123ed07598ba4e7fa9019ba
|
|
7
|
+
data.tar.gz: c65e517247b08d26f7e21a7725ce12eb212654e1627635d5ad1523bc99656dd8864ba7f2debc75a65b6e405317b9c2b845d995c111e509a8a12cd9faefc386f3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.20.0 (2026-07-20)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v4.19.2...v4.20.0](https://github.com/trycourier/courier-ruby/compare/v4.19.2...v4.20.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* Document POST /notifications/{id}/duplicate [C-18607] ([#165](https://github.com/trycourier/courier-ruby/issues/165)) ([212644c](https://github.com/trycourier/courier-ruby/commit/212644cd49ac7b108944831e04289d2e9e073b7d))
|
|
10
|
+
* Merge pull request [#149](https://github.com/trycourier/courier-ruby/issues/149) from trycourier/geraldosilva/c-19201-notification-template-subscription-topic-id ([cd697fa](https://github.com/trycourier/courier-ruby/commit/cd697fa2d3b49db32db582dae1789ab03706ced5))
|
|
11
|
+
* Merge pull request [#168](https://github.com/trycourier/courier-ruby/issues/168) from trycourier/geraldosilva/c-19419-topic-id-notification-template-summary ([71d47f3](https://github.com/trycourier/courier-ruby/commit/71d47f336799157c0dfd99276951359d391a8a7d))
|
|
12
|
+
* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([c5fe04e](https://github.com/trycourier/courier-ruby/commit/c5fe04ea6c0ed2c5ce38ca49738c293e44557688))
|
|
13
|
+
|
|
3
14
|
## 4.19.2 (2026-07-10)
|
|
4
15
|
|
|
5
16
|
Full Changelog: [v4.19.1...v4.19.2](https://github.com/trycourier/courier-ruby/compare/v4.19.1...v4.19.2)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Notifications#duplicate
|
|
6
|
+
class NotificationDuplicateParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(id:, request_options: {})
|
|
16
|
+
# @param id [String]
|
|
17
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -35,6 +35,20 @@ module Courier
|
|
|
35
35
|
# @return [Array<String>]
|
|
36
36
|
required :tags, Courier::Internal::Type::ArrayOf[String]
|
|
37
37
|
|
|
38
|
+
# @!attribute subscription_topic_id
|
|
39
|
+
# The linked subscription (preference) topic of the published version. Omitted
|
|
40
|
+
# when no topic is linked or the template has never been published.
|
|
41
|
+
#
|
|
42
|
+
# @return [String, nil]
|
|
43
|
+
optional :subscription_topic_id, String
|
|
44
|
+
|
|
45
|
+
# @!attribute topic_id
|
|
46
|
+
# Alias of subscription_topic_id, provided under the same name V1 list items use
|
|
47
|
+
# for the linked topic. Always carries the same value as subscription_topic_id.
|
|
48
|
+
#
|
|
49
|
+
# @return [String, nil]
|
|
50
|
+
optional :topic_id, String
|
|
51
|
+
|
|
38
52
|
# @!attribute updated
|
|
39
53
|
# Epoch milliseconds of last update.
|
|
40
54
|
#
|
|
@@ -47,7 +61,10 @@ module Courier
|
|
|
47
61
|
# @return [String, nil]
|
|
48
62
|
optional :updater, String
|
|
49
63
|
|
|
50
|
-
# @!method initialize(id:, created:, creator:, name:, state:, tags:, updated: nil, updater: nil)
|
|
64
|
+
# @!method initialize(id:, created:, creator:, name:, state:, tags:, subscription_topic_id: nil, topic_id: nil, updated: nil, updater: nil)
|
|
65
|
+
# Some parameter documentations has been truncated, see
|
|
66
|
+
# {Courier::Models::NotificationTemplateSummary} for more details.
|
|
67
|
+
#
|
|
51
68
|
# V2 (CDS) template summary returned in list responses.
|
|
52
69
|
#
|
|
53
70
|
# @param id [String]
|
|
@@ -62,6 +79,10 @@ module Courier
|
|
|
62
79
|
#
|
|
63
80
|
# @param tags [Array<String>]
|
|
64
81
|
#
|
|
82
|
+
# @param subscription_topic_id [String] The linked subscription (preference) topic of the published version. Omitted whe
|
|
83
|
+
#
|
|
84
|
+
# @param topic_id [String] Alias of subscription_topic_id, provided under the same name V1 list items use f
|
|
85
|
+
#
|
|
65
86
|
# @param updated [Integer] Epoch milliseconds of last update.
|
|
66
87
|
#
|
|
67
88
|
# @param updater [String] User ID of the last updater.
|
data/lib/courier/models.rb
CHANGED
|
@@ -360,6 +360,8 @@ module Courier
|
|
|
360
360
|
|
|
361
361
|
NotificationCreateParams = Courier::Models::NotificationCreateParams
|
|
362
362
|
|
|
363
|
+
NotificationDuplicateParams = Courier::Models::NotificationDuplicateParams
|
|
364
|
+
|
|
363
365
|
NotificationElementPutRequest = Courier::Models::NotificationElementPutRequest
|
|
364
366
|
|
|
365
367
|
NotificationGetContent = Courier::Models::NotificationGetContent
|
|
@@ -110,6 +110,31 @@ module Courier
|
|
|
110
110
|
)
|
|
111
111
|
end
|
|
112
112
|
|
|
113
|
+
# Duplicate a notification template. Creates a standalone copy within the same
|
|
114
|
+
# workspace and environment, with " COPY" appended to the title. The copy clones
|
|
115
|
+
# the source draft's tags, brand, subscription topic, routing strategy, channels,
|
|
116
|
+
# and content, and is always created as a standalone template (it is not linked to
|
|
117
|
+
# any journey or broadcast, even if the source was). Templates that are scoped to
|
|
118
|
+
# a journey or a broadcast cannot be duplicated through this endpoint.
|
|
119
|
+
#
|
|
120
|
+
# @overload duplicate(id, request_options: {})
|
|
121
|
+
#
|
|
122
|
+
# @param id [String] Template ID (nt\_ prefix).
|
|
123
|
+
#
|
|
124
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
125
|
+
#
|
|
126
|
+
# @return [Courier::Models::NotificationTemplateResponse]
|
|
127
|
+
#
|
|
128
|
+
# @see Courier::Models::NotificationDuplicateParams
|
|
129
|
+
def duplicate(id, params = {})
|
|
130
|
+
@client.request(
|
|
131
|
+
method: :post,
|
|
132
|
+
path: ["notifications/%1$s/duplicate", id],
|
|
133
|
+
model: Courier::NotificationTemplateResponse,
|
|
134
|
+
options: params[:request_options]
|
|
135
|
+
)
|
|
136
|
+
end
|
|
137
|
+
|
|
113
138
|
# List versions of a notification template.
|
|
114
139
|
#
|
|
115
140
|
# @overload list_versions(id, cursor: nil, limit: nil, request_options: {})
|
data/lib/courier/version.rb
CHANGED
data/lib/courier.rb
CHANGED
|
@@ -260,6 +260,7 @@ require_relative "courier/models/notification_archive_params"
|
|
|
260
260
|
require_relative "courier/models/notification_content_get_response"
|
|
261
261
|
require_relative "courier/models/notification_content_mutation_response"
|
|
262
262
|
require_relative "courier/models/notification_create_params"
|
|
263
|
+
require_relative "courier/models/notification_duplicate_params"
|
|
263
264
|
require_relative "courier/models/notification_get_content"
|
|
264
265
|
require_relative "courier/models/notification_list_params"
|
|
265
266
|
require_relative "courier/models/notification_list_response"
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationDuplicateParams < 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::NotificationDuplicateParams,
|
|
13
|
+
Courier::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
sig do
|
|
21
|
+
params(
|
|
22
|
+
id: String,
|
|
23
|
+
request_options: Courier::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
25
|
+
end
|
|
26
|
+
def self.new(id:, request_options: {})
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
{ id: String, request_options: Courier::RequestOptions }
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
def to_hash
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -31,6 +31,22 @@ module Courier
|
|
|
31
31
|
sig { returns(T::Array[String]) }
|
|
32
32
|
attr_accessor :tags
|
|
33
33
|
|
|
34
|
+
# The linked subscription (preference) topic of the published version. Omitted
|
|
35
|
+
# when no topic is linked or the template has never been published.
|
|
36
|
+
sig { returns(T.nilable(String)) }
|
|
37
|
+
attr_reader :subscription_topic_id
|
|
38
|
+
|
|
39
|
+
sig { params(subscription_topic_id: String).void }
|
|
40
|
+
attr_writer :subscription_topic_id
|
|
41
|
+
|
|
42
|
+
# Alias of subscription_topic_id, provided under the same name V1 list items use
|
|
43
|
+
# for the linked topic. Always carries the same value as subscription_topic_id.
|
|
44
|
+
sig { returns(T.nilable(String)) }
|
|
45
|
+
attr_reader :topic_id
|
|
46
|
+
|
|
47
|
+
sig { params(topic_id: String).void }
|
|
48
|
+
attr_writer :topic_id
|
|
49
|
+
|
|
34
50
|
# Epoch milliseconds of last update.
|
|
35
51
|
sig { returns(T.nilable(Integer)) }
|
|
36
52
|
attr_reader :updated
|
|
@@ -54,6 +70,8 @@ module Courier
|
|
|
54
70
|
name: String,
|
|
55
71
|
state: Courier::NotificationTemplateSummary::State::OrSymbol,
|
|
56
72
|
tags: T::Array[String],
|
|
73
|
+
subscription_topic_id: String,
|
|
74
|
+
topic_id: String,
|
|
57
75
|
updated: Integer,
|
|
58
76
|
updater: String
|
|
59
77
|
).returns(T.attached_class)
|
|
@@ -67,6 +85,12 @@ module Courier
|
|
|
67
85
|
name:,
|
|
68
86
|
state:,
|
|
69
87
|
tags:,
|
|
88
|
+
# The linked subscription (preference) topic of the published version. Omitted
|
|
89
|
+
# when no topic is linked or the template has never been published.
|
|
90
|
+
subscription_topic_id: nil,
|
|
91
|
+
# Alias of subscription_topic_id, provided under the same name V1 list items use
|
|
92
|
+
# for the linked topic. Always carries the same value as subscription_topic_id.
|
|
93
|
+
topic_id: nil,
|
|
70
94
|
# Epoch milliseconds of last update.
|
|
71
95
|
updated: nil,
|
|
72
96
|
# User ID of the last updater.
|
|
@@ -83,6 +107,8 @@ module Courier
|
|
|
83
107
|
name: String,
|
|
84
108
|
state: Courier::NotificationTemplateSummary::State::TaggedSymbol,
|
|
85
109
|
tags: T::Array[String],
|
|
110
|
+
subscription_topic_id: String,
|
|
111
|
+
topic_id: String,
|
|
86
112
|
updated: Integer,
|
|
87
113
|
updater: String
|
|
88
114
|
}
|
data/rbi/courier/models.rbi
CHANGED
|
@@ -329,6 +329,8 @@ module Courier
|
|
|
329
329
|
|
|
330
330
|
NotificationCreateParams = Courier::Models::NotificationCreateParams
|
|
331
331
|
|
|
332
|
+
NotificationDuplicateParams = Courier::Models::NotificationDuplicateParams
|
|
333
|
+
|
|
332
334
|
NotificationElementPutRequest = Courier::Models::NotificationElementPutRequest
|
|
333
335
|
|
|
334
336
|
NotificationGetContent = Courier::Models::NotificationGetContent
|
|
@@ -79,6 +79,25 @@ module Courier
|
|
|
79
79
|
)
|
|
80
80
|
end
|
|
81
81
|
|
|
82
|
+
# Duplicate a notification template. Creates a standalone copy within the same
|
|
83
|
+
# workspace and environment, with " COPY" appended to the title. The copy clones
|
|
84
|
+
# the source draft's tags, brand, subscription topic, routing strategy, channels,
|
|
85
|
+
# and content, and is always created as a standalone template (it is not linked to
|
|
86
|
+
# any journey or broadcast, even if the source was). Templates that are scoped to
|
|
87
|
+
# a journey or a broadcast cannot be duplicated through this endpoint.
|
|
88
|
+
sig do
|
|
89
|
+
params(
|
|
90
|
+
id: String,
|
|
91
|
+
request_options: Courier::RequestOptions::OrHash
|
|
92
|
+
).returns(Courier::NotificationTemplateResponse)
|
|
93
|
+
end
|
|
94
|
+
def duplicate(
|
|
95
|
+
# Template ID (nt\_ prefix).
|
|
96
|
+
id,
|
|
97
|
+
request_options: {}
|
|
98
|
+
)
|
|
99
|
+
end
|
|
100
|
+
|
|
82
101
|
# List versions of a notification template.
|
|
83
102
|
sig do
|
|
84
103
|
params(
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type notification_duplicate_params =
|
|
4
|
+
{ id: String } & Courier::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class NotificationDuplicateParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
attr_accessor id: String
|
|
11
|
+
|
|
12
|
+
def initialize: (
|
|
13
|
+
id: String,
|
|
14
|
+
?request_options: Courier::request_opts
|
|
15
|
+
) -> void
|
|
16
|
+
|
|
17
|
+
def to_hash: -> { id: String, request_options: Courier::RequestOptions }
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -8,6 +8,8 @@ module Courier
|
|
|
8
8
|
name: String,
|
|
9
9
|
state: Courier::Models::NotificationTemplateSummary::state,
|
|
10
10
|
tags: ::Array[String],
|
|
11
|
+
subscription_topic_id: String,
|
|
12
|
+
topic_id: String,
|
|
11
13
|
updated: Integer,
|
|
12
14
|
updater: String
|
|
13
15
|
}
|
|
@@ -25,6 +27,14 @@ module Courier
|
|
|
25
27
|
|
|
26
28
|
attr_accessor tags: ::Array[String]
|
|
27
29
|
|
|
30
|
+
attr_reader subscription_topic_id: String?
|
|
31
|
+
|
|
32
|
+
def subscription_topic_id=: (String) -> String
|
|
33
|
+
|
|
34
|
+
attr_reader topic_id: String?
|
|
35
|
+
|
|
36
|
+
def topic_id=: (String) -> String
|
|
37
|
+
|
|
28
38
|
attr_reader updated: Integer?
|
|
29
39
|
|
|
30
40
|
def updated=: (Integer) -> Integer
|
|
@@ -40,6 +50,8 @@ module Courier
|
|
|
40
50
|
name: String,
|
|
41
51
|
state: Courier::Models::NotificationTemplateSummary::state,
|
|
42
52
|
tags: ::Array[String],
|
|
53
|
+
?subscription_topic_id: String,
|
|
54
|
+
?topic_id: String,
|
|
43
55
|
?updated: Integer,
|
|
44
56
|
?updater: String
|
|
45
57
|
) -> void
|
|
@@ -51,6 +63,8 @@ module Courier
|
|
|
51
63
|
name: String,
|
|
52
64
|
state: Courier::Models::NotificationTemplateSummary::state,
|
|
53
65
|
tags: ::Array[String],
|
|
66
|
+
subscription_topic_id: String,
|
|
67
|
+
topic_id: String,
|
|
54
68
|
updated: Integer,
|
|
55
69
|
updater: String
|
|
56
70
|
}
|
data/sig/courier/models.rbs
CHANGED
|
@@ -317,6 +317,8 @@ module Courier
|
|
|
317
317
|
|
|
318
318
|
class NotificationCreateParams = Courier::Models::NotificationCreateParams
|
|
319
319
|
|
|
320
|
+
class NotificationDuplicateParams = Courier::Models::NotificationDuplicateParams
|
|
321
|
+
|
|
320
322
|
class NotificationElementPutRequest = Courier::Models::NotificationElementPutRequest
|
|
321
323
|
|
|
322
324
|
class NotificationGetContent = Courier::Models::NotificationGetContent
|
|
@@ -24,6 +24,11 @@ module Courier
|
|
|
24
24
|
|
|
25
25
|
def archive: (String id, ?request_options: Courier::request_opts) -> nil
|
|
26
26
|
|
|
27
|
+
def duplicate: (
|
|
28
|
+
String id,
|
|
29
|
+
?request_options: Courier::request_opts
|
|
30
|
+
) -> Courier::NotificationTemplateResponse
|
|
31
|
+
|
|
27
32
|
def list_versions: (
|
|
28
33
|
String id,
|
|
29
34
|
?cursor: String,
|
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.20.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-07-
|
|
11
|
+
date: 2026-07-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|
|
@@ -260,6 +260,7 @@ files:
|
|
|
260
260
|
- lib/courier/models/notification_content_mutation_response.rb
|
|
261
261
|
- lib/courier/models/notification_content_put_request.rb
|
|
262
262
|
- lib/courier/models/notification_create_params.rb
|
|
263
|
+
- lib/courier/models/notification_duplicate_params.rb
|
|
263
264
|
- lib/courier/models/notification_element_put_request.rb
|
|
264
265
|
- lib/courier/models/notification_get_content.rb
|
|
265
266
|
- lib/courier/models/notification_list_params.rb
|
|
@@ -689,6 +690,7 @@ files:
|
|
|
689
690
|
- rbi/courier/models/notification_content_mutation_response.rbi
|
|
690
691
|
- rbi/courier/models/notification_content_put_request.rbi
|
|
691
692
|
- rbi/courier/models/notification_create_params.rbi
|
|
693
|
+
- rbi/courier/models/notification_duplicate_params.rbi
|
|
692
694
|
- rbi/courier/models/notification_element_put_request.rbi
|
|
693
695
|
- rbi/courier/models/notification_get_content.rbi
|
|
694
696
|
- rbi/courier/models/notification_list_params.rbi
|
|
@@ -1117,6 +1119,7 @@ files:
|
|
|
1117
1119
|
- sig/courier/models/notification_content_mutation_response.rbs
|
|
1118
1120
|
- sig/courier/models/notification_content_put_request.rbs
|
|
1119
1121
|
- sig/courier/models/notification_create_params.rbs
|
|
1122
|
+
- sig/courier/models/notification_duplicate_params.rbs
|
|
1120
1123
|
- sig/courier/models/notification_element_put_request.rbs
|
|
1121
1124
|
- sig/courier/models/notification_get_content.rbs
|
|
1122
1125
|
- sig/courier/models/notification_list_params.rbs
|