import { ObjectValues, ObjectMap, FlowAnyFunction, FlowAnyObject } from '../private_utils';
import Sdk from '../sdk';
import { TableId, TableData } from '../types/table';
import { FieldId } from '../types/field';
import { RecordId } from '../types/record';
import { ViewId } from '../types/view';
import { AirtableInterface } from '../types/airtable_interface';
import AbstractModelWithAsyncData from './abstract_model_with_async_data';
import Record from './record';
import ViewDataStore from './view_data_store';
import { ChangedPathsForType } from './base';
export declare const WatchableRecordStoreKeys: Readonly<{
    records: "records";
    recordIds: "recordIds";
    cellValues: "cellValues";
}>;
/**
 * The string case is to accommodate prefix keys
 *
 * @internal
 */
export declare type WatchableRecordStoreKey = ObjectValues<typeof WatchableRecordStoreKeys> | string;
/**
 * One RecordStore exists per table, and contains all the record data associated with that table.
 * Table itself is for schema information only, so isn't the appropriate place for this data.
 *
 * @internal
 */
declare class RecordStore extends AbstractModelWithAsyncData<TableData, WatchableRecordStoreKey> {
    static _className: string;
    static _isWatchableKey(key: string): boolean;
    static _shouldLoadDataForKey(key: WatchableRecordStoreKey): boolean;
    readonly tableId: TableId;
    _recordModelsById: ObjectMap<RecordId, Record>;
    readonly _primaryFieldId: FieldId;
    readonly _airtableInterface: AirtableInterface;
    readonly _viewDataStoresByViewId: ObjectMap<ViewId, ViewDataStore>;
    _areCellValuesLoadedByFieldId: ObjectMap<FieldId, boolean | undefined>;
    _pendingCellValuesLoadPromiseByFieldId: ObjectMap<FieldId, Promise<Array<WatchableRecordStoreKey>> | undefined>;
    _cellValuesRetainCountByFieldId: ObjectMap<FieldId, number>;
    constructor(sdk: Sdk, tableId: TableId);
    getViewDataStore(viewId: ViewId): ViewDataStore;
    watch(keys: WatchableRecordStoreKey | ReadonlyArray<WatchableRecordStoreKey>, callback: FlowAnyFunction, context?: FlowAnyObject | null): Array<WatchableRecordStoreKey>;
    unwatch(keys: WatchableRecordStoreKey | ReadonlyArray<WatchableRecordStoreKey>, callback: FlowAnyFunction, context?: FlowAnyObject | null): Array<WatchableRecordStoreKey>;
    _getFieldIdsToLoadFromWatchableKeys(keys: Array<WatchableRecordStoreKey>): Array<string>;
    get _dataOrNullIfDeleted(): TableData | null;
    _onChangeIsDataLoaded(): void;
    /**
     * The records in this table. The order is arbitrary since records are
     * only ordered in the context of a specific view.
     */
    get records(): Array<Record>;
    /**
     * The record IDs in this table. The order is arbitrary since records are
     * only ordered in the context of a specific view.
     */
    get recordIds(): Array<string>;
    getRecordByIdIfExists(recordId: string): Record | null;
    __onDataDeletion(): void;
    /**
     * Record metadata means record IDs, createdTime, and commentCount are loaded.
     * Record metadata must be loaded before creating, deleting, or updating records.
     */
    get isRecordMetadataLoaded(): boolean;
    loadRecordMetadataAsync(): Promise<void>;
    unloadRecordMetadata(): void;
    _getFieldIdForCausingRecordMetadataToLoad(): FieldId;
    areCellValuesLoadedForFieldId(fieldId: FieldId): boolean;
    loadCellValuesInFieldIdsAsync(fieldIds: Array<FieldId>): Promise<void>;
    _loadCellValuesInFieldIdsAsync(fieldIds: Array<FieldId>): Promise<Array<WatchableRecordStoreKey>>;
    unloadCellValuesInFieldIds(fieldIds: Array<FieldId>): void;
    _unloadCellValuesInFieldIds(fieldIds: Array<FieldId>): void;
    _loadDataAsync(): Promise<Array<WatchableRecordStoreKey>>;
    _unloadData(): void;
    _afterUnloadDataOrUnloadCellValuesInFieldIds(unloadedFieldIds?: Array<FieldId>): void;
    triggerOnChangeForDirtyPaths(dirtyPaths: ChangedPathsForType<TableData>): void;
}
/** @internal */
export default RecordStore;
