UNPKG

@anthropic-ai/sdk

Version:
221 lines • 10.4 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CMEKKeyUnreachableError = exports.CMEKContextUnavailableError = exports.RampLimitExceededError = exports.EnforcedSpendLimitReachedError = exports.ContractSpendLimitReachedError = exports.RequestBodyTooLargeAfterDecodingError = exports.SandboxEgressRestrictedError = exports.LinkedOrganizationSpendLimitReachedError = exports.LinkedOrganizationBillingUnavailableError = exports.RequestBodyEncodingUnsupportedError = exports.RequestBodyEncodingInvalidError = exports.ParentOrganizationRequiredError = exports.OrganizationTypeNotSupportedError = exports.OrganizationOnHoldError = exports.CMEKKeyNetworkBlockedError = exports.CMEKKeyDisabledError = exports.ClaudeCodeVersionTooOldError = exports.ClaudeCodeKeyCreatorNotMemberError = void 0; const error_1 = require("../core/error.js"); var ClaudeCodeKeyCreatorNotMemberError = /* @__PURE__ */ (() => { /** * The API key belongs to the Claude Code workspace, and the user who created it is * no longer a member of the organization or of that workspace. */ class ClaudeCodeKeyCreatorNotMemberError extends error_1.BadRequestError { } /** @internal */ ClaudeCodeKeyCreatorNotMemberError._errorName = 'ClaudeCodeKeyCreatorNotMemberError'; return ClaudeCodeKeyCreatorNotMemberError; })(); exports.ClaudeCodeKeyCreatorNotMemberError = ClaudeCodeKeyCreatorNotMemberError; var ClaudeCodeVersionTooOldError = /* @__PURE__ */ (() => { /** * The request comes from a Claude Code version older than the minimum that the * requested model or the organization requires. Update Claude Code, then retry. */ class ClaudeCodeVersionTooOldError extends error_1.BadRequestError { } /** @internal */ ClaudeCodeVersionTooOldError._errorName = 'ClaudeCodeVersionTooOldError'; return ClaudeCodeVersionTooOldError; })(); exports.ClaudeCodeVersionTooOldError = ClaudeCodeVersionTooOldError; var CMEKKeyDisabledError = /* @__PURE__ */ (() => { /** * The workspace's customer-managed encryption key is disabled or revoked. * Re-enable the key, then retry. */ class CMEKKeyDisabledError extends error_1.BadRequestError { } /** @internal */ CMEKKeyDisabledError._errorName = 'CMEKKeyDisabledError'; return CMEKKeyDisabledError; })(); exports.CMEKKeyDisabledError = CMEKKeyDisabledError; var CMEKKeyNetworkBlockedError = /* @__PURE__ */ (() => { /** * The key management service's network access controls blocked the request to the * workspace's customer-managed encryption key. The key itself may be healthy. */ class CMEKKeyNetworkBlockedError extends error_1.BadRequestError { } /** @internal */ CMEKKeyNetworkBlockedError._errorName = 'CMEKKeyNetworkBlockedError'; return CMEKKeyNetworkBlockedError; })(); exports.CMEKKeyNetworkBlockedError = CMEKKeyNetworkBlockedError; var OrganizationOnHoldError = /* @__PURE__ */ (() => { /** * Anthropic has disabled the organization for trust and safety reasons. An * organization disabled for any other reason, such as billing, does not get this * code. `appeal_url`, when present, is where the organization can appeal. */ class OrganizationOnHoldError extends error_1.BadRequestError { } /** @internal */ OrganizationOnHoldError._errorName = 'OrganizationOnHoldError'; return OrganizationOnHoldError; })(); exports.OrganizationOnHoldError = OrganizationOnHoldError; var OrganizationTypeNotSupportedError = /* @__PURE__ */ (() => { /** * The endpoint does not support the organization's type. Each endpoint's * description says which organization types it supports. */ class OrganizationTypeNotSupportedError extends error_1.BadRequestError { } /** @internal */ OrganizationTypeNotSupportedError._errorName = 'OrganizationTypeNotSupportedError'; return OrganizationTypeNotSupportedError; })(); exports.OrganizationTypeNotSupportedError = OrganizationTypeNotSupportedError; var ParentOrganizationRequiredError = /* @__PURE__ */ (() => { /** * The endpoint serves only organizations that belong to a parent organization, and * this organization belongs to none. */ class ParentOrganizationRequiredError extends error_1.BadRequestError { } /** @internal */ ParentOrganizationRequiredError._errorName = 'ParentOrganizationRequiredError'; return ParentOrganizationRequiredError; })(); exports.ParentOrganizationRequiredError = ParentOrganizationRequiredError; var RequestBodyEncodingInvalidError = /* @__PURE__ */ (() => { /** * The request body is not valid for its `Content-Encoding`. */ class RequestBodyEncodingInvalidError extends error_1.BadRequestError { } /** @internal */ RequestBodyEncodingInvalidError._errorName = 'RequestBodyEncodingInvalidError'; return RequestBodyEncodingInvalidError; })(); exports.RequestBodyEncodingInvalidError = RequestBodyEncodingInvalidError; var RequestBodyEncodingUnsupportedError = /* @__PURE__ */ (() => { /** * The request's `Content-Encoding` is not supported. */ class RequestBodyEncodingUnsupportedError extends error_1.BadRequestError { } /** @internal */ RequestBodyEncodingUnsupportedError._errorName = 'RequestBodyEncodingUnsupportedError'; return RequestBodyEncodingUnsupportedError; })(); exports.RequestBodyEncodingUnsupportedError = RequestBodyEncodingUnsupportedError; var LinkedOrganizationBillingUnavailableError = /* @__PURE__ */ (() => { /** * Anthropic cannot currently bill the organization linked to the request's user * profile, for a reason that lies with that organization's own account. The * response does not say what the reason is. */ class LinkedOrganizationBillingUnavailableError extends error_1.PaymentRequiredError { } /** @internal */ LinkedOrganizationBillingUnavailableError._errorName = 'LinkedOrganizationBillingUnavailableError'; return LinkedOrganizationBillingUnavailableError; })(); exports.LinkedOrganizationBillingUnavailableError = LinkedOrganizationBillingUnavailableError; var LinkedOrganizationSpendLimitReachedError = /* @__PURE__ */ (() => { /** * The organization linked to the request's user profile has reached a spend limit * that it set, or lacks credit for the request. The response does not say which * applies. */ class LinkedOrganizationSpendLimitReachedError extends error_1.PaymentRequiredError { } /** @internal */ LinkedOrganizationSpendLimitReachedError._errorName = 'LinkedOrganizationSpendLimitReachedError'; return LinkedOrganizationSpendLimitReachedError; })(); exports.LinkedOrganizationSpendLimitReachedError = LinkedOrganizationSpendLimitReachedError; var SandboxEgressRestrictedError = /* @__PURE__ */ (() => { /** * The request came from a Claude sandbox with restricted network access, which is * not allowed to make this request. Send it from outside the sandbox, or from a * sandbox with unrestricted network access. */ class SandboxEgressRestrictedError extends error_1.PermissionDeniedError { } /** @internal */ SandboxEgressRestrictedError._errorName = 'SandboxEgressRestrictedError'; return SandboxEgressRestrictedError; })(); exports.SandboxEgressRestrictedError = SandboxEgressRestrictedError; var RequestBodyTooLargeAfterDecodingError = /* @__PURE__ */ (() => { /** * The compressed request body exceeds the request size limit once decoded. */ class RequestBodyTooLargeAfterDecodingError extends error_1.ContentTooLargeError { } /** @internal */ RequestBodyTooLargeAfterDecodingError._errorName = 'RequestBodyTooLargeAfterDecodingError'; return RequestBodyTooLargeAfterDecodingError; })(); exports.RequestBodyTooLargeAfterDecodingError = RequestBodyTooLargeAfterDecodingError; var ContractSpendLimitReachedError = /* @__PURE__ */ (() => { /** * The organization has reached the spend limit of its contract. */ class ContractSpendLimitReachedError extends error_1.RateLimitError { } /** @internal */ ContractSpendLimitReachedError._errorName = 'ContractSpendLimitReachedError'; return ContractSpendLimitReachedError; })(); exports.ContractSpendLimitReachedError = ContractSpendLimitReachedError; var EnforcedSpendLimitReachedError = /* @__PURE__ */ (() => { /** * The organization has crossed the monthly API usage threshold of its API tier. */ class EnforcedSpendLimitReachedError extends error_1.RateLimitError { } /** @internal */ EnforcedSpendLimitReachedError._errorName = 'EnforcedSpendLimitReachedError'; return EnforcedSpendLimitReachedError; })(); exports.EnforcedSpendLimitReachedError = EnforcedSpendLimitReachedError; var RampLimitExceededError = /* @__PURE__ */ (() => { /** * The request would exceed a ramp limit, which caps how fast usage can grow. Retry * after the time in the `retry-after` header. */ class RampLimitExceededError extends error_1.RateLimitError { } /** @internal */ RampLimitExceededError._errorName = 'RampLimitExceededError'; return RampLimitExceededError; })(); exports.RampLimitExceededError = RampLimitExceededError; var CMEKContextUnavailableError = /* @__PURE__ */ (() => { /** * The workspace's encryption settings could not be read, so the request was * refused. Retry in a few minutes. */ class CMEKContextUnavailableError extends error_1.ServiceUnavailableError { } /** @internal */ CMEKContextUnavailableError._errorName = 'CMEKContextUnavailableError'; return CMEKContextUnavailableError; })(); exports.CMEKContextUnavailableError = CMEKContextUnavailableError; var CMEKKeyUnreachableError = /* @__PURE__ */ (() => { /** * The workspace's customer-managed encryption key could not be reached. Retry the * request; if this continues, check that the key is available in your key * management service, or contact Anthropic support. */ class CMEKKeyUnreachableError extends error_1.ServiceUnavailableError { } /** @internal */ CMEKKeyUnreachableError._errorName = 'CMEKKeyUnreachableError'; return CMEKKeyUnreachableError; })(); exports.CMEKKeyUnreachableError = CMEKKeyUnreachableError; //# sourceMappingURL=shared.js.map