export type StorageTier = "carried" | "banked"; export interface ItemStack { itemId: string; count: number; } export interface ContainerSnapshot { inventoryId: string; tier: StorageTier; items: readonly ItemStack[]; } export interface DeathPartition { kept: readonly ItemStack[]; lost: readonly ItemStack[]; } export declare function tierOf(tiers: Record, inventoryId: string): StorageTier; export declare function partitionOnDeath(containers: readonly ContainerSnapshot[]): DeathPartition; export interface DeliveryEntry { id: string; userId: string; inventoryId: string; items: readonly ItemStack[]; deliverAt: number; } export interface ScheduledDelivery { userId: string; inventoryId: string; items: readonly ItemStack[]; deliverAt: number; } export interface DeliveryQueue { schedule(entry: ScheduledDelivery & { id?: string; }): DeliveryEntry; due(now: number): readonly DeliveryEntry[]; claimDue(now: number): readonly DeliveryEntry[]; pending(userId?: string): readonly DeliveryEntry[]; cancel(id: string): boolean; } export declare function createDeliveryQueue(): DeliveryQueue; export interface InsurancePolicy { isInsured(itemId: string): boolean; returnInventoryId: string; delaySeconds: number | [number, number]; } export declare function insureLost(lost: readonly ItemStack[], policy: InsurancePolicy, userId: string, now: number, rng?: () => number): ScheduledDelivery | null; export interface ConsolationPolicy { loadoutId: string; when?: "always" | "if-carried-empty"; } export declare function resolveConsolation(policy: ConsolationPolicy, partition: DeathPartition): { loadoutId: string; } | null;