/** One snapshot of a project as the list shows it (#231). */ export interface SnapshotSummary { id: string; name: string; /** The project revision the snapshot copied. */ revision: number; /** ISO time, UTC. */ createdAt: string; } /** * The snapshots of a project: copies of the project as the server stored it. A restore writes the * copy back as a new revision and keeps the stand it replaced as a snapshot of its own, `before`. */ export interface SnapshotStore { list(projectId: string): Promise; /** An empty name lets the server name it by the time. */ create(projectId: string, name: string): Promise; /** Rejects with `StaleRevisionError` when `revision` is not the stored one. */ restore( projectId: string, snapshotId: string, revision: number, ): Promise<{ revision: number; before: SnapshotSummary }>; delete(projectId: string, snapshotId: string): Promise; }