trycourier 4.13.0 → 4.14.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 +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/courier/models/users/preference_delete_topic_params.rb +38 -0
- data/lib/courier/resources/users/preferences.rb +36 -0
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +1 -0
- data/rbi/courier/models/users/preference_delete_topic_params.rbi +60 -0
- data/rbi/courier/resources/users/preferences.rbi +23 -0
- data/sig/courier/models/users/preference_delete_topic_params.rbs +34 -0
- data/sig/courier/resources/users/preferences.rbs +7 -0
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 62e50b0f394c9b71492f5a8edcf141e73349df61df527661a0e43660de5540d9
|
|
4
|
+
data.tar.gz: a9e4059917b03248a4fbbc198d1f3c809a4130b0ed39642be34c682b0d165eda
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eb6d9b6d9b9edf0a1c51ad9305366b6e7a5a1cea3d8fa59a126c9f59d87b1108b3b17f0bb8ce00374692df294c69153389b08810527904f0b774086ffb54d71a
|
|
7
|
+
data.tar.gz: 498be96be04f5399ec5a6395e00b2f1a41e70983ea2d980657b231080fac0fc5b2f2165197bc3030a85b68767434b505f1da6aa649c95c692dae41b913a29903
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.14.0 (2026-06-16)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v4.13.0...v4.14.0](https://github.com/trycourier/courier-ruby/compare/v4.13.0...v4.14.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **openapi:** add DELETE /users/{id}/preferences/{topicId} ([417d5c8](https://github.com/trycourier/courier-ruby/commit/417d5c8d2e96bbb345d08908d35e3f3b4b6b7172))
|
|
10
|
+
|
|
3
11
|
## 4.13.0 (2026-06-12)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v4.12.0...v4.13.0](https://github.com/trycourier/courier-ruby/compare/v4.12.0...v4.13.0)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Users
|
|
6
|
+
# @see Courier::Resources::Users::Preferences#delete_topic
|
|
7
|
+
class PreferenceDeleteTopicParams < Courier::Internal::Type::BaseModel
|
|
8
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Courier::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute user_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :user_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute topic_id
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :topic_id, String
|
|
20
|
+
|
|
21
|
+
# @!attribute tenant_id
|
|
22
|
+
# Delete the preferences of a user for this specific tenant context.
|
|
23
|
+
#
|
|
24
|
+
# @return [String, nil]
|
|
25
|
+
optional :tenant_id, String, nil?: true
|
|
26
|
+
|
|
27
|
+
# @!method initialize(user_id:, topic_id:, tenant_id: nil, request_options: {})
|
|
28
|
+
# @param user_id [String]
|
|
29
|
+
#
|
|
30
|
+
# @param topic_id [String]
|
|
31
|
+
#
|
|
32
|
+
# @param tenant_id [String, nil] Delete the preferences of a user for this specific tenant context.
|
|
33
|
+
#
|
|
34
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -32,6 +32,42 @@ module Courier
|
|
|
32
32
|
)
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
# Some parameter documentations has been truncated, see
|
|
36
|
+
# {Courier::Models::Users::PreferenceDeleteTopicParams} for more details.
|
|
37
|
+
#
|
|
38
|
+
# Remove a user's preferences for a specific subscription topic, resetting the
|
|
39
|
+
# topic to its effective default. This operation is idempotent: deleting a
|
|
40
|
+
# preference that does not exist succeeds with no error.
|
|
41
|
+
#
|
|
42
|
+
# @overload delete_topic(topic_id, user_id:, tenant_id: nil, request_options: {})
|
|
43
|
+
#
|
|
44
|
+
# @param topic_id [String] Path param: A unique identifier associated with a subscription topic.
|
|
45
|
+
#
|
|
46
|
+
# @param user_id [String] Path param: A unique identifier associated with the user whose preferences you w
|
|
47
|
+
#
|
|
48
|
+
# @param tenant_id [String, nil] Query param: Delete the preferences of a user for this specific tenant context.
|
|
49
|
+
#
|
|
50
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
51
|
+
#
|
|
52
|
+
# @return [nil]
|
|
53
|
+
#
|
|
54
|
+
# @see Courier::Models::Users::PreferenceDeleteTopicParams
|
|
55
|
+
def delete_topic(topic_id, params)
|
|
56
|
+
parsed, options = Courier::Users::PreferenceDeleteTopicParams.dump_request(params)
|
|
57
|
+
query = Courier::Internal::Util.encode_query_params(parsed)
|
|
58
|
+
user_id =
|
|
59
|
+
parsed.delete(:user_id) do
|
|
60
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
61
|
+
end
|
|
62
|
+
@client.request(
|
|
63
|
+
method: :delete,
|
|
64
|
+
path: ["users/%1$s/preferences/%2$s", user_id, topic_id],
|
|
65
|
+
query: query,
|
|
66
|
+
model: NilClass,
|
|
67
|
+
options: options
|
|
68
|
+
)
|
|
69
|
+
end
|
|
70
|
+
|
|
35
71
|
# Some parameter documentations has been truncated, see
|
|
36
72
|
# {Courier::Models::Users::PreferenceRetrieveTopicParams} for more details.
|
|
37
73
|
#
|
data/lib/courier/version.rb
CHANGED
data/lib/courier.rb
CHANGED
|
@@ -356,6 +356,7 @@ require_relative "courier/models/translation_update_params"
|
|
|
356
356
|
require_relative "courier/models/user_profile"
|
|
357
357
|
require_relative "courier/models/user_profile_firebase_token"
|
|
358
358
|
require_relative "courier/models/user_recipient"
|
|
359
|
+
require_relative "courier/models/users/preference_delete_topic_params"
|
|
359
360
|
require_relative "courier/models/users/preference_retrieve_params"
|
|
360
361
|
require_relative "courier/models/users/preference_retrieve_response"
|
|
361
362
|
require_relative "courier/models/users/preference_retrieve_topic_params"
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Users
|
|
6
|
+
class PreferenceDeleteTopicParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Courier::Users::PreferenceDeleteTopicParams,
|
|
14
|
+
Courier::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :user_id
|
|
20
|
+
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :topic_id
|
|
23
|
+
|
|
24
|
+
# Delete the preferences of a user for this specific tenant context.
|
|
25
|
+
sig { returns(T.nilable(String)) }
|
|
26
|
+
attr_accessor :tenant_id
|
|
27
|
+
|
|
28
|
+
sig do
|
|
29
|
+
params(
|
|
30
|
+
user_id: String,
|
|
31
|
+
topic_id: String,
|
|
32
|
+
tenant_id: T.nilable(String),
|
|
33
|
+
request_options: Courier::RequestOptions::OrHash
|
|
34
|
+
).returns(T.attached_class)
|
|
35
|
+
end
|
|
36
|
+
def self.new(
|
|
37
|
+
user_id:,
|
|
38
|
+
topic_id:,
|
|
39
|
+
# Delete the preferences of a user for this specific tenant context.
|
|
40
|
+
tenant_id: nil,
|
|
41
|
+
request_options: {}
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
sig do
|
|
46
|
+
override.returns(
|
|
47
|
+
{
|
|
48
|
+
user_id: String,
|
|
49
|
+
topic_id: String,
|
|
50
|
+
tenant_id: T.nilable(String),
|
|
51
|
+
request_options: Courier::RequestOptions
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
def to_hash
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -22,6 +22,29 @@ module Courier
|
|
|
22
22
|
)
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
+
# Remove a user's preferences for a specific subscription topic, resetting the
|
|
26
|
+
# topic to its effective default. This operation is idempotent: deleting a
|
|
27
|
+
# preference that does not exist succeeds with no error.
|
|
28
|
+
sig do
|
|
29
|
+
params(
|
|
30
|
+
topic_id: String,
|
|
31
|
+
user_id: String,
|
|
32
|
+
tenant_id: T.nilable(String),
|
|
33
|
+
request_options: Courier::RequestOptions::OrHash
|
|
34
|
+
).void
|
|
35
|
+
end
|
|
36
|
+
def delete_topic(
|
|
37
|
+
# Path param: A unique identifier associated with a subscription topic.
|
|
38
|
+
topic_id,
|
|
39
|
+
# Path param: A unique identifier associated with the user whose preferences you
|
|
40
|
+
# wish to delete.
|
|
41
|
+
user_id:,
|
|
42
|
+
# Query param: Delete the preferences of a user for this specific tenant context.
|
|
43
|
+
tenant_id: nil,
|
|
44
|
+
request_options: {}
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
|
|
25
48
|
# Fetch user preferences for a specific subscription topic.
|
|
26
49
|
sig do
|
|
27
50
|
params(
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
module Users
|
|
4
|
+
type preference_delete_topic_params =
|
|
5
|
+
{ user_id: String, topic_id: String, tenant_id: String? }
|
|
6
|
+
& Courier::Internal::Type::request_parameters
|
|
7
|
+
|
|
8
|
+
class PreferenceDeleteTopicParams < Courier::Internal::Type::BaseModel
|
|
9
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include Courier::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
attr_accessor user_id: String
|
|
13
|
+
|
|
14
|
+
attr_accessor topic_id: String
|
|
15
|
+
|
|
16
|
+
attr_accessor tenant_id: String?
|
|
17
|
+
|
|
18
|
+
def initialize: (
|
|
19
|
+
user_id: String,
|
|
20
|
+
topic_id: String,
|
|
21
|
+
?tenant_id: String?,
|
|
22
|
+
?request_options: Courier::request_opts
|
|
23
|
+
) -> void
|
|
24
|
+
|
|
25
|
+
def to_hash: -> {
|
|
26
|
+
user_id: String,
|
|
27
|
+
topic_id: String,
|
|
28
|
+
tenant_id: String?,
|
|
29
|
+
request_options: Courier::RequestOptions
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -8,6 +8,13 @@ module Courier
|
|
|
8
8
|
?request_options: Courier::request_opts
|
|
9
9
|
) -> Courier::Models::Users::PreferenceRetrieveResponse
|
|
10
10
|
|
|
11
|
+
def delete_topic: (
|
|
12
|
+
String topic_id,
|
|
13
|
+
user_id: String,
|
|
14
|
+
?tenant_id: String?,
|
|
15
|
+
?request_options: Courier::request_opts
|
|
16
|
+
) -> nil
|
|
17
|
+
|
|
11
18
|
def retrieve_topic: (
|
|
12
19
|
String topic_id,
|
|
13
20
|
user_id: String,
|
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.
|
|
4
|
+
version: 4.14.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-06-
|
|
11
|
+
date: 2026-06-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|
|
@@ -372,6 +372,7 @@ files:
|
|
|
372
372
|
- lib/courier/models/user_profile.rb
|
|
373
373
|
- lib/courier/models/user_profile_firebase_token.rb
|
|
374
374
|
- lib/courier/models/user_recipient.rb
|
|
375
|
+
- lib/courier/models/users/preference_delete_topic_params.rb
|
|
375
376
|
- lib/courier/models/users/preference_retrieve_params.rb
|
|
376
377
|
- lib/courier/models/users/preference_retrieve_response.rb
|
|
377
378
|
- lib/courier/models/users/preference_retrieve_topic_params.rb
|
|
@@ -762,6 +763,7 @@ files:
|
|
|
762
763
|
- rbi/courier/models/user_profile.rbi
|
|
763
764
|
- rbi/courier/models/user_profile_firebase_token.rbi
|
|
764
765
|
- rbi/courier/models/user_recipient.rbi
|
|
766
|
+
- rbi/courier/models/users/preference_delete_topic_params.rbi
|
|
765
767
|
- rbi/courier/models/users/preference_retrieve_params.rbi
|
|
766
768
|
- rbi/courier/models/users/preference_retrieve_response.rbi
|
|
767
769
|
- rbi/courier/models/users/preference_retrieve_topic_params.rbi
|
|
@@ -1151,6 +1153,7 @@ files:
|
|
|
1151
1153
|
- sig/courier/models/user_profile.rbs
|
|
1152
1154
|
- sig/courier/models/user_profile_firebase_token.rbs
|
|
1153
1155
|
- sig/courier/models/user_recipient.rbs
|
|
1156
|
+
- sig/courier/models/users/preference_delete_topic_params.rbs
|
|
1154
1157
|
- sig/courier/models/users/preference_retrieve_params.rbs
|
|
1155
1158
|
- sig/courier/models/users/preference_retrieve_response.rbs
|
|
1156
1159
|
- sig/courier/models/users/preference_retrieve_topic_params.rbs
|