idea-aws 4.0.5 → 4.0.6

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.
@@ -1,5 +1,5 @@
1
1
  import * as DDB from '@aws-sdk/lib-dynamodb';
2
- import { AttributeValue, TransactWriteItem } from '@aws-sdk/client-dynamodb';
2
+ import { TransactWriteItem } from '@aws-sdk/client-dynamodb';
3
3
  import * as DDBUtils from '@aws-sdk/util-dynamodb';
4
4
  import { Logger } from './logger';
5
5
  /**
@@ -16,7 +16,7 @@ export declare class DynamoDB {
16
16
  * @data the data in DynamoDB's original format to convert in plain objects
17
17
  * @options the options to use to convert the data
18
18
  */
19
- unmarshall(data: Record<string, AttributeValue>, options?: DDBUtils.unmarshallOptions): Record<string, any>;
19
+ unmarshall(data: Record<string, any>, options?: DDBUtils.unmarshallOptions): Record<string, any>;
20
20
  /**
21
21
  * Returns an IUID: IDEA's Unique IDentifier, which is an id unique through an IDEA's AWS account and region.
22
22
  * Note: no need of an auth check for external uses: the permissions depend from the context in which it's executed.
@@ -72,8 +72,8 @@ export declare class DynamoDB {
72
72
  * @param keys the keys of the objects to retrieve
73
73
  * @param ignoreErr if set, ignore the errors and continue the bulk op.
74
74
  */
75
- batchGet(table: string, keys: Record<string, AttributeValue>[], ignoreErr?: boolean): Promise<any[]>;
76
- protected batchGetHelper(table: string, keys: Record<string, AttributeValue>[], resultElements: Record<string, any>[], ignoreErr: boolean, currentChunk?: number, chunkSize?: number): Promise<Record<string, any>[]>;
75
+ batchGet(table: string, keys: Record<string, any>[], ignoreErr?: boolean): Promise<any[]>;
76
+ protected batchGetHelper(table: string, keys: Record<string, any>[], resultElements: Record<string, any>[], ignoreErr: boolean, currentChunk?: number, chunkSize?: number): Promise<Record<string, any>[]>;
77
77
  /**
78
78
  * Put an array of items in a DynamoDB table, avoiding the limits of DynamoDB's BatchWriteItem.
79
79
  * In case of errors, it will retry with a random back-off mechanism until the timeout.
@@ -89,8 +89,8 @@ export declare class DynamoDB {
89
89
  * @param table the target DynamoDB table
90
90
  * @param keys the keys to delete
91
91
  */
92
- batchDelete(table: string, keys: Record<string, AttributeValue>[]): Promise<void>;
93
- protected batchWriteHelper(table: string, itemsOrKeys: Record<string, any>[] | Record<string, AttributeValue>[], isPut: boolean, currentChunk?: number, chunkSize?: number): Promise<void>;
92
+ batchDelete(table: string, keys: Record<string, any>[]): Promise<void>;
93
+ protected batchWriteHelper(table: string, itemsOrKeys: Record<string, any>[], isPut: boolean, currentChunk?: number, chunkSize?: number): Promise<void>;
94
94
  protected batchWriteChunkWithRetries(table: string, params: DDB.BatchWriteCommandInput): Promise<void>;
95
95
  /**
96
96
  * Query a DynamoDB table, avoiding the limits of DynamoDB's Query.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "idea-aws",
3
- "version": "4.0.5",
3
+ "version": "4.0.6",
4
4
  "description": "AWS wrappers to use in IDEA's back-ends",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",