trycourier 4.18.0 → 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 +4 -4
- data/CHANGELOG.md +16 -0
- data/lib/courier/models/audience.rb +5 -3
- data/lib/courier/models/audience_filter_config.rb +29 -1
- data/lib/courier/models/audience_update_params.rb +7 -3
- data/lib/courier/models/message_resend_params.rb +20 -0
- data/lib/courier/models/message_resend_response.rb +21 -0
- data/lib/courier/models.rb +2 -0
- data/lib/courier/resources/audiences.rb +1 -1
- data/lib/courier/resources/messages.rb +27 -0
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +2 -0
- data/rbi/courier/models/audience.rbi +6 -3
- data/rbi/courier/models/audience_filter_config.rbi +54 -5
- data/rbi/courier/models/audience_update_params.rbi +9 -3
- data/rbi/courier/models/message_resend_params.rbi +35 -0
- data/rbi/courier/models/message_resend_response.rbi +32 -0
- data/rbi/courier/models.rbi +2 -0
- data/rbi/courier/resources/audiences.rbi +3 -1
- data/rbi/courier/resources/messages.rbi +19 -0
- data/sig/courier/models/audience_filter_config.rbs +30 -3
- data/sig/courier/models/message_resend_params.rbs +23 -0
- data/sig/courier/models/message_resend_response.rbs +13 -0
- data/sig/courier/models.rbs +2 -0
- data/sig/courier/resources/messages.rbs +5 -0
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5dfe27ef204a57575754464258c3bfc13c6f51426e0566a008322a0d64a0c648
|
|
4
|
+
data.tar.gz: 69833499b114555c923d2818a4544d2bcc6129f9f5b3773455fb65c85588bb77
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 05d2da79243cb23bef226df3f2c33bbecd6a840bbae09d48d10f2124edd27402aed45d44b0a072c8ad727917ee454745f30a9b743d9e0904ed196d6bdece1ed3
|
|
7
|
+
data.tar.gz: f7b8d7c2b6e49f099db098bfafcb16b17850880ea050f529e1859f6a014f58612146621603faa107f0395d810c4145958b73b268dad2f38be671cd8f7f1a0b55
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
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
|
+
|
|
11
|
+
## 4.18.1 (2026-07-07)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v4.18.0...v4.18.1](https://github.com/trycourier/courier-ruby/compare/v4.18.0...v4.18.1)
|
|
14
|
+
|
|
15
|
+
### Documentation
|
|
16
|
+
|
|
17
|
+
* **openapi:** document audiences filter combinator (SUP-686) ([fdf42fe](https://github.com/trycourier/courier-ruby/commit/fdf42fecbd77058dbba53a198942efa509bbc1a1))
|
|
18
|
+
|
|
3
19
|
## 4.18.0 (2026-07-06)
|
|
4
20
|
|
|
5
21
|
Full Changelog: [v4.17.1...v4.18.0](https://github.com/trycourier/courier-ruby/compare/v4.17.1...v4.18.0)
|
|
@@ -39,7 +39,8 @@ module Courier
|
|
|
39
39
|
optional :filter, -> { Courier::AudienceFilterConfig }, nil?: true
|
|
40
40
|
|
|
41
41
|
# @!attribute operator
|
|
42
|
-
# The logical operator (AND/OR)
|
|
42
|
+
# The logical operator (AND/OR) combining the top-level `filter.filters`.
|
|
43
|
+
# Convenience alias for `filter.operator`.
|
|
43
44
|
#
|
|
44
45
|
# @return [Symbol, Courier::Models::Audience::Operator, nil]
|
|
45
46
|
optional :operator, enum: -> { Courier::Audience::Operator }
|
|
@@ -60,9 +61,10 @@ module Courier
|
|
|
60
61
|
#
|
|
61
62
|
# @param filter [Courier::Models::AudienceFilterConfig, nil] Filter configuration for audience membership containing an array of filter rules
|
|
62
63
|
#
|
|
63
|
-
# @param operator [Symbol, Courier::Models::Audience::Operator] The logical operator (AND/OR)
|
|
64
|
+
# @param operator [Symbol, Courier::Models::Audience::Operator] The logical operator (AND/OR) combining the top-level `filter.filters`. Convenie
|
|
64
65
|
|
|
65
|
-
# The logical operator (AND/OR)
|
|
66
|
+
# The logical operator (AND/OR) combining the top-level `filter.filters`.
|
|
67
|
+
# Convenience alias for `filter.operator`.
|
|
66
68
|
#
|
|
67
69
|
# @see Courier::Models::Audience#operator
|
|
68
70
|
module Operator
|
|
@@ -9,10 +9,38 @@ module Courier
|
|
|
9
9
|
# @return [Array<Courier::Models::FilterConfig>]
|
|
10
10
|
required :filters, -> { Courier::Internal::Type::ArrayOf[Courier::FilterConfig] }
|
|
11
11
|
|
|
12
|
-
# @!
|
|
12
|
+
# @!attribute operator
|
|
13
|
+
# The logical operator (AND/OR) combining the rules in `filters`. Required when
|
|
14
|
+
# `filters` contains more than one rule. If omitted, the top-level `operator`
|
|
15
|
+
# field on the request is used instead.
|
|
16
|
+
#
|
|
17
|
+
# @return [Symbol, Courier::Models::AudienceFilterConfig::Operator, nil]
|
|
18
|
+
optional :operator, enum: -> { Courier::AudienceFilterConfig::Operator }
|
|
19
|
+
|
|
20
|
+
# @!method initialize(filters:, operator: nil)
|
|
21
|
+
# Some parameter documentations has been truncated, see
|
|
22
|
+
# {Courier::Models::AudienceFilterConfig} for more details.
|
|
23
|
+
#
|
|
13
24
|
# Filter configuration for audience membership containing an array of filter rules
|
|
14
25
|
#
|
|
15
26
|
# @param filters [Array<Courier::Models::FilterConfig>] Array of filter rules (single conditions or nested groups)
|
|
27
|
+
#
|
|
28
|
+
# @param operator [Symbol, Courier::Models::AudienceFilterConfig::Operator] The logical operator (AND/OR) combining the rules in `filters`. Required when `f
|
|
29
|
+
|
|
30
|
+
# The logical operator (AND/OR) combining the rules in `filters`. Required when
|
|
31
|
+
# `filters` contains more than one rule. If omitted, the top-level `operator`
|
|
32
|
+
# field on the request is used instead.
|
|
33
|
+
#
|
|
34
|
+
# @see Courier::Models::AudienceFilterConfig#operator
|
|
35
|
+
module Operator
|
|
36
|
+
extend Courier::Internal::Type::Enum
|
|
37
|
+
|
|
38
|
+
AND = :AND
|
|
39
|
+
OR = :OR
|
|
40
|
+
|
|
41
|
+
# @!method self.values
|
|
42
|
+
# @return [Array<Symbol>]
|
|
43
|
+
end
|
|
16
44
|
end
|
|
17
45
|
end
|
|
18
46
|
end
|
|
@@ -31,7 +31,9 @@ module Courier
|
|
|
31
31
|
optional :name, String, nil?: true
|
|
32
32
|
|
|
33
33
|
# @!attribute operator
|
|
34
|
-
# The logical operator (AND/OR)
|
|
34
|
+
# The logical operator (AND/OR) combining the top-level `filter.filters`.
|
|
35
|
+
# Convenience alias for `filter.operator`: if set, it is applied to the top-level
|
|
36
|
+
# filter group. Prefer setting `operator` directly inside `filter`.
|
|
35
37
|
#
|
|
36
38
|
# @return [Symbol, Courier::Models::AudienceUpdateParams::Operator, nil]
|
|
37
39
|
optional :operator, enum: -> { Courier::AudienceUpdateParams::Operator }, nil?: true
|
|
@@ -48,11 +50,13 @@ module Courier
|
|
|
48
50
|
#
|
|
49
51
|
# @param name [String, nil] The name of the audience
|
|
50
52
|
#
|
|
51
|
-
# @param operator [Symbol, Courier::Models::AudienceUpdateParams::Operator, nil] The logical operator (AND/OR)
|
|
53
|
+
# @param operator [Symbol, Courier::Models::AudienceUpdateParams::Operator, nil] The logical operator (AND/OR) combining the top-level `filter.filters`. Convenie
|
|
52
54
|
#
|
|
53
55
|
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
54
56
|
|
|
55
|
-
# The logical operator (AND/OR)
|
|
57
|
+
# The logical operator (AND/OR) combining the top-level `filter.filters`.
|
|
58
|
+
# Convenience alias for `filter.operator`: if set, it is applied to the top-level
|
|
59
|
+
# filter group. Prefer setting `operator` directly inside `filter`.
|
|
56
60
|
module Operator
|
|
57
61
|
extend Courier::Internal::Type::Enum
|
|
58
62
|
|
|
@@ -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
|
data/lib/courier/models.rb
CHANGED
|
@@ -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
|
|
@@ -38,7 +38,7 @@ module Courier
|
|
|
38
38
|
#
|
|
39
39
|
# @param name [String, nil] The name of the audience
|
|
40
40
|
#
|
|
41
|
-
# @param operator [Symbol, Courier::Models::AudienceUpdateParams::Operator, nil] The logical operator (AND/OR)
|
|
41
|
+
# @param operator [Symbol, Courier::Models::AudienceUpdateParams::Operator, nil] The logical operator (AND/OR) combining the top-level `filter.filters`. Convenie
|
|
42
42
|
#
|
|
43
43
|
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
44
44
|
#
|
|
@@ -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]
|
data/lib/courier/version.rb
CHANGED
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"
|
|
@@ -33,7 +33,8 @@ module Courier
|
|
|
33
33
|
end
|
|
34
34
|
attr_writer :filter
|
|
35
35
|
|
|
36
|
-
# The logical operator (AND/OR)
|
|
36
|
+
# The logical operator (AND/OR) combining the top-level `filter.filters`.
|
|
37
|
+
# Convenience alias for `filter.operator`.
|
|
37
38
|
sig { returns(T.nilable(Courier::Audience::Operator::TaggedSymbol)) }
|
|
38
39
|
attr_reader :operator
|
|
39
40
|
|
|
@@ -62,7 +63,8 @@ module Courier
|
|
|
62
63
|
updated_at:,
|
|
63
64
|
# Filter configuration for audience membership containing an array of filter rules
|
|
64
65
|
filter: nil,
|
|
65
|
-
# The logical operator (AND/OR)
|
|
66
|
+
# The logical operator (AND/OR) combining the top-level `filter.filters`.
|
|
67
|
+
# Convenience alias for `filter.operator`.
|
|
66
68
|
operator: nil
|
|
67
69
|
)
|
|
68
70
|
end
|
|
@@ -83,7 +85,8 @@ module Courier
|
|
|
83
85
|
def to_hash
|
|
84
86
|
end
|
|
85
87
|
|
|
86
|
-
# The logical operator (AND/OR)
|
|
88
|
+
# The logical operator (AND/OR) combining the top-level `filter.filters`.
|
|
89
|
+
# Convenience alias for `filter.operator`.
|
|
87
90
|
module Operator
|
|
88
91
|
extend Courier::Internal::Type::Enum
|
|
89
92
|
|
|
@@ -12,21 +12,70 @@ module Courier
|
|
|
12
12
|
sig { returns(T::Array[Courier::FilterConfig]) }
|
|
13
13
|
attr_accessor :filters
|
|
14
14
|
|
|
15
|
+
# The logical operator (AND/OR) combining the rules in `filters`. Required when
|
|
16
|
+
# `filters` contains more than one rule. If omitted, the top-level `operator`
|
|
17
|
+
# field on the request is used instead.
|
|
18
|
+
sig do
|
|
19
|
+
returns(T.nilable(Courier::AudienceFilterConfig::Operator::OrSymbol))
|
|
20
|
+
end
|
|
21
|
+
attr_reader :operator
|
|
22
|
+
|
|
23
|
+
sig do
|
|
24
|
+
params(operator: Courier::AudienceFilterConfig::Operator::OrSymbol).void
|
|
25
|
+
end
|
|
26
|
+
attr_writer :operator
|
|
27
|
+
|
|
15
28
|
# Filter configuration for audience membership containing an array of filter rules
|
|
16
29
|
sig do
|
|
17
|
-
params(
|
|
18
|
-
T
|
|
19
|
-
|
|
30
|
+
params(
|
|
31
|
+
filters: T::Array[Courier::FilterConfig::OrHash],
|
|
32
|
+
operator: Courier::AudienceFilterConfig::Operator::OrSymbol
|
|
33
|
+
).returns(T.attached_class)
|
|
20
34
|
end
|
|
21
35
|
def self.new(
|
|
22
36
|
# Array of filter rules (single conditions or nested groups)
|
|
23
|
-
filters
|
|
37
|
+
filters:,
|
|
38
|
+
# The logical operator (AND/OR) combining the rules in `filters`. Required when
|
|
39
|
+
# `filters` contains more than one rule. If omitted, the top-level `operator`
|
|
40
|
+
# field on the request is used instead.
|
|
41
|
+
operator: nil
|
|
24
42
|
)
|
|
25
43
|
end
|
|
26
44
|
|
|
27
|
-
sig
|
|
45
|
+
sig do
|
|
46
|
+
override.returns(
|
|
47
|
+
{
|
|
48
|
+
filters: T::Array[Courier::FilterConfig],
|
|
49
|
+
operator: Courier::AudienceFilterConfig::Operator::OrSymbol
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
end
|
|
28
53
|
def to_hash
|
|
29
54
|
end
|
|
55
|
+
|
|
56
|
+
# The logical operator (AND/OR) combining the rules in `filters`. Required when
|
|
57
|
+
# `filters` contains more than one rule. If omitted, the top-level `operator`
|
|
58
|
+
# field on the request is used instead.
|
|
59
|
+
module Operator
|
|
60
|
+
extend Courier::Internal::Type::Enum
|
|
61
|
+
|
|
62
|
+
TaggedSymbol =
|
|
63
|
+
T.type_alias do
|
|
64
|
+
T.all(Symbol, Courier::AudienceFilterConfig::Operator)
|
|
65
|
+
end
|
|
66
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
67
|
+
|
|
68
|
+
AND = T.let(:AND, Courier::AudienceFilterConfig::Operator::TaggedSymbol)
|
|
69
|
+
OR = T.let(:OR, Courier::AudienceFilterConfig::Operator::TaggedSymbol)
|
|
70
|
+
|
|
71
|
+
sig do
|
|
72
|
+
override.returns(
|
|
73
|
+
T::Array[Courier::AudienceFilterConfig::Operator::TaggedSymbol]
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
def self.values
|
|
77
|
+
end
|
|
78
|
+
end
|
|
30
79
|
end
|
|
31
80
|
end
|
|
32
81
|
end
|
|
@@ -31,7 +31,9 @@ module Courier
|
|
|
31
31
|
sig { returns(T.nilable(String)) }
|
|
32
32
|
attr_accessor :name
|
|
33
33
|
|
|
34
|
-
# The logical operator (AND/OR)
|
|
34
|
+
# The logical operator (AND/OR) combining the top-level `filter.filters`.
|
|
35
|
+
# Convenience alias for `filter.operator`: if set, it is applied to the top-level
|
|
36
|
+
# filter group. Prefer setting `operator` directly inside `filter`.
|
|
35
37
|
sig do
|
|
36
38
|
returns(T.nilable(Courier::AudienceUpdateParams::Operator::OrSymbol))
|
|
37
39
|
end
|
|
@@ -56,7 +58,9 @@ module Courier
|
|
|
56
58
|
filter: nil,
|
|
57
59
|
# The name of the audience
|
|
58
60
|
name: nil,
|
|
59
|
-
# The logical operator (AND/OR)
|
|
61
|
+
# The logical operator (AND/OR) combining the top-level `filter.filters`.
|
|
62
|
+
# Convenience alias for `filter.operator`: if set, it is applied to the top-level
|
|
63
|
+
# filter group. Prefer setting `operator` directly inside `filter`.
|
|
60
64
|
operator: nil,
|
|
61
65
|
request_options: {}
|
|
62
66
|
)
|
|
@@ -78,7 +82,9 @@ module Courier
|
|
|
78
82
|
def to_hash
|
|
79
83
|
end
|
|
80
84
|
|
|
81
|
-
# The logical operator (AND/OR)
|
|
85
|
+
# The logical operator (AND/OR) combining the top-level `filter.filters`.
|
|
86
|
+
# Convenience alias for `filter.operator`: if set, it is applied to the top-level
|
|
87
|
+
# filter group. Prefer setting `operator` directly inside `filter`.
|
|
82
88
|
module Operator
|
|
83
89
|
extend Courier::Internal::Type::Enum
|
|
84
90
|
|
|
@@ -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
|
data/rbi/courier/models.rbi
CHANGED
|
@@ -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
|
|
@@ -38,7 +38,9 @@ module Courier
|
|
|
38
38
|
filter: nil,
|
|
39
39
|
# The name of the audience
|
|
40
40
|
name: nil,
|
|
41
|
-
# The logical operator (AND/OR)
|
|
41
|
+
# The logical operator (AND/OR) combining the top-level `filter.filters`.
|
|
42
|
+
# Convenience alias for `filter.operator`: if set, it is applied to the top-level
|
|
43
|
+
# filter group. Prefer setting `operator` directly inside `filter`.
|
|
42
44
|
operator: nil,
|
|
43
45
|
request_options: {}
|
|
44
46
|
)
|
|
@@ -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:)
|
|
@@ -1,13 +1,40 @@
|
|
|
1
1
|
module Courier
|
|
2
2
|
module Models
|
|
3
|
-
type audience_filter_config =
|
|
3
|
+
type audience_filter_config =
|
|
4
|
+
{
|
|
5
|
+
filters: ::Array[Courier::FilterConfig],
|
|
6
|
+
operator: Courier::Models::AudienceFilterConfig::operator
|
|
7
|
+
}
|
|
4
8
|
|
|
5
9
|
class AudienceFilterConfig < Courier::Internal::Type::BaseModel
|
|
6
10
|
attr_accessor filters: ::Array[Courier::FilterConfig]
|
|
7
11
|
|
|
8
|
-
|
|
12
|
+
attr_reader operator: Courier::Models::AudienceFilterConfig::operator?
|
|
9
13
|
|
|
10
|
-
def
|
|
14
|
+
def operator=: (
|
|
15
|
+
Courier::Models::AudienceFilterConfig::operator
|
|
16
|
+
) -> Courier::Models::AudienceFilterConfig::operator
|
|
17
|
+
|
|
18
|
+
def initialize: (
|
|
19
|
+
filters: ::Array[Courier::FilterConfig],
|
|
20
|
+
?operator: Courier::Models::AudienceFilterConfig::operator
|
|
21
|
+
) -> void
|
|
22
|
+
|
|
23
|
+
def to_hash: -> {
|
|
24
|
+
filters: ::Array[Courier::FilterConfig],
|
|
25
|
+
operator: Courier::Models::AudienceFilterConfig::operator
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
type operator = :AND | :OR
|
|
29
|
+
|
|
30
|
+
module Operator
|
|
31
|
+
extend Courier::Internal::Type::Enum
|
|
32
|
+
|
|
33
|
+
AND: :AND
|
|
34
|
+
OR: :OR
|
|
35
|
+
|
|
36
|
+
def self?.values: -> ::Array[Courier::Models::AudienceFilterConfig::operator]
|
|
37
|
+
end
|
|
11
38
|
end
|
|
12
39
|
end
|
|
13
40
|
end
|
|
@@ -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
|
data/sig/courier/models.rbs
CHANGED
|
@@ -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.
|
|
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-
|
|
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
|