@aspan-corporation/ac-shared 1.0.3 → 1.0.4
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/lib/index.js +2 -9
- package/lib/services/dynamoDB.d.ts +1 -4
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -35726,15 +35726,8 @@ var DynamoDBService = class {
|
|
|
35726
35726
|
async putCommand(putCommandInput) {
|
|
35727
35727
|
return await this.documentClient.send(new PutCommand(putCommandInput));
|
|
35728
35728
|
}
|
|
35729
|
-
async checkIfItemExists({
|
|
35730
|
-
|
|
35731
|
-
key
|
|
35732
|
-
}) {
|
|
35733
|
-
const params = {
|
|
35734
|
-
TableName: tableName,
|
|
35735
|
-
Key: key
|
|
35736
|
-
};
|
|
35737
|
-
const result = await this.getCommand(params);
|
|
35729
|
+
async checkIfItemExists(checkInput) {
|
|
35730
|
+
const result = await this.getCommand(checkInput);
|
|
35738
35731
|
return !!result.Item;
|
|
35739
35732
|
}
|
|
35740
35733
|
};
|
|
@@ -15,8 +15,5 @@ export declare class DynamoDBService {
|
|
|
15
15
|
updateCommand(updateCommandInput: UpdateCommandInput): Promise<UpdateCommandOutput>;
|
|
16
16
|
queryCommand(queryCommandInput: QueryCommandInput): Promise<QueryCommandOutput>;
|
|
17
17
|
putCommand(putCommandInput: PutCommandInput): Promise<PutCommandOutput>;
|
|
18
|
-
checkIfItemExists(
|
|
19
|
-
tableName: string;
|
|
20
|
-
key: any;
|
|
21
|
-
}): Promise<boolean>;
|
|
18
|
+
checkIfItemExists(checkInput: Pick<GetCommandInput, "TableName" | "Key">): Promise<boolean>;
|
|
22
19
|
}
|