@mhlabs/dynamodb-client
Version:
A lib to simplify working with dynamodb document client in aws sdk v3.
38 lines (37 loc) • 1.63 kB
TypeScript
import { DynamoDBClient, DynamoDBClientConfig } from '@aws-sdk/client-dynamodb';
import { DynamoDBDocument } from '@aws-sdk/lib-dynamodb';
import { batchGet } from './dynamodb/batch/get';
import { batchRemove } from './dynamodb/batch/remove';
import { batchWrite } from './dynamodb/batch/write';
import { getItem } from './dynamodb/get-item';
import { putItem } from './dynamodb/put-item';
import { query, queryByIndex } from './dynamodb/query';
import { remove } from './dynamodb/remove';
import { scan } from './dynamodb/scan';
import { MhDynamoClientOptions } from './types';
export declare class MhDynamoClient {
private globalOptions;
protected documentClient: DynamoDBDocument;
private defaultOptions;
static fromClient(client: DynamoDBClient, options?: MhDynamoClientOptions): MhDynamoClient;
static fromConfig(dynamoDbClientConfig?: DynamoDBClientConfig, options?: MhDynamoClientOptions): MhDynamoClient;
static fromDocumentClient(dynamoDbDocumentClient: DynamoDBDocument, options?: MhDynamoClientOptions): MhDynamoClient;
/**
* Cannot be initiated. Use either of the following instead:
*
* - MhDynamoClient.fromConfig()
* - MhDynamoClient.fromClient()
* - MhDynamoClient.fromDocumentClient()
*/
private constructor();
remove: typeof remove;
batchRemove: typeof batchRemove;
putItem: typeof putItem;
batchWrite: typeof batchWrite;
getItem: typeof getItem;
batchGet: typeof batchGet;
scan: typeof scan;
query: typeof query;
queryByIndex: typeof queryByIndex;
protected mergeWithGlobalOptions<T>(localOptions: T): T;
}