/** * NewebPay Logistics SDK 的基底錯誤類別。 */ export declare class NewebPayError extends Error { constructor(message: string); } /** * 當網路請求失敗時拋出的錯誤。 */ export declare class NetworkError extends NewebPayError { readonly originalError?: unknown | undefined; /** * 建立 NetworkError 實例。 * * @param message - 錯誤訊息。 * @param originalError - 導致失敗的原始錯誤。 */ constructor(message: string, originalError?: unknown | undefined); } /** * 當 API 回傳非成功狀態時拋出的錯誤。 */ export declare class ApiError extends NewebPayError { readonly status: string; readonly data?: unknown | undefined; /** * 建立 ApiError 實例。 * * @param message - 錯誤訊息。 * @param status - HTTP 狀態碼或 API 狀態。 * @param data - 與錯誤相關的額外資料。 */ constructor(message: string, status: string, data?: unknown | undefined); } /** * 當請求驗證失敗時拋出的錯誤。 */ export declare class ValidationError extends NewebPayError { constructor(message: string); }