import { World } from '../../../domain/index.js'; /** * Server status for world availability */ export type ServerStatus = 'running' | 'stopped' | 'not_found'; /** * World availability category */ export type WorldAvailabilityCategory = 'available' | 'stopped' | 'running'; /** * World with server status information */ export interface WorldWithServerStatus { world: World; assignedServer?: string; serverStatus?: ServerStatus; category: WorldAvailabilityCategory; } /** * World Repository Port - Outbound Port * Interface for world data access */ export interface IWorldRepository { /** * Get all worlds */ findAll(): Promise; /** * Find world by name */ findByName(name: string): Promise; /** * Check if world exists */ exists(name: string): Promise; /** * Get unlocked worlds */ findUnlocked(): Promise; /** * Get locked worlds */ findLocked(): Promise; /** * Get worlds locked by a specific server */ findByServer(serverName: string): Promise; /** * List world names */ listNames(): Promise; /** * Get all worlds with their server status * Returns worlds categorized by availability */ findAllWithServerStatus(): Promise; /** * Delete a world directory * @param name World name to delete * @returns true if deleted successfully */ delete(name: string): Promise; /** * Create a new world directory with optional seed * @param name World name to create * @param seed Optional seed for world generation * @returns Created World entity */ create(name: string, seed?: string): Promise; /** * Get seed for a world from .meta file * @param name World name * @returns Seed string or null if not found */ getSeed(name: string): Promise; /** * Import a world from a .zip archive at zipPath. * Extracts, validates a level.dat exists, places the main world at worlds// * and any split satellites at worlds/_nether/ and worlds/_the_end/. * Writes .meta. Throws if name exists or no level.dat found. */ importFromZip(name: string, zipPath: string): Promise; } //# sourceMappingURL=IWorldRepository.d.ts.map