anthropic 2.0.0 → 2.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 +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +1 -1
- data/lib/anthropic/models/user_profile.rb +26 -1
- data/lib/anthropic/models/user_profile_enforcement_action.rb +66 -0
- data/lib/anthropic/models/user_profile_enforcement_action_ban.rb +62 -0
- data/lib/anthropic/models/user_profile_enforcement_action_next_step.rb +17 -0
- data/lib/anthropic/models/user_profile_enforcement_action_reason.rb +23 -0
- data/lib/anthropic/models/user_profile_enforcement_action_restriction.rb +67 -0
- data/lib/anthropic/models/user_profile_enforcement_status.rb +20 -0
- data/lib/anthropic/models/user_profile_list_params.rb +17 -1
- data/lib/anthropic/models.rb +12 -0
- data/lib/anthropic/resources/user_profiles.rb +5 -3
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +6 -0
- data/rbi/anthropic/models/user_profile.rbi +42 -0
- data/rbi/anthropic/models/user_profile_enforcement_action.rbi +95 -0
- data/rbi/anthropic/models/user_profile_enforcement_action_ban.rbi +96 -0
- data/rbi/anthropic/models/user_profile_enforcement_action_next_step.rbi +34 -0
- data/rbi/anthropic/models/user_profile_enforcement_action_reason.rbi +58 -0
- data/rbi/anthropic/models/user_profile_enforcement_action_restriction.rbi +106 -0
- data/rbi/anthropic/models/user_profile_enforcement_status.rbi +39 -0
- data/rbi/anthropic/models/user_profile_list_params.rbi +36 -0
- data/rbi/anthropic/models.rbi +16 -0
- data/rbi/anthropic/resources/user_profiles.rbi +12 -0
- data/sig/anthropic/models/user_profile.rbs +10 -0
- data/sig/anthropic/models/user_profile_enforcement_action.rbs +50 -0
- data/sig/anthropic/models/user_profile_enforcement_action_ban.rbs +45 -0
- data/sig/anthropic/models/user_profile_enforcement_action_next_step.rbs +13 -0
- data/sig/anthropic/models/user_profile_enforcement_action_reason.rbs +24 -0
- data/sig/anthropic/models/user_profile_enforcement_action_restriction.rbs +45 -0
- data/sig/anthropic/models/user_profile_enforcement_status.rbs +17 -0
- data/sig/anthropic/models/user_profile_list_params.rbs +9 -0
- data/sig/anthropic/models.rbs +12 -0
- data/sig/anthropic/resources/user_profiles.rbs +1 -0
- metadata +20 -2
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
class UserProfileEnforcementActionBan < Anthropic::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Anthropic::UserProfileEnforcementActionBan,
|
|
10
|
+
Anthropic::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The action's ID (`enac_...`), stable while the action is open.
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
# Always `null`: the end user cannot clear a ban.
|
|
19
|
+
sig do
|
|
20
|
+
returns(
|
|
21
|
+
T.nilable(
|
|
22
|
+
Anthropic::UserProfileEnforcementActionNextStep::TaggedSymbol
|
|
23
|
+
)
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
attr_accessor :action
|
|
27
|
+
|
|
28
|
+
# Always `null`: a ban has no end date.
|
|
29
|
+
sig { returns(T.nilable(Time)) }
|
|
30
|
+
attr_accessor :expires_at
|
|
31
|
+
|
|
32
|
+
# When Anthropic opened the action, in RFC 3339 format.
|
|
33
|
+
sig { returns(Time) }
|
|
34
|
+
attr_accessor :opened_at
|
|
35
|
+
|
|
36
|
+
# Why Anthropic placed the limit: `unsupported_region`, `fraud_or_abuse`,
|
|
37
|
+
# `high_harm`, `usage_policy_violation`, `account_compromise` or `unspecified`.
|
|
38
|
+
sig do
|
|
39
|
+
returns(Anthropic::UserProfileEnforcementActionReason::TaggedSymbol)
|
|
40
|
+
end
|
|
41
|
+
attr_accessor :reason
|
|
42
|
+
|
|
43
|
+
sig { returns(Symbol) }
|
|
44
|
+
attr_accessor :type
|
|
45
|
+
|
|
46
|
+
# Anthropic has stopped serving the end user where the ban applies and does not
|
|
47
|
+
# plan to serve them there again.
|
|
48
|
+
sig do
|
|
49
|
+
params(
|
|
50
|
+
id: String,
|
|
51
|
+
action:
|
|
52
|
+
T.nilable(
|
|
53
|
+
Anthropic::UserProfileEnforcementActionNextStep::OrSymbol
|
|
54
|
+
),
|
|
55
|
+
expires_at: T.nilable(Time),
|
|
56
|
+
opened_at: Time,
|
|
57
|
+
reason: Anthropic::UserProfileEnforcementActionReason::OrSymbol,
|
|
58
|
+
type: Symbol
|
|
59
|
+
).returns(T.attached_class)
|
|
60
|
+
end
|
|
61
|
+
def self.new(
|
|
62
|
+
# The action's ID (`enac_...`), stable while the action is open.
|
|
63
|
+
id:,
|
|
64
|
+
# Always `null`: the end user cannot clear a ban.
|
|
65
|
+
action:,
|
|
66
|
+
# Always `null`: a ban has no end date.
|
|
67
|
+
expires_at:,
|
|
68
|
+
# When Anthropic opened the action, in RFC 3339 format.
|
|
69
|
+
opened_at:,
|
|
70
|
+
# Why Anthropic placed the limit: `unsupported_region`, `fraud_or_abuse`,
|
|
71
|
+
# `high_harm`, `usage_policy_violation`, `account_compromise` or `unspecified`.
|
|
72
|
+
reason:,
|
|
73
|
+
type: :ban
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
sig do
|
|
78
|
+
override.returns(
|
|
79
|
+
{
|
|
80
|
+
id: String,
|
|
81
|
+
action:
|
|
82
|
+
T.nilable(
|
|
83
|
+
Anthropic::UserProfileEnforcementActionNextStep::TaggedSymbol
|
|
84
|
+
),
|
|
85
|
+
expires_at: T.nilable(Time),
|
|
86
|
+
opened_at: Time,
|
|
87
|
+
reason: Anthropic::UserProfileEnforcementActionReason::TaggedSymbol,
|
|
88
|
+
type: Symbol
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
end
|
|
92
|
+
def to_hash
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
# The next step on this enforcement action: `verify` means the end user can clear
|
|
6
|
+
# the action by passing an identity check. More values may be added; read a value
|
|
7
|
+
# you do not recognize as `null`.
|
|
8
|
+
module UserProfileEnforcementActionNextStep
|
|
9
|
+
extend Anthropic::Internal::Type::Enum
|
|
10
|
+
|
|
11
|
+
TaggedSymbol =
|
|
12
|
+
T.type_alias do
|
|
13
|
+
T.all(Symbol, Anthropic::UserProfileEnforcementActionNextStep)
|
|
14
|
+
end
|
|
15
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
16
|
+
|
|
17
|
+
VERIFY =
|
|
18
|
+
T.let(
|
|
19
|
+
:verify,
|
|
20
|
+
Anthropic::UserProfileEnforcementActionNextStep::TaggedSymbol
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
sig do
|
|
24
|
+
override.returns(
|
|
25
|
+
T::Array[
|
|
26
|
+
Anthropic::UserProfileEnforcementActionNextStep::TaggedSymbol
|
|
27
|
+
]
|
|
28
|
+
)
|
|
29
|
+
end
|
|
30
|
+
def self.values
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
# Why Anthropic placed this enforcement action: `unsupported_region`,
|
|
6
|
+
# `fraud_or_abuse`, `high_harm`, `usage_policy_violation`, `account_compromise` or
|
|
7
|
+
# `unspecified`. More values may be added; read a value you do not recognize as
|
|
8
|
+
# `unspecified`.
|
|
9
|
+
module UserProfileEnforcementActionReason
|
|
10
|
+
extend Anthropic::Internal::Type::Enum
|
|
11
|
+
|
|
12
|
+
TaggedSymbol =
|
|
13
|
+
T.type_alias do
|
|
14
|
+
T.all(Symbol, Anthropic::UserProfileEnforcementActionReason)
|
|
15
|
+
end
|
|
16
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
17
|
+
|
|
18
|
+
UNSUPPORTED_REGION =
|
|
19
|
+
T.let(
|
|
20
|
+
:unsupported_region,
|
|
21
|
+
Anthropic::UserProfileEnforcementActionReason::TaggedSymbol
|
|
22
|
+
)
|
|
23
|
+
FRAUD_OR_ABUSE =
|
|
24
|
+
T.let(
|
|
25
|
+
:fraud_or_abuse,
|
|
26
|
+
Anthropic::UserProfileEnforcementActionReason::TaggedSymbol
|
|
27
|
+
)
|
|
28
|
+
HIGH_HARM =
|
|
29
|
+
T.let(
|
|
30
|
+
:high_harm,
|
|
31
|
+
Anthropic::UserProfileEnforcementActionReason::TaggedSymbol
|
|
32
|
+
)
|
|
33
|
+
USAGE_POLICY_VIOLATION =
|
|
34
|
+
T.let(
|
|
35
|
+
:usage_policy_violation,
|
|
36
|
+
Anthropic::UserProfileEnforcementActionReason::TaggedSymbol
|
|
37
|
+
)
|
|
38
|
+
ACCOUNT_COMPROMISE =
|
|
39
|
+
T.let(
|
|
40
|
+
:account_compromise,
|
|
41
|
+
Anthropic::UserProfileEnforcementActionReason::TaggedSymbol
|
|
42
|
+
)
|
|
43
|
+
UNSPECIFIED =
|
|
44
|
+
T.let(
|
|
45
|
+
:unspecified,
|
|
46
|
+
Anthropic::UserProfileEnforcementActionReason::TaggedSymbol
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
sig do
|
|
50
|
+
override.returns(
|
|
51
|
+
T::Array[Anthropic::UserProfileEnforcementActionReason::TaggedSymbol]
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
def self.values
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
class UserProfileEnforcementActionRestriction < Anthropic::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Anthropic::UserProfileEnforcementActionRestriction,
|
|
10
|
+
Anthropic::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The action's ID (`enac_...`), stable while the action is open.
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
# The next step on the action: `verify` or `null`. `verify`: the end user can
|
|
19
|
+
# clear it now by passing an identity check. `null`: there is nothing the end user
|
|
20
|
+
# can do now to clear it, including while Anthropic reviews an identity check the
|
|
21
|
+
# end user submitted.
|
|
22
|
+
sig do
|
|
23
|
+
returns(
|
|
24
|
+
T.nilable(
|
|
25
|
+
Anthropic::UserProfileEnforcementActionNextStep::TaggedSymbol
|
|
26
|
+
)
|
|
27
|
+
)
|
|
28
|
+
end
|
|
29
|
+
attr_accessor :action
|
|
30
|
+
|
|
31
|
+
# When the action ends on its own, in RFC 3339 format; it stops showing once this
|
|
32
|
+
# time has passed. `null` when it has no end date, and always `null` when `reason`
|
|
33
|
+
# is `account_compromise`.
|
|
34
|
+
sig { returns(T.nilable(Time)) }
|
|
35
|
+
attr_accessor :expires_at
|
|
36
|
+
|
|
37
|
+
# When Anthropic opened the action, in RFC 3339 format.
|
|
38
|
+
sig { returns(Time) }
|
|
39
|
+
attr_accessor :opened_at
|
|
40
|
+
|
|
41
|
+
# Why Anthropic placed the limit: `unsupported_region`, `fraud_or_abuse`,
|
|
42
|
+
# `high_harm`, `usage_policy_violation`, `account_compromise` or `unspecified`.
|
|
43
|
+
sig do
|
|
44
|
+
returns(Anthropic::UserProfileEnforcementActionReason::TaggedSymbol)
|
|
45
|
+
end
|
|
46
|
+
attr_accessor :reason
|
|
47
|
+
|
|
48
|
+
sig { returns(Symbol) }
|
|
49
|
+
attr_accessor :type
|
|
50
|
+
|
|
51
|
+
# Anthropic has limited how it serves the end user until the action is resolved.
|
|
52
|
+
# The end user may still be served in part.
|
|
53
|
+
sig do
|
|
54
|
+
params(
|
|
55
|
+
id: String,
|
|
56
|
+
action:
|
|
57
|
+
T.nilable(
|
|
58
|
+
Anthropic::UserProfileEnforcementActionNextStep::OrSymbol
|
|
59
|
+
),
|
|
60
|
+
expires_at: T.nilable(Time),
|
|
61
|
+
opened_at: Time,
|
|
62
|
+
reason: Anthropic::UserProfileEnforcementActionReason::OrSymbol,
|
|
63
|
+
type: Symbol
|
|
64
|
+
).returns(T.attached_class)
|
|
65
|
+
end
|
|
66
|
+
def self.new(
|
|
67
|
+
# The action's ID (`enac_...`), stable while the action is open.
|
|
68
|
+
id:,
|
|
69
|
+
# The next step on the action: `verify` or `null`. `verify`: the end user can
|
|
70
|
+
# clear it now by passing an identity check. `null`: there is nothing the end user
|
|
71
|
+
# can do now to clear it, including while Anthropic reviews an identity check the
|
|
72
|
+
# end user submitted.
|
|
73
|
+
action:,
|
|
74
|
+
# When the action ends on its own, in RFC 3339 format; it stops showing once this
|
|
75
|
+
# time has passed. `null` when it has no end date, and always `null` when `reason`
|
|
76
|
+
# is `account_compromise`.
|
|
77
|
+
expires_at:,
|
|
78
|
+
# When Anthropic opened the action, in RFC 3339 format.
|
|
79
|
+
opened_at:,
|
|
80
|
+
# Why Anthropic placed the limit: `unsupported_region`, `fraud_or_abuse`,
|
|
81
|
+
# `high_harm`, `usage_policy_violation`, `account_compromise` or `unspecified`.
|
|
82
|
+
reason:,
|
|
83
|
+
type: :restriction
|
|
84
|
+
)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
sig do
|
|
88
|
+
override.returns(
|
|
89
|
+
{
|
|
90
|
+
id: String,
|
|
91
|
+
action:
|
|
92
|
+
T.nilable(
|
|
93
|
+
Anthropic::UserProfileEnforcementActionNextStep::TaggedSymbol
|
|
94
|
+
),
|
|
95
|
+
expires_at: T.nilable(Time),
|
|
96
|
+
opened_at: Time,
|
|
97
|
+
reason: Anthropic::UserProfileEnforcementActionReason::TaggedSymbol,
|
|
98
|
+
type: Symbol
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
end
|
|
102
|
+
def to_hash
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
# Anthropic's enforcement status of this profile: `unrestricted`, `pending`,
|
|
6
|
+
# `restricted` or `banned`. More values may be added; read a value you do not
|
|
7
|
+
# recognize as `restricted`.
|
|
8
|
+
module UserProfileEnforcementStatus
|
|
9
|
+
extend Anthropic::Internal::Type::Enum
|
|
10
|
+
|
|
11
|
+
TaggedSymbol =
|
|
12
|
+
T.type_alias { T.all(Symbol, Anthropic::UserProfileEnforcementStatus) }
|
|
13
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
14
|
+
|
|
15
|
+
UNRESTRICTED =
|
|
16
|
+
T.let(
|
|
17
|
+
:unrestricted,
|
|
18
|
+
Anthropic::UserProfileEnforcementStatus::TaggedSymbol
|
|
19
|
+
)
|
|
20
|
+
PENDING =
|
|
21
|
+
T.let(:pending, Anthropic::UserProfileEnforcementStatus::TaggedSymbol)
|
|
22
|
+
RESTRICTED =
|
|
23
|
+
T.let(
|
|
24
|
+
:restricted,
|
|
25
|
+
Anthropic::UserProfileEnforcementStatus::TaggedSymbol
|
|
26
|
+
)
|
|
27
|
+
BANNED =
|
|
28
|
+
T.let(:banned, Anthropic::UserProfileEnforcementStatus::TaggedSymbol)
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
override.returns(
|
|
32
|
+
T::Array[Anthropic::UserProfileEnforcementStatus::TaggedSymbol]
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
def self.values
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -11,6 +11,29 @@ module Anthropic
|
|
|
11
11
|
T.any(Anthropic::UserProfileListParams, Anthropic::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
# Return only the user profiles whose `enforcement_status` is one of these values:
|
|
15
|
+
# `unrestricted`, `pending`, `restricted` or `banned`. Repeat the parameter to
|
|
16
|
+
# match any of several. With it set, a page may hold fewer than `limit` profiles,
|
|
17
|
+
# or none, and still carry a `next_page`: the service examines a bounded number of
|
|
18
|
+
# profiles per request, and only a null `next_page` means the listing is complete.
|
|
19
|
+
# Rejected with `invalid_request_error` under the `user-profiles-2026-09-04` and
|
|
20
|
+
# earlier beta headers. Fails with `overloaded_error` when a profile's enforcement
|
|
21
|
+
# actions cannot be read for the moment.
|
|
22
|
+
sig do
|
|
23
|
+
returns(
|
|
24
|
+
T.nilable(T::Array[Anthropic::UserProfileEnforcementStatus::OrSymbol])
|
|
25
|
+
)
|
|
26
|
+
end
|
|
27
|
+
attr_reader :enforcement_status
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
params(
|
|
31
|
+
enforcement_status:
|
|
32
|
+
T::Array[Anthropic::UserProfileEnforcementStatus::OrSymbol]
|
|
33
|
+
).void
|
|
34
|
+
end
|
|
35
|
+
attr_writer :enforcement_status
|
|
36
|
+
|
|
14
37
|
# The maximum number of user profiles to return, from 1 to 100. Defaults to 20.
|
|
15
38
|
sig { returns(T.nilable(Integer)) }
|
|
16
39
|
attr_reader :limit
|
|
@@ -58,6 +81,8 @@ module Anthropic
|
|
|
58
81
|
|
|
59
82
|
sig do
|
|
60
83
|
params(
|
|
84
|
+
enforcement_status:
|
|
85
|
+
T::Array[Anthropic::UserProfileEnforcementStatus::OrSymbol],
|
|
61
86
|
limit: Integer,
|
|
62
87
|
order: Anthropic::UserProfileListOrder::OrSymbol,
|
|
63
88
|
order_by: Anthropic::UserProfileListOrderBy::OrSymbol,
|
|
@@ -67,6 +92,15 @@ module Anthropic
|
|
|
67
92
|
).returns(T.attached_class)
|
|
68
93
|
end
|
|
69
94
|
def self.new(
|
|
95
|
+
# Return only the user profiles whose `enforcement_status` is one of these values:
|
|
96
|
+
# `unrestricted`, `pending`, `restricted` or `banned`. Repeat the parameter to
|
|
97
|
+
# match any of several. With it set, a page may hold fewer than `limit` profiles,
|
|
98
|
+
# or none, and still carry a `next_page`: the service examines a bounded number of
|
|
99
|
+
# profiles per request, and only a null `next_page` means the listing is complete.
|
|
100
|
+
# Rejected with `invalid_request_error` under the `user-profiles-2026-09-04` and
|
|
101
|
+
# earlier beta headers. Fails with `overloaded_error` when a profile's enforcement
|
|
102
|
+
# actions cannot be read for the moment.
|
|
103
|
+
enforcement_status: nil,
|
|
70
104
|
# The maximum number of user profiles to return, from 1 to 100. Defaults to 20.
|
|
71
105
|
limit: nil,
|
|
72
106
|
# The sort direction, applied to the field that `order_by` selects. Defaults to
|
|
@@ -94,6 +128,8 @@ module Anthropic
|
|
|
94
128
|
sig do
|
|
95
129
|
override.returns(
|
|
96
130
|
{
|
|
131
|
+
enforcement_status:
|
|
132
|
+
T::Array[Anthropic::UserProfileEnforcementStatus::OrSymbol],
|
|
97
133
|
limit: Integer,
|
|
98
134
|
order: Anthropic::UserProfileListOrder::OrSymbol,
|
|
99
135
|
order_by: Anthropic::UserProfileListOrderBy::OrSymbol,
|
data/rbi/anthropic/models.rbi
CHANGED
|
@@ -856,6 +856,22 @@ module Anthropic
|
|
|
856
856
|
|
|
857
857
|
UserProfileEfsProgram = Anthropic::Models::UserProfileEfsProgram
|
|
858
858
|
|
|
859
|
+
UserProfileEnforcementAction = Anthropic::Models::UserProfileEnforcementAction
|
|
860
|
+
|
|
861
|
+
UserProfileEnforcementActionBan =
|
|
862
|
+
Anthropic::Models::UserProfileEnforcementActionBan
|
|
863
|
+
|
|
864
|
+
UserProfileEnforcementActionNextStep =
|
|
865
|
+
Anthropic::Models::UserProfileEnforcementActionNextStep
|
|
866
|
+
|
|
867
|
+
UserProfileEnforcementActionReason =
|
|
868
|
+
Anthropic::Models::UserProfileEnforcementActionReason
|
|
869
|
+
|
|
870
|
+
UserProfileEnforcementActionRestriction =
|
|
871
|
+
Anthropic::Models::UserProfileEnforcementActionRestriction
|
|
872
|
+
|
|
873
|
+
UserProfileEnforcementStatus = Anthropic::Models::UserProfileEnforcementStatus
|
|
874
|
+
|
|
859
875
|
UserProfileExternalUserAccountStatus =
|
|
860
876
|
Anthropic::Models::UserProfileExternalUserAccountStatus
|
|
861
877
|
|
|
@@ -119,6 +119,8 @@ module Anthropic
|
|
|
119
119
|
# List User Profiles
|
|
120
120
|
sig do
|
|
121
121
|
params(
|
|
122
|
+
enforcement_status:
|
|
123
|
+
T::Array[Anthropic::UserProfileEnforcementStatus::OrSymbol],
|
|
122
124
|
limit: Integer,
|
|
123
125
|
order: Anthropic::UserProfileListOrder::OrSymbol,
|
|
124
126
|
order_by: Anthropic::UserProfileListOrderBy::OrSymbol,
|
|
@@ -128,6 +130,16 @@ module Anthropic
|
|
|
128
130
|
).returns(Anthropic::Internal::PageCursor[Anthropic::UserProfile])
|
|
129
131
|
end
|
|
130
132
|
def list(
|
|
133
|
+
# Query param: Return only the user profiles whose `enforcement_status` is one of
|
|
134
|
+
# these values: `unrestricted`, `pending`, `restricted` or `banned`. Repeat the
|
|
135
|
+
# parameter to match any of several. With it set, a page may hold fewer than
|
|
136
|
+
# `limit` profiles, or none, and still carry a `next_page`: the service examines a
|
|
137
|
+
# bounded number of profiles per request, and only a null `next_page` means the
|
|
138
|
+
# listing is complete. Rejected with `invalid_request_error` under the
|
|
139
|
+
# `user-profiles-2026-09-04` and earlier beta headers. Fails with
|
|
140
|
+
# `overloaded_error` when a profile's enforcement actions cannot be read for the
|
|
141
|
+
# moment.
|
|
142
|
+
enforcement_status: nil,
|
|
131
143
|
# Query param: The maximum number of user profiles to return, from 1 to 100.
|
|
132
144
|
# Defaults to 20.
|
|
133
145
|
limit: nil,
|
|
@@ -5,6 +5,8 @@ module Anthropic
|
|
|
5
5
|
id: String,
|
|
6
6
|
access_type: Anthropic::Models::user_profile_access_type,
|
|
7
7
|
created_at: Time,
|
|
8
|
+
enforcement_actions: ::Array[Anthropic::Models::user_profile_enforcement_action],
|
|
9
|
+
enforcement_status: Anthropic::Models::user_profile_enforcement_status,
|
|
8
10
|
external_user_details: Anthropic::UserProfileExternalUserDetails,
|
|
9
11
|
metadata: ::Hash[Symbol, String],
|
|
10
12
|
name: String?,
|
|
@@ -20,6 +22,10 @@ module Anthropic
|
|
|
20
22
|
|
|
21
23
|
attr_accessor created_at: Time
|
|
22
24
|
|
|
25
|
+
attr_accessor enforcement_actions: ::Array[Anthropic::Models::user_profile_enforcement_action]
|
|
26
|
+
|
|
27
|
+
attr_accessor enforcement_status: Anthropic::Models::user_profile_enforcement_status
|
|
28
|
+
|
|
23
29
|
attr_accessor external_user_details: Anthropic::UserProfileExternalUserDetails
|
|
24
30
|
|
|
25
31
|
attr_accessor metadata: ::Hash[Symbol, String]
|
|
@@ -36,6 +42,8 @@ module Anthropic
|
|
|
36
42
|
id: String,
|
|
37
43
|
access_type: Anthropic::Models::user_profile_access_type,
|
|
38
44
|
created_at: Time,
|
|
45
|
+
enforcement_actions: ::Array[Anthropic::Models::user_profile_enforcement_action],
|
|
46
|
+
enforcement_status: Anthropic::Models::user_profile_enforcement_status,
|
|
39
47
|
external_user_details: Anthropic::UserProfileExternalUserDetails,
|
|
40
48
|
metadata: ::Hash[Symbol, String],
|
|
41
49
|
name: String?,
|
|
@@ -48,6 +56,8 @@ module Anthropic
|
|
|
48
56
|
id: String,
|
|
49
57
|
access_type: Anthropic::Models::user_profile_access_type,
|
|
50
58
|
created_at: Time,
|
|
59
|
+
enforcement_actions: ::Array[Anthropic::Models::user_profile_enforcement_action],
|
|
60
|
+
enforcement_status: Anthropic::Models::user_profile_enforcement_status,
|
|
51
61
|
external_user_details: Anthropic::UserProfileExternalUserDetails,
|
|
52
62
|
metadata: ::Hash[Symbol, String],
|
|
53
63
|
name: String?,
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
module Anthropic
|
|
2
|
+
module Models
|
|
3
|
+
type user_profile_enforcement_action =
|
|
4
|
+
Anthropic::UserProfileEnforcementActionRestriction
|
|
5
|
+
| Anthropic::UserProfileEnforcementActionBan
|
|
6
|
+
|
|
7
|
+
module UserProfileEnforcementAction
|
|
8
|
+
extend Anthropic::Internal::Type::Union
|
|
9
|
+
|
|
10
|
+
type type_ = :restriction | :ban
|
|
11
|
+
|
|
12
|
+
module Type
|
|
13
|
+
extend Anthropic::Internal::Type::Enum
|
|
14
|
+
|
|
15
|
+
RESTRICTION: :restriction
|
|
16
|
+
BAN: :ban
|
|
17
|
+
|
|
18
|
+
def self?.values: -> ::Array[Anthropic::Models::UserProfileEnforcementAction::type_]
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def self?.variants: -> ::Array[Anthropic::Models::user_profile_enforcement_action]
|
|
22
|
+
|
|
23
|
+
def self.new:
|
|
24
|
+
(
|
|
25
|
+
type: :restriction | "restriction",
|
|
26
|
+
id: String,
|
|
27
|
+
action: Anthropic::Models::user_profile_enforcement_action_next_step?,
|
|
28
|
+
expires_at: Time?,
|
|
29
|
+
opened_at: Time,
|
|
30
|
+
reason: Anthropic::Models::user_profile_enforcement_action_reason
|
|
31
|
+
) -> Anthropic::UserProfileEnforcementActionRestriction
|
|
32
|
+
| (
|
|
33
|
+
type: :ban | "ban",
|
|
34
|
+
id: String,
|
|
35
|
+
action: Anthropic::Models::user_profile_enforcement_action_next_step?,
|
|
36
|
+
expires_at: Time?,
|
|
37
|
+
opened_at: Time,
|
|
38
|
+
reason: Anthropic::Models::user_profile_enforcement_action_reason
|
|
39
|
+
) -> Anthropic::UserProfileEnforcementActionBan
|
|
40
|
+
| (
|
|
41
|
+
type: Anthropic::Models::UserProfileEnforcementAction::type_ | String,
|
|
42
|
+
id: String,
|
|
43
|
+
action: Anthropic::Models::user_profile_enforcement_action_next_step?,
|
|
44
|
+
expires_at: Time?,
|
|
45
|
+
opened_at: Time,
|
|
46
|
+
reason: Anthropic::Models::user_profile_enforcement_action_reason
|
|
47
|
+
) -> Anthropic::Models::user_profile_enforcement_action
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
module Anthropic
|
|
2
|
+
module Models
|
|
3
|
+
type user_profile_enforcement_action_ban =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
action: Anthropic::Models::user_profile_enforcement_action_next_step?,
|
|
7
|
+
expires_at: Time?,
|
|
8
|
+
opened_at: Time,
|
|
9
|
+
reason: Anthropic::Models::user_profile_enforcement_action_reason,
|
|
10
|
+
type: :ban
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class UserProfileEnforcementActionBan < Anthropic::Internal::Type::BaseModel
|
|
14
|
+
attr_accessor id: String
|
|
15
|
+
|
|
16
|
+
attr_accessor action: Anthropic::Models::user_profile_enforcement_action_next_step?
|
|
17
|
+
|
|
18
|
+
attr_accessor expires_at: Time?
|
|
19
|
+
|
|
20
|
+
attr_accessor opened_at: Time
|
|
21
|
+
|
|
22
|
+
attr_accessor reason: Anthropic::Models::user_profile_enforcement_action_reason
|
|
23
|
+
|
|
24
|
+
attr_accessor type: :ban
|
|
25
|
+
|
|
26
|
+
def initialize: (
|
|
27
|
+
id: String,
|
|
28
|
+
action: Anthropic::Models::user_profile_enforcement_action_next_step?,
|
|
29
|
+
expires_at: Time?,
|
|
30
|
+
opened_at: Time,
|
|
31
|
+
reason: Anthropic::Models::user_profile_enforcement_action_reason,
|
|
32
|
+
?type: :ban
|
|
33
|
+
) -> void
|
|
34
|
+
|
|
35
|
+
def to_hash: -> {
|
|
36
|
+
id: String,
|
|
37
|
+
action: Anthropic::Models::user_profile_enforcement_action_next_step?,
|
|
38
|
+
expires_at: Time?,
|
|
39
|
+
opened_at: Time,
|
|
40
|
+
reason: Anthropic::Models::user_profile_enforcement_action_reason,
|
|
41
|
+
type: :ban
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Anthropic
|
|
2
|
+
module Models
|
|
3
|
+
type user_profile_enforcement_action_next_step = :verify
|
|
4
|
+
|
|
5
|
+
module UserProfileEnforcementActionNextStep
|
|
6
|
+
extend Anthropic::Internal::Type::Enum
|
|
7
|
+
|
|
8
|
+
VERIFY: :verify
|
|
9
|
+
|
|
10
|
+
def self?.values: -> ::Array[Anthropic::Models::user_profile_enforcement_action_next_step]
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module Anthropic
|
|
2
|
+
module Models
|
|
3
|
+
type user_profile_enforcement_action_reason =
|
|
4
|
+
:unsupported_region
|
|
5
|
+
| :fraud_or_abuse
|
|
6
|
+
| :high_harm
|
|
7
|
+
| :usage_policy_violation
|
|
8
|
+
| :account_compromise
|
|
9
|
+
| :unspecified
|
|
10
|
+
|
|
11
|
+
module UserProfileEnforcementActionReason
|
|
12
|
+
extend Anthropic::Internal::Type::Enum
|
|
13
|
+
|
|
14
|
+
UNSUPPORTED_REGION: :unsupported_region
|
|
15
|
+
FRAUD_OR_ABUSE: :fraud_or_abuse
|
|
16
|
+
HIGH_HARM: :high_harm
|
|
17
|
+
USAGE_POLICY_VIOLATION: :usage_policy_violation
|
|
18
|
+
ACCOUNT_COMPROMISE: :account_compromise
|
|
19
|
+
UNSPECIFIED: :unspecified
|
|
20
|
+
|
|
21
|
+
def self?.values: -> ::Array[Anthropic::Models::user_profile_enforcement_action_reason]
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
module Anthropic
|
|
2
|
+
module Models
|
|
3
|
+
type user_profile_enforcement_action_restriction =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
action: Anthropic::Models::user_profile_enforcement_action_next_step?,
|
|
7
|
+
expires_at: Time?,
|
|
8
|
+
opened_at: Time,
|
|
9
|
+
reason: Anthropic::Models::user_profile_enforcement_action_reason,
|
|
10
|
+
type: :restriction
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class UserProfileEnforcementActionRestriction < Anthropic::Internal::Type::BaseModel
|
|
14
|
+
attr_accessor id: String
|
|
15
|
+
|
|
16
|
+
attr_accessor action: Anthropic::Models::user_profile_enforcement_action_next_step?
|
|
17
|
+
|
|
18
|
+
attr_accessor expires_at: Time?
|
|
19
|
+
|
|
20
|
+
attr_accessor opened_at: Time
|
|
21
|
+
|
|
22
|
+
attr_accessor reason: Anthropic::Models::user_profile_enforcement_action_reason
|
|
23
|
+
|
|
24
|
+
attr_accessor type: :restriction
|
|
25
|
+
|
|
26
|
+
def initialize: (
|
|
27
|
+
id: String,
|
|
28
|
+
action: Anthropic::Models::user_profile_enforcement_action_next_step?,
|
|
29
|
+
expires_at: Time?,
|
|
30
|
+
opened_at: Time,
|
|
31
|
+
reason: Anthropic::Models::user_profile_enforcement_action_reason,
|
|
32
|
+
?type: :restriction
|
|
33
|
+
) -> void
|
|
34
|
+
|
|
35
|
+
def to_hash: -> {
|
|
36
|
+
id: String,
|
|
37
|
+
action: Anthropic::Models::user_profile_enforcement_action_next_step?,
|
|
38
|
+
expires_at: Time?,
|
|
39
|
+
opened_at: Time,
|
|
40
|
+
reason: Anthropic::Models::user_profile_enforcement_action_reason,
|
|
41
|
+
type: :restriction
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Anthropic
|
|
2
|
+
module Models
|
|
3
|
+
type user_profile_enforcement_status =
|
|
4
|
+
:unrestricted | :pending | :restricted | :banned
|
|
5
|
+
|
|
6
|
+
module UserProfileEnforcementStatus
|
|
7
|
+
extend Anthropic::Internal::Type::Enum
|
|
8
|
+
|
|
9
|
+
UNRESTRICTED: :unrestricted
|
|
10
|
+
PENDING: :pending
|
|
11
|
+
RESTRICTED: :restricted
|
|
12
|
+
BANNED: :banned
|
|
13
|
+
|
|
14
|
+
def self?.values: -> ::Array[Anthropic::Models::user_profile_enforcement_status]
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|