import type { OptionalNullablePartial } from '../tools'; import type { CollectionRef } from './CollectionRef'; import type { Document, DocumentExpand, DocumentPatch } from './Document'; import type { EntityRef } from './EntityRef'; import type { DocumentPositionType } from './Position'; import type { Patch } from './utils'; export type DocumentWithPositionsMetaType = keyof DocumentPositionType; export type DocumentWithPositionsFields = { store?: EntityRef<'store'>; positions: CollectionRef; }; export type DocumentWithPositions = Document & DocumentWithPositionsFields; export type DocumentWithPositionsExpand = Pick, 'positions' | 'store'> & DocumentExpand; export type DocumentWithPositionsPatch = DocumentPatch & OptionalNullablePartial, 'store'>> & Partial<{ positions: Patch[]; }>;