import type { RobotsErrorReason } from '../../../types/robots'; /** No organization or environment in it, so it's right for every account. */ export declare const ROBOTS_DASHBOARD_URL = "https://dashboard.mux.com"; export interface ClassifiedMuxError { reason: RobotsErrorReason; message: string; /** Where Robots' terms are accepted, for `not-enabled`. */ termsUrl?: string; /** Absent when Mux didn't answer. */ status?: number; } /** A refusal the plugin's Robots routes answer with `{ error: { reason, message } }`. */ export declare class RobotsRequestError extends Error { readonly status: number; readonly reason: RobotsErrorReason; readonly termsUrl?: string; constructor(status: number, reason: RobotsErrorReason, message: string, termsUrl?: string); /** Always 400: Mux's own 401 or 403 would read as the person's session or role failing. */ static fromMux(error: ClassifiedMuxError): RobotsRequestError; } /** Runs one Mux request, turning its failure into a `RobotsRequestError`. */ export declare function callMux(request: () => Promise): Promise; /** Mux's 404, which Robots also answers for a job or directive asked for through the other version. */ export declare const isNotFound: (error: unknown) => boolean; /** The human-readable part of a Mux error body. Mux's endpoints put it in different places, so each is tried in turn. */ export declare function readMuxErrorMessage(body: unknown, status: number): string; /** * What a failed Mux call means for the person who made it. * * Without a status, Mux may or may not have received the request: `unconfirmed`. The SDK's own checks * (an id that makes an invalid path, say) fail before anything is sent, so those are refusals. */ export declare function classifyMuxError(error: unknown, kind?: 'job' | 'run' | 'other'): ClassifiedMuxError;