import { AxiosError } from "axios"; import { Request } from "express"; export declare enum Errors { ALREADY_SIGNED = "ALREADY_SIGNED", SERVER_COM_ERROR = "SERVER_COM_ERROR", PIN_BLOCKED = "PIN_BLOCKED", EXPIRED = "EXPIRED", NOT_A_MOBILE_SIGNATURE_USER = "NOT_A_MOBILE_SIGNATURE_USER", SIGN_TIMEOUT = "SIGN_TIMEOUT" } export interface OnboardingApiErrorResponse { responseStatus: { errorCode: string; message: string; errors: Array<{ errorCode: string; fieldName: string; message: string; meta: any; }>; }; } export interface FormattedNetworkError extends Error { _formatted: "server" | "client"; _message: string; data: { error: { config?: { baseUrl: AxiosError["config"]["baseURL"]; headers: AxiosError["config"]["headers"]; method: AxiosError["config"]["method"]; url: AxiosError["config"]["url"]; data: AxiosError["config"]["data"]; }; request?: { headers: AxiosError["request"]["headers"]; config: AxiosError["request"]["config"]; }; response?: { headers: AxiosError["response"]["headers"]; status: AxiosError["response"]["status"]; data: AxiosError["response"]["data"]; config: AxiosError["response"]["config"]; }; }; request: { headers: Request["headers"]; body: Request["body"]; params: Request["params"]; query: Request["query"]; }; }; } export interface ParsedError { _parsed: "server" | "client"; message: string; originalError?: Error | FormattedNetworkError; }