/** Types for the shared, runtime-neutral RSP-signed Site-exit command. */ export type SiteExitOperation = "export" | "repository_head" | "retire_resources" | "status"; export type SiteExitCommandExport = { export_receipt_id: string; exported_at: number; repository_revision: string; }; export type SiteExitCommand = { account_id: string; site_id: string; site_incarnation_id: string; exit_attempt_id: string | null; operation: SiteExitOperation; command_id: string; attempt_started_at: number | null; export: SiteExitCommandExport | null; export_run_id: string | null; locale: "en-US" | "zh-TW" | "ja-JP" | null; }; /** A verified command: the approval's expiry, and `recovery_only` only when the signature covers it. */ export type VerifiedSiteExitCommand = SiteExitCommand & { expires_at: number; recovery_only?: true }; export type SiteExitLedgerEntry = { binding: { account_id: string; site_id: string; site_incarnation_id: string; export_receipt_id: string | null }; commands: number; last_command_id?: string; [key: string]: unknown; }; export type SiteExitAdmission = | { kind: "replayed" | "binding_conflict" } | { kind: "admitted"; ledgerKey: string; prior: SiteExitLedgerEntry | null; entry: SiteExitLedgerEntry }; export const OWNER_OPERATION_SITE_EXIT_AUDIENCE: string; export const SITE_EXIT_OPERATIONS: readonly SiteExitOperation[]; export function normalizeSiteExitCommand(value: unknown): SiteExitCommand | null; export function signSiteExitCommand(input: { command: SiteExitCommand; signingKey: string; expiresAt: number; recoveryOnly?: boolean; }): Promise; export function verifySiteExitCommand(input: { value: unknown; verificationKey: string | undefined; now?: number; }): Promise; export function siteExitLedgerKey(command: SiteExitCommand): string; export function siteExitCommandKey(command: SiteExitCommand): string; export function admitSiteExitCommand(input: { storage: { get(key: string): Promise; put(key: string, value: unknown): Promise }; command: VerifiedSiteExitCommand; }): Promise; export function exitCommandLeaveExport(command: SiteExitCommand | null | undefined): { readFlow(input?: { key?: string }): Promise<{ startedAt: number } | null>; readReceipt(input?: { key?: string; accountId?: string }): Promise<{ account_id: string; exported_at: number; layers: { members: "read"; orders: "read"; inbox: "read" }; } | null>; };