/** * ZarrPoller * * Backend status codes: * 0 finished, ok * 1 finished, failed * 2 finished, not found * 3 waiting * 4 processing * 5 gone / unknown * * The status endpoint may also return a `reason` string (e.g. why a * conversion failed or a file was not found). It is forwarded as the second * argument to `onStatus` so hosts can show a precise error message. */ export interface ZarrPollerOptions { /** Polling interval in ms. Default: 2000 */ intervalMs?: number; /** Override auth header injection. Default: reads freva_auth_token cookie. */ getAuthHeaders?: () => Record; /** Override the status endpoint URL. Receives the already-encoded zarr URL. */ getStatusUrl?: (encodedZarrUrl: string) => string; /** * Called whenever a new status code arrives. `reason` carries the optional * server-provided explanation (`data.reason`), or `null` when absent. */ onStatus?: (statusCode: number, reason: string | null) => void; /** Called on network / parse error. */ onError?: (error: string) => void; } export declare class ZarrPoller { private timer; private cancelled; private readonly zarrUrl; private readonly intervalMs; private readonly getAuthHeaders; private readonly getStatusUrl; private readonly onStatus; private readonly onError; constructor(zarrUrl: string, options?: ZarrPollerOptions); start(): void; stop(): void; private poll; } //# sourceMappingURL=ZarrPoller.d.ts.map