import { DynamoDBClientConfig, PutRequest, QueryOutput, ScanOutput } from '@aws-sdk/client-dynamodb'; import { DeleteCommandInput, DeleteCommandOutput, GetCommandInput, GetCommandOutput, PutCommandInput, QueryCommandInput, ScanCommandInput, UpdateCommandInput, UpdateCommandOutput } from '@aws-sdk/lib-dynamodb'; import { Logger } from 'winston'; export interface IDynamoDBConfig { batchWriteMaxRetries?: number; clientConfig?: DynamoDBClientConfig; dockerConfig?: { endpoint: string; }; logger?: Logger; queueConfig?: { queueConcurrency?: number | undefined; queueDelay?: number | undefined; }; tableNamePrefix: string; } export interface IUnprocessedItems { UnprocessedItems: Record; } export type TBatchWriteItems = (table: string, items: PutRequest['Item'][]) => Promise; export type TDeleteItem = (table: string, key: string | object, options?: Partial) => Promise; export type TGetItem = (table: string, key: string | object, options?: Partial) => Promise; export type TPutItem = (table: string, item: PutCommandInput['Item']) => Promise; export type TQueryTable = (table: string, options?: Partial) => Promise; export type TScanTable = (table: string, options?: Partial) => Promise; export type TUpdateItem = (table: string, key: string | object, options?: Partial) => Promise; export interface IDynamoDBInstance { batchWriteItems: TBatchWriteItems; deleteItem: TDeleteItem; getItem: TGetItem; putItem: TPutItem; queryTable: TQueryTable; scanTable: TScanTable; updateItem: TUpdateItem; } declare const dynamodb: (userConfig: IDynamoDBConfig) => IDynamoDBInstance; export default dynamodb;