UNPKG

@nerdware/ddb-single-table

Version:

A schema-based DynamoDB modeling tool, high-level API, and type-generator built to supercharge single-table designs!⚡

88 lines 5.5 kB
import { DdbClientFieldParser } from "./DdbClientFieldParser.js"; import type { DdbClientWrapperConstructorParameters, ClientWrapperGetItemInput, ClientWrapperGetItemOutput, ClientWrapperBatchGetItemInput, ClientWrapperBatchGetItemOutput, ClientWrapperPutItemInput, ClientWrapperPutItemOutput, ClientWrapperBatchWriteItemInput, ClientWrapperBatchWriteItemOutput, ClientWrapperUpdateItemInput, ClientWrapperUpdateItemOutput, ClientWrapperDeleteItemInput, ClientWrapperDeleteItemOutput, ClientWrapperQueryInput, ClientWrapperQueryOutput, ClientWrapperScanInput, ClientWrapperScanOutput, ClientWrapperTransactWriteItemsInput, ClientWrapperTransactWriteItemsOutput, ClientWrapperDescribeTableInput, ClientWrapperDescribeTableOutput, ClientWrapperCreateTableInput, ClientWrapperCreateTableOutput, ClientWrapperListTablesInput, ClientWrapperListTablesOutput } from "./types/index.js"; /** * A DynamoDB client wrapper with methods for instantiating DynamoDB client commands. * Where applicable, these wrapper methods also handle the following concerns: * * - Marshalling and unmarshalling of attribute values * - Conversion of JS `Date` objects to/from ISO-8601 datetime strings * - Batching/retry logic */ export declare class DdbClientWrapper extends DdbClientFieldParser { /** The DynamoDB client instance. */ private readonly _ddbClient; constructor({ ddbClient, tableName, marshallingConfigs }: DdbClientWrapperConstructorParameters); /** * [`GetItem`][api-ref] operation wrapper. * * [api-ref]: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html */ readonly getItem: ({ marshallingConfigs: { marshallOptions, unmarshallOptions }, ...args }: ClientWrapperGetItemInput) => Promise<ClientWrapperGetItemOutput>; /** * [`BatchGetItem`][api-ref] command wrapper. * * [api-ref]: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchGetItem.html */ readonly batchGetItems: ({ marshallingConfigs: { marshallOptions, unmarshallOptions }, batchConfigs, ...rawCmdArgs }: ClientWrapperBatchGetItemInput) => Promise<ClientWrapperBatchGetItemOutput>; /** * [`PutItem`][api-ref] operation wrapper. * * [api-ref]: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html */ readonly putItem: ({ marshallingConfigs: { marshallOptions, unmarshallOptions }, ...args }: ClientWrapperPutItemInput) => Promise<ClientWrapperPutItemOutput>; /** * [`UpdateItem`][api-ref] operation wrapper. * * [api-ref]: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html */ readonly updateItem: ({ marshallingConfigs: { marshallOptions, unmarshallOptions }, ...args }: ClientWrapperUpdateItemInput) => Promise<ClientWrapperUpdateItemOutput>; /** * [`DeleteItem`][api-ref] operation wrapper. * * [api-ref]: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html */ readonly deleteItem: ({ marshallingConfigs: { marshallOptions, unmarshallOptions }, ...args }: ClientWrapperDeleteItemInput) => Promise<ClientWrapperDeleteItemOutput>; /** * [`BatchWriteItem`][api-ref] operation wrapper. * * [api-ref]: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html */ readonly batchWriteItems: ({ marshallingConfigs: { marshallOptions, unmarshallOptions }, batchConfigs, ...rawCmdArgs }: ClientWrapperBatchWriteItemInput) => Promise<ClientWrapperBatchWriteItemOutput>; /** * [`Query`][api-ref] operation wrapper. * * [api-ref]: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Query.html */ readonly query: ({ marshallingConfigs: { marshallOptions, unmarshallOptions }, ...args }?: ClientWrapperQueryInput) => Promise<ClientWrapperQueryOutput>; /** * [`Scan`][api-ref] operation wrapper. * * [api-ref]: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Scan.html */ readonly scan: ({ marshallingConfigs: { marshallOptions, unmarshallOptions }, ...args }?: ClientWrapperScanInput) => Promise<ClientWrapperScanOutput>; /** * [`TransactWriteItems`][api-ref] operation wrapper. * * [api-ref]: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactWriteItems.html */ readonly transactWriteItems: ({ marshallingConfigs: { marshallOptions, unmarshallOptions }, ...args }: ClientWrapperTransactWriteItemsInput) => Promise<ClientWrapperTransactWriteItemsOutput>; /** * [`DescribeTable`][api-ref] operation wrapper. * * [api-ref]: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DescribeTable.html */ readonly describeTable: (args?: ClientWrapperDescribeTableInput) => Promise<ClientWrapperDescribeTableOutput>; /** * [`CreateTable`][api-ref] operation wrapper. * * [api-ref]: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_CreateTable.html */ readonly createTable: (args: ClientWrapperCreateTableInput) => Promise<ClientWrapperCreateTableOutput>; /** * [`ListTables`][api-ref] operation wrapper. * * [api-ref]: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ListTables.html */ readonly listTables: (args?: ClientWrapperListTablesInput) => Promise<ClientWrapperListTablesOutput>; } //# sourceMappingURL=DdbClientWrapper.d.ts.map