import type { Static } from "../../core/utils";
import type { ExpressionBuilder } from "kysely";
import type { Entity, EntityManager } from "../entities";
import { NumberField, TextField } from "../fields";
import type { RepoQuery } from "../server/query";
import { EntityRelation, type KyselyQueryBuilder } from "./EntityRelation";
import { type RelationType } from "./relation-types";
import * as tbbox from "@sinclair/typebox";
export type PolymorphicRelationConfig = Static<typeof PolymorphicRelation.schema>;
export declare class PolymorphicRelation extends EntityRelation<typeof PolymorphicRelation.schema> {
    static schema: tbbox.TObject<{
        required: tbbox.TOptional<tbbox.TBoolean>;
        mappedBy: tbbox.TOptional<tbbox.TString>;
        inversedBy: tbbox.TOptional<tbbox.TString>;
        targetCardinality: tbbox.TOptional<tbbox.TNumber>;
    }>;
    constructor(source: Entity, target: Entity, config?: Partial<PolymorphicRelationConfig>);
    type(): RelationType;
    private queryInfo;
    buildJoin(entity: Entity, qb: KyselyQueryBuilder): import("kysely").SelectQueryBuilder<any, any, any>;
    getReferenceQuery(entity: Entity, id: number): Partial<RepoQuery>;
    buildWith(entity: Entity): (eb: ExpressionBuilder<any, any>) => import("kysely").SelectQueryBuilder<any, any, Partial<Omit<unknown, never>>>;
    isListableFor(entity: Entity): boolean;
    getReferenceField(): TextField;
    getEntityIdField(): NumberField;
    initialize(em: EntityManager<any>): void;
}
