trycourier 4.18.1 → 4.18.2

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: ce3813405deb188367bed5849b23a16ea329a497b654278d0a18b2f992b15bec
4
- data.tar.gz: dd921945bf22141d5505b42420046cd6447a77b033f9866714c8f6fa7692e240
3
+ metadata.gz: 5dfe27ef204a57575754464258c3bfc13c6f51426e0566a008322a0d64a0c648
4
+ data.tar.gz: 69833499b114555c923d2818a4544d2bcc6129f9f5b3773455fb65c85588bb77
5
5
  SHA512:
6
- metadata.gz: 9174a2e66c46289020fe6d1837690667a7fc1918b7035a18f964be0b46b55eb41cee98a5f8befd8c5acae02b07030e47d0c49e6fd50114be096565850981c849
7
- data.tar.gz: 48a7ccea6a0357ae2c452a7f9e727daf41b4675a884eb7c03dc1cf20b18a052bae53b022357f69a1e3841ab4ad38662ccca5b026beea8e5261dd44238f69291e
6
+ metadata.gz: 05d2da79243cb23bef226df3f2c33bbecd6a840bbae09d48d10f2124edd27402aed45d44b0a072c8ad727917ee454745f30a9b743d9e0904ed196d6bdece1ed3
7
+ data.tar.gz: f7b8d7c2b6e49f099db098bfafcb16b17850880ea050f529e1859f6a014f58612146621603faa107f0395d810c4145958b73b268dad2f38be671cd8f7f1a0b55
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.18.2 (2026-07-09)
4
+
5
+ Full Changelog: [v4.18.1...v4.18.2](https://github.com/trycourier/courier-ruby/compare/v4.18.1...v4.18.2)
6
+
7
+ ### Chores
8
+
9
+ * update api-spec with new message resend endpoint ([a785ed4](https://github.com/trycourier/courier-ruby/commit/a785ed495410f21ee51c4a5c5f3a8c87a59578c4))
10
+
3
11
  ## 4.18.1 (2026-07-07)
4
12
 
5
13
  Full Changelog: [v4.18.0...v4.18.1](https://github.com/trycourier/courier-ruby/compare/v4.18.0...v4.18.1)
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ # @see Courier::Resources::Messages#resend
6
+ class MessageResendParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ # @!attribute message_id
11
+ #
12
+ # @return [String]
13
+ required :message_id, String
14
+
15
+ # @!method initialize(message_id:, request_options: {})
16
+ # @param message_id [String]
17
+ # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ # @see Courier::Resources::Messages#resend
6
+ class MessageResendResponse < Courier::Internal::Type::BaseModel
7
+ # @!attribute message_id
8
+ # The new message id for the resent message. It is distinct from the id of the
9
+ # original message that was resent.
10
+ #
11
+ # @return [String]
12
+ required :message_id, String, api_name: :messageId
13
+
14
+ # @!method initialize(message_id:)
15
+ # Some parameter documentations has been truncated, see
16
+ # {Courier::Models::MessageResendResponse} for more details.
17
+ #
18
+ # @param message_id [String] The new message id for the resent message. It is distinct from the id of the ori
19
+ end
20
+ end
21
+ end
@@ -332,6 +332,8 @@ module Courier
332
332
 
333
333
  MessageProvidersType = Courier::Models::MessageProvidersType
334
334
 
335
+ MessageResendParams = Courier::Models::MessageResendParams
336
+
335
337
  MessageRetrieveParams = Courier::Models::MessageRetrieveParams
336
338
 
337
339
  MessageRouting = Courier::Models::MessageRouting
@@ -150,6 +150,33 @@ module Courier
150
150
  )
151
151
  end
152
152
 
153
+ # Some parameter documentations has been truncated, see
154
+ # {Courier::Models::MessageResendParams} for more details.
155
+ #
156
+ # Resend a previously sent message. The original send request is loaded from
157
+ # storage and a brand-new send is enqueued for the same recipient and content,
158
+ # producing a **new** `messageId` — the original message is not modified.
159
+ # Throttled by a per-message rate limit; a repeat inside the limit window returns
160
+ # `429 Too Many Requests`.
161
+ #
162
+ # @overload resend(message_id, request_options: {})
163
+ #
164
+ # @param message_id [String] A unique identifier representing the message ID of the original message to resen
165
+ #
166
+ # @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
167
+ #
168
+ # @return [Courier::Models::MessageResendResponse]
169
+ #
170
+ # @see Courier::Models::MessageResendParams
171
+ def resend(message_id, params = {})
172
+ @client.request(
173
+ method: :post,
174
+ path: ["messages/%1$s/resend", message_id],
175
+ model: Courier::Models::MessageResendResponse,
176
+ options: params[:request_options]
177
+ )
178
+ end
179
+
153
180
  # @api private
154
181
  #
155
182
  # @param client [Courier::Client]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Courier
4
- VERSION = "4.18.1"
4
+ VERSION = "4.18.2"
5
5
  end
data/lib/courier.rb CHANGED
@@ -244,6 +244,8 @@ require_relative "courier/models/message_list_params"
244
244
  require_relative "courier/models/message_list_response"
245
245
  require_relative "courier/models/message_providers"
246
246
  require_relative "courier/models/message_providers_type"
247
+ require_relative "courier/models/message_resend_params"
248
+ require_relative "courier/models/message_resend_response"
247
249
  require_relative "courier/models/message_retrieve_params"
248
250
  require_relative "courier/models/message_retrieve_response"
249
251
  require_relative "courier/models/message_routing"
@@ -0,0 +1,35 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ class MessageResendParams < 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(Courier::MessageResendParams, Courier::Internal::AnyHash)
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :message_id
16
+
17
+ sig do
18
+ params(
19
+ message_id: String,
20
+ request_options: Courier::RequestOptions::OrHash
21
+ ).returns(T.attached_class)
22
+ end
23
+ def self.new(message_id:, request_options: {})
24
+ end
25
+
26
+ sig do
27
+ override.returns(
28
+ { message_id: String, request_options: Courier::RequestOptions }
29
+ )
30
+ end
31
+ def to_hash
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,32 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ class MessageResendResponse < Courier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Courier::Models::MessageResendResponse,
10
+ Courier::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # The new message id for the resent message. It is distinct from the id of the
15
+ # original message that was resent.
16
+ sig { returns(String) }
17
+ attr_accessor :message_id
18
+
19
+ sig { params(message_id: String).returns(T.attached_class) }
20
+ def self.new(
21
+ # The new message id for the resent message. It is distinct from the id of the
22
+ # original message that was resent.
23
+ message_id:
24
+ )
25
+ end
26
+
27
+ sig { override.returns({ message_id: String }) }
28
+ def to_hash
29
+ end
30
+ end
31
+ end
32
+ end
@@ -299,6 +299,8 @@ module Courier
299
299
 
300
300
  MessageProvidersType = Courier::Models::MessageProvidersType
301
301
 
302
+ MessageResendParams = Courier::Models::MessageResendParams
303
+
302
304
  MessageRetrieveParams = Courier::Models::MessageRetrieveParams
303
305
 
304
306
  MessageRouting = Courier::Models::MessageRouting
@@ -130,6 +130,25 @@ module Courier
130
130
  )
131
131
  end
132
132
 
133
+ # Resend a previously sent message. The original send request is loaded from
134
+ # storage and a brand-new send is enqueued for the same recipient and content,
135
+ # producing a **new** `messageId` — the original message is not modified.
136
+ # Throttled by a per-message rate limit; a repeat inside the limit window returns
137
+ # `429 Too Many Requests`.
138
+ sig do
139
+ params(
140
+ message_id: String,
141
+ request_options: Courier::RequestOptions::OrHash
142
+ ).returns(Courier::Models::MessageResendResponse)
143
+ end
144
+ def resend(
145
+ # A unique identifier representing the message ID of the original message to
146
+ # resend.
147
+ message_id,
148
+ request_options: {}
149
+ )
150
+ end
151
+
133
152
  # @api private
134
153
  sig { params(client: Courier::Client).returns(T.attached_class) }
135
154
  def self.new(client:)
@@ -0,0 +1,23 @@
1
+ module Courier
2
+ module Models
3
+ type message_resend_params =
4
+ { message_id: String } & Courier::Internal::Type::request_parameters
5
+
6
+ class MessageResendParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ attr_accessor message_id: String
11
+
12
+ def initialize: (
13
+ message_id: String,
14
+ ?request_options: Courier::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> {
18
+ message_id: String,
19
+ request_options: Courier::RequestOptions
20
+ }
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,13 @@
1
+ module Courier
2
+ module Models
3
+ type message_resend_response = { message_id: String }
4
+
5
+ class MessageResendResponse < Courier::Internal::Type::BaseModel
6
+ attr_accessor message_id: String
7
+
8
+ def initialize: (message_id: String) -> void
9
+
10
+ def to_hash: -> { message_id: String }
11
+ end
12
+ end
13
+ end
@@ -289,6 +289,8 @@ module Courier
289
289
 
290
290
  class MessageProvidersType = Courier::Models::MessageProvidersType
291
291
 
292
+ class MessageResendParams = Courier::Models::MessageResendParams
293
+
292
294
  class MessageRetrieveParams = Courier::Models::MessageRetrieveParams
293
295
 
294
296
  class MessageRouting = Courier::Models::MessageRouting
@@ -40,6 +40,11 @@ module Courier
40
40
  ?request_options: Courier::request_opts
41
41
  ) -> Courier::Models::MessageHistoryResponse
42
42
 
43
+ def resend: (
44
+ String message_id,
45
+ ?request_options: Courier::request_opts
46
+ ) -> Courier::Models::MessageResendResponse
47
+
43
48
  def initialize: (client: Courier::Client) -> void
44
49
  end
45
50
  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.18.1
4
+ version: 4.18.2
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-07 00:00:00.000000000 Z
11
+ date: 2026-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi
@@ -244,6 +244,8 @@ files:
244
244
  - lib/courier/models/message_list_response.rb
245
245
  - lib/courier/models/message_providers.rb
246
246
  - lib/courier/models/message_providers_type.rb
247
+ - lib/courier/models/message_resend_params.rb
248
+ - lib/courier/models/message_resend_response.rb
247
249
  - lib/courier/models/message_retrieve_params.rb
248
250
  - lib/courier/models/message_retrieve_response.rb
249
251
  - lib/courier/models/message_routing.rb
@@ -665,6 +667,8 @@ files:
665
667
  - rbi/courier/models/message_list_response.rbi
666
668
  - rbi/courier/models/message_providers.rbi
667
669
  - rbi/courier/models/message_providers_type.rbi
670
+ - rbi/courier/models/message_resend_params.rbi
671
+ - rbi/courier/models/message_resend_response.rbi
668
672
  - rbi/courier/models/message_retrieve_params.rbi
669
673
  - rbi/courier/models/message_retrieve_response.rbi
670
674
  - rbi/courier/models/message_routing.rbi
@@ -1085,6 +1089,8 @@ files:
1085
1089
  - sig/courier/models/message_list_response.rbs
1086
1090
  - sig/courier/models/message_providers.rbs
1087
1091
  - sig/courier/models/message_providers_type.rbs
1092
+ - sig/courier/models/message_resend_params.rbs
1093
+ - sig/courier/models/message_resend_response.rbs
1088
1094
  - sig/courier/models/message_retrieve_params.rbs
1089
1095
  - sig/courier/models/message_retrieve_response.rbs
1090
1096
  - sig/courier/models/message_routing.rbs