import type { SandboxRecoveryProjection, SandboxRecoverySelection, SandboxRecoveryTarget, SandboxRecoveryRequest } from "@opengeni/sdk"; export type { SandboxRecoveryRequest } from "@opengeni/sdk"; export declare function sameRecoveryTarget(left: SandboxRecoveryTarget | undefined, right: SandboxRecoveryTarget): boolean; export type SandboxRecoveryClient = { getSandboxRecovery: (workspaceId: string, sessionId: string) => Promise; recoverSandbox: (workspaceId: string, sessionId: string, request: SandboxRecoveryRequest) => Promise<{ operationId: string; recovery: SandboxRecoveryProjection; }>; }; export declare function sameRecoverySelection(left: SandboxRecoverySelection | null, right: SandboxRecoverySelection | null): boolean; export type SandboxRecoveryState = { projection: SandboxRecoveryProjection | null; reading: boolean; submitting: boolean; request: SandboxRecoveryRequest | null; uncertain: boolean; error: string | null; /** * The API refused the read with 403 and no consent request is retained: * recovery requires the canonical managed-human cookie session plus session * control, so it cannot apply to this viewer (local mode, API keys, delegated * or read-only principals). */ notApplicable: boolean; }; /** A read-only 403 means this viewer can never consent, not that the check failed. */ export declare function isRecoveryNotApplicableError(error: unknown): boolean; /** Public blocker codes are stable; UI copy must not expose persistence jargon. * A timed wait never implies Opengeni proceeds by itself: only Retry or a new * message decides again, so the copy names when that becomes possible. */ export declare function sandboxRecoveryBlocker(reason: string, availableAt?: string | null): string; /** What an automatic Retry will do after the managed sandbox was lost. */ export declare function automaticRecoveryRetryNotice(projection: SandboxRecoveryProjection): string; /** GETs may repeat; a consented mutation never repeats automatically. */ export declare function createSandboxRecoveryController(client: SandboxRecoveryClient, workspaceId: string, sessionId: string): { getSnapshot: () => SandboxRecoveryState; subscribe: (listener: () => void) => () => void; refresh: () => Promise; recoverWorkspace(action: "retry" | "continue_fresh", target: SandboxRecoveryTarget): Promise; consent(selection: SandboxRecoverySelection): Promise; };