import type { IConfigSnapshotUseCase } from '../ports/inbound/IConfigSnapshotUseCase.js'; import type { IConfigSnapshotRepository } from '../ports/outbound/IConfigSnapshotRepository.js'; import type { IConfigSnapshotStorage } from '../ports/outbound/IConfigSnapshotStorage.js'; import type { IConfigFileCollector } from '../ports/outbound/IConfigFileCollector.js'; import { ConfigSnapshot } from '../../domain/entities/ConfigSnapshot.js'; import { SnapshotDiff } from '../../domain/value-objects/SnapshotDiff.js'; import type { IWorldAssignmentPort } from '../ports/outbound/IWorldAssignmentPort.js'; import type { IContainerRuntimePort } from '../ports/outbound/IContainerRuntimePort.js'; /** * ConfigSnapshotUseCaseImpl * Implements IConfigSnapshotUseCase orchestrating config snapshot operations. * Coordinates between repository (metadata), storage (file contents), and collector (file discovery). */ export declare class ConfigSnapshotUseCaseImpl implements IConfigSnapshotUseCase { private readonly repository; private readonly storage; private readonly collector; private readonly assignments?; private readonly runtime?; constructor(repository: IConfigSnapshotRepository, storage: IConfigSnapshotStorage, collector: IConfigFileCollector, assignments?: IWorldAssignmentPort | undefined, runtime?: IContainerRuntimePort | undefined); /** * A restored docker-compose.yml may not move the world either: compose * `environment` overrides config.env, the /worlds and /data mappings * decide which directories the server opens, and the env_file order decides * which EXTRA_ARGS wins (#670). */ private checkRestoredCompose; /** * A restored config.env may not bypass the world assignment rules (#670): * the result must pass checkProposed (R1, R7), and an assignment change * needs a stopped server, whatever `force` says. Without an assignment * port a config.env restore fails closed. */ private checkRestoredAssignment; /** * Create a new config snapshot for a server * Collects files, stores file contents, and saves metadata * @param serverName - Name of the server to snapshot * @param description - Optional description for the snapshot * @param scheduleId - Optional schedule ID if triggered by a schedule */ create(serverName: string, description?: string, scheduleId?: string): Promise; /** * List config snapshots, optionally filtered by server * When no serverName is provided, returns all snapshots across all servers */ list(serverName?: string, limit?: number, offset?: number): Promise; /** * Count config snapshots, optionally filtered by server */ count(serverName?: string): Promise; /** * Find a config snapshot by ID */ findById(id: string): Promise; /** * Compute the diff between two snapshots * Identifies added, modified, and deleted files */ diff(snapshotId1: string, snapshotId2: string): Promise; /** * Restore server configuration from a snapshot * Retrieves file contents from storage and writes them to the server directory. * `force` (the caller's running check) does not bypass the world assignment check. */ restore(snapshotId: string, _force?: boolean): Promise; /** * Delete a config snapshot (storage + metadata) */ delete(id: string): Promise; /** * Build a map of file path to hash from snapshot files */ private buildHashMap; } //# sourceMappingURL=ConfigSnapshotUseCase.d.ts.map