@lifeready/core 8.0.3 → 8.0.4

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.
@@ -12064,7 +12064,7 @@
12064
12064
  _b = {
12065
12065
  mutation: CreateDirectoryShareMutation
12066
12066
  };
12067
- return [4 /*yield*/, this.prepareCreateSharedItemMutation(Object.assign(Object.assign({}, options), { isDirectory: true }))];
12067
+ return [4 /*yield*/, this.prepareCreateItemShareMutation(Object.assign(Object.assign({}, options), { isDirectory: true }))];
12068
12068
  case 1: return [2 /*return*/, new (_a.apply(LrMutation, [void 0, (_b.variables = _c.sent(),
12069
12069
  _b)]))()];
12070
12070
  }
@@ -12088,14 +12088,14 @@
12088
12088
  _b = {
12089
12089
  mutation: CreateFileShareMutation
12090
12090
  };
12091
- return [4 /*yield*/, this.prepareCreateSharedItemMutation(Object.assign(Object.assign({}, options), { isDirectory: false }))];
12091
+ return [4 /*yield*/, this.prepareCreateItemShareMutation(Object.assign(Object.assign({}, options), { isDirectory: false }))];
12092
12092
  case 1: return [2 /*return*/, new (_a.apply(LrMutation, [void 0, (_b.variables = _c.sent(),
12093
12093
  _b)]))()];
12094
12094
  }
12095
12095
  });
12096
12096
  });
12097
12097
  };
12098
- TrustedPartyService.prototype.prepareCreateSharedItemMutation = function (options) {
12098
+ TrustedPartyService.prototype.prepareCreateItemShareMutation = function (options) {
12099
12099
  return __awaiter(this, void 0, void 0, function () {
12100
12100
  var itemId, itemKeyId, tpId, tpSharedKeyId, accessRole, isDirectory, shareType, itemKey, wrappingKey, wrappedKey;
12101
12101
  var _this = this;
@@ -12103,13 +12103,11 @@
12103
12103
  switch (_a.label) {
12104
12104
  case 0:
12105
12105
  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
12106
  return [4 /*yield*/, this.keyGraph.getKey(itemKeyId, function () { return isDirectory
12108
12107
  ? _this.itemService.getDirectoryKeyId(itemId)
12109
12108
  : _this.itemService.getFileKeyId(itemId); })];
12110
12109
  case 1:
12111
12110
  itemKey = _a.sent();
12112
- console.log('createSharedItemMutation()', itemKey.id);
12113
12111
  return [4 /*yield*/, this.keyGraph.getKey(tpSharedKeyId, function () { return _this.getTpCurrentUserSharedKey(tpId).then(function (res) { return res.sharedKey.id; }); })];
12114
12112
  case 2:
12115
12113
  wrappingKey = _a.sent();
@@ -12143,7 +12141,7 @@
12143
12141
  return __generator(this, function (_a) {
12144
12142
  return [2 /*return*/, new LrMutation({
12145
12143
  mutation: UpdateDirectoryShareMutation,
12146
- variables: this.prepareUpdateSharedItemMutation(options),
12144
+ variables: this.prepareUpdateItemShareMutation(options),
12147
12145
  })];
12148
12146
  });
12149
12147
  });
@@ -12160,16 +12158,16 @@
12160
12158
  return __generator(this, function (_a) {
12161
12159
  return [2 /*return*/, new LrMutation({
12162
12160
  mutation: UpdateFileShareMutation,
12163
- variables: this.prepareUpdateSharedItemMutation(options),
12161
+ variables: this.prepareUpdateItemShareMutation(options),
12164
12162
  })];
12165
12163
  });
12166
12164
  });
12167
12165
  };
12168
- TrustedPartyService.prototype.prepareUpdateSharedItemMutation = function (options) {
12169
- var sharedItemId = options.sharedItemId, accessRole = options.accessRole;
12166
+ TrustedPartyService.prototype.prepareUpdateItemShareMutation = function (options) {
12167
+ var itemShareId = options.itemShareId, accessRole = options.accessRole;
12170
12168
  return {
12171
12169
  input: {
12172
- id: sharedItemId,
12170
+ id: itemShareId,
12173
12171
  accessRole: accessRole,
12174
12172
  },
12175
12173
  };
@@ -12212,7 +12210,7 @@
12212
12210
  _b = {
12213
12211
  mutation: CompleteDetachedDirectoryShareMutation
12214
12212
  };
12215
- return [4 /*yield*/, this.prepareCompleteDetachedSharedItemMutation(Object.assign(Object.assign({}, options), { isDirectory: true }))];
12213
+ return [4 /*yield*/, this.prepareCompleteDetachedItemShareMutation(Object.assign(Object.assign({}, options), { isDirectory: true }))];
12216
12214
  case 1: return [2 /*return*/, new (_a.apply(LrMutation, [void 0, (_b.variables = _c.sent(),
12217
12215
  _b)]))()];
12218
12216
  }
@@ -12236,24 +12234,24 @@
12236
12234
  _b = {
12237
12235
  mutation: CompleteDetachedFileShareMutation
12238
12236
  };
12239
- return [4 /*yield*/, this.prepareCompleteDetachedSharedItemMutation(Object.assign(Object.assign({}, options), { isDirectory: false }))];
12237
+ return [4 /*yield*/, this.prepareCompleteDetachedItemShareMutation(Object.assign(Object.assign({}, options), { isDirectory: false }))];
12240
12238
  case 1: return [2 /*return*/, new (_a.apply(LrMutation, [void 0, (_b.variables = _c.sent(),
12241
12239
  _b)]))()];
12242
12240
  }
12243
12241
  });
12244
12242
  });
12245
12243
  };
12246
- TrustedPartyService.prototype.prepareCompleteDetachedSharedItemMutation = function (options) {
12244
+ TrustedPartyService.prototype.prepareCompleteDetachedItemShareMutation = function (options) {
12247
12245
  return __awaiter(this, void 0, void 0, function () {
12248
- var sharedItemId, itemKeyId, isDirectory, itemKey, rootKey, wrappedKey;
12246
+ var itemShareId, itemKeyId, isDirectory, itemKey, rootKey, wrappedKey;
12249
12247
  var _this = this;
12250
12248
  return __generator(this, function (_a) {
12251
12249
  switch (_a.label) {
12252
12250
  case 0:
12253
- sharedItemId = options.sharedItemId, itemKeyId = options.itemKeyId, isDirectory = options.isDirectory;
12251
+ itemShareId = options.itemShareId, itemKeyId = options.itemKeyId, isDirectory = options.isDirectory;
12254
12252
  return [4 /*yield*/, this.keyGraph.getKey(itemKeyId, function () { return isDirectory
12255
- ? _this.itemService.getDirectoryKeyIdFromDirectoryShare(sharedItemId)
12256
- : _this.itemService.getFileKeyIdFromFileShare(sharedItemId); })];
12253
+ ? _this.itemService.getDirectoryKeyIdFromDirectoryShare(itemShareId)
12254
+ : _this.itemService.getFileKeyIdFromFileShare(itemShareId); })];
12257
12255
  case 1:
12258
12256
  itemKey = _a.sent();
12259
12257
  rootKey = this.keyService.currentRootKey;
@@ -12262,7 +12260,7 @@
12262
12260
  wrappedKey = _a.sent();
12263
12261
  return [2 /*return*/, {
12264
12262
  input: {
12265
- id: sharedItemId,
12263
+ id: itemShareId,
12266
12264
  keyId: itemKey.id,
12267
12265
  wrappingKeyId: rootKey.id,
12268
12266
  wrappedKey: wrappedKey,