anthropic 2.5.0 → 2.6.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 +27 -0
- data/README.md +1 -1
- data/lib/anthropic/error_classes.rb +10 -0
- data/lib/anthropic/errors.rb +11 -0
- data/lib/anthropic/internal/tracing.rb +1 -0
- data/lib/anthropic/models/anthropic_beta.rb +3 -0
- data/lib/anthropic/models/api_error_object.rb +9 -2
- data/lib/anthropic/models/authentication_error.rb +9 -2
- data/lib/anthropic/models/beta/beta_dreaming_error.rb +1 -1
- data/lib/anthropic/models/beta/beta_target_store_held_error.rb +1 -7
- data/lib/anthropic/models/beta/memory_stores/beta_managed_agents_error.rb +3 -1
- data/lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_path_conflict_error.rb +4 -3
- data/lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_precondition_failed_error.rb +1 -3
- data/lib/anthropic/models/beta/organization/beta_cannot_sign_out_managed_member_error.rb +24 -0
- data/lib/anthropic/models/beta/organization/beta_cannot_sign_out_managed_member_error_details.rb +22 -0
- data/lib/anthropic/models/beta/organization/beta_cannot_sign_out_membership_admin_error.rb +24 -0
- data/lib/anthropic/models/beta/organization/beta_cannot_sign_out_membership_admin_error_details.rb +22 -0
- data/lib/anthropic/models/beta/organization/beta_cannot_sign_out_owner_error.rb +25 -0
- data/lib/anthropic/models/beta/organization/beta_cannot_sign_out_owner_error_details.rb +23 -0
- data/lib/anthropic/models/beta/organization/beta_cannot_sign_out_primary_owner_error.rb +24 -0
- data/lib/anthropic/models/beta/organization/beta_cannot_sign_out_primary_owner_error_details.rb +22 -0
- data/lib/anthropic/models/beta/organization/beta_cannot_sign_out_privileged_member_error.rb +24 -0
- data/lib/anthropic/models/beta/organization/beta_cannot_sign_out_privileged_member_error_details.rb +22 -0
- data/lib/anthropic/models/beta/organization/beta_cannot_sign_out_self_error.rb +23 -0
- data/lib/anthropic/models/beta/organization/beta_cannot_sign_out_self_error_details.rb +21 -0
- data/lib/anthropic/models/beta/organization/user_sign_out_params.rb +38 -0
- data/lib/anthropic/models/beta_api_error.rb +9 -2
- data/lib/anthropic/models/beta_authentication_error.rb +9 -2
- data/lib/anthropic/models/beta_billing_error.rb +9 -2
- data/lib/anthropic/models/beta_error.rb +4 -1
- data/lib/anthropic/models/beta_gateway_timeout_error.rb +9 -2
- data/lib/anthropic/models/beta_invalid_request_error.rb +9 -2
- data/lib/anthropic/models/beta_not_found_error.rb +9 -2
- data/lib/anthropic/models/beta_organization_not_enrolled_in_beta_error.rb +20 -0
- data/lib/anthropic/models/beta_organization_not_enrolled_in_beta_error_details.rb +18 -0
- data/lib/anthropic/models/beta_overloaded_error.rb +9 -2
- data/lib/anthropic/models/beta_permission_error.rb +9 -2
- data/lib/anthropic/models/beta_rate_limit_error.rb +9 -2
- data/lib/anthropic/models/billing_error.rb +9 -2
- data/lib/anthropic/models/error_details.rb +69 -2
- data/lib/anthropic/models/error_object.rb +4 -1
- data/lib/anthropic/models/gateway_timeout_error.rb +9 -2
- data/lib/anthropic/models/invalid_request_error.rb +9 -2
- data/lib/anthropic/models/not_found_error.rb +9 -2
- data/lib/anthropic/models/organization/external_key_validation_failed_error.rb +22 -0
- data/lib/anthropic/models/organization/external_key_validation_failed_error_details.rb +20 -0
- data/lib/anthropic/models/organization/external_key_validation_timed_out_error.rb +22 -0
- data/lib/anthropic/models/organization/external_key_validation_timed_out_error_details.rb +20 -0
- data/lib/anthropic/models/overloaded_error.rb +9 -2
- data/lib/anthropic/models/permission_error.rb +9 -2
- data/lib/anthropic/models/ramp_limit_exceeded_error.rb +20 -0
- data/lib/anthropic/models/ramp_limit_exceeded_error_details.rb +18 -0
- data/lib/anthropic/models/rate_limit_error.rb +9 -2
- data/lib/anthropic/models.rb +9 -0
- data/lib/anthropic/resources/beta/environments/work.rb +10 -24
- data/lib/anthropic/resources/beta/environments.rb +16 -37
- data/lib/anthropic/resources/beta/files.rb +23 -50
- data/lib/anthropic/resources/beta/messages/batches.rb +15 -35
- data/lib/anthropic/resources/beta/messages.rb +74 -139
- data/lib/anthropic/resources/beta/models.rb +4 -10
- data/lib/anthropic/resources/beta/organization/api_keys.rb +2 -2
- data/lib/anthropic/resources/beta/organization/claude_tag/bundles/targets.rb +16 -24
- data/lib/anthropic/resources/beta/organization/claude_tag/bundles.rb +8 -12
- data/lib/anthropic/resources/beta/organization/claude_tag/slack_channels.rb +28 -46
- data/lib/anthropic/resources/beta/organization/claude_tag/slack_workspaces.rb +15 -24
- data/lib/anthropic/resources/beta/organization/external_keys.rb +3 -7
- data/lib/anthropic/resources/beta/organization/invites.rb +7 -17
- data/lib/anthropic/resources/beta/organization/plugin_marketplaces.rb +1 -2
- data/lib/anthropic/resources/beta/organization/plugins/versions.rb +7 -14
- data/lib/anthropic/resources/beta/organization/plugins.rb +12 -24
- data/lib/anthropic/resources/beta/organization/rbac_groups/members.rb +4 -14
- data/lib/anthropic/resources/beta/organization/rbac_groups.rb +2 -7
- data/lib/anthropic/resources/beta/organization/spend_limits/effective.rb +1 -2
- data/lib/anthropic/resources/beta/organization/spend_limits.rb +6 -12
- data/lib/anthropic/resources/beta/organization/users.rb +65 -4
- data/lib/anthropic/resources/beta/organization/workspaces/members.rb +2 -2
- data/lib/anthropic/resources/beta/organization/workspaces.rb +12 -22
- data/lib/anthropic/resources/beta/skills/versions.rb +11 -26
- data/lib/anthropic/resources/beta/skills.rb +11 -26
- data/lib/anthropic/resources/files.rb +23 -50
- data/lib/anthropic/resources/messages/batches.rb +15 -35
- data/lib/anthropic/resources/messages.rb +74 -139
- data/lib/anthropic/resources/models.rb +4 -10
- data/lib/anthropic/resources/organization/api_keys.rb +2 -2
- data/lib/anthropic/resources/organization/external_keys.rb +3 -7
- data/lib/anthropic/resources/organization/invites.rb +7 -17
- data/lib/anthropic/resources/organization/rbac_groups/members.rb +4 -14
- data/lib/anthropic/resources/organization/rbac_groups.rb +2 -7
- data/lib/anthropic/resources/organization/spend_limits/effective.rb +1 -2
- data/lib/anthropic/resources/organization/users.rb +2 -4
- data/lib/anthropic/resources/organization/workspaces/members.rb +2 -2
- data/lib/anthropic/resources/organization/workspaces.rb +12 -22
- data/lib/anthropic/resources/skills/versions.rb +11 -26
- data/lib/anthropic/resources/skills.rb +11 -26
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +22 -0
- data/manifest.yaml +1 -0
- data/rbi/anthropic/errors.rbi +14 -0
- data/rbi/anthropic/internal/tracing.rbi +1 -0
- data/rbi/anthropic/models/anthropic_beta.rbi +5 -0
- data/rbi/anthropic/models/api_error_object.rbi +10 -1
- data/rbi/anthropic/models/authentication_error.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_dreaming_error.rbi +2 -2
- data/rbi/anthropic/models/beta/beta_target_store_held_error.rbi +1 -8
- data/rbi/anthropic/models/beta/memory_stores/beta_managed_agents_error.rbi +2 -1
- data/rbi/anthropic/models/beta/memory_stores/beta_managed_agents_memory_path_conflict_error.rbi +3 -4
- data/rbi/anthropic/models/beta/memory_stores/beta_managed_agents_memory_precondition_failed_error.rbi +1 -6
- data/rbi/anthropic/models/beta/organization/beta_cannot_sign_out_managed_member_error.rbi +25 -0
- data/rbi/anthropic/models/beta/organization/beta_cannot_sign_out_managed_member_error_details.rbi +32 -0
- data/rbi/anthropic/models/beta/organization/beta_cannot_sign_out_membership_admin_error.rbi +25 -0
- data/rbi/anthropic/models/beta/organization/beta_cannot_sign_out_membership_admin_error_details.rbi +32 -0
- data/rbi/anthropic/models/beta/organization/beta_cannot_sign_out_owner_error.rbi +26 -0
- data/rbi/anthropic/models/beta/organization/beta_cannot_sign_out_owner_error_details.rbi +33 -0
- data/rbi/anthropic/models/beta/organization/beta_cannot_sign_out_primary_owner_error.rbi +25 -0
- data/rbi/anthropic/models/beta/organization/beta_cannot_sign_out_primary_owner_error_details.rbi +32 -0
- data/rbi/anthropic/models/beta/organization/beta_cannot_sign_out_privileged_member_error.rbi +25 -0
- data/rbi/anthropic/models/beta/organization/beta_cannot_sign_out_privileged_member_error_details.rbi +32 -0
- data/rbi/anthropic/models/beta/organization/beta_cannot_sign_out_self_error.rbi +24 -0
- data/rbi/anthropic/models/beta/organization/beta_cannot_sign_out_self_error_details.rbi +31 -0
- data/rbi/anthropic/models/beta/organization/user_sign_out_params.rbi +75 -0
- data/rbi/anthropic/models/beta_api_error.rbi +10 -1
- data/rbi/anthropic/models/beta_authentication_error.rbi +10 -1
- data/rbi/anthropic/models/beta_billing_error.rbi +10 -1
- data/rbi/anthropic/models/beta_error.rbi +6 -1
- data/rbi/anthropic/models/beta_gateway_timeout_error.rbi +10 -1
- data/rbi/anthropic/models/beta_invalid_request_error.rbi +10 -1
- data/rbi/anthropic/models/beta_not_found_error.rbi +10 -1
- data/rbi/anthropic/models/beta_organization_not_enrolled_in_beta_error.rbi +17 -0
- data/rbi/anthropic/models/beta_organization_not_enrolled_in_beta_error_details.rbi +28 -0
- data/rbi/anthropic/models/beta_overloaded_error.rbi +10 -1
- data/rbi/anthropic/models/beta_permission_error.rbi +10 -1
- data/rbi/anthropic/models/beta_rate_limit_error.rbi +10 -1
- data/rbi/anthropic/models/billing_error.rbi +10 -1
- data/rbi/anthropic/models/error_details.rbi +60 -0
- data/rbi/anthropic/models/error_object.rbi +6 -1
- data/rbi/anthropic/models/gateway_timeout_error.rbi +10 -1
- data/rbi/anthropic/models/invalid_request_error.rbi +10 -1
- data/rbi/anthropic/models/not_found_error.rbi +10 -1
- data/rbi/anthropic/models/organization/external_key_validation_failed_error.rbi +23 -0
- data/rbi/anthropic/models/organization/external_key_validation_failed_error_details.rbi +30 -0
- data/rbi/anthropic/models/organization/external_key_validation_timed_out_error.rbi +23 -0
- data/rbi/anthropic/models/organization/external_key_validation_timed_out_error_details.rbi +30 -0
- data/rbi/anthropic/models/overloaded_error.rbi +10 -1
- data/rbi/anthropic/models/permission_error.rbi +10 -1
- data/rbi/anthropic/models/ramp_limit_exceeded_error.rbi +17 -0
- data/rbi/anthropic/models/ramp_limit_exceeded_error_details.rbi +28 -0
- data/rbi/anthropic/models/rate_limit_error.rbi +10 -1
- data/rbi/anthropic/models.rbi +11 -0
- data/rbi/anthropic/resources/beta/organization/users.rbi +43 -0
- data/sig/anthropic/errors.rbs +3 -0
- data/sig/anthropic/internal/tracing.rbs +1 -0
- data/sig/anthropic/models/anthropic_beta.rbs +2 -0
- data/sig/anthropic/models/beta/organization/beta_cannot_sign_out_managed_member_error.rbs +13 -0
- data/sig/anthropic/models/beta/organization/beta_cannot_sign_out_managed_member_error_details.rbs +18 -0
- data/sig/anthropic/models/beta/organization/beta_cannot_sign_out_membership_admin_error.rbs +13 -0
- data/sig/anthropic/models/beta/organization/beta_cannot_sign_out_membership_admin_error_details.rbs +20 -0
- data/sig/anthropic/models/beta/organization/beta_cannot_sign_out_owner_error.rbs +13 -0
- data/sig/anthropic/models/beta/organization/beta_cannot_sign_out_owner_error_details.rbs +18 -0
- data/sig/anthropic/models/beta/organization/beta_cannot_sign_out_primary_owner_error.rbs +13 -0
- data/sig/anthropic/models/beta/organization/beta_cannot_sign_out_primary_owner_error_details.rbs +18 -0
- data/sig/anthropic/models/beta/organization/beta_cannot_sign_out_privileged_member_error.rbs +13 -0
- data/sig/anthropic/models/beta/organization/beta_cannot_sign_out_privileged_member_error_details.rbs +20 -0
- data/sig/anthropic/models/beta/organization/beta_cannot_sign_out_self_error.rbs +13 -0
- data/sig/anthropic/models/beta/organization/beta_cannot_sign_out_self_error_details.rbs +18 -0
- data/sig/anthropic/models/beta/organization/user_sign_out_params.rbs +36 -0
- data/sig/anthropic/models/beta_organization_not_enrolled_in_beta_error.rbs +9 -0
- data/sig/anthropic/models/beta_organization_not_enrolled_in_beta_error_details.rbs +14 -0
- data/sig/anthropic/models/error_details.rbs +67 -0
- data/sig/anthropic/models/organization/external_key_validation_failed_error.rbs +11 -0
- data/sig/anthropic/models/organization/external_key_validation_failed_error_details.rbs +16 -0
- data/sig/anthropic/models/organization/external_key_validation_timed_out_error.rbs +11 -0
- data/sig/anthropic/models/organization/external_key_validation_timed_out_error_details.rbs +18 -0
- data/sig/anthropic/models/ramp_limit_exceeded_error.rbs +9 -0
- data/sig/anthropic/models/ramp_limit_exceeded_error_details.rbs +14 -0
- data/sig/anthropic/models.rbs +8 -0
- data/sig/anthropic/resources/beta/organization/users.rbs +6 -0
- metadata +65 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 48287e8888b4df35053fcca6ff0f562c806e721a05db115d3c9b72c7980c76d1
|
|
4
|
+
data.tar.gz: 56794607214432584b69668ea6c6c2cf8bded166a4cca8e7b0b90bf94ddf1da3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5489c7cb642c087db0a1e0a952b7a98daf446c6e60dfb8c0d1e6904c6dff41093a51f61191d362ab62a6093944195762540a59d2e36e44dba019737a724e4005
|
|
7
|
+
data.tar.gz: 3f656d916e793416843b667102a481aad3d6553c5630f9c8796a5d2cd62a848872d520e3057d924ac0f3cd0cf667b76a61f9b12a9b377e39d496b9c2e28ed8bd
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.6.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v2.5.0...v2.6.0) (2026-11-05)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **api:** add error code for ramp limit errors
|
|
8
|
+
* **api:** add error codes for External Key validation failures
|
|
9
|
+
* **api:** add support for signing organization members out everywhere
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **client:** make to_yaml work when the program has not loaded yaml
|
|
15
|
+
* **types:** declare ConfigurationError in the rbi and rbs signatures
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Chores
|
|
19
|
+
|
|
20
|
+
* **docs:** describe the type and message of API errors
|
|
21
|
+
* **internal:** add this repository's review rules
|
|
22
|
+
* **internal:** tell contributors when a runtime type check belongs
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Documentation
|
|
26
|
+
|
|
27
|
+
* **client:** describe the type, message, code and details of API errors
|
|
28
|
+
* **client:** list each method's errors without their descriptions
|
|
29
|
+
|
|
3
30
|
## [2.5.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v2.4.0...v2.5.0) (2026-11-04)
|
|
4
31
|
|
|
5
32
|
### Features
|
data/README.md
CHANGED
|
@@ -27,6 +27,8 @@ module Anthropic
|
|
|
27
27
|
[400, "available_tools_limit_exceeded"] => Anthropic::Models::AvailableToolsLimitExceededError,
|
|
28
28
|
[400, "cannot_invite_emails_with_unverified_domains"] => Anthropic::Models::Organization::CannotInviteEmailsWithUnverifiedDomainsError,
|
|
29
29
|
[400, "cannot_remove_last_member"] => Anthropic::Models::Organization::CannotRemoveLastMemberError,
|
|
30
|
+
[400, "cannot_sign_out_primary_owner"] => Anthropic::Models::Beta::Organization::BetaCannotSignOutPrimaryOwnerError,
|
|
31
|
+
[400, "cannot_sign_out_self"] => Anthropic::Models::Beta::Organization::BetaCannotSignOutSelfError,
|
|
30
32
|
[400, "claude_code_key_creator_not_member"] => Anthropic::Models::ClaudeCodeKeyCreatorNotMemberError,
|
|
31
33
|
[400, "claude_code_version_too_old"] => Anthropic::Models::ClaudeCodeVersionTooOldError,
|
|
32
34
|
[400, "cmek_key_disabled"] => Anthropic::Models::CMEKKeyDisabledError,
|
|
@@ -42,6 +44,8 @@ module Anthropic
|
|
|
42
44
|
[400, "email_domain_not_allowed"] => Anthropic::Models::Organization::EmailDomainNotAllowedError,
|
|
43
45
|
[400, "environment_archived"] => Anthropic::Models::Beta::BetaEnvironmentArchivedError,
|
|
44
46
|
[400, "external_key_in_workspace_policy"] => Anthropic::Models::Organization::ExternalKeyInWorkspacePolicyError,
|
|
47
|
+
[400, "external_key_validation_failed"] => Anthropic::Models::Organization::ExternalKeyValidationFailedError,
|
|
48
|
+
[400, "external_key_validation_timed_out"] => Anthropic::Models::Organization::ExternalKeyValidationTimedOutError,
|
|
45
49
|
[400, "file_not_downloadable"] => Anthropic::Models::FileNotDownloadableError,
|
|
46
50
|
[400, "invalid_config_type_change"] => Anthropic::Models::Beta::BetaInvalidConfigTypeChangeError,
|
|
47
51
|
[400, "invalid_metadata"] => Anthropic::Models::Beta::BetaInvalidMetadataError,
|
|
@@ -49,6 +53,7 @@ module Anthropic
|
|
|
49
53
|
[400, "key_profile_mismatch"] => Anthropic::Models::Organization::KeyProfileMismatchError,
|
|
50
54
|
[400, "org_api_key_limit_exceeded"] => Anthropic::Models::Organization::OrgAPIKeyLimitExceededError,
|
|
51
55
|
[400, "org_member_limit_exceeded"] => Anthropic::Models::OrgMemberLimitExceededError,
|
|
56
|
+
[400, "organization_not_enrolled_in_beta"] => Anthropic::Models::BetaOrganizationNotEnrolledInBetaError,
|
|
52
57
|
[400, "organization_on_hold"] => Anthropic::Models::OrganizationOnHoldError,
|
|
53
58
|
[400, "organization_type_not_supported"] => Anthropic::Models::OrganizationTypeNotSupportedError,
|
|
54
59
|
[400, "rbac_group_grants_owner_access"] => Anthropic::Models::Organization::RBACGroupGrantsOwnerAccessError,
|
|
@@ -71,6 +76,10 @@ module Anthropic
|
|
|
71
76
|
[400, "workspace_policy_violation"] => Anthropic::Models::Organization::WorkspacePolicyViolationError,
|
|
72
77
|
[403, "api_key_scope_missing"] => Anthropic::Models::Beta::Organization::BetaAPIKeyScopeMissingError,
|
|
73
78
|
[403, "billing_frozen"] => Anthropic::Models::Beta::BetaBillingFrozenError,
|
|
79
|
+
[403, "cannot_sign_out_managed_member"] => Anthropic::Models::Beta::Organization::BetaCannotSignOutManagedMemberError,
|
|
80
|
+
[403, "cannot_sign_out_membership_admin"] => Anthropic::Models::Beta::Organization::BetaCannotSignOutMembershipAdminError,
|
|
81
|
+
[403, "cannot_sign_out_owner"] => Anthropic::Models::Beta::Organization::BetaCannotSignOutOwnerError,
|
|
82
|
+
[403, "cannot_sign_out_privileged_member"] => Anthropic::Models::Beta::Organization::BetaCannotSignOutPrivilegedMemberError,
|
|
74
83
|
[403, "claude_tag_writes_not_enabled"] => Anthropic::Models::Beta::Organization::BetaClaudeTagWritesNotEnabledError,
|
|
75
84
|
[403, "compliance_configuration_restricted"] => Anthropic::Models::Beta::Organization::BetaComplianceConfigurationRestrictedError,
|
|
76
85
|
[403, "environment_create_disabled"] => Anthropic::Models::Beta::BetaEnvironmentCreateDisabledError,
|
|
@@ -91,6 +100,7 @@ module Anthropic
|
|
|
91
100
|
[412, "heartbeat_precondition_failed"] => Anthropic::Models::Beta::Environments::BetaHeartbeatPreconditionFailedError,
|
|
92
101
|
[413, "request_body_too_large_after_decoding"] => Anthropic::Models::RequestBodyTooLargeAfterDecodingError,
|
|
93
102
|
[429, "enforced_spend_limit_reached"] => Anthropic::Models::EnforcedSpendLimitReachedError,
|
|
103
|
+
[429, "ramp_limit_exceeded"] => Anthropic::Models::RampLimitExceededError,
|
|
94
104
|
[503, "cmek_context_unavailable"] => Anthropic::Models::CMEKContextUnavailableError,
|
|
95
105
|
[503, "cmek_key_unreachable"] => Anthropic::Models::CMEKKeyUnreachableError,
|
|
96
106
|
[503, "registration_pending"] => Anthropic::Models::Beta::Organization::BetaRegistrationPendingError,
|
data/lib/anthropic/errors.rb
CHANGED
|
@@ -141,11 +141,16 @@ module Anthropic
|
|
|
141
141
|
end
|
|
142
142
|
|
|
143
143
|
class APIStatusError < Anthropic::Errors::APIError
|
|
144
|
+
# A human-readable explanation of the error. Its wording can change, so don't
|
|
145
|
+
# match on it.
|
|
146
|
+
#
|
|
144
147
|
# `error.message` from the response body, if present.
|
|
145
148
|
#
|
|
146
149
|
# @return [String, nil]
|
|
147
150
|
def api_message = Anthropic::Internal::Util.dig(body, [:error, :message])
|
|
148
151
|
|
|
152
|
+
# The broad category of the error.
|
|
153
|
+
#
|
|
149
154
|
# `error.type` from the response body, if present.
|
|
150
155
|
#
|
|
151
156
|
# @return [Symbol, Anthropic::Models::ErrorType, nil]
|
|
@@ -154,6 +159,8 @@ module Anthropic
|
|
|
154
159
|
value.is_a?(String) ? value.to_sym : value
|
|
155
160
|
end
|
|
156
161
|
|
|
162
|
+
# A stable code that names the cause.
|
|
163
|
+
#
|
|
157
164
|
# `error.details.error_code` from the response body, if present and a string.
|
|
158
165
|
#
|
|
159
166
|
# @return [Symbol, nil]
|
|
@@ -162,6 +169,10 @@ module Anthropic
|
|
|
162
169
|
code.to_sym if code.is_a?(String)
|
|
163
170
|
end
|
|
164
171
|
|
|
172
|
+
# Machine-readable detail about the cause of the error. `error_code` names the
|
|
173
|
+
# cause; branch on it rather than on `message`. Absent when the error has no code.
|
|
174
|
+
# Treat an unrecognized `error_code` as the bare `type`.
|
|
175
|
+
#
|
|
165
176
|
# `error.details` from the response body, if present.
|
|
166
177
|
#
|
|
167
178
|
# @return [Anthropic::Models::ErrorDetails, nil]
|
|
@@ -301,6 +301,7 @@ module Anthropic
|
|
|
301
301
|
TUNNELS_CERTIFICATES_RETRIEVE = "anthropic.tunnels.certificates.retrieve"
|
|
302
302
|
TUNNELS_CERTIFICATES_LIST = "anthropic.tunnels.certificates.list"
|
|
303
303
|
TUNNELS_CERTIFICATES_ARCHIVE = "anthropic.tunnels.certificates.archive"
|
|
304
|
+
ORGANIZATION_USERS_SIGN_OUT = "anthropic.organization.users.sign_out"
|
|
304
305
|
ORGANIZATION_ANALYTICS_USAGE_LIST = "anthropic.organization.analytics.usage.list"
|
|
305
306
|
ORGANIZATION_ANALYTICS_COST_LIST = "anthropic.organization.analytics.cost.list"
|
|
306
307
|
ORGANIZATION_ANALYTICS_USAGE_REPORT_LIST = "anthropic.organization.analytics.usage_report.list"
|
|
@@ -113,6 +113,8 @@ module Anthropic
|
|
|
113
113
|
|
|
114
114
|
variant const: -> { Anthropic::Models::AnthropicBeta::WEBHOOKS_2026_10_07 }
|
|
115
115
|
|
|
116
|
+
variant const: -> { Anthropic::Models::AnthropicBeta::ADMIN_USER_SIGN_OUT_2026_10_08 }
|
|
117
|
+
|
|
116
118
|
variant const: -> { Anthropic::Models::AnthropicBeta::MESSAGE_THREADS_2026_08_12 }
|
|
117
119
|
|
|
118
120
|
variant const: -> { Anthropic::Models::AnthropicBeta::ANALYTICS_USAGE_COST_2026_08_24 }
|
|
@@ -182,6 +184,7 @@ module Anthropic
|
|
|
182
184
|
SPEND_LIMIT_READS_2026_09_26 = :"spend-limit-reads-2026-09-26"
|
|
183
185
|
TELEMETRY_DESTINATIONS_2026_08_11 = :"telemetry-destinations-2026-08-11"
|
|
184
186
|
WEBHOOKS_2026_10_07 = :"webhooks-2026-10-07"
|
|
187
|
+
ADMIN_USER_SIGN_OUT_2026_10_08 = :"admin-user-sign-out-2026-10-08"
|
|
185
188
|
MESSAGE_THREADS_2026_08_12 = :"message-threads-2026-08-12"
|
|
186
189
|
ANALYTICS_USAGE_COST_2026_08_24 = :"analytics-usage-cost-2026-08-24"
|
|
187
190
|
EXPERIMENTAL_CLAUDE_TAG_2026_10_21 = :"experimental-claude-tag-2026-10-21"
|
|
@@ -4,18 +4,25 @@ module Anthropic
|
|
|
4
4
|
module Models
|
|
5
5
|
class APIErrorObject < Anthropic::Internal::Type::BaseModel
|
|
6
6
|
# @!attribute message
|
|
7
|
+
# A human-readable explanation of the error. Its wording can change, so don't
|
|
8
|
+
# match on it.
|
|
7
9
|
#
|
|
8
10
|
# @return [String]
|
|
9
11
|
required :message, String
|
|
10
12
|
|
|
11
13
|
# @!attribute type
|
|
14
|
+
# The broad category of the error.
|
|
12
15
|
#
|
|
13
16
|
# @return [Symbol, :api_error]
|
|
14
17
|
required :type, const: :api_error
|
|
15
18
|
|
|
16
19
|
# @!method initialize(message:, type: :api_error)
|
|
17
|
-
#
|
|
18
|
-
#
|
|
20
|
+
# Some parameter documentations has been truncated, see
|
|
21
|
+
# {Anthropic::Models::APIErrorObject} for more details.
|
|
22
|
+
#
|
|
23
|
+
# @param message [String] A human-readable explanation of the error. Its wording can change, so don't matc
|
|
24
|
+
#
|
|
25
|
+
# @param type [Symbol, :api_error] The broad category of the error.
|
|
19
26
|
end
|
|
20
27
|
end
|
|
21
28
|
end
|
|
@@ -4,18 +4,25 @@ module Anthropic
|
|
|
4
4
|
module Models
|
|
5
5
|
class AuthenticationError < Anthropic::Internal::Type::BaseModel
|
|
6
6
|
# @!attribute message
|
|
7
|
+
# A human-readable explanation of the error. Its wording can change, so don't
|
|
8
|
+
# match on it.
|
|
7
9
|
#
|
|
8
10
|
# @return [String]
|
|
9
11
|
required :message, String
|
|
10
12
|
|
|
11
13
|
# @!attribute type
|
|
14
|
+
# The broad category of the error.
|
|
12
15
|
#
|
|
13
16
|
# @return [Symbol, :authentication_error]
|
|
14
17
|
required :type, const: :authentication_error
|
|
15
18
|
|
|
16
19
|
# @!method initialize(message:, type: :authentication_error)
|
|
17
|
-
#
|
|
18
|
-
#
|
|
20
|
+
# Some parameter documentations has been truncated, see
|
|
21
|
+
# {Anthropic::Models::AuthenticationError} for more details.
|
|
22
|
+
#
|
|
23
|
+
# @param message [String] A human-readable explanation of the error. Its wording can change, so don't matc
|
|
24
|
+
#
|
|
25
|
+
# @param type [Symbol, :authentication_error] The broad category of the error.
|
|
19
26
|
end
|
|
20
27
|
end
|
|
21
28
|
end
|
|
@@ -62,7 +62,7 @@ module Anthropic
|
|
|
62
62
|
#
|
|
63
63
|
# @param args [Hash{Symbol=>Object}] Attributes for the chosen variant.
|
|
64
64
|
#
|
|
65
|
-
# @option args [String] :message A human-readable explanation of
|
|
65
|
+
# @option args [String] :message A human-readable explanation of the error. Its wording can change, so don't matc
|
|
66
66
|
#
|
|
67
67
|
# @raise [ArgumentError]
|
|
68
68
|
# @return [Anthropic::Models::BetaInvalidRequestError, Anthropic::Models::BetaAuthenticationError, Anthropic::Models::BetaBillingError, Anthropic::Models::BetaPermissionError, Anthropic::Models::BetaNotFoundError, Anthropic::Models::BetaRateLimitError, Anthropic::Models::BetaGatewayTimeoutError, Anthropic::Models::BetaAPIError, Anthropic::Models::BetaOverloadedError, Anthropic::Models::Beta::BetaTargetStoreHeldError]
|
|
@@ -10,8 +10,6 @@ module Anthropic
|
|
|
10
10
|
required :type, const: :conflict_error
|
|
11
11
|
|
|
12
12
|
# @!attribute message
|
|
13
|
-
# A human-readable explanation of why the memory store can't be used yet, with the
|
|
14
|
-
# ID of the dream that is using it when the server can identify it.
|
|
15
13
|
#
|
|
16
14
|
# @return [String, nil]
|
|
17
15
|
optional :message, String
|
|
@@ -28,11 +26,7 @@ module Anthropic
|
|
|
28
26
|
# end or cancel it, then retry. The response sets the `x-should-retry` header to
|
|
29
27
|
# `false`.
|
|
30
28
|
#
|
|
31
|
-
#
|
|
32
|
-
# {Anthropic::Models::Beta::BetaTargetStoreHeldError} for more details.
|
|
33
|
-
#
|
|
34
|
-
# @param message [String] A human-readable explanation of why the memory store can't be used yet, with the
|
|
35
|
-
#
|
|
29
|
+
# @param message [String]
|
|
36
30
|
# @param type [Symbol, :conflict_error]
|
|
37
31
|
end
|
|
38
32
|
end
|
|
@@ -38,6 +38,8 @@ module Anthropic
|
|
|
38
38
|
# The error returned with HTTP status 409 when you create or rename a memory and the path you give is already used by another memory or overlaps another memory's path.
|
|
39
39
|
#
|
|
40
40
|
# Two paths overlap when one is an ancestor of the other, such as `/notes` and `/notes/todo.md`. To free the path, rename or delete the memory that `conflicting_memory_id` references, then retry. To change that memory instead of creating a new one, update it.
|
|
41
|
+
#
|
|
42
|
+
# To handle the error in code, use `conflicting_path` and `conflicting_memory_id` instead of `message`.
|
|
41
43
|
variant :memory_path_conflict_error,
|
|
42
44
|
-> { Anthropic::Beta::MemoryStores::BetaManagedAgentsMemoryPathConflictError }
|
|
43
45
|
|
|
@@ -77,7 +79,7 @@ module Anthropic
|
|
|
77
79
|
#
|
|
78
80
|
# @param args [Hash{Symbol=>Object}] Attributes for the chosen variant.
|
|
79
81
|
#
|
|
80
|
-
# @option args [String] :message A human-readable explanation of
|
|
82
|
+
# @option args [String] :message A human-readable explanation of the error. Its wording can change, so don't matc
|
|
81
83
|
#
|
|
82
84
|
# @option args [String] :conflicting_memory_id The ID of the memory that blocked the write (`mem_...`), or an empty string if t
|
|
83
85
|
#
|
data/lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_path_conflict_error.rb
CHANGED
|
@@ -27,8 +27,6 @@ module Anthropic
|
|
|
27
27
|
optional :conflicting_path, String
|
|
28
28
|
|
|
29
29
|
# @!attribute message
|
|
30
|
-
# A human-readable explanation of the conflict. To handle the error in code, use
|
|
31
|
-
# `conflicting_path` and `conflicting_memory_id` instead.
|
|
32
30
|
#
|
|
33
31
|
# @return [String, nil]
|
|
34
32
|
optional :message, String
|
|
@@ -43,6 +41,9 @@ module Anthropic
|
|
|
43
41
|
# `conflicting_memory_id` references, then retry. To change that memory instead of
|
|
44
42
|
# creating a new one, update it.
|
|
45
43
|
#
|
|
44
|
+
# To handle the error in code, use `conflicting_path` and `conflicting_memory_id`
|
|
45
|
+
# instead of `message`.
|
|
46
|
+
#
|
|
46
47
|
# Some parameter documentations has been truncated, see
|
|
47
48
|
# {Anthropic::Models::Beta::MemoryStores::BetaManagedAgentsMemoryPathConflictError}
|
|
48
49
|
# for more details.
|
|
@@ -51,7 +52,7 @@ module Anthropic
|
|
|
51
52
|
#
|
|
52
53
|
# @param conflicting_path [String] The path that blocked the write: the requested path, or the path of a memory tha
|
|
53
54
|
#
|
|
54
|
-
# @param message [String]
|
|
55
|
+
# @param message [String]
|
|
55
56
|
#
|
|
56
57
|
# @param type [Symbol, :memory_path_conflict_error]
|
|
57
58
|
end
|
data/lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_precondition_failed_error.rb
CHANGED
|
@@ -11,7 +11,6 @@ module Anthropic
|
|
|
11
11
|
required :type, const: :memory_precondition_failed_error
|
|
12
12
|
|
|
13
13
|
# @!attribute message
|
|
14
|
-
# A human-readable explanation of why the precondition failed.
|
|
15
14
|
#
|
|
16
15
|
# @return [String, nil]
|
|
17
16
|
optional :message, String
|
|
@@ -28,8 +27,7 @@ module Anthropic
|
|
|
28
27
|
# [memory guide](https://platform.claude.com/docs/en/managed-agents/memory#safe-content-edits-optimistic-concurrency)
|
|
29
28
|
# to learn more about safe content edits with content hash preconditions.
|
|
30
29
|
#
|
|
31
|
-
# @param message [String]
|
|
32
|
-
#
|
|
30
|
+
# @param message [String]
|
|
33
31
|
# @param type [Symbol, :memory_precondition_failed_error]
|
|
34
32
|
end
|
|
35
33
|
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
module Organization
|
|
7
|
+
# On a public-sector deployment, only an API key or token that belongs to a person
|
|
8
|
+
# with owner permissions can sign out a member with the `managed` role.
|
|
9
|
+
class BetaCannotSignOutManagedMemberError < Anthropic::Errors::PermissionDeniedError
|
|
10
|
+
# @!method error_code
|
|
11
|
+
# @return [Symbol, :cannot_sign_out_managed_member]
|
|
12
|
+
|
|
13
|
+
# @return [Anthropic::Models::Beta::Organization::BetaCannotSignOutManagedMemberErrorDetails]
|
|
14
|
+
def details
|
|
15
|
+
Anthropic::Internal::Type::Converter.coerce(
|
|
16
|
+
Anthropic::Beta::Organization::BetaCannotSignOutManagedMemberErrorDetails,
|
|
17
|
+
Anthropic::Internal::Util.dig(body, [:error, :details])
|
|
18
|
+
)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
data/lib/anthropic/models/beta/organization/beta_cannot_sign_out_managed_member_error_details.rb
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
module Organization
|
|
7
|
+
class BetaCannotSignOutManagedMemberErrorDetails < Anthropic::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute error_code
|
|
9
|
+
#
|
|
10
|
+
# @return [Symbol, :cannot_sign_out_managed_member]
|
|
11
|
+
required :error_code, const: :cannot_sign_out_managed_member
|
|
12
|
+
|
|
13
|
+
# @!method initialize(error_code: :cannot_sign_out_managed_member)
|
|
14
|
+
# On a public-sector deployment, only an API key or token that belongs to a person
|
|
15
|
+
# with owner permissions can sign out a member with the `managed` role.
|
|
16
|
+
#
|
|
17
|
+
# @param error_code [Symbol, :cannot_sign_out_managed_member]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
module Organization
|
|
7
|
+
# The member is a membership admin, and the person the API key or token belongs to
|
|
8
|
+
# is not allowed to sign out membership admins.
|
|
9
|
+
class BetaCannotSignOutMembershipAdminError < Anthropic::Errors::PermissionDeniedError
|
|
10
|
+
# @!method error_code
|
|
11
|
+
# @return [Symbol, :cannot_sign_out_membership_admin]
|
|
12
|
+
|
|
13
|
+
# @return [Anthropic::Models::Beta::Organization::BetaCannotSignOutMembershipAdminErrorDetails]
|
|
14
|
+
def details
|
|
15
|
+
Anthropic::Internal::Type::Converter.coerce(
|
|
16
|
+
Anthropic::Beta::Organization::BetaCannotSignOutMembershipAdminErrorDetails,
|
|
17
|
+
Anthropic::Internal::Util.dig(body, [:error, :details])
|
|
18
|
+
)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
data/lib/anthropic/models/beta/organization/beta_cannot_sign_out_membership_admin_error_details.rb
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
module Organization
|
|
7
|
+
class BetaCannotSignOutMembershipAdminErrorDetails < Anthropic::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute error_code
|
|
9
|
+
#
|
|
10
|
+
# @return [Symbol, :cannot_sign_out_membership_admin]
|
|
11
|
+
required :error_code, const: :cannot_sign_out_membership_admin
|
|
12
|
+
|
|
13
|
+
# @!method initialize(error_code: :cannot_sign_out_membership_admin)
|
|
14
|
+
# The member is a membership admin, and the person the API key or token belongs to
|
|
15
|
+
# is not allowed to sign out membership admins.
|
|
16
|
+
#
|
|
17
|
+
# @param error_code [Symbol, :cannot_sign_out_membership_admin]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
module Organization
|
|
7
|
+
# The member is an owner or has owner permissions, and this API key or token
|
|
8
|
+
# cannot sign them out. In a Claude Enterprise organization, an API key with the
|
|
9
|
+
# `write:members` scope can.
|
|
10
|
+
class BetaCannotSignOutOwnerError < Anthropic::Errors::PermissionDeniedError
|
|
11
|
+
# @!method error_code
|
|
12
|
+
# @return [Symbol, :cannot_sign_out_owner]
|
|
13
|
+
|
|
14
|
+
# @return [Anthropic::Models::Beta::Organization::BetaCannotSignOutOwnerErrorDetails]
|
|
15
|
+
def details
|
|
16
|
+
Anthropic::Internal::Type::Converter.coerce(
|
|
17
|
+
Anthropic::Beta::Organization::BetaCannotSignOutOwnerErrorDetails,
|
|
18
|
+
Anthropic::Internal::Util.dig(body, [:error, :details])
|
|
19
|
+
)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
module Organization
|
|
7
|
+
class BetaCannotSignOutOwnerErrorDetails < Anthropic::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute error_code
|
|
9
|
+
#
|
|
10
|
+
# @return [Symbol, :cannot_sign_out_owner]
|
|
11
|
+
required :error_code, const: :cannot_sign_out_owner
|
|
12
|
+
|
|
13
|
+
# @!method initialize(error_code: :cannot_sign_out_owner)
|
|
14
|
+
# The member is an owner or has owner permissions, and this API key or token
|
|
15
|
+
# cannot sign them out. In a Claude Enterprise organization, an API key with the
|
|
16
|
+
# `write:members` scope can.
|
|
17
|
+
#
|
|
18
|
+
# @param error_code [Symbol, :cannot_sign_out_owner]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
module Organization
|
|
7
|
+
# The member is the organization's primary owner, whom no API key or token can
|
|
8
|
+
# sign out.
|
|
9
|
+
class BetaCannotSignOutPrimaryOwnerError < Anthropic::Errors::BadRequestError
|
|
10
|
+
# @!method error_code
|
|
11
|
+
# @return [Symbol, :cannot_sign_out_primary_owner]
|
|
12
|
+
|
|
13
|
+
# @return [Anthropic::Models::Beta::Organization::BetaCannotSignOutPrimaryOwnerErrorDetails]
|
|
14
|
+
def details
|
|
15
|
+
Anthropic::Internal::Type::Converter.coerce(
|
|
16
|
+
Anthropic::Beta::Organization::BetaCannotSignOutPrimaryOwnerErrorDetails,
|
|
17
|
+
Anthropic::Internal::Util.dig(body, [:error, :details])
|
|
18
|
+
)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
data/lib/anthropic/models/beta/organization/beta_cannot_sign_out_primary_owner_error_details.rb
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
module Organization
|
|
7
|
+
class BetaCannotSignOutPrimaryOwnerErrorDetails < Anthropic::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute error_code
|
|
9
|
+
#
|
|
10
|
+
# @return [Symbol, :cannot_sign_out_primary_owner]
|
|
11
|
+
required :error_code, const: :cannot_sign_out_primary_owner
|
|
12
|
+
|
|
13
|
+
# @!method initialize(error_code: :cannot_sign_out_primary_owner)
|
|
14
|
+
# The member is the organization's primary owner, whom no API key or token can
|
|
15
|
+
# sign out.
|
|
16
|
+
#
|
|
17
|
+
# @param error_code [Symbol, :cannot_sign_out_primary_owner]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
module Organization
|
|
7
|
+
# This OAuth token cannot sign out a membership admin or a member whose roles
|
|
8
|
+
# grant owner, user management, or identity and access management.
|
|
9
|
+
class BetaCannotSignOutPrivilegedMemberError < Anthropic::Errors::PermissionDeniedError
|
|
10
|
+
# @!method error_code
|
|
11
|
+
# @return [Symbol, :cannot_sign_out_privileged_member]
|
|
12
|
+
|
|
13
|
+
# @return [Anthropic::Models::Beta::Organization::BetaCannotSignOutPrivilegedMemberErrorDetails]
|
|
14
|
+
def details
|
|
15
|
+
Anthropic::Internal::Type::Converter.coerce(
|
|
16
|
+
Anthropic::Beta::Organization::BetaCannotSignOutPrivilegedMemberErrorDetails,
|
|
17
|
+
Anthropic::Internal::Util.dig(body, [:error, :details])
|
|
18
|
+
)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
data/lib/anthropic/models/beta/organization/beta_cannot_sign_out_privileged_member_error_details.rb
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
module Organization
|
|
7
|
+
class BetaCannotSignOutPrivilegedMemberErrorDetails < Anthropic::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute error_code
|
|
9
|
+
#
|
|
10
|
+
# @return [Symbol, :cannot_sign_out_privileged_member]
|
|
11
|
+
required :error_code, const: :cannot_sign_out_privileged_member
|
|
12
|
+
|
|
13
|
+
# @!method initialize(error_code: :cannot_sign_out_privileged_member)
|
|
14
|
+
# This OAuth token cannot sign out a membership admin or a member whose roles
|
|
15
|
+
# grant owner, user management, or identity and access management.
|
|
16
|
+
#
|
|
17
|
+
# @param error_code [Symbol, :cannot_sign_out_privileged_member]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
module Organization
|
|
7
|
+
# The member is the user the API key or token belongs to.
|
|
8
|
+
class BetaCannotSignOutSelfError < Anthropic::Errors::BadRequestError
|
|
9
|
+
# @!method error_code
|
|
10
|
+
# @return [Symbol, :cannot_sign_out_self]
|
|
11
|
+
|
|
12
|
+
# @return [Anthropic::Models::Beta::Organization::BetaCannotSignOutSelfErrorDetails]
|
|
13
|
+
def details
|
|
14
|
+
Anthropic::Internal::Type::Converter.coerce(
|
|
15
|
+
Anthropic::Beta::Organization::BetaCannotSignOutSelfErrorDetails,
|
|
16
|
+
Anthropic::Internal::Util.dig(body, [:error, :details])
|
|
17
|
+
)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
module Organization
|
|
7
|
+
class BetaCannotSignOutSelfErrorDetails < Anthropic::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute error_code
|
|
9
|
+
#
|
|
10
|
+
# @return [Symbol, :cannot_sign_out_self]
|
|
11
|
+
required :error_code, const: :cannot_sign_out_self
|
|
12
|
+
|
|
13
|
+
# @!method initialize(error_code: :cannot_sign_out_self)
|
|
14
|
+
# The member is the user the API key or token belongs to.
|
|
15
|
+
#
|
|
16
|
+
# @param error_code [Symbol, :cannot_sign_out_self]
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
module Organization
|
|
7
|
+
# @see Anthropic::Resources::Beta::Organization::Users#sign_out
|
|
8
|
+
class UserSignOutParams < Anthropic::Internal::Type::BaseModel
|
|
9
|
+
extend Anthropic::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include Anthropic::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
# @!attribute user_id
|
|
13
|
+
# ID of the User.
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :user_id, String
|
|
17
|
+
|
|
18
|
+
# @!attribute betas
|
|
19
|
+
# This endpoint is in beta: requests must send `admin-user-sign-out-2026-10-08` in
|
|
20
|
+
# this header.
|
|
21
|
+
#
|
|
22
|
+
# @return [Array<Symbol, String, Anthropic::Models::AnthropicBeta>, nil]
|
|
23
|
+
optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
|
|
24
|
+
|
|
25
|
+
# @!method initialize(user_id:, betas: nil, request_options: {})
|
|
26
|
+
# Some parameter documentations has been truncated, see
|
|
27
|
+
# {Anthropic::Models::Beta::Organization::UserSignOutParams} for more details.
|
|
28
|
+
#
|
|
29
|
+
# @param user_id [String] ID of the User.
|
|
30
|
+
#
|
|
31
|
+
# @param betas [Array<Symbol, String, Anthropic::Models::AnthropicBeta>] This endpoint is in beta: requests must send `admin-user-sign-out-2026-10-08` in
|
|
32
|
+
#
|
|
33
|
+
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}]
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|