export declare class IncreaseError extends Error { } export declare class APIError extends IncreaseError { /** HTTP status for the response that caused the error */ readonly status: TStatus; /** HTTP headers for the response that caused the error */ readonly headers: THeaders; /** JSON body of the response that caused the error */ readonly error: TError; readonly idempotentReplayed: string | null | undefined; constructor(status: TStatus, error: TError, message: string | undefined, headers: THeaders); private static makeMessage; static generate(status: number | undefined, errorResponse: Object | undefined, message: string | undefined, headers: Headers | undefined): APIError; } export declare class APIUserAbortError extends APIError { constructor({ message }?: { message?: string; }); } export declare class APIConnectionError extends APIError { constructor({ message, cause }: { message?: string | undefined; cause?: Error | undefined; }); } export declare class APIConnectionTimeoutError extends APIConnectionError { constructor({ message }?: { message?: string; }); } export declare class BadRequestError extends APIError<400, Headers> { } export declare class AuthenticationError extends APIError<401, Headers> { } export declare class PermissionDeniedError extends APIError<403, Headers> { } export declare class NotFoundError extends APIError<404, Headers> { } export declare class ConflictError extends APIError<409, Headers> { } export declare class UnprocessableEntityError extends APIError<422, Headers> { } export declare class RateLimitError extends APIError<429, Headers> { } export declare class InvalidParametersError extends BadRequestError { detail: string | null; /** * All errors related to parsing the request parameters. */ errors: Array<{ [key: string]: unknown; }>; status: 400; title: string; type: 'invalid_parameters_error'; constructor(status: 400, error: Object, message: string | undefined, headers: Headers); } export declare class MalformedRequestError extends BadRequestError { detail: string | null; status: 400; title: string; type: 'malformed_request_error'; constructor(status: 400, error: Object, message: string | undefined, headers: Headers); } export declare class InvalidAPIKeyError extends AuthenticationError { detail: string | null; /** * - `deleted_credential` - deleted_credential * - `expired_credential` - expired_credential * - `ip_not_allowed` - ip_not_allowed * - `no_credential` - no_credential * - `no_header` - no_header * - `no_api_access` - no_api_access * - `wrong_environment` - wrong_environment */ reason: 'deleted_credential' | 'expired_credential' | 'ip_not_allowed' | 'no_credential' | 'no_header' | 'no_api_access' | 'wrong_environment'; status: 401; title: string; type: 'invalid_api_key_error'; constructor(status: 401, error: Object, message: string | undefined, headers: Headers); } export declare class EnvironmentMismatchError extends PermissionDeniedError { detail: string | null; status: 403; title: string; type: 'environment_mismatch_error'; constructor(status: 403, error: Object, message: string | undefined, headers: Headers); } export declare class InsufficientPermissionsError extends PermissionDeniedError { detail: string | null; status: 403; title: string; type: 'insufficient_permissions_error'; constructor(status: 403, error: Object, message: string | undefined, headers: Headers); } export declare class PrivateFeatureError extends PermissionDeniedError { detail: string | null; status: 403; title: string; type: 'private_feature_error'; constructor(status: 403, error: Object, message: string | undefined, headers: Headers); } export declare class APIMethodNotFoundError extends NotFoundError { detail: string | null; status: 404; title: string; type: 'api_method_not_found_error'; constructor(status: 404, error: Object, message: string | undefined, headers: Headers); } export declare class ObjectNotFoundError extends NotFoundError { detail: string | null; status: 404; title: string; type: 'object_not_found_error'; /** * - `production` - production * - `sandbox` - sandbox */ likely_environment?: 'production' | 'sandbox' | null; constructor(status: 404, error: Object, message: string | undefined, headers: Headers); } export declare class IdempotencyKeyAlreadyUsedError extends ConflictError { detail: string | null; resource_id: string; status: 409; title: string; type: 'idempotency_key_already_used_error'; constructor(status: 409, error: Object, message: string | undefined, headers: Headers); } export declare class InvalidOperationError extends ConflictError { detail: string | null; status: 409; title: string; type: 'invalid_operation_error'; constructor(status: 409, error: Object, message: string | undefined, headers: Headers); } export declare class RateLimitedError extends RateLimitError { detail: string | null; status: 429; title: string; type: 'rate_limited_error'; retry_after?: number | null; constructor(status: 429, error: Object, message: string | undefined, headers: Headers); } export declare class InternalServerError extends APIError { detail: string | null; status: 500; title: string; type: 'internal_server_error'; constructor(status: 500, error: Object, message: string | undefined, headers: Headers); } //# sourceMappingURL=error.d.mts.map