/** * POI Repository - Persistence layer for Points of Interest * * Bridges world-level structures with room networks for navigation. * * @module storage/repos/poi */ import Database from 'better-sqlite3'; import { POI, POICategory, POIDiscoveryState } from '../../schema/poi.js'; export declare class POIRepository { private db; constructor(db: Database.Database); /** * Ensure the POI table exists with all required columns */ private ensureSchema; create(poi: POI): void; /** * Create multiple POIs in a single transaction. * Optimized for worldgen POI placement. * * @param pois - Array of POIs to create * @returns Number of POIs created * * @example * const pois = [ * { id: 'poi-1', worldId: 'w1', name: 'Capital', category: 'settlement', icon: 'city', x: 50, y: 50, ... }, * { id: 'poi-2', worldId: 'w1', name: 'Dark Cave', category: 'dungeon', icon: 'cave', x: 30, y: 70, ... }, * ]; * poiRepo.createBatch(pois); */ createBatch(pois: POI[]): number; /** * Delete all POIs for a world */ deleteByWorldId(worldId: string): number; findById(id: string): POI | null; findByWorldId(worldId: string): POI[]; findByCoordinates(worldId: string, x: number, y: number): POI | null; findByCategory(worldId: string, category: POICategory): POI[]; findByNetworkId(networkId: string): POI | null; findByStructureId(structureId: string): POI | null; update(id: string, updates: Partial): POI | null; delete(id: string): boolean; /** * Mark a POI as discovered by a character */ discoverPOI(poiId: string, characterId: string): POI | null; /** * Get all POIs discovered by a character */ findDiscoveredByCharacter(worldId: string, characterId: string): POI[]; /** * Get POIs in a specific discovery state */ findByDiscoveryState(worldId: string, state: POIDiscoveryState): POI[]; /** * Find POIs within a bounding box */ findInBoundingBox(worldId: string, minX: number, maxX: number, minY: number, maxY: number): POI[]; /** * Find POIs within a radius of a point */ findNearby(worldId: string, x: number, y: number, radius: number): POI[]; /** * Find the nearest POI to a point */ findNearest(worldId: string, x: number, y: number): POI | null; /** * Link a POI to a NodeNetwork */ linkToNetwork(poiId: string, networkId: string, entranceRoomId?: string): POI | null; /** * Link a POI to a Structure */ linkToStructure(poiId: string, structureId: string): POI | null; /** * Add a child POI (sub-location) */ addChildPOI(parentId: string, childId: string): POI | null; /** * Search POIs by tag */ findByTag(worldId: string, tag: string): POI[]; /** * Full-text search on name and description */ search(worldId: string, query: string): POI[]; private rowToPOI; } //# sourceMappingURL=poi.repo.d.ts.map