import Database from 'better-sqlite3'; import { Inventory } from '../../schema/inventory.js'; export declare class InventoryRepository { private db; constructor(db: Database.Database); getInventory(characterId: string): Inventory; addItem(characterId: string, itemId: string, quantity?: number): void; removeItem(characterId: string, itemId: string, quantity?: number): boolean; equipItem(characterId: string, itemId: string, slot: string): void; unequipItem(characterId: string, itemId: string): void; /** * Find all characters who own a specific item (for world-unique enforcement) */ findItemOwners(itemId: string): string[]; transferItem(fromCharacterId: string, toCharacterId: string, itemId: string, quantity?: number): boolean; getInventoryWithDetails(characterId: string): InventoryWithItems; /** * Get currency for a character */ getCurrency(characterId: string): { gold: number; silver: number; copper: number; }; /** * Set currency for a character (replaces existing) */ setCurrency(characterId: string, currency: { gold?: number; silver?: number; copper?: number; }): void; /** * Add currency to a character */ addCurrency(characterId: string, currency: { gold?: number; silver?: number; copper?: number; }): { gold: number; silver: number; copper: number; }; /** * Remove currency from a character * @returns true if successful, false if insufficient funds */ removeCurrency(characterId: string, currency: { gold?: number; silver?: number; copper?: number; }): boolean; /** * Transfer currency between characters * @returns true if successful, false if insufficient funds */ transferCurrency(fromCharacterId: string, toCharacterId: string, currency: { gold?: number; silver?: number; copper?: number; }): boolean; /** * Check if character has at least this much currency */ hasCurrency(characterId: string, currency: { gold?: number; silver?: number; copper?: number; }): boolean; } interface InventoryWithItems { characterId: string; items: Array<{ item: { id: string; name: string; description?: string; type: 'weapon' | 'armor' | 'consumable' | 'quest' | 'misc'; weight: number; value: number; properties?: Record; }; quantity: number; equipped: boolean; slot?: string; }>; totalWeight: number; capacity: number; currency: { gold: number; silver: number; copper: number; }; } export {}; //# sourceMappingURL=inventory.repo.d.ts.map