dynamodb-toolbox
dynamodb-toolbox copied to clipboard
Add option to return `payoad` for `transactWrite`
Currently, if we want to inspect the payload and its auto-generated values, we have to step outside of the Table.transactWrite
method and use something like this:
const payload = table.transactWriteParams(batch);
await table.DocumentClient!.transactWrite(payload).promise();
I propose we add an alternative return type that would include the payload
generated by transacteWriteParams
so we could inspect values like sort keys with a default, generated value. e.g. payload.TransactItems[0].Put!.Item.sk
.