/** * Error formatting and exit-code mapping for odoo-cli. * * ALL error output goes to stderr. stdout is reserved for data. * * Exit codes: * 0 = success * 1 = usage error (bad flags, missing args, --confirm missing) * 2 = auth / network error * 3 = not found (record, model, module) * 4 = permission denied * 5 = validation error (Odoo rejected write) * 6 = conflict (already clocked in, timer running) * 10 = partial success (batch, some failed) */ /** Suppress stderr progress/warnings. Called from cli.ts preAction hook. */ export declare function setQuiet(v: boolean): void; /** Disable ANSI color in stderr output. Called from cli.ts preAction hook. */ export declare function setNoColor(v: boolean): void; export declare const EXIT_CODES: { readonly SUCCESS: 0; readonly USAGE_ERROR: 1; readonly AUTH_NETWORK_ERROR: 2; readonly NOT_FOUND: 3; readonly PERMISSION_DENIED: 4; readonly VALIDATION_ERROR: 5; readonly CONFLICT: 6; readonly PARTIAL_SUCCESS: 10; }; export type ExitCode = (typeof EXIT_CODES)[keyof typeof EXIT_CODES]; /** * Format and print an error to stderr, return the appropriate exit code. */ export declare function handleError(err: unknown): ExitCode; /** * Print a formatted error to stderr. */ export declare function printError(message: string, detail?: string, hints?: string[]): void; /** * Print a success message to stderr (decorative, not data). */ export declare function printSuccess(message: string): void; /** * Print an info/progress message to stderr. * Suppressed in --quiet mode. */ export declare function printInfo(message: string): void; /** * Print a warning to stderr. * Suppressed in --quiet mode. */ export declare function printWarning(message: string): void; export declare class CliUsageError extends Error { readonly hints: string[]; constructor(message: string, hints?: string[]); } export declare class CliNotFoundError extends Error { readonly hints: string[]; constructor(message: string, hints?: string[]); } export declare class CliConflictError extends Error { readonly hints: string[]; constructor(message: string, hints?: string[]); } export declare class CliAuthError extends Error { readonly hints: string[]; constructor(message: string, hints?: string[]); } //# sourceMappingURL=errors.d.ts.map