declare const TUNNEL_SERVER: string; /** Thrown when the credits rail rejects a provision for lack of balance. */ export declare class InsufficientCreditsError extends Error { balance?: number; required?: number; topUpUrl?: string; constructor(balance?: number, required?: number, topUpUrl?: string); } /** Thrown when a requested `--subdomain` is taken or invalid (no credit spent). */ export declare class SubdomainError extends Error { subdomain?: string; kind: 'taken' | 'invalid' | 'limit' | 'in_use'; constructor(kind: 'taken' | 'invalid' | 'limit' | 'in_use', message: string, subdomain?: string); } interface ProvisionResult { subdomain: string; publicUrl: string; connectUrl: string; /** Present when the endpoint provisioned with an email inbox (--email). */ emailAddress?: string; } interface DaemonProvisionResult extends ProvisionResult { mode: 'daemon'; /** First connected hour, charged at provision. */ cost: number; /** ISO timestamp when the server auto-stops the session. */ autoStopAt: string; } /** Verify the CLI is logged in. Throws 'not_logged_in' otherwise. */ export declare function initPayment(): Promise; export declare function getBackendName(): string; export declare function provisionTunnel(subdomain?: string, kind?: 'tunnel' | 'webhook', ttl?: string, email?: boolean): Promise; /** A request captured on the /try page before the session was claimed. */ export interface ClaimedRequest { method: string; path: string; headers: Record; body: string | null; receivedAt?: number; } export interface ClaimResult extends ProvisionResult { autoStopAt: string; requests: ClaimedRequest[]; } /** * Claim a /try page session: same subdomain, converted to a normal metered * session on this account. The code comes from the /try page * ("subdomain:secret"). Returns the page's buffered captures for log import. */ export declare function claimTrySession(code: string, ttl?: string): Promise; export declare function provisionDaemonTunnel(ttl: string, subdomain?: string, kind?: 'tunnel' | 'webhook', email?: boolean): Promise; export { TUNNEL_SERVER };