@studyportals/sp-r2d2
Version:
A framework that contains various components used when developing projects that will be deployed via AWS λ.
36 lines (35 loc) • 1.9 kB
TypeScript
import { BatchGetItemInput, DeleteItemInput, DynamoDB, DynamoDBClient, GetItemInput, PutItemInput, QueryInput, ScanInput, UpdateItemInput, UpdateItemOutput } from '@aws-sdk/client-dynamodb';
import { DynamoDBTransactionWrite, IDynamoDBTransactionWrite } from '../';
import { DynamoDBItem } from '../aws-services-adapters-interfaces/dynamodb-item.type';
import { IDynamoDBAdapter } from '../aws-services-adapters-interfaces/i-dynamodb-adapter.interface';
import { BatchGetItemsResult } from './batch-get-item-result.class';
import { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb';
export declare class DynamoDBAdapter implements IDynamoDBAdapter {
private _region;
private _dynamoDB?;
private _dynamoDBClient?;
private _dynamoDBDocumentClient?;
private attributeMapNormalizer;
get region(): string;
protected get dynamoDB(): DynamoDB;
protected get dynamoDBClient(): DynamoDBClient;
protected get dynamoDBDocumentClient(): DynamoDBDocumentClient;
constructor(region?: string);
query(input: QueryInput): Promise<DynamoDBItem[]>;
private queryNextPage;
batchGetItem(input: BatchGetItemInput): Promise<BatchGetItemsResult>;
private addResultsOfNextBatchGetItemsPages;
scan(input: ScanInput): Promise<DynamoDBItem[]>;
private scanNextPage;
putItem(input: PutItemInput): Promise<void>;
getItem(input: GetItemInput): Promise<DynamoDBItem | null>;
updateItem(input: UpdateItemInput): Promise<UpdateItemOutput | undefined>;
documentUpdateItem(input: UpdateItemInput): Promise<UpdateItemOutput>;
deleteItem(input: DeleteItemInput): Promise<void>;
beginWriteTransaction(): DynamoDBTransactionWrite;
commitWriteTransaction(transaction: IDynamoDBTransactionWrite): Promise<void>;
private handleQueryOutput;
private handleGetItemOutput;
private handleScanOutput;
private handleGetBatchItemOutput;
}