/**
 * Extracts an error message from an API error response body.
 * Checks for our standard API error format: { error: { message: "..." } }
 * Also handles legacy formats with `error` or `message` as strings.
 */
export declare function extractApiErrorMessage(body: unknown): string | null;
/**
 * Normalizes various error types and throws with an appropriate message.
 *
 * - For ApiRequestError: extracts message from body.error or body.message
 * - For Error instances: re-throws as-is
 * - For unknown errors: wraps with fallback message
 *
 * @param error - The error to normalize
 * @param fallback - Fallback message if no specific message can be extracted
 * @throws {Error} Always throws - this function never returns
 */
export declare function normalizeApiError(error: unknown, fallback: string): never;
