dynoquery 0.1.14 → 0.1.15
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/dist/partition.d.ts +2 -2
- package/dist/partition.js +2 -1
- package/package.json +1 -1
package/dist/partition.d.ts
CHANGED
|
@@ -29,11 +29,11 @@ export declare class Partition {
|
|
|
29
29
|
/**
|
|
30
30
|
* Create an item in this partition.
|
|
31
31
|
*/
|
|
32
|
-
create<T = any>(sk: string, data: T, indices?: IndexQuery[]): Promise<
|
|
32
|
+
create<T = any>(sk: string, data: T, indices?: IndexQuery[]): Promise<T>;
|
|
33
33
|
/**
|
|
34
34
|
* Update an existing item in this partition.
|
|
35
35
|
*/
|
|
36
|
-
update<T = any>(sk: string, data: Partial<T>): Promise<
|
|
36
|
+
update<T = any>(sk: string, data: Partial<T>): Promise<T>;
|
|
37
37
|
/**
|
|
38
38
|
* Delete an item by its SK within this partition.
|
|
39
39
|
*/
|
package/dist/partition.js
CHANGED
|
@@ -98,6 +98,7 @@ class Partition {
|
|
|
98
98
|
Item: item,
|
|
99
99
|
});
|
|
100
100
|
this.cache[sk] = item;
|
|
101
|
+
return item;
|
|
101
102
|
});
|
|
102
103
|
}
|
|
103
104
|
/**
|
|
@@ -107,7 +108,7 @@ class Partition {
|
|
|
107
108
|
return __awaiter(this, void 0, void 0, function* () {
|
|
108
109
|
const current = (yield this.get(sk)) || {};
|
|
109
110
|
const updated = Object.assign(Object.assign({}, current), data);
|
|
110
|
-
yield this.create(sk, updated);
|
|
111
|
+
return yield this.create(sk, updated);
|
|
111
112
|
});
|
|
112
113
|
}
|
|
113
114
|
/**
|