import { type Error_, ErrorCategory as GeneratedErrorCategory, ErrorCode as GeneratedErrorCode } from "../api"; import type * as core from "../core"; export declare class SquareError extends Error { readonly statusCode?: number; readonly body?: unknown; readonly errors: SquareError.BodyError[]; readonly rawResponse?: core.RawResponse; readonly cause?: unknown; constructor({ message, statusCode, body, rawResponse, cause, }: { message?: string; statusCode?: number; body?: unknown; rawResponse?: core.RawResponse; cause?: unknown; }); } export declare namespace SquareError { type BodyError = { /** * The high-level category for the error. * See [ErrorCategory](#type-errorcategory) for possible values */ category: ErrorCategory; /** * The specific code of the error. * See [ErrorCode](#type-errorcode) for possible values */ code: ErrorCode; } & Omit; type ErrorCategory = GeneratedErrorCategory | "V1_ERROR"; const ErrorCategory: typeof GeneratedErrorCategory & { readonly V1Error: "V1_ERROR"; }; type ErrorCode = GeneratedErrorCode | "Unknown" | string; const ErrorCode: typeof GeneratedErrorCode & { readonly Unknown: "Unknown"; }; }