trycourier 4.6.0 → 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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/README.md +9 -9
  4. data/lib/trycourier/models/audience.rb +33 -9
  5. data/lib/trycourier/models/audience_filter_config.rb +18 -0
  6. data/lib/trycourier/models/audience_update_params.rb +27 -5
  7. data/lib/trycourier/models/elemental_channel_node.rb +3 -3
  8. data/lib/trycourier/models/filter_config.rb +42 -9
  9. data/lib/trycourier/models/inbound_track_event_params.rb +2 -2
  10. data/lib/trycourier/models/subscription_topic_new.rb +1 -1
  11. data/lib/trycourier/models.rb +2 -6
  12. data/lib/trycourier/resources/audiences.rb +7 -2
  13. data/lib/trycourier/resources/inbound.rb +1 -1
  14. data/lib/trycourier/resources/lists/subscriptions.rb +1 -1
  15. data/lib/trycourier/resources/notifications/checks.rb +3 -3
  16. data/lib/trycourier/resources/tenants/preferences/items.rb +3 -3
  17. data/lib/trycourier/resources/translations.rb +1 -1
  18. data/lib/trycourier/resources/users/preferences.rb +1 -1
  19. data/lib/trycourier/resources/users/tenants.rb +1 -1
  20. data/lib/trycourier/resources/users/tokens.rb +2 -2
  21. data/lib/trycourier/version.rb +1 -1
  22. data/lib/trycourier.rb +1 -3
  23. data/rbi/trycourier/models/audience.rbi +47 -15
  24. data/rbi/trycourier/models/audience_filter_config.rbi +32 -0
  25. data/rbi/trycourier/models/audience_update_params.rbi +45 -25
  26. data/rbi/trycourier/models/elemental_channel_node.rbi +6 -3
  27. data/rbi/trycourier/models/filter_config.rbi +72 -8
  28. data/rbi/trycourier/models/inbound_track_event_params.rbi +2 -2
  29. data/rbi/trycourier/models/subscription_topic_new.rbi +2 -2
  30. data/rbi/trycourier/models.rbi +2 -6
  31. data/rbi/trycourier/resources/audiences.rbi +6 -8
  32. data/rbi/trycourier/resources/inbound.rbi +1 -1
  33. data/rbi/trycourier/resources/lists/subscriptions.rbi +1 -1
  34. data/rbi/trycourier/resources/notifications/checks.rbi +3 -3
  35. data/rbi/trycourier/resources/tenants/preferences/items.rbi +4 -4
  36. data/rbi/trycourier/resources/translations.rbi +1 -1
  37. data/rbi/trycourier/resources/users/preferences.rbi +1 -1
  38. data/rbi/trycourier/resources/users/tenants.rbi +1 -1
  39. data/rbi/trycourier/resources/users/tokens.rbi +2 -2
  40. data/sig/trycourier/models/audience.rbs +28 -8
  41. data/sig/trycourier/models/audience_filter_config.rbs +13 -0
  42. data/sig/trycourier/models/audience_update_params.rbs +21 -5
  43. data/sig/trycourier/models/elemental_channel_node.rbs +2 -2
  44. data/sig/trycourier/models/filter_config.rbs +35 -4
  45. data/sig/trycourier/models.rbs +3 -7
  46. data/sig/trycourier/resources/audiences.rbs +2 -1
  47. metadata +19 -11
  48. data/lib/trycourier/models/filter.rb +0 -19
  49. data/lib/trycourier/models/nested_filter_config.rb +0 -49
  50. data/lib/trycourier/models/single_filter_config.rb +0 -62
  51. data/rbi/trycourier/models/filter.rbi +0 -19
  52. data/rbi/trycourier/models/nested_filter_config.rbi +0 -104
  53. data/rbi/trycourier/models/single_filter_config.rbi +0 -116
  54. data/sig/trycourier/models/filter.rbs +0 -12
  55. data/sig/trycourier/models/nested_filter_config.rbs +0 -64
  56. data/sig/trycourier/models/single_filter_config.rbs +0 -69
@@ -1,12 +1,43 @@
1
1
  module Trycourier
2
2
  module Models
3
3
  type filter_config =
4
- Trycourier::SingleFilterConfig | Trycourier::NestedFilterConfig
4
+ {
5
+ operator: String,
6
+ filters: ::Array[Trycourier::FilterConfig],
7
+ path: String,
8
+ value: String
9
+ }
5
10
 
6
- module FilterConfig
7
- extend Trycourier::Internal::Type::Union
11
+ class FilterConfig < Trycourier::Internal::Type::BaseModel
12
+ attr_accessor operator: String
8
13
 
9
- def self?.variants: -> ::Array[Trycourier::Models::filter_config]
14
+ attr_reader filters: ::Array[Trycourier::FilterConfig]?
15
+
16
+ def filters=: (
17
+ ::Array[Trycourier::FilterConfig]
18
+ ) -> ::Array[Trycourier::FilterConfig]
19
+
20
+ attr_reader path: String?
21
+
22
+ def path=: (String) -> String
23
+
24
+ attr_reader value: String?
25
+
26
+ def value=: (String) -> String
27
+
28
+ def initialize: (
29
+ operator: String,
30
+ ?filters: ::Array[Trycourier::FilterConfig],
31
+ ?path: String,
32
+ ?value: String
33
+ ) -> void
34
+
35
+ def to_hash: -> {
36
+ operator: String,
37
+ filters: ::Array[Trycourier::FilterConfig],
38
+ path: String,
39
+ value: String
40
+ }
10
41
  end
11
42
  end
12
43
  end
@@ -11,6 +11,8 @@ module Trycourier
11
11
 
12
12
  class AudienceFilter = Trycourier::Models::AudienceFilter
13
13
 
14
+ class AudienceFilterConfig = Trycourier::Models::AudienceFilterConfig
15
+
14
16
  class AudienceListMembersParams = Trycourier::Models::AudienceListMembersParams
15
17
 
16
18
  class AudienceListParams = Trycourier::Models::AudienceListParams
@@ -123,9 +125,7 @@ module Trycourier
123
125
 
124
126
  module Expo = Trycourier::Models::Expo
125
127
 
126
- module Filter = Trycourier::Models::Filter
127
-
128
- module FilterConfig = Trycourier::Models::FilterConfig
128
+ class FilterConfig = Trycourier::Models::FilterConfig
129
129
 
130
130
  class Icons = Trycourier::Models::Icons
131
131
 
@@ -185,8 +185,6 @@ module Trycourier
185
185
 
186
186
  class MultipleTokens = Trycourier::Models::MultipleTokens
187
187
 
188
- class NestedFilterConfig = Trycourier::Models::NestedFilterConfig
189
-
190
188
  class NotificationGetContent = Trycourier::Models::NotificationGetContent
191
189
 
192
190
  class NotificationListParams = Trycourier::Models::NotificationListParams
@@ -249,8 +247,6 @@ module Trycourier
249
247
 
250
248
  class SendToSlackUserID = Trycourier::Models::SendToSlackUserID
251
249
 
252
- class SingleFilterConfig = Trycourier::Models::SingleFilterConfig
253
-
254
250
  module Slack = Trycourier::Models::Slack
255
251
 
256
252
  class SlackBaseProperties = Trycourier::Models::SlackBaseProperties
@@ -9,8 +9,9 @@ module Trycourier
9
9
  def update: (
10
10
  String audience_id,
11
11
  ?description: String?,
12
- ?filter: Trycourier::Models::filter?,
12
+ ?filter: Trycourier::AudienceFilterConfig?,
13
13
  ?name: String?,
14
+ ?operator: Trycourier::Models::AudienceUpdateParams::operator?,
14
15
  ?request_options: Trycourier::request_opts
15
16
  ) -> Trycourier::Models::AudienceUpdateResponse
16
17
 
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trycourier
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.6.0
4
+ version: 4.6.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-01-08 00:00:00.000000000 Z
11
+ date: 2026-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: cgi
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: connection_pool
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -61,6 +75,7 @@ files:
61
75
  - lib/trycourier/models/audience.rb
62
76
  - lib/trycourier/models/audience_delete_params.rb
63
77
  - lib/trycourier/models/audience_filter.rb
78
+ - lib/trycourier/models/audience_filter_config.rb
64
79
  - lib/trycourier/models/audience_list_members_params.rb
65
80
  - lib/trycourier/models/audience_list_members_response.rb
66
81
  - lib/trycourier/models/audience_list_params.rb
@@ -127,7 +142,6 @@ files:
127
142
  - lib/trycourier/models/email_head.rb
128
143
  - lib/trycourier/models/email_header.rb
129
144
  - lib/trycourier/models/expo.rb
130
- - lib/trycourier/models/filter.rb
131
145
  - lib/trycourier/models/filter_config.rb
132
146
  - lib/trycourier/models/icons.rb
133
147
  - lib/trycourier/models/inbound_bulk_message.rb
@@ -169,7 +183,6 @@ files:
169
183
  - lib/trycourier/models/ms_teams_base_properties.rb
170
184
  - lib/trycourier/models/ms_teams_recipient.rb
171
185
  - lib/trycourier/models/multiple_tokens.rb
172
- - lib/trycourier/models/nested_filter_config.rb
173
186
  - lib/trycourier/models/notification_get_content.rb
174
187
  - lib/trycourier/models/notification_list_params.rb
175
188
  - lib/trycourier/models/notification_list_response.rb
@@ -216,7 +229,6 @@ files:
216
229
  - lib/trycourier/models/send_to_slack_channel.rb
217
230
  - lib/trycourier/models/send_to_slack_email.rb
218
231
  - lib/trycourier/models/send_to_slack_user_id.rb
219
- - lib/trycourier/models/single_filter_config.rb
220
232
  - lib/trycourier/models/slack.rb
221
233
  - lib/trycourier/models/slack_base_properties.rb
222
234
  - lib/trycourier/models/slack_recipient.rb
@@ -330,6 +342,7 @@ files:
330
342
  - rbi/trycourier/models/audience.rbi
331
343
  - rbi/trycourier/models/audience_delete_params.rbi
332
344
  - rbi/trycourier/models/audience_filter.rbi
345
+ - rbi/trycourier/models/audience_filter_config.rbi
333
346
  - rbi/trycourier/models/audience_list_members_params.rbi
334
347
  - rbi/trycourier/models/audience_list_members_response.rbi
335
348
  - rbi/trycourier/models/audience_list_params.rbi
@@ -396,7 +409,6 @@ files:
396
409
  - rbi/trycourier/models/email_head.rbi
397
410
  - rbi/trycourier/models/email_header.rbi
398
411
  - rbi/trycourier/models/expo.rbi
399
- - rbi/trycourier/models/filter.rbi
400
412
  - rbi/trycourier/models/filter_config.rbi
401
413
  - rbi/trycourier/models/icons.rbi
402
414
  - rbi/trycourier/models/inbound_bulk_message.rbi
@@ -438,7 +450,6 @@ files:
438
450
  - rbi/trycourier/models/ms_teams_base_properties.rbi
439
451
  - rbi/trycourier/models/ms_teams_recipient.rbi
440
452
  - rbi/trycourier/models/multiple_tokens.rbi
441
- - rbi/trycourier/models/nested_filter_config.rbi
442
453
  - rbi/trycourier/models/notification_get_content.rbi
443
454
  - rbi/trycourier/models/notification_list_params.rbi
444
455
  - rbi/trycourier/models/notification_list_response.rbi
@@ -485,7 +496,6 @@ files:
485
496
  - rbi/trycourier/models/send_to_slack_channel.rbi
486
497
  - rbi/trycourier/models/send_to_slack_email.rbi
487
498
  - rbi/trycourier/models/send_to_slack_user_id.rbi
488
- - rbi/trycourier/models/single_filter_config.rbi
489
499
  - rbi/trycourier/models/slack.rbi
490
500
  - rbi/trycourier/models/slack_base_properties.rbi
491
501
  - rbi/trycourier/models/slack_recipient.rbi
@@ -598,6 +608,7 @@ files:
598
608
  - sig/trycourier/models/audience.rbs
599
609
  - sig/trycourier/models/audience_delete_params.rbs
600
610
  - sig/trycourier/models/audience_filter.rbs
611
+ - sig/trycourier/models/audience_filter_config.rbs
601
612
  - sig/trycourier/models/audience_list_members_params.rbs
602
613
  - sig/trycourier/models/audience_list_members_response.rbs
603
614
  - sig/trycourier/models/audience_list_params.rbs
@@ -664,7 +675,6 @@ files:
664
675
  - sig/trycourier/models/email_head.rbs
665
676
  - sig/trycourier/models/email_header.rbs
666
677
  - sig/trycourier/models/expo.rbs
667
- - sig/trycourier/models/filter.rbs
668
678
  - sig/trycourier/models/filter_config.rbs
669
679
  - sig/trycourier/models/icons.rbs
670
680
  - sig/trycourier/models/inbound_bulk_message.rbs
@@ -706,7 +716,6 @@ files:
706
716
  - sig/trycourier/models/ms_teams_base_properties.rbs
707
717
  - sig/trycourier/models/ms_teams_recipient.rbs
708
718
  - sig/trycourier/models/multiple_tokens.rbs
709
- - sig/trycourier/models/nested_filter_config.rbs
710
719
  - sig/trycourier/models/notification_get_content.rbs
711
720
  - sig/trycourier/models/notification_list_params.rbs
712
721
  - sig/trycourier/models/notification_list_response.rbs
@@ -753,7 +762,6 @@ files:
753
762
  - sig/trycourier/models/send_to_slack_channel.rbs
754
763
  - sig/trycourier/models/send_to_slack_email.rbs
755
764
  - sig/trycourier/models/send_to_slack_user_id.rbs
756
- - sig/trycourier/models/single_filter_config.rbs
757
765
  - sig/trycourier/models/slack.rbs
758
766
  - sig/trycourier/models/slack_base_properties.rbs
759
767
  - sig/trycourier/models/slack_recipient.rbs
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Trycourier
4
- module Models
5
- # A single filter to use for filtering
6
- module Filter
7
- extend Trycourier::Internal::Type::Union
8
-
9
- # A single filter to use for filtering
10
- variant -> { Trycourier::SingleFilterConfig }
11
-
12
- # The operator to use for filtering
13
- variant -> { Trycourier::NestedFilterConfig }
14
-
15
- # @!method self.variants
16
- # @return [Array(Trycourier::Models::SingleFilterConfig, Trycourier::Models::NestedFilterConfig)]
17
- end
18
- end
19
- end
@@ -1,49 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Trycourier
4
- module Models
5
- class NestedFilterConfig < Trycourier::Internal::Type::BaseModel
6
- # @!attribute operator
7
- # The operator to use for filtering
8
- #
9
- # @return [Symbol, Trycourier::Models::NestedFilterConfig::Operator]
10
- required :operator, enum: -> { Trycourier::NestedFilterConfig::Operator }
11
-
12
- # @!attribute rules
13
- #
14
- # @return [Array<Trycourier::Models::FilterConfig>]
15
- required :rules, -> { Trycourier::Internal::Type::ArrayOf[union: Trycourier::FilterConfig] }
16
-
17
- # @!method initialize(operator:, rules:)
18
- # @param operator [Symbol, Trycourier::Models::NestedFilterConfig::Operator] The operator to use for filtering
19
- #
20
- # @param rules [Array<Trycourier::Models::FilterConfig>]
21
-
22
- # The operator to use for filtering
23
- #
24
- # @see Trycourier::Models::NestedFilterConfig#operator
25
- module Operator
26
- extend Trycourier::Internal::Type::Enum
27
-
28
- ENDS_WITH = :ENDS_WITH
29
- EQ = :EQ
30
- EXISTS = :EXISTS
31
- GT = :GT
32
- GTE = :GTE
33
- INCLUDES = :INCLUDES
34
- IS_AFTER = :IS_AFTER
35
- IS_BEFORE = :IS_BEFORE
36
- LT = :LT
37
- LTE = :LTE
38
- NEQ = :NEQ
39
- OMIT = :OMIT
40
- STARTS_WITH = :STARTS_WITH
41
- AND = :AND
42
- OR = :OR
43
-
44
- # @!method self.values
45
- # @return [Array<Symbol>]
46
- end
47
- end
48
- end
49
- end
@@ -1,62 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Trycourier
4
- module Models
5
- class SingleFilterConfig < Trycourier::Internal::Type::BaseModel
6
- # @!attribute operator
7
- # The operator to use for filtering
8
- #
9
- # @return [Symbol, Trycourier::Models::SingleFilterConfig::Operator]
10
- required :operator, enum: -> { Trycourier::SingleFilterConfig::Operator }
11
-
12
- # @!attribute path
13
- # The attribe name from profile whose value will be operated against the filter
14
- # value
15
- #
16
- # @return [String]
17
- required :path, String
18
-
19
- # @!attribute value
20
- # The value to use for filtering
21
- #
22
- # @return [String]
23
- required :value, String
24
-
25
- # @!method initialize(operator:, path:, value:)
26
- # Some parameter documentations has been truncated, see
27
- # {Trycourier::Models::SingleFilterConfig} for more details.
28
- #
29
- # @param operator [Symbol, Trycourier::Models::SingleFilterConfig::Operator] The operator to use for filtering
30
- #
31
- # @param path [String] The attribe name from profile whose value will be operated against the filter va
32
- #
33
- # @param value [String] The value to use for filtering
34
-
35
- # The operator to use for filtering
36
- #
37
- # @see Trycourier::Models::SingleFilterConfig#operator
38
- module Operator
39
- extend Trycourier::Internal::Type::Enum
40
-
41
- ENDS_WITH = :ENDS_WITH
42
- EQ = :EQ
43
- EXISTS = :EXISTS
44
- GT = :GT
45
- GTE = :GTE
46
- INCLUDES = :INCLUDES
47
- IS_AFTER = :IS_AFTER
48
- IS_BEFORE = :IS_BEFORE
49
- LT = :LT
50
- LTE = :LTE
51
- NEQ = :NEQ
52
- OMIT = :OMIT
53
- STARTS_WITH = :STARTS_WITH
54
- AND = :AND
55
- OR = :OR
56
-
57
- # @!method self.values
58
- # @return [Array<Symbol>]
59
- end
60
- end
61
- end
62
- end
@@ -1,19 +0,0 @@
1
- # typed: strong
2
-
3
- module Trycourier
4
- module Models
5
- # A single filter to use for filtering
6
- module Filter
7
- extend Trycourier::Internal::Type::Union
8
-
9
- Variants =
10
- T.type_alias do
11
- T.any(Trycourier::SingleFilterConfig, Trycourier::NestedFilterConfig)
12
- end
13
-
14
- sig { override.returns(T::Array[Trycourier::Filter::Variants]) }
15
- def self.variants
16
- end
17
- end
18
- end
19
- end
@@ -1,104 +0,0 @@
1
- # typed: strong
2
-
3
- module Trycourier
4
- module Models
5
- class NestedFilterConfig < Trycourier::Internal::Type::BaseModel
6
- OrHash =
7
- T.type_alias do
8
- T.any(Trycourier::NestedFilterConfig, Trycourier::Internal::AnyHash)
9
- end
10
-
11
- # The operator to use for filtering
12
- sig { returns(Trycourier::NestedFilterConfig::Operator::OrSymbol) }
13
- attr_accessor :operator
14
-
15
- sig { returns(T::Array[Trycourier::FilterConfig]) }
16
- attr_accessor :rules
17
-
18
- sig do
19
- params(
20
- operator: Trycourier::NestedFilterConfig::Operator::OrSymbol,
21
- rules: T::Array[Trycourier::FilterConfig]
22
- ).returns(T.attached_class)
23
- end
24
- def self.new(
25
- # The operator to use for filtering
26
- operator:,
27
- rules:
28
- )
29
- end
30
-
31
- sig do
32
- override.returns(
33
- {
34
- operator: Trycourier::NestedFilterConfig::Operator::OrSymbol,
35
- rules: T::Array[Trycourier::FilterConfig]
36
- }
37
- )
38
- end
39
- def to_hash
40
- end
41
-
42
- # The operator to use for filtering
43
- module Operator
44
- extend Trycourier::Internal::Type::Enum
45
-
46
- TaggedSymbol =
47
- T.type_alias do
48
- T.all(Symbol, Trycourier::NestedFilterConfig::Operator)
49
- end
50
- OrSymbol = T.type_alias { T.any(Symbol, String) }
51
-
52
- ENDS_WITH =
53
- T.let(
54
- :ENDS_WITH,
55
- Trycourier::NestedFilterConfig::Operator::TaggedSymbol
56
- )
57
- EQ = T.let(:EQ, Trycourier::NestedFilterConfig::Operator::TaggedSymbol)
58
- EXISTS =
59
- T.let(:EXISTS, Trycourier::NestedFilterConfig::Operator::TaggedSymbol)
60
- GT = T.let(:GT, Trycourier::NestedFilterConfig::Operator::TaggedSymbol)
61
- GTE =
62
- T.let(:GTE, Trycourier::NestedFilterConfig::Operator::TaggedSymbol)
63
- INCLUDES =
64
- T.let(
65
- :INCLUDES,
66
- Trycourier::NestedFilterConfig::Operator::TaggedSymbol
67
- )
68
- IS_AFTER =
69
- T.let(
70
- :IS_AFTER,
71
- Trycourier::NestedFilterConfig::Operator::TaggedSymbol
72
- )
73
- IS_BEFORE =
74
- T.let(
75
- :IS_BEFORE,
76
- Trycourier::NestedFilterConfig::Operator::TaggedSymbol
77
- )
78
- LT = T.let(:LT, Trycourier::NestedFilterConfig::Operator::TaggedSymbol)
79
- LTE =
80
- T.let(:LTE, Trycourier::NestedFilterConfig::Operator::TaggedSymbol)
81
- NEQ =
82
- T.let(:NEQ, Trycourier::NestedFilterConfig::Operator::TaggedSymbol)
83
- OMIT =
84
- T.let(:OMIT, Trycourier::NestedFilterConfig::Operator::TaggedSymbol)
85
- STARTS_WITH =
86
- T.let(
87
- :STARTS_WITH,
88
- Trycourier::NestedFilterConfig::Operator::TaggedSymbol
89
- )
90
- AND =
91
- T.let(:AND, Trycourier::NestedFilterConfig::Operator::TaggedSymbol)
92
- OR = T.let(:OR, Trycourier::NestedFilterConfig::Operator::TaggedSymbol)
93
-
94
- sig do
95
- override.returns(
96
- T::Array[Trycourier::NestedFilterConfig::Operator::TaggedSymbol]
97
- )
98
- end
99
- def self.values
100
- end
101
- end
102
- end
103
- end
104
- end
@@ -1,116 +0,0 @@
1
- # typed: strong
2
-
3
- module Trycourier
4
- module Models
5
- class SingleFilterConfig < Trycourier::Internal::Type::BaseModel
6
- OrHash =
7
- T.type_alias do
8
- T.any(Trycourier::SingleFilterConfig, Trycourier::Internal::AnyHash)
9
- end
10
-
11
- # The operator to use for filtering
12
- sig { returns(Trycourier::SingleFilterConfig::Operator::OrSymbol) }
13
- attr_accessor :operator
14
-
15
- # The attribe name from profile whose value will be operated against the filter
16
- # value
17
- sig { returns(String) }
18
- attr_accessor :path
19
-
20
- # The value to use for filtering
21
- sig { returns(String) }
22
- attr_accessor :value
23
-
24
- sig do
25
- params(
26
- operator: Trycourier::SingleFilterConfig::Operator::OrSymbol,
27
- path: String,
28
- value: String
29
- ).returns(T.attached_class)
30
- end
31
- def self.new(
32
- # The operator to use for filtering
33
- operator:,
34
- # The attribe name from profile whose value will be operated against the filter
35
- # value
36
- path:,
37
- # The value to use for filtering
38
- value:
39
- )
40
- end
41
-
42
- sig do
43
- override.returns(
44
- {
45
- operator: Trycourier::SingleFilterConfig::Operator::OrSymbol,
46
- path: String,
47
- value: String
48
- }
49
- )
50
- end
51
- def to_hash
52
- end
53
-
54
- # The operator to use for filtering
55
- module Operator
56
- extend Trycourier::Internal::Type::Enum
57
-
58
- TaggedSymbol =
59
- T.type_alias do
60
- T.all(Symbol, Trycourier::SingleFilterConfig::Operator)
61
- end
62
- OrSymbol = T.type_alias { T.any(Symbol, String) }
63
-
64
- ENDS_WITH =
65
- T.let(
66
- :ENDS_WITH,
67
- Trycourier::SingleFilterConfig::Operator::TaggedSymbol
68
- )
69
- EQ = T.let(:EQ, Trycourier::SingleFilterConfig::Operator::TaggedSymbol)
70
- EXISTS =
71
- T.let(:EXISTS, Trycourier::SingleFilterConfig::Operator::TaggedSymbol)
72
- GT = T.let(:GT, Trycourier::SingleFilterConfig::Operator::TaggedSymbol)
73
- GTE =
74
- T.let(:GTE, Trycourier::SingleFilterConfig::Operator::TaggedSymbol)
75
- INCLUDES =
76
- T.let(
77
- :INCLUDES,
78
- Trycourier::SingleFilterConfig::Operator::TaggedSymbol
79
- )
80
- IS_AFTER =
81
- T.let(
82
- :IS_AFTER,
83
- Trycourier::SingleFilterConfig::Operator::TaggedSymbol
84
- )
85
- IS_BEFORE =
86
- T.let(
87
- :IS_BEFORE,
88
- Trycourier::SingleFilterConfig::Operator::TaggedSymbol
89
- )
90
- LT = T.let(:LT, Trycourier::SingleFilterConfig::Operator::TaggedSymbol)
91
- LTE =
92
- T.let(:LTE, Trycourier::SingleFilterConfig::Operator::TaggedSymbol)
93
- NEQ =
94
- T.let(:NEQ, Trycourier::SingleFilterConfig::Operator::TaggedSymbol)
95
- OMIT =
96
- T.let(:OMIT, Trycourier::SingleFilterConfig::Operator::TaggedSymbol)
97
- STARTS_WITH =
98
- T.let(
99
- :STARTS_WITH,
100
- Trycourier::SingleFilterConfig::Operator::TaggedSymbol
101
- )
102
- AND =
103
- T.let(:AND, Trycourier::SingleFilterConfig::Operator::TaggedSymbol)
104
- OR = T.let(:OR, Trycourier::SingleFilterConfig::Operator::TaggedSymbol)
105
-
106
- sig do
107
- override.returns(
108
- T::Array[Trycourier::SingleFilterConfig::Operator::TaggedSymbol]
109
- )
110
- end
111
- def self.values
112
- end
113
- end
114
- end
115
- end
116
- end
@@ -1,12 +0,0 @@
1
- module Trycourier
2
- module Models
3
- type filter =
4
- Trycourier::SingleFilterConfig | Trycourier::NestedFilterConfig
5
-
6
- module Filter
7
- extend Trycourier::Internal::Type::Union
8
-
9
- def self?.variants: -> ::Array[Trycourier::Models::filter]
10
- end
11
- end
12
- end
@@ -1,64 +0,0 @@
1
- module Trycourier
2
- module Models
3
- type nested_filter_config =
4
- {
5
- operator: Trycourier::Models::NestedFilterConfig::operator,
6
- rules: ::Array[Trycourier::Models::filter_config]
7
- }
8
-
9
- class NestedFilterConfig < Trycourier::Internal::Type::BaseModel
10
- attr_accessor operator: Trycourier::Models::NestedFilterConfig::operator
11
-
12
- attr_accessor rules: ::Array[Trycourier::Models::filter_config]
13
-
14
- def initialize: (
15
- operator: Trycourier::Models::NestedFilterConfig::operator,
16
- rules: ::Array[Trycourier::Models::filter_config]
17
- ) -> void
18
-
19
- def to_hash: -> {
20
- operator: Trycourier::Models::NestedFilterConfig::operator,
21
- rules: ::Array[Trycourier::Models::filter_config]
22
- }
23
-
24
- type operator =
25
- :ENDS_WITH
26
- | :EQ
27
- | :EXISTS
28
- | :GT
29
- | :GTE
30
- | :INCLUDES
31
- | :IS_AFTER
32
- | :IS_BEFORE
33
- | :LT
34
- | :LTE
35
- | :NEQ
36
- | :OMIT
37
- | :STARTS_WITH
38
- | :AND
39
- | :OR
40
-
41
- module Operator
42
- extend Trycourier::Internal::Type::Enum
43
-
44
- ENDS_WITH: :ENDS_WITH
45
- EQ: :EQ
46
- EXISTS: :EXISTS
47
- GT: :GT
48
- GTE: :GTE
49
- INCLUDES: :INCLUDES
50
- IS_AFTER: :IS_AFTER
51
- IS_BEFORE: :IS_BEFORE
52
- LT: :LT
53
- LTE: :LTE
54
- NEQ: :NEQ
55
- OMIT: :OMIT
56
- STARTS_WITH: :STARTS_WITH
57
- AND: :AND
58
- OR: :OR
59
-
60
- def self?.values: -> ::Array[Trycourier::Models::NestedFilterConfig::operator]
61
- end
62
- end
63
- end
64
- end