import { Id } from '../types'; import { BaseModel } from './base'; import { Keys } from './entities'; /** * @param {BaseModel} parent The parent BaseModel * @param {string} relationKey The name of the property on the parent to refer the relation to (e.g. users.forms where forms is the relationKey) * @param {string} foreignKey The foreignKey on the relation refering to the parent. (e.g userId on a form) * @param {Keys} storeKey The store key of the relation items. */ export declare class HasOne { protected _parent: BaseModel; _foreignKey: string; _relationKey: string; _storeKey: Keys; constructor(parent: BaseModel, relationKey: string, foreignKey: string, storeKey: Keys); getLocal(parentId: Id): Promise; get(parentId: Id): Promise; create(parentId: Id, item: DataType): Promise; } export declare function hasOne({ relationKey, foreignKey, storeKey, }: { relationKey: string; foreignKey: string; storeKey: Keys; }): {}>(ctor: C) => { new (...args: any[]): {}; } & C;