@lifeready/core 8.0.7 → 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 +72 -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/api/query-processor/query-processor.service.js +13 -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 +49 -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
|
@@ -2971,6 +2971,24 @@
|
|
|
2971
2971
|
},
|
|
2972
2972
|
}),
|
|
2973
2973
|
]));
|
|
2974
|
+
this.registerProcessor('ScenarioReceiverFileNode', common.series([
|
|
2975
|
+
common.makeDecryptionProcessor({
|
|
2976
|
+
cipherFieldName: 'sharedCipherData',
|
|
2977
|
+
getKeyId: function (_a) {
|
|
2978
|
+
var field = _a.field;
|
|
2979
|
+
return field.sharedKey.id;
|
|
2980
|
+
},
|
|
2981
|
+
}),
|
|
2982
|
+
]));
|
|
2983
|
+
this.registerProcessor('SharedScenarioReceiverNode', common.series([
|
|
2984
|
+
common.makeDecryptionProcessor({
|
|
2985
|
+
cipherFieldName: 'sharedCipherData',
|
|
2986
|
+
getKeyId: function (_a) {
|
|
2987
|
+
var field = _a.field;
|
|
2988
|
+
return field.sharedKey.id;
|
|
2989
|
+
},
|
|
2990
|
+
}),
|
|
2991
|
+
]));
|
|
2974
2992
|
this.registerProcessor('ScenarioApproverAssemblyNode', common.series([
|
|
2975
2993
|
common.makeDecryptionProcessor({
|
|
2976
2994
|
cipherFieldName: 'assemblyCipherData',
|
|
@@ -7738,6 +7756,59 @@
|
|
|
7738
7756
|
});
|
|
7739
7757
|
});
|
|
7740
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
|
+
};
|
|
7741
7812
|
ItemService.prototype.setFileConfidential = function (options) {
|
|
7742
7813
|
return __awaiter(this, void 0, void 0, function () {
|
|
7743
7814
|
return __generator(this, function (_d) {
|
|
@@ -10511,6 +10582,7 @@
|
|
|
10511
10582
|
ScenarioService.prototype.approveClaim = function (sharedScenarioId, sharedClaimId) {
|
|
10512
10583
|
return __awaiter(this, void 0, void 0, function () {
|
|
10513
10584
|
return __generator(this, function (_a) {
|
|
10585
|
+
// TODO this needs a cast so the result is not ANY.
|
|
10514
10586
|
return [2 /*return*/, this.mutate(this.approveClaimMutation(sharedScenarioId, sharedClaimId))];
|
|
10515
10587
|
});
|
|
10516
10588
|
});
|