trycourier 4.5.0 → 4.6.1

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 (40) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +9 -9
  4. data/lib/trycourier/models/automation_list_params.rb +47 -0
  5. data/lib/trycourier/models/automation_template.rb +61 -0
  6. data/lib/trycourier/models/automation_template_list_response.rb +24 -0
  7. data/lib/trycourier/models/inbound_track_event_params.rb +2 -2
  8. data/lib/trycourier/models/nested_filter_config.rb +3 -3
  9. data/lib/trycourier/models/single_filter_config.rb +2 -2
  10. data/lib/trycourier/models/subscription_topic_new.rb +1 -1
  11. data/lib/trycourier/models.rb +6 -2
  12. data/lib/trycourier/resources/automations.rb +27 -0
  13. data/lib/trycourier/resources/inbound.rb +1 -1
  14. data/lib/trycourier/resources/tenants/preferences/items.rb +2 -2
  15. data/lib/trycourier/version.rb +1 -1
  16. data/lib/trycourier.rb +3 -1
  17. data/rbi/trycourier/models/audience.rbi +1 -1
  18. data/rbi/trycourier/models/audience_update_params.rbi +1 -1
  19. data/rbi/trycourier/models/automation_list_params.rbi +95 -0
  20. data/rbi/trycourier/models/automation_template.rbi +102 -0
  21. data/rbi/trycourier/models/automation_template_list_response.rbi +54 -0
  22. data/rbi/trycourier/models/inbound_track_event_params.rbi +2 -2
  23. data/rbi/trycourier/models/nested_filter_config.rbi +3 -3
  24. data/rbi/trycourier/models/single_filter_config.rbi +2 -2
  25. data/rbi/trycourier/models/subscription_topic_new.rbi +2 -2
  26. data/rbi/trycourier/models.rbi +7 -2
  27. data/rbi/trycourier/resources/audiences.rbi +1 -1
  28. data/rbi/trycourier/resources/automations.rbi +19 -0
  29. data/rbi/trycourier/resources/inbound.rbi +1 -1
  30. data/rbi/trycourier/resources/tenants/preferences/items.rbi +3 -3
  31. data/sig/trycourier/models/automation_list_params.rbs +48 -0
  32. data/sig/trycourier/models/automation_template.rbs +55 -0
  33. data/sig/trycourier/models/automation_template_list_response.rbs +28 -0
  34. data/sig/trycourier/models/nested_filter_config.rbs +4 -4
  35. data/sig/trycourier/models.rbs +6 -2
  36. data/sig/trycourier/resources/automations.rbs +6 -0
  37. metadata +25 -5
  38. data/lib/trycourier/models/filter_config.rb +0 -19
  39. data/rbi/trycourier/models/filter_config.rbi +0 -19
  40. data/sig/trycourier/models/filter_config.rbs +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50b24baf1344688ba29d949d04f66b3841f3272ab0db0e353d9364a3441d39b6
4
- data.tar.gz: a0b247a913ade31c0aa104718b3607a5546367a3f69febb9a2d377d68e6dbe0b
3
+ metadata.gz: 1b1fdc15224e1cd62694ae96149bda9773629bf3ea3e38c5cb3b2bb7160f82ad
4
+ data.tar.gz: 89ef9a621a612c2fd119f4144d969083197541e3feadc9655589b4a85365bd53
5
5
  SHA512:
6
- metadata.gz: 4549c791b9b0c8b1f26cca857c6ea4fccacb889d13fce5a75976f4436c987d52ef43e31c1085f79eb645f325f31263c239f1a5d2dc88c79275483137805e0928
7
- data.tar.gz: dfc09375e3facc38b137ed1da33b7b3624751c8e10727d333f00d27fe9efddcf34a83e337aa4dfcfc0cc988f04a48f393b74437e00fb992544bc43710a6ba5ca
6
+ metadata.gz: 9bc2518f49488f33c7786df71a22f645dec81b232d89c4bc81d26046cf8fdc1c75574bc871990ceef949f3d5e869e6ac3e8e828b44d5602eb697c9dca56a48e6
7
+ data.tar.gz: cf2c95bc11c0aa43f66a6bc91ccaa208bfcf91547b0985f49824a44702582f3503da01dcf1d2026867b7078dda608b0a9746620db16abb1bd104c9a743e633e8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.6.1 (2026-01-12)
4
+
5
+ Full Changelog: [v4.6.0...v4.6.1](https://github.com/trycourier/courier-ruby/compare/v4.6.0...v4.6.1)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **types:** correct rules field type to Filter in NestedFilterConfig ([3c9897c](https://github.com/trycourier/courier-ruby/commit/3c9897c45406cf07f9981a953030c43c10f224c1))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **internal:** regenerate SDK with no functional changes ([a8e483c](https://github.com/trycourier/courier-ruby/commit/a8e483c224a1ae70128b7eb379e9356d68175d95))
15
+ * move `cgi` into dependencies for ruby 4 ([854537a](https://github.com/trycourier/courier-ruby/commit/854537a6a4127b10ac19f8cd43f412e54c776385))
16
+
17
+ ## 4.6.0 (2026-01-08)
18
+
19
+ Full Changelog: [v4.5.0...v4.6.0](https://github.com/trycourier/courier-ruby/compare/v4.5.0...v4.6.0)
20
+
21
+ ### Features
22
+
23
+ * **api:** remove audit_events, automations, brands, bulk, inbound, translations endpoints ([f9f04c1](https://github.com/trycourier/courier-ruby/commit/f9f04c1760b4dceb5ed966449ddb19cd4bc72182))
24
+
3
25
  ## 4.5.0 (2025-12-29)
4
26
 
5
27
  Full Changelog: [v4.4.0...v4.5.0](https://github.com/trycourier/courier-ruby/compare/v4.4.0...v4.5.0)
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.5.0"
20
+ gem "trycourier", "~> 4.6.1"
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
- # :OPTED_OUT
225
- puts(Trycourier::SubscriptionTopicNew::Status::OPTED_OUT)
224
+ # :published
225
+ puts(Trycourier::AutomationListParams::Version::PUBLISHED)
226
226
 
227
- # Revealed type: `T.all(Trycourier::SubscriptionTopicNew::Status, Symbol)`
228
- T.reveal_type(Trycourier::SubscriptionTopicNew::Status::OPTED_OUT)
227
+ # Revealed type: `T.all(Trycourier::AutomationListParams::Version, Symbol)`
228
+ T.reveal_type(Trycourier::AutomationListParams::Version::PUBLISHED)
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.tenants.preferences.items.update(
236
- status: Trycourier::SubscriptionTopicNew::Status::OPTED_OUT,
235
+ courier.automations.list(
236
+ version: Trycourier::AutomationListParams::Version::PUBLISHED,
237
237
  # …
238
238
  )
239
239
 
240
240
  # Literal values are also permissible:
241
- courier.tenants.preferences.items.update(
242
- status: :OPTED_OUT,
241
+ courier.automations.list(
242
+ version: :published,
243
243
  # …
244
244
  )
245
245
  ```
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ # @see Trycourier::Resources::Automations#list
6
+ class AutomationListParams < Trycourier::Internal::Type::BaseModel
7
+ extend Trycourier::Internal::Type::RequestParameters::Converter
8
+ include Trycourier::Internal::Type::RequestParameters
9
+
10
+ # @!attribute cursor
11
+ # A cursor token for pagination. Use the cursor from the previous response to
12
+ # fetch the next page of results.
13
+ #
14
+ # @return [String, nil]
15
+ optional :cursor, String
16
+
17
+ # @!attribute version
18
+ # The version of templates to retrieve. Accepted values are published (for
19
+ # published templates) or draft (for draft templates). Defaults to published.
20
+ #
21
+ # @return [Symbol, Trycourier::Models::AutomationListParams::Version, nil]
22
+ optional :version, enum: -> { Trycourier::AutomationListParams::Version }
23
+
24
+ # @!method initialize(cursor: nil, version: nil, request_options: {})
25
+ # Some parameter documentations has been truncated, see
26
+ # {Trycourier::Models::AutomationListParams} for more details.
27
+ #
28
+ # @param cursor [String] A cursor token for pagination. Use the cursor from the previous response to fetc
29
+ #
30
+ # @param version [Symbol, Trycourier::Models::AutomationListParams::Version] The version of templates to retrieve. Accepted values are published (for publish
31
+ #
32
+ # @param request_options [Trycourier::RequestOptions, Hash{Symbol=>Object}]
33
+
34
+ # The version of templates to retrieve. Accepted values are published (for
35
+ # published templates) or draft (for draft templates). Defaults to published.
36
+ module Version
37
+ extend Trycourier::Internal::Type::Enum
38
+
39
+ PUBLISHED = :published
40
+ DRAFT = :draft
41
+
42
+ # @!method self.values
43
+ # @return [Array<Symbol>]
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ class AutomationTemplate < Trycourier::Internal::Type::BaseModel
6
+ # @!attribute id
7
+ # The unique identifier of the automation template.
8
+ #
9
+ # @return [String]
10
+ required :id, String
11
+
12
+ # @!attribute name
13
+ # The name of the automation template.
14
+ #
15
+ # @return [String]
16
+ required :name, String
17
+
18
+ # @!attribute version
19
+ # The version of the template published, draft.
20
+ #
21
+ # @return [Symbol, Trycourier::Models::AutomationTemplate::Version]
22
+ required :version, enum: -> { Trycourier::AutomationTemplate::Version }
23
+
24
+ # @!attribute created_at
25
+ # ISO 8601 timestamp when the template was created.
26
+ #
27
+ # @return [Time, nil]
28
+ optional :created_at, Time, api_name: :createdAt
29
+
30
+ # @!attribute updated_at
31
+ # ISO 8601 timestamp when the template was last updated.
32
+ #
33
+ # @return [Time, nil]
34
+ optional :updated_at, Time, api_name: :updatedAt
35
+
36
+ # @!method initialize(id:, name:, version:, created_at: nil, updated_at: nil)
37
+ # @param id [String] The unique identifier of the automation template.
38
+ #
39
+ # @param name [String] The name of the automation template.
40
+ #
41
+ # @param version [Symbol, Trycourier::Models::AutomationTemplate::Version] The version of the template published, draft.
42
+ #
43
+ # @param created_at [Time] ISO 8601 timestamp when the template was created.
44
+ #
45
+ # @param updated_at [Time] ISO 8601 timestamp when the template was last updated.
46
+
47
+ # The version of the template published, draft.
48
+ #
49
+ # @see Trycourier::Models::AutomationTemplate#version
50
+ module Version
51
+ extend Trycourier::Internal::Type::Enum
52
+
53
+ PUBLISHED = :published
54
+ DRAFT = :draft
55
+
56
+ # @!method self.values
57
+ # @return [Array<Symbol>]
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ # @see Trycourier::Resources::Automations#list
6
+ class AutomationTemplateListResponse < Trycourier::Internal::Type::BaseModel
7
+ # @!attribute cursor
8
+ # A cursor token for pagination. Present when there are more results available.
9
+ #
10
+ # @return [String, nil]
11
+ optional :cursor, String
12
+
13
+ # @!attribute templates
14
+ #
15
+ # @return [Array<Trycourier::Models::AutomationTemplate>, nil]
16
+ optional :templates, -> { Trycourier::Internal::Type::ArrayOf[Trycourier::AutomationTemplate] }
17
+
18
+ # @!method initialize(cursor: nil, templates: nil)
19
+ # @param cursor [String] A cursor token for pagination. Present when there are more results available.
20
+ #
21
+ # @param templates [Array<Trycourier::Models::AutomationTemplate>]
22
+ end
23
+ end
24
+ end
@@ -32,7 +32,7 @@ module Trycourier
32
32
  required :type, enum: -> { Trycourier::InboundTrackEventParams::Type }
33
33
 
34
34
  # @!attribute user_id
35
- # The user id associatiated with the track
35
+ # The user id associated with the track
36
36
  #
37
37
  # @return [String, nil]
38
38
  optional :user_id, String, api_name: :userId, nil?: true
@@ -49,7 +49,7 @@ module Trycourier
49
49
  #
50
50
  # @param type [Symbol, Trycourier::Models::InboundTrackEventParams::Type]
51
51
  #
52
- # @param user_id [String, nil] The user id associatiated with the track
52
+ # @param user_id [String, nil] The user id associated with the track
53
53
  #
54
54
  # @param request_options [Trycourier::RequestOptions, Hash{Symbol=>Object}]
55
55
 
@@ -11,13 +11,13 @@ module Trycourier
11
11
 
12
12
  # @!attribute rules
13
13
  #
14
- # @return [Array<Trycourier::Models::FilterConfig>]
15
- required :rules, -> { Trycourier::Internal::Type::ArrayOf[union: Trycourier::FilterConfig] }
14
+ # @return [Array<Trycourier::Models::Filter>]
15
+ required :rules, -> { Trycourier::Internal::Type::ArrayOf[union: Trycourier::Filter] }
16
16
 
17
17
  # @!method initialize(operator:, rules:)
18
18
  # @param operator [Symbol, Trycourier::Models::NestedFilterConfig::Operator] The operator to use for filtering
19
19
  #
20
- # @param rules [Array<Trycourier::Models::FilterConfig>]
20
+ # @param rules [Array<Trycourier::Models::Filter>]
21
21
 
22
22
  # The operator to use for filtering
23
23
  #
@@ -10,7 +10,7 @@ module Trycourier
10
10
  required :operator, enum: -> { Trycourier::SingleFilterConfig::Operator }
11
11
 
12
12
  # @!attribute path
13
- # The attribe name from profile whose value will be operated against the filter
13
+ # The attribute name from profile whose value will be operated against the filter
14
14
  # value
15
15
  #
16
16
  # @return [String]
@@ -28,7 +28,7 @@ module Trycourier
28
28
  #
29
29
  # @param operator [Symbol, Trycourier::Models::SingleFilterConfig::Operator] The operator to use for filtering
30
30
  #
31
- # @param path [String] The attribe name from profile whose value will be operated against the filter va
31
+ # @param path [String] The attribute name from profile whose value will be operated against the filter
32
32
  #
33
33
  # @param value [String] The value to use for filtering
34
34
 
@@ -18,7 +18,7 @@ module Trycourier
18
18
 
19
19
  # @!attribute has_custom_routing
20
20
  # Override channel routing with custom preferences. This will override any
21
- # template prefernces that are set, but a user can still customize their
21
+ # template preferences that are set, but a user can still customize their
22
22
  # preferences
23
23
  #
24
24
  # @return [Boolean, nil]
@@ -71,8 +71,14 @@ module Trycourier
71
71
 
72
72
  AutomationInvokeResponse = Trycourier::Models::AutomationInvokeResponse
73
73
 
74
+ AutomationListParams = Trycourier::Models::AutomationListParams
75
+
74
76
  Automations = Trycourier::Models::Automations
75
77
 
78
+ AutomationTemplate = Trycourier::Models::AutomationTemplate
79
+
80
+ AutomationTemplateListResponse = Trycourier::Models::AutomationTemplateListResponse
81
+
76
82
  BaseCheck = Trycourier::Models::BaseCheck
77
83
 
78
84
  BaseTemplateTenantAssociation = Trycourier::Models::BaseTemplateTenantAssociation
@@ -159,8 +165,6 @@ module Trycourier
159
165
 
160
166
  Filter = Trycourier::Models::Filter
161
167
 
162
- FilterConfig = Trycourier::Models::FilterConfig
163
-
164
168
  Icons = Trycourier::Models::Icons
165
169
 
166
170
  InboundBulkMessage = Trycourier::Models::InboundBulkMessage
@@ -6,6 +6,33 @@ module Trycourier
6
6
  # @return [Trycourier::Resources::Automations::Invoke]
7
7
  attr_reader :invoke
8
8
 
9
+ # Some parameter documentations has been truncated, see
10
+ # {Trycourier::Models::AutomationListParams} for more details.
11
+ #
12
+ # Get the list of automations.
13
+ #
14
+ # @overload list(cursor: nil, version: nil, request_options: {})
15
+ #
16
+ # @param cursor [String] A cursor token for pagination. Use the cursor from the previous response to fetc
17
+ #
18
+ # @param version [Symbol, Trycourier::Models::AutomationListParams::Version] The version of templates to retrieve. Accepted values are published (for publish
19
+ #
20
+ # @param request_options [Trycourier::RequestOptions, Hash{Symbol=>Object}, nil]
21
+ #
22
+ # @return [Trycourier::Models::AutomationTemplateListResponse]
23
+ #
24
+ # @see Trycourier::Models::AutomationListParams
25
+ def list(params = {})
26
+ parsed, options = Trycourier::AutomationListParams.dump_request(params)
27
+ @client.request(
28
+ method: :get,
29
+ path: "automations",
30
+ query: parsed,
31
+ model: Trycourier::AutomationTemplateListResponse,
32
+ options: options
33
+ )
34
+ end
35
+
9
36
  # @api private
10
37
  #
11
38
  # @param client [Trycourier::Client]
@@ -18,7 +18,7 @@ module Trycourier
18
18
  #
19
19
  # @param type [Symbol, Trycourier::Models::InboundTrackEventParams::Type]
20
20
  #
21
- # @param user_id [String, nil] The user id associatiated with the track
21
+ # @param user_id [String, nil] The user id associated with the track
22
22
  #
23
23
  # @param request_options [Trycourier::RequestOptions, Hash{Symbol=>Object}, nil]
24
24
  #
@@ -12,7 +12,7 @@ module Trycourier
12
12
  #
13
13
  # @overload update(topic_id, tenant_id:, status:, custom_routing: nil, has_custom_routing: nil, request_options: {})
14
14
  #
15
- # @param topic_id [String] Path param: Id fo the susbcription topic you want to have a default preference f
15
+ # @param topic_id [String] Path param: Id of the subscription topic you want to have a default preference f
16
16
  #
17
17
  # @param tenant_id [String] Path param: Id of the tenant to update the default preferences for.
18
18
  #
@@ -46,7 +46,7 @@ module Trycourier
46
46
  #
47
47
  # @overload delete(topic_id, tenant_id:, request_options: {})
48
48
  #
49
- # @param topic_id [String] Id fo the susbcription topic you want to have a default preference for.
49
+ # @param topic_id [String] Id of the subscription topic you want to have a default preference for.
50
50
  #
51
51
  # @param tenant_id [String] Id of the tenant to update the default preferences for.
52
52
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Trycourier
4
- VERSION = "4.5.0"
4
+ VERSION = "4.6.1"
5
5
  end
data/lib/trycourier.rb CHANGED
@@ -82,8 +82,11 @@ require_relative "trycourier/models/audit_event_retrieve_params"
82
82
  require_relative "trycourier/models/auth_issue_token_params"
83
83
  require_relative "trycourier/models/auth_issue_token_response"
84
84
  require_relative "trycourier/models/automation_invoke_response"
85
+ require_relative "trycourier/models/automation_list_params"
85
86
  require_relative "trycourier/models/automations/invoke_invoke_ad_hoc_params"
86
87
  require_relative "trycourier/models/automations/invoke_invoke_by_template_params"
88
+ require_relative "trycourier/models/automation_template"
89
+ require_relative "trycourier/models/automation_template_list_response"
87
90
  require_relative "trycourier/models/brand"
88
91
  require_relative "trycourier/models/brand_colors"
89
92
  require_relative "trycourier/models/brand_create_params"
@@ -126,7 +129,6 @@ require_relative "trycourier/models/email_head"
126
129
  require_relative "trycourier/models/email_header"
127
130
  require_relative "trycourier/models/expo"
128
131
  require_relative "trycourier/models/filter"
129
- require_relative "trycourier/models/filter_config"
130
132
  require_relative "trycourier/models/icons"
131
133
  require_relative "trycourier/models/inbound_bulk_message"
132
134
  require_relative "trycourier/models/inbound_track_event_params"
@@ -38,7 +38,7 @@ module Trycourier
38
38
  filter:
39
39
  T.any(
40
40
  Trycourier::SingleFilterConfig::OrHash,
41
- Trycourier::NestedFilterConfig::OrHash
41
+ Trycourier::NestedFilterConfig
42
42
  ),
43
43
  name: String,
44
44
  updated_at: String
@@ -39,7 +39,7 @@ module Trycourier
39
39
  T.nilable(
40
40
  T.any(
41
41
  Trycourier::SingleFilterConfig::OrHash,
42
- Trycourier::NestedFilterConfig::OrHash
42
+ Trycourier::NestedFilterConfig
43
43
  )
44
44
  ),
45
45
  name: T.nilable(String),
@@ -0,0 +1,95 @@
1
+ # typed: strong
2
+
3
+ module Trycourier
4
+ module Models
5
+ class AutomationListParams < Trycourier::Internal::Type::BaseModel
6
+ extend Trycourier::Internal::Type::RequestParameters::Converter
7
+ include Trycourier::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Trycourier::AutomationListParams, Trycourier::Internal::AnyHash)
12
+ end
13
+
14
+ # A cursor token for pagination. Use the cursor from the previous response to
15
+ # fetch the next page of results.
16
+ sig { returns(T.nilable(String)) }
17
+ attr_reader :cursor
18
+
19
+ sig { params(cursor: String).void }
20
+ attr_writer :cursor
21
+
22
+ # The version of templates to retrieve. Accepted values are published (for
23
+ # published templates) or draft (for draft templates). Defaults to published.
24
+ sig do
25
+ returns(T.nilable(Trycourier::AutomationListParams::Version::OrSymbol))
26
+ end
27
+ attr_reader :version
28
+
29
+ sig do
30
+ params(
31
+ version: Trycourier::AutomationListParams::Version::OrSymbol
32
+ ).void
33
+ end
34
+ attr_writer :version
35
+
36
+ sig do
37
+ params(
38
+ cursor: String,
39
+ version: Trycourier::AutomationListParams::Version::OrSymbol,
40
+ request_options: Trycourier::RequestOptions::OrHash
41
+ ).returns(T.attached_class)
42
+ end
43
+ def self.new(
44
+ # A cursor token for pagination. Use the cursor from the previous response to
45
+ # fetch the next page of results.
46
+ cursor: nil,
47
+ # The version of templates to retrieve. Accepted values are published (for
48
+ # published templates) or draft (for draft templates). Defaults to published.
49
+ version: nil,
50
+ request_options: {}
51
+ )
52
+ end
53
+
54
+ sig do
55
+ override.returns(
56
+ {
57
+ cursor: String,
58
+ version: Trycourier::AutomationListParams::Version::OrSymbol,
59
+ request_options: Trycourier::RequestOptions
60
+ }
61
+ )
62
+ end
63
+ def to_hash
64
+ end
65
+
66
+ # The version of templates to retrieve. Accepted values are published (for
67
+ # published templates) or draft (for draft templates). Defaults to published.
68
+ module Version
69
+ extend Trycourier::Internal::Type::Enum
70
+
71
+ TaggedSymbol =
72
+ T.type_alias do
73
+ T.all(Symbol, Trycourier::AutomationListParams::Version)
74
+ end
75
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
76
+
77
+ PUBLISHED =
78
+ T.let(
79
+ :published,
80
+ Trycourier::AutomationListParams::Version::TaggedSymbol
81
+ )
82
+ DRAFT =
83
+ T.let(:draft, Trycourier::AutomationListParams::Version::TaggedSymbol)
84
+
85
+ sig do
86
+ override.returns(
87
+ T::Array[Trycourier::AutomationListParams::Version::TaggedSymbol]
88
+ )
89
+ end
90
+ def self.values
91
+ end
92
+ end
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,102 @@
1
+ # typed: strong
2
+
3
+ module Trycourier
4
+ module Models
5
+ class AutomationTemplate < Trycourier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Trycourier::AutomationTemplate, Trycourier::Internal::AnyHash)
9
+ end
10
+
11
+ # The unique identifier of the automation template.
12
+ sig { returns(String) }
13
+ attr_accessor :id
14
+
15
+ # The name of the automation template.
16
+ sig { returns(String) }
17
+ attr_accessor :name
18
+
19
+ # The version of the template published, draft.
20
+ sig { returns(Trycourier::AutomationTemplate::Version::TaggedSymbol) }
21
+ attr_accessor :version
22
+
23
+ # ISO 8601 timestamp when the template was created.
24
+ sig { returns(T.nilable(Time)) }
25
+ attr_reader :created_at
26
+
27
+ sig { params(created_at: Time).void }
28
+ attr_writer :created_at
29
+
30
+ # ISO 8601 timestamp when the template was last updated.
31
+ sig { returns(T.nilable(Time)) }
32
+ attr_reader :updated_at
33
+
34
+ sig { params(updated_at: Time).void }
35
+ attr_writer :updated_at
36
+
37
+ sig do
38
+ params(
39
+ id: String,
40
+ name: String,
41
+ version: Trycourier::AutomationTemplate::Version::OrSymbol,
42
+ created_at: Time,
43
+ updated_at: Time
44
+ ).returns(T.attached_class)
45
+ end
46
+ def self.new(
47
+ # The unique identifier of the automation template.
48
+ id:,
49
+ # The name of the automation template.
50
+ name:,
51
+ # The version of the template published, draft.
52
+ version:,
53
+ # ISO 8601 timestamp when the template was created.
54
+ created_at: nil,
55
+ # ISO 8601 timestamp when the template was last updated.
56
+ updated_at: nil
57
+ )
58
+ end
59
+
60
+ sig do
61
+ override.returns(
62
+ {
63
+ id: String,
64
+ name: String,
65
+ version: Trycourier::AutomationTemplate::Version::TaggedSymbol,
66
+ created_at: Time,
67
+ updated_at: Time
68
+ }
69
+ )
70
+ end
71
+ def to_hash
72
+ end
73
+
74
+ # The version of the template published, draft.
75
+ module Version
76
+ extend Trycourier::Internal::Type::Enum
77
+
78
+ TaggedSymbol =
79
+ T.type_alias do
80
+ T.all(Symbol, Trycourier::AutomationTemplate::Version)
81
+ end
82
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
83
+
84
+ PUBLISHED =
85
+ T.let(
86
+ :published,
87
+ Trycourier::AutomationTemplate::Version::TaggedSymbol
88
+ )
89
+ DRAFT =
90
+ T.let(:draft, Trycourier::AutomationTemplate::Version::TaggedSymbol)
91
+
92
+ sig do
93
+ override.returns(
94
+ T::Array[Trycourier::AutomationTemplate::Version::TaggedSymbol]
95
+ )
96
+ end
97
+ def self.values
98
+ end
99
+ end
100
+ end
101
+ end
102
+ end
@@ -0,0 +1,54 @@
1
+ # typed: strong
2
+
3
+ module Trycourier
4
+ module Models
5
+ class AutomationTemplateListResponse < Trycourier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Trycourier::AutomationTemplateListResponse,
10
+ Trycourier::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # A cursor token for pagination. Present when there are more results available.
15
+ sig { returns(T.nilable(String)) }
16
+ attr_reader :cursor
17
+
18
+ sig { params(cursor: String).void }
19
+ attr_writer :cursor
20
+
21
+ sig { returns(T.nilable(T::Array[Trycourier::AutomationTemplate])) }
22
+ attr_reader :templates
23
+
24
+ sig do
25
+ params(templates: T::Array[Trycourier::AutomationTemplate::OrHash]).void
26
+ end
27
+ attr_writer :templates
28
+
29
+ sig do
30
+ params(
31
+ cursor: String,
32
+ templates: T::Array[Trycourier::AutomationTemplate::OrHash]
33
+ ).returns(T.attached_class)
34
+ end
35
+ def self.new(
36
+ # A cursor token for pagination. Present when there are more results available.
37
+ cursor: nil,
38
+ templates: nil
39
+ )
40
+ end
41
+
42
+ sig do
43
+ override.returns(
44
+ {
45
+ cursor: String,
46
+ templates: T::Array[Trycourier::AutomationTemplate]
47
+ }
48
+ )
49
+ end
50
+ def to_hash
51
+ end
52
+ end
53
+ end
54
+ end
@@ -30,7 +30,7 @@ module Trycourier
30
30
  sig { returns(Trycourier::InboundTrackEventParams::Type::OrSymbol) }
31
31
  attr_accessor :type
32
32
 
33
- # The user id associatiated with the track
33
+ # The user id associated with the track
34
34
  sig { returns(T.nilable(String)) }
35
35
  attr_accessor :user_id
36
36
 
@@ -53,7 +53,7 @@ module Trycourier
53
53
  message_id:,
54
54
  properties:,
55
55
  type:,
56
- # The user id associatiated with the track
56
+ # The user id associated with the track
57
57
  user_id: nil,
58
58
  request_options: {}
59
59
  )
@@ -12,13 +12,13 @@ module Trycourier
12
12
  sig { returns(Trycourier::NestedFilterConfig::Operator::OrSymbol) }
13
13
  attr_accessor :operator
14
14
 
15
- sig { returns(T::Array[Trycourier::FilterConfig]) }
15
+ sig { returns(T::Array[Trycourier::Filter]) }
16
16
  attr_accessor :rules
17
17
 
18
18
  sig do
19
19
  params(
20
20
  operator: Trycourier::NestedFilterConfig::Operator::OrSymbol,
21
- rules: T::Array[Trycourier::FilterConfig]
21
+ rules: T::Array[Trycourier::Filter]
22
22
  ).returns(T.attached_class)
23
23
  end
24
24
  def self.new(
@@ -32,7 +32,7 @@ module Trycourier
32
32
  override.returns(
33
33
  {
34
34
  operator: Trycourier::NestedFilterConfig::Operator::OrSymbol,
35
- rules: T::Array[Trycourier::FilterConfig]
35
+ rules: T::Array[Trycourier::Filter]
36
36
  }
37
37
  )
38
38
  end
@@ -12,7 +12,7 @@ module Trycourier
12
12
  sig { returns(Trycourier::SingleFilterConfig::Operator::OrSymbol) }
13
13
  attr_accessor :operator
14
14
 
15
- # The attribe name from profile whose value will be operated against the filter
15
+ # The attribute name from profile whose value will be operated against the filter
16
16
  # value
17
17
  sig { returns(String) }
18
18
  attr_accessor :path
@@ -31,7 +31,7 @@ module Trycourier
31
31
  def self.new(
32
32
  # The operator to use for filtering
33
33
  operator:,
34
- # The attribe name from profile whose value will be operated against the filter
34
+ # The attribute name from profile whose value will be operated against the filter
35
35
  # value
36
36
  path:,
37
37
  # The value to use for filtering
@@ -20,7 +20,7 @@ module Trycourier
20
20
  attr_accessor :custom_routing
21
21
 
22
22
  # Override channel routing with custom preferences. This will override any
23
- # template prefernces that are set, but a user can still customize their
23
+ # template preferences that are set, but a user can still customize their
24
24
  # preferences
25
25
  sig { returns(T.nilable(T::Boolean)) }
26
26
  attr_accessor :has_custom_routing
@@ -38,7 +38,7 @@ module Trycourier
38
38
  # The default channels to send to this tenant when has_custom_routing is enabled
39
39
  custom_routing: nil,
40
40
  # Override channel routing with custom preferences. This will override any
41
- # template prefernces that are set, but a user can still customize their
41
+ # template preferences that are set, but a user can still customize their
42
42
  # preferences
43
43
  has_custom_routing: nil
44
44
  )
@@ -33,8 +33,15 @@ module Trycourier
33
33
 
34
34
  AutomationInvokeResponse = Trycourier::Models::AutomationInvokeResponse
35
35
 
36
+ AutomationListParams = Trycourier::Models::AutomationListParams
37
+
36
38
  Automations = Trycourier::Models::Automations
37
39
 
40
+ AutomationTemplate = Trycourier::Models::AutomationTemplate
41
+
42
+ AutomationTemplateListResponse =
43
+ Trycourier::Models::AutomationTemplateListResponse
44
+
38
45
  BaseCheck = Trycourier::Models::BaseCheck
39
46
 
40
47
  BaseTemplateTenantAssociation =
@@ -124,8 +131,6 @@ module Trycourier
124
131
 
125
132
  Filter = Trycourier::Models::Filter
126
133
 
127
- FilterConfig = Trycourier::Models::FilterConfig
128
-
129
134
  Icons = Trycourier::Models::Icons
130
135
 
131
136
  InboundBulkMessage = Trycourier::Models::InboundBulkMessage
@@ -26,7 +26,7 @@ module Trycourier
26
26
  T.nilable(
27
27
  T.any(
28
28
  Trycourier::SingleFilterConfig::OrHash,
29
- Trycourier::NestedFilterConfig::OrHash
29
+ Trycourier::NestedFilterConfig
30
30
  )
31
31
  ),
32
32
  name: T.nilable(String),
@@ -6,6 +6,25 @@ module Trycourier
6
6
  sig { returns(Trycourier::Resources::Automations::Invoke) }
7
7
  attr_reader :invoke
8
8
 
9
+ # Get the list of automations.
10
+ sig do
11
+ params(
12
+ cursor: String,
13
+ version: Trycourier::AutomationListParams::Version::OrSymbol,
14
+ request_options: Trycourier::RequestOptions::OrHash
15
+ ).returns(Trycourier::AutomationTemplateListResponse)
16
+ end
17
+ def list(
18
+ # A cursor token for pagination. Use the cursor from the previous response to
19
+ # fetch the next page of results.
20
+ cursor: nil,
21
+ # The version of templates to retrieve. Accepted values are published (for
22
+ # published templates) or draft (for draft templates). Defaults to published.
23
+ version: nil,
24
+ request_options: {}
25
+ )
26
+ end
27
+
9
28
  # @api private
10
29
  sig { params(client: Trycourier::Client).returns(T.attached_class) }
11
30
  def self.new(client:)
@@ -23,7 +23,7 @@ module Trycourier
23
23
  message_id:,
24
24
  properties:,
25
25
  type:,
26
- # The user id associatiated with the track
26
+ # The user id associated with the track
27
27
  user_id: nil,
28
28
  request_options: {}
29
29
  )
@@ -20,7 +20,7 @@ module Trycourier
20
20
  ).void
21
21
  end
22
22
  def update(
23
- # Path param: Id fo the susbcription topic you want to have a default preference
23
+ # Path param: Id of the subscription topic you want to have a default preference
24
24
  # for.
25
25
  topic_id,
26
26
  # Path param: Id of the tenant to update the default preferences for.
@@ -31,7 +31,7 @@ module Trycourier
31
31
  # is enabled
32
32
  custom_routing: nil,
33
33
  # Body param: Override channel routing with custom preferences. This will override
34
- # any template prefernces that are set, but a user can still customize their
34
+ # any template preferences that are set, but a user can still customize their
35
35
  # preferences
36
36
  has_custom_routing: nil,
37
37
  request_options: {}
@@ -47,7 +47,7 @@ module Trycourier
47
47
  ).void
48
48
  end
49
49
  def delete(
50
- # Id fo the susbcription topic you want to have a default preference for.
50
+ # Id of the subscription topic you want to have a default preference for.
51
51
  topic_id,
52
52
  # Id of the tenant to update the default preferences for.
53
53
  tenant_id:,
@@ -0,0 +1,48 @@
1
+ module Trycourier
2
+ module Models
3
+ type automation_list_params =
4
+ {
5
+ cursor: String,
6
+ version: Trycourier::Models::AutomationListParams::version
7
+ }
8
+ & Trycourier::Internal::Type::request_parameters
9
+
10
+ class AutomationListParams < Trycourier::Internal::Type::BaseModel
11
+ extend Trycourier::Internal::Type::RequestParameters::Converter
12
+ include Trycourier::Internal::Type::RequestParameters
13
+
14
+ attr_reader cursor: String?
15
+
16
+ def cursor=: (String) -> String
17
+
18
+ attr_reader version: Trycourier::Models::AutomationListParams::version?
19
+
20
+ def version=: (
21
+ Trycourier::Models::AutomationListParams::version
22
+ ) -> Trycourier::Models::AutomationListParams::version
23
+
24
+ def initialize: (
25
+ ?cursor: String,
26
+ ?version: Trycourier::Models::AutomationListParams::version,
27
+ ?request_options: Trycourier::request_opts
28
+ ) -> void
29
+
30
+ def to_hash: -> {
31
+ cursor: String,
32
+ version: Trycourier::Models::AutomationListParams::version,
33
+ request_options: Trycourier::RequestOptions
34
+ }
35
+
36
+ type version = :published | :draft
37
+
38
+ module Version
39
+ extend Trycourier::Internal::Type::Enum
40
+
41
+ PUBLISHED: :published
42
+ DRAFT: :draft
43
+
44
+ def self?.values: -> ::Array[Trycourier::Models::AutomationListParams::version]
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,55 @@
1
+ module Trycourier
2
+ module Models
3
+ type automation_template =
4
+ {
5
+ id: String,
6
+ name: String,
7
+ version: Trycourier::Models::AutomationTemplate::version,
8
+ created_at: Time,
9
+ updated_at: Time
10
+ }
11
+
12
+ class AutomationTemplate < Trycourier::Internal::Type::BaseModel
13
+ attr_accessor id: String
14
+
15
+ attr_accessor name: String
16
+
17
+ attr_accessor version: Trycourier::Models::AutomationTemplate::version
18
+
19
+ attr_reader created_at: Time?
20
+
21
+ def created_at=: (Time) -> Time
22
+
23
+ attr_reader updated_at: Time?
24
+
25
+ def updated_at=: (Time) -> Time
26
+
27
+ def initialize: (
28
+ id: String,
29
+ name: String,
30
+ version: Trycourier::Models::AutomationTemplate::version,
31
+ ?created_at: Time,
32
+ ?updated_at: Time
33
+ ) -> void
34
+
35
+ def to_hash: -> {
36
+ id: String,
37
+ name: String,
38
+ version: Trycourier::Models::AutomationTemplate::version,
39
+ created_at: Time,
40
+ updated_at: Time
41
+ }
42
+
43
+ type version = :published | :draft
44
+
45
+ module Version
46
+ extend Trycourier::Internal::Type::Enum
47
+
48
+ PUBLISHED: :published
49
+ DRAFT: :draft
50
+
51
+ def self?.values: -> ::Array[Trycourier::Models::AutomationTemplate::version]
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,28 @@
1
+ module Trycourier
2
+ module Models
3
+ type automation_template_list_response =
4
+ { cursor: String, templates: ::Array[Trycourier::AutomationTemplate] }
5
+
6
+ class AutomationTemplateListResponse < Trycourier::Internal::Type::BaseModel
7
+ attr_reader cursor: String?
8
+
9
+ def cursor=: (String) -> String
10
+
11
+ attr_reader templates: ::Array[Trycourier::AutomationTemplate]?
12
+
13
+ def templates=: (
14
+ ::Array[Trycourier::AutomationTemplate]
15
+ ) -> ::Array[Trycourier::AutomationTemplate]
16
+
17
+ def initialize: (
18
+ ?cursor: String,
19
+ ?templates: ::Array[Trycourier::AutomationTemplate]
20
+ ) -> void
21
+
22
+ def to_hash: -> {
23
+ cursor: String,
24
+ templates: ::Array[Trycourier::AutomationTemplate]
25
+ }
26
+ end
27
+ end
28
+ end
@@ -3,22 +3,22 @@ module Trycourier
3
3
  type nested_filter_config =
4
4
  {
5
5
  operator: Trycourier::Models::NestedFilterConfig::operator,
6
- rules: ::Array[Trycourier::Models::filter_config]
6
+ rules: ::Array[Trycourier::Models::filter]
7
7
  }
8
8
 
9
9
  class NestedFilterConfig < Trycourier::Internal::Type::BaseModel
10
10
  attr_accessor operator: Trycourier::Models::NestedFilterConfig::operator
11
11
 
12
- attr_accessor rules: ::Array[Trycourier::Models::filter_config]
12
+ attr_accessor rules: ::Array[Trycourier::Models::filter]
13
13
 
14
14
  def initialize: (
15
15
  operator: Trycourier::Models::NestedFilterConfig::operator,
16
- rules: ::Array[Trycourier::Models::filter_config]
16
+ rules: ::Array[Trycourier::Models::filter]
17
17
  ) -> void
18
18
 
19
19
  def to_hash: -> {
20
20
  operator: Trycourier::Models::NestedFilterConfig::operator,
21
- rules: ::Array[Trycourier::Models::filter_config]
21
+ rules: ::Array[Trycourier::Models::filter]
22
22
  }
23
23
 
24
24
  type operator =
@@ -31,8 +31,14 @@ module Trycourier
31
31
 
32
32
  class AutomationInvokeResponse = Trycourier::Models::AutomationInvokeResponse
33
33
 
34
+ class AutomationListParams = Trycourier::Models::AutomationListParams
35
+
34
36
  module Automations = Trycourier::Models::Automations
35
37
 
38
+ class AutomationTemplate = Trycourier::Models::AutomationTemplate
39
+
40
+ class AutomationTemplateListResponse = Trycourier::Models::AutomationTemplateListResponse
41
+
36
42
  class BaseCheck = Trycourier::Models::BaseCheck
37
43
 
38
44
  class BaseTemplateTenantAssociation = Trycourier::Models::BaseTemplateTenantAssociation
@@ -119,8 +125,6 @@ module Trycourier
119
125
 
120
126
  module Filter = Trycourier::Models::Filter
121
127
 
122
- module FilterConfig = Trycourier::Models::FilterConfig
123
-
124
128
  class Icons = Trycourier::Models::Icons
125
129
 
126
130
  class InboundBulkMessage = Trycourier::Models::InboundBulkMessage
@@ -3,6 +3,12 @@ module Trycourier
3
3
  class Automations
4
4
  attr_reader invoke: Trycourier::Resources::Automations::Invoke
5
5
 
6
+ def list: (
7
+ ?cursor: String,
8
+ ?version: Trycourier::Models::AutomationListParams::version,
9
+ ?request_options: Trycourier::request_opts
10
+ ) -> Trycourier::AutomationTemplateListResponse
11
+
6
12
  def initialize: (client: Trycourier::Client) -> void
7
13
  end
8
14
  end
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.5.0
4
+ version: 4.6.1
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-05 00:00:00.000000000 Z
11
+ date: 2026-01-12 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
@@ -76,6 +90,9 @@ files:
76
90
  - lib/trycourier/models/auth_issue_token_params.rb
77
91
  - lib/trycourier/models/auth_issue_token_response.rb
78
92
  - lib/trycourier/models/automation_invoke_response.rb
93
+ - lib/trycourier/models/automation_list_params.rb
94
+ - lib/trycourier/models/automation_template.rb
95
+ - lib/trycourier/models/automation_template_list_response.rb
79
96
  - lib/trycourier/models/automations/invoke_invoke_ad_hoc_params.rb
80
97
  - lib/trycourier/models/automations/invoke_invoke_by_template_params.rb
81
98
  - lib/trycourier/models/base_check.rb
@@ -125,7 +142,6 @@ files:
125
142
  - lib/trycourier/models/email_header.rb
126
143
  - lib/trycourier/models/expo.rb
127
144
  - lib/trycourier/models/filter.rb
128
- - lib/trycourier/models/filter_config.rb
129
145
  - lib/trycourier/models/icons.rb
130
146
  - lib/trycourier/models/inbound_bulk_message.rb
131
147
  - lib/trycourier/models/inbound_bulk_message_user.rb
@@ -342,6 +358,9 @@ files:
342
358
  - rbi/trycourier/models/auth_issue_token_params.rbi
343
359
  - rbi/trycourier/models/auth_issue_token_response.rbi
344
360
  - rbi/trycourier/models/automation_invoke_response.rbi
361
+ - rbi/trycourier/models/automation_list_params.rbi
362
+ - rbi/trycourier/models/automation_template.rbi
363
+ - rbi/trycourier/models/automation_template_list_response.rbi
345
364
  - rbi/trycourier/models/automations/invoke_invoke_ad_hoc_params.rbi
346
365
  - rbi/trycourier/models/automations/invoke_invoke_by_template_params.rbi
347
366
  - rbi/trycourier/models/base_check.rbi
@@ -391,7 +410,6 @@ files:
391
410
  - rbi/trycourier/models/email_header.rbi
392
411
  - rbi/trycourier/models/expo.rbi
393
412
  - rbi/trycourier/models/filter.rbi
394
- - rbi/trycourier/models/filter_config.rbi
395
413
  - rbi/trycourier/models/icons.rbi
396
414
  - rbi/trycourier/models/inbound_bulk_message.rbi
397
415
  - rbi/trycourier/models/inbound_bulk_message_user.rbi
@@ -607,6 +625,9 @@ files:
607
625
  - sig/trycourier/models/auth_issue_token_params.rbs
608
626
  - sig/trycourier/models/auth_issue_token_response.rbs
609
627
  - sig/trycourier/models/automation_invoke_response.rbs
628
+ - sig/trycourier/models/automation_list_params.rbs
629
+ - sig/trycourier/models/automation_template.rbs
630
+ - sig/trycourier/models/automation_template_list_response.rbs
610
631
  - sig/trycourier/models/automations/invoke_invoke_ad_hoc_params.rbs
611
632
  - sig/trycourier/models/automations/invoke_invoke_by_template_params.rbs
612
633
  - sig/trycourier/models/base_check.rbs
@@ -656,7 +677,6 @@ files:
656
677
  - sig/trycourier/models/email_header.rbs
657
678
  - sig/trycourier/models/expo.rbs
658
679
  - sig/trycourier/models/filter.rbs
659
- - sig/trycourier/models/filter_config.rbs
660
680
  - sig/trycourier/models/icons.rbs
661
681
  - sig/trycourier/models/inbound_bulk_message.rbs
662
682
  - sig/trycourier/models/inbound_bulk_message_user.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 FilterConfig
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,19 +0,0 @@
1
- # typed: strong
2
-
3
- module Trycourier
4
- module Models
5
- # A single filter to use for filtering
6
- module FilterConfig
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::FilterConfig::Variants]) }
15
- def self.variants
16
- end
17
- end
18
- end
19
- end
@@ -1,12 +0,0 @@
1
- module Trycourier
2
- module Models
3
- type filter_config =
4
- Trycourier::SingleFilterConfig | Trycourier::NestedFilterConfig
5
-
6
- module FilterConfig
7
- extend Trycourier::Internal::Type::Union
8
-
9
- def self?.variants: -> ::Array[Trycourier::Models::filter_config]
10
- end
11
- end
12
- end