trycourier 4.26.2 → 6.0.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: 9f62c9ba0ccf68a6be91bb13460ab3d7ed38815cd7d2827eba3f0b6c5460598b
4
- data.tar.gz: 7d3026d94cc1db562eb020e2e145eacbb67bd5adeada9e29010e60143bdba7ce
3
+ metadata.gz: ed641b11a038a01c22274260fc705dea6b9b111be8cd53b64e422aff9406454f
4
+ data.tar.gz: bcf80f73aa74a8fa95b82c7d2aea347fc8119acc264a9f09f1674a0da6abed60
5
5
  SHA512:
6
- metadata.gz: aed6dce51f5f53597c0b64f394f29cec87c693790996d74d7fc6aaac652a724fe31dda9c3068e0c355888349cf0cb2249db1f8c70126c6f4eea85af0c75c70e6
7
- data.tar.gz: b2b494e23b204e033f15d79fe44aa38b601443a515915955c678770878268e68700793bd1542036c405a7e8b0cef24db72d4d33576dd73bdd94d295bc51fe148
6
+ metadata.gz: 1750e07548991a86cb4ad3dcac19af5079dc36802b7564619bb2658b4257752427bd8108c4649f469330278bc6115124174a3f177236fc4b68286257d5ee6bb0
7
+ data.tar.gz: ffd4fccb77fbc287d6b1959741ea4e9472e951d1da0736de3ad5182dc7a90d8f310128e7d9e1ae77959c8978089997c6a2a4e91daade9126094029ce9f4146fe
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## [6.0.0](https://github.com/trycourier/courier-ruby/compare/v5.0.0...v6.0.0) (2026-08-17)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * **api:** match the spec to the backend — apn/expo token types and the phantom notifications.duplicate ([#128](https://github.com/trycourier/courier-ruby/issues/128))
9
+
10
+ ### Features
11
+
12
+ * **api:** match the spec to the backend — apn/expo token types and the phantom notifications.duplicate ([#128](https://github.com/trycourier/courier-ruby/issues/128)) ([5034ea3](https://github.com/trycourier/courier-ruby/commit/5034ea33f5242443ce08ef9005d3d02e9f471531))
13
+
14
+ ## [5.0.0](https://github.com/trycourier/courier-ruby/compare/v4.26.2...v5.0.0) (2026-08-17)
15
+
16
+
17
+ ### ⚠ BREAKING CHANGES
18
+
19
+ * **api:** nest the AWS SNS target_arn under aws_sns on the user profile ([#123](https://github.com/trycourier/courier-ruby/issues/123))
20
+
21
+ ### Features
22
+
23
+ * **api:** nest the AWS SNS target_arn under aws_sns on the user profile ([#123](https://github.com/trycourier/courier-ruby/issues/123)) ([fcf37c6](https://github.com/trycourier/courier-ruby/commit/fcf37c690e11ccffc8283bbd5791864b405ca20c))
24
+
3
25
  ## [4.26.2](https://github.com/trycourier/courier-ruby/compare/v4.26.1...v4.26.2) (2026-08-13)
4
26
 
5
27
 
data/README.md CHANGED
@@ -9,7 +9,7 @@ Add the gem to your `Gemfile`:
9
9
  <!-- x-release-please-start-version -->
10
10
 
11
11
  ```ruby
12
- gem "trycourier", "~> 4.26.2"
12
+ gem "trycourier", "~> 6.0.0"
13
13
  ```
14
14
 
15
15
  <!-- x-release-please-end -->
@@ -6,14 +6,14 @@ module Courier
6
6
  # @api private
7
7
  #
8
8
  # @example
9
- # # `discord` is a `Courier::Discord`
10
- # case discord
11
- # when Courier::SendToChannel
12
- # puts(discord.channel_id)
13
- # when Courier::SendDirectMessage
14
- # puts(discord.user_id)
9
+ # # `apn` is a `Courier::Apn`
10
+ # case apn
11
+ # when Courier::Token
12
+ # puts(apn.token)
13
+ # when Courier::MultipleTokens
14
+ # puts(apn.tokens)
15
15
  # else
16
- # puts(discord)
16
+ # puts(apn)
17
17
  # end
18
18
  module Union
19
19
  include Courier::Internal::Type::Converter
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ # Apple Push Notification device tokens. Supply either a single `token` or a
6
+ # `tokens` value. A bare string is rejected by the provider — the token must be
7
+ # wrapped in this object.
8
+ module Apn
9
+ extend Courier::Internal::Type::Union
10
+
11
+ variant -> { Courier::Token }
12
+
13
+ variant -> { Courier::MultipleTokens }
14
+
15
+ # @!method self.variants
16
+ # @return [Array(Courier::Models::Token, Courier::Models::MultipleTokens)]
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class AwsSns < Courier::Internal::Type::BaseModel
6
+ # @!attribute target_arn
7
+ # The ARN of the SNS platform endpoint, topic, or application to publish to.
8
+ #
9
+ # @return [String]
10
+ required :target_arn, String
11
+
12
+ # @!method initialize(target_arn:)
13
+ # Routes a push notification through the AWS SNS provider. The target ARN must be
14
+ # nested under `aws_sns` — a top-level `target_arn` on the profile is ignored by
15
+ # the provider.
16
+ #
17
+ # @param target_arn [String] The ARN of the SNS platform endpoint, topic, or application to publish to.
18
+ end
19
+ end
20
+ end
@@ -2,6 +2,7 @@
2
2
 
3
3
  module Courier
4
4
  module Models
5
+ # Expo push tokens. Supply either a single `token` or a `tokens` value.
5
6
  module Expo
6
7
  extend Courier::Internal::Type::Union
7
8
 
@@ -4,12 +4,35 @@ module Courier
4
4
  module Models
5
5
  class MultipleTokens < Courier::Internal::Type::BaseModel
6
6
  # @!attribute tokens
7
+ # One device token, or an array of them. The values are the token strings
8
+ # themselves — not objects.
7
9
  #
8
- # @return [Array<Courier::Models::Token>]
9
- required :tokens, -> { Courier::Internal::Type::ArrayOf[Courier::Token] }
10
+ # @return [String, Array<String>]
11
+ required :tokens, union: -> { Courier::MultipleTokens::Tokens }
10
12
 
11
13
  # @!method initialize(tokens:)
12
- # @param tokens [Array<Courier::Models::Token>]
14
+ # Some parameter documentations has been truncated, see
15
+ # {Courier::Models::MultipleTokens} for more details.
16
+ #
17
+ # @param tokens [String, Array<String>] One device token, or an array of them. The values are the token strings themselv
18
+
19
+ # One device token, or an array of them. The values are the token strings
20
+ # themselves — not objects.
21
+ #
22
+ # @see Courier::Models::MultipleTokens#tokens
23
+ module Tokens
24
+ extend Courier::Internal::Type::Union
25
+
26
+ variant String
27
+
28
+ variant -> { Courier::Models::MultipleTokens::Tokens::StringArray }
29
+
30
+ # @!method self.variants
31
+ # @return [Array(String, Array<String>)]
32
+
33
+ # @type [Courier::Internal::Type::Converter]
34
+ StringArray = Courier::Internal::Type::ArrayOf[String]
35
+ end
13
36
  end
14
37
  end
15
38
  end
@@ -14,9 +14,20 @@ module Courier
14
14
  optional :airship, -> { Courier::AirshipProfile }, nil?: true
15
15
 
16
16
  # @!attribute apn
17
+ # Apple Push Notification device tokens. Supply either a single `token` or a
18
+ # `tokens` value. A bare string is rejected by the provider — the token must be
19
+ # wrapped in this object.
17
20
  #
18
- # @return [String, nil]
19
- optional :apn, String, nil?: true
21
+ # @return [Courier::Models::Token, Courier::Models::MultipleTokens, nil]
22
+ optional :apn, union: -> { Courier::Apn }, nil?: true
23
+
24
+ # @!attribute aws_sns
25
+ # Routes a push notification through the AWS SNS provider. The target ARN must be
26
+ # nested under `aws_sns` — a top-level `target_arn` on the profile is ignored by
27
+ # the provider.
28
+ #
29
+ # @return [Courier::Models::AwsSns, nil]
30
+ optional :aws_sns, -> { Courier::AwsSns }, nil?: true
20
31
 
21
32
  # @!attribute birthdate
22
33
  #
@@ -46,6 +57,7 @@ module Courier
46
57
  optional :email_verified, Courier::Internal::Type::Boolean, nil?: true
47
58
 
48
59
  # @!attribute expo
60
+ # Expo push tokens. Supply either a single `token` or a `tokens` value.
49
61
  #
50
62
  # @return [Courier::Models::Token, Courier::Models::MultipleTokens, nil]
51
63
  optional :expo, union: -> { Courier::Expo }, nil?: true
@@ -143,11 +155,6 @@ module Courier
143
155
  # @return [String, nil]
144
156
  optional :sub, String, nil?: true
145
157
 
146
- # @!attribute target_arn
147
- #
148
- # @return [String, nil]
149
- optional :target_arn, String, nil?: true
150
-
151
158
  # @!attribute updated_at
152
159
  #
153
160
  # @return [String, nil]
@@ -163,7 +170,7 @@ module Courier
163
170
  # @return [String, nil]
164
171
  optional :zoneinfo, String, nil?: true
165
172
 
166
- # @!method initialize(address: nil, airship: nil, apn: nil, birthdate: nil, custom: nil, discord: nil, email: nil, email_verified: nil, expo: nil, facebook_psid: nil, family_name: nil, firebase_token: nil, gender: nil, given_name: nil, intercom: nil, locale: nil, middle_name: nil, ms_teams: nil, name: nil, nickname: nil, phone_number: nil, phone_number_verified: nil, picture: nil, preferred_name: nil, profile: nil, slack: nil, sub: nil, target_arn: nil, updated_at: nil, website: nil, zoneinfo: nil)
173
+ # @!method initialize(address: nil, airship: nil, apn: nil, aws_sns: nil, birthdate: nil, custom: nil, discord: nil, email: nil, email_verified: nil, expo: nil, facebook_psid: nil, family_name: nil, firebase_token: nil, gender: nil, given_name: nil, intercom: nil, locale: nil, middle_name: nil, ms_teams: nil, name: nil, nickname: nil, phone_number: nil, phone_number_verified: nil, picture: nil, preferred_name: nil, profile: nil, slack: nil, sub: nil, updated_at: nil, website: nil, zoneinfo: nil)
167
174
  # Some parameter documentations has been truncated, see
168
175
  # {Courier::Models::UserProfile} for more details.
169
176
  #
@@ -171,7 +178,9 @@ module Courier
171
178
  #
172
179
  # @param airship [Courier::Models::AirshipProfile, nil]
173
180
  #
174
- # @param apn [String, nil]
181
+ # @param apn [Courier::Models::Token, Courier::Models::MultipleTokens, nil] Apple Push Notification device tokens. Supply either a single `token` or a `toke
182
+ #
183
+ # @param aws_sns [Courier::Models::AwsSns, nil] Routes a push notification through the AWS SNS provider. The target ARN must be
175
184
  #
176
185
  # @param birthdate [String, nil]
177
186
  #
@@ -183,7 +192,7 @@ module Courier
183
192
  #
184
193
  # @param email_verified [Boolean, nil]
185
194
  #
186
- # @param expo [Courier::Models::Token, Courier::Models::MultipleTokens, nil]
195
+ # @param expo [Courier::Models::Token, Courier::Models::MultipleTokens, nil] Expo push tokens. Supply either a single `token` or a `tokens` value.
187
196
  #
188
197
  # @param facebook_psid [String, nil]
189
198
  #
@@ -221,8 +230,6 @@ module Courier
221
230
  #
222
231
  # @param sub [String, nil]
223
232
  #
224
- # @param target_arn [String, nil]
225
- #
226
233
  # @param updated_at [String, nil]
227
234
  #
228
235
  # @param website [String, nil]
@@ -45,6 +45,8 @@ module Courier
45
45
 
46
46
  Alignment = Courier::Models::Alignment
47
47
 
48
+ Apn = Courier::Models::Apn
49
+
48
50
  AssociatedNotificationListResponse = Courier::Models::AssociatedNotificationListResponse
49
51
 
50
52
  Audience = Courier::Models::Audience
@@ -83,6 +85,8 @@ module Courier
83
85
 
84
86
  AutomationTemplateListResponse = Courier::Models::AutomationTemplateListResponse
85
87
 
88
+ AwsSns = Courier::Models::AwsSns
89
+
86
90
  BaseCheck = Courier::Models::BaseCheck
87
91
 
88
92
  BaseTemplateTenantAssociation = Courier::Models::BaseTemplateTenantAssociation
@@ -390,8 +394,6 @@ module Courier
390
394
 
391
395
  NotificationCreateParams = Courier::Models::NotificationCreateParams
392
396
 
393
- NotificationDuplicateParams = Courier::Models::NotificationDuplicateParams
394
-
395
397
  NotificationElementPutRequest = Courier::Models::NotificationElementPutRequest
396
398
 
397
399
  NotificationGetContent = Courier::Models::NotificationGetContent
@@ -123,28 +123,6 @@ module Courier
123
123
  )
124
124
  end
125
125
 
126
- # Copies a notification template within the same workspace and environment,
127
- # appending " COPY" to the title. The copy is standalone and independently
128
- # editable.
129
- #
130
- # @overload duplicate(id, request_options: {})
131
- #
132
- # @param id [String] Template ID (nt\_ prefix).
133
- #
134
- # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
135
- #
136
- # @return [Courier::Models::NotificationTemplateResponse]
137
- #
138
- # @see Courier::Models::NotificationDuplicateParams
139
- def duplicate(id, params = {})
140
- @client.request(
141
- method: :post,
142
- path: ["notifications/%1$s/duplicate", id],
143
- model: Courier::NotificationTemplateResponse,
144
- options: params[:request_options]
145
- )
146
- end
147
-
148
126
  # Returns a notification template's published versions, most recent first, for
149
127
  # comparison or rollback. Paged.
150
128
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Courier
4
- VERSION = "4.26.2"
4
+ VERSION = "6.0.0"
5
5
  end
data/lib/courier.rb CHANGED
@@ -91,6 +91,7 @@ require_relative "courier/models/workspace_preference_topic_replace_request"
91
91
  require_relative "courier/models/airship_profile"
92
92
  require_relative "courier/models/airship_profile_audience"
93
93
  require_relative "courier/models/alignment"
94
+ require_relative "courier/models/apn"
94
95
  require_relative "courier/models/associated_notification_list_response"
95
96
  require_relative "courier/models/audience"
96
97
  require_relative "courier/models/audience_delete_params"
@@ -116,6 +117,7 @@ require_relative "courier/models/automations/invoke_invoke_ad_hoc_params"
116
117
  require_relative "courier/models/automations/invoke_invoke_by_template_params"
117
118
  require_relative "courier/models/automation_template"
118
119
  require_relative "courier/models/automation_template_list_response"
120
+ require_relative "courier/models/aws_sns"
119
121
  require_relative "courier/models/brand"
120
122
  require_relative "courier/models/brand_colors"
121
123
  require_relative "courier/models/brand_create_params"
@@ -278,7 +280,6 @@ require_relative "courier/models/notification_archive_params"
278
280
  require_relative "courier/models/notification_content_get_response"
279
281
  require_relative "courier/models/notification_content_mutation_response"
280
282
  require_relative "courier/models/notification_create_params"
281
- require_relative "courier/models/notification_duplicate_params"
282
283
  require_relative "courier/models/notification_get_content"
283
284
  require_relative "courier/models/notification_list_params"
284
285
  require_relative "courier/models/notification_list_response"
@@ -0,0 +1,18 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ # Apple Push Notification device tokens. Supply either a single `token` or a
6
+ # `tokens` value. A bare string is rejected by the provider — the token must be
7
+ # wrapped in this object.
8
+ module Apn
9
+ extend Courier::Internal::Type::Union
10
+
11
+ Variants = T.type_alias { T.any(Courier::Token, Courier::MultipleTokens) }
12
+
13
+ sig { override.returns(T::Array[Courier::Apn::Variants]) }
14
+ def self.variants
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,28 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ class AwsSns < Courier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias { T.any(Courier::AwsSns, Courier::Internal::AnyHash) }
8
+
9
+ # The ARN of the SNS platform endpoint, topic, or application to publish to.
10
+ sig { returns(String) }
11
+ attr_accessor :target_arn
12
+
13
+ # Routes a push notification through the AWS SNS provider. The target ARN must be
14
+ # nested under `aws_sns` — a top-level `target_arn` on the profile is ignored by
15
+ # the provider.
16
+ sig { params(target_arn: String).returns(T.attached_class) }
17
+ def self.new(
18
+ # The ARN of the SNS platform endpoint, topic, or application to publish to.
19
+ target_arn:
20
+ )
21
+ end
22
+
23
+ sig { override.returns({ target_arn: String }) }
24
+ def to_hash
25
+ end
26
+ end
27
+ end
28
+ end
@@ -2,6 +2,7 @@
2
2
 
3
3
  module Courier
4
4
  module Models
5
+ # Expo push tokens. Supply either a single `token` or a `tokens` value.
5
6
  module Expo
6
7
  extend Courier::Internal::Type::Union
7
8
 
@@ -8,20 +8,48 @@ module Courier
8
8
  T.any(Courier::MultipleTokens, Courier::Internal::AnyHash)
9
9
  end
10
10
 
11
- sig { returns(T::Array[Courier::Token]) }
11
+ # One device token, or an array of them. The values are the token strings
12
+ # themselves — not objects.
13
+ sig { returns(Courier::MultipleTokens::Tokens::Variants) }
12
14
  attr_accessor :tokens
13
15
 
14
16
  sig do
15
- params(tokens: T::Array[Courier::Token::OrHash]).returns(
17
+ params(tokens: Courier::MultipleTokens::Tokens::Variants).returns(
16
18
  T.attached_class
17
19
  )
18
20
  end
19
- def self.new(tokens:)
21
+ def self.new(
22
+ # One device token, or an array of them. The values are the token strings
23
+ # themselves — not objects.
24
+ tokens:
25
+ )
20
26
  end
21
27
 
22
- sig { override.returns({ tokens: T::Array[Courier::Token] }) }
28
+ sig do
29
+ override.returns({ tokens: Courier::MultipleTokens::Tokens::Variants })
30
+ end
23
31
  def to_hash
24
32
  end
33
+
34
+ # One device token, or an array of them. The values are the token strings
35
+ # themselves — not objects.
36
+ module Tokens
37
+ extend Courier::Internal::Type::Union
38
+
39
+ Variants = T.type_alias { T.any(String, T::Array[String]) }
40
+
41
+ sig do
42
+ override.returns(T::Array[Courier::MultipleTokens::Tokens::Variants])
43
+ end
44
+ def self.variants
45
+ end
46
+
47
+ StringArray =
48
+ T.let(
49
+ Courier::Internal::Type::ArrayOf[String],
50
+ Courier::Internal::Type::Converter
51
+ )
52
+ end
25
53
  end
26
54
  end
27
55
  end
@@ -20,9 +20,21 @@ module Courier
20
20
  sig { params(airship: T.nilable(Courier::AirshipProfile::OrHash)).void }
21
21
  attr_writer :airship
22
22
 
23
- sig { returns(T.nilable(String)) }
23
+ # Apple Push Notification device tokens. Supply either a single `token` or a
24
+ # `tokens` value. A bare string is rejected by the provider — the token must be
25
+ # wrapped in this object.
26
+ sig { returns(T.nilable(T.any(Courier::Token, Courier::MultipleTokens))) }
24
27
  attr_accessor :apn
25
28
 
29
+ # Routes a push notification through the AWS SNS provider. The target ARN must be
30
+ # nested under `aws_sns` — a top-level `target_arn` on the profile is ignored by
31
+ # the provider.
32
+ sig { returns(T.nilable(Courier::AwsSns)) }
33
+ attr_reader :aws_sns
34
+
35
+ sig { params(aws_sns: T.nilable(Courier::AwsSns::OrHash)).void }
36
+ attr_writer :aws_sns
37
+
26
38
  sig { returns(T.nilable(String)) }
27
39
  attr_accessor :birthdate
28
40
 
@@ -44,6 +56,7 @@ module Courier
44
56
  sig { returns(T.nilable(T::Boolean)) }
45
57
  attr_accessor :email_verified
46
58
 
59
+ # Expo push tokens. Supply either a single `token` or a `tokens` value.
47
60
  sig { returns(T.nilable(T.any(Courier::Token, Courier::MultipleTokens))) }
48
61
  attr_accessor :expo
49
62
 
@@ -126,9 +139,6 @@ module Courier
126
139
  sig { returns(T.nilable(String)) }
127
140
  attr_accessor :sub
128
141
 
129
- sig { returns(T.nilable(String)) }
130
- attr_accessor :target_arn
131
-
132
142
  sig { returns(T.nilable(String)) }
133
143
  attr_accessor :updated_at
134
144
 
@@ -142,7 +152,11 @@ module Courier
142
152
  params(
143
153
  address: T.nilable(Courier::UserProfile::Address::OrHash),
144
154
  airship: T.nilable(Courier::AirshipProfile::OrHash),
145
- apn: T.nilable(String),
155
+ apn:
156
+ T.nilable(
157
+ T.any(Courier::Token::OrHash, Courier::MultipleTokens::OrHash)
158
+ ),
159
+ aws_sns: T.nilable(Courier::AwsSns::OrHash),
146
160
  birthdate: T.nilable(String),
147
161
  custom: T.nilable(T::Hash[Symbol, T.anything]),
148
162
  discord:
@@ -193,7 +207,6 @@ module Courier
193
207
  )
194
208
  ),
195
209
  sub: T.nilable(String),
196
- target_arn: T.nilable(String),
197
210
  updated_at: T.nilable(String),
198
211
  website: T.nilable(String),
199
212
  zoneinfo: T.nilable(String)
@@ -202,7 +215,14 @@ module Courier
202
215
  def self.new(
203
216
  address: nil,
204
217
  airship: nil,
218
+ # Apple Push Notification device tokens. Supply either a single `token` or a
219
+ # `tokens` value. A bare string is rejected by the provider — the token must be
220
+ # wrapped in this object.
205
221
  apn: nil,
222
+ # Routes a push notification through the AWS SNS provider. The target ARN must be
223
+ # nested under `aws_sns` — a top-level `target_arn` on the profile is ignored by
224
+ # the provider.
225
+ aws_sns: nil,
206
226
  birthdate: nil,
207
227
  # A free form object. Due to a limitation of the API Explorer, you can only enter
208
228
  # string key/values below, but this API accepts more complex object structures.
@@ -210,6 +230,7 @@ module Courier
210
230
  discord: nil,
211
231
  email: nil,
212
232
  email_verified: nil,
233
+ # Expo push tokens. Supply either a single `token` or a `tokens` value.
213
234
  expo: nil,
214
235
  facebook_psid: nil,
215
236
  family_name: nil,
@@ -229,7 +250,6 @@ module Courier
229
250
  profile: nil,
230
251
  slack: nil,
231
252
  sub: nil,
232
- target_arn: nil,
233
253
  updated_at: nil,
234
254
  website: nil,
235
255
  zoneinfo: nil
@@ -241,7 +261,8 @@ module Courier
241
261
  {
242
262
  address: T.nilable(Courier::UserProfile::Address),
243
263
  airship: T.nilable(Courier::AirshipProfile),
244
- apn: T.nilable(String),
264
+ apn: T.nilable(T.any(Courier::Token, Courier::MultipleTokens)),
265
+ aws_sns: T.nilable(Courier::AwsSns),
245
266
  birthdate: T.nilable(String),
246
267
  custom: T.nilable(T::Hash[Symbol, T.anything]),
247
268
  discord:
@@ -286,7 +307,6 @@ module Courier
286
307
  )
287
308
  ),
288
309
  sub: T.nilable(String),
289
- target_arn: T.nilable(String),
290
310
  updated_at: T.nilable(String),
291
311
  website: T.nilable(String),
292
312
  zoneinfo: T.nilable(String)
@@ -7,6 +7,8 @@ module Courier
7
7
 
8
8
  Alignment = Courier::Models::Alignment
9
9
 
10
+ Apn = Courier::Models::Apn
11
+
10
12
  AssociatedNotificationListResponse =
11
13
  Courier::Models::AssociatedNotificationListResponse
12
14
 
@@ -47,6 +49,8 @@ module Courier
47
49
  AutomationTemplateListResponse =
48
50
  Courier::Models::AutomationTemplateListResponse
49
51
 
52
+ AwsSns = Courier::Models::AwsSns
53
+
50
54
  BaseCheck = Courier::Models::BaseCheck
51
55
 
52
56
  BaseTemplateTenantAssociation = Courier::Models::BaseTemplateTenantAssociation
@@ -360,8 +364,6 @@ module Courier
360
364
 
361
365
  NotificationCreateParams = Courier::Models::NotificationCreateParams
362
366
 
363
- NotificationDuplicateParams = Courier::Models::NotificationDuplicateParams
364
-
365
367
  NotificationElementPutRequest = Courier::Models::NotificationElementPutRequest
366
368
 
367
369
  NotificationGetContent = Courier::Models::NotificationGetContent
@@ -99,22 +99,6 @@ module Courier
99
99
  )
100
100
  end
101
101
 
102
- # Copies a notification template within the same workspace and environment,
103
- # appending " COPY" to the title. The copy is standalone and independently
104
- # editable.
105
- sig do
106
- params(
107
- id: String,
108
- request_options: Courier::RequestOptions::OrHash
109
- ).returns(Courier::NotificationTemplateResponse)
110
- end
111
- def duplicate(
112
- # Template ID (nt\_ prefix).
113
- id,
114
- request_options: {}
115
- )
116
- end
117
-
118
102
  # Returns a notification template's published versions, most recent first, for
119
103
  # comparison or rollback. Paged.
120
104
  sig do
@@ -0,0 +1,11 @@
1
+ module Courier
2
+ module Models
3
+ type apn = Courier::Token | Courier::MultipleTokens
4
+
5
+ module Apn
6
+ extend Courier::Internal::Type::Union
7
+
8
+ def self?.variants: -> ::Array[Courier::Models::apn]
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,13 @@
1
+ module Courier
2
+ module Models
3
+ type aws_sns = { target_arn: String }
4
+
5
+ class AwsSns < Courier::Internal::Type::BaseModel
6
+ attr_accessor target_arn: String
7
+
8
+ def initialize: (target_arn: String) -> void
9
+
10
+ def to_hash: -> { target_arn: String }
11
+ end
12
+ end
13
+ end
@@ -1,13 +1,23 @@
1
1
  module Courier
2
2
  module Models
3
- type multiple_tokens = { tokens: ::Array[Courier::Token] }
3
+ type multiple_tokens = { tokens: Courier::Models::MultipleTokens::tokens }
4
4
 
5
5
  class MultipleTokens < Courier::Internal::Type::BaseModel
6
- attr_accessor tokens: ::Array[Courier::Token]
6
+ attr_accessor tokens: Courier::Models::MultipleTokens::tokens
7
7
 
8
- def initialize: (tokens: ::Array[Courier::Token]) -> void
8
+ def initialize: (tokens: Courier::Models::MultipleTokens::tokens) -> void
9
9
 
10
- def to_hash: -> { tokens: ::Array[Courier::Token] }
10
+ def to_hash: -> { tokens: Courier::Models::MultipleTokens::tokens }
11
+
12
+ type tokens = String | ::Array[String]
13
+
14
+ module Tokens
15
+ extend Courier::Internal::Type::Union
16
+
17
+ def self?.variants: -> ::Array[Courier::Models::MultipleTokens::tokens]
18
+
19
+ StringArray: Courier::Internal::Type::Converter
20
+ end
11
21
  end
12
22
  end
13
23
  end
@@ -4,7 +4,8 @@ module Courier
4
4
  {
5
5
  address: Courier::UserProfile::Address?,
6
6
  airship: Courier::AirshipProfile?,
7
- apn: String?,
7
+ apn: Courier::Models::apn?,
8
+ aws_sns: Courier::AwsSns?,
8
9
  birthdate: String?,
9
10
  custom: ::Hash[Symbol, top]?,
10
11
  discord: Courier::Models::discord?,
@@ -29,7 +30,6 @@ module Courier
29
30
  profile: String?,
30
31
  slack: Courier::Models::slack?,
31
32
  sub: String?,
32
- target_arn: String?,
33
33
  updated_at: String?,
34
34
  website: String?,
35
35
  zoneinfo: String?
@@ -40,7 +40,9 @@ module Courier
40
40
 
41
41
  attr_accessor airship: Courier::AirshipProfile?
42
42
 
43
- attr_accessor apn: String?
43
+ attr_accessor apn: Courier::Models::apn?
44
+
45
+ attr_accessor aws_sns: Courier::AwsSns?
44
46
 
45
47
  attr_accessor birthdate: String?
46
48
 
@@ -90,8 +92,6 @@ module Courier
90
92
 
91
93
  attr_accessor sub: String?
92
94
 
93
- attr_accessor target_arn: String?
94
-
95
95
  attr_accessor updated_at: String?
96
96
 
97
97
  attr_accessor website: String?
@@ -101,7 +101,8 @@ module Courier
101
101
  def initialize: (
102
102
  ?address: Courier::UserProfile::Address?,
103
103
  ?airship: Courier::AirshipProfile?,
104
- ?apn: String?,
104
+ ?apn: Courier::Models::apn?,
105
+ ?aws_sns: Courier::AwsSns?,
105
106
  ?birthdate: String?,
106
107
  ?custom: ::Hash[Symbol, top]?,
107
108
  ?discord: Courier::Models::discord?,
@@ -126,7 +127,6 @@ module Courier
126
127
  ?profile: String?,
127
128
  ?slack: Courier::Models::slack?,
128
129
  ?sub: String?,
129
- ?target_arn: String?,
130
130
  ?updated_at: String?,
131
131
  ?website: String?,
132
132
  ?zoneinfo: String?
@@ -135,7 +135,8 @@ module Courier
135
135
  def to_hash: -> {
136
136
  address: Courier::UserProfile::Address?,
137
137
  airship: Courier::AirshipProfile?,
138
- apn: String?,
138
+ apn: Courier::Models::apn?,
139
+ aws_sns: Courier::AwsSns?,
139
140
  birthdate: String?,
140
141
  custom: ::Hash[Symbol, top]?,
141
142
  discord: Courier::Models::discord?,
@@ -160,7 +161,6 @@ module Courier
160
161
  profile: String?,
161
162
  slack: Courier::Models::slack?,
162
163
  sub: String?,
163
- target_arn: String?,
164
164
  updated_at: String?,
165
165
  website: String?,
166
166
  zoneinfo: String?
@@ -5,6 +5,8 @@ module Courier
5
5
 
6
6
  module Alignment = Courier::Models::Alignment
7
7
 
8
+ module Apn = Courier::Models::Apn
9
+
8
10
  class AssociatedNotificationListResponse = Courier::Models::AssociatedNotificationListResponse
9
11
 
10
12
  class Audience = Courier::Models::Audience
@@ -43,6 +45,8 @@ module Courier
43
45
 
44
46
  class AutomationTemplateListResponse = Courier::Models::AutomationTemplateListResponse
45
47
 
48
+ class AwsSns = Courier::Models::AwsSns
49
+
46
50
  class BaseCheck = Courier::Models::BaseCheck
47
51
 
48
52
  class BaseTemplateTenantAssociation = Courier::Models::BaseTemplateTenantAssociation
@@ -347,8 +351,6 @@ module Courier
347
351
 
348
352
  class NotificationCreateParams = Courier::Models::NotificationCreateParams
349
353
 
350
- class NotificationDuplicateParams = Courier::Models::NotificationDuplicateParams
351
-
352
354
  class NotificationElementPutRequest = Courier::Models::NotificationElementPutRequest
353
355
 
354
356
  class NotificationGetContent = Courier::Models::NotificationGetContent
@@ -26,11 +26,6 @@ module Courier
26
26
 
27
27
  def archive: (String id, ?request_options: Courier::request_opts) -> nil
28
28
 
29
- def duplicate: (
30
- String id,
31
- ?request_options: Courier::request_opts
32
- ) -> Courier::NotificationTemplateResponse
33
-
34
29
  def list_versions: (
35
30
  String id,
36
31
  ?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.26.2
4
+ version: 6.0.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-08-14 00:00:00.000000000 Z
11
+ date: 2026-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi
@@ -72,6 +72,7 @@ files:
72
72
  - lib/courier/models/airship_profile.rb
73
73
  - lib/courier/models/airship_profile_audience.rb
74
74
  - lib/courier/models/alignment.rb
75
+ - lib/courier/models/apn.rb
75
76
  - lib/courier/models/associated_notification_list_response.rb
76
77
  - lib/courier/models/audience.rb
77
78
  - lib/courier/models/audience_delete_params.rb
@@ -97,6 +98,7 @@ files:
97
98
  - lib/courier/models/automation_template_list_response.rb
98
99
  - lib/courier/models/automations/invoke_invoke_ad_hoc_params.rb
99
100
  - lib/courier/models/automations/invoke_invoke_by_template_params.rb
101
+ - lib/courier/models/aws_sns.rb
100
102
  - lib/courier/models/base_check.rb
101
103
  - lib/courier/models/base_template_tenant_association.rb
102
104
  - lib/courier/models/brand.rb
@@ -275,7 +277,6 @@ files:
275
277
  - lib/courier/models/notification_content_mutation_response.rb
276
278
  - lib/courier/models/notification_content_put_request.rb
277
279
  - lib/courier/models/notification_create_params.rb
278
- - lib/courier/models/notification_duplicate_params.rb
279
280
  - lib/courier/models/notification_element_put_request.rb
280
281
  - lib/courier/models/notification_get_content.rb
281
282
  - lib/courier/models/notification_list_params.rb
@@ -523,6 +524,7 @@ files:
523
524
  - rbi/courier/models/airship_profile.rbi
524
525
  - rbi/courier/models/airship_profile_audience.rbi
525
526
  - rbi/courier/models/alignment.rbi
527
+ - rbi/courier/models/apn.rbi
526
528
  - rbi/courier/models/associated_notification_list_response.rbi
527
529
  - rbi/courier/models/audience.rbi
528
530
  - rbi/courier/models/audience_delete_params.rbi
@@ -548,6 +550,7 @@ files:
548
550
  - rbi/courier/models/automation_template_list_response.rbi
549
551
  - rbi/courier/models/automations/invoke_invoke_ad_hoc_params.rbi
550
552
  - rbi/courier/models/automations/invoke_invoke_by_template_params.rbi
553
+ - rbi/courier/models/aws_sns.rbi
551
554
  - rbi/courier/models/base_check.rbi
552
555
  - rbi/courier/models/base_template_tenant_association.rbi
553
556
  - rbi/courier/models/brand.rbi
@@ -726,7 +729,6 @@ files:
726
729
  - rbi/courier/models/notification_content_mutation_response.rbi
727
730
  - rbi/courier/models/notification_content_put_request.rbi
728
731
  - rbi/courier/models/notification_create_params.rbi
729
- - rbi/courier/models/notification_duplicate_params.rbi
730
732
  - rbi/courier/models/notification_element_put_request.rbi
731
733
  - rbi/courier/models/notification_get_content.rbi
732
734
  - rbi/courier/models/notification_list_params.rbi
@@ -973,6 +975,7 @@ files:
973
975
  - sig/courier/models/airship_profile.rbs
974
976
  - sig/courier/models/airship_profile_audience.rbs
975
977
  - sig/courier/models/alignment.rbs
978
+ - sig/courier/models/apn.rbs
976
979
  - sig/courier/models/associated_notification_list_response.rbs
977
980
  - sig/courier/models/audience.rbs
978
981
  - sig/courier/models/audience_delete_params.rbs
@@ -998,6 +1001,7 @@ files:
998
1001
  - sig/courier/models/automation_template_list_response.rbs
999
1002
  - sig/courier/models/automations/invoke_invoke_ad_hoc_params.rbs
1000
1003
  - sig/courier/models/automations/invoke_invoke_by_template_params.rbs
1004
+ - sig/courier/models/aws_sns.rbs
1001
1005
  - sig/courier/models/base_check.rbs
1002
1006
  - sig/courier/models/base_template_tenant_association.rbs
1003
1007
  - sig/courier/models/brand.rbs
@@ -1176,7 +1180,6 @@ files:
1176
1180
  - sig/courier/models/notification_content_mutation_response.rbs
1177
1181
  - sig/courier/models/notification_content_put_request.rbs
1178
1182
  - sig/courier/models/notification_create_params.rbs
1179
- - sig/courier/models/notification_duplicate_params.rbs
1180
1183
  - sig/courier/models/notification_element_put_request.rbs
1181
1184
  - sig/courier/models/notification_get_content.rbs
1182
1185
  - sig/courier/models/notification_list_params.rbs
@@ -1,20 +0,0 @@
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
@@ -1,38 +0,0 @@
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
@@ -1,20 +0,0 @@
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