import { PerspectiveProxy } from "../perspectives/PerspectiveProxy";
export type QueryPartialEntity<T> = {
    [P in keyof T]?: T[P] | (() => string);
};
/**
 * Class representing a subject entity.
 * Can extend this class to create a new subject entity to add methods interact with SDNA and much better experience then using the bare bone methods.
 */
export declare class SubjectEntity {
    #private;
    author: string;
    timestamp: string;
    /**
     * Constructs a new subject.
     * @param perspective - The perspective that the subject belongs to.
     * @param baseExpression - The base expression of the subject.
     * @param soruce - The source of the subject, the expression this instance is linked too.
     */
    constructor(perspective: PerspectiveProxy, baseExpression?: string, source?: string);
    /**
     * Gets the base expression of the subject.
     */
    get baseExpression(): string;
    private getData;
    private setProperty;
    private setCollectionSetter;
    private setCollectionAdder;
    private setCollectionRemover;
    /**
     * Save the subject entity.
     * This method will create a new subject with the base expression and add a new link from the source to the base expression with the predicate "ad4m://has_child".
     *
     * If a property has an action, it will perform the action (Only for collections).
     * If a property is an array and is not empty, it will set the collection.
     * If a property is not undefined, not null, and not an empty string, it will set the property.
     *
     *
     * @throws Will throw an error if the subject entity cannot be converted to a subject class, or if the subject cannot be created, or if the link cannot be added, or if the subject entity cannot be updated.
     */
    save(): Promise<void>;
    /**
     * Update the subject entity.
     *
     * It will iterate over the properties of the subject entity.
     *
     * If a property has an action, it will perform the action (Only for collections).
     * If a property is an array and is not empty, it will set the collection.
     * If a property is not undefined, not null, and not an empty string, it will set the property.
     *
     * @throws Will throw an error if the subject entity cannot be converted to a subject class, or if a property cannot be set, or if a collection cannot be set, or if the data of the subject entity cannot be gotten.
     */
    update(): Promise<void>;
    /**
     * Get the subject entity with all the properties & collection populated.
     *
     * @returns The subject entity.
     *
     * @throws Will throw an error if the subject entity cannot be converted to a subject class, or if the data of the subject entity cannot be gotten.
     */
    get(): Promise<this>;
    /**
     * Delete the subject entity.
     * This method will remove the subject from the perspective.
     *
     * @throws Will throw an error if the subject entity cannot be removed.
     */
    delete(): Promise<void>;
    /**
     * Get all the subject entities of the subject class.
     *
     * NOTE: this is a static method and should be called on the class itself.
     *
     * @param perspective - The perspective that the subject belongs to.
     *
     * @returns The subject entities.
     *
     * @throws Will throw an error if the subject entity cannot be converted to a subject class, or if the subject proxies cannot be gotten.
     */
    static all(perspective: PerspectiveProxy): Promise<any[]>;
    /**
     * Query the subject entities of the subject class.
     *
     * NOTE: this is a static method and should be called on the class itself.
     *
     * @param perspective - The perspective that the subject belongs to.
     * @param query - The query of the subject entities.
     *
     * @returns The subject entities.
     *
     * @throws Will throw an error if the subject entity cannot be converted to a subject class, or if the query cannot be inferred, or if the data of the subject entities cannot be gotten.
     */
    static query(perspective: PerspectiveProxy, query?: SubjectEntityQueryParam): Promise<SubjectEntity[]>;
}
export type SubjectArray<T> = T[] | {
    action: 'setter' | 'adder' | 'remover';
    value: T[];
};
export type SubjectEntityQueryParam = {
    source?: string;
    size?: number;
    page?: number;
};
