import { CliCredentials } from './config'; export declare const API_FETCH_TIMEOUT_MS = 30000; /** Server-side finalize reads and validates every uploaded file (about 35 s for a large world). */ export declare const FINALIZE_FETCH_TIMEOUT_MS = 300000; export declare const apiFetchTimeoutMs: () => number; export declare const finalizeFetchTimeoutMs: () => number; type NestErrorBody = { statusCode?: number; message?: string | string[]; error?: string; }; export declare class ApiError extends Error { readonly status: number; readonly body: NestErrorBody; constructor(status: number, body: NestErrorBody); private static messages; render(): string; } export declare class HelixApi { private readonly baseUrl; private token; constructor(baseUrl: string, token?: string | null); setToken(token: string): void; private refresher; private inflightRefresh; setRefresher(refresher: (() => Promise) | null): void; private renewToken; /** * A stable, non-reversible scope for durable client state (for example the * resumable large-upload checkpoint). It binds that state to this API origin * and credential identity, so a signed intent token cannot be reused against * another server or account. The bearer itself is never persisted; only this * one-way fingerprint leaves memory. */ scopeFingerprint(): string; request(method: string, path: string, body?: unknown, opts?: { timeoutMs?: number; }): Promise; requestItem(method: string, path: string, body?: unknown): Promise; requestBytes(path: string, headers?: Record): Promise<{ bytes: Uint8Array; mediaType: string; }>; postMultipart(path: string, form: FormData, timeoutMs?: number): Promise; sendMultipart(method: string, path: string, form: FormData, timeoutMs?: number): Promise; static forCredentials(creds: CliCredentials): HelixApi; } export declare function uploadToTicket(url: string, body: Buffer, contentType: string, cacheControl?: string, integrity?: { contentSha256: string; writeOnce?: boolean; }): Promise; export {};