import { DocumentClient } from 'aws-sdk/lib/dynamodb/document_client'; import { Omit } from 'ramda'; import { DocumentOptions } from '../model/option'; interface EngineParams { ddbClient: DocumentClient; table: string; options: DocumentOptions; hashKey: string; index?: string; rangeKey?: string; } export declare class Engine { private readonly ddbClient; protected readonly table: string; protected readonly hash: string; protected readonly range?: string; protected readonly index?: string; readonly options: DocumentOptions; constructor(params: EngineParams); batchGet(hashKey: TScalar, rangeKey?: TScalar, params?: any): Promise; batchWrite(params: DocumentClient.BatchWriteItemInput): Promise; /** * @todo */ delete(keys: any): Promise; /** * @todo throw Error, if (this.rangeKeyName && !rangeKey) */ get(hashKey: TScalar, rangeKey?: TScalar): Promise; /** * @param input * @returns {Promise>} */ put(input: Omit): Promise; query(params: any): Promise; scan(params?: any): Promise; update(hashKey: TScalar, rangeKey: TScalar | undefined, input?: DocumentClient.UpdateItemInput): Promise; /** * @priority low * @todo memoize? */ private getTableParam; /** * @todo clean up * @param hashKey * @param rangeKey * @returns {{Key: {}}} */ private getKeyParam; private createGetParam; private handleError; } export declare type TScalar = string | number | DocumentClient.binaryType; export {};