/// <reference types="node" />
/**
 * @packageDocumentation
 * @module @textile/threads-client/models
 */
import { grpc } from '@improbable-eng/grpc-web';
import { ReadTransactionRequest, ReadTransactionReply } from '@textile/threads-client-grpc/api_pb';
import { Transaction } from './Transaction';
import { Instance, InstanceList, QueryJSON } from './query';
import { Config } from './config';
/**
 * ReadTransaction performs a read-only bulk transaction on the underlying store.
 */
export declare class ReadTransaction extends Transaction<ReadTransactionRequest, ReadTransactionReply> {
    protected readonly config: Config;
    protected readonly client: grpc.Client<ReadTransactionRequest, ReadTransactionReply>;
    protected readonly dbID: Buffer;
    protected readonly modelName: string;
    constructor(config: Config, client: grpc.Client<ReadTransactionRequest, ReadTransactionReply>, dbID: Buffer, modelName: string);
    /**
     * start begins the transaction. All operations between start and end will be applied as a single transaction upon a call to end.
     */
    start(): Promise<void>;
    /**
     * has checks whether a given instance exists in the given store.
     * @param IDs An array of instance ids to check for.
     */
    has(IDs: string[]): Promise<boolean>;
    /**
     * find queries the store for entities matching the given query parameters. See Query for options.
     * @param query The object that describes the query. See Query for options. Alternatively, see QueryJSON for the basic interface.
     */
    find<T = any>(query: QueryJSON): Promise<InstanceList<T>>;
    /**
     * findByID queries the store for the id of an instance.
     * @param ID The id of the instance to search for.
     */
    findByID<T = any>(ID: string): Promise<Instance<T>>;
}
