import Document from '../Document'; import type { ForeignKeyDbDefinition } from '../ForeignKeyDbTransformer'; import type Schema from '../Schema'; import type { MvRecord } from '../types'; import BaseSchemaType from './BaseSchemaType'; /** A Document Array Schema Type */ declare class DocumentArrayType extends BaseSchemaType { /** An instance of Schema representing the document structure of the array's contents */ private readonly valueSchema; constructor(valueSchema: TSchema); /** * Cast to array of documents * @throws {@link TypeError} Throws if a non-null/non-object is passed */ cast(value: unknown): Document[]; /** Get value from mv data */ get(record: MvRecord): Document[]; /** Set specified document array value into mv record */ set(originalRecord: MvRecord, documents: Document[]): MvRecord; /** Validate the document array */ validate(documentList: Document[]): Map; /** Create an array of foreign key definitions that will be validated before save */ transformForeignKeyDefinitionsToDb(documentList: Document[]): ForeignKeyDbDefinition[]; /** Generate subdocument instances */ private makeSubDocument; } export default DocumentArrayType;