/** * The role API's refusals as an exit code (Issue #4116). On its own, free of the file * system and of catches, because `message-dispatch.ts` reads it and that is on the * paths `wait` / `ask` / `verify` hold to their deadline. */ import { ApiError, type ApiErrorPayload } from './api-client'; /** * A role command's failure, with the code `--json` reports. An {@link ApiError}, so * `handleCommandError` prints it and exits with its code in a command that has no * `--json` of its own. */ export declare class RoleCliError extends ApiError { readonly code: string; /** Extra keys of the `--json` failure, such as `candidates` or `references`. */ readonly details: Record; constructor(code: string, message: string, exitCode: number, /** Extra keys of the `--json` failure, such as `candidates` or `references`. */ details?: Record, statusCode?: number, payload?: ApiErrorPayload); } /** Said on every refusal after a save, so nobody takes the old setting to be still there. */ export declare const ROLE_STAYED_SAVED = "The role setting stayed saved, so after a restart the message can be sent again without --role."; /** Whether a send's refusal says its role was saved before it. */ export declare function roleSettingSavedBy(error: unknown): boolean; /** * The role failure an API error is, or null when it is not one. The management * routes put their code in `error` and their sentence in `message`; the send and * task routes put the code in `code` and the sentence in `error`. */ export declare function roleFailureFromApi(error: unknown): RoleCliError | null; export declare function usageError(message: string): RoleCliError; //# sourceMappingURL=role-failure.d.ts.map