import type { FlagMetadata, Logger } from '@openfeature/core'; import type { FeatureFlag } from './feature-flag'; import type { FlagdCoreOptions } from './options'; /** * The simple contract of the storage layer. */ export interface Storage { /** * Sets the configurations and returns the list of flags that have changed. * @param flagConfig The configuration string to be parsed and stored. * @param strictValidation Validates against the flag and targeting schemas. * @returns The list of flags that have changed. * @throws {Error} If the configuration string is invalid. */ setConfigurations(flagConfig: string, strictValidation?: boolean): string[]; /** * Gets the feature flag configuration with the given key. * @param key The key of the flag to be retrieved. * @returns The flag with the given key or undefined if not found. */ getFlag(key: string): FeatureFlag | undefined; /** * Gets all the feature flag configurations. * @returns The map of all the flags. */ getFlags(): Map; /** * Gets metadata related to the flag set. * @returns {FlagMetadata} The flag set metadata. */ getFlagSetMetadata(): FlagMetadata; } /** * An implementation of storage contract backed by maps. */ export declare class MemoryStorage implements Storage { private logger; private options; private _flags; private _flagSetMetadata; constructor(logger: Logger, options?: FlagdCoreOptions); getFlag(key: string): FeatureFlag | undefined; getFlags(): Map; getFlagSetMetadata(): FlagMetadata; setConfigurations(flagConfig: string, strictValidation?: boolean): string[]; }