trycourier 4.0.0 → 4.1.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: ea2404c89e513c6edbd7266b26273fc582d30ba791ad01c6302c69fa617d9056
4
- data.tar.gz: 779e524afaab09c6ce8ad61f16f7df393e43c37700e115e4e1ea09f68c494a6e
3
+ metadata.gz: 2a4f027015d04ed359a86b062efcbc581ee5b5a73580490aa894f93aa5d26a3c
4
+ data.tar.gz: cb98bc6dd20c7212a25d3503c6f46dcee5177fb86ac9ac409b9ed3466d41cdc8
5
5
  SHA512:
6
- metadata.gz: 2a7b4546cb947275415973788acb30e65c80921f3d188f2d0ecd7040236d79bab868f7fb27376893632196cb4144c78e86ab5bbc25284c2efd764e99aa6ec333
7
- data.tar.gz: 191e3e880ed1fe9a6fc2c402f1f0afef8193fe60f0a1a8f68df3247ff83aafc8210bfa0a8daf49715e8544f4d9dedd47c058615fec3eca59cb83d35c101653f3
6
+ metadata.gz: 83e592af437c4d50bbcfff2872a49fd97c1d3077304a147bc92ff7593fbf837fd21455bf3c2eb2aab728cab16076c5e3f1b2d8b655847103a4f3a1837276aa03
7
+ data.tar.gz: ea26ce25919e5f06128658854bec555fddd30641542f3fbfd02677a0c15823298c7782a10edf29f1055c45aac5d9b9a00c911298a85b729ee454c627434124d1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.1.0 (2025-11-18)
4
+
5
+ Full Changelog: [v4.0.0...v4.1.0](https://github.com/trycourier/courier-ruby/compare/v4.0.0...v4.1.0)
6
+
7
+ ### Features
8
+
9
+ * JWT scope updates ([4d36db2](https://github.com/trycourier/courier-ruby/commit/4d36db263ca5cdb2749a1f118b43021d0848cb7a))
10
+ * NPM enabled ([4f2235d](https://github.com/trycourier/courier-ruby/commit/4f2235d54287d1792ecc6ffae986510e1deb47a4))
11
+ * Test ([dbc83af](https://github.com/trycourier/courier-ruby/commit/dbc83af1bb3c96f874766e751e21ca051cc5d4c4))
12
+
3
13
  ## 4.0.0 (2025-11-12)
4
14
 
5
15
  Full Changelog: [v3.4.0-alpha9...v4.0.0](https://github.com/trycourier/courier-ruby/compare/v3.4.0-alpha9...v4.0.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.0.0"
20
+ gem "trycourier", "~> 4.1.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -8,18 +8,49 @@ module Trycourier
8
8
  include Trycourier::Internal::Type::RequestParameters
9
9
 
10
10
  # @!attribute expires_in
11
+ # Duration for token expiration. Accepts various time formats:
12
+ #
13
+ # - "2 hours" - 2 hours from now
14
+ # - "1d" - 1 day
15
+ # - "3 days" - 3 days
16
+ # - "10h" - 10 hours
17
+ # - "2.5 hrs" - 2.5 hours
18
+ # - "1m" - 1 minute
19
+ # - "5s" - 5 seconds
20
+ # - "1y" - 1 year
11
21
  #
12
22
  # @return [String]
13
23
  required :expires_in, String
14
24
 
15
25
  # @!attribute scope
26
+ # Available scopes:
27
+ #
28
+ # - `user_id:<user-id>` - Defines which user the token will be scoped to. Multiple
29
+ # can be listed if needed. Ex `user_id:pigeon user_id:bluebird`.
30
+ # - `read:messages` - Read messages.
31
+ # - `read:user-tokens` - Read user push tokens.
32
+ # - `write:user-tokens` - Write user push tokens.
33
+ # - `read:brands[:<brand_id>]` - Read brands, optionally restricted to a specific
34
+ # brand_id. Examples `read:brands`, `read:brands:my_brand`.
35
+ # - `write:brands[:<brand_id>]` - Write brands, optionally restricted to a
36
+ # specific brand_id. Examples `write:brands`, `write:brands:my_brand`.
37
+ # - `inbox:read:messages` - Read inbox messages.
38
+ # - `inbox:write:events` - Write inbox events, such as mark message as read.
39
+ # - `read:preferences` - Read user preferences.
40
+ # - `write:preferences` - Write user preferences. Example:
41
+ # `user_id:user123 write:user-tokens inbox:read:messages inbox:write:events read:preferences write:preferences read:brands`
16
42
  #
17
43
  # @return [String]
18
44
  required :scope, String
19
45
 
20
46
  # @!method initialize(expires_in:, scope:, request_options: {})
21
- # @param expires_in [String]
22
- # @param scope [String]
47
+ # Some parameter documentations has been truncated, see
48
+ # {Trycourier::Models::AuthIssueTokenParams} for more details.
49
+ #
50
+ # @param expires_in [String] Duration for token expiration. Accepts various time formats:
51
+ #
52
+ # @param scope [String] Available scopes:
53
+ #
23
54
  # @param request_options [Trycourier::RequestOptions, Hash{Symbol=>Object}]
24
55
  end
25
56
  end
@@ -3,12 +3,17 @@
3
3
  module Trycourier
4
4
  module Resources
5
5
  class Auth
6
+ # Some parameter documentations has been truncated, see
7
+ # {Trycourier::Models::AuthIssueTokenParams} for more details.
8
+ #
6
9
  # Returns a new access token.
7
10
  #
8
11
  # @overload issue_token(expires_in:, scope:, request_options: {})
9
12
  #
10
- # @param expires_in [String]
11
- # @param scope [String]
13
+ # @param expires_in [String] Duration for token expiration. Accepts various time formats:
14
+ #
15
+ # @param scope [String] Available scopes:
16
+ #
12
17
  # @param request_options [Trycourier::RequestOptions, Hash{Symbol=>Object}, nil]
13
18
  #
14
19
  # @return [Trycourier::Models::AuthIssueTokenResponse]
@@ -6,7 +6,7 @@ module Trycourier
6
6
  # Some parameter documentations has been truncated, see
7
7
  # {Trycourier::Models::SendMessageParams} for more details.
8
8
  #
9
- # API to send a message to one or more recipients.
9
+ # Send a message to one or more recipients.
10
10
  #
11
11
  # @overload message(message:, request_options: {})
12
12
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Trycourier
4
- VERSION = "4.0.0"
4
+ VERSION = "4.1.0"
5
5
  end
@@ -11,9 +11,35 @@ module Trycourier
11
11
  T.any(Trycourier::AuthIssueTokenParams, Trycourier::Internal::AnyHash)
12
12
  end
13
13
 
14
+ # Duration for token expiration. Accepts various time formats:
15
+ #
16
+ # - "2 hours" - 2 hours from now
17
+ # - "1d" - 1 day
18
+ # - "3 days" - 3 days
19
+ # - "10h" - 10 hours
20
+ # - "2.5 hrs" - 2.5 hours
21
+ # - "1m" - 1 minute
22
+ # - "5s" - 5 seconds
23
+ # - "1y" - 1 year
14
24
  sig { returns(String) }
15
25
  attr_accessor :expires_in
16
26
 
27
+ # Available scopes:
28
+ #
29
+ # - `user_id:<user-id>` - Defines which user the token will be scoped to. Multiple
30
+ # can be listed if needed. Ex `user_id:pigeon user_id:bluebird`.
31
+ # - `read:messages` - Read messages.
32
+ # - `read:user-tokens` - Read user push tokens.
33
+ # - `write:user-tokens` - Write user push tokens.
34
+ # - `read:brands[:<brand_id>]` - Read brands, optionally restricted to a specific
35
+ # brand_id. Examples `read:brands`, `read:brands:my_brand`.
36
+ # - `write:brands[:<brand_id>]` - Write brands, optionally restricted to a
37
+ # specific brand_id. Examples `write:brands`, `write:brands:my_brand`.
38
+ # - `inbox:read:messages` - Read inbox messages.
39
+ # - `inbox:write:events` - Write inbox events, such as mark message as read.
40
+ # - `read:preferences` - Read user preferences.
41
+ # - `write:preferences` - Write user preferences. Example:
42
+ # `user_id:user123 write:user-tokens inbox:read:messages inbox:write:events read:preferences write:preferences read:brands`
17
43
  sig { returns(String) }
18
44
  attr_accessor :scope
19
45
 
@@ -24,7 +50,37 @@ module Trycourier
24
50
  request_options: Trycourier::RequestOptions::OrHash
25
51
  ).returns(T.attached_class)
26
52
  end
27
- def self.new(expires_in:, scope:, request_options: {})
53
+ def self.new(
54
+ # Duration for token expiration. Accepts various time formats:
55
+ #
56
+ # - "2 hours" - 2 hours from now
57
+ # - "1d" - 1 day
58
+ # - "3 days" - 3 days
59
+ # - "10h" - 10 hours
60
+ # - "2.5 hrs" - 2.5 hours
61
+ # - "1m" - 1 minute
62
+ # - "5s" - 5 seconds
63
+ # - "1y" - 1 year
64
+ expires_in:,
65
+ # Available scopes:
66
+ #
67
+ # - `user_id:<user-id>` - Defines which user the token will be scoped to. Multiple
68
+ # can be listed if needed. Ex `user_id:pigeon user_id:bluebird`.
69
+ # - `read:messages` - Read messages.
70
+ # - `read:user-tokens` - Read user push tokens.
71
+ # - `write:user-tokens` - Write user push tokens.
72
+ # - `read:brands[:<brand_id>]` - Read brands, optionally restricted to a specific
73
+ # brand_id. Examples `read:brands`, `read:brands:my_brand`.
74
+ # - `write:brands[:<brand_id>]` - Write brands, optionally restricted to a
75
+ # specific brand_id. Examples `write:brands`, `write:brands:my_brand`.
76
+ # - `inbox:read:messages` - Read inbox messages.
77
+ # - `inbox:write:events` - Write inbox events, such as mark message as read.
78
+ # - `read:preferences` - Read user preferences.
79
+ # - `write:preferences` - Write user preferences. Example:
80
+ # `user_id:user123 write:user-tokens inbox:read:messages inbox:write:events read:preferences write:preferences read:brands`
81
+ scope:,
82
+ request_options: {}
83
+ )
28
84
  end
29
85
 
30
86
  sig do
@@ -11,7 +11,37 @@ module Trycourier
11
11
  request_options: Trycourier::RequestOptions::OrHash
12
12
  ).returns(Trycourier::Models::AuthIssueTokenResponse)
13
13
  end
14
- def issue_token(expires_in:, scope:, request_options: {})
14
+ def issue_token(
15
+ # Duration for token expiration. Accepts various time formats:
16
+ #
17
+ # - "2 hours" - 2 hours from now
18
+ # - "1d" - 1 day
19
+ # - "3 days" - 3 days
20
+ # - "10h" - 10 hours
21
+ # - "2.5 hrs" - 2.5 hours
22
+ # - "1m" - 1 minute
23
+ # - "5s" - 5 seconds
24
+ # - "1y" - 1 year
25
+ expires_in:,
26
+ # Available scopes:
27
+ #
28
+ # - `user_id:<user-id>` - Defines which user the token will be scoped to. Multiple
29
+ # can be listed if needed. Ex `user_id:pigeon user_id:bluebird`.
30
+ # - `read:messages` - Read messages.
31
+ # - `read:user-tokens` - Read user push tokens.
32
+ # - `write:user-tokens` - Write user push tokens.
33
+ # - `read:brands[:<brand_id>]` - Read brands, optionally restricted to a specific
34
+ # brand_id. Examples `read:brands`, `read:brands:my_brand`.
35
+ # - `write:brands[:<brand_id>]` - Write brands, optionally restricted to a
36
+ # specific brand_id. Examples `write:brands`, `write:brands:my_brand`.
37
+ # - `inbox:read:messages` - Read inbox messages.
38
+ # - `inbox:write:events` - Write inbox events, such as mark message as read.
39
+ # - `read:preferences` - Read user preferences.
40
+ # - `write:preferences` - Write user preferences. Example:
41
+ # `user_id:user123 write:user-tokens inbox:read:messages inbox:write:events read:preferences write:preferences read:brands`
42
+ scope:,
43
+ request_options: {}
44
+ )
15
45
  end
16
46
 
17
47
  # @api private
@@ -3,7 +3,7 @@
3
3
  module Trycourier
4
4
  module Resources
5
5
  class Send
6
- # API to send a message to one or more recipients.
6
+ # Send a message to one or more recipients.
7
7
  sig do
8
8
  params(
9
9
  message: Trycourier::SendMessageParams::Message::OrHash,
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.0.0
4
+ version: 4.1.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-11-12 00:00:00.000000000 Z
11
+ date: 2025-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool