/** * Typed failure for the `/outpost/*` control plane, plus the structural * decoders for the two error envelopes hq-pro sends that are NOT plain * `{ error | message }` bodies. * * Portable: imports only sibling type declarations. Safe in a Next.js server * context. */ import type { BillingErrorPayload, BillingSetupAction, OutpostCappedPayload } from "./types.js"; /** * A non-2xx from the `/outpost/*` control plane. * * `step` is preserved verbatim because callers branch on it: the destroy * route's `teardown-incomplete` means "retry", not "failed", and * `platform-unsupported` means "this box is Lightsail, use the SSH path". */ export declare class OutpostHttpError extends Error { status: number; step?: string; /** hq-pro's billing envelope on a `402 billing_required` provision block. */ billing?: BillingErrorPayload; /** hq-pro's cap envelope on a `409` provision block. */ capped?: OutpostCappedPayload; constructor(status: number, message: string, step?: string, billing?: BillingErrorPayload, capped?: OutpostCappedPayload); } /** Decode hq-pro's `{ capped, limit, outposts }` cap envelope, if present. */ export declare function parseCappedPayload(body: unknown): OutpostCappedPayload | undefined; /** Narrow an unknown value to a usable `BillingSetupAction`. */ export declare function isBillingSetupAction(value: unknown): value is BillingSetupAction; /** Pull a `BillingErrorPayload` out of a decoded hq-pro error body, if present. */ export declare function parseBillingPayload(body: unknown): BillingErrorPayload | undefined; //# sourceMappingURL=errors.d.ts.map