import { Collection } from '../collection';
import { Model } from '../model';
import { ISanitizeOptions, ISchema, ISchemaInstance, ISchemaOptions, IToObjectOptions, PopulateReference } from './schema';
export interface IReferenceInstance<TModel extends Model = Model> extends ISchemaInstance<TModel | string> {
    id: string;
}
export declare type ReferenceInstance<TModel extends Model = Model> = IReferenceInstance<TModel>;
export interface IReferenceOptions<TModel extends Model = Model> extends ISchemaOptions<ReferenceInstance<TModel>> {
    collection: () => Collection<TModel>;
}
export declare class ReferenceSchema<TModel extends Model = Model> implements ISchema<TModel | string, ReferenceInstance<TModel>, Partial<TModel> | string> {
    options: IReferenceOptions<TModel>;
    constructor(options: IReferenceOptions<TModel>);
    create(value: any, sanitizeOptions?: ISanitizeOptions): ReferenceInstance<TModel>;
    populate(instance: ReferenceInstance<TModel>, populateReference: PopulateReference<TModel>): Promise<TModel>;
    toObject(instance: ReferenceInstance<TModel>, options?: IToObjectOptions): Partial<TModel> | string;
    validate(instance: ReferenceInstance<TModel>): Promise<void>;
    protected sanitize(value: any, sanitizeOptions?: ISanitizeOptions): TModel | string;
}
