inlaweb-lib-dynamodb 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +1 -1
- package/index.js +3 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare class DynamoLib {
|
|
|
6
6
|
constructor();
|
|
7
7
|
putItem(tableName: string, item: KeyValue): Promise<void>;
|
|
8
8
|
getItem<T>(tableName: string, key: KeyValue, projectionExpression?: string): Promise<T>;
|
|
9
|
-
updateItem(params: InputUpdate): Promise<
|
|
9
|
+
updateItem<T>(params: InputUpdate): Promise<T>;
|
|
10
10
|
query<T>(params: {
|
|
11
11
|
tableName: string;
|
|
12
12
|
searchParameters: SearchParameters;
|
package/index.js
CHANGED
|
@@ -64,7 +64,7 @@ class DynamoLib {
|
|
|
64
64
|
this.logger.debug(`UpdateItem: ${JSON.stringify(itemUpdate.Update)}`);
|
|
65
65
|
const result = await this.docClient.send(new lib_dynamodb_1.UpdateCommand(itemUpdate.Update));
|
|
66
66
|
this.logger.debug(`UpdateItem Result: ${JSON.stringify(result)}`);
|
|
67
|
-
return
|
|
67
|
+
return result.Attributes;
|
|
68
68
|
}
|
|
69
69
|
catch (error) {
|
|
70
70
|
this.logger.error(error.message);
|
|
@@ -257,7 +257,7 @@ class DynamoLib {
|
|
|
257
257
|
}
|
|
258
258
|
items.forEach((item, index) => {
|
|
259
259
|
const currentIndex = Math.ceil((index + 1) / limit);
|
|
260
|
-
executions[currentIndex - 1].push(
|
|
260
|
+
executions[currentIndex - 1].push(item);
|
|
261
261
|
});
|
|
262
262
|
return executions;
|
|
263
263
|
}
|
|
@@ -272,6 +272,7 @@ class DynamoLib {
|
|
|
272
272
|
ExpressionAttributeNames: {},
|
|
273
273
|
ExpressionAttributeValues: {},
|
|
274
274
|
ReturnConsumedCapacity: "TOTAL",
|
|
275
|
+
ReturnValues: "ALL_NEW",
|
|
275
276
|
},
|
|
276
277
|
};
|
|
277
278
|
// Se agregan los campos a modificar
|