import { AttributeValue, BatchWriteItemCommandInput, BatchWriteItemCommandOutput } from '@aws-sdk/client-dynamodb'; /** * This class helps with batch writes or deletes. */ declare class BatchEdit { private _ddb; private _params; private _tableName; constructor(config: { region: string; }, table: string); /** * Add a single delete request to the command input. Use to delete a single item from a DynamoDB Table. * * @param key - object of the primary key of item to delete * @returns BatchEdit item with populated params */ addDeleteRequest(key: { [key: string]: AttributeValue; }): BatchEdit; /** * Add a single write request to the command input. Use to write a single new item to a DynamoDB Table. * * @param item - object of the item to add * @returns BatchEdit item with populated params */ addWriteRequest(item: { [key: string]: AttributeValue; }): BatchEdit; /** * Add one or more delete request(s) to the command input. Use to delete one or more items from a DynamoDB Table. * * @param keys - list of object(s) of the primary key(s) of item(s) to delete * @returns BatchEdit item with populated params */ addDeleteRequests(keys: { [key: string]: AttributeValue; }[]): BatchEdit; /** * Add one or more write request(s) to the command input. Use to write one or more new item(s) to a DynamoDB Table. * * @param items - list of object(s) of the item(s) to add * @returns BatchEdit item with populated params */ addWriteRequests(items: { [key: string]: AttributeValue; }[]): BatchEdit; /** * Gets the internal _params value of the command input. * * @returns The parameters for the BatchWriteItemCommandInput * * @example Returning command input * ```ts * # Result * { * RequestItems: { * : [ * DeleteRequest?: { * Key: {} * }, * PutRequest?: { * Item: {} * } * ] * } * } * ``` */ getParams(): BatchWriteItemCommandInput; /** * Sends the internal parameters as input to the DynamoDB table to execute write and/or delete request(s). * Call this after populating the command input params with the above methods. * If UnproccessedItems is non empty, some request failed. * * @returns The output from the batch write item command * * @example * ```ts * # Result * { * ConsumedCapacity?: [], * ItemCollectionMetrics?: {}, * UnprocessedItems?: {} * } * ``` */ execute(): Promise; } export default BatchEdit; //# sourceMappingURL=batchEdit.d.ts.map