import { FoundryPage } from "../types/index.js"; /** * Interface for system-specific state manipulation logic. */ export interface SystemStateAdapter { /** The system ID this adapter handles. */ readonly id: string; /** * Grants currency to an actor. */ grantCurrency(page: FoundryPage, actorName: string, amount: number, currency: string): Promise; /** * Provides the system-specific data structure for a test actor. */ getTestActorData(name: string): { type: string; system: Record; }; /** * Provides a system-specific, minimal-but-valid data structure for a test * Item embedded on an actor (e.g. inventory/loot). Not every system * accepts the same minimal shape - a system's own item validation can * reject a payload another system tolerates (motivated by pf2e 8.5.0's * "Make _validateType throw errors instead of returning them" change, * which broke the previously-universal `{type: "loot"}` payload the * verify suite used to hardcode for every system). */ getTestItemData(name: string): { type: string; system: Record; }; /** * Sets an actor's HP. */ setActorHP(page: FoundryPage, actorName: string, value: number, max?: number): Promise; /** * Returns the log key and a predicate to verify a currency update in verifyResult. */ getCurrencyVerifyParams(actorName: string, amount: number, currency: string): { key: string; predicate: (data: Record, extra?: Record) => boolean; }; } /** * Base implementation of SystemStateAdapter with default (often DnD5e-like) logic. */ export declare abstract class BaseSystemStateAdapter implements SystemStateAdapter { protected page?: FoundryPage | undefined; abstract id: string; constructor(page?: FoundryPage | undefined); grantCurrency(page: FoundryPage, actorName: string, amount: number, currency: string): Promise; getTestActorData(_name: string): { type: string; system: Record; }; getTestItemData(_name: string): { type: string; system: Record; }; setActorHP(page: FoundryPage, actorName: string, value: number, max?: number): Promise; getCurrencyVerifyParams(_actorName: string, _amount: number, _currency: string): { key: string; predicate: (data: Record, extra?: Record) => boolean; }; }