40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
import type { ProjectSnapshotKind } from "../models/project-snapshot-policy.model.js";
|
|
import type { ProjectStateRestoreCommand } from "../models/project-state-restore-command.model.js";
|
|
|
|
export interface ProjectSnapshotMetadata {
|
|
id: string;
|
|
projectId: string;
|
|
sourceRevision: number;
|
|
schemaVersion: number;
|
|
kind: ProjectSnapshotKind;
|
|
name: string;
|
|
description: string | null;
|
|
payloadSha256: string;
|
|
createdAtIso: string;
|
|
createdByActorId: string | null;
|
|
}
|
|
|
|
export interface CreateNamedProjectSnapshotInput {
|
|
projectId: string;
|
|
expectedRevision: number;
|
|
name: string;
|
|
description?: string;
|
|
actorId?: string;
|
|
}
|
|
|
|
export interface PreparedProjectSnapshotRestore {
|
|
snapshot: ProjectSnapshotMetadata;
|
|
command: ProjectStateRestoreCommand;
|
|
}
|
|
|
|
export interface ProjectSnapshotStore {
|
|
createNamed(
|
|
input: CreateNamedProjectSnapshotInput
|
|
): ProjectSnapshotMetadata | null;
|
|
listByProject(projectId: string): ProjectSnapshotMetadata[] | null;
|
|
prepareRestore(
|
|
projectId: string,
|
|
snapshotId: string
|
|
): PreparedProjectSnapshotRestore | null;
|
|
}
|