import Document from '../Document'; import type { ForeignKeyDbDefinition } from '../ForeignKeyDbTransformer'; import type Schema from '../Schema'; import type { MvRecord } from '../types'; import BaseSchemaType from './BaseSchemaType'; /** Embedded Schema Type */ declare class EmbeddedType extends BaseSchemaType { /** An instance of Schema representing the the document structure of embedded object contents */ private readonly valueSchema; constructor(valueSchema: TSchema); /** * Cast to embedded data type * @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 embedded document value into mv record */ set(originalRecord: MvRecord, setValue: Document): MvRecord; /** Validate the embedded document */ validate(document: Document): Map; /** Create an array of foreign key definitions that will be validated before save */ transformForeignKeyDefinitionsToDb(document: Document): ForeignKeyDbDefinition[]; } export default EmbeddedType;