import 'reflect-metadata'; import type { ChronicleClassDecorator } from '../../types/standardDecoratorMetadata.js'; /** Options for the nodeFrom class decorator. */ export interface NodeFromOptions { /** The name of the event property that holds the key of the node. Defaults to the event source id. */ readonly key?: string; /** A constant key. Every event then updates the same node. */ readonly constantKey?: string; /** Only set properties on a node that already exists, instead of creating it. */ readonly updateOnly?: boolean; } /** Metadata stored by the nodeFrom class decorator. */ export interface NodeFromMetadata extends NodeFromOptions { /** The event constructor. */ readonly eventType: Function; } /** * Class decorator that creates or updates a node when an event is observed. Properties of the node are mapped by * name from an event property of the same name, or explicitly with the property mapping decorators. * @param eventType - The event constructor. * @param options - Optional key and update-only configuration. * @returns A class decorator. */ export declare function nodeFrom(eventType: Function, options?: NodeFromOptions): ChronicleClassDecorator; /** * Retrieves all nodeFrom metadata stored on the given class constructor. * @param target - The class constructor. * @returns An array of nodeFrom metadata entries. */ export declare function getNodeFromMetadata(target: Function): NodeFromMetadata[]; //# sourceMappingURL=nodeFrom.d.ts.map