@lifeready/core 8.0.5 → 8.0.6
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 +39 -23
- 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/types/lr-graphql.types.js +2 -1
- package/esm2015/lib/item/item.service.js +24 -20
- package/esm2015/lib/item/item.types.js +1 -1
- package/esm2015/lib/trusted-party/trusted-party.service.js +19 -2
- package/fesm2015/lifeready-core.js +40 -19
- package/fesm2015/lifeready-core.js.map +1 -1
- package/lib/api/types/lr-graphql.types.d.ts +11 -18
- package/lib/item/item.service.d.ts +2 -2
- package/lib/item/item.types.d.ts +3 -8
- package/lib/trusted-party/trusted-party.service.d.ts +6 -0
- package/lifeready-core.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -3890,6 +3890,7 @@
|
|
|
3890
3890
|
(function (LinkTypeField) {
|
|
3891
3891
|
LinkTypeField["HARD"] = "HARD";
|
|
3892
3892
|
LinkTypeField["SOFT"] = "SOFT";
|
|
3893
|
+
LinkTypeField["REFERENCE"] = "REFERENCE";
|
|
3893
3894
|
})(exports.LinkTypeField || (exports.LinkTypeField = {}));
|
|
3894
3895
|
(function (PlanStateField) {
|
|
3895
3896
|
PlanStateField["TRIALLING"] = "TRIALLING";
|
|
@@ -7776,19 +7777,29 @@
|
|
|
7776
7777
|
// ------------------------------------------------------------------------------
|
|
7777
7778
|
ItemService.prototype.prepareParentDirectory = function (options, newKey) {
|
|
7778
7779
|
return __awaiter(this, void 0, void 0, function () {
|
|
7779
|
-
var wrappingKey, _d;
|
|
7780
|
+
var directoryId, linkType, wrappingKeyId, wrappingKey, _d;
|
|
7780
7781
|
return __generator(this, function (_e) {
|
|
7781
7782
|
switch (_e.label) {
|
|
7782
|
-
case 0:
|
|
7783
|
-
|
|
7783
|
+
case 0:
|
|
7784
|
+
directoryId = options.directoryId, linkType = options.linkType, wrappingKeyId = options.wrappingKeyId;
|
|
7785
|
+
if (!(linkType == exports.LinkTypeField.REFERENCE)) return [3 /*break*/, 1];
|
|
7786
|
+
if (wrappingKeyId) {
|
|
7787
|
+
throw new KcBadArgumentException('Do not specify wrappingKeyId when link type is REFERENCE.');
|
|
7788
|
+
}
|
|
7789
|
+
return [2 /*return*/, {
|
|
7790
|
+
directoryId: directoryId,
|
|
7791
|
+
linkType: linkType,
|
|
7792
|
+
}];
|
|
7793
|
+
case 1: return [4 /*yield*/, this.getDirectoryKey(directoryId, wrappingKeyId)];
|
|
7794
|
+
case 2:
|
|
7784
7795
|
wrappingKey = _e.sent();
|
|
7785
7796
|
_d = {
|
|
7786
|
-
directoryId:
|
|
7797
|
+
directoryId: directoryId,
|
|
7787
7798
|
wrappingKeyId: wrappingKey.id
|
|
7788
7799
|
};
|
|
7789
7800
|
return [4 /*yield*/, this.keyGraph.wrapKey(wrappingKey, newKey)];
|
|
7790
|
-
case
|
|
7791
|
-
_d.linkType =
|
|
7801
|
+
case 3: return [2 /*return*/, (_d.wrappedKey = _e.sent(),
|
|
7802
|
+
_d.linkType = linkType,
|
|
7792
7803
|
_d)];
|
|
7793
7804
|
}
|
|
7794
7805
|
});
|
|
@@ -7965,23 +7976,7 @@
|
|
|
7965
7976
|
case 0: return [4 /*yield*/, this.keyFactory.createKey()];
|
|
7966
7977
|
case 1:
|
|
7967
7978
|
fileKey = _d.sent();
|
|
7968
|
-
return [4 /*yield*/, Promise.all(options.parentDirectories.map(function (t) { return
|
|
7969
|
-
var _d, directoryId, wrappingKeyId, wrappedKey;
|
|
7970
|
-
return __generator(this, function (_e) {
|
|
7971
|
-
switch (_e.label) {
|
|
7972
|
-
case 0: return [4 /*yield*/, this.prepareParentDirectory(t, fileKey)];
|
|
7973
|
-
case 1:
|
|
7974
|
-
_d = _e.sent(), directoryId = _d.directoryId, wrappingKeyId = _d.wrappingKeyId, wrappedKey = _d.wrappedKey;
|
|
7975
|
-
// remap from ParentDirectoryInput to FileParentDirectoryInput
|
|
7976
|
-
// TODO the server should really just use wrappedKey instead of wrappedFileKey
|
|
7977
|
-
return [2 /*return*/, {
|
|
7978
|
-
directoryId: directoryId,
|
|
7979
|
-
wrappingKeyId: wrappingKeyId,
|
|
7980
|
-
wrappedFileKey: wrappedKey,
|
|
7981
|
-
}];
|
|
7982
|
-
}
|
|
7983
|
-
});
|
|
7984
|
-
}); }))];
|
|
7979
|
+
return [4 /*yield*/, Promise.all(options.parentDirectories.map(function (t) { return _this.prepareParentDirectory(t, fileKey); }))];
|
|
7985
7980
|
case 2:
|
|
7986
7981
|
parentDirectories = _d.sent();
|
|
7987
7982
|
return [4 /*yield*/, this.prepareCreateFileState(fileKey, options)];
|
|
@@ -12064,6 +12059,27 @@
|
|
|
12064
12059
|
});
|
|
12065
12060
|
});
|
|
12066
12061
|
};
|
|
12062
|
+
TrustedPartyService.prototype.deleteFileShare = function (id) {
|
|
12063
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
12064
|
+
return __generator(this, function (_a) {
|
|
12065
|
+
return [2 /*return*/, this.mutate(this.deleteFileShareMutation(id))];
|
|
12066
|
+
});
|
|
12067
|
+
});
|
|
12068
|
+
};
|
|
12069
|
+
TrustedPartyService.prototype.deleteFileShareMutation = function (id) {
|
|
12070
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
12071
|
+
return __generator(this, function (_a) {
|
|
12072
|
+
return [2 /*return*/, new LrMutation({
|
|
12073
|
+
mutation: DeleteFileShareMutation,
|
|
12074
|
+
variables: {
|
|
12075
|
+
input: {
|
|
12076
|
+
id: id,
|
|
12077
|
+
},
|
|
12078
|
+
},
|
|
12079
|
+
})];
|
|
12080
|
+
});
|
|
12081
|
+
});
|
|
12082
|
+
};
|
|
12067
12083
|
TrustedPartyService.prototype.completeDetachedDirectoryShare = function (options) {
|
|
12068
12084
|
return __awaiter(this, void 0, void 0, function () {
|
|
12069
12085
|
return __generator(this, function (_a) {
|