@lifeready/core 1.1.26 → 4.0.1

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.
@@ -14765,18 +14765,32 @@
14765
14765
  TrustedParty2Service.prototype.shareDirectory = function (options) {
14766
14766
  return __awaiter(this, void 0, void 0, function () {
14767
14767
  return __generator(this, function (_a) {
14768
- return [2 /*return*/, this.shareItem(Object.assign(Object.assign({}, options), { isDirectory: true }))];
14768
+ return [2 /*return*/, this.mutate(this.shareDirectoryMutation(options))];
14769
+ });
14770
+ });
14771
+ };
14772
+ TrustedParty2Service.prototype.shareDirectoryMutation = function (options) {
14773
+ return __awaiter(this, void 0, void 0, function () {
14774
+ return __generator(this, function (_a) {
14775
+ return [2 /*return*/, this.shareItemMutation(Object.assign(Object.assign({}, options), { isDirectory: true }))];
14769
14776
  });
14770
14777
  });
14771
14778
  };
14772
14779
  TrustedParty2Service.prototype.shareFile = function (options) {
14773
14780
  return __awaiter(this, void 0, void 0, function () {
14774
14781
  return __generator(this, function (_a) {
14775
- return [2 /*return*/, this.shareItem(Object.assign(Object.assign({}, options), { isDirectory: false }))];
14782
+ return [2 /*return*/, this.mutate(this.shareFileMutation(options))];
14776
14783
  });
14777
14784
  });
14778
14785
  };
14779
- TrustedParty2Service.prototype.shareItem = function (_a) {
14786
+ TrustedParty2Service.prototype.shareFileMutation = function (options) {
14787
+ return __awaiter(this, void 0, void 0, function () {
14788
+ return __generator(this, function (_a) {
14789
+ return [2 /*return*/, this.shareItemMutation(Object.assign(Object.assign({}, options), { isDirectory: false }))];
14790
+ });
14791
+ });
14792
+ };
14793
+ TrustedParty2Service.prototype.shareItemMutation = function (_a) {
14780
14794
  var itemId = _a.itemId, itemKeyId = _a.itemKeyId, tpId = _a.tpId, tpSharedKeyId = _a.tpSharedKeyId, accessRole = _a.accessRole, isDirectory = _a.isDirectory;
14781
14795
  return __awaiter(this, void 0, void 0, function () {
14782
14796
  var itemKey, wrappingKey, wrappedKey;
@@ -14814,14 +14828,44 @@
14814
14828
  TrustedParty2Service.prototype.unshareDirectory = function (options) {
14815
14829
  return __awaiter(this, void 0, void 0, function () {
14816
14830
  return __generator(this, function (_a) {
14817
- return [2 /*return*/, this.unshareItem(Object.assign(Object.assign({}, options), { isDirectory: true }))];
14831
+ return [2 /*return*/, this.mutate(this.unshareDirectoryMutation(options))];
14832
+ });
14833
+ });
14834
+ };
14835
+ TrustedParty2Service.prototype.unshareDirectoryMutation = function (options) {
14836
+ return __awaiter(this, void 0, void 0, function () {
14837
+ return __generator(this, function (_a) {
14838
+ return [2 /*return*/, this.unshareItemMutation(Object.assign(Object.assign({}, options), { isDirectory: true }))];
14818
14839
  });
14819
14840
  });
14820
14841
  };
14821
14842
  TrustedParty2Service.prototype.unshareFile = function (options) {
14822
14843
  return __awaiter(this, void 0, void 0, function () {
14823
14844
  return __generator(this, function (_a) {
14824
- return [2 /*return*/, this.unshareItem(Object.assign(Object.assign({}, options), { isDirectory: false }))];
14845
+ return [2 /*return*/, this.mutate(this.unshareFileMutation(options))];
14846
+ });
14847
+ });
14848
+ };
14849
+ TrustedParty2Service.prototype.unshareFileMutation = function (options) {
14850
+ return __awaiter(this, void 0, void 0, function () {
14851
+ return __generator(this, function (_a) {
14852
+ return [2 /*return*/, this.unshareItemMutation(Object.assign(Object.assign({}, options), { isDirectory: false }))];
14853
+ });
14854
+ });
14855
+ };
14856
+ TrustedParty2Service.prototype.unshareItemMutation = function (_a) {
14857
+ var itemId = _a.itemId, tpId = _a.tpId, isDirectory = _a.isDirectory;
14858
+ return __awaiter(this, void 0, void 0, function () {
14859
+ return __generator(this, function (_a) {
14860
+ return [2 /*return*/, new LrMutation({
14861
+ mutation: isDirectory ? UnshareDirectoryMutation : UnshareFileMutation,
14862
+ variables: {
14863
+ input: {
14864
+ id: itemId,
14865
+ tpId: tpId,
14866
+ },
14867
+ },
14868
+ })];
14825
14869
  });
14826
14870
  });
14827
14871
  };
@@ -14988,22 +15032,6 @@
14988
15032
  });
14989
15033
  });
14990
15034
  };
14991
- TrustedParty2Service.prototype.unshareItem = function (_a) {
14992
- var itemId = _a.itemId, tpId = _a.tpId, isDirectory = _a.isDirectory;
14993
- return __awaiter(this, void 0, void 0, function () {
14994
- return __generator(this, function (_a) {
14995
- return [2 /*return*/, new LrMutation({
14996
- mutation: isDirectory ? UnshareDirectoryMutation : UnshareFileMutation,
14997
- variables: {
14998
- input: {
14999
- id: itemId,
15000
- tpId: tpId,
15001
- },
15002
- },
15003
- })];
15004
- });
15005
- });
15006
- };
15007
15035
  return TrustedParty2Service;
15008
15036
  }(LrService));
15009
15037
  exports.TrustedParty2Service.ɵprov = i0.ɵɵdefineInjectable({ factory: function TrustedParty2Service_Factory() { return new exports.TrustedParty2Service(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(KeyGraphService), i0.ɵɵinject(exports.Item2Service), i0.ɵɵinject(KeyService), i0.ɵɵinject(KeyFactoryService), i0.ɵɵinject(EncryptionService)); }, token: exports.TrustedParty2Service, providedIn: "root" });