import { NodeRelationship, ObjectType } from './types.js'; import type { Metadata, RelatedNodeInfo, RelatedNodeType, BaseNodeParams, TextNodeParams } from './types.js'; /** * Generic abstract class for retrievable nodes */ export declare abstract class BaseNode { id_: string; metadata: T; relationships: Partial>>; accessor hash: string; protected constructor(init?: BaseNodeParams); abstract get type(): ObjectType; abstract getContent(): string; abstract getMetadataStr(): string; get sourceNode(): RelatedNodeInfo | undefined; get prevNode(): RelatedNodeInfo | undefined; get nextNode(): RelatedNodeInfo | undefined; get parentNode(): RelatedNodeInfo | undefined; get childNodes(): RelatedNodeInfo[] | undefined; abstract generateHash(): string; } /** * TextNode is the default node type for text. */ export declare class TextNode extends BaseNode { text: string; startCharIdx?: number; endCharIdx?: number; metadataSeparator: string; constructor(init?: TextNodeParams); /** * Generate a hash of the text node. * The ID is not part of the hash as it can change independent of content. * @returns */ generateHash(): string; get type(): ObjectType; getContent(): string; getMetadataStr(): string; getNodeInfo(): { start: number | undefined; end: number | undefined; }; getText(): string; } /** * A document is just a special text node with a docId. */ export declare class Document extends TextNode { constructor(init?: TextNodeParams); get type(): ObjectType; } //# sourceMappingURL=node.d.ts.map