import { Model, RelationType } from '../dataModel'; import { Relation, WithForeignKey } from './interface'; export default class UniToOne implements Relation, WithForeignKey { private sourceModel; private targetModel; private relationField; private foreignKey; constructor({ sourceModel, targetModel, relationField, foreignKey, }: { sourceModel: Model; targetModel: Model; relationField: string; foreignKey?: string; }); getType(): RelationType; getForeignKey(): string; getForeignKeyConfig(): { model: Model; foreignKey: string; }[]; getRelationField(): string; setForeignKey(targetId: string): { [x: string]: string; }; createAndSetForeignKey(targetData: Record, context: any): Promise<{ [x: string]: string; }>; destroyAndUnsetForeignKey(data: Record, context: any): Promise<{ [x: string]: any; }>; unsetForeignKey(): { [x: string]: any; }; join(data: Record, context: any): Promise; }