trycourier 4.6.1 → 4.6.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 +11 -0
- data/README.md +9 -9
- data/lib/trycourier/models/audience.rb +33 -9
- data/lib/trycourier/models/audience_filter_config.rb +18 -0
- data/lib/trycourier/models/audience_update_params.rb +27 -5
- data/lib/trycourier/models/elemental_channel_node.rb +3 -3
- data/lib/trycourier/models/filter_config.rb +52 -0
- data/lib/trycourier/models.rb +3 -5
- data/lib/trycourier/resources/audiences.rb +7 -2
- data/lib/trycourier/resources/lists/subscriptions.rb +1 -1
- data/lib/trycourier/resources/notifications/checks.rb +3 -3
- data/lib/trycourier/resources/tenants/preferences/items.rb +1 -1
- data/lib/trycourier/resources/translations.rb +1 -1
- data/lib/trycourier/resources/users/preferences.rb +1 -1
- data/lib/trycourier/resources/users/tenants.rb +1 -1
- data/lib/trycourier/resources/users/tokens.rb +2 -2
- data/lib/trycourier/version.rb +1 -1
- data/lib/trycourier.rb +2 -3
- data/rbi/trycourier/models/audience.rbi +47 -15
- data/rbi/trycourier/models/audience_filter_config.rbi +32 -0
- data/rbi/trycourier/models/audience_update_params.rbi +45 -25
- data/rbi/trycourier/models/elemental_channel_node.rbi +6 -3
- data/rbi/trycourier/models/filter_config.rbi +83 -0
- data/rbi/trycourier/models.rbi +3 -5
- data/rbi/trycourier/resources/audiences.rbi +6 -8
- data/rbi/trycourier/resources/lists/subscriptions.rbi +1 -1
- data/rbi/trycourier/resources/notifications/checks.rbi +3 -3
- data/rbi/trycourier/resources/tenants/preferences/items.rbi +1 -1
- data/rbi/trycourier/resources/translations.rbi +1 -1
- data/rbi/trycourier/resources/users/preferences.rbi +1 -1
- data/rbi/trycourier/resources/users/tenants.rbi +1 -1
- data/rbi/trycourier/resources/users/tokens.rbi +2 -2
- data/sig/trycourier/models/audience.rbs +28 -8
- data/sig/trycourier/models/audience_filter_config.rbs +13 -0
- data/sig/trycourier/models/audience_update_params.rbs +21 -5
- data/sig/trycourier/models/elemental_channel_node.rbs +2 -2
- data/sig/trycourier/models/filter_config.rbs +43 -0
- data/sig/trycourier/models.rbs +3 -5
- data/sig/trycourier/resources/audiences.rbs +2 -1
- metadata +8 -11
- data/lib/trycourier/models/filter.rb +0 -19
- data/lib/trycourier/models/nested_filter_config.rb +0 -49
- data/lib/trycourier/models/single_filter_config.rb +0 -62
- data/rbi/trycourier/models/filter.rbi +0 -19
- data/rbi/trycourier/models/nested_filter_config.rbi +0 -104
- data/rbi/trycourier/models/single_filter_config.rbi +0 -116
- data/sig/trycourier/models/filter.rbs +0 -12
- data/sig/trycourier/models/nested_filter_config.rbs +0 -64
- data/sig/trycourier/models/single_filter_config.rbs +0 -69
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 82a9cb0004cc6bd52214be2bc92b97153f53d977b937772918c91660b54f1d5f
|
|
4
|
+
data.tar.gz: 940f7dc194b43cbdfc9dfb2158fb60b70d8c564d46fc58f1612c690290e1d5fa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f330eb40986182ede83b0db8aeaef64b9110b3ccb404f6f74199c6232f5a34967b0fbbc03d547799cc3889d97c8b704c17d422cfb89a9ee914073574c6f81320
|
|
7
|
+
data.tar.gz: b19a2b928aa6801882e2d7d4a26e3c0369d9824296fe170385308941fb712a35eeb11d022d880e7a45f05aa534d763711096a7bb13d4c16568d5d601c4781dd2
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.6.2 (2026-01-14)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v4.6.1...v4.6.2](https://github.com/trycourier/courier-ruby/compare/v4.6.1...v4.6.2)
|
|
6
|
+
|
|
7
|
+
### Chores
|
|
8
|
+
|
|
9
|
+
* fix typo in descriptions ([620d8d1](https://github.com/trycourier/courier-ruby/commit/620d8d14300bc3ca8a7c53ba0e6475d251773f98))
|
|
10
|
+
* **internal:** regenerate SDK with no functional changes ([258dc3c](https://github.com/trycourier/courier-ruby/commit/258dc3c812e714cb593afbbba68c4f64be184741))
|
|
11
|
+
* **internal:** regenerate SDK with no functional changes ([87e9439](https://github.com/trycourier/courier-ruby/commit/87e943981b53c04bb806af69a3a5293c4ffa5f5b))
|
|
12
|
+
* remove custom code ([7ada104](https://github.com/trycourier/courier-ruby/commit/7ada104121a203cfcc3bbc0d05bd818bfbbcf834))
|
|
13
|
+
|
|
3
14
|
## 4.6.1 (2026-01-12)
|
|
4
15
|
|
|
5
16
|
Full Changelog: [v4.6.0...v4.6.1](https://github.com/trycourier/courier-ruby/compare/v4.6.0...v4.6.1)
|
data/README.md
CHANGED
|
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
|
17
17
|
<!-- x-release-please-start-version -->
|
|
18
18
|
|
|
19
19
|
```ruby
|
|
20
|
-
gem "trycourier", "~> 4.6.
|
|
20
|
+
gem "trycourier", "~> 4.6.2"
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
<!-- x-release-please-end -->
|
|
@@ -221,25 +221,25 @@ courier.send_.message(**params)
|
|
|
221
221
|
Since this library does not depend on `sorbet-runtime`, it cannot provide [`T::Enum`](https://sorbet.org/docs/tenum) instances. Instead, we provide "tagged symbols" instead, which is always a primitive at runtime:
|
|
222
222
|
|
|
223
223
|
```ruby
|
|
224
|
-
# :
|
|
225
|
-
puts(Trycourier::
|
|
224
|
+
# :AND
|
|
225
|
+
puts(Trycourier::AudienceUpdateParams::Operator::AND)
|
|
226
226
|
|
|
227
|
-
# Revealed type: `T.all(Trycourier::
|
|
228
|
-
T.reveal_type(Trycourier::
|
|
227
|
+
# Revealed type: `T.all(Trycourier::AudienceUpdateParams::Operator, Symbol)`
|
|
228
|
+
T.reveal_type(Trycourier::AudienceUpdateParams::Operator::AND)
|
|
229
229
|
```
|
|
230
230
|
|
|
231
231
|
Enum parameters have a "relaxed" type, so you can either pass in enum constants or their literal value:
|
|
232
232
|
|
|
233
233
|
```ruby
|
|
234
234
|
# Using the enum constants preserves the tagged type information:
|
|
235
|
-
courier.
|
|
236
|
-
|
|
235
|
+
courier.audiences.update(
|
|
236
|
+
operator: Trycourier::AudienceUpdateParams::Operator::AND,
|
|
237
237
|
# …
|
|
238
238
|
)
|
|
239
239
|
|
|
240
240
|
# Literal values are also permissible:
|
|
241
|
-
courier.
|
|
242
|
-
|
|
241
|
+
courier.audiences.update(
|
|
242
|
+
operator: :AND,
|
|
243
243
|
# …
|
|
244
244
|
)
|
|
245
245
|
```
|
|
@@ -21,12 +21,6 @@ module Trycourier
|
|
|
21
21
|
# @return [String]
|
|
22
22
|
required :description, String
|
|
23
23
|
|
|
24
|
-
# @!attribute filter
|
|
25
|
-
# A single filter to use for filtering
|
|
26
|
-
#
|
|
27
|
-
# @return [Trycourier::Models::SingleFilterConfig, Trycourier::Models::NestedFilterConfig]
|
|
28
|
-
required :filter, union: -> { Trycourier::Filter }
|
|
29
|
-
|
|
30
24
|
# @!attribute name
|
|
31
25
|
# The name of the audience
|
|
32
26
|
#
|
|
@@ -38,18 +32,48 @@ module Trycourier
|
|
|
38
32
|
# @return [String]
|
|
39
33
|
required :updated_at, String
|
|
40
34
|
|
|
41
|
-
# @!
|
|
35
|
+
# @!attribute filter
|
|
36
|
+
# Filter configuration for audience membership containing an array of filter rules
|
|
37
|
+
#
|
|
38
|
+
# @return [Trycourier::Models::AudienceFilterConfig, nil]
|
|
39
|
+
optional :filter, -> { Trycourier::AudienceFilterConfig }, nil?: true
|
|
40
|
+
|
|
41
|
+
# @!attribute operator
|
|
42
|
+
# The logical operator (AND/OR) for the top-level filter
|
|
43
|
+
#
|
|
44
|
+
# @return [Symbol, Trycourier::Models::Audience::Operator, nil]
|
|
45
|
+
optional :operator, enum: -> { Trycourier::Audience::Operator }
|
|
46
|
+
|
|
47
|
+
# @!method initialize(id:, created_at:, description:, name:, updated_at:, filter: nil, operator: nil)
|
|
48
|
+
# Some parameter documentations has been truncated, see
|
|
49
|
+
# {Trycourier::Models::Audience} for more details.
|
|
50
|
+
#
|
|
42
51
|
# @param id [String] A unique identifier representing the audience_id
|
|
43
52
|
#
|
|
44
53
|
# @param created_at [String]
|
|
45
54
|
#
|
|
46
55
|
# @param description [String] A description of the audience
|
|
47
56
|
#
|
|
48
|
-
# @param filter [Trycourier::Models::SingleFilterConfig, Trycourier::Models::NestedFilterConfig] A single filter to use for filtering
|
|
49
|
-
#
|
|
50
57
|
# @param name [String] The name of the audience
|
|
51
58
|
#
|
|
52
59
|
# @param updated_at [String]
|
|
60
|
+
#
|
|
61
|
+
# @param filter [Trycourier::Models::AudienceFilterConfig, nil] Filter configuration for audience membership containing an array of filter rules
|
|
62
|
+
#
|
|
63
|
+
# @param operator [Symbol, Trycourier::Models::Audience::Operator] The logical operator (AND/OR) for the top-level filter
|
|
64
|
+
|
|
65
|
+
# The logical operator (AND/OR) for the top-level filter
|
|
66
|
+
#
|
|
67
|
+
# @see Trycourier::Models::Audience#operator
|
|
68
|
+
module Operator
|
|
69
|
+
extend Trycourier::Internal::Type::Enum
|
|
70
|
+
|
|
71
|
+
AND = :AND
|
|
72
|
+
OR = :OR
|
|
73
|
+
|
|
74
|
+
# @!method self.values
|
|
75
|
+
# @return [Array<Symbol>]
|
|
76
|
+
end
|
|
53
77
|
end
|
|
54
78
|
end
|
|
55
79
|
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Trycourier
|
|
4
|
+
module Models
|
|
5
|
+
class AudienceFilterConfig < Trycourier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute filters
|
|
7
|
+
# Array of filter rules (single conditions or nested groups)
|
|
8
|
+
#
|
|
9
|
+
# @return [Array<Trycourier::Models::FilterConfig>]
|
|
10
|
+
required :filters, -> { Trycourier::Internal::Type::ArrayOf[Trycourier::FilterConfig] }
|
|
11
|
+
|
|
12
|
+
# @!method initialize(filters:)
|
|
13
|
+
# Filter configuration for audience membership containing an array of filter rules
|
|
14
|
+
#
|
|
15
|
+
# @param filters [Array<Trycourier::Models::FilterConfig>] Array of filter rules (single conditions or nested groups)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -14,10 +14,10 @@ module Trycourier
|
|
|
14
14
|
optional :description, String, nil?: true
|
|
15
15
|
|
|
16
16
|
# @!attribute filter
|
|
17
|
-
#
|
|
17
|
+
# Filter configuration for audience membership containing an array of filter rules
|
|
18
18
|
#
|
|
19
|
-
# @return [Trycourier::Models::
|
|
20
|
-
optional :filter,
|
|
19
|
+
# @return [Trycourier::Models::AudienceFilterConfig, nil]
|
|
20
|
+
optional :filter, -> { Trycourier::AudienceFilterConfig }, nil?: true
|
|
21
21
|
|
|
22
22
|
# @!attribute name
|
|
23
23
|
# The name of the audience
|
|
@@ -25,14 +25,36 @@ module Trycourier
|
|
|
25
25
|
# @return [String, nil]
|
|
26
26
|
optional :name, String, nil?: true
|
|
27
27
|
|
|
28
|
-
# @!
|
|
28
|
+
# @!attribute operator
|
|
29
|
+
# The logical operator (AND/OR) for the top-level filter
|
|
30
|
+
#
|
|
31
|
+
# @return [Symbol, Trycourier::Models::AudienceUpdateParams::Operator, nil]
|
|
32
|
+
optional :operator, enum: -> { Trycourier::AudienceUpdateParams::Operator }, nil?: true
|
|
33
|
+
|
|
34
|
+
# @!method initialize(description: nil, filter: nil, name: nil, operator: nil, request_options: {})
|
|
35
|
+
# Some parameter documentations has been truncated, see
|
|
36
|
+
# {Trycourier::Models::AudienceUpdateParams} for more details.
|
|
37
|
+
#
|
|
29
38
|
# @param description [String, nil] A description of the audience
|
|
30
39
|
#
|
|
31
|
-
# @param filter [Trycourier::Models::
|
|
40
|
+
# @param filter [Trycourier::Models::AudienceFilterConfig, nil] Filter configuration for audience membership containing an array of filter rules
|
|
32
41
|
#
|
|
33
42
|
# @param name [String, nil] The name of the audience
|
|
34
43
|
#
|
|
44
|
+
# @param operator [Symbol, Trycourier::Models::AudienceUpdateParams::Operator, nil] The logical operator (AND/OR) for the top-level filter
|
|
45
|
+
#
|
|
35
46
|
# @param request_options [Trycourier::RequestOptions, Hash{Symbol=>Object}]
|
|
47
|
+
|
|
48
|
+
# The logical operator (AND/OR) for the top-level filter
|
|
49
|
+
module Operator
|
|
50
|
+
extend Trycourier::Internal::Type::Enum
|
|
51
|
+
|
|
52
|
+
AND = :AND
|
|
53
|
+
OR = :OR
|
|
54
|
+
|
|
55
|
+
# @!method self.values
|
|
56
|
+
# @return [Array<Symbol>]
|
|
57
|
+
end
|
|
36
58
|
end
|
|
37
59
|
end
|
|
38
60
|
end
|
|
@@ -7,8 +7,8 @@ module Trycourier
|
|
|
7
7
|
# The channel the contents of this element should be applied to. Can be `email`,
|
|
8
8
|
# `push`, `direct_message`, `sms` or a provider such as slack
|
|
9
9
|
#
|
|
10
|
-
# @return [String]
|
|
11
|
-
|
|
10
|
+
# @return [String, nil]
|
|
11
|
+
optional :channel, String
|
|
12
12
|
|
|
13
13
|
# @!attribute raw
|
|
14
14
|
# Raw data to apply to the channel. If `elements` has not been specified, `raw` is
|
|
@@ -17,7 +17,7 @@ module Trycourier
|
|
|
17
17
|
# @return [Hash{Symbol=>Object}, nil]
|
|
18
18
|
optional :raw, Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::Unknown], nil?: true
|
|
19
19
|
|
|
20
|
-
# @!method initialize(channel
|
|
20
|
+
# @!method initialize(channel: nil, raw: nil)
|
|
21
21
|
# Some parameter documentations has been truncated, see
|
|
22
22
|
# {Trycourier::Models::ElementalChannelNode} for more details.
|
|
23
23
|
#
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Trycourier
|
|
4
|
+
module Models
|
|
5
|
+
class FilterConfig < Trycourier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute operator
|
|
7
|
+
# The operator for this filter. Use comparison operators (EQ, GT, LT, GTE, LTE,
|
|
8
|
+
# NEQ, EXISTS, INCLUDES, STARTS_WITH, ENDS_WITH, IS_BEFORE, IS_AFTER, OMIT) for
|
|
9
|
+
# single conditions, or logical operators (AND, OR) for nested filter groups.
|
|
10
|
+
#
|
|
11
|
+
# @return [String]
|
|
12
|
+
required :operator, String
|
|
13
|
+
|
|
14
|
+
# @!attribute filters
|
|
15
|
+
# Nested filter rules to combine with AND/OR. Required for nested filter groups,
|
|
16
|
+
# not used for single filter conditions.
|
|
17
|
+
#
|
|
18
|
+
# @return [Array<Trycourier::Models::FilterConfig>, nil]
|
|
19
|
+
optional :filters, -> { Trycourier::Internal::Type::ArrayOf[Trycourier::FilterConfig] }
|
|
20
|
+
|
|
21
|
+
# @!attribute path
|
|
22
|
+
# The attribute path from the user profile to filter on. Required for single
|
|
23
|
+
# filter conditions, not used for nested filter groups.
|
|
24
|
+
#
|
|
25
|
+
# @return [String, nil]
|
|
26
|
+
optional :path, String
|
|
27
|
+
|
|
28
|
+
# @!attribute value
|
|
29
|
+
# The value to compare against. Required for single filter conditions, not used
|
|
30
|
+
# for nested filter groups.
|
|
31
|
+
#
|
|
32
|
+
# @return [String, nil]
|
|
33
|
+
optional :value, String
|
|
34
|
+
|
|
35
|
+
# @!method initialize(operator:, filters: nil, path: nil, value: nil)
|
|
36
|
+
# Some parameter documentations has been truncated, see
|
|
37
|
+
# {Trycourier::Models::FilterConfig} for more details.
|
|
38
|
+
#
|
|
39
|
+
# A filter rule that can be either a single condition (with path/value) or a
|
|
40
|
+
# nested group (with filters array). Use comparison operators (EQ, GT, etc.) for
|
|
41
|
+
# single conditions, and logical operators (AND, OR) for nested groups.
|
|
42
|
+
#
|
|
43
|
+
# @param operator [String] The operator for this filter. Use comparison operators (EQ, GT, LT, GTE, LTE, N
|
|
44
|
+
#
|
|
45
|
+
# @param filters [Array<Trycourier::Models::FilterConfig>] Nested filter rules to combine with AND/OR. Required for nested filter groups, n
|
|
46
|
+
#
|
|
47
|
+
# @param path [String] The attribute path from the user profile to filter on. Required for single filt
|
|
48
|
+
#
|
|
49
|
+
# @param value [String] The value to compare against. Required for single filter conditions, not used f
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
data/lib/trycourier/models.rb
CHANGED
|
@@ -51,6 +51,8 @@ module Trycourier
|
|
|
51
51
|
|
|
52
52
|
AudienceFilter = Trycourier::Models::AudienceFilter
|
|
53
53
|
|
|
54
|
+
AudienceFilterConfig = Trycourier::Models::AudienceFilterConfig
|
|
55
|
+
|
|
54
56
|
AudienceListMembersParams = Trycourier::Models::AudienceListMembersParams
|
|
55
57
|
|
|
56
58
|
AudienceListParams = Trycourier::Models::AudienceListParams
|
|
@@ -163,7 +165,7 @@ module Trycourier
|
|
|
163
165
|
|
|
164
166
|
Expo = Trycourier::Models::Expo
|
|
165
167
|
|
|
166
|
-
|
|
168
|
+
FilterConfig = Trycourier::Models::FilterConfig
|
|
167
169
|
|
|
168
170
|
Icons = Trycourier::Models::Icons
|
|
169
171
|
|
|
@@ -223,8 +225,6 @@ module Trycourier
|
|
|
223
225
|
|
|
224
226
|
MultipleTokens = Trycourier::Models::MultipleTokens
|
|
225
227
|
|
|
226
|
-
NestedFilterConfig = Trycourier::Models::NestedFilterConfig
|
|
227
|
-
|
|
228
228
|
NotificationGetContent = Trycourier::Models::NotificationGetContent
|
|
229
229
|
|
|
230
230
|
NotificationListParams = Trycourier::Models::NotificationListParams
|
|
@@ -287,8 +287,6 @@ module Trycourier
|
|
|
287
287
|
|
|
288
288
|
SendToSlackUserID = Trycourier::Models::SendToSlackUserID
|
|
289
289
|
|
|
290
|
-
SingleFilterConfig = Trycourier::Models::SingleFilterConfig
|
|
291
|
-
|
|
292
290
|
Slack = Trycourier::Models::Slack
|
|
293
291
|
|
|
294
292
|
SlackBaseProperties = Trycourier::Models::SlackBaseProperties
|
|
@@ -23,18 +23,23 @@ module Trycourier
|
|
|
23
23
|
)
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
+
# Some parameter documentations has been truncated, see
|
|
27
|
+
# {Trycourier::Models::AudienceUpdateParams} for more details.
|
|
28
|
+
#
|
|
26
29
|
# Creates or updates audience.
|
|
27
30
|
#
|
|
28
|
-
# @overload update(audience_id, description: nil, filter: nil, name: nil, request_options: {})
|
|
31
|
+
# @overload update(audience_id, description: nil, filter: nil, name: nil, operator: nil, request_options: {})
|
|
29
32
|
#
|
|
30
33
|
# @param audience_id [String] A unique identifier representing the audience id
|
|
31
34
|
#
|
|
32
35
|
# @param description [String, nil] A description of the audience
|
|
33
36
|
#
|
|
34
|
-
# @param filter [Trycourier::Models::
|
|
37
|
+
# @param filter [Trycourier::Models::AudienceFilterConfig, nil] Filter configuration for audience membership containing an array of filter rules
|
|
35
38
|
#
|
|
36
39
|
# @param name [String, nil] The name of the audience
|
|
37
40
|
#
|
|
41
|
+
# @param operator [Symbol, Trycourier::Models::AudienceUpdateParams::Operator, nil] The logical operator (AND/OR) for the top-level filter
|
|
42
|
+
#
|
|
38
43
|
# @param request_options [Trycourier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
39
44
|
#
|
|
40
45
|
# @return [Trycourier::Models::AudienceUpdateResponse]
|
|
@@ -90,7 +90,7 @@ module Trycourier
|
|
|
90
90
|
#
|
|
91
91
|
# @param list_id [String] Path param: A unique identifier representing the list you wish to retrieve.
|
|
92
92
|
#
|
|
93
|
-
# @param preferences [Trycourier::Models::RecipientPreferences, nil] Body param
|
|
93
|
+
# @param preferences [Trycourier::Models::RecipientPreferences, nil] Body param
|
|
94
94
|
#
|
|
95
95
|
# @param request_options [Trycourier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
96
96
|
#
|
|
@@ -6,11 +6,11 @@ module Trycourier
|
|
|
6
6
|
class Checks
|
|
7
7
|
# @overload update(submission_id, id:, checks:, request_options: {})
|
|
8
8
|
#
|
|
9
|
-
# @param submission_id [String] Path param
|
|
9
|
+
# @param submission_id [String] Path param
|
|
10
10
|
#
|
|
11
|
-
# @param id [String] Path param
|
|
11
|
+
# @param id [String] Path param
|
|
12
12
|
#
|
|
13
|
-
# @param checks [Array<Trycourier::Models::BaseCheck>] Body param
|
|
13
|
+
# @param checks [Array<Trycourier::Models::BaseCheck>] Body param
|
|
14
14
|
#
|
|
15
15
|
# @param request_options [Trycourier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
16
16
|
#
|
|
@@ -16,7 +16,7 @@ module Trycourier
|
|
|
16
16
|
#
|
|
17
17
|
# @param tenant_id [String] Path param: Id of the tenant to update the default preferences for.
|
|
18
18
|
#
|
|
19
|
-
# @param status [Symbol, Trycourier::Models::SubscriptionTopicNew::Status] Body param
|
|
19
|
+
# @param status [Symbol, Trycourier::Models::SubscriptionTopicNew::Status] Body param
|
|
20
20
|
#
|
|
21
21
|
# @param custom_routing [Array<Symbol, Trycourier::Models::ChannelClassification>, nil] Body param: The default channels to send to this tenant when has_custom_routing
|
|
22
22
|
#
|
|
@@ -44,7 +44,7 @@ module Trycourier
|
|
|
44
44
|
#
|
|
45
45
|
# @param domain [String] Path param: The domain you want to retrieve translations for. Only `default` is
|
|
46
46
|
#
|
|
47
|
-
# @param body [String] Body param
|
|
47
|
+
# @param body [String] Body param
|
|
48
48
|
#
|
|
49
49
|
# @param request_options [Trycourier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
50
50
|
#
|
|
@@ -76,7 +76,7 @@ module Trycourier
|
|
|
76
76
|
#
|
|
77
77
|
# @param user_id [String] Path param: A unique identifier associated with the user whose preferences you w
|
|
78
78
|
#
|
|
79
|
-
# @param topic [Trycourier::Models::Users::PreferenceUpdateOrCreateTopicParams::Topic] Body param
|
|
79
|
+
# @param topic [Trycourier::Models::Users::PreferenceUpdateOrCreateTopicParams::Topic] Body param
|
|
80
80
|
#
|
|
81
81
|
# @param tenant_id [String, nil] Query param: Update the preferences of a user for this specific tenant context.
|
|
82
82
|
#
|
|
@@ -70,7 +70,7 @@ module Trycourier
|
|
|
70
70
|
#
|
|
71
71
|
# @param user_id [String] Path param: Id of the user to be added to the supplied tenant.
|
|
72
72
|
#
|
|
73
|
-
# @param profile [Hash{Symbol=>Object}, nil] Body param
|
|
73
|
+
# @param profile [Hash{Symbol=>Object}, nil] Body param
|
|
74
74
|
#
|
|
75
75
|
# @param request_options [Trycourier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
76
76
|
#
|
|
@@ -39,7 +39,7 @@ module Trycourier
|
|
|
39
39
|
#
|
|
40
40
|
# @param user_id [String] Path param: The user's ID. This can be any uniquely identifiable string.
|
|
41
41
|
#
|
|
42
|
-
# @param patch [Array<Trycourier::Models::Users::TokenUpdateParams::Patch>] Body param
|
|
42
|
+
# @param patch [Array<Trycourier::Models::Users::TokenUpdateParams::Patch>] Body param
|
|
43
43
|
#
|
|
44
44
|
# @param request_options [Trycourier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
45
45
|
#
|
|
@@ -141,7 +141,7 @@ module Trycourier
|
|
|
141
141
|
#
|
|
142
142
|
# @param body_token [String] Body param: Full body of the token. Must match token in URL path parameter.
|
|
143
143
|
#
|
|
144
|
-
# @param provider_key [Symbol, Trycourier::Models::Users::UserToken::ProviderKey] Body param
|
|
144
|
+
# @param provider_key [Symbol, Trycourier::Models::Users::UserToken::ProviderKey] Body param
|
|
145
145
|
#
|
|
146
146
|
# @param device [Trycourier::Models::Users::UserToken::Device, nil] Body param: Information about the device the token came from.
|
|
147
147
|
#
|
data/lib/trycourier/version.rb
CHANGED
data/lib/trycourier.rb
CHANGED
|
@@ -67,6 +67,7 @@ require_relative "trycourier/models/alignment"
|
|
|
67
67
|
require_relative "trycourier/models/audience"
|
|
68
68
|
require_relative "trycourier/models/audience_delete_params"
|
|
69
69
|
require_relative "trycourier/models/audience_filter"
|
|
70
|
+
require_relative "trycourier/models/audience_filter_config"
|
|
70
71
|
require_relative "trycourier/models/audience_list_members_params"
|
|
71
72
|
require_relative "trycourier/models/audience_list_members_response"
|
|
72
73
|
require_relative "trycourier/models/audience_list_params"
|
|
@@ -128,7 +129,7 @@ require_relative "trycourier/models/email_footer"
|
|
|
128
129
|
require_relative "trycourier/models/email_head"
|
|
129
130
|
require_relative "trycourier/models/email_header"
|
|
130
131
|
require_relative "trycourier/models/expo"
|
|
131
|
-
require_relative "trycourier/models/
|
|
132
|
+
require_relative "trycourier/models/filter_config"
|
|
132
133
|
require_relative "trycourier/models/icons"
|
|
133
134
|
require_relative "trycourier/models/inbound_bulk_message"
|
|
134
135
|
require_relative "trycourier/models/inbound_track_event_params"
|
|
@@ -167,7 +168,6 @@ require_relative "trycourier/models/ms_teams"
|
|
|
167
168
|
require_relative "trycourier/models/ms_teams_base_properties"
|
|
168
169
|
require_relative "trycourier/models/ms_teams_recipient"
|
|
169
170
|
require_relative "trycourier/models/multiple_tokens"
|
|
170
|
-
require_relative "trycourier/models/nested_filter_config"
|
|
171
171
|
require_relative "trycourier/models/notification_get_content"
|
|
172
172
|
require_relative "trycourier/models/notification_list_params"
|
|
173
173
|
require_relative "trycourier/models/notification_list_response"
|
|
@@ -214,7 +214,6 @@ require_relative "trycourier/models/send_to_ms_teams_user_id"
|
|
|
214
214
|
require_relative "trycourier/models/send_to_slack_channel"
|
|
215
215
|
require_relative "trycourier/models/send_to_slack_email"
|
|
216
216
|
require_relative "trycourier/models/send_to_slack_user_id"
|
|
217
|
-
require_relative "trycourier/models/single_filter_config"
|
|
218
217
|
require_relative "trycourier/models/slack"
|
|
219
218
|
require_relative "trycourier/models/slack_base_properties"
|
|
220
219
|
require_relative "trycourier/models/slack_recipient"
|
|
@@ -19,10 +19,6 @@ module Trycourier
|
|
|
19
19
|
sig { returns(String) }
|
|
20
20
|
attr_accessor :description
|
|
21
21
|
|
|
22
|
-
# A single filter to use for filtering
|
|
23
|
-
sig { returns(Trycourier::Filter::Variants) }
|
|
24
|
-
attr_accessor :filter
|
|
25
|
-
|
|
26
22
|
# The name of the audience
|
|
27
23
|
sig { returns(String) }
|
|
28
24
|
attr_accessor :name
|
|
@@ -30,18 +26,31 @@ module Trycourier
|
|
|
30
26
|
sig { returns(String) }
|
|
31
27
|
attr_accessor :updated_at
|
|
32
28
|
|
|
29
|
+
# Filter configuration for audience membership containing an array of filter rules
|
|
30
|
+
sig { returns(T.nilable(Trycourier::AudienceFilterConfig)) }
|
|
31
|
+
attr_reader :filter
|
|
32
|
+
|
|
33
|
+
sig do
|
|
34
|
+
params(filter: T.nilable(Trycourier::AudienceFilterConfig::OrHash)).void
|
|
35
|
+
end
|
|
36
|
+
attr_writer :filter
|
|
37
|
+
|
|
38
|
+
# The logical operator (AND/OR) for the top-level filter
|
|
39
|
+
sig { returns(T.nilable(Trycourier::Audience::Operator::TaggedSymbol)) }
|
|
40
|
+
attr_reader :operator
|
|
41
|
+
|
|
42
|
+
sig { params(operator: Trycourier::Audience::Operator::OrSymbol).void }
|
|
43
|
+
attr_writer :operator
|
|
44
|
+
|
|
33
45
|
sig do
|
|
34
46
|
params(
|
|
35
47
|
id: String,
|
|
36
48
|
created_at: String,
|
|
37
49
|
description: String,
|
|
38
|
-
filter:
|
|
39
|
-
T.any(
|
|
40
|
-
Trycourier::SingleFilterConfig::OrHash,
|
|
41
|
-
Trycourier::NestedFilterConfig
|
|
42
|
-
),
|
|
43
50
|
name: String,
|
|
44
|
-
updated_at: String
|
|
51
|
+
updated_at: String,
|
|
52
|
+
filter: T.nilable(Trycourier::AudienceFilterConfig::OrHash),
|
|
53
|
+
operator: Trycourier::Audience::Operator::OrSymbol
|
|
45
54
|
).returns(T.attached_class)
|
|
46
55
|
end
|
|
47
56
|
def self.new(
|
|
@@ -50,11 +59,13 @@ module Trycourier
|
|
|
50
59
|
created_at:,
|
|
51
60
|
# A description of the audience
|
|
52
61
|
description:,
|
|
53
|
-
# A single filter to use for filtering
|
|
54
|
-
filter:,
|
|
55
62
|
# The name of the audience
|
|
56
63
|
name:,
|
|
57
|
-
updated_at
|
|
64
|
+
updated_at:,
|
|
65
|
+
# Filter configuration for audience membership containing an array of filter rules
|
|
66
|
+
filter: nil,
|
|
67
|
+
# The logical operator (AND/OR) for the top-level filter
|
|
68
|
+
operator: nil
|
|
58
69
|
)
|
|
59
70
|
end
|
|
60
71
|
|
|
@@ -64,14 +75,35 @@ module Trycourier
|
|
|
64
75
|
id: String,
|
|
65
76
|
created_at: String,
|
|
66
77
|
description: String,
|
|
67
|
-
filter: Trycourier::Filter::Variants,
|
|
68
78
|
name: String,
|
|
69
|
-
updated_at: String
|
|
79
|
+
updated_at: String,
|
|
80
|
+
filter: T.nilable(Trycourier::AudienceFilterConfig),
|
|
81
|
+
operator: Trycourier::Audience::Operator::TaggedSymbol
|
|
70
82
|
}
|
|
71
83
|
)
|
|
72
84
|
end
|
|
73
85
|
def to_hash
|
|
74
86
|
end
|
|
87
|
+
|
|
88
|
+
# The logical operator (AND/OR) for the top-level filter
|
|
89
|
+
module Operator
|
|
90
|
+
extend Trycourier::Internal::Type::Enum
|
|
91
|
+
|
|
92
|
+
TaggedSymbol =
|
|
93
|
+
T.type_alias { T.all(Symbol, Trycourier::Audience::Operator) }
|
|
94
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
95
|
+
|
|
96
|
+
AND = T.let(:AND, Trycourier::Audience::Operator::TaggedSymbol)
|
|
97
|
+
OR = T.let(:OR, Trycourier::Audience::Operator::TaggedSymbol)
|
|
98
|
+
|
|
99
|
+
sig do
|
|
100
|
+
override.returns(
|
|
101
|
+
T::Array[Trycourier::Audience::Operator::TaggedSymbol]
|
|
102
|
+
)
|
|
103
|
+
end
|
|
104
|
+
def self.values
|
|
105
|
+
end
|
|
106
|
+
end
|
|
75
107
|
end
|
|
76
108
|
end
|
|
77
109
|
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Trycourier
|
|
4
|
+
module Models
|
|
5
|
+
class AudienceFilterConfig < Trycourier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Trycourier::AudienceFilterConfig, Trycourier::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Array of filter rules (single conditions or nested groups)
|
|
12
|
+
sig { returns(T::Array[Trycourier::FilterConfig]) }
|
|
13
|
+
attr_accessor :filters
|
|
14
|
+
|
|
15
|
+
# Filter configuration for audience membership containing an array of filter rules
|
|
16
|
+
sig do
|
|
17
|
+
params(filters: T::Array[Trycourier::FilterConfig::OrHash]).returns(
|
|
18
|
+
T.attached_class
|
|
19
|
+
)
|
|
20
|
+
end
|
|
21
|
+
def self.new(
|
|
22
|
+
# Array of filter rules (single conditions or nested groups)
|
|
23
|
+
filters:
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
sig { override.returns({ filters: T::Array[Trycourier::FilterConfig] }) }
|
|
28
|
+
def to_hash
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|