///
import * as t from 'io-ts';
import * as Datastore from '@google-cloud/datastore';
import { DatastoreKey } from '@google-cloud/datastore/entity';
import { Index, QueryOptions } from './loader';
import { Omit } from '../util/types';
import { Context } from './context';
import { QueryInfo } from '@google-cloud/datastore/query';
interface RepositoryOptions {
defaultValues?: Partial>;
index?: Index>;
}
export declare function buildExclusions(input: T, schema?: Index, path?: string): string[];
export declare const datastoreKey: t.Type;
export declare const dateType: t.Type;
export declare class Repository {
private readonly datastore;
protected readonly kind: string;
protected readonly options: RepositoryOptions;
private readonly validator;
constructor(datastore: Datastore, kind: string, validator: t.Type, options?: RepositoryOptions);
get(context: Context, id: string): Promise;
get(context: Context, id: ReadonlyArray): Promise | undefined>;
query(context: Context, options?: Partial>): Promise<[ReadonlyArray, QueryInfo]>;
save(context: Context, entities: T): Promise;
save(context: Context, entities: ReadonlyArray): Promise>;
update(context: Context, entities: T): Promise;
update(context: Context, entities: ReadonlyArray): Promise>;
insert(context: Context, entities: T): Promise;
insert(context: Context, entities: ReadonlyArray): Promise>;
upsert(context: Context, entities: T): Promise;
upsert(context: Context, entities: ReadonlyArray): Promise>;
reindex(context: Context, operation: (input: T) => T | Promise): Promise>;
delete(context: Context, ...ids: string[]): Promise;
deleteAll(context: Context): Promise;
key: (name: string) => DatastoreKey;
private validate;
private applyMutation;
}
export {};