trycourier 3.4.0.pre.alpha9 → 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: f6b262d22f8b3baf507f1ec2099fa7e251bcd3af0fa826e18bdfe293082a3c04
4
- data.tar.gz: f5af66fa239ded8e0661050ed18ef5ef7c7064e1acb39a414f78cc1bbf9968de
3
+ metadata.gz: 2a4f027015d04ed359a86b062efcbc581ee5b5a73580490aa894f93aa5d26a3c
4
+ data.tar.gz: cb98bc6dd20c7212a25d3503c6f46dcee5177fb86ac9ac409b9ed3466d41cdc8
5
5
  SHA512:
6
- metadata.gz: 5157e487e5316da404b2932baa5750d0e8d2fb59cb55873dae6a9fb140d26b6c953a9e32dc06677aff7a32118a4b721dc162d3e7f87d66f4aa45d562e7a42964
7
- data.tar.gz: 74274de5d022bf22f4a878b15c537a08640c10d04da4b6c1dfd76125aded4becb5e9705966bf9ac95641672055c97966c15a403f43b511c890ed6f149e062580
6
+ metadata.gz: 83e592af437c4d50bbcfff2872a49fd97c1d3077304a147bc92ff7593fbf837fd21455bf3c2eb2aab728cab16076c5e3f1b2d8b655847103a4f3a1837276aa03
7
+ data.tar.gz: ea26ce25919e5f06128658854bec555fddd30641542f3fbfd02677a0c15823298c7782a10edf29f1055c45aac5d9b9a00c911298a85b729ee454c627434124d1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
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
+
13
+ ## 4.0.0 (2025-11-12)
14
+
15
+ Full Changelog: [v3.4.0-alpha9...v4.0.0](https://github.com/trycourier/courier-ruby/compare/v3.4.0-alpha9...v4.0.0)
16
+
17
+ ### Features
18
+
19
+ * Spec Comment Change ([b567eac](https://github.com/trycourier/courier-ruby/commit/b567eac8556068aa9fea18a1882330e741dda479))
20
+ * Token Prop Description Change ([cb884a1](https://github.com/trycourier/courier-ruby/commit/cb884a1830d2abaf81db27b14c60725c5792f0fa))
21
+
22
+
23
+ ### Chores
24
+
25
+ * update SDK settings ([3ad8ff3](https://github.com/trycourier/courier-ruby/commit/3ad8ff378645ccd3ecdf5a3b64ccfd8694901c67))
26
+
3
27
  ## 3.4.0-alpha9 (2025-11-07)
4
28
 
5
29
  Full Changelog: [v3.4.0-alpha8...v3.4.0-alpha9](https://github.com/trycourier/courier-ruby/compare/v3.4.0-alpha8...v3.4.0-alpha9)
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", "~> 3.4.0.pre.alpha9"
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
@@ -26,6 +26,12 @@ module Trycourier
26
26
  # @return [String, nil]
27
27
  optional :email, String, nil?: true
28
28
 
29
+ # @!attribute list_id
30
+ # The id of the list to send the message to.
31
+ #
32
+ # @return [String, nil]
33
+ optional :list_id, String, nil?: true
34
+
29
35
  # @!attribute locale
30
36
  # The user's preferred ISO 639-1 language code.
31
37
  #
@@ -56,7 +62,7 @@ module Trycourier
56
62
  # @return [String, nil]
57
63
  optional :user_id, String, nil?: true
58
64
 
59
- # @!method initialize(account_id: nil, context: nil, data: nil, email: nil, locale: nil, phone_number: nil, preferences: nil, tenant_id: nil, user_id: nil)
65
+ # @!method initialize(account_id: nil, context: nil, data: nil, email: nil, list_id: nil, locale: nil, phone_number: nil, preferences: nil, tenant_id: nil, user_id: nil)
60
66
  # Some parameter documentations has been truncated, see
61
67
  # {Trycourier::Models::Recipient} for more details.
62
68
  #
@@ -68,6 +74,8 @@ module Trycourier
68
74
  #
69
75
  # @param email [String, nil] The user's email address.
70
76
  #
77
+ # @param list_id [String, nil] The id of the list to send the message to.
78
+ #
71
79
  # @param locale [String, nil] The user's preferred ISO 639-1 language code.
72
80
  #
73
81
  # @param phone_number [String, nil] The user's phone number.
@@ -26,6 +26,12 @@ module Trycourier
26
26
  # @return [String, nil]
27
27
  optional :email, String, nil?: true
28
28
 
29
+ # @!attribute list_id
30
+ # The id of the list to send the message to.
31
+ #
32
+ # @return [String, nil]
33
+ optional :list_id, String, nil?: true
34
+
29
35
  # @!attribute locale
30
36
  # The user's preferred ISO 639-1 language code.
31
37
  #
@@ -56,7 +62,7 @@ module Trycourier
56
62
  # @return [String, nil]
57
63
  optional :user_id, String, nil?: true
58
64
 
59
- # @!method initialize(account_id: nil, context: nil, data: nil, email: nil, locale: nil, phone_number: nil, preferences: nil, tenant_id: nil, user_id: nil)
65
+ # @!method initialize(account_id: nil, context: nil, data: nil, email: nil, list_id: nil, locale: nil, phone_number: nil, preferences: nil, tenant_id: nil, user_id: nil)
60
66
  # Some parameter documentations has been truncated, see
61
67
  # {Trycourier::Models::UserRecipient} for more details.
62
68
  #
@@ -68,6 +74,8 @@ module Trycourier
68
74
  #
69
75
  # @param email [String, nil] The user's email address.
70
76
  #
77
+ # @param list_id [String, nil] The id of the list to send the message to.
78
+ #
71
79
  # @param locale [String, nil] The user's preferred ISO 639-1 language code.
72
80
  #
73
81
  # @param phone_number [String, nil] The user's phone number.
@@ -16,7 +16,7 @@ module Trycourier
16
16
  required :provider_key, enum: -> { Trycourier::Users::UserToken::ProviderKey }
17
17
 
18
18
  # @!attribute device
19
- # Information about the device the token is associated with.
19
+ # Information about the device the token came from.
20
20
  #
21
21
  # @return [Trycourier::Models::Users::UserToken::Device, nil]
22
22
  optional :device, -> { Trycourier::Users::UserToken::Device }, nil?: true
@@ -29,13 +29,13 @@ module Trycourier
29
29
  optional :expiry_date, union: -> { Trycourier::Users::UserToken::ExpiryDate }, nil?: true
30
30
 
31
31
  # @!attribute properties
32
- # Properties sent to the provider along with the token
32
+ # Properties about the token.
33
33
  #
34
34
  # @return [Object, nil]
35
35
  optional :properties, Trycourier::Internal::Type::Unknown
36
36
 
37
37
  # @!attribute tracking
38
- # Information about the device the token is associated with.
38
+ # Tracking information about the device the token came from.
39
39
  #
40
40
  # @return [Trycourier::Models::Users::UserToken::Tracking, nil]
41
41
  optional :tracking, -> { Trycourier::Users::UserToken::Tracking }, nil?: true
@@ -48,13 +48,13 @@ module Trycourier
48
48
  #
49
49
  # @param provider_key [Symbol, Trycourier::Models::Users::UserToken::ProviderKey]
50
50
  #
51
- # @param device [Trycourier::Models::Users::UserToken::Device, nil] Information about the device the token is associated with.
51
+ # @param device [Trycourier::Models::Users::UserToken::Device, nil] Information about the device the token came from.
52
52
  #
53
53
  # @param expiry_date [String, Boolean, nil] ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
54
54
  #
55
- # @param properties [Object] Properties sent to the provider along with the token
55
+ # @param properties [Object] Properties about the token.
56
56
  #
57
- # @param tracking [Trycourier::Models::Users::UserToken::Tracking, nil] Information about the device the token is associated with.
57
+ # @param tracking [Trycourier::Models::Users::UserToken::Tracking, nil] Tracking information about the device the token came from.
58
58
 
59
59
  # @see Trycourier::Models::Users::UserToken#provider_key
60
60
  module ProviderKey
@@ -108,7 +108,7 @@ module Trycourier
108
108
  optional :platform, String, nil?: true
109
109
 
110
110
  # @!method initialize(ad_id: nil, app_id: nil, device_id: nil, manufacturer: nil, model: nil, platform: nil)
111
- # Information about the device the token is associated with.
111
+ # Information about the device the token came from.
112
112
  #
113
113
  # @param ad_id [String, nil] Id of the advertising identifier
114
114
  #
@@ -165,7 +165,7 @@ module Trycourier
165
165
  optional :os_version, String, nil?: true
166
166
 
167
167
  # @!method initialize(ip: nil, lat: nil, long: nil, os_version: nil)
168
- # Information about the device the token is associated with.
168
+ # Tracking information about the device the token came from.
169
169
  #
170
170
  # @param ip [String, nil] The IP address of the device
171
171
  #
@@ -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
  #
@@ -143,13 +143,13 @@ module Trycourier
143
143
  #
144
144
  # @param provider_key [Symbol, Trycourier::Models::Users::UserToken::ProviderKey] Body param:
145
145
  #
146
- # @param device [Trycourier::Models::Users::UserToken::Device, nil] Body param: Information about the device the token is associated with.
146
+ # @param device [Trycourier::Models::Users::UserToken::Device, nil] Body param: Information about the device the token came from.
147
147
  #
148
148
  # @param expiry_date [String, Boolean, nil] Body param: ISO 8601 formatted date the token expires. Defaults to 2 months. Set
149
149
  #
150
- # @param properties [Object] Body param: Properties sent to the provider along with the token
150
+ # @param properties [Object] Body param: Properties about the token.
151
151
  #
152
- # @param tracking [Trycourier::Models::Users::UserToken::Tracking, nil] Body param: Information about the device the token is associated with.
152
+ # @param tracking [Trycourier::Models::Users::UserToken::Tracking, nil] Body param: Tracking information about the device the token came from.
153
153
  #
154
154
  # @param request_options [Trycourier::RequestOptions, Hash{Symbol=>Object}, nil]
155
155
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Trycourier
4
- VERSION = "3.4.0.pre.alpha9"
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
@@ -28,6 +28,10 @@ module Trycourier
28
28
  sig { returns(T.nilable(String)) }
29
29
  attr_accessor :email
30
30
 
31
+ # The id of the list to send the message to.
32
+ sig { returns(T.nilable(String)) }
33
+ attr_accessor :list_id
34
+
31
35
  # The user's preferred ISO 639-1 language code.
32
36
  sig { returns(T.nilable(String)) }
33
37
  attr_accessor :locale
@@ -61,6 +65,7 @@ module Trycourier
61
65
  context: T.nilable(Trycourier::MessageContext::OrHash),
62
66
  data: T.nilable(T::Hash[Symbol, T.anything]),
63
67
  email: T.nilable(String),
68
+ list_id: T.nilable(String),
64
69
  locale: T.nilable(String),
65
70
  phone_number: T.nilable(String),
66
71
  preferences: T.nilable(Trycourier::Recipient::Preferences::OrHash),
@@ -76,6 +81,8 @@ module Trycourier
76
81
  data: nil,
77
82
  # The user's email address.
78
83
  email: nil,
84
+ # The id of the list to send the message to.
85
+ list_id: nil,
79
86
  # The user's preferred ISO 639-1 language code.
80
87
  locale: nil,
81
88
  # The user's phone number.
@@ -96,6 +103,7 @@ module Trycourier
96
103
  context: T.nilable(Trycourier::MessageContext),
97
104
  data: T.nilable(T::Hash[Symbol, T.anything]),
98
105
  email: T.nilable(String),
106
+ list_id: T.nilable(String),
99
107
  locale: T.nilable(String),
100
108
  phone_number: T.nilable(String),
101
109
  preferences: T.nilable(Trycourier::Recipient::Preferences),
@@ -28,6 +28,10 @@ module Trycourier
28
28
  sig { returns(T.nilable(String)) }
29
29
  attr_accessor :email
30
30
 
31
+ # The id of the list to send the message to.
32
+ sig { returns(T.nilable(String)) }
33
+ attr_accessor :list_id
34
+
31
35
  # The user's preferred ISO 639-1 language code.
32
36
  sig { returns(T.nilable(String)) }
33
37
  attr_accessor :locale
@@ -61,6 +65,7 @@ module Trycourier
61
65
  context: T.nilable(Trycourier::MessageContext::OrHash),
62
66
  data: T.nilable(T::Hash[Symbol, T.anything]),
63
67
  email: T.nilable(String),
68
+ list_id: T.nilable(String),
64
69
  locale: T.nilable(String),
65
70
  phone_number: T.nilable(String),
66
71
  preferences:
@@ -77,6 +82,8 @@ module Trycourier
77
82
  data: nil,
78
83
  # The user's email address.
79
84
  email: nil,
85
+ # The id of the list to send the message to.
86
+ list_id: nil,
80
87
  # The user's preferred ISO 639-1 language code.
81
88
  locale: nil,
82
89
  # The user's phone number.
@@ -97,6 +104,7 @@ module Trycourier
97
104
  context: T.nilable(Trycourier::MessageContext),
98
105
  data: T.nilable(T::Hash[Symbol, T.anything]),
99
106
  email: T.nilable(String),
107
+ list_id: T.nilable(String),
100
108
  locale: T.nilable(String),
101
109
  phone_number: T.nilable(String),
102
110
  preferences: T.nilable(Trycourier::UserRecipient::Preferences),
@@ -18,7 +18,7 @@ module Trycourier
18
18
  sig { returns(Trycourier::Users::UserToken::ProviderKey::TaggedSymbol) }
19
19
  attr_accessor :provider_key
20
20
 
21
- # Information about the device the token is associated with.
21
+ # Information about the device the token came from.
22
22
  sig { returns(T.nilable(Trycourier::Users::UserToken::Device)) }
23
23
  attr_reader :device
24
24
 
@@ -36,14 +36,14 @@ module Trycourier
36
36
  end
37
37
  attr_accessor :expiry_date
38
38
 
39
- # Properties sent to the provider along with the token
39
+ # Properties about the token.
40
40
  sig { returns(T.nilable(T.anything)) }
41
41
  attr_reader :properties
42
42
 
43
43
  sig { params(properties: T.anything).void }
44
44
  attr_writer :properties
45
45
 
46
- # Information about the device the token is associated with.
46
+ # Tracking information about the device the token came from.
47
47
  sig { returns(T.nilable(Trycourier::Users::UserToken::Tracking)) }
48
48
  attr_reader :tracking
49
49
 
@@ -69,14 +69,14 @@ module Trycourier
69
69
  # Full body of the token. Must match token in URL path parameter.
70
70
  token:,
71
71
  provider_key:,
72
- # Information about the device the token is associated with.
72
+ # Information about the device the token came from.
73
73
  device: nil,
74
74
  # ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
75
75
  # disable expiration.
76
76
  expiry_date: nil,
77
- # Properties sent to the provider along with the token
77
+ # Properties about the token.
78
78
  properties: nil,
79
- # Information about the device the token is associated with.
79
+ # Tracking information about the device the token came from.
80
80
  tracking: nil
81
81
  )
82
82
  end
@@ -167,7 +167,7 @@ module Trycourier
167
167
  sig { returns(T.nilable(String)) }
168
168
  attr_accessor :platform
169
169
 
170
- # Information about the device the token is associated with.
170
+ # Information about the device the token came from.
171
171
  sig do
172
172
  params(
173
173
  ad_id: T.nilable(String),
@@ -251,7 +251,7 @@ module Trycourier
251
251
  sig { returns(T.nilable(String)) }
252
252
  attr_accessor :os_version
253
253
 
254
- # Information about the device the token is associated with.
254
+ # Tracking information about the device the token came from.
255
255
  sig do
256
256
  params(
257
257
  ip: T.nilable(String),
@@ -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,
@@ -111,14 +111,14 @@ module Trycourier
111
111
  body_token:,
112
112
  # Body param:
113
113
  provider_key:,
114
- # Body param: Information about the device the token is associated with.
114
+ # Body param: Information about the device the token came from.
115
115
  device: nil,
116
116
  # Body param: ISO 8601 formatted date the token expires. Defaults to 2 months. Set
117
117
  # to false to disable expiration.
118
118
  expiry_date: nil,
119
- # Body param: Properties sent to the provider along with the token
119
+ # Body param: Properties about the token.
120
120
  properties: nil,
121
- # Body param: Information about the device the token is associated with.
121
+ # Body param: Tracking information about the device the token came from.
122
122
  tracking: nil,
123
123
  request_options: {}
124
124
  )
@@ -6,6 +6,7 @@ module Trycourier
6
6
  context: Trycourier::MessageContext?,
7
7
  data: ::Hash[Symbol, top]?,
8
8
  email: String?,
9
+ list_id: String?,
9
10
  locale: String?,
10
11
  phone_number: String?,
11
12
  preferences: Trycourier::Recipient::Preferences?,
@@ -22,6 +23,8 @@ module Trycourier
22
23
 
23
24
  attr_accessor email: String?
24
25
 
26
+ attr_accessor list_id: String?
27
+
25
28
  attr_accessor locale: String?
26
29
 
27
30
  attr_accessor phone_number: String?
@@ -37,6 +40,7 @@ module Trycourier
37
40
  ?context: Trycourier::MessageContext?,
38
41
  ?data: ::Hash[Symbol, top]?,
39
42
  ?email: String?,
43
+ ?list_id: String?,
40
44
  ?locale: String?,
41
45
  ?phone_number: String?,
42
46
  ?preferences: Trycourier::Recipient::Preferences?,
@@ -49,6 +53,7 @@ module Trycourier
49
53
  context: Trycourier::MessageContext?,
50
54
  data: ::Hash[Symbol, top]?,
51
55
  email: String?,
56
+ list_id: String?,
52
57
  locale: String?,
53
58
  phone_number: String?,
54
59
  preferences: Trycourier::Recipient::Preferences?,
@@ -6,6 +6,7 @@ module Trycourier
6
6
  context: Trycourier::MessageContext?,
7
7
  data: ::Hash[Symbol, top]?,
8
8
  email: String?,
9
+ list_id: String?,
9
10
  locale: String?,
10
11
  phone_number: String?,
11
12
  preferences: Trycourier::UserRecipient::Preferences?,
@@ -22,6 +23,8 @@ module Trycourier
22
23
 
23
24
  attr_accessor email: String?
24
25
 
26
+ attr_accessor list_id: String?
27
+
25
28
  attr_accessor locale: String?
26
29
 
27
30
  attr_accessor phone_number: String?
@@ -37,6 +40,7 @@ module Trycourier
37
40
  ?context: Trycourier::MessageContext?,
38
41
  ?data: ::Hash[Symbol, top]?,
39
42
  ?email: String?,
43
+ ?list_id: String?,
40
44
  ?locale: String?,
41
45
  ?phone_number: String?,
42
46
  ?preferences: Trycourier::UserRecipient::Preferences?,
@@ -49,6 +53,7 @@ module Trycourier
49
53
  context: Trycourier::MessageContext?,
50
54
  data: ::Hash[Symbol, top]?,
51
55
  email: String?,
56
+ list_id: String?,
52
57
  locale: String?,
53
58
  phone_number: String?,
54
59
  preferences: Trycourier::UserRecipient::Preferences?,
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: 3.4.0.pre.alpha9
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-07 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
@@ -726,9 +726,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
726
726
  version: 3.2.0
727
727
  required_rubygems_version: !ruby/object:Gem::Requirement
728
728
  requirements:
729
- - - ">"
729
+ - - ">="
730
730
  - !ruby/object:Gem::Version
731
- version: 1.3.1
731
+ version: '0'
732
732
  requirements: []
733
733
  rubygems_version: 3.4.1
734
734
  signing_key: