import { type BaseBlock } from "../blockFoundation/baseBlock.js"; import { SmartFilter } from "../smartFilter.js"; import { type ThinEngine } from "@onerjs/core/Engines/thinEngine.js"; import { type ISerializedBlockV1, type OptionalBlockDeserializerV1 } from "./v1/smartFilterSerialization.types.js"; import { type Nullable } from "@onerjs/core/types.js"; /** * A function that creates a block instance of the given class block type, or return null if it cannot. */ export type BlockFactory = (smartFilter: SmartFilter, engine: ThinEngine, serializedBlock: ISerializedBlockV1, smartFilterDeserializer: SmartFilterDeserializer) => Promise>; /** * Deserializes serialized SmartFilters. The caller passes in a map of block deserializers it wants to use, * which allows the caller to provide custom deserializers for blocks beyond the core blocks. * The deserializer supports versioned serialized SmartFilters. */ export declare class SmartFilterDeserializer { private readonly _blockFactory; private readonly _customInputBlockDeserializer?; /** * Creates a new SmartFilterDeserializer * @param blockFactory - A function that creates a block of the given class name, or returns null if it cannot * @param customInputBlockDeserializer - An optional custom deserializer for InputBlocks - if supplied and it returns null, the default deserializer will be used */ constructor(blockFactory: BlockFactory, customInputBlockDeserializer?: OptionalBlockDeserializerV1); /** * Deserializes a SmartFilter from a JSON object - can be safely called multiple times and has no side effects within the class. * @param engine - The ThinEngine to pass to the new SmartFilter * @param smartFilterJson - The JSON object to deserialize * @returns A promise that resolves to the deserialized SmartFilter */ deserialize(engine: ThinEngine, smartFilterJson: any): Promise; private _deserializeV1Async; private _deserializeBlockV1Async; } //# sourceMappingURL=smartFilterDeserializer.d.ts.map