import { Datastore, Transaction } from '@google-cloud/datastore'; import { entity as Entity } from '@google-cloud/datastore/build/src/entity'; import { OrderOptions, RunQueryInfo } from '@google-cloud/datastore/build/src/query'; import { OneOrMany } from '../util/types'; import { Context } from './context'; import { Filters } from './filters'; export type Index = true | { [K in keyof T]?: T[K] extends Array ? Index : Index; }; export interface PropertySort { property: (keyof T | '__key__') & string; options?: OrderOptions; } export interface QueryOptions { select: OneOrMany; filters: Filters; sort: OneOrMany>; groupBy: OneOrMany; start: string; end: string; hasAnscestor: Entity.Key; offset: number; limit: number; } export interface DatastorePayload { key: Entity.Key; data: T | object; excludeFromIndexes?: string[]; } export type WithDatstoreKey = T & { [Entity.KEY_SYMBOL]: Entity.Key; }; export declare class DatastoreLoader { private readonly loader; private readonly datastore; private readonly parentContext; private readonly logger; constructor(datastore: Datastore | Transaction, context: Context); get(ids: Entity.Key[]): Promise; save(entities: ReadonlyArray>): Promise; delete(entities: ReadonlyArray): Promise; update(entities: ReadonlyArray>): Promise; upsert(entities: ReadonlyArray>): Promise; insert(entities: ReadonlyArray>): Promise; executeQuery(kind: string, options: Partial>): Promise<[WithDatstoreKey[], RunQueryInfo]>; inTransaction(callback: (tx: Context) => Promise): Promise; private resetDataloaderCache; private applyBatched; private load; }