import { DataType, Models } from '@triplit/db'; /** * Gets the attribute from a schema based on a path */ export declare function getAttributeFromSchema(attribute: string[], schema: Models, collectionName: string): DataType | undefined; /** * 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 | 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: DataType | undefined; }; [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[], DataType | undefined]; }; [Symbol.iterator](): /*elided*/ any; }; type Traverser = { get(attribute: string): Traverser; current: DataType | undefined; }; /** * Creates an object that can easily traverse a schema via a path / relationships */ export declare function createSchemaTraverser(schema: Models, collectionName: string): Traverser; export {};