/** * Shared JSON parsing for control-plane responses (#387). The single most common * misconfiguration — a control-plane URL pointing at the console SPA instead of its * `/api` base — used to surface as `Unexpected token '<', "`), say what it IS (#559 (7)): a platform-side infrastructure * fault, not an error in the caller's request or code — and the reference is a * handle for CLOUDFLARE support, which the CI error text used to miscall "a * control-plane trace only its operator can resolve". Returns '' when the * message is not that shape, so callers can append unconditionally. */ export declare function explainPlatformFault(status: number, message: string): string; /** Parse a response body as JSON; on failure, explain what was received and why. */ export declare function parseJsonBody(body: string, url: string): T; /** Read a fetch Response's body and parse it via `parseJsonBody`. */ export declare function readJson(res: Response, url: string): Promise; /** * Read a paged control-plane list to the END. Every GET list route returns * `{ entries, nextCursor }` (contracts pagination.ts) with a defaulted page, and * the CLI's reads are complete-list semantics (find the max semver, join installs * to hostnames) — so walk the cursor until it runs out, at the route's max page * size to keep the walk short. `fetchPage` owns auth headers and error handling. */ export declare function readAllEntries(url: string, fetchPage: (pageUrl: string) => Promise<{ entries: T[]; nextCursor: string | null; }>): Promise; //# sourceMappingURL=http.d.ts.map