trycourier 4.1.1 → 4.3.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: 8e4cbd3a31496565c8f183cc5d553fefabec5344ffc9fc0e25c0fc31f3619518
4
- data.tar.gz: ab8d64aaa03184998fd355fad664a232698c2267cccec97cd667ed8d1ee65d7b
3
+ metadata.gz: 90938239a2ad14d3834d90316b9e134aaa3f1173482cc20006a47281b169eaaf
4
+ data.tar.gz: 88885b2fe15f0a98fdfe61c5803795b8b717f93f2be1486332e07828466ab994
5
5
  SHA512:
6
- metadata.gz: 7a36254fc31b5ef58fb5005fbcd2e6040c631410e6aa512f0640701c8550eb59c65fe1b1b43f383705c67ed9efc6b24e86ca55520f2292e061e6013f7dac0cb9
7
- data.tar.gz: 4545ced25d89bbd2fd7cafe88b05d11d1c0b7a8d0a25248d24fa904d89d9707bca7dc2082835f9b02a47cb1c09e286a5c83ee87f553c95edd2b122a4d6ec0dea
6
+ metadata.gz: 6df42006118d203008458dcc1012e35f903e53039ee881d60cf90b532db7f9a2565f77ffe82a5dc32b1bf9508750470d2fbc88dc3f855abc477c2a3f0df6bf3c
7
+ data.tar.gz: 719003467281f8692c54d450e7830a85ab4470cb68e80eb2a2962acc46980999bf68a321f7e8afccbe85178909f2cee53e6a2a8295ee1104a6c931f6f1fb212f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.3.0 (2025-12-08)
4
+
5
+ Full Changelog: [v4.2.0...v4.3.0](https://github.com/trycourier/courier-ruby/compare/v4.2.0...v4.3.0)
6
+
7
+ ### Features
8
+
9
+ * Fix UsersGetAllTokensResponse to return object with tokens property i… ([dad98a1](https://github.com/trycourier/courier-ruby/commit/dad98a163d391bf45510d10c10d2d7597e1af74e))
10
+
11
+ ## 4.2.0 (2025-12-08)
12
+
13
+ Full Changelog: [v4.1.1...v4.2.0](https://github.com/trycourier/courier-ruby/compare/v4.1.1...v4.2.0)
14
+
15
+ ### Features
16
+
17
+ * Add event_ids field to Notification schema ([cbb73f5](https://github.com/trycourier/courier-ruby/commit/cbb73f50ae03cabc7b2023b6ed337cec5e6b7ad8))
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **client:** fix duplicate Go struct resulting from name derivations schema ([9e12a1e](https://github.com/trycourier/courier-ruby/commit/9e12a1ec6f4f230533c524e0c597159072664350))
23
+
3
24
  ## 4.1.1 (2025-12-02)
4
25
 
5
26
  Full Changelog: [v4.1.0...v4.1.1](https://github.com/trycourier/courier-ruby/compare/v4.1.0...v4.1.1)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "trycourier", "~> 4.1.1"
20
+ gem "trycourier", "~> 4.3.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -30,6 +30,12 @@ module Trycourier
30
30
  # @return [Integer]
31
31
  required :created_at, Integer
32
32
 
33
+ # @!attribute event_ids
34
+ # Array of event IDs associated with this notification
35
+ #
36
+ # @return [Array<String>]
37
+ required :event_ids, Trycourier::Internal::Type::ArrayOf[String]
38
+
33
39
  # @!attribute note
34
40
  #
35
41
  # @return [String]
@@ -60,14 +66,23 @@ module Trycourier
60
66
  # @return [String, nil]
61
67
  optional :title, String, nil?: true
62
68
 
63
- # @!method initialize(id:, created_at:, note:, routing:, topic_id:, updated_at:, tags: nil, title: nil)
69
+ # @!method initialize(id:, created_at:, event_ids:, note:, routing:, topic_id:, updated_at:, tags: nil, title: nil)
64
70
  # @param id [String]
71
+ #
65
72
  # @param created_at [Integer]
73
+ #
74
+ # @param event_ids [Array<String>] Array of event IDs associated with this notification
75
+ #
66
76
  # @param note [String]
77
+ #
67
78
  # @param routing [Trycourier::Models::MessageRouting]
79
+ #
68
80
  # @param topic_id [String]
81
+ #
69
82
  # @param updated_at [Integer]
83
+ #
70
84
  # @param tags [Trycourier::Models::NotificationListResponse::Result::Tags, nil]
85
+ #
71
86
  # @param title [String, nil]
72
87
 
73
88
  # @see Trycourier::Models::NotificationListResponse::Result#tags
@@ -3,8 +3,18 @@
3
3
  module Trycourier
4
4
  module Models
5
5
  module Users
6
- # @type [Trycourier::Internal::Type::Converter]
7
- TokenListResponse = Trycourier::Internal::Type::ArrayOf[-> { Trycourier::Users::UserToken }]
6
+ # @see Trycourier::Resources::Users::Tokens#list
7
+ class TokenListResponse < Trycourier::Internal::Type::BaseModel
8
+ # @!attribute tokens
9
+ #
10
+ # @return [Array<Trycourier::Models::Users::UserToken>]
11
+ required :tokens, -> { Trycourier::Internal::Type::ArrayOf[Trycourier::Users::UserToken] }
12
+
13
+ # @!method initialize(tokens:)
14
+ # A list of tokens registered with the user.
15
+ #
16
+ # @param tokens [Array<Trycourier::Models::Users::UserToken>]
17
+ end
8
18
  end
9
19
  end
10
20
  end
@@ -69,14 +69,14 @@ module Trycourier
69
69
  #
70
70
  # @param request_options [Trycourier::RequestOptions, Hash{Symbol=>Object}, nil]
71
71
  #
72
- # @return [Array<Trycourier::Models::Users::UserToken>]
72
+ # @return [Trycourier::Models::Users::TokenListResponse]
73
73
  #
74
74
  # @see Trycourier::Models::Users::TokenListParams
75
75
  def list(user_id, params = {})
76
76
  @client.request(
77
77
  method: :get,
78
78
  path: ["users/%1$s/tokens", user_id],
79
- model: Trycourier::Internal::Type::ArrayOf[Trycourier::Users::UserToken],
79
+ model: Trycourier::Models::Users::TokenListResponse,
80
80
  options: params[:request_options]
81
81
  )
82
82
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Trycourier
4
- VERSION = "4.1.1"
4
+ VERSION = "4.3.0"
5
5
  end
@@ -61,6 +61,10 @@ module Trycourier
61
61
  sig { returns(Integer) }
62
62
  attr_accessor :created_at
63
63
 
64
+ # Array of event IDs associated with this notification
65
+ sig { returns(T::Array[String]) }
66
+ attr_accessor :event_ids
67
+
64
68
  sig { returns(String) }
65
69
  attr_accessor :note
66
70
 
@@ -102,6 +106,7 @@ module Trycourier
102
106
  params(
103
107
  id: String,
104
108
  created_at: Integer,
109
+ event_ids: T::Array[String],
105
110
  note: String,
106
111
  routing: Trycourier::MessageRouting::OrHash,
107
112
  topic_id: String,
@@ -116,6 +121,8 @@ module Trycourier
116
121
  def self.new(
117
122
  id:,
118
123
  created_at:,
124
+ # Array of event IDs associated with this notification
125
+ event_ids:,
119
126
  note:,
120
127
  routing:,
121
128
  topic_id:,
@@ -130,6 +137,7 @@ module Trycourier
130
137
  {
131
138
  id: String,
132
139
  created_at: Integer,
140
+ event_ids: T::Array[String],
133
141
  note: String,
134
142
  routing: Trycourier::MessageRouting,
135
143
  topic_id: String,
@@ -3,11 +3,33 @@
3
3
  module Trycourier
4
4
  module Models
5
5
  module Users
6
- TokenListResponse =
7
- T.let(
8
- Trycourier::Internal::Type::ArrayOf[Trycourier::Users::UserToken],
9
- Trycourier::Internal::Type::Converter
10
- )
6
+ class TokenListResponse < Trycourier::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Trycourier::Models::Users::TokenListResponse,
11
+ Trycourier::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ sig { returns(T::Array[Trycourier::Users::UserToken]) }
16
+ attr_accessor :tokens
17
+
18
+ # A list of tokens registered with the user.
19
+ sig do
20
+ params(
21
+ tokens: T::Array[Trycourier::Users::UserToken::OrHash]
22
+ ).returns(T.attached_class)
23
+ end
24
+ def self.new(tokens:)
25
+ end
26
+
27
+ sig do
28
+ override.returns({ tokens: T::Array[Trycourier::Users::UserToken] })
29
+ end
30
+ def to_hash
31
+ end
32
+ end
11
33
  end
12
34
  end
13
35
  end
@@ -47,7 +47,7 @@ module Trycourier
47
47
  params(
48
48
  user_id: String,
49
49
  request_options: Trycourier::RequestOptions::OrHash
50
- ).returns(T::Array[Trycourier::Users::UserToken])
50
+ ).returns(Trycourier::Models::Users::TokenListResponse)
51
51
  end
52
52
  def list(
53
53
  # The user's ID. This can be any uniquely identifiable string.
@@ -25,6 +25,7 @@ module Trycourier
25
25
  {
26
26
  id: String,
27
27
  created_at: Integer,
28
+ event_ids: ::Array[String],
28
29
  note: String,
29
30
  routing: Trycourier::MessageRouting,
30
31
  topic_id: String,
@@ -38,6 +39,8 @@ module Trycourier
38
39
 
39
40
  attr_accessor created_at: Integer
40
41
 
42
+ attr_accessor event_ids: ::Array[String]
43
+
41
44
  attr_accessor note: String
42
45
 
43
46
  attr_accessor routing: Trycourier::MessageRouting
@@ -53,6 +56,7 @@ module Trycourier
53
56
  def initialize: (
54
57
  id: String,
55
58
  created_at: Integer,
59
+ event_ids: ::Array[String],
56
60
  note: String,
57
61
  routing: Trycourier::MessageRouting,
58
62
  topic_id: String,
@@ -64,6 +68,7 @@ module Trycourier
64
68
  def to_hash: -> {
65
69
  id: String,
66
70
  created_at: Integer,
71
+ event_ids: ::Array[String],
67
72
  note: String,
68
73
  routing: Trycourier::MessageRouting,
69
74
  topic_id: String,
@@ -1,9 +1,16 @@
1
1
  module Trycourier
2
2
  module Models
3
3
  module Users
4
- type token_list_response = ::Array[Trycourier::Users::UserToken]
4
+ type token_list_response =
5
+ { tokens: ::Array[Trycourier::Users::UserToken] }
5
6
 
6
- TokenListResponse: Trycourier::Internal::Type::Converter
7
+ class TokenListResponse < Trycourier::Internal::Type::BaseModel
8
+ attr_accessor tokens: ::Array[Trycourier::Users::UserToken]
9
+
10
+ def initialize: (tokens: ::Array[Trycourier::Users::UserToken]) -> void
11
+
12
+ def to_hash: -> { tokens: ::Array[Trycourier::Users::UserToken] }
13
+ end
7
14
  end
8
15
  end
9
16
  end
@@ -18,7 +18,7 @@ module Trycourier
18
18
  def list: (
19
19
  String user_id,
20
20
  ?request_options: Trycourier::request_opts
21
- ) -> Trycourier::Models::Users::token_list_response
21
+ ) -> Trycourier::Models::Users::TokenListResponse
22
22
 
23
23
  def delete: (
24
24
  String token,
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.1.1
4
+ version: 4.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Courier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-12-02 00:00:00.000000000 Z
11
+ date: 2025-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool