import type { DataType, Models, Relationship } from '../schema/types/index.js'; /** * Gets the attribute from a schema based on a path */ export declare function getAttributeFromSchema(attribute: Iterable, schema: Models, collectionName: string): SchemaTraversalData; /** * Validates an identifier path based on a validator function. The validator function is called for each part of the path. */ export declare function validateIdentifier(identifier: string, schema: Models, collectionName: string, validator: (dataType: DataType | Relationship | undefined, i: number, path: string[]) => { valid: boolean; reason?: string; }): { valid: boolean; path?: string; reason?: string; }; /** * Creates an iterator that traverses a path in a schema */ export declare function createSchemaValuesIterator(path: Iterable, schema: Models, collectionName: string): { next(): { done: boolean; value: SchemaTraversalData; }; [Symbol.iterator](): /*elided*/ any; }; /** * Creates an iterator that traverses a path in a schema and returns the path and value */ export declare function createSchemaEntriesIterator(path: Iterable, schema: Models, collectionName: string): { next(): { done: boolean; value: readonly [string[], SchemaTraversalData]; }; [Symbol.iterator](): /*elided*/ any; }; export type SchemaTraversalData = DataType | Relationship | undefined; type Traverser = { get(attribute: string): Traverser; current: T; }; /** * Creates an object that can easily traverse a schema via a path / relationships */ export declare function createSchemaTraverser(schema: Models, collectionName: string): Traverser; export declare function isTraversalRelationship(dataType: SchemaTraversalData): dataType is Relationship; export {};