@lifeready/core 8.0.3 → 8.0.5
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 +28 -159
- 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 +1 -1
- package/esm2015/lib/trusted-party/trusted-party.gql.js +1 -37
- package/esm2015/lib/trusted-party/trusted-party.service.js +17 -98
- package/esm2015/lib/trusted-party/trusted-party.types.js +1 -1
- package/fesm2015/lifeready-core.js +15 -132
- package/fesm2015/lifeready-core.js.map +1 -1
- package/lib/api/types/lr-graphql.types.d.ts +6 -4
- package/lib/trusted-party/trusted-party.gql.d.ts +0 -32
- package/lib/trusted-party/trusted-party.service.d.ts +17 -55
- package/lib/trusted-party/trusted-party.types.d.ts +5 -16
- package/lifeready-core.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -11876,22 +11876,18 @@
|
|
|
11876
11876
|
], exports.TpPasswordResetService);
|
|
11877
11877
|
|
|
11878
11878
|
var DeleteTpMutation = gqlTyped(templateObject_1$q || (templateObject_1$q = __makeTemplateObject(["\nmutation DeleteTpMutation($input: DeleteTpInput!) {\n deleteTp(input: $input) {\n id\n }\n}\n"], ["\nmutation DeleteTpMutation($input: DeleteTpInput!) {\n deleteTp(input: $input) {\n id\n }\n}\n"])));
|
|
11879
|
-
var
|
|
11880
|
-
var
|
|
11881
|
-
var
|
|
11882
|
-
var
|
|
11883
|
-
var
|
|
11884
|
-
var
|
|
11885
|
-
var
|
|
11886
|
-
var
|
|
11887
|
-
var
|
|
11888
|
-
var
|
|
11889
|
-
var
|
|
11890
|
-
var
|
|
11891
|
-
var RequestTpMkReshareMutation = gqlTyped(templateObject_14$1 || (templateObject_14$1 = __makeTemplateObject(["\nmutation RequestTpMkReshareMutation($input: RequestTpMkReshareInput!) {\n requestTpMkReshare(input: $input) {\n id\n }\n}"], ["\nmutation RequestTpMkReshareMutation($input: RequestTpMkReshareInput!) {\n requestTpMkReshare(input: $input) {\n id\n }\n}"])));
|
|
11892
|
-
var RespondTpMkReshareMutation = gqlTyped(templateObject_15$1 || (templateObject_15$1 = __makeTemplateObject(["\n mutation RespondTpMkReshareMutation($input: RespondTpMkReshareInput!) {\n respondTpMkReshare(input: $input) {\n id\n }\n }\n"], ["\n mutation RespondTpMkReshareMutation($input: RespondTpMkReshareInput!) {\n respondTpMkReshare(input: $input) {\n id\n }\n }\n"])));
|
|
11893
|
-
var CompleteTpMkReshareMutation = gqlTyped(templateObject_16$1 || (templateObject_16$1 = __makeTemplateObject(["\nmutation CompleteTpMkReshareMutation($input: CompleteTpMkReshareInput!) {\n completeTpMkReshare(input: $input) {\n id\n }\n}"], ["\nmutation CompleteTpMkReshareMutation($input: CompleteTpMkReshareInput!) {\n completeTpMkReshare(input: $input) {\n id\n }\n}"])));
|
|
11894
|
-
var templateObject_1$q, templateObject_2$k, templateObject_3$h, templateObject_4$d, templateObject_5$b, templateObject_6$6, templateObject_7$5, templateObject_8$5, templateObject_9$5, templateObject_10$2, templateObject_11$1, templateObject_12$1, templateObject_13$1, templateObject_14$1, templateObject_15$1, templateObject_16$1;
|
|
11879
|
+
var CreateDirectoryShareMutation = gqlTyped(templateObject_2$k || (templateObject_2$k = __makeTemplateObject(["\nmutation CreateDirectoryShareMutation($input: CreateDirectoryShareInput!) {\n createDirectoryShare(input: $input) {\n directoryShare {\n id\n }\n }\n}\n"], ["\nmutation CreateDirectoryShareMutation($input: CreateDirectoryShareInput!) {\n createDirectoryShare(input: $input) {\n directoryShare {\n id\n }\n }\n}\n"])));
|
|
11880
|
+
var CreateFileShareMutation = gqlTyped(templateObject_3$h || (templateObject_3$h = __makeTemplateObject(["\nmutation CreateFileShareMutation($input: CreateFileShareInput!) {\n createFileShare(input: $input) {\n fileShare {\n id\n }\n }\n}\n"], ["\nmutation CreateFileShareMutation($input: CreateFileShareInput!) {\n createFileShare(input: $input) {\n fileShare {\n id\n }\n }\n}\n"])));
|
|
11881
|
+
var UpdateDirectoryShareMutation = gqlTyped(templateObject_4$d || (templateObject_4$d = __makeTemplateObject(["\nmutation UpdateDirectoryShareMutation($input: UpdateDirectoryShareInput!) {\n updateDirectoryShare(input: $input) {\n directoryShare {\n id\n }\n }\n}\n"], ["\nmutation UpdateDirectoryShareMutation($input: UpdateDirectoryShareInput!) {\n updateDirectoryShare(input: $input) {\n directoryShare {\n id\n }\n }\n}\n"])));
|
|
11882
|
+
var UpdateFileShareMutation = gqlTyped(templateObject_5$b || (templateObject_5$b = __makeTemplateObject(["\nmutation UpdateFileShareMutation($input: UpdateFileShareInput!) {\n updateFileShare(input: $input) {\n fileShare {\n id\n }\n }\n}\n"], ["\nmutation UpdateFileShareMutation($input: UpdateFileShareInput!) {\n updateFileShare(input: $input) {\n fileShare {\n id\n }\n }\n}\n"])));
|
|
11883
|
+
var DeleteDirectoryShareMutation = gqlTyped(templateObject_6$6 || (templateObject_6$6 = __makeTemplateObject(["\nmutation DeleteDirectoryShareMutation($input: DeleteDirectoryShareInput!) {\n deleteDirectoryShare(input: $input) {\n id\n }\n}\n"], ["\nmutation DeleteDirectoryShareMutation($input: DeleteDirectoryShareInput!) {\n deleteDirectoryShare(input: $input) {\n id\n }\n}\n"])));
|
|
11884
|
+
var DeleteFileShareMutation = gqlTyped(templateObject_7$5 || (templateObject_7$5 = __makeTemplateObject(["\nmutation DeleteFileShareMutation($input: DeleteFileShareInput!) {\n deleteFileShare(input: $input) {\n id\n }\n}\n"], ["\nmutation DeleteFileShareMutation($input: DeleteFileShareInput!) {\n deleteFileShare(input: $input) {\n id\n }\n}\n"])));
|
|
11885
|
+
var CompleteDetachedDirectoryShareMutation = gqlTyped(templateObject_8$5 || (templateObject_8$5 = __makeTemplateObject(["\nmutation CompleteDetachedDirectoryShareMutation($input: CompleteDetachedDirectoryShareInput!) {\n completeDetachedDirectoryShare(input: $input) {\n directoryShare {\n id\n }\n }\n}\n"], ["\nmutation CompleteDetachedDirectoryShareMutation($input: CompleteDetachedDirectoryShareInput!) {\n completeDetachedDirectoryShare(input: $input) {\n directoryShare {\n id\n }\n }\n}\n"])));
|
|
11886
|
+
var CompleteDetachedFileShareMutation = gqlTyped(templateObject_9$5 || (templateObject_9$5 = __makeTemplateObject(["\nmutation CompleteDetachedFileShareMutation($input: CompleteDetachedFileShareInput!) {\n completeDetachedFileShare(input: $input) {\n fileShare {\n id\n }\n }\n}\n"], ["\nmutation CompleteDetachedFileShareMutation($input: CompleteDetachedFileShareInput!) {\n completeDetachedFileShare(input: $input) {\n fileShare {\n id\n }\n }\n}\n"])));
|
|
11887
|
+
var RequestTpMkReshareMutation = gqlTyped(templateObject_10$2 || (templateObject_10$2 = __makeTemplateObject(["\nmutation RequestTpMkReshareMutation($input: RequestTpMkReshareInput!) {\n requestTpMkReshare(input: $input) {\n id\n }\n}"], ["\nmutation RequestTpMkReshareMutation($input: RequestTpMkReshareInput!) {\n requestTpMkReshare(input: $input) {\n id\n }\n}"])));
|
|
11888
|
+
var RespondTpMkReshareMutation = gqlTyped(templateObject_11$1 || (templateObject_11$1 = __makeTemplateObject(["\n mutation RespondTpMkReshareMutation($input: RespondTpMkReshareInput!) {\n respondTpMkReshare(input: $input) {\n id\n }\n }\n"], ["\n mutation RespondTpMkReshareMutation($input: RespondTpMkReshareInput!) {\n respondTpMkReshare(input: $input) {\n id\n }\n }\n"])));
|
|
11889
|
+
var CompleteTpMkReshareMutation = gqlTyped(templateObject_12$1 || (templateObject_12$1 = __makeTemplateObject(["\nmutation CompleteTpMkReshareMutation($input: CompleteTpMkReshareInput!) {\n completeTpMkReshare(input: $input) {\n id\n }\n}"], ["\nmutation CompleteTpMkReshareMutation($input: CompleteTpMkReshareInput!) {\n completeTpMkReshare(input: $input) {\n id\n }\n}"])));
|
|
11890
|
+
var templateObject_1$q, templateObject_2$k, templateObject_3$h, templateObject_4$d, templateObject_5$b, templateObject_6$6, templateObject_7$5, templateObject_8$5, templateObject_9$5, templateObject_10$2, templateObject_11$1, templateObject_12$1;
|
|
11895
11891
|
|
|
11896
11892
|
var TpCurrentUserSharedKeyQuery = gqlTyped(templateObject_1$r || (templateObject_1$r = __makeTemplateObject(["\nquery TpCurrentUserSharedKeyQuery($id: LrRelayIdInput!) {\n tp(id: $id){\n currentUserSharedKey {\n userSharedKey {\n sharedKey {\n id\n }\n mkSharedKey {\n id\n }\n mkPxk {\n id\n }\n mkReshareRequestCipher\n mkReshareRequestSent\n mkReshareResponseCipher\n mkReshareResponseSent\n }\n }\n }\n}\n"], ["\nquery TpCurrentUserSharedKeyQuery($id: LrRelayIdInput!) {\n tp(id: $id){\n currentUserSharedKey {\n userSharedKey {\n sharedKey {\n id\n }\n mkSharedKey {\n id\n }\n mkPxk {\n id\n }\n mkReshareRequestCipher\n mkReshareRequestSent\n mkReshareResponseCipher\n mkReshareResponseSent\n }\n }\n }\n}\n"])));
|
|
11897
11893
|
var templateObject_1$r;
|
|
@@ -11922,131 +11918,6 @@
|
|
|
11922
11918
|
},
|
|
11923
11919
|
});
|
|
11924
11920
|
};
|
|
11925
|
-
TrustedPartyService.prototype.shareDirectory = function (options) {
|
|
11926
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
11927
|
-
return __generator(this, function (_a) {
|
|
11928
|
-
return [2 /*return*/, this.mutate(this.shareDirectoryMutation(options))];
|
|
11929
|
-
});
|
|
11930
|
-
});
|
|
11931
|
-
};
|
|
11932
|
-
TrustedPartyService.prototype.shareDirectoryMutation = function (options) {
|
|
11933
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
11934
|
-
var _a, _b;
|
|
11935
|
-
return __generator(this, function (_c) {
|
|
11936
|
-
switch (_c.label) {
|
|
11937
|
-
case 0:
|
|
11938
|
-
_a = LrMutation.bind;
|
|
11939
|
-
_b = {
|
|
11940
|
-
mutation: ShareDirectoryMutation
|
|
11941
|
-
};
|
|
11942
|
-
return [4 /*yield*/, this.prepareShareItemMutation(Object.assign(Object.assign({}, options), { isDirectory: true }))];
|
|
11943
|
-
case 1: return [2 /*return*/, new (_a.apply(LrMutation, [void 0, (_b.variables = _c.sent(),
|
|
11944
|
-
_b)]))()];
|
|
11945
|
-
}
|
|
11946
|
-
});
|
|
11947
|
-
});
|
|
11948
|
-
};
|
|
11949
|
-
TrustedPartyService.prototype.shareFile = function (options) {
|
|
11950
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
11951
|
-
return __generator(this, function (_a) {
|
|
11952
|
-
return [2 /*return*/, this.mutate(this.shareFileMutation(options))];
|
|
11953
|
-
});
|
|
11954
|
-
});
|
|
11955
|
-
};
|
|
11956
|
-
TrustedPartyService.prototype.shareFileMutation = function (options) {
|
|
11957
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
11958
|
-
var _a, _b;
|
|
11959
|
-
return __generator(this, function (_c) {
|
|
11960
|
-
switch (_c.label) {
|
|
11961
|
-
case 0:
|
|
11962
|
-
_a = LrMutation.bind;
|
|
11963
|
-
_b = {
|
|
11964
|
-
mutation: ShareFileMutation
|
|
11965
|
-
};
|
|
11966
|
-
return [4 /*yield*/, this.prepareShareItemMutation(Object.assign(Object.assign({}, options), { isDirectory: false }))];
|
|
11967
|
-
case 1: return [2 /*return*/, new (_a.apply(LrMutation, [void 0, (_b.variables = _c.sent(),
|
|
11968
|
-
_b)]))()];
|
|
11969
|
-
}
|
|
11970
|
-
});
|
|
11971
|
-
});
|
|
11972
|
-
};
|
|
11973
|
-
TrustedPartyService.prototype.prepareShareItemMutation = function (options) {
|
|
11974
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
11975
|
-
var itemId, itemKeyId, tpId, tpSharedKeyId, accessRole, isDirectory, itemKey, wrappingKey, wrappedKey;
|
|
11976
|
-
var _this = this;
|
|
11977
|
-
return __generator(this, function (_a) {
|
|
11978
|
-
switch (_a.label) {
|
|
11979
|
-
case 0:
|
|
11980
|
-
itemId = options.itemId, itemKeyId = options.itemKeyId, tpId = options.tpId, tpSharedKeyId = options.tpSharedKeyId, accessRole = options.accessRole, isDirectory = options.isDirectory;
|
|
11981
|
-
return [4 /*yield*/, this.keyGraph.getKey(itemKeyId, function () { return isDirectory
|
|
11982
|
-
? _this.itemService.getDirectoryKeyId(itemId)
|
|
11983
|
-
: _this.itemService.getFileKeyId(itemId); })];
|
|
11984
|
-
case 1:
|
|
11985
|
-
itemKey = _a.sent();
|
|
11986
|
-
return [4 /*yield*/, this.keyGraph.getKey(tpSharedKeyId, function () { return _this.getTpCurrentUserSharedKey(tpId).then(function (res) { return res.sharedKey.id; }); })];
|
|
11987
|
-
case 2:
|
|
11988
|
-
wrappingKey = _a.sent();
|
|
11989
|
-
return [4 /*yield*/, this.keyGraph.wrapKey(wrappingKey, itemKey.jwk)];
|
|
11990
|
-
case 3:
|
|
11991
|
-
wrappedKey = _a.sent();
|
|
11992
|
-
return [2 /*return*/, {
|
|
11993
|
-
input: {
|
|
11994
|
-
id: itemId,
|
|
11995
|
-
tpId: tpId,
|
|
11996
|
-
accessRole: accessRole,
|
|
11997
|
-
keyId: itemKey.id,
|
|
11998
|
-
wrappingKeyId: wrappingKey.id,
|
|
11999
|
-
wrappedKey: wrappedKey,
|
|
12000
|
-
},
|
|
12001
|
-
}];
|
|
12002
|
-
}
|
|
12003
|
-
});
|
|
12004
|
-
});
|
|
12005
|
-
};
|
|
12006
|
-
TrustedPartyService.prototype.unshareDirectory = function (options) {
|
|
12007
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
12008
|
-
return __generator(this, function (_a) {
|
|
12009
|
-
return [2 /*return*/, this.mutate(this.unshareDirectoryMutation(options))];
|
|
12010
|
-
});
|
|
12011
|
-
});
|
|
12012
|
-
};
|
|
12013
|
-
TrustedPartyService.prototype.unshareDirectoryMutation = function (options) {
|
|
12014
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
12015
|
-
return __generator(this, function (_a) {
|
|
12016
|
-
return [2 /*return*/, this.unshareItemMutation(Object.assign(Object.assign({}, options), { isDirectory: true }))];
|
|
12017
|
-
});
|
|
12018
|
-
});
|
|
12019
|
-
};
|
|
12020
|
-
TrustedPartyService.prototype.unshareFile = function (options) {
|
|
12021
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
12022
|
-
return __generator(this, function (_a) {
|
|
12023
|
-
return [2 /*return*/, this.mutate(this.unshareFileMutation(options))];
|
|
12024
|
-
});
|
|
12025
|
-
});
|
|
12026
|
-
};
|
|
12027
|
-
TrustedPartyService.prototype.unshareFileMutation = function (options) {
|
|
12028
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
12029
|
-
return __generator(this, function (_a) {
|
|
12030
|
-
return [2 /*return*/, this.unshareItemMutation(Object.assign(Object.assign({}, options), { isDirectory: false }))];
|
|
12031
|
-
});
|
|
12032
|
-
});
|
|
12033
|
-
};
|
|
12034
|
-
TrustedPartyService.prototype.unshareItemMutation = function (_a) {
|
|
12035
|
-
var itemId = _a.itemId, tpId = _a.tpId, isDirectory = _a.isDirectory;
|
|
12036
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
12037
|
-
return __generator(this, function (_a) {
|
|
12038
|
-
return [2 /*return*/, new LrMutation({
|
|
12039
|
-
mutation: isDirectory ? UnshareDirectoryMutation : UnshareFileMutation,
|
|
12040
|
-
variables: {
|
|
12041
|
-
input: {
|
|
12042
|
-
id: itemId,
|
|
12043
|
-
tpId: tpId,
|
|
12044
|
-
},
|
|
12045
|
-
},
|
|
12046
|
-
})];
|
|
12047
|
-
});
|
|
12048
|
-
});
|
|
12049
|
-
};
|
|
12050
11921
|
TrustedPartyService.prototype.createDirectoryShare = function (options) {
|
|
12051
11922
|
return __awaiter(this, void 0, void 0, function () {
|
|
12052
11923
|
return __generator(this, function (_a) {
|
|
@@ -12064,7 +11935,7 @@
|
|
|
12064
11935
|
_b = {
|
|
12065
11936
|
mutation: CreateDirectoryShareMutation
|
|
12066
11937
|
};
|
|
12067
|
-
return [4 /*yield*/, this.
|
|
11938
|
+
return [4 /*yield*/, this.prepareCreateItemShareMutation(Object.assign(Object.assign({}, options), { isDirectory: true }))];
|
|
12068
11939
|
case 1: return [2 /*return*/, new (_a.apply(LrMutation, [void 0, (_b.variables = _c.sent(),
|
|
12069
11940
|
_b)]))()];
|
|
12070
11941
|
}
|
|
@@ -12088,14 +11959,14 @@
|
|
|
12088
11959
|
_b = {
|
|
12089
11960
|
mutation: CreateFileShareMutation
|
|
12090
11961
|
};
|
|
12091
|
-
return [4 /*yield*/, this.
|
|
11962
|
+
return [4 /*yield*/, this.prepareCreateItemShareMutation(Object.assign(Object.assign({}, options), { isDirectory: false }))];
|
|
12092
11963
|
case 1: return [2 /*return*/, new (_a.apply(LrMutation, [void 0, (_b.variables = _c.sent(),
|
|
12093
11964
|
_b)]))()];
|
|
12094
11965
|
}
|
|
12095
11966
|
});
|
|
12096
11967
|
});
|
|
12097
11968
|
};
|
|
12098
|
-
TrustedPartyService.prototype.
|
|
11969
|
+
TrustedPartyService.prototype.prepareCreateItemShareMutation = function (options) {
|
|
12099
11970
|
return __awaiter(this, void 0, void 0, function () {
|
|
12100
11971
|
var itemId, itemKeyId, tpId, tpSharedKeyId, accessRole, isDirectory, shareType, itemKey, wrappingKey, wrappedKey;
|
|
12101
11972
|
var _this = this;
|
|
@@ -12103,13 +11974,11 @@
|
|
|
12103
11974
|
switch (_a.label) {
|
|
12104
11975
|
case 0:
|
|
12105
11976
|
itemId = options.itemId, itemKeyId = options.itemKeyId, tpId = options.tpId, tpSharedKeyId = options.tpSharedKeyId, accessRole = options.accessRole, isDirectory = options.isDirectory, shareType = options.shareType;
|
|
12106
|
-
console.log('createSharedItemMutation()', itemKeyId);
|
|
12107
11977
|
return [4 /*yield*/, this.keyGraph.getKey(itemKeyId, function () { return isDirectory
|
|
12108
11978
|
? _this.itemService.getDirectoryKeyId(itemId)
|
|
12109
11979
|
: _this.itemService.getFileKeyId(itemId); })];
|
|
12110
11980
|
case 1:
|
|
12111
11981
|
itemKey = _a.sent();
|
|
12112
|
-
console.log('createSharedItemMutation()', itemKey.id);
|
|
12113
11982
|
return [4 /*yield*/, this.keyGraph.getKey(tpSharedKeyId, function () { return _this.getTpCurrentUserSharedKey(tpId).then(function (res) { return res.sharedKey.id; }); })];
|
|
12114
11983
|
case 2:
|
|
12115
11984
|
wrappingKey = _a.sent();
|
|
@@ -12143,7 +12012,7 @@
|
|
|
12143
12012
|
return __generator(this, function (_a) {
|
|
12144
12013
|
return [2 /*return*/, new LrMutation({
|
|
12145
12014
|
mutation: UpdateDirectoryShareMutation,
|
|
12146
|
-
variables: this.
|
|
12015
|
+
variables: this.prepareUpdateItemShareMutation(options),
|
|
12147
12016
|
})];
|
|
12148
12017
|
});
|
|
12149
12018
|
});
|
|
@@ -12160,16 +12029,16 @@
|
|
|
12160
12029
|
return __generator(this, function (_a) {
|
|
12161
12030
|
return [2 /*return*/, new LrMutation({
|
|
12162
12031
|
mutation: UpdateFileShareMutation,
|
|
12163
|
-
variables: this.
|
|
12032
|
+
variables: this.prepareUpdateItemShareMutation(options),
|
|
12164
12033
|
})];
|
|
12165
12034
|
});
|
|
12166
12035
|
});
|
|
12167
12036
|
};
|
|
12168
|
-
TrustedPartyService.prototype.
|
|
12169
|
-
var
|
|
12037
|
+
TrustedPartyService.prototype.prepareUpdateItemShareMutation = function (options) {
|
|
12038
|
+
var itemShareId = options.itemShareId, accessRole = options.accessRole;
|
|
12170
12039
|
return {
|
|
12171
12040
|
input: {
|
|
12172
|
-
id:
|
|
12041
|
+
id: itemShareId,
|
|
12173
12042
|
accessRole: accessRole,
|
|
12174
12043
|
},
|
|
12175
12044
|
};
|
|
@@ -12212,7 +12081,7 @@
|
|
|
12212
12081
|
_b = {
|
|
12213
12082
|
mutation: CompleteDetachedDirectoryShareMutation
|
|
12214
12083
|
};
|
|
12215
|
-
return [4 /*yield*/, this.
|
|
12084
|
+
return [4 /*yield*/, this.prepareCompleteDetachedItemShareMutation(Object.assign(Object.assign({}, options), { isDirectory: true }))];
|
|
12216
12085
|
case 1: return [2 /*return*/, new (_a.apply(LrMutation, [void 0, (_b.variables = _c.sent(),
|
|
12217
12086
|
_b)]))()];
|
|
12218
12087
|
}
|
|
@@ -12236,24 +12105,24 @@
|
|
|
12236
12105
|
_b = {
|
|
12237
12106
|
mutation: CompleteDetachedFileShareMutation
|
|
12238
12107
|
};
|
|
12239
|
-
return [4 /*yield*/, this.
|
|
12108
|
+
return [4 /*yield*/, this.prepareCompleteDetachedItemShareMutation(Object.assign(Object.assign({}, options), { isDirectory: false }))];
|
|
12240
12109
|
case 1: return [2 /*return*/, new (_a.apply(LrMutation, [void 0, (_b.variables = _c.sent(),
|
|
12241
12110
|
_b)]))()];
|
|
12242
12111
|
}
|
|
12243
12112
|
});
|
|
12244
12113
|
});
|
|
12245
12114
|
};
|
|
12246
|
-
TrustedPartyService.prototype.
|
|
12115
|
+
TrustedPartyService.prototype.prepareCompleteDetachedItemShareMutation = function (options) {
|
|
12247
12116
|
return __awaiter(this, void 0, void 0, function () {
|
|
12248
|
-
var
|
|
12117
|
+
var itemShareId, itemKeyId, isDirectory, itemKey, rootKey, wrappedKey;
|
|
12249
12118
|
var _this = this;
|
|
12250
12119
|
return __generator(this, function (_a) {
|
|
12251
12120
|
switch (_a.label) {
|
|
12252
12121
|
case 0:
|
|
12253
|
-
|
|
12122
|
+
itemShareId = options.itemShareId, itemKeyId = options.itemKeyId, isDirectory = options.isDirectory;
|
|
12254
12123
|
return [4 /*yield*/, this.keyGraph.getKey(itemKeyId, function () { return isDirectory
|
|
12255
|
-
? _this.itemService.getDirectoryKeyIdFromDirectoryShare(
|
|
12256
|
-
: _this.itemService.getFileKeyIdFromFileShare(
|
|
12124
|
+
? _this.itemService.getDirectoryKeyIdFromDirectoryShare(itemShareId)
|
|
12125
|
+
: _this.itemService.getFileKeyIdFromFileShare(itemShareId); })];
|
|
12257
12126
|
case 1:
|
|
12258
12127
|
itemKey = _a.sent();
|
|
12259
12128
|
rootKey = this.keyService.currentRootKey;
|
|
@@ -12262,7 +12131,7 @@
|
|
|
12262
12131
|
wrappedKey = _a.sent();
|
|
12263
12132
|
return [2 /*return*/, {
|
|
12264
12133
|
input: {
|
|
12265
|
-
id:
|
|
12134
|
+
id: itemShareId,
|
|
12266
12135
|
keyId: itemKey.id,
|
|
12267
12136
|
wrappingKeyId: rootKey.id,
|
|
12268
12137
|
wrappedKey: wrappedKey,
|