import { QueryClientContract, OneOrMany } from '@ioc:Adonis/Lucid/Database';
import { ModelObject, LucidModel, LucidRow, HasOneClientContract, ModelAssignOptions } from '@ioc:Adonis/Lucid/Orm';
import { HasOne } from './index';
import { HasOneQueryBuilder } from './QueryBuilder';
import { HasOneSubQueryBuilder } from './SubQueryBuilder';
/**
 * Query client for executing queries in scope to the defined
 * relationship
 */
export declare class HasOneQueryClient implements HasOneClientContract<HasOne, LucidModel> {
    relation: HasOne;
    private parent;
    private client;
    constructor(relation: HasOne, parent: LucidRow, client: QueryClientContract);
    /**
     * Generate a related query builder
     */
    static query(client: QueryClientContract, relation: HasOne, rows: OneOrMany<LucidRow>): HasOneQueryBuilder;
    /**
     * Generate a related eager query builder
     */
    static eagerQuery(client: QueryClientContract, relation: HasOne, rows: OneOrMany<LucidRow>): HasOneQueryBuilder;
    /**
     * Returns an instance of the sub query builder
     */
    static subQuery(client: QueryClientContract, relation: HasOne): HasOneSubQueryBuilder;
    /**
     * Returns instance of query builder
     */
    query(): any;
    /**
     * Save related model instance
     */
    save(related: LucidRow): Promise<void>;
    /**
     * Create instance of the related model
     */
    create(values: ModelObject, options?: ModelAssignOptions): Promise<LucidRow>;
    /**
     * Get the first matching related instance or create a new one
     */
    firstOrCreate(search: ModelObject, savePayload?: ModelObject, options?: ModelAssignOptions): Promise<LucidRow>;
    /**
     * Update the existing row or create a new one
     */
    updateOrCreate(search: ModelObject, updatePayload: ModelObject, options?: ModelAssignOptions): Promise<LucidRow>;
}
