/**
 * The base class for models.
 *
 * Models wrap a logic related to manipulating model data, querying for data from the API,
 * retry logic, cashing, refreshing of data, offline storage, pooling endpoints for new data, etc.
 *
 * The application should use these models in order to centralize object manipulation.
 *
 * Note that the preferred way to get data from the model is through calling the `debounce` method.
 * This ensures that multiple changes to the model properties will result in a single query after
 * the `debounceTimeout` period. If you are not plannig to use the debouncer, make sure to call the
 * `resolveTaskPromise` method after the operation completes to properly manage the `taskComplete` promise.
 *
 * @template T The underlying domain model.
 */
export declare abstract class Model<T> extends EventTarget {
    #private;
    /**
     * The underlying raw object.
     * Do not modify properties of the object directly.
     * Use one of the methods provided by the model.
     * Direct changes will not be reflected in the UI
     * and may cause issues when processing the object.
     */
    raw?: T;
    /**
     * The timeout for the query debouncer.
     * When any property change this is the time the element will wait
     * until the actual query is made.
     */
    debounceTimeout: number;
    /**
     * A reference to the current debouncer.
     */
    debouncerValue?: number | NodeJS.Timeout;
    /**
     * Default limit for list queries.
     */
    limit: number;
    /**
     * @type A promise resolved when the debounced task finished.
     */
    get taskComplete(): Promise<void> | undefined;
    /**
     * A getter for the raw value.
     */
    get value(): T | undefined;
    /**
     * The number of retry attempts for operations.
     */
    retryCount: number;
    /**
     * @param obj The source object to use.
     */
    constructor(obj?: T);
    /**
     * Creates a new instance of the data. It often invokes API call.
     * This is what happens after the user triggers "create new" flow.
     *
     * After this method is calls, the `raw` object is set.
     *
     * @param data The partial data to create.
     * @returns The created object.
     */
    create(data: Partial<T>): Promise<T>;
    /**
     * Debounces the given callback for the `debounceTimeout` period.
     * Multiple calls with the same arguments will reset the timeout for that argument set.
     * Calls with different arguments will each have their own debounce timer.
     * Only the last call for each unique set of arguments is executed.
     * @param callback The function to execute.
     * @param args Optional arguments to pass to the callback and use for debounce comparison.
     */
    debounce(callback: (...args: unknown[]) => unknown, ...args: unknown[]): void;
    notifyError(error: Error): void;
    protected resolveTaskPromise(): void;
}
//# sourceMappingURL=Model.d.ts.map