trycourier 4.5.0 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50b24baf1344688ba29d949d04f66b3841f3272ab0db0e353d9364a3441d39b6
4
- data.tar.gz: a0b247a913ade31c0aa104718b3607a5546367a3f69febb9a2d377d68e6dbe0b
3
+ metadata.gz: 8f245290616d8bf259ac1cede4dc337f5f14ec04d8d527d96a630b854a6bb3f6
4
+ data.tar.gz: 859658f71041732efff2b2a4122e4cc493878077bcbc7c769fc1158210ede6b6
5
5
  SHA512:
6
- metadata.gz: 4549c791b9b0c8b1f26cca857c6ea4fccacb889d13fce5a75976f4436c987d52ef43e31c1085f79eb645f325f31263c239f1a5d2dc88c79275483137805e0928
7
- data.tar.gz: dfc09375e3facc38b137ed1da33b7b3624751c8e10727d333f00d27fe9efddcf34a83e337aa4dfcfc0cc988f04a48f393b74437e00fb992544bc43710a6ba5ca
6
+ metadata.gz: 26091252593b2a6526080c3b11bb9b04aa7cff078329cd19f274d8650d97ad6ee590debcb1896c34c339229c578a7deac57d42ae1f2ac53743796a90889fbefd
7
+ data.tar.gz: ae438abbbb1d3346d10be702d37e0fac2be5ec5a1242dc80992228b0c87375655e50ec42dfb2e657825db73d4974d7a89c46737f81e28114c84bf06b6bc75bb5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.6.0 (2026-01-08)
4
+
5
+ Full Changelog: [v4.5.0...v4.6.0](https://github.com/trycourier/courier-ruby/compare/v4.5.0...v4.6.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** remove audit_events, automations, brands, bulk, inbound, translations endpoints ([f9f04c1](https://github.com/trycourier/courier-ruby/commit/f9f04c1760b4dceb5ed966449ddb19cd4bc72182))
10
+
3
11
  ## 4.5.0 (2025-12-29)
4
12
 
5
13
  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.0"
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
@@ -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
@@ -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]
@@ -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.0"
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"
@@ -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
@@ -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 =
@@ -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:)
@@ -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
@@ -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
@@ -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,14 +1,14 @@
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.0
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-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool
@@ -76,6 +76,9 @@ files:
76
76
  - lib/trycourier/models/auth_issue_token_params.rb
77
77
  - lib/trycourier/models/auth_issue_token_response.rb
78
78
  - lib/trycourier/models/automation_invoke_response.rb
79
+ - lib/trycourier/models/automation_list_params.rb
80
+ - lib/trycourier/models/automation_template.rb
81
+ - lib/trycourier/models/automation_template_list_response.rb
79
82
  - lib/trycourier/models/automations/invoke_invoke_ad_hoc_params.rb
80
83
  - lib/trycourier/models/automations/invoke_invoke_by_template_params.rb
81
84
  - lib/trycourier/models/base_check.rb
@@ -342,6 +345,9 @@ files:
342
345
  - rbi/trycourier/models/auth_issue_token_params.rbi
343
346
  - rbi/trycourier/models/auth_issue_token_response.rbi
344
347
  - rbi/trycourier/models/automation_invoke_response.rbi
348
+ - rbi/trycourier/models/automation_list_params.rbi
349
+ - rbi/trycourier/models/automation_template.rbi
350
+ - rbi/trycourier/models/automation_template_list_response.rbi
345
351
  - rbi/trycourier/models/automations/invoke_invoke_ad_hoc_params.rbi
346
352
  - rbi/trycourier/models/automations/invoke_invoke_by_template_params.rbi
347
353
  - rbi/trycourier/models/base_check.rbi
@@ -607,6 +613,9 @@ files:
607
613
  - sig/trycourier/models/auth_issue_token_params.rbs
608
614
  - sig/trycourier/models/auth_issue_token_response.rbs
609
615
  - sig/trycourier/models/automation_invoke_response.rbs
616
+ - sig/trycourier/models/automation_list_params.rbs
617
+ - sig/trycourier/models/automation_template.rbs
618
+ - sig/trycourier/models/automation_template_list_response.rbs
610
619
  - sig/trycourier/models/automations/invoke_invoke_ad_hoc_params.rbs
611
620
  - sig/trycourier/models/automations/invoke_invoke_by_template_params.rbs
612
621
  - sig/trycourier/models/base_check.rbs