import type { IDeleteServerUseCase, DeleteServerOptions, IPromptPort, IServerRepository, IAuditLogPort, IServerConsolePort, IContainerRuntimePort, IServerSpecRepository, IHostnameRegistrarPort, HostnameChangeResult, ServerSpecDeleteResult } from '../ports/index.js'; /** What TypeScript deprovisioning needs besides the runtime (#735). */ export interface ServerDeprovisionDeps { specRepo: IServerSpecRepository; /** avahi `.local`; skipped when absent. */ hostnames?: IHostnameRegistrarPort; } /** What deprovision did with the world, and the hostname result (undefined without a registrar). */ export interface ServerDeprovisionResult extends ServerSpecDeleteResult { hostname?: HostnameChangeResult; } /** * Delete Server Use Case * Orchestrates server deletion with confirmation */ export declare class DeleteServerUseCase implements IDeleteServerUseCase { private readonly prompt; private readonly serverRepo; private readonly runtime; private readonly deprovisionDeps; private readonly auditLog?; private readonly serverConsole?; /** * @param runtime removes the server's container (#735). * @param deprovisionDeps the ServerSpec repository and hostname registrar (#735). */ constructor(prompt: IPromptPort, serverRepo: IServerRepository, runtime: IContainerRuntimePort, deprovisionDeps: ServerDeprovisionDeps, auditLog?: IAuditLogPort | undefined, serverConsole?: IServerConsolePort | undefined); /** * Remove a server without asking (#735). * Order: plan its worlds (nothing is touched when that is unsafe, #652), * remove its container (a failed stop deletes nothing), move the world and * remove the files, then unregister `.local` (best effort). * Rejects with what happened when the server is not deleted. * No backup before the delete: the world is kept in worlds/ (#652). */ deprovision(name: string, options?: { deleteWorld?: boolean; }): Promise; /** * Fill in who is online (the repository does not). Returns false when the * server runs but RCON could not tell; without a console port it stays 0. */ private loadPlayerCount; private confirmMessage; /** * Execute interactive server deletion */ execute(options?: Pick): Promise; /** * Execute server deletion with provided name */ executeWithName(name: string, options: DeleteServerOptions): Promise; /** * Perform the actual deletion */ private performDeletion; } //# sourceMappingURL=DeleteServerUseCase.d.ts.map