@lifeready/core 1.0.19 → 1.0.21

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.
Files changed (30) hide show
  1. package/bundles/lifeready-core.umd.js +157 -128
  2. package/bundles/lifeready-core.umd.js.map +1 -1
  3. package/bundles/lifeready-core.umd.min.js +1 -1
  4. package/bundles/lifeready-core.umd.min.js.map +1 -1
  5. package/esm2015/lib/api/key-exchange.types.js +1 -1
  6. package/esm2015/lib/api/message.service.js +1 -1
  7. package/esm2015/lib/api/types/lr-graphql.types.js +18 -9
  8. package/esm2015/lib/auth/auth.gql.js +1 -6
  9. package/esm2015/lib/auth/password.service.js +3 -8
  10. package/esm2015/lib/items2/item2.gql.js +10 -22
  11. package/esm2015/lib/items2/item2.gql.private.js +23 -0
  12. package/esm2015/lib/items2/item2.service.js +19 -2
  13. package/esm2015/lib/items2/item2.types.js +1 -1
  14. package/esm2015/lib/scenario/scenario.service.js +1 -2
  15. package/esm2015/lib/trusted-parties/tp-assembly.js +8 -5
  16. package/esm2015/lib/trusted-parties/tp-assembly.types.js +1 -1
  17. package/esm2015/lib/trusted-parties/tp-password-reset.service.js +1 -1
  18. package/fesm2015/lifeready-core.js +73 -46
  19. package/fesm2015/lifeready-core.js.map +1 -1
  20. package/lib/api/key-exchange.types.d.ts +2 -2
  21. package/lib/api/message.service.d.ts +5 -4
  22. package/lib/api/types/lr-graphql.types.d.ts +18 -2
  23. package/lib/items2/item2.gql.d.ts +8 -18
  24. package/lib/items2/item2.gql.private.d.ts +19 -0
  25. package/lib/items2/item2.service.d.ts +8 -1
  26. package/lib/items2/item2.types.d.ts +9 -5
  27. package/lib/trusted-parties/tp-assembly.types.d.ts +5 -3
  28. package/lib/trusted-parties/tp-password-reset.service.d.ts +3 -3
  29. package/lifeready-core.metadata.json +1 -1
  30. package/package.json +1 -1
@@ -3230,7 +3230,7 @@
3230
3230
  return gql.apply(void 0, __spread([literals], placeholders));
3231
3231
  }
3232
3232
 
3233
- var PasswordChangeRequestMutation = gql(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject(["\n mutation {\n passwordChangeRequest(input: {}) {\n challenge\n passKeys {\n id\n passIdpParams\n wrappedPassIdpVerifierPrk\n }\n }\n }\n"], ["\n mutation {\n passwordChangeRequest(input: {}) {\n challenge\n passKeys {\n id\n passIdpParams\n wrappedPassIdpVerifierPrk\n }\n }\n }\n"])));
3233
+ var PasswordChangeRequestMutation = gql(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject(["\n mutation {\n passwordChangeRequest(input: {}) {\n challenge\n }\n }\n"], ["\n mutation {\n passwordChangeRequest(input: {}) {\n challenge\n }\n }\n"])));
3234
3234
  var PasswordChangeMutation = gql(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject(["\n mutation PasswordChange($input: PasswordChangeInput!) {\n passwordChange(input: $input) {\n token\n newPassKey {\n id\n }\n }\n }\n"], ["\n mutation PasswordChange($input: PasswordChangeInput!) {\n passwordChange(input: $input) {\n token\n newPassKey {\n id\n }\n }\n }\n"])));
3235
3235
  var PasswordChangeConfigQuery = gql(templateObject_3$5 || (templateObject_3$5 = __makeTemplateObject(["\n query PasswordChangeConfigQuery {\n passwordChangeConfig {\n maxAuthAgeSeconds\n authTime\n serverTime\n }\n }\n"], ["\n query PasswordChangeConfigQuery {\n passwordChangeConfig {\n maxAuthAgeSeconds\n authTime\n serverTime\n }\n }\n"])));
3236
3236
  var SetSessionEncryptionKeyMutation = gqlTyped(templateObject_4$4 || (templateObject_4$4 = __makeTemplateObject(["\nmutation SetSessionEncryptionKeyMutation($input: SetSessionEncryptionKeyInput!) {\n setSessionEncryptionKey(input: $input) {\n sessionEncryptionKey\n }\n}\n"], ["\nmutation SetSessionEncryptionKeyMutation($input: SetSessionEncryptionKeyInput!) {\n setSessionEncryptionKey(input: $input) {\n sessionEncryptionKey\n }\n}\n"])));
@@ -3613,12 +3613,6 @@
3613
3613
  case 0: return [4 /*yield*/, this.auth.currentAuthenticatedUser()];
3614
3614
  case 1:
3615
3615
  cognitoUser = _c.sent();
3616
- // Validation
3617
- // todo: Add this back in
3618
- // Note the passIdp will always have a random salt, so will always be different to the current passIdp.
3619
- if (password === newPassword) {
3620
- throw new LrBadArgumentException('New password is the same as the current one.');
3621
- }
3622
3616
  return [4 /*yield*/, this.profileService.getCurrentUser()];
3623
3617
  case 2:
3624
3618
  currentUser = (_c.sent()).currentUser;
@@ -5209,13 +5203,13 @@
5209
5203
  AccessRoleMethod["inherited"] = "inherited";
5210
5204
  AccessRoleMethod["direct"] = "direct";
5211
5205
  })(exports.AccessRoleMethod || (exports.AccessRoleMethod = {}));
5212
- (function (FileVersionOperation) {
5213
- FileVersionOperation["CREATE"] = "CREATE";
5214
- FileVersionOperation["READ"] = "READ";
5215
- FileVersionOperation["UPDATE"] = "UPDATE";
5216
- FileVersionOperation["REVERT"] = "REVERT";
5217
- FileVersionOperation["DELETE"] = "DELETE";
5218
- })(exports.FileVersionOperation || (exports.FileVersionOperation = {}));
5206
+ (function (FileOperationField) {
5207
+ FileOperationField["CREATE"] = "CREATE";
5208
+ FileOperationField["READ"] = "READ";
5209
+ FileOperationField["UPDATE"] = "UPDATE";
5210
+ FileOperationField["REVERT"] = "REVERT";
5211
+ FileOperationField["DELETE"] = "DELETE";
5212
+ })(exports.FileOperationField || (exports.FileOperationField = {}));
5219
5213
  (function (KeyExchangeOtkState) {
5220
5214
  KeyExchangeOtkState["OTK_INITIATED"] = "OTK_INITIATED";
5221
5215
  KeyExchangeOtkState["OTK_ACCEPTED"] = "OTK_ACCEPTED";
@@ -5277,6 +5271,14 @@
5277
5271
  ClaimApproverState["APPROVED"] = "APPROVED";
5278
5272
  ClaimApproverState["REJECTED"] = "REJECTED";
5279
5273
  })(exports.ClaimApproverState || (exports.ClaimApproverState = {}));
5274
+ (function (ScenarioLastClaimState) {
5275
+ ScenarioLastClaimState["CLAIMED"] = "CLAIMED";
5276
+ ScenarioLastClaimState["APPROVED"] = "APPROVED";
5277
+ ScenarioLastClaimState["REJECTED"] = "REJECTED";
5278
+ ScenarioLastClaimState["EXPIRED"] = "EXPIRED";
5279
+ ScenarioLastClaimState["CANCELLED"] = "CANCELLED";
5280
+ ScenarioLastClaimState["RESET"] = "RESET";
5281
+ })(exports.ScenarioLastClaimState || (exports.ScenarioLastClaimState = {}));
5280
5282
  (function (LinkTypeField) {
5281
5283
  LinkTypeField["HARD"] = "HARD";
5282
5284
  LinkTypeField["SOFT"] = "SOFT";
@@ -5525,8 +5527,8 @@
5525
5527
  TpAssemblyController.prototype.recoverAssemblyKey = function (partials) {
5526
5528
  return __awaiter(this, void 0, void 0, function () {
5527
5529
  var assemblyKeyParams, shares, rawAssemblyKey;
5528
- return __generator(this, function (_b) {
5529
- switch (_b.label) {
5530
+ return __generator(this, function (_c) {
5531
+ switch (_c.label) {
5530
5532
  case 0:
5531
5533
  shares = partials.map(function (partial) {
5532
5534
  if (assemblyKeyParams) {
@@ -5542,46 +5544,46 @@
5542
5544
  });
5543
5545
  return [4 /*yield*/, this.slip39Service.recoverSecret(shares, this.slip39Passphrase)];
5544
5546
  case 1:
5545
- rawAssemblyKey = _b.sent();
5547
+ rawAssemblyKey = _c.sent();
5546
5548
  return [4 /*yield*/, KeyFactoryService.asKey(Object.assign(Object.assign({}, assemblyKeyParams), { k: rawAssemblyKey }))];
5547
- case 2: return [2 /*return*/, _b.sent()];
5549
+ case 2: return [2 /*return*/, _c.sent()];
5548
5550
  }
5549
5551
  });
5550
5552
  });
5551
5553
  };
5552
5554
  TpAssemblyController.prototype.prepareTpWrappingKey = function (tp) {
5553
5555
  return __awaiter(this, void 0, void 0, function () {
5554
- return __generator(this, function (_b) {
5556
+ return __generator(this, function (_c) {
5555
5557
  return [2 /*return*/, this.keyGraph.getKey(tp.wrappingKeyId)];
5556
5558
  });
5557
5559
  });
5558
5560
  };
5559
- TpAssemblyController.prototype.prepareAssembly = function (_b) {
5560
- var subjectKey = _b.subjectKey, rootKey = _b.rootKey;
5561
+ TpAssemblyController.prototype.prepareAssembly = function (_c) {
5562
+ var subjectKey = _c.subjectKey, rootKey = _c.rootKey;
5561
5563
  return __awaiter(this, void 0, void 0, function () {
5562
5564
  var assemblyKey, _a, rawAssemblyKey, assemblyKeyParams, assemblyKeyVerifierPrk, wrappedAssemblyKeyVerifierPrk, assemblyKeyVerifierPbk, subjectKeyWrappedAssemblyKey, assemblyCipherData;
5563
- return __generator(this, function (_b) {
5564
- switch (_b.label) {
5565
+ return __generator(this, function (_c) {
5566
+ switch (_c.label) {
5565
5567
  case 0: return [4 /*yield*/, this.keyFactory.createKey()];
5566
5568
  case 1:
5567
- assemblyKey = _b.sent();
5569
+ assemblyKey = _c.sent();
5568
5570
  console.log('prepareAssembly assemblyKey', assemblyKey);
5569
5571
  _a = assemblyKey.toJSON(true), rawAssemblyKey = _a.k, assemblyKeyParams = __rest(_a, ["k"]);
5570
5572
  return [4 /*yield*/, this.keyFactory.createPkcSignKey()];
5571
5573
  case 2:
5572
- assemblyKeyVerifierPrk = _b.sent();
5574
+ assemblyKeyVerifierPrk = _c.sent();
5573
5575
  return [4 /*yield*/, this.encryptionService.encryptToString(assemblyKey, assemblyKeyVerifierPrk.toJSON(true))];
5574
5576
  case 3:
5575
- wrappedAssemblyKeyVerifierPrk = _b.sent();
5577
+ wrappedAssemblyKeyVerifierPrk = _c.sent();
5576
5578
  assemblyKeyVerifierPbk = JSON.stringify(assemblyKeyVerifierPrk.toJSON());
5577
5579
  return [4 /*yield*/, this.encryptionService.encryptToString(subjectKey, assemblyKey.toJSON(true))];
5578
5580
  case 4:
5579
- subjectKeyWrappedAssemblyKey = _b.sent();
5581
+ subjectKeyWrappedAssemblyKey = _c.sent();
5580
5582
  return [4 /*yield*/, this.encryptionService.encryptToString(assemblyKey, {
5581
5583
  rootKey: rootKey.toJSON(true),
5582
5584
  })];
5583
5585
  case 5:
5584
- assemblyCipherData = _b.sent();
5586
+ assemblyCipherData = _c.sent();
5585
5587
  return [2 /*return*/, {
5586
5588
  assemblyKey: assemblyKey,
5587
5589
  rawAssemblyKey: rawAssemblyKey,
@@ -5595,21 +5597,21 @@
5595
5597
  });
5596
5598
  });
5597
5599
  };
5598
- TpAssemblyController.prototype.prepareCreateSubAssemblies = function (_b) {
5599
- var input = _b.input, subjectKey = _b.subjectKey, slipSubAssemblies = _b.slipSubAssemblies, assemblyKeyParams = _b.assemblyKeyParams;
5600
+ TpAssemblyController.prototype.prepareCreateSubAssemblies = function (_c) {
5601
+ var input = _c.input, subjectKey = _c.subjectKey, slipSubAssemblies = _c.slipSubAssemblies, assemblyKeyParams = _c.assemblyKeyParams;
5600
5602
  return __awaiter(this, void 0, void 0, function () {
5601
5603
  var _this = this;
5602
- return __generator(this, function (_b) {
5604
+ return __generator(this, function (_c) {
5603
5605
  return [2 /*return*/, Promise.all(input.map(function (sa, saIndex) { return __awaiter(_this, void 0, void 0, function () {
5604
5606
  var subjectCipherData, createApprovers;
5605
5607
  var _this = this;
5606
- return __generator(this, function (_b) {
5607
- switch (_b.label) {
5608
+ return __generator(this, function (_c) {
5609
+ switch (_c.label) {
5608
5610
  case 0: return [4 /*yield*/, this.encryptionService.encryptToString(subjectKey, sa.subjectCipherDataClearJson || '')];
5609
5611
  case 1:
5610
- subjectCipherData = _b.sent();
5612
+ subjectCipherData = _c.sent();
5611
5613
  return [4 /*yield*/, Promise.all(sa.approverTps.map(function (approverTp, approverIndex) { return __awaiter(_this, void 0, void 0, function () {
5612
- return __generator(this, function (_b) {
5614
+ return __generator(this, function (_c) {
5613
5615
  return [2 /*return*/, this.prepareApprover({
5614
5616
  tp: approverTp,
5615
5617
  approverIndex: approverIndex,
@@ -5620,7 +5622,7 @@
5620
5622
  });
5621
5623
  }); }))];
5622
5624
  case 2:
5623
- createApprovers = _b.sent();
5625
+ createApprovers = _c.sent();
5624
5626
  return [2 /*return*/, {
5625
5627
  singleReject: sa.singleReject,
5626
5628
  quorum: sa.quorum,
@@ -5633,22 +5635,22 @@
5633
5635
  });
5634
5636
  });
5635
5637
  };
5636
- TpAssemblyController.prototype.prepareUpdateSubAssemblies = function (_b) {
5637
- var input = _b.input, subjectKey = _b.subjectKey, slipSubAssemblies = _b.slipSubAssemblies, assemblyKeyParams = _b.assemblyKeyParams, subAssemblies = _b.subAssemblies;
5638
+ TpAssemblyController.prototype.prepareUpdateSubAssemblies = function (_c) {
5639
+ var input = _c.input, subjectKey = _c.subjectKey, slipSubAssemblies = _c.slipSubAssemblies, assemblyKeyParams = _c.assemblyKeyParams, subAssemblies = _c.subAssemblies;
5638
5640
  return __awaiter(this, void 0, void 0, function () {
5639
5641
  var _this = this;
5640
- return __generator(this, function (_b) {
5642
+ return __generator(this, function (_c) {
5641
5643
  if (slipSubAssemblies.length !== input.length) {
5642
5644
  throw new LrBadArgumentException('The slipSubAssemblies must be the same length as the input');
5643
5645
  }
5644
5646
  return [2 /*return*/, Promise.all(input.map(function (sa, saIndex) { return __awaiter(_this, void 0, void 0, function () {
5645
- var subjectCipherData, existingSa, createApprovers, updateApprovers, slipSubAssembly, _b;
5647
+ var subjectCipherData, existingSa, createApprovers, updateApprovers, slipSubAssembly, _c;
5646
5648
  var _this = this;
5647
- return __generator(this, function (_c) {
5648
- switch (_c.label) {
5649
+ return __generator(this, function (_d) {
5650
+ switch (_d.label) {
5649
5651
  case 0: return [4 /*yield*/, this.encryptionService.encryptToString(subjectKey, sa.subjectCipherDataClearJson || '')];
5650
5652
  case 1:
5651
- subjectCipherData = _c.sent();
5653
+ subjectCipherData = _d.sent();
5652
5654
  existingSa = subAssemblies.edges.find(function (edge) { return edge.node.id === sa.id; }).node;
5653
5655
  createApprovers = [];
5654
5656
  updateApprovers = [];
@@ -5668,16 +5670,16 @@
5668
5670
  }
5669
5671
  });
5670
5672
  slipSubAssembly = slipSubAssemblies[saIndex];
5671
- _b = {
5673
+ _c = {
5672
5674
  subAssemblyId: sa.id,
5673
5675
  singleReject: sa.singleReject,
5674
5676
  quorum: sa.quorum,
5675
5677
  subjectCipherData: subjectCipherData
5676
5678
  };
5677
- return [4 /*yield*/, Promise.all(createApprovers.map(function (_b, approverIndex) {
5678
- var tp = _b.tp;
5679
+ return [4 /*yield*/, Promise.all(createApprovers.map(function (_c, approverIndex) {
5680
+ var tp = _c.tp;
5679
5681
  return __awaiter(_this, void 0, void 0, function () {
5680
- return __generator(this, function (_b) {
5682
+ return __generator(this, function (_c) {
5681
5683
  return [2 /*return*/, this.prepareApprover({
5682
5684
  tp: tp,
5683
5685
  approverIndex: approverIndex,
@@ -5689,11 +5691,11 @@
5689
5691
  });
5690
5692
  }))];
5691
5693
  case 2:
5692
- _b.createApprovers = _c.sent();
5693
- return [4 /*yield*/, Promise.all(updateApprovers.map(function (_b, approverIndex) {
5694
- var tp = _b.tp, approverId = _b.approverId;
5694
+ _c.createApprovers = _d.sent();
5695
+ return [4 /*yield*/, Promise.all(updateApprovers.map(function (_c, approverIndex) {
5696
+ var tp = _c.tp, approverId = _c.approverId;
5695
5697
  return __awaiter(_this, void 0, void 0, function () {
5696
- return __generator(this, function (_b) {
5698
+ return __generator(this, function (_c) {
5697
5699
  return [2 /*return*/, this.prepareApprover({
5698
5700
  approverId: approverId,
5699
5701
  tp: tp,
@@ -5705,8 +5707,8 @@
5705
5707
  });
5706
5708
  });
5707
5709
  }))];
5708
- case 3: return [2 /*return*/, (_b.updateApprovers = _c.sent(),
5709
- _b)];
5710
+ case 3: return [2 /*return*/, (_c.updateApprovers = _d.sent(),
5711
+ _c)];
5710
5712
  }
5711
5713
  });
5712
5714
  }); }))];
@@ -5736,29 +5738,29 @@
5736
5738
  };
5737
5739
  TpAssemblyController.prototype.prepareCreate = function (input) {
5738
5740
  return __awaiter(this, void 0, void 0, function () {
5739
- var rootKey, subjectKey, rootKeyWrappedSubjectKey, _a, assemblyKey, rawAssemblyKey, assemblyKeyParams, assemblyInput, slipAssembly, tpIds, tps, _b, createSubAssemblies;
5740
- return __generator(this, function (_c) {
5741
- switch (_c.label) {
5741
+ var rootKey, subjectKey, rootKeyWrappedSubjectKey, _a, assemblyKey, rawAssemblyKey, assemblyKeyParams, assemblyInput, slipAssembly, tpIds, tps, _c, createSubAssemblies, subjectCipherData;
5742
+ return __generator(this, function (_d) {
5743
+ switch (_d.label) {
5742
5744
  case 0: return [4 /*yield*/, this.keyService.getCurrentRootKey()];
5743
5745
  case 1:
5744
- rootKey = _c.sent();
5746
+ rootKey = _d.sent();
5745
5747
  return [4 /*yield*/, this.keyFactory.createKey()];
5746
5748
  case 2:
5747
- subjectKey = _c.sent();
5749
+ subjectKey = _d.sent();
5748
5750
  return [4 /*yield*/, this.keyGraph.wrapKey(rootKey, subjectKey)];
5749
5751
  case 3:
5750
- rootKeyWrappedSubjectKey = _c.sent();
5752
+ rootKeyWrappedSubjectKey = _d.sent();
5751
5753
  return [4 /*yield*/, this.prepareAssembly({
5752
5754
  rootKey: rootKey.jwk,
5753
5755
  subjectKey: subjectKey,
5754
5756
  })];
5755
5757
  case 4:
5756
- _a = _c.sent(), assemblyKey = _a.assemblyKey, rawAssemblyKey = _a.rawAssemblyKey, assemblyKeyParams = _a.assemblyKeyParams, assemblyInput = __rest(_a, ["assemblyKey", "rawAssemblyKey", "assemblyKeyParams"]);
5758
+ _a = _d.sent(), assemblyKey = _a.assemblyKey, rawAssemblyKey = _a.rawAssemblyKey, assemblyKeyParams = _a.assemblyKeyParams, assemblyInput = __rest(_a, ["assemblyKey", "rawAssemblyKey", "assemblyKeyParams"]);
5757
5759
  return [4 /*yield*/, this.prepareSlip39(input.createSubAssemblies, input.quorum, rawAssemblyKey)];
5758
5760
  case 5:
5759
- slipAssembly = _c.sent();
5761
+ slipAssembly = _d.sent();
5760
5762
  tpIds = this.getInputApprovers(input.createSubAssemblies);
5761
- _b = mapEdges;
5763
+ _c = mapEdges;
5762
5764
  return [4 /*yield*/, this.lrGraphQl.query({
5763
5765
  query: TpsKeysQuery,
5764
5766
  variables: {
@@ -5766,7 +5768,7 @@
5766
5768
  },
5767
5769
  })];
5768
5770
  case 6:
5769
- tps = _b.apply(void 0, [(_c.sent()).tps]);
5771
+ tps = _c.apply(void 0, [(_d.sent()).tps]);
5770
5772
  // Fill in wrappingKeyId if not present
5771
5773
  this.fillWrappingKeyId(input.createSubAssemblies, tps);
5772
5774
  return [4 /*yield*/, this.prepareCreateSubAssemblies({
@@ -5776,10 +5778,13 @@
5776
5778
  subjectKey: subjectKey,
5777
5779
  })];
5778
5780
  case 7:
5779
- createSubAssemblies = _c.sent();
5781
+ createSubAssemblies = _d.sent();
5782
+ return [4 /*yield*/, this.encryptionService.encryptToString(subjectKey, input.subjectCipherDataClearJson || '')];
5783
+ case 8:
5784
+ subjectCipherData = _d.sent();
5780
5785
  return [2 /*return*/, {
5781
5786
  assemblyKey: assemblyKey,
5782
- mutationInput: Object.assign(Object.assign({}, assemblyInput), { singleReject: input.singleReject, quorum: input.quorum, subjectCipherData: '', // TODO make this a parameter
5787
+ mutationInput: Object.assign(Object.assign({}, assemblyInput), { singleReject: input.singleReject, quorum: input.quorum, subjectCipherData: subjectCipherData,
5783
5788
  createSubAssemblies: createSubAssemblies, rootKeyId: rootKey.id, rootKeyWrappedSubjectKey: rootKeyWrappedSubjectKey }),
5784
5789
  }];
5785
5790
  }
@@ -5796,10 +5801,11 @@
5796
5801
  };
5797
5802
  TpAssemblyController.prototype.prepareUpdate = function (input, assembly // TODO type this to only what we need.
5798
5803
  ) {
5804
+ var _a;
5799
5805
  return __awaiter(this, void 0, void 0, function () {
5800
- var createSubAssembliesInput, updateSubAssembliesInput, deleteSubAssembliesInput, rootKey, subjectKey, _a, assemblyKey, rawAssemblyKey, assemblyKeyParams, assemblyInput, tpIds, tps, _b, slipAssembly, error_1, common, createSubAssemblies, updateSubAssemblies;
5801
- return __generator(this, function (_c) {
5802
- switch (_c.label) {
5806
+ var createSubAssembliesInput, updateSubAssembliesInput, deleteSubAssembliesInput, rootKey, subjectKey, _b, assemblyKey, rawAssemblyKey, assemblyKeyParams, assemblyInput, tpIds, tps, _c, slipAssembly, error_1, common, createSubAssemblies, updateSubAssemblies, subjectCipherData;
5807
+ return __generator(this, function (_d) {
5808
+ switch (_d.label) {
5803
5809
  case 0:
5804
5810
  input = Object.assign({ createSubAssemblies: [] }, input);
5805
5811
  createSubAssembliesInput = input.createSubAssemblies || [];
@@ -5813,18 +5819,18 @@
5813
5819
  }
5814
5820
  return [4 /*yield*/, this.keyService.getCurrentRootKey()];
5815
5821
  case 1:
5816
- rootKey = _c.sent();
5822
+ rootKey = _d.sent();
5817
5823
  return [4 /*yield*/, this.keyGraph.getKey(assembly.subjectKey.id)];
5818
5824
  case 2:
5819
- subjectKey = _c.sent();
5825
+ subjectKey = _d.sent();
5820
5826
  return [4 /*yield*/, this.prepareAssembly({
5821
5827
  rootKey: rootKey.jwk,
5822
5828
  subjectKey: subjectKey.jwk,
5823
5829
  })];
5824
5830
  case 3:
5825
- _a = _c.sent(), assemblyKey = _a.assemblyKey, rawAssemblyKey = _a.rawAssemblyKey, assemblyKeyParams = _a.assemblyKeyParams, assemblyInput = __rest(_a, ["assemblyKey", "rawAssemblyKey", "assemblyKeyParams"]);
5831
+ _b = _d.sent(), assemblyKey = _b.assemblyKey, rawAssemblyKey = _b.rawAssemblyKey, assemblyKeyParams = _b.assemblyKeyParams, assemblyInput = __rest(_b, ["assemblyKey", "rawAssemblyKey", "assemblyKeyParams"]);
5826
5832
  tpIds = this.getAssemblyApprovers(assembly).concat(this.getInputApprovers(createSubAssembliesInput), this.getInputApprovers(updateSubAssembliesInput));
5827
- _b = mapEdges;
5833
+ _c = mapEdges;
5828
5834
  return [4 /*yield*/, this.lrGraphQl.query({
5829
5835
  query: TpsKeysQuery,
5830
5836
  variables: {
@@ -5832,7 +5838,7 @@
5832
5838
  },
5833
5839
  })];
5834
5840
  case 4:
5835
- tps = _b.apply(void 0, [(_c.sent()).tps]);
5841
+ tps = _c.apply(void 0, [(_d.sent()).tps]);
5836
5842
  // Auto fill the updateSubAssemblies with existing sub assemblies if they are not
5837
5843
  // explicitly deleted.
5838
5844
  mapEdges(assembly.subAssemblies).forEach(function (existing) {
@@ -5862,15 +5868,15 @@
5862
5868
  // Fill in wrappingKeyId if not present
5863
5869
  this.fillWrappingKeyId(createSubAssembliesInput, tps);
5864
5870
  this.fillWrappingKeyId(updateSubAssembliesInput, tps);
5865
- _c.label = 5;
5871
+ _d.label = 5;
5866
5872
  case 5:
5867
- _c.trys.push([5, 7, , 8]);
5873
+ _d.trys.push([5, 7, , 8]);
5868
5874
  return [4 /*yield*/, this.prepareSlip39((createSubAssembliesInput || []).concat(updateSubAssembliesInput || []), input.quorum, rawAssemblyKey)];
5869
5875
  case 6:
5870
- slipAssembly = _c.sent();
5876
+ slipAssembly = _d.sent();
5871
5877
  return [3 /*break*/, 8];
5872
5878
  case 7:
5873
- error_1 = _c.sent();
5879
+ error_1 = _d.sent();
5874
5880
  // TODO this sometimes happens. Maybe missing await.
5875
5881
  console.log('Error while creating slip assembly', error_1);
5876
5882
  return [3 /*break*/, 8];
@@ -5883,39 +5889,42 @@
5883
5889
  // Need to match the slip sub assemblies to the input
5884
5890
  slipSubAssemblies: slipAssembly.subAssemblies.slice(0, createSubAssembliesInput.length) }))];
5885
5891
  case 9:
5886
- createSubAssemblies = _c.sent();
5892
+ createSubAssemblies = _d.sent();
5887
5893
  return [4 /*yield*/, this.prepareUpdateSubAssemblies(Object.assign(Object.assign({}, common), { input: updateSubAssembliesInput,
5888
5894
  // Add an offset to the sub assemblies to skip the one that are created.
5889
5895
  slipSubAssemblies: slipAssembly.subAssemblies.slice(createSubAssembliesInput.length), subAssemblies: assembly.subAssemblies }))];
5890
5896
  case 10:
5891
- updateSubAssemblies = _c.sent();
5897
+ updateSubAssemblies = _d.sent();
5898
+ return [4 /*yield*/, this.encryptionService.encryptToString(subjectKey.jwk, (_a = input.subjectCipherDataClearJson) !== null && _a !== void 0 ? _a : assembly.subjectCipherDataClearJson)];
5899
+ case 11:
5900
+ subjectCipherData = _d.sent();
5892
5901
  return [2 /*return*/, {
5893
5902
  assemblyKey: assemblyKey,
5894
- mutationInput: Object.assign(Object.assign({}, assemblyInput), { singleReject: input.singleReject, quorum: input.quorum, subjectCipherData: '', subjectKeyId: subjectKey.id, createSubAssemblies: createSubAssemblies,
5903
+ mutationInput: Object.assign(Object.assign({}, assemblyInput), { singleReject: input.singleReject, quorum: input.quorum, subjectCipherData: subjectCipherData, subjectKeyId: subjectKey.id, createSubAssemblies: createSubAssemblies,
5895
5904
  updateSubAssemblies: updateSubAssemblies }),
5896
5905
  }];
5897
5906
  }
5898
5907
  });
5899
5908
  });
5900
5909
  };
5901
- TpAssemblyController.prototype.prepareApprover = function (_b) {
5902
- var approverId = _b.approverId, tp = _b.tp, approverIndex = _b.approverIndex, slipSubAssembly = _b.slipSubAssembly, assemblyKeyParams = _b.assemblyKeyParams, subjectKey = _b.subjectKey;
5910
+ TpAssemblyController.prototype.prepareApprover = function (_c) {
5911
+ var approverId = _c.approverId, tp = _c.tp, approverIndex = _c.approverIndex, slipSubAssembly = _c.slipSubAssembly, assemblyKeyParams = _c.assemblyKeyParams, subjectKey = _c.subjectKey;
5903
5912
  return __awaiter(this, void 0, void 0, function () {
5904
5913
  var tpWrappingKey, sharedKey, tpWrappedSharedKey, subjectKeyWrappedSharedKey, share, partialAssemblyKey, sharedCipherData, sharedCipherApprovalData, sharedCipherPartialAssemblyKey;
5905
- return __generator(this, function (_b) {
5906
- switch (_b.label) {
5914
+ return __generator(this, function (_c) {
5915
+ switch (_c.label) {
5907
5916
  case 0: return [4 /*yield*/, this.prepareTpWrappingKey(tp)];
5908
5917
  case 1:
5909
- tpWrappingKey = _b.sent();
5918
+ tpWrappingKey = _c.sent();
5910
5919
  return [4 /*yield*/, this.keyFactory.createKey()];
5911
5920
  case 2:
5912
- sharedKey = _b.sent();
5921
+ sharedKey = _c.sent();
5913
5922
  return [4 /*yield*/, this.encryptionService.encryptToString(tpWrappingKey.jwk, sharedKey.toJSON(true))];
5914
5923
  case 3:
5915
- tpWrappedSharedKey = _b.sent();
5924
+ tpWrappedSharedKey = _c.sent();
5916
5925
  return [4 /*yield*/, this.encryptionService.encryptToString(subjectKey, sharedKey.toJSON(true))];
5917
5926
  case 4:
5918
- subjectKeyWrappedSharedKey = _b.sent();
5927
+ subjectKeyWrappedSharedKey = _c.sent();
5919
5928
  share = slipSubAssembly.threshold === 1
5920
5929
  ? slipSubAssembly.shares[0]
5921
5930
  : slipSubAssembly.shares[approverIndex];
@@ -5932,13 +5941,13 @@
5932
5941
  console.log('partialAssemblyKey', partialAssemblyKey);
5933
5942
  return [4 /*yield*/, this.encryptionService.encryptToString(sharedKey, tp.sharedCipherDataClearJson || '')];
5934
5943
  case 5:
5935
- sharedCipherData = _b.sent();
5944
+ sharedCipherData = _c.sent();
5936
5945
  return [4 /*yield*/, this.encryptionService.encryptToString(sharedKey, tp.sharedCipherApprovalDataClearJson || '')];
5937
5946
  case 6:
5938
- sharedCipherApprovalData = _b.sent();
5947
+ sharedCipherApprovalData = _c.sent();
5939
5948
  return [4 /*yield*/, this.encryptionService.encryptToString(sharedKey, partialAssemblyKey)];
5940
5949
  case 7:
5941
- sharedCipherPartialAssemblyKey = _b.sent();
5950
+ sharedCipherPartialAssemblyKey = _c.sent();
5942
5951
  return [2 /*return*/, {
5943
5952
  tpWrappingKeyId: tpWrappingKey.id,
5944
5953
  tpWrappedSharedKey: tpWrappedSharedKey,
@@ -5954,7 +5963,7 @@
5954
5963
  });
5955
5964
  };
5956
5965
  TpAssemblyController.prototype.validateApprovers = function (approvers) {
5957
- var e_1, _b;
5966
+ var e_1, _c;
5958
5967
  try {
5959
5968
  // Ensure all approvers have mkSharedKey.
5960
5969
  for (var approvers_1 = __values(approvers), approvers_1_1 = approvers_1.next(); !approvers_1_1.done; approvers_1_1 = approvers_1.next()) {
@@ -5969,7 +5978,7 @@
5969
5978
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
5970
5979
  finally {
5971
5980
  try {
5972
- if (approvers_1_1 && !approvers_1_1.done && (_b = approvers_1.return)) _b.call(approvers_1);
5981
+ if (approvers_1_1 && !approvers_1_1.done && (_c = approvers_1.return)) _c.call(approvers_1);
5973
5982
  }
5974
5983
  finally { if (e_1) throw e_1.error; }
5975
5984
  }
@@ -5978,8 +5987,8 @@
5978
5987
  TpAssemblyController.prototype.prepareSlip39 = function (subAssemblies, assemblyQuorum, rawAssemblyKey) {
5979
5988
  return __awaiter(this, void 0, void 0, function () {
5980
5989
  var slipAssembly;
5981
- return __generator(this, function (_b) {
5982
- switch (_b.label) {
5990
+ return __generator(this, function (_c) {
5991
+ switch (_c.label) {
5983
5992
  case 0:
5984
5993
  // Is there enough sub assemblies to meet quorum
5985
5994
  if (subAssemblies.length < assemblyQuorum) {
@@ -5997,7 +6006,7 @@
5997
6006
  });
5998
6007
  return [4 /*yield*/, this.slip39Service.generateShares(rawAssemblyKey, this.slip39Passphrase, slipAssembly)];
5999
6008
  case 1:
6000
- _b.sent();
6009
+ _c.sent();
6001
6010
  return [2 /*return*/, slipAssembly];
6002
6011
  }
6003
6012
  });
@@ -12071,22 +12080,25 @@
12071
12080
  })
12072
12081
  ], exports.LockService);
12073
12082
 
12074
- var DirectoryKeyQuery = gqlTyped(templateObject_1$m || (templateObject_1$m = __makeTemplateObject(["\nquery DirectoryKeyQuery($id: LrRelayIdInput!) {\n directory(id: $id) {\n keyId\n }\n}\n"], ["\nquery DirectoryKeyQuery($id: LrRelayIdInput!) {\n directory(id: $id) {\n keyId\n }\n}\n"])));
12075
- var FileKeyQuery = gqlTyped(templateObject_2$i || (templateObject_2$i = __makeTemplateObject(["\nquery FileKeyQuery($id: LrRelayIdInput!) {\n file(id: $id) {\n keyId\n }\n}\n"], ["\nquery FileKeyQuery($id: LrRelayIdInput!) {\n file(id: $id) {\n keyId\n }\n}\n"])));
12076
- var FileStateKeyQuery = gqlTyped(templateObject_3$g || (templateObject_3$g = __makeTemplateObject(["\nquery FileStateKeyQuery($id: LrRelayIdInput!) {\n fileState(id: $id) {\n keyId\n }\n}\n"], ["\nquery FileStateKeyQuery($id: LrRelayIdInput!) {\n fileState(id: $id) {\n keyId\n }\n}\n"])));
12077
- var CreateDirectoryMutation = gqlTyped(templateObject_4$f || (templateObject_4$f = __makeTemplateObject(["\nmutation CreateDirectoryMutation($input: CreateDirectoryInput!) {\n createDirectory(input: $input) {\n directory {\n id\n keyId\n }\n }\n}\n"], ["\nmutation CreateDirectoryMutation($input: CreateDirectoryInput!) {\n createDirectory(input: $input) {\n directory {\n id\n keyId\n }\n }\n}\n"])));
12078
- var UpdateDirectoryMutation = gqlTyped(templateObject_5$c || (templateObject_5$c = __makeTemplateObject(["\nmutation UpdateDirectoryMutation($input: UpdateDirectoryInput!) {\n updateDirectory(input: $input) {\n directory {\n id\n modified\n }\n }\n}\n"], ["\nmutation UpdateDirectoryMutation($input: UpdateDirectoryInput!) {\n updateDirectory(input: $input) {\n directory {\n id\n modified\n }\n }\n}\n"])));
12079
- var DeleteDirectoryMutation = gqlTyped(templateObject_6$a || (templateObject_6$a = __makeTemplateObject(["\nmutation DeleteDirectoryMutation($input: DeleteDirectoryInput!) {\n deleteDirectory(input: $input) {\n id\n }\n}\n"], ["\nmutation DeleteDirectoryMutation($input: DeleteDirectoryInput!) {\n deleteDirectory(input: $input) {\n id\n }\n}\n"])));
12080
- var CreateFileMutation$1 = gqlTyped(templateObject_7$8 || (templateObject_7$8 = __makeTemplateObject(["\nmutation CreateFileMutation($input: CreateFileInput!) {\n createFile(input: $input) {\n file {\n id\n }\n }\n}\n"], ["\nmutation CreateFileMutation($input: CreateFileInput!) {\n createFile(input: $input) {\n file {\n id\n }\n }\n}\n"])));
12081
- var UpdateFileMutation = gqlTyped(templateObject_8$7 || (templateObject_8$7 = __makeTemplateObject(["\nmutation UpdateFileMutation($input: UpdateFileInput!) {\n updateFile(input: $input) {\n file {\n id\n }\n }\n}\n"], ["\nmutation UpdateFileMutation($input: UpdateFileInput!) {\n updateFile(input: $input) {\n file {\n id\n }\n }\n}\n"])));
12082
- var DeleteFileMutation$1 = gqlTyped(templateObject_9$4 || (templateObject_9$4 = __makeTemplateObject(["\nmutation DeleteFileMutation($input: DeleteFileInput!) {\n deleteFile(input: $input) {\n id\n }\n}\n"], ["\nmutation DeleteFileMutation($input: DeleteFileInput!) {\n deleteFile(input: $input) {\n id\n }\n}\n"])));
12083
- var ArchiveDirectoryMutation$1 = gqlTyped(templateObject_10$4 || (templateObject_10$4 = __makeTemplateObject(["\nmutation ArchiveDirectoryMutation($input: ArchiveDirectoryInput!) {\n archiveDirectory(input: $input) {\n directory {\n id\n }\n }\n}\n"], ["\nmutation ArchiveDirectoryMutation($input: ArchiveDirectoryInput!) {\n archiveDirectory(input: $input) {\n directory {\n id\n }\n }\n}\n"])));
12084
- var UnarchiveDirectoryMutation$1 = gqlTyped(templateObject_11$3 || (templateObject_11$3 = __makeTemplateObject(["\nmutation UnarchiveDirectoryMutation($input: UnarchiveDirectoryInput!) {\n unarchiveDirectory(input: $input) {\n directory {\n id\n }\n }\n}\n"], ["\nmutation UnarchiveDirectoryMutation($input: UnarchiveDirectoryInput!) {\n unarchiveDirectory(input: $input) {\n directory {\n id\n }\n }\n}\n"])));
12085
- var ChangeDirectoryParentsMutation = gqlTyped(templateObject_12$2 || (templateObject_12$2 = __makeTemplateObject(["\nmutation ChangeDirectoryParentsMutation($input: ChangeDirectoryParentsInput!) {\n changeDirectoryParents(input: $input) {\n directory {\n id\n }\n }\n}\n"], ["\nmutation ChangeDirectoryParentsMutation($input: ChangeDirectoryParentsInput!) {\n changeDirectoryParents(input: $input) {\n directory {\n id\n }\n }\n}\n"])));
12086
- var ChangeFileParentsMutation = gqlTyped(templateObject_13$2 || (templateObject_13$2 = __makeTemplateObject(["\nmutation ChangeFileParentsMutation($input: ChangeFileParentsInput!) {\n changeFileParents(input: $input) {\n file {\n id\n }\n }\n}\n"], ["\nmutation ChangeFileParentsMutation($input: ChangeFileParentsInput!) {\n changeFileParents(input: $input) {\n file {\n id\n }\n }\n}\n"])));
12087
- var BeginDeleteChildItemLinksWindowMutation = gqlTyped(templateObject_14$1 || (templateObject_14$1 = __makeTemplateObject(["\nmutation BeginDeleteChildItemLinksWindowMutation($input: BeginDeleteChildItemLinksWindowInput!) {\n beginDeleteChildItemLinksWindow(input: $input) {\n begin\n end\n scheduled\n windowMs\n directory {\n id\n }\n }\n}\n"], ["\nmutation BeginDeleteChildItemLinksWindowMutation($input: BeginDeleteChildItemLinksWindowInput!) {\n beginDeleteChildItemLinksWindow(input: $input) {\n begin\n end\n scheduled\n windowMs\n directory {\n id\n }\n }\n}\n"])));
12088
- var TempDirectoryQuery = gqlTyped(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\nquery TempDirectoryQuery($plainMeta: LrJSONFilter!) {\n rootDirectories(plainMeta: $plainMeta, first: 2, orderBy: \"created\") {\n edges {\n node {\n id\n keyId\n }\n }\n }\n lock {\n version\n }\n}\n"], ["\nquery TempDirectoryQuery($plainMeta: LrJSONFilter!) {\n rootDirectories(plainMeta: $plainMeta, first: 2, orderBy: \"created\") {\n edges {\n node {\n id\n keyId\n }\n }\n }\n lock {\n version\n }\n}\n"])));
12089
- var templateObject_1$m, templateObject_2$i, templateObject_3$g, templateObject_4$f, templateObject_5$c, templateObject_6$a, templateObject_7$8, templateObject_8$7, templateObject_9$4, templateObject_10$4, templateObject_11$3, templateObject_12$2, templateObject_13$2, templateObject_14$1, templateObject_15;
12083
+ var CreateDirectoryMutation = gqlTyped(templateObject_1$m || (templateObject_1$m = __makeTemplateObject(["\nmutation CreateDirectoryMutation($input: CreateDirectoryInput!) {\n createDirectory(input: $input) {\n directory {\n id\n keyId\n }\n }\n}\n"], ["\nmutation CreateDirectoryMutation($input: CreateDirectoryInput!) {\n createDirectory(input: $input) {\n directory {\n id\n keyId\n }\n }\n}\n"])));
12084
+ var UpdateDirectoryMutation = gqlTyped(templateObject_2$i || (templateObject_2$i = __makeTemplateObject(["\nmutation UpdateDirectoryMutation($input: UpdateDirectoryInput!) {\n updateDirectory(input: $input) {\n directory {\n id\n modified\n }\n }\n}\n"], ["\nmutation UpdateDirectoryMutation($input: UpdateDirectoryInput!) {\n updateDirectory(input: $input) {\n directory {\n id\n modified\n }\n }\n}\n"])));
12085
+ var DeleteDirectoryMutation = gqlTyped(templateObject_3$g || (templateObject_3$g = __makeTemplateObject(["\nmutation DeleteDirectoryMutation($input: DeleteDirectoryInput!) {\n deleteDirectory(input: $input) {\n id\n }\n}\n"], ["\nmutation DeleteDirectoryMutation($input: DeleteDirectoryInput!) {\n deleteDirectory(input: $input) {\n id\n }\n}\n"])));
12086
+ var CreateFileMutation$1 = gqlTyped(templateObject_4$f || (templateObject_4$f = __makeTemplateObject(["\nmutation CreateFileMutation($input: CreateFileInput!) {\n createFile(input: $input) {\n file {\n id\n }\n }\n}\n"], ["\nmutation CreateFileMutation($input: CreateFileInput!) {\n createFile(input: $input) {\n file {\n id\n }\n }\n}\n"])));
12087
+ var UpdateFileMutation = gqlTyped(templateObject_5$c || (templateObject_5$c = __makeTemplateObject(["\nmutation UpdateFileMutation($input: UpdateFileInput!) {\n updateFile(input: $input) {\n file {\n id\n }\n }\n}\n"], ["\nmutation UpdateFileMutation($input: UpdateFileInput!) {\n updateFile(input: $input) {\n file {\n id\n }\n }\n}\n"])));
12088
+ var RevertFileMutation = gqlTyped(templateObject_6$a || (templateObject_6$a = __makeTemplateObject(["\nmutation RevertFileMutation($input: RevertFileInput!) {\n revertFile(input: $input) {\n file {\n id\n }\n }\n}\n"], ["\nmutation RevertFileMutation($input: RevertFileInput!) {\n revertFile(input: $input) {\n file {\n id\n }\n }\n}\n"])));
12089
+ var DeleteFileMutation$1 = gqlTyped(templateObject_7$8 || (templateObject_7$8 = __makeTemplateObject(["\nmutation DeleteFileMutation($input: DeleteFileInput!) {\n deleteFile(input: $input) {\n id\n }\n}\n"], ["\nmutation DeleteFileMutation($input: DeleteFileInput!) {\n deleteFile(input: $input) {\n id\n }\n}\n"])));
12090
+ var ArchiveDirectoryMutation$1 = gqlTyped(templateObject_8$7 || (templateObject_8$7 = __makeTemplateObject(["\nmutation ArchiveDirectoryMutation($input: ArchiveDirectoryInput!) {\n archiveDirectory(input: $input) {\n directory {\n id\n }\n }\n}\n"], ["\nmutation ArchiveDirectoryMutation($input: ArchiveDirectoryInput!) {\n archiveDirectory(input: $input) {\n directory {\n id\n }\n }\n}\n"])));
12091
+ var UnarchiveDirectoryMutation$1 = gqlTyped(templateObject_9$4 || (templateObject_9$4 = __makeTemplateObject(["\nmutation UnarchiveDirectoryMutation($input: UnarchiveDirectoryInput!) {\n unarchiveDirectory(input: $input) {\n directory {\n id\n }\n }\n}\n"], ["\nmutation UnarchiveDirectoryMutation($input: UnarchiveDirectoryInput!) {\n unarchiveDirectory(input: $input) {\n directory {\n id\n }\n }\n}\n"])));
12092
+ var ChangeDirectoryParentsMutation = gqlTyped(templateObject_10$4 || (templateObject_10$4 = __makeTemplateObject(["\nmutation ChangeDirectoryParentsMutation($input: ChangeDirectoryParentsInput!) {\n changeDirectoryParents(input: $input) {\n directory {\n id\n }\n }\n}\n"], ["\nmutation ChangeDirectoryParentsMutation($input: ChangeDirectoryParentsInput!) {\n changeDirectoryParents(input: $input) {\n directory {\n id\n }\n }\n}\n"])));
12093
+ var ChangeFileParentsMutation = gqlTyped(templateObject_11$3 || (templateObject_11$3 = __makeTemplateObject(["\nmutation ChangeFileParentsMutation($input: ChangeFileParentsInput!) {\n changeFileParents(input: $input) {\n file {\n id\n }\n }\n}\n"], ["\nmutation ChangeFileParentsMutation($input: ChangeFileParentsInput!) {\n changeFileParents(input: $input) {\n file {\n id\n }\n }\n}\n"])));
12094
+ var BeginDeleteChildItemLinksWindowMutation = gqlTyped(templateObject_12$2 || (templateObject_12$2 = __makeTemplateObject(["\nmutation BeginDeleteChildItemLinksWindowMutation($input: BeginDeleteChildItemLinksWindowInput!) {\n beginDeleteChildItemLinksWindow(input: $input) {\n begin\n end\n scheduled\n windowMs\n directory {\n id\n }\n }\n}\n"], ["\nmutation BeginDeleteChildItemLinksWindowMutation($input: BeginDeleteChildItemLinksWindowInput!) {\n beginDeleteChildItemLinksWindow(input: $input) {\n begin\n end\n scheduled\n windowMs\n directory {\n id\n }\n }\n}\n"])));
12095
+ var TempDirectoryQuery = gqlTyped(templateObject_13$2 || (templateObject_13$2 = __makeTemplateObject(["\nquery TempDirectoryQuery($plainMeta: LrJSONFilter!) {\n rootDirectories(plainMeta: $plainMeta, first: 2, orderBy: \"created\") {\n edges {\n node {\n id\n keyId\n }\n }\n }\n lock {\n version\n }\n}\n"], ["\nquery TempDirectoryQuery($plainMeta: LrJSONFilter!) {\n rootDirectories(plainMeta: $plainMeta, first: 2, orderBy: \"created\") {\n edges {\n node {\n id\n keyId\n }\n }\n }\n lock {\n version\n }\n}\n"])));
12096
+ var templateObject_1$m, templateObject_2$i, templateObject_3$g, templateObject_4$f, templateObject_5$c, templateObject_6$a, templateObject_7$8, templateObject_8$7, templateObject_9$4, templateObject_10$4, templateObject_11$3, templateObject_12$2, templateObject_13$2;
12097
+
12098
+ var DirectoryKeyQuery = gqlTyped(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\nquery DirectoryKeyQuery($id: LrRelayIdInput!) {\n directory(id: $id) {\n keyId\n }\n}\n"], ["\nquery DirectoryKeyQuery($id: LrRelayIdInput!) {\n directory(id: $id) {\n keyId\n }\n}\n"])));
12099
+ var FileKeyQuery = gqlTyped(templateObject_2$j || (templateObject_2$j = __makeTemplateObject(["\nquery FileKeyQuery($id: LrRelayIdInput!) {\n file(id: $id) {\n keyId\n }\n}\n"], ["\nquery FileKeyQuery($id: LrRelayIdInput!) {\n file(id: $id) {\n keyId\n }\n}\n"])));
12100
+ var FileStateKeyQuery = gqlTyped(templateObject_3$h || (templateObject_3$h = __makeTemplateObject(["\nquery FileStateKeyQuery($id: LrRelayIdInput!) {\n fileState(id: $id) {\n keyId\n }\n}\n"], ["\nquery FileStateKeyQuery($id: LrRelayIdInput!) {\n fileState(id: $id) {\n keyId\n }\n}\n"])));
12101
+ var templateObject_1$n, templateObject_2$j, templateObject_3$h;
12090
12102
 
12091
12103
  var Item2Service_1;
12092
12104
  exports.Item2Service = Item2Service_1 = /** @class */ (function (_super) {
@@ -12283,6 +12295,24 @@
12283
12295
  });
12284
12296
  });
12285
12297
  };
12298
+ Item2Service.prototype.revertFileExec = function (options) {
12299
+ return this.mutate(this.revertFileMutation(options));
12300
+ };
12301
+ Item2Service.prototype.revertFile = function (options) {
12302
+ return this.revertFileMutation(options);
12303
+ };
12304
+ Item2Service.prototype.revertFileMutation = function (options) {
12305
+ return __awaiter(this, void 0, void 0, function () {
12306
+ return __generator(this, function (_c) {
12307
+ return [2 /*return*/, new LrMutation({
12308
+ mutation: RevertFileMutation,
12309
+ variables: {
12310
+ input: options,
12311
+ },
12312
+ })];
12313
+ });
12314
+ });
12315
+ };
12286
12316
  Item2Service.prototype.deleteFileExec = function (id) {
12287
12317
  return this.mutate(this.deleteFileMutation(id));
12288
12318
  };
@@ -12803,16 +12833,16 @@
12803
12833
  })
12804
12834
  ], exports.Item2Service);
12805
12835
 
12806
- var DeleteTpMutation = gqlTyped(templateObject_1$n || (templateObject_1$n = __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"])));
12807
- var ShareDirectoryMutation = gqlTyped(templateObject_2$j || (templateObject_2$j = __makeTemplateObject(["\n mutation ShareDirectoryMutation($input: ShareDirectoryInput!) {\n shareDirectory(input: $input) {\n tpDirectory {\n id\n }\n }\n }\n"], ["\n mutation ShareDirectoryMutation($input: ShareDirectoryInput!) {\n shareDirectory(input: $input) {\n tpDirectory {\n id\n }\n }\n }\n"])));
12808
- var UnshareDirectoryMutation = gqlTyped(templateObject_3$h || (templateObject_3$h = __makeTemplateObject(["\n mutation UnshareDirectoryMutation($input: UnshareDirectoryInput!) {\n unshareDirectory(input: $input) {\n tpDirectory {\n id\n }\n }\n }\n"], ["\n mutation UnshareDirectoryMutation($input: UnshareDirectoryInput!) {\n unshareDirectory(input: $input) {\n tpDirectory {\n id\n }\n }\n }\n"])));
12836
+ var DeleteTpMutation = gqlTyped(templateObject_1$o || (templateObject_1$o = __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"])));
12837
+ var ShareDirectoryMutation = gqlTyped(templateObject_2$k || (templateObject_2$k = __makeTemplateObject(["\n mutation ShareDirectoryMutation($input: ShareDirectoryInput!) {\n shareDirectory(input: $input) {\n tpDirectory {\n id\n }\n }\n }\n"], ["\n mutation ShareDirectoryMutation($input: ShareDirectoryInput!) {\n shareDirectory(input: $input) {\n tpDirectory {\n id\n }\n }\n }\n"])));
12838
+ var UnshareDirectoryMutation = gqlTyped(templateObject_3$i || (templateObject_3$i = __makeTemplateObject(["\n mutation UnshareDirectoryMutation($input: UnshareDirectoryInput!) {\n unshareDirectory(input: $input) {\n tpDirectory {\n id\n }\n }\n }\n"], ["\n mutation UnshareDirectoryMutation($input: UnshareDirectoryInput!) {\n unshareDirectory(input: $input) {\n tpDirectory {\n id\n }\n }\n }\n"])));
12809
12839
  var ShareFileMutation = gqlTyped(templateObject_4$g || (templateObject_4$g = __makeTemplateObject(["\n mutation ShareFileMutation($input: ShareFileInput!) {\n shareFile(input: $input) {\n tpFile {\n id\n }\n }\n }\n"], ["\n mutation ShareFileMutation($input: ShareFileInput!) {\n shareFile(input: $input) {\n tpFile {\n id\n }\n }\n }\n"])));
12810
12840
  var UnshareFileMutation = gqlTyped(templateObject_5$d || (templateObject_5$d = __makeTemplateObject(["\n mutation UnshareFileMutation($input: UnshareFileInput!) {\n unshareFile(input: $input) {\n tpFile {\n id\n }\n }\n }\n"], ["\n mutation UnshareFileMutation($input: UnshareFileInput!) {\n unshareFile(input: $input) {\n tpFile {\n id\n }\n }\n }\n"])));
12811
12841
  var TpCurrentUserSharedKeyQuery = gqlTyped(templateObject_6$b || (templateObject_6$b = __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"])));
12812
12842
  var RequestTpMkReshareMutation = gqlTyped(templateObject_7$9 || (templateObject_7$9 = __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}"])));
12813
12843
  var RespondTpMkReshareMutation = gqlTyped(templateObject_8$8 || (templateObject_8$8 = __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"])));
12814
12844
  var CompleteTpMkReshareMutation = gqlTyped(templateObject_9$5 || (templateObject_9$5 = __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}"])));
12815
- var templateObject_1$n, templateObject_2$j, templateObject_3$h, templateObject_4$g, templateObject_5$d, templateObject_6$b, templateObject_7$9, templateObject_8$8, templateObject_9$5;
12845
+ var templateObject_1$o, templateObject_2$k, templateObject_3$i, templateObject_4$g, templateObject_5$d, templateObject_6$b, templateObject_7$9, templateObject_8$8, templateObject_9$5;
12816
12846
 
12817
12847
  exports.TrustedParty2Service = /** @class */ (function (_super) {
12818
12848
  __extends(TrustedParty2Service, _super);
@@ -13505,12 +13535,12 @@
13505
13535
  })
13506
13536
  ], exports.TpPasswordResetRequestService);
13507
13537
 
13508
- var UpdateNotificationMutation = gqlTyped(templateObject_1$o || (templateObject_1$o = __makeTemplateObject(["\nmutation UpdateNotificationMutation($input: UpdateNotificationInput!) {\n updateNotification(input: $input) {\n notification {\n id\n }\n }\n}\n"], ["\nmutation UpdateNotificationMutation($input: UpdateNotificationInput!) {\n updateNotification(input: $input) {\n notification {\n id\n }\n }\n}\n"])));
13509
- var UpdateAllNotificationsReadStateMutation = gqlTyped(templateObject_2$k || (templateObject_2$k = __makeTemplateObject(["\nmutation UpdateAllNotificationsReadStateMutation($input: UpdateAllNotificationsReadStateInput!) {\n updateAllNotificationsReadState(input: $input) {\n count\n }\n}\n"], ["\nmutation UpdateAllNotificationsReadStateMutation($input: UpdateAllNotificationsReadStateInput!) {\n updateAllNotificationsReadState(input: $input) {\n count\n }\n}\n"])));
13510
- var DebugCreateNotificationMutation = gqlTyped(templateObject_3$i || (templateObject_3$i = __makeTemplateObject(["\nmutation DebugCreateNotificationMutation($input: DebugCreateNotificationInput!) {\n debugCreateNotification(input: $input) {\n notification {\n id\n }\n }\n}\n"], ["\nmutation DebugCreateNotificationMutation($input: DebugCreateNotificationInput!) {\n debugCreateNotification(input: $input) {\n notification {\n id\n }\n }\n}\n"])));
13538
+ var UpdateNotificationMutation = gqlTyped(templateObject_1$p || (templateObject_1$p = __makeTemplateObject(["\nmutation UpdateNotificationMutation($input: UpdateNotificationInput!) {\n updateNotification(input: $input) {\n notification {\n id\n }\n }\n}\n"], ["\nmutation UpdateNotificationMutation($input: UpdateNotificationInput!) {\n updateNotification(input: $input) {\n notification {\n id\n }\n }\n}\n"])));
13539
+ var UpdateAllNotificationsReadStateMutation = gqlTyped(templateObject_2$l || (templateObject_2$l = __makeTemplateObject(["\nmutation UpdateAllNotificationsReadStateMutation($input: UpdateAllNotificationsReadStateInput!) {\n updateAllNotificationsReadState(input: $input) {\n count\n }\n}\n"], ["\nmutation UpdateAllNotificationsReadStateMutation($input: UpdateAllNotificationsReadStateInput!) {\n updateAllNotificationsReadState(input: $input) {\n count\n }\n}\n"])));
13540
+ var DebugCreateNotificationMutation = gqlTyped(templateObject_3$j || (templateObject_3$j = __makeTemplateObject(["\nmutation DebugCreateNotificationMutation($input: DebugCreateNotificationInput!) {\n debugCreateNotification(input: $input) {\n notification {\n id\n }\n }\n}\n"], ["\nmutation DebugCreateNotificationMutation($input: DebugCreateNotificationInput!) {\n debugCreateNotification(input: $input) {\n notification {\n id\n }\n }\n}\n"])));
13511
13541
  var DebugDeleteAllNotificationsMutation = gqlTyped(templateObject_4$h || (templateObject_4$h = __makeTemplateObject(["\nmutation DebugDeleteAllNotificationsMutation($input: DebugDeleteAllNotificationsInput!) {\n debugDeleteAllNotifications(input: $input) {\n count\n }\n}\n"], ["\nmutation DebugDeleteAllNotificationsMutation($input: DebugDeleteAllNotificationsInput!) {\n debugDeleteAllNotifications(input: $input) {\n count\n }\n}\n"])));
13512
13542
  var UpdateNotificationFeatureStateMutation = gqlTyped(templateObject_5$e || (templateObject_5$e = __makeTemplateObject(["\nmutation UpdateNotificationFeatureStateMutation($input: UpdateNotificationFeatureStateInput!) {\n updateNotificationFeatureState(input: $input) {\n featureState {\n notificationsLastViewed\n\t\t}\n }\n}\n"], ["\nmutation UpdateNotificationFeatureStateMutation($input: UpdateNotificationFeatureStateInput!) {\n updateNotificationFeatureState(input: $input) {\n featureState {\n notificationsLastViewed\n\t\t}\n }\n}\n"])));
13513
- var templateObject_1$o, templateObject_2$k, templateObject_3$i, templateObject_4$h, templateObject_5$e;
13543
+ var templateObject_1$p, templateObject_2$l, templateObject_3$j, templateObject_4$h, templateObject_5$e;
13514
13544
 
13515
13545
  exports.NotificationService = /** @class */ (function (_super) {
13516
13546
  __extends(NotificationService, _super);
@@ -13646,15 +13676,15 @@
13646
13676
  })
13647
13677
  ], exports.NotificationService);
13648
13678
 
13649
- var CreateScenarioMutation = gqlTyped(templateObject_1$p || (templateObject_1$p = __makeTemplateObject(["\nmutation CreateScenarioMutation($input: CreateScenarioInput!) {\n createScenario(input: $input) {\n scenario {\n id\n }\n }\n}\n"], ["\nmutation CreateScenarioMutation($input: CreateScenarioInput!) {\n createScenario(input: $input) {\n scenario {\n id\n }\n }\n}\n"])));
13650
- var UpdateScenarioMutation = gqlTyped(templateObject_2$l || (templateObject_2$l = __makeTemplateObject(["\nmutation UpdateScenarioMutation($input: UpdateScenarioInput!) {\n updateScenario(input: $input) {\n scenario {\n id\n }\n }\n}\n"], ["\nmutation UpdateScenarioMutation($input: UpdateScenarioInput!) {\n updateScenario(input: $input) {\n scenario {\n id\n }\n }\n}\n"])));
13651
- var DeleteScenarioMutation = gqlTyped(templateObject_3$j || (templateObject_3$j = __makeTemplateObject(["\nmutation DeleteScenarioMutation($input: DeleteScenarioInput!) {\n deleteScenario(input: $input) {\n id\n }\n}\n"], ["\nmutation DeleteScenarioMutation($input: DeleteScenarioInput!) {\n deleteScenario(input: $input) {\n id\n }\n}\n"])));
13679
+ var CreateScenarioMutation = gqlTyped(templateObject_1$q || (templateObject_1$q = __makeTemplateObject(["\nmutation CreateScenarioMutation($input: CreateScenarioInput!) {\n createScenario(input: $input) {\n scenario {\n id\n }\n }\n}\n"], ["\nmutation CreateScenarioMutation($input: CreateScenarioInput!) {\n createScenario(input: $input) {\n scenario {\n id\n }\n }\n}\n"])));
13680
+ var UpdateScenarioMutation = gqlTyped(templateObject_2$m || (templateObject_2$m = __makeTemplateObject(["\nmutation UpdateScenarioMutation($input: UpdateScenarioInput!) {\n updateScenario(input: $input) {\n scenario {\n id\n }\n }\n}\n"], ["\nmutation UpdateScenarioMutation($input: UpdateScenarioInput!) {\n updateScenario(input: $input) {\n scenario {\n id\n }\n }\n}\n"])));
13681
+ var DeleteScenarioMutation = gqlTyped(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\nmutation DeleteScenarioMutation($input: DeleteScenarioInput!) {\n deleteScenario(input: $input) {\n id\n }\n}\n"], ["\nmutation DeleteScenarioMutation($input: DeleteScenarioInput!) {\n deleteScenario(input: $input) {\n id\n }\n}\n"])));
13652
13682
  var CreateScenarioClaimMutation = gqlTyped(templateObject_4$i || (templateObject_4$i = __makeTemplateObject(["\nmutation CreateScenarioClaimMutation($input: CreateScenarioClaimInput!) {\n createScenarioClaim(input: $input) {\n sharedClaim {\n id\n }\n }\n}\n"], ["\nmutation CreateScenarioClaimMutation($input: CreateScenarioClaimInput!) {\n createScenarioClaim(input: $input) {\n sharedClaim {\n id\n }\n }\n}\n"])));
13653
13683
  var CancelScenarioClaimMutation = gqlTyped(templateObject_5$f || (templateObject_5$f = __makeTemplateObject(["\nmutation CancelScenarioClaimMutation($input: CancelScenarioClaimInput!) {\n cancelScenarioClaim(input: $input) {\n sharedClaim {\n id\n }\n }\n}\n"], ["\nmutation CancelScenarioClaimMutation($input: CancelScenarioClaimInput!) {\n cancelScenarioClaim(input: $input) {\n sharedClaim {\n id\n }\n }\n}\n"])));
13654
13684
  var RejectScenarioClaimMutation = gqlTyped(templateObject_6$c || (templateObject_6$c = __makeTemplateObject(["\nmutation RejectScenarioClaimMutation($input: RejectScenarioClaimInput!) {\n rejectScenarioClaim(input: $input) {\n claimApprover {\n id\n }\n }\n}\n"], ["\nmutation RejectScenarioClaimMutation($input: RejectScenarioClaimInput!) {\n rejectScenarioClaim(input: $input) {\n claimApprover {\n id\n }\n }\n}\n"])));
13655
13685
  var ApproveScenarioClaimMutation = gqlTyped(templateObject_7$a || (templateObject_7$a = __makeTemplateObject(["\nmutation ApproveScenarioClaimMutation($input: ApproveScenarioClaimInput!) {\n approveScenarioClaim(input: $input) {\n claimApprover {\n id\n }\n }\n}\n"], ["\nmutation ApproveScenarioClaimMutation($input: ApproveScenarioClaimInput!) {\n approveScenarioClaim(input: $input) {\n claimApprover {\n id\n }\n }\n}\n"])));
13656
13686
  var ReceiveScenarioClaimMutation = gqlTyped(templateObject_8$9 || (templateObject_8$9 = __makeTemplateObject(["\nmutation ReceiveScenarioClaimMutation($input: ReceiveScenarioClaimInput!) {\n receiveScenarioClaim(input: $input) {\n sharedClaim {\n id\n }\n }\n}\n"], ["\nmutation ReceiveScenarioClaimMutation($input: ReceiveScenarioClaimInput!) {\n receiveScenarioClaim(input: $input) {\n sharedClaim {\n id\n }\n }\n}\n"])));
13657
- var templateObject_1$p, templateObject_2$l, templateObject_3$j, templateObject_4$i, templateObject_5$f, templateObject_6$c, templateObject_7$a, templateObject_8$9;
13687
+ var templateObject_1$q, templateObject_2$m, templateObject_3$k, templateObject_4$i, templateObject_5$f, templateObject_6$c, templateObject_7$a, templateObject_8$9;
13658
13688
 
13659
13689
  var SCENARIO_SLIP39_PASSPHRASE = 'lifeready';
13660
13690
 
@@ -13688,9 +13718,9 @@
13688
13718
  })
13689
13719
  ], exports.ɵq);
13690
13720
 
13691
- var ScenarioQuery = gqlTyped(templateObject_1$q || (templateObject_1$q = __makeTemplateObject(["\nquery ScenarioQuery(\n $scenarioId: LrRelayIdInput!\n) {\n scenario(id: $scenarioId) {\n id\n state\n assembly {\n quorum\n singleReject\n assemblyKey {\n id\n }\n subjectKey {\n id\n }\n subjectCipherData\n subAssemblies {\n edges {\n node {\n id\n subjectKey {\n id\n }\n subjectCipherData\n quorum\n singleReject\n approvers {\n edges {\n node {\n id\n tp {\n id\n }\n sharedKey {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n claimants {\n edges {\n node {\n tp {\n id\n }\n sharedKey {\n id\n }\n }\n }\n }\n receivers {\n edges {\n node {\n tp {\n id\n }\n sharedKey {\n id\n }\n sharedCipherData\n receiverDirectories {\n edges {\n node {\n id\n sharedCipherData\n sharedKey {\n id\n }\n accessRole\n itemKey {\n id\n }\n directory {\n id\n keyId\n }\n }\n }\n }\n receiverFiles {\n edges {\n node {\n id\n sharedCipherData\n sharedKey {\n id\n }\n accessRole\n itemKey {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n}"], ["\nquery ScenarioQuery(\n $scenarioId: LrRelayIdInput!\n) {\n scenario(id: $scenarioId) {\n id\n state\n assembly {\n quorum\n singleReject\n assemblyKey {\n id\n }\n subjectKey {\n id\n }\n subjectCipherData\n subAssemblies {\n edges {\n node {\n id\n subjectKey {\n id\n }\n subjectCipherData\n quorum\n singleReject\n approvers {\n edges {\n node {\n id\n tp {\n id\n }\n sharedKey {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n claimants {\n edges {\n node {\n tp {\n id\n }\n sharedKey {\n id\n }\n }\n }\n }\n receivers {\n edges {\n node {\n tp {\n id\n }\n sharedKey {\n id\n }\n sharedCipherData\n receiverDirectories {\n edges {\n node {\n id\n sharedCipherData\n sharedKey {\n id\n }\n accessRole\n itemKey {\n id\n }\n directory {\n id\n keyId\n }\n }\n }\n }\n receiverFiles {\n edges {\n node {\n id\n sharedCipherData\n sharedKey {\n id\n }\n accessRole\n itemKey {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n}"])));
13692
- var SharedScenarioQuery = gqlTyped(templateObject_2$m || (templateObject_2$m = __makeTemplateObject(["\nquery SharedScenarioQuery($scenarioId: LrRelayIdInput!) {\n sharedScenario(id: $scenarioId) {\n id\n state\n tp {\n id\n }\n asClaimant {\n sharedKey {\n id\n }\n sharedCipherData\n }\n asReceiver {\n sharedKey {\n id\n }\n sharedCipherData\n pbk {\n id\n }\n receiverDirectories {\n edges {\n node {\n id\n wrappedItemKey\n }\n }\n }\n }\n assembly {\n asApprovers {\n edges {\n node {\n id\n sharedKey {\n id\n }\n sharedCipherData\n }\n }\n }\n }\n sharedClaim {\n\t \t\tid\n isClaimant\n claim {\n state\n asClaimApprovers {\n edges {\n node {\n id\n state\n sharedKey {\n id\n }\n sharedCipherApprovalData\n sharedCipherPartialAssemblyKey\n receiverApprovals {\n edges {\n node {\n id\n pxk {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n asClaimReceiver {\n received\n approvals {\n edges {\n node {\n receiverCipher\n receiverCipherPartialAssemblyKey\n pxk {\n id\n }\n }\n }\n }\n }\n }\n }\n}\n"], ["\nquery SharedScenarioQuery($scenarioId: LrRelayIdInput!) {\n sharedScenario(id: $scenarioId) {\n id\n state\n tp {\n id\n }\n asClaimant {\n sharedKey {\n id\n }\n sharedCipherData\n }\n asReceiver {\n sharedKey {\n id\n }\n sharedCipherData\n pbk {\n id\n }\n receiverDirectories {\n edges {\n node {\n id\n wrappedItemKey\n }\n }\n }\n }\n assembly {\n asApprovers {\n edges {\n node {\n id\n sharedKey {\n id\n }\n sharedCipherData\n }\n }\n }\n }\n sharedClaim {\n\t \t\tid\n isClaimant\n claim {\n state\n asClaimApprovers {\n edges {\n node {\n id\n state\n sharedKey {\n id\n }\n sharedCipherApprovalData\n sharedCipherPartialAssemblyKey\n receiverApprovals {\n edges {\n node {\n id\n pxk {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n asClaimReceiver {\n received\n approvals {\n edges {\n node {\n receiverCipher\n receiverCipherPartialAssemblyKey\n pxk {\n id\n }\n }\n }\n }\n }\n }\n }\n}\n"])));
13693
- var templateObject_1$q, templateObject_2$m;
13721
+ var ScenarioQuery = gqlTyped(templateObject_1$r || (templateObject_1$r = __makeTemplateObject(["\nquery ScenarioQuery(\n $scenarioId: LrRelayIdInput!\n) {\n scenario(id: $scenarioId) {\n id\n state\n assembly {\n quorum\n singleReject\n assemblyKey {\n id\n }\n subjectKey {\n id\n }\n subjectCipherData\n subAssemblies {\n edges {\n node {\n id\n subjectKey {\n id\n }\n subjectCipherData\n quorum\n singleReject\n approvers {\n edges {\n node {\n id\n tp {\n id\n }\n sharedKey {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n claimants {\n edges {\n node {\n tp {\n id\n }\n sharedKey {\n id\n }\n }\n }\n }\n receivers {\n edges {\n node {\n tp {\n id\n }\n sharedKey {\n id\n }\n sharedCipherData\n receiverDirectories {\n edges {\n node {\n id\n sharedCipherData\n sharedKey {\n id\n }\n accessRole\n itemKey {\n id\n }\n directory {\n id\n keyId\n }\n }\n }\n }\n receiverFiles {\n edges {\n node {\n id\n sharedCipherData\n sharedKey {\n id\n }\n accessRole\n itemKey {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n}"], ["\nquery ScenarioQuery(\n $scenarioId: LrRelayIdInput!\n) {\n scenario(id: $scenarioId) {\n id\n state\n assembly {\n quorum\n singleReject\n assemblyKey {\n id\n }\n subjectKey {\n id\n }\n subjectCipherData\n subAssemblies {\n edges {\n node {\n id\n subjectKey {\n id\n }\n subjectCipherData\n quorum\n singleReject\n approvers {\n edges {\n node {\n id\n tp {\n id\n }\n sharedKey {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n claimants {\n edges {\n node {\n tp {\n id\n }\n sharedKey {\n id\n }\n }\n }\n }\n receivers {\n edges {\n node {\n tp {\n id\n }\n sharedKey {\n id\n }\n sharedCipherData\n receiverDirectories {\n edges {\n node {\n id\n sharedCipherData\n sharedKey {\n id\n }\n accessRole\n itemKey {\n id\n }\n directory {\n id\n keyId\n }\n }\n }\n }\n receiverFiles {\n edges {\n node {\n id\n sharedCipherData\n sharedKey {\n id\n }\n accessRole\n itemKey {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n}"])));
13722
+ var SharedScenarioQuery = gqlTyped(templateObject_2$n || (templateObject_2$n = __makeTemplateObject(["\nquery SharedScenarioQuery($scenarioId: LrRelayIdInput!) {\n sharedScenario(id: $scenarioId) {\n id\n state\n tp {\n id\n }\n asClaimant {\n sharedKey {\n id\n }\n sharedCipherData\n }\n asReceiver {\n sharedKey {\n id\n }\n sharedCipherData\n pbk {\n id\n }\n receiverDirectories {\n edges {\n node {\n id\n wrappedItemKey\n }\n }\n }\n }\n assembly {\n asApprovers {\n edges {\n node {\n id\n sharedKey {\n id\n }\n sharedCipherData\n }\n }\n }\n }\n sharedClaim {\n\t \t\tid\n isClaimant\n claim {\n state\n asClaimApprovers {\n edges {\n node {\n id\n state\n sharedKey {\n id\n }\n sharedCipherApprovalData\n sharedCipherPartialAssemblyKey\n receiverApprovals {\n edges {\n node {\n id\n pxk {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n asClaimReceiver {\n received\n approvals {\n edges {\n node {\n receiverCipher\n receiverCipherPartialAssemblyKey\n pxk {\n id\n }\n }\n }\n }\n }\n }\n }\n}\n"], ["\nquery SharedScenarioQuery($scenarioId: LrRelayIdInput!) {\n sharedScenario(id: $scenarioId) {\n id\n state\n tp {\n id\n }\n asClaimant {\n sharedKey {\n id\n }\n sharedCipherData\n }\n asReceiver {\n sharedKey {\n id\n }\n sharedCipherData\n pbk {\n id\n }\n receiverDirectories {\n edges {\n node {\n id\n wrappedItemKey\n }\n }\n }\n }\n assembly {\n asApprovers {\n edges {\n node {\n id\n sharedKey {\n id\n }\n sharedCipherData\n }\n }\n }\n }\n sharedClaim {\n\t \t\tid\n isClaimant\n claim {\n state\n asClaimApprovers {\n edges {\n node {\n id\n state\n sharedKey {\n id\n }\n sharedCipherApprovalData\n sharedCipherPartialAssemblyKey\n receiverApprovals {\n edges {\n node {\n id\n pxk {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n asClaimReceiver {\n received\n approvals {\n edges {\n node {\n receiverCipher\n receiverCipherPartialAssemblyKey\n pxk {\n id\n }\n }\n }\n }\n }\n }\n }\n}\n"])));
13723
+ var templateObject_1$r, templateObject_2$n;
13694
13724
 
13695
13725
  function throwClaimIdMismatch() {
13696
13726
  throw new LrBadArgumentException('claimId does not match with the current claimId of the scenario');
@@ -13745,7 +13775,6 @@
13745
13775
  });
13746
13776
  });
13747
13777
  };
13748
- // TODO auto add the missing existing receivers and directories
13749
13778
  ScenarioService.prototype.updateScenarioMutation = function (options) {
13750
13779
  return __awaiter(this, void 0, void 0, function () {
13751
13780
  var scenario, input;