import { Box } from "@opendaw/lib-box"; import { Pointers } from "@opendaw/studio-enums"; import { JSONValue, Nullable, Observer, Option, Terminable } from "@opendaw/lib-std"; export declare namespace MetaData { /** * Stores the given JSONValue in the target box under the given origin. * Needs to be called within a transaction. * @param target The box to store the meta-data in. * @param value The value to store. Must be JSON-serializable. * @param origin The origin of the meta-data. Must be unique to the app. */ const store: (target: Box, value: JSONValue, origin: string) => void; /** * Reads the meta-data from the target box. * Returns a failed Attempt if no meta-data is found or the value is not deserializable. * @param target The box to read the meta-data from. * @param origin The origin of the meta-data. Should be unique to the app. */ const read: (target: Box, origin: string) => Nullable; /** * Deletes all meta-data from the target box with the given origin. * Needs to be called within a transaction. * @param target The box to delete the meta-data from. * @param origin The origin of the meta-data. Must be unique to the app. */ const clear: (target: Box, origin: string) => void; /** * Subscribes to meta-data changes on the target box for the given origin. * Catches up with existing meta-data and subscribes to future additions/removals. * The observer receives the parsed JSONValue or null when cleared. * @param target The box to observe meta-data on. * @param origin The origin of the meta-data. Must be unique to the app. * @param observer Called with the current value whenever it changes, or null when removed. */ const catchupAndSubscribe: (target: Box, origin: string, observer: Observer>) => Terminable; } //# sourceMappingURL=MetaData.d.ts.map