@lifeready/core 8.0.8 → 8.0.9
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/bundles/lifeready-core.umd.js +54 -0
- package/bundles/lifeready-core.umd.js.map +1 -1
- package/bundles/lifeready-core.umd.min.js +1 -1
- package/bundles/lifeready-core.umd.min.js.map +1 -1
- package/esm2015/lib/item/item.service.js +37 -1
- package/esm2015/lib/item/item.types.js +1 -1
- package/esm2015/lib/scenario/scenario.service.js +2 -1
- package/fesm2015/lifeready-core.js +37 -0
- package/fesm2015/lifeready-core.js.map +1 -1
- package/lib/item/item.service.d.ts +11 -1
- package/lib/item/item.types.d.ts +3 -0
- package/lifeready-core.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -7756,6 +7756,59 @@
|
|
|
7756
7756
|
});
|
|
7757
7757
|
});
|
|
7758
7758
|
};
|
|
7759
|
+
ItemService.prototype.createFileUsingTempMutation = function (options) {
|
|
7760
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
7761
|
+
var tempDir, file, _d;
|
|
7762
|
+
return __generator(this, function (_e) {
|
|
7763
|
+
switch (_e.label) {
|
|
7764
|
+
case 0: return [4 /*yield*/, this.ensureTempDirectory()];
|
|
7765
|
+
case 1:
|
|
7766
|
+
tempDir = _e.sent();
|
|
7767
|
+
// Clear the temp directory of the ones we are about to create.
|
|
7768
|
+
// NOTE: this mutation can not be merged into a single mutation with the
|
|
7769
|
+
// the createDirectory mutation because it uses the current server time to
|
|
7770
|
+
// clean up. So it must successfully complete before the creation of the
|
|
7771
|
+
// directories.
|
|
7772
|
+
return [4 /*yield*/, this.beginDeleteChildItemLinksWindow({
|
|
7773
|
+
directoryId: tempDir.id,
|
|
7774
|
+
requestWindowMs: options.requestWindowMs,
|
|
7775
|
+
})];
|
|
7776
|
+
case 2:
|
|
7777
|
+
// Clear the temp directory of the ones we are about to create.
|
|
7778
|
+
// NOTE: this mutation can not be merged into a single mutation with the
|
|
7779
|
+
// the createDirectory mutation because it uses the current server time to
|
|
7780
|
+
// clean up. So it must successfully complete before the creation of the
|
|
7781
|
+
// directories.
|
|
7782
|
+
_e.sent();
|
|
7783
|
+
return [4 /*yield*/, this.createFile(Object.assign(Object.assign({}, options), { parentDirectories: [
|
|
7784
|
+
{
|
|
7785
|
+
directoryId: tempDir.id,
|
|
7786
|
+
wrappingKeyId: tempDir.keyId,
|
|
7787
|
+
},
|
|
7788
|
+
] }))];
|
|
7789
|
+
case 3:
|
|
7790
|
+
file = (_e.sent()).createFile.file;
|
|
7791
|
+
_d = {};
|
|
7792
|
+
return [4 /*yield*/, this.changeFileParentsMutation({
|
|
7793
|
+
fileId: file.id,
|
|
7794
|
+
fileKeyId: file.keyId,
|
|
7795
|
+
parentsToRemove: [tempDir.id],
|
|
7796
|
+
parentsToAdd: options.parentDirectories,
|
|
7797
|
+
})];
|
|
7798
|
+
case 4:
|
|
7799
|
+
// TODO client-side check for timeout on requestWindowMs
|
|
7800
|
+
// TODO return the server time where delete is scheduled. Expirable mutation
|
|
7801
|
+
// Return the mutation that moves the directory into the dst directories
|
|
7802
|
+
return [2 /*return*/, (_d.mutation = _e.sent(),
|
|
7803
|
+
_d.file = {
|
|
7804
|
+
id: file.id,
|
|
7805
|
+
keyId: file.keyId,
|
|
7806
|
+
},
|
|
7807
|
+
_d)];
|
|
7808
|
+
}
|
|
7809
|
+
});
|
|
7810
|
+
});
|
|
7811
|
+
};
|
|
7759
7812
|
ItemService.prototype.setFileConfidential = function (options) {
|
|
7760
7813
|
return __awaiter(this, void 0, void 0, function () {
|
|
7761
7814
|
return __generator(this, function (_d) {
|
|
@@ -10529,6 +10582,7 @@
|
|
|
10529
10582
|
ScenarioService.prototype.approveClaim = function (sharedScenarioId, sharedClaimId) {
|
|
10530
10583
|
return __awaiter(this, void 0, void 0, function () {
|
|
10531
10584
|
return __generator(this, function (_a) {
|
|
10585
|
+
// TODO this needs a cast so the result is not ANY.
|
|
10532
10586
|
return [2 /*return*/, this.mutate(this.approveClaimMutation(sharedScenarioId, sharedClaimId))];
|
|
10533
10587
|
});
|
|
10534
10588
|
});
|