UNPKG

dynamodb-ts-model

Version:

A DynamoDB model/client with full TypeScript typings

16 lines 2 kB
import { ConditionCheck } from '@aws-sdk/client-dynamodb'; import { DeleteCommandInput, GetCommandInput, PutCommandInput, QueryCommandInput, ScanCommandInput, UpdateCommandInput } from '@aws-sdk/lib-dynamodb'; import { DynamoModel } from './DynamoModel'; import { DynamoWrapper } from './DynamoWrapper'; import { ConditionCheckParams, DeleteParams, GetParams, Item, KeyAttributes, ProjectionKeys, PutParams, QueryParams, ScanParams, UpdateParams } from './types'; export declare function getReturnedConsumedCapacity({ client }: DynamoWrapper): "INDEXES" | "NONE"; export declare function createGetRequest<T extends Item, K extends KeyAttributes<T>, P extends ProjectionKeys<T2>, T2 extends T = T>(model: DynamoModel<T>, params: GetParams<T2, K, P>): GetCommandInput; export declare function createScanRequest<T extends Item, P extends ProjectionKeys<T2>, N extends string, F extends ProjectionKeys<T2>, T2 extends T = T>(model: DynamoModel<T>, params: ScanParams<T2, P, N, F>): ScanCommandInput; export declare function createQueryRequest<T extends Item, P extends ProjectionKeys<T2>, N extends string, I extends keyof T, T2 extends T = T>(model: DynamoModel<T>, params: QueryParams<T2, P, N, I>): QueryCommandInput; export declare function createPutRequest<T extends Item, B extends Item, T2 extends T = T>(model: DynamoModel<T>, params: PutParams<T2, B>): PutCommandInput; export declare function createUpdateRequest<T extends Item, K extends KeyAttributes<T>, B extends Item, T2 extends T = T>(model: DynamoModel<T, K>, params: UpdateParams<T2, K, B>): UpdateCommandInput & { UpdateExpression: string | undefined; }; export declare function createDeleteRequest<T extends Item, K extends KeyAttributes<T>>(model: DynamoModel<T, K, any>, params: DeleteParams<T, K>): DeleteCommandInput; export declare function createConditionCheckRequest<T extends Item, K extends KeyAttributes<T>>(model: DynamoModel<T, K>, params: ConditionCheckParams<T, K>): ConditionCheck; //# sourceMappingURL=requests.d.ts.map