import { MongoObject } from 'mongo-object'; interface GetPositionsForAutoValueProps { fieldName: string; isModifier?: boolean; isUpsert?: boolean; mongoObject: MongoObject; } interface PositionInfo { key: string; operator: string | null; position: string; } /** * A position is a place in the object where this field exists. * If no arrays are involved, then every field/key has at most 1 position. * If arrays are involved, then a field could have potentially unlimited positions. * * For example, the key 'a.b.$.c` would have these positions: * `a[b][0][c]` * `a[b][1][c]` * `a[b][2][c]` * * For this object: * { * a: { * b: [ * { c: 1 }, * { c: 1 }, * { c: 1 }, * ], * }, * } * * To make matters more complicated, we want to include not only the existing positions * but also the positions that might exist due to their parent object existing or their * parent object being auto-created by a MongoDB modifier that implies it. */ export default function getPositionsForAutoValue({ fieldName, isModifier, isUpsert, mongoObject }: GetPositionsForAutoValueProps): PositionInfo[]; export {};