import type { Manifest } from "./manifest.js"; /** 生成手册所需的非秘密快照坐标。刻意不收连接串/密钥类型——签名即防线。 */ export interface RecoveryDocContext { snapshot: string; bucket: string; endpoint?: string; region?: string; prefix: string; projectName: string; } /** * 手册里的归档在哪。bucket = S3 兼容桶,写完整对象键;folder = 托管 worker 的 Google Drive 目标, * 手册就放在归档旁边,写文件名,name 是下载那一步说的"从哪里下"(如 "Google Drive folder") */ export type RecoveryDocPlace = { kind: "bucket"; } | { kind: "folder"; name: string; }; export interface AuthRecoveryText { /** "What this snapshot contains" 里 Auth 那一行(带换行);manifest 没有 auth 段时为空串 */ contentsLine: string; /** 只有 Auth 为 included 的快照才有:替换"Not covered"整段和恢复的第 3、4 步 */ included: { notCovered: string; restoreSteps: string; } | null; } /** * RECOVERY.md 里和 Auth 用户有关的段落(2.10.0 起)。S3 版(renderRecoveryDoc)和托管 worker 的 * Google Drive 版共用这一份:单事务恢复脚本里的空目标检查、清理待处理链接、行数核对,两边不能各写各的。 * 没有 auth 字段的快照:contentsLine 为空、included 为 null,手册和 2.10.0 之前一样 */ export declare function authRecoveryText(manifest: Manifest, place: RecoveryDocPlace): AuthRecoveryText; export declare function renderRecoveryDoc(manifest: Manifest, ctx: RecoveryDocContext): string;