import type { ObjectWithKeysFromStringArray } from '../../helper/types/ObjectWithKeysFromStringArray.js'; import type { EmptyObject } from '../types/EmptyObject.js'; import type { Logger } from '../types/Logger.js'; import type { StoreBaseConfig } from '../types/StoreBaseConfig.js'; /** * Base class for state store implementations. * * The base class enforces operation toggles before delegating to adapter * implementations. State values may contain user or business data; minimize * what is written and avoid logging raw values. * * The actual store implementation must overwrite the protected methods: * * - `getStateImpl` * - `setStateImpl` * - `removeStateImpl` * * __DO NOT OVERWRITE__: the regular methods getState, setState or removeState * @group Store */ export declare abstract class StateStoreBaseClass = EmptyObject> { /** Child logger scoped to the store name. */ logger: Logger; /** Store configuration including operation toggles. */ config: StoreBaseConfig; /** Store name used in logs and diagnostics. */ name: string; constructor(name: string, config: StoreBaseConfig); /** Adapter-specific state lookup implementation. */ protected abstract getStateImpl(...stateNames: StateNames): Promise>; /** * Get one or more state values by name. * * Returned values should not be logged or emitted unless explicitly safe. */ getState(...stateNames: StateNames): Promise>; /** Adapter-specific state removal implementation. */ protected abstract removeStateImpl(stateName: string): Promise; /** Remove one state value by name. */ removeState(stateName: string): Promise; /** Adapter-specific state write implementation. */ protected abstract setStateImpl(stateName: string, stateValue: unknown): Promise; /** Store or replace one state value. */ setState(stateName: string, stateValue: unknown): Promise; /** Shutdown hook for store adapters. */ destroy(): Promise; } //# sourceMappingURL=StateStoreBaseClass.impl.d.ts.map