@moicky/dynamodb 2.4.1 → 2.4.3
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.
|
@@ -27,7 +27,7 @@ import { DynamoDBItem } from "../types";
|
|
|
27
27
|
* );
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
export declare function deleteItem(key:
|
|
30
|
+
export declare function deleteItem<T extends DynamoDBItem = DynamoDBItem>(key: Partial<T>, args?: Partial<DeleteItemCommandInput>): Promise<DeleteItemCommandOutput>;
|
|
31
31
|
type DeleteItemsArgs = Partial<BatchWriteItemCommandInput & {
|
|
32
32
|
TableName?: string;
|
|
33
33
|
}>;
|
|
@@ -63,5 +63,5 @@ type DeleteItemsArgs = Partial<BatchWriteItemCommandInput & {
|
|
|
63
63
|
* );
|
|
64
64
|
* ```
|
|
65
65
|
*/
|
|
66
|
-
export declare function deleteItems(keys:
|
|
66
|
+
export declare function deleteItems<T extends DynamoDBItem = DynamoDBItem>(keys: Partial<T>[], args?: DeleteItemsArgs, retry?: number): Promise<void>;
|
|
67
67
|
export {};
|
|
@@ -32,8 +32,8 @@ import { DynamoDBItem } from "../types";
|
|
|
32
32
|
* console.log(newItem); // { "PK": "User/1", "SK": "Book/1", "released": 2000 }
|
|
33
33
|
* ```
|
|
34
34
|
*/
|
|
35
|
-
export declare function updateItem<T extends DynamoDBItem>(key: T
|
|
36
|
-
export declare function updateItem<T extends DynamoDBItem, K extends Partial<UpdateItemCommandInput> = Partial<UpdateItemCommandInput>>(key: T
|
|
35
|
+
export declare function updateItem<T extends DynamoDBItem>(key: Partial<T>, data: Partial<T>, args: Partial<UpdateItemCommandInput>): Promise<T>;
|
|
36
|
+
export declare function updateItem<T extends DynamoDBItem, K extends Partial<UpdateItemCommandInput> = Partial<UpdateItemCommandInput>>(key: Partial<T>, data: Partial<T>, args?: K): Promise<K extends {
|
|
37
37
|
ReturnValues: string;
|
|
38
38
|
} ? T : undefined>;
|
|
39
39
|
/**
|
|
@@ -50,4 +50,4 @@ export declare function updateItem<T extends DynamoDBItem, K extends Partial<Upd
|
|
|
50
50
|
* await removeAttributes({ PK: "User/1", SK: "Book/1" }, ["description"]);
|
|
51
51
|
* ```
|
|
52
52
|
*/
|
|
53
|
-
export declare function removeAttributes<T extends DynamoDBItem = DynamoDBItem>(key: T
|
|
53
|
+
export declare function removeAttributes<T extends DynamoDBItem = DynamoDBItem>(key: Partial<T>, attributes: Array<keyof T>, args?: Partial<UpdateItemCommandInput>): Promise<UpdateItemCommandOutput>;
|