import { Model, RelationType } from '../dataModel'; import { Relation, WithForeignKey } from './interface'; export default class BiOneToOne implements Relation, WithForeignKey { private owningSideModel; private owningSideField; private refSideModel; private refSideField; private foreignKey; constructor({ modelA, modelB, modelAField, modelBField, foreignKey, owningSideModelName, }: { modelA: Model; modelB: Model; modelAField: string; modelBField: string; foreignKey?: string; owningSideModelName?: string; }); getType(): RelationType; getForeignKey(): string; getForeignKeyConfig(): { model: Model; foreignKey: string; }[]; getOwningSide(): Model; getOwningSideField(): string; getRefSide(): Model; getRefSideField(): string; setForeignKeyOnOwningSide(targetId: string): { [x: string]: string; }; createAndSetForeignKeyOnOwningSide(targetData: Record, context: any): Promise<{ [x: string]: string; }>; unsetForeignKeyOnOwningSide(): { [x: string]: any; }; deleteAndUnsetForeignKeyOnOwningSide(data: Record, context: any): Promise<{ [x: string]: any; }>; connectOnRefSide(refSideId: string, owningSideId: string, context: any): Promise; createAndConnectOnRefSide(refSideId: string, data: Record, context: any): Promise; disconnectOnRefSide(refSideId: string, context: any): Promise; deleteAndDisconnectOnRefSide(refSideId: string, context: any): Promise; joinOnOwningSide(data: Record, context: any): Promise; joinOnRefSide(data: Record, context: any): Promise; }