@lifeready/core 8.0.1 → 8.0.2

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 (31) hide show
  1. package/bundles/lifeready-core.umd.js +232 -177
  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/_common/queries.gql.js +2 -149
  6. package/esm2015/lib/api/lr-graphql/lr-mutation.js +5 -3
  7. package/esm2015/lib/api/types/lr-graphql.types.js +11 -11
  8. package/esm2015/lib/item/item.gql.private.js +7 -7
  9. package/esm2015/lib/item/item.service.js +10 -10
  10. package/esm2015/lib/key/key-graph.service.js +14 -1
  11. package/esm2015/lib/key/key.types.js +1 -1
  12. package/esm2015/lib/scenario/scenario.gql.js +1 -1
  13. package/esm2015/lib/scenario/scenario.private.gql.js +36 -31
  14. package/esm2015/lib/scenario/scenario.service.js +32 -10
  15. package/esm2015/lib/trusted-party/trusted-party.gql.js +35 -35
  16. package/esm2015/lib/trusted-party/trusted-party.service.js +32 -32
  17. package/esm2015/lib/trusted-party/trusted-party.types.js +1 -1
  18. package/fesm2015/lifeready-core.js +173 -278
  19. package/fesm2015/lifeready-core.js.map +1 -1
  20. package/lib/_common/queries.gql.d.ts +0 -6
  21. package/lib/api/types/lr-graphql.types.d.ts +24 -20
  22. package/lib/item/item.gql.private.d.ts +6 -6
  23. package/lib/item/item.service.d.ts +2 -2
  24. package/lib/key/key.types.d.ts +1 -0
  25. package/lib/scenario/scenario.gql.d.ts +1 -1
  26. package/lib/scenario/scenario.service.d.ts +11 -6
  27. package/lib/trusted-party/trusted-party.gql.d.ts +34 -34
  28. package/lib/trusted-party/trusted-party.service.d.ts +16 -16
  29. package/lib/trusted-party/trusted-party.types.d.ts +2 -2
  30. package/lifeready-core.metadata.json +1 -1
  31. package/package.json +1 -1
@@ -1383,6 +1383,19 @@ class KeyGraphService {
1383
1383
  else {
1384
1384
  nextRawKey = yield this.encryptionService.decrypt(wrappingKey, wrappedKey);
1385
1385
  }
1386
+ // Handle nested keys. i.e. Enc{K1}{K2}{K3}(raw key 4), where:
1387
+ // K1: link.wrappingKey
1388
+ // K2: link.nestedWrappingKey[0]
1389
+ // K3: link.nestedWrappingKey[1]
1390
+ if (link.type == KeyGraphEdgeType.KeyLink) {
1391
+ const data = link.data;
1392
+ if (data.nestedWrappingKeyIds) {
1393
+ for (const nestedWrappingKeyId of data.nestedWrappingKeyIds) {
1394
+ const key = yield this.getKey(nestedWrappingKeyId);
1395
+ nextRawKey = yield this.encryptionService.decrypt(key.jwk, nextRawKey);
1396
+ }
1397
+ }
1398
+ }
1386
1399
  dstKey.jwk = yield KeyFactoryService.asKey(nextRawKey);
1387
1400
  dstKey.task = null;
1388
1401
  });
@@ -1586,6 +1599,7 @@ const KeyGraphFragmentBase = `
1586
1599
  keyLinks {
1587
1600
  keyId
1588
1601
  wrappingKeyId
1602
+ nestedWrappingKeyIds
1589
1603
  wrappedKey
1590
1604
  }
1591
1605
  passKeys {
@@ -1604,51 +1618,6 @@ fragment KeyGraphFragment on KeyGraphType ${KeyGraphFragmentBase}
1604
1618
  `;
1605
1619
  const KeyGraphField = `keyGraph ${KeyGraphFragmentBase}`;
1606
1620
  const FetchKeyGraphField = `keyGraph: fetchKeyGraph ${KeyGraphFragmentBase}`;
1607
- const FileQuery = gql `
1608
- query File($id: LrRelayIdInput!, $cachedKeyIds: [LrRelayIdInput!]) {
1609
- file(id: $id) {
1610
- id
1611
- keyId
1612
- currentVersion {
1613
- id
1614
- operation
1615
- state {
1616
- keyId
1617
- plainMeta
1618
- cipherMeta
1619
- contentResource
1620
- }
1621
- }
1622
- versions {
1623
- edges {
1624
- node {
1625
- id
1626
- state {
1627
- keyId
1628
- plainMeta
1629
- cipherMeta
1630
- contentResource
1631
- }
1632
- }
1633
- }
1634
- }
1635
- parentDirectoryLinks {
1636
- edges {
1637
- node {
1638
- parentDirectory {
1639
- id
1640
- plainMeta
1641
- }
1642
- }
1643
- }
1644
- }
1645
- }
1646
- keyGraph(cachedKeyIds: $cachedKeyIds) {
1647
- ...KeyGraphFragment
1648
- }
1649
- }
1650
- ${KeyGraphFragment}
1651
- `;
1652
1621
  const DirectoryQuery = gql `
1653
1622
  query Directory($id: LrRelayIdInput!, $cachedKeyIds: [LrRelayIdInput!]) {
1654
1623
  directory(id: $id) {
@@ -1663,109 +1632,6 @@ const DirectoryQuery = gql `
1663
1632
  }
1664
1633
  ${KeyGraphFragment}
1665
1634
  `;
1666
- const CreateFileQuery = gql `
1667
- mutation CreateFile($input: CreateFileInput!) {
1668
- createFile(input: $input) {
1669
- file {
1670
- id
1671
- }
1672
- }
1673
- }
1674
- `;
1675
- const UpdateFileQuery = gql `
1676
- mutation UpdateFile($input: UpdateFileInput!) {
1677
- updateFile(input: $input) {
1678
- file {
1679
- id
1680
- currentVersion {
1681
- id
1682
- state {
1683
- id
1684
- }
1685
- }
1686
- }
1687
- }
1688
- }
1689
- `;
1690
- const RevertFileQuery = gql `
1691
- mutation RevertFile($input: RevertFileInput!) {
1692
- revertFile(input: $input) {
1693
- file {
1694
- id
1695
- currentVersion {
1696
- id
1697
- state {
1698
- id
1699
- }
1700
- }
1701
- }
1702
- }
1703
- }
1704
- `;
1705
- const MoveFileQuery = gql `
1706
- mutation MoveFile(
1707
- $fileId: LrRelayIdInput!
1708
- $fromParentDirectoryId: LrRelayIdInput!
1709
- $toParentDirectoryId: LrRelayIdInput!
1710
- $wrappingKeyId: LrRelayIdInput!
1711
- $wrappedKey: String!
1712
- ) {
1713
- moveFile(
1714
- input: {
1715
- fileId: $fileId
1716
- fromParentDirectoryId: $fromParentDirectoryId
1717
- toParentDirectoryId: $toParentDirectoryId
1718
- wrappingKeyId: $wrappingKeyId
1719
- wrappedKey: $wrappedKey
1720
- }
1721
- ) {
1722
- file {
1723
- id
1724
- parentDirectoryLinks {
1725
- edges {
1726
- node {
1727
- parentDirectory {
1728
- plainMeta
1729
- }
1730
- }
1731
- }
1732
- }
1733
- }
1734
- }
1735
- }
1736
- `;
1737
- const MoveDirectoryQuery = gql `
1738
- mutation MoveDirectory(
1739
- $directoryId: LrRelayIdInput!
1740
- $fromParentDirectoryId: LrRelayIdInput
1741
- $toParentDirectoryId: LrRelayIdInput!
1742
- $wrappedKey: String!
1743
- $wrappingKeyId: LrRelayIdInput!
1744
- ) {
1745
- moveDirectory(
1746
- input: {
1747
- directoryId: $directoryId
1748
- fromParentDirectoryId: $fromParentDirectoryId
1749
- toParentDirectoryId: $toParentDirectoryId
1750
- wrappedKey: $wrappedKey
1751
- wrappingKeyId: $wrappingKeyId
1752
- }
1753
- ) {
1754
- directory {
1755
- id
1756
- parentDirectoryLinks {
1757
- edges {
1758
- node {
1759
- parentDirectory {
1760
- plainMeta
1761
- }
1762
- }
1763
- }
1764
- }
1765
- }
1766
- }
1767
- }
1768
- `;
1769
1635
 
1770
1636
  /* eslint-disable @typescript-eslint/no-explicit-any */
1771
1637
  /**
@@ -2415,7 +2281,9 @@ class LrMutation extends LrMutationBase {
2415
2281
  const mutationNode = getMutation(mutationDoc);
2416
2282
  const fragmentMap = {};
2417
2283
  getFragments(fragments).forEach((fragment) => {
2418
- fragmentMap[fragment.name.value] = fragment;
2284
+ // Using '_' as the delimiter for the dummy suffix which only serves to make fragment names
2285
+ // unique since apollo client demands unique fragment names.
2286
+ fragmentMap[fragment.name.value.split('_')[0]] = fragment;
2419
2287
  });
2420
2288
  const replaceFieldSelection = (selection) => {
2421
2289
  const field = selection;
@@ -2428,7 +2296,7 @@ class LrMutation extends LrMutationBase {
2428
2296
  // a fragment using the same name as the mutation field.
2429
2297
  // We will also rename the fragment to the same name.
2430
2298
  field.selectionSet.selections = [
2431
- Object.assign(Object.assign({}, fragmentSpreadAstSelection), { name: name(fieldName) }),
2299
+ Object.assign(Object.assign({}, fragmentSpreadAstSelection), { name: name(fragment.name.value) }),
2432
2300
  ];
2433
2301
  };
2434
2302
  mutationNode.selectionSet.selections.forEach((selection) => {
@@ -2838,16 +2706,16 @@ var PlanState;
2838
2706
  PlanState["ENABLED"] = "ENABLED";
2839
2707
  PlanState["DISABLED"] = "DISABLED";
2840
2708
  })(PlanState || (PlanState = {}));
2841
- var TpShareTypeChoice;
2842
- (function (TpShareTypeChoice) {
2843
- TpShareTypeChoice["TP"] = "TP";
2844
- TpShareTypeChoice["DETACHED"] = "DETACHED";
2845
- })(TpShareTypeChoice || (TpShareTypeChoice = {}));
2846
- var TpDetachedShareStateChoice;
2847
- (function (TpDetachedShareStateChoice) {
2848
- TpDetachedShareStateChoice["IN_PROGRESS"] = "IN_PROGRESS";
2849
- TpDetachedShareStateChoice["COMPLETED"] = "COMPLETED";
2850
- })(TpDetachedShareStateChoice || (TpDetachedShareStateChoice = {}));
2709
+ var ShareTypeChoice;
2710
+ (function (ShareTypeChoice) {
2711
+ ShareTypeChoice["TP"] = "TP";
2712
+ ShareTypeChoice["DETACHED"] = "DETACHED";
2713
+ })(ShareTypeChoice || (ShareTypeChoice = {}));
2714
+ var DetachedShareStateChoice;
2715
+ (function (DetachedShareStateChoice) {
2716
+ DetachedShareStateChoice["IN_PROGRESS"] = "IN_PROGRESS";
2717
+ DetachedShareStateChoice["COMPLETED"] = "COMPLETED";
2718
+ })(DetachedShareStateChoice || (DetachedShareStateChoice = {}));
2851
2719
  var AccessRoleChoice;
2852
2720
  (function (AccessRoleChoice) {
2853
2721
  AccessRoleChoice["READER"] = "READER";
@@ -6136,18 +6004,18 @@ query FileKeyQuery($id: LrRelayIdInput!) {
6136
6004
  }
6137
6005
  }
6138
6006
  `;
6139
- const DirectoryKeyFromSharedDirectoryQuery = gqlTyped `
6140
- query DirectoryKeyFromSharedDirectoryQuery($id: LrRelayIdInput!) {
6141
- tpSharedDirectory(id: $id) {
6007
+ const DirectoryKeyFromDirectoryShareQuery = gqlTyped `
6008
+ query DirectoryKeyFromDirectoryShareQuery($id: LrRelayIdInput!) {
6009
+ directoryShare(id: $id) {
6142
6010
  item {
6143
6011
  keyId
6144
6012
  }
6145
6013
  }
6146
6014
  }
6147
6015
  `;
6148
- const FileKeyFromSharedFileQuery = gqlTyped `
6149
- query FileKeyFromSharedFileQuery($id: LrRelayIdInput!) {
6150
- tpSharedFile(id: $id) {
6016
+ const FileKeyFromFileShareQuery = gqlTyped `
6017
+ query FileKeyFromFileShareQuery($id: LrRelayIdInput!) {
6018
+ fileShare(id: $id) {
6151
6019
  item {
6152
6020
  keyId
6153
6021
  }
@@ -6207,24 +6075,24 @@ let ItemService = ItemService_1 = class ItemService extends LrService {
6207
6075
  })).file.keyId;
6208
6076
  });
6209
6077
  }
6210
- getDirectoryKeyIdFromSharedDirectory(sharedDirectoryId) {
6078
+ getDirectoryKeyIdFromDirectoryShare(directoryShareId) {
6211
6079
  return __awaiter(this, void 0, void 0, function* () {
6212
6080
  return (yield this.query({
6213
- query: DirectoryKeyFromSharedDirectoryQuery,
6081
+ query: DirectoryKeyFromDirectoryShareQuery,
6214
6082
  variables: {
6215
- id: sharedDirectoryId,
6083
+ id: directoryShareId,
6216
6084
  },
6217
- })).tpSharedDirectory.item.keyId;
6085
+ })).directoryShare.item.keyId;
6218
6086
  });
6219
6087
  }
6220
- getFileKeyIdFromSharedFile(sharedFileId) {
6088
+ getFileKeyIdFromFileShare(fileShareId) {
6221
6089
  return __awaiter(this, void 0, void 0, function* () {
6222
6090
  return (yield this.query({
6223
- query: FileKeyFromSharedFileQuery,
6091
+ query: FileKeyFromFileShareQuery,
6224
6092
  variables: {
6225
- id: sharedFileId,
6093
+ id: fileShareId,
6226
6094
  },
6227
- })).tpSharedFile.item.keyId;
6095
+ })).fileShare.item.keyId;
6228
6096
  });
6229
6097
  }
6230
6098
  getDirectoryKey(directoryId, directoryKeyId) {
@@ -8701,36 +8569,38 @@ query ScenarioQuery(
8701
8569
  id
8702
8570
  }
8703
8571
  sharedCipherData
8704
- receiverDirectories {
8705
- edges {
8706
- node {
8707
- id
8708
- sharedCipherData
8709
- sharedKey {
8710
- id
8711
- }
8712
- accessRole
8713
- itemKey {
8714
- id
8715
- }
8716
- directory {
8572
+ receiverItems {
8573
+ receiverDirectories {
8574
+ edges {
8575
+ node {
8717
8576
  id
8718
- keyId
8577
+ sharedCipherData
8578
+ sharedKey {
8579
+ id
8580
+ }
8581
+ accessRole
8582
+ itemKey {
8583
+ id
8584
+ }
8585
+ directory {
8586
+ id
8587
+ keyId
8588
+ }
8719
8589
  }
8720
8590
  }
8721
8591
  }
8722
- }
8723
- receiverFiles {
8724
- edges {
8725
- node {
8726
- id
8727
- sharedCipherData
8728
- sharedKey {
8729
- id
8730
- }
8731
- accessRole
8732
- itemKey {
8592
+ receiverFiles {
8593
+ edges {
8594
+ node {
8733
8595
  id
8596
+ sharedCipherData
8597
+ sharedKey {
8598
+ id
8599
+ }
8600
+ accessRole
8601
+ itemKey {
8602
+ id
8603
+ }
8734
8604
  }
8735
8605
  }
8736
8606
  }
@@ -8762,11 +8632,13 @@ query SharedScenarioQuery($scenarioId: LrRelayIdInput!) {
8762
8632
  pbk {
8763
8633
  id
8764
8634
  }
8765
- receiverDirectories {
8766
- edges {
8767
- node {
8768
- id
8769
- wrappedItemKey
8635
+ receiverItems {
8636
+ receiverDirectories {
8637
+ edges {
8638
+ node {
8639
+ id
8640
+ wrappedItemKey
8641
+ }
8770
8642
  }
8771
8643
  }
8772
8644
  }
@@ -8815,6 +8687,7 @@ query SharedScenarioQuery($scenarioId: LrRelayIdInput!) {
8815
8687
  }
8816
8688
  asClaimReceiver {
8817
8689
  received
8690
+ assemblyKeyId
8818
8691
  approvals {
8819
8692
  edges {
8820
8693
  node {
@@ -8988,15 +8861,15 @@ let ScenarioService = class ScenarioService extends LrService {
8988
8861
  }
8989
8862
  receiveClaim(scenarioId, sharedClaimId) {
8990
8863
  return __awaiter(this, void 0, void 0, function* () {
8991
- return this.mutate(this.receiveClaimMutation(scenarioId, sharedClaimId));
8864
+ return this.mutate(this.receiveClaim2Mutation(scenarioId, sharedClaimId));
8992
8865
  });
8993
8866
  }
8994
- receiveClaimMutation(scenarioId, sharedClaimId) {
8867
+ receiveClaim2Mutation(scenarioId, sharedClaimId) {
8995
8868
  return __awaiter(this, void 0, void 0, function* () {
8996
8869
  return new LrMutation({
8997
8870
  mutation: ReceiveScenarioClaimMutation,
8998
8871
  variables: {
8999
- input: yield this.prepareClaim(scenarioId, sharedClaimId),
8872
+ input: yield this.prepareReceiveClaim2(scenarioId, sharedClaimId),
9000
8873
  },
9001
8874
  });
9002
8875
  });
@@ -9147,8 +9020,6 @@ let ScenarioService = class ScenarioService extends LrService {
9147
9020
  const directoryKey = yield this.itemService.getDirectoryKey(options.directoryId, options.directoryKeyId);
9148
9021
  const sharedCipherData = yield this.keyGraph.encryptToString(receiverSharedKey, options.sharedCipherDataClearJson || '');
9149
9022
  let wrappedItemKey = yield this.keyGraph.encryptToString(receiverSharedKey, directoryKey.jwk.toJSON(true));
9150
- // TODO fetch assemblyKeyId. We are changing it such that there is always an assembly
9151
- // before receivers can be added.
9152
9023
  wrappedItemKey = yield this.keyGraph.encryptToString(assemblyKey, wrappedItemKey);
9153
9024
  return {
9154
9025
  directoryId: options.directoryId,
@@ -9172,7 +9043,7 @@ let ScenarioService = class ScenarioService extends LrService {
9172
9043
  const deleteDirectoriesOptions = options.deleteDirectories || [];
9173
9044
  const updateDirectoriesOptions = options.updateDirectories || [];
9174
9045
  // Fill in any missing update directories
9175
- mapEdges(existingReceiver.receiverDirectories).forEach((existingDirectory) => {
9046
+ mapEdges(existingReceiver.receiverItems.receiverDirectories).forEach((existingDirectory) => {
9176
9047
  if (deleteDirectoriesOptions.includes(existingDirectory.directory.id)) {
9177
9048
  return;
9178
9049
  }
@@ -9195,7 +9066,7 @@ let ScenarioService = class ScenarioService extends LrService {
9195
9066
  }
9196
9067
  prepareExistingReceiver(existingReceiver, assemblyKey) {
9197
9068
  return __awaiter(this, void 0, void 0, function* () {
9198
- const updateDirectories = mapEdges(existingReceiver.receiverDirectories).map((receiverDirectory) => ({
9069
+ const updateDirectories = mapEdges(existingReceiver.receiverItems.receiverDirectories).map((receiverDirectory) => ({
9199
9070
  directoryId: receiverDirectory.directory.id,
9200
9071
  directoryKeyId: receiverDirectory.directory.keyId,
9201
9072
  accessRole: receiverDirectory.accessRole,
@@ -9254,7 +9125,29 @@ let ScenarioService = class ScenarioService extends LrService {
9254
9125
  return mutationInput;
9255
9126
  });
9256
9127
  }
9257
- prepareClaim(scenarioId, sharedClaimId) {
9128
+ prepareReceiveClaim2(scenarioId, sharedClaimId) {
9129
+ return __awaiter(this, void 0, void 0, function* () {
9130
+ // Get all the shared items
9131
+ const sharedScenario = (yield this.getSharedScenario(scenarioId, sharedClaimId)).sharedScenario;
9132
+ if (sharedScenario.state !== ScenarioState.APPROVED) {
9133
+ throwClaimNotApproved();
9134
+ }
9135
+ const approvals = mapEdges(sharedScenario.sharedClaim.asClaimReceiver.approvals);
9136
+ const assemblyKey = yield this.recoverAssemblyKey(approvals);
9137
+ // Wrap assembly key with shared key.
9138
+ //???
9139
+ // This sharedKey is created just for this scenario. It's wrapped by the tpSharedKey.
9140
+ const sharedKey = yield this.keyGraph.getKey(sharedScenario.asReceiver.sharedKey.id);
9141
+ const sharedKeyWrappedAssemblyKey = yield this.keyGraph.encryptToString(sharedKey, assemblyKey.toJSON(true));
9142
+ return {
9143
+ scenarioClaimId: sharedClaimId,
9144
+ sharedKeyWrappedAssemblyKey,
9145
+ sharedKeyId: sharedKey.id,
9146
+ assemblyKeyId: sharedScenario.sharedClaim.asClaimReceiver.assemblyKeyId,
9147
+ };
9148
+ });
9149
+ }
9150
+ prepareReceiveClaim(scenarioId, sharedClaimId) {
9258
9151
  return __awaiter(this, void 0, void 0, function* () {
9259
9152
  // Get all the shared items
9260
9153
  const sharedScenario = (yield this.getSharedScenario(scenarioId, sharedClaimId)).sharedScenario;
@@ -9264,12 +9157,14 @@ let ScenarioService = class ScenarioService extends LrService {
9264
9157
  const approvals = mapEdges(sharedScenario.sharedClaim.asClaimReceiver.approvals);
9265
9158
  const assemblyKey = yield this.recoverAssemblyKey(approvals);
9266
9159
  // Decrypt all items
9267
- const receiverDirectories = yield Promise.all(sharedScenario.asReceiver.receiverDirectories.edges
9160
+ const receiverDirectories = yield Promise.all(sharedScenario.asReceiver.receiverItems.receiverDirectories.edges
9268
9161
  .map((edge) => edge.node)
9269
9162
  .map((receiverDirectory) => __awaiter(this, void 0, void 0, function* () {
9270
9163
  const wrappedItemKey = yield this.encryptionService.decrypt(assemblyKey, receiverDirectory.wrappedItemKey);
9271
9164
  return {
9272
9165
  receiverDirectoryId: receiverDirectory.id,
9166
+ // Looks like receiverDirectory.wrappedItemKey has no other content in side it except a wrapped key.
9167
+ // So we can turn this in to a doubly wrapped key and just release the assembly key.
9273
9168
  receiverSharedKeyWrappedItemKey: wrappedItemKey,
9274
9169
  };
9275
9170
  })));
@@ -10083,7 +9978,7 @@ mutation DeleteTpMutation($input: DeleteTpInput!) {
10083
9978
  const ShareDirectoryMutation = gqlTyped `
10084
9979
  mutation ShareDirectoryMutation($input: ShareDirectoryInput!) {
10085
9980
  shareDirectory(input: $input) {
10086
- tpSharedDirectory {
9981
+ directoryShare {
10087
9982
  id
10088
9983
  }
10089
9984
  }
@@ -10092,7 +9987,7 @@ const ShareDirectoryMutation = gqlTyped `
10092
9987
  const UnshareDirectoryMutation = gqlTyped `
10093
9988
  mutation UnshareDirectoryMutation($input: UnshareDirectoryInput!) {
10094
9989
  unshareDirectory(input: $input) {
10095
- tpSharedDirectory {
9990
+ directoryShare {
10096
9991
  id
10097
9992
  }
10098
9993
  }
@@ -10101,7 +9996,7 @@ const UnshareDirectoryMutation = gqlTyped `
10101
9996
  const ShareFileMutation = gqlTyped `
10102
9997
  mutation ShareFileMutation($input: ShareFileInput!) {
10103
9998
  shareFile(input: $input) {
10104
- tpSharedFile {
9999
+ fileShare {
10105
10000
  id
10106
10001
  }
10107
10002
  }
@@ -10110,75 +10005,75 @@ const ShareFileMutation = gqlTyped `
10110
10005
  const UnshareFileMutation = gqlTyped `
10111
10006
  mutation UnshareFileMutation($input: UnshareFileInput!) {
10112
10007
  unshareFile(input: $input) {
10113
- tpSharedFile {
10008
+ fileShare {
10114
10009
  id
10115
10010
  }
10116
10011
  }
10117
10012
  }
10118
10013
  `;
10119
- const CreateSharedDirectoryMutation = gqlTyped `
10120
- mutation CreateSharedDirectoryMutation($input: CreateSharedDirectoryInput!) {
10121
- createSharedDirectory(input: $input) {
10122
- tpSharedDirectory {
10014
+ const CreateDirectoryShareMutation = gqlTyped `
10015
+ mutation CreateDirectoryShareMutation($input: CreateDirectoryShareInput!) {
10016
+ createDirectoryShare(input: $input) {
10017
+ directoryShare {
10123
10018
  id
10124
10019
  }
10125
10020
  }
10126
10021
  }
10127
10022
  `;
10128
- const CreateSharedFileMutation = gqlTyped `
10129
- mutation CreateSharedFileMutation($input: CreateSharedFileInput!) {
10130
- createSharedFile(input: $input) {
10131
- tpSharedFile {
10023
+ const CreateFileShareMutation = gqlTyped `
10024
+ mutation CreateFileShareMutation($input: CreateFileShareInput!) {
10025
+ createFileShare(input: $input) {
10026
+ fileShare {
10132
10027
  id
10133
10028
  }
10134
10029
  }
10135
10030
  }
10136
10031
  `;
10137
- const UpdateSharedDirectoryMutation = gqlTyped `
10138
- mutation UpdateSharedDirectoryMutation($input: UpdateSharedDirectoryInput!) {
10139
- updateSharedDirectory(input: $input) {
10140
- tpSharedDirectory {
10032
+ const UpdateDirectoryShareMutation = gqlTyped `
10033
+ mutation UpdateDirectoryShareMutation($input: UpdateDirectoryShareInput!) {
10034
+ updateDirectoryShare(input: $input) {
10035
+ directoryShare {
10141
10036
  id
10142
10037
  }
10143
10038
  }
10144
10039
  }
10145
10040
  `;
10146
- const UpdateSharedFileMutation = gqlTyped `
10147
- mutation UpdateSharedFileMutation($input: UpdateSharedFileInput!) {
10148
- updateSharedFile(input: $input) {
10149
- tpSharedFile {
10041
+ const UpdateFileShareMutation = gqlTyped `
10042
+ mutation UpdateFileShareMutation($input: UpdateFileShareInput!) {
10043
+ updateFileShare(input: $input) {
10044
+ fileShare {
10150
10045
  id
10151
10046
  }
10152
10047
  }
10153
10048
  }
10154
10049
  `;
10155
- const DeleteSharedDirectoryMutation = gqlTyped `
10156
- mutation DeleteSharedDirectoryMutation($input: DeleteSharedDirectoryInput!) {
10157
- deleteSharedDirectory(input: $input) {
10050
+ const DeleteDirectoryShareMutation = gqlTyped `
10051
+ mutation DeleteDirectoryShareMutation($input: DeleteDirectoryShareInput!) {
10052
+ deleteDirectoryShare(input: $input) {
10158
10053
  id
10159
10054
  }
10160
10055
  }
10161
10056
  `;
10162
- const DeleteSharedFileMutation = gqlTyped `
10163
- mutation DeleteSharedFileMutation($input: DeleteSharedFileInput!) {
10164
- deleteSharedFile(input: $input) {
10057
+ const DeleteFileShareMutation = gqlTyped `
10058
+ mutation DeleteFileShareMutation($input: DeleteFileShareInput!) {
10059
+ deleteFileShare(input: $input) {
10165
10060
  id
10166
10061
  }
10167
10062
  }
10168
10063
  `;
10169
- const CompleteDetachedSharedDirectoryMutation = gqlTyped `
10170
- mutation CompleteDetachedSharedDirectoryMutation($input: CompleteDetachedSharedDirectoryInput!) {
10171
- completeDetachedSharedDirectory(input: $input) {
10172
- tpSharedDirectory {
10064
+ const CompleteDetachedDirectoryShareMutation = gqlTyped `
10065
+ mutation CompleteDetachedDirectoryShareMutation($input: CompleteDetachedDirectoryShareInput!) {
10066
+ completeDetachedDirectoryShare(input: $input) {
10067
+ directoryShare {
10173
10068
  id
10174
10069
  }
10175
10070
  }
10176
10071
  }
10177
10072
  `;
10178
- const CompleteDetachedSharedFileMutation = gqlTyped `
10179
- mutation CompleteDetachedSharedFileMutation($input: CompleteDetachedSharedFileInput!) {
10180
- completeDetachedSharedFile(input: $input) {
10181
- tpSharedFile {
10073
+ const CompleteDetachedFileShareMutation = gqlTyped `
10074
+ mutation CompleteDetachedFileShareMutation($input: CompleteDetachedFileShareInput!) {
10075
+ completeDetachedFileShare(input: $input) {
10076
+ fileShare {
10182
10077
  id
10183
10078
  }
10184
10079
  }
@@ -10331,28 +10226,28 @@ let TrustedPartyService = class TrustedPartyService extends LrService {
10331
10226
  });
10332
10227
  });
10333
10228
  }
10334
- createSharedDirectory(options) {
10229
+ createDirectoryShare(options) {
10335
10230
  return __awaiter(this, void 0, void 0, function* () {
10336
- return this.mutate(this.createSharedDirectoryMutation(options));
10231
+ return this.mutate(this.createDirectoryShareMutation(options));
10337
10232
  });
10338
10233
  }
10339
- createSharedDirectoryMutation(options) {
10234
+ createDirectoryShareMutation(options) {
10340
10235
  return __awaiter(this, void 0, void 0, function* () {
10341
10236
  return new LrMutation({
10342
- mutation: CreateSharedDirectoryMutation,
10237
+ mutation: CreateDirectoryShareMutation,
10343
10238
  variables: yield this.prepareCreateSharedItemMutation(Object.assign(Object.assign({}, options), { isDirectory: true })),
10344
10239
  });
10345
10240
  });
10346
10241
  }
10347
- createSharedFile(options) {
10242
+ createFileShare(options) {
10348
10243
  return __awaiter(this, void 0, void 0, function* () {
10349
- return this.mutate(this.createSharedFileMutation(options));
10244
+ return this.mutate(this.createFileShareMutation(options));
10350
10245
  });
10351
10246
  }
10352
- createSharedFileMutation(options) {
10247
+ createFileShareMutation(options) {
10353
10248
  return __awaiter(this, void 0, void 0, function* () {
10354
10249
  return new LrMutation({
10355
- mutation: CreateSharedFileMutation,
10250
+ mutation: CreateFileShareMutation,
10356
10251
  variables: yield this.prepareCreateSharedItemMutation(Object.assign(Object.assign({}, options), { isDirectory: false })),
10357
10252
  });
10358
10253
  });
@@ -10380,28 +10275,28 @@ let TrustedPartyService = class TrustedPartyService extends LrService {
10380
10275
  };
10381
10276
  });
10382
10277
  }
10383
- updateSharedDirectory(options) {
10278
+ updateDirectoryShare(options) {
10384
10279
  return __awaiter(this, void 0, void 0, function* () {
10385
- return this.mutate(this.updateSharedDirectoryMutation(options));
10280
+ return this.mutate(this.updateDirectoryShareMutation(options));
10386
10281
  });
10387
10282
  }
10388
- updateSharedDirectoryMutation(options) {
10283
+ updateDirectoryShareMutation(options) {
10389
10284
  return __awaiter(this, void 0, void 0, function* () {
10390
10285
  return new LrMutation({
10391
- mutation: UpdateSharedDirectoryMutation,
10286
+ mutation: UpdateDirectoryShareMutation,
10392
10287
  variables: this.prepareUpdateSharedItemMutation(options),
10393
10288
  });
10394
10289
  });
10395
10290
  }
10396
- updateSharedFile(options) {
10291
+ updateFileShare(options) {
10397
10292
  return __awaiter(this, void 0, void 0, function* () {
10398
- return this.mutate(this.updateSharedFileMutation(options));
10293
+ return this.mutate(this.updateFileShareMutation(options));
10399
10294
  });
10400
10295
  }
10401
- updateSharedFileMutation(options) {
10296
+ updateFileShareMutation(options) {
10402
10297
  return __awaiter(this, void 0, void 0, function* () {
10403
10298
  return new LrMutation({
10404
- mutation: UpdateSharedFileMutation,
10299
+ mutation: UpdateFileShareMutation,
10405
10300
  variables: this.prepareUpdateSharedItemMutation(options),
10406
10301
  });
10407
10302
  });
@@ -10415,15 +10310,15 @@ let TrustedPartyService = class TrustedPartyService extends LrService {
10415
10310
  },
10416
10311
  };
10417
10312
  }
10418
- deleteSharedDirectory(id) {
10313
+ deleteDirectoryShare(id) {
10419
10314
  return __awaiter(this, void 0, void 0, function* () {
10420
- return this.mutate(this.deleteSharedDirectoryMutation(id));
10315
+ return this.mutate(this.deleteDirectoryShareMutation(id));
10421
10316
  });
10422
10317
  }
10423
- deleteSharedDirectoryMutation(id) {
10318
+ deleteDirectoryShareMutation(id) {
10424
10319
  return __awaiter(this, void 0, void 0, function* () {
10425
10320
  return new LrMutation({
10426
- mutation: DeleteSharedDirectoryMutation,
10321
+ mutation: DeleteDirectoryShareMutation,
10427
10322
  variables: {
10428
10323
  input: {
10429
10324
  id,
@@ -10432,28 +10327,28 @@ let TrustedPartyService = class TrustedPartyService extends LrService {
10432
10327
  });
10433
10328
  });
10434
10329
  }
10435
- completeDetachedSharedDirectory(options) {
10330
+ completeDetachedDirectoryShare(options) {
10436
10331
  return __awaiter(this, void 0, void 0, function* () {
10437
- return this.mutate(this.completeDetachedSharedDirectoryMutation(options));
10332
+ return this.mutate(this.completeDetachedDirectoryShareMutation(options));
10438
10333
  });
10439
10334
  }
10440
- completeDetachedSharedDirectoryMutation(options) {
10335
+ completeDetachedDirectoryShareMutation(options) {
10441
10336
  return __awaiter(this, void 0, void 0, function* () {
10442
10337
  return new LrMutation({
10443
- mutation: CompleteDetachedSharedDirectoryMutation,
10338
+ mutation: CompleteDetachedDirectoryShareMutation,
10444
10339
  variables: yield this.prepareCompleteDetachedSharedItemMutation(Object.assign(Object.assign({}, options), { isDirectory: true })),
10445
10340
  });
10446
10341
  });
10447
10342
  }
10448
- completeDetachedSharedFile(options) {
10343
+ completeDetachedFileShare(options) {
10449
10344
  return __awaiter(this, void 0, void 0, function* () {
10450
- return this.mutate(this.completeDetachedSharedFileMutation(options));
10345
+ return this.mutate(this.completeDetachedFileShareMutation(options));
10451
10346
  });
10452
10347
  }
10453
- completeDetachedSharedFileMutation(options) {
10348
+ completeDetachedFileShareMutation(options) {
10454
10349
  return __awaiter(this, void 0, void 0, function* () {
10455
10350
  return new LrMutation({
10456
- mutation: CompleteDetachedSharedFileMutation,
10351
+ mutation: CompleteDetachedFileShareMutation,
10457
10352
  variables: yield this.prepareCompleteDetachedSharedItemMutation(Object.assign(Object.assign({}, options), { isDirectory: false })),
10458
10353
  });
10459
10354
  });
@@ -10462,8 +10357,8 @@ let TrustedPartyService = class TrustedPartyService extends LrService {
10462
10357
  return __awaiter(this, void 0, void 0, function* () {
10463
10358
  const { sharedItemId, itemKeyId, isDirectory } = options;
10464
10359
  const itemKey = yield this.keyGraph.getKey(itemKeyId, () => isDirectory
10465
- ? this.itemService.getDirectoryKeyIdFromSharedDirectory(sharedItemId)
10466
- : this.itemService.getFileKeyIdFromSharedFile(sharedItemId));
10360
+ ? this.itemService.getDirectoryKeyIdFromDirectoryShare(sharedItemId)
10361
+ : this.itemService.getFileKeyIdFromFileShare(sharedItemId));
10467
10362
  const rootKey = this.keyService.currentRootKey;
10468
10363
  const wrappedKey = yield this.keyGraph.wrapKey(rootKey, itemKey.jwk);
10469
10364
  return {
@@ -10755,5 +10650,5 @@ UserService.ctorParameters = () => [
10755
10650
  * Generated bundle index. Do not edit.
10756
10651
  */
10757
10652
 
10758
- export { AccessRoleChoice, AccessRoleChoiceOrder, AccessRoleMethodChoice, ApiContactCard, ApiCurrentUser, ApproveScenarioClaimMutation, ApproveTpPasswordResetRequestMutation, ArchiveDirectoryMutation, ArchiveFileMutation, AuthService, BeginDeleteChildItemLinksWindowMutation, CancelKeyExchangeMutation, CancelScenarioClaimMutation, CancelTpPasswordResetRequestMutation, CancelUserDeleteMutation, ChangeDirectoryParentsMutation, ChangeFileParentsMutation, ClaimApproverState, ClaimState, CognitoChallengeName, CommonProcessorsService, CompleteKeyExchangeOtkMutation, CompleteTpPasswordResetRequestMutation, Config, ContactCard2Service, ContactCardAddress, ContactCardName, ContactCardsQuery, CreateContactCardMutation$1 as CreateContactCardMutation, CreateDirectoryMutation, CreateFileMutation, CreateFileQuery, CreateLbopQuery, CreateScenarioClaimMutation, CreateScenarioMutation, CreateTpAssemblyKeyChallengeMutation, CreateTpPasswordResetMutation, CurrentUserKey, CurrentUserQuery, CurrentUserSharedKeyQuery2, DebugExpireScenarioClaimMutation, DebugExpireTpPasswordResetRequestMutation, DeclineKeyExchangeMutation, DefaultProcessorOptions, DeleteDirectoryMutation, DeleteFileMutation, DeleteLbopQuery, DeleteScenarioMutation, DeleteTpPasswordResetMutation, DirectoryQuery, ERROR_SOURCE, FeatureAction, Features, FetchKeyGraphField, FileOperationField, FileQuery, FileUploadService, GetOwnedContactCardKeyIdsQuery, GetReceivedContactCardKeyIdQuery, IdleService, InitiateKeyExchangeOtkMutation, ItemService, KC_CONFIG, KcAuthException, KcBadArgumentException, KcBadLogicException, KcBadRequestException, KcBadSignatureException, KcBadStateException, KcBadTimeSyncException, KcCodeMismatchException, KcConcurrentAccessException, KcEncryptionException, KcError, KcErrorCode, KcException, KcInternalErrorException, KcLbopErrorCode, KcLockedException, KcNotFoundException, KcSuspiciousOperationException, KcUnsupportedException, KeyExchangeFields, KeyExchangeMode, KeyExchangeOtkState, KeyExchangeQuery2, KeyExchangeService, KeyExchangeState, KeyExchangeTokenQuery2, KeyExchangesQuery2, KeyGraphField, KeyGraphFragment, LbopQuery, LbopService, LbopsQuery, LifeReadyModule, LinkTypeField, LockService, LockState, LoginHistoryQuery, LrApolloService, LrGraphQLService, LrMergedMutation, LrMutation, LrMutationBase, LrService, MainContactCardFields, MainContactCardPlainFields, MainContactCardProperty, MoveDirectoryQuery, MoveFileQuery, NotificationService, OwnerPlainDataJson, PasswordChangeStatus, PasswordCheck, PasswordService, PermissionChoice, PersistService, PlanService, PlanState, PlanStateField, PreCompleteTpPasswordResetRequestMutation, ProfileDetailsService, ProfileService, QueryProcessorService, ReceiveScenarioClaimMutation, RecoveryStatus, RegisterResult, RegisterService, RejectScenarioClaimMutation, RejectTpPasswordResetRequestMutation, ReminderService, RequestUserDeleteMutation, RespondKeyExchangeOtkMutation, RevertFileMutation, RevertFileQuery, ScenarioLastClaimState, ScenarioService, ScenarioState, ServerConfigService, ServerTimeQuery, SetDirectoryConfidentialMutation, SetFileConfidentialMutation, SharedContactCard2Service, SharedTrustedPartyDetails, SharedVaultFeature, TPFeatures, TempDirectoryQuery, TimeService, TpAssemblyState, TpClaimApproverState, TpClaimState, TpDetachedShareStateChoice, TpPasswordResetRequestService, TpPasswordResetService, TpPasswordResetUserService, TpShareTypeChoice, TrustedPartiesQuery, TrustedParty, TrustedPartyDetails, TrustedPartyProperties, TrustedPartyService, TrustedPartyType, TwoFactorService, UnarchiveDirectoryMutation, UnarchiveFileMutation, UpdateContactCardMutation$1 as UpdateContactCardMutation, UpdateDirectoryMutation, UpdateFileMutation, UpdateFileQuery, UpdateLbopQuery, UpdateOwnedContactCardMutation, UpdateReceivedContactCardMutation, UpdateScenarioMutation, UpdateTpPasswordResetMutation, UserDeleteState, UserService, UserSharedKeyFields, WebCryptoService, awsFetch, configureAmplifyAuth, configureApollo, fragmentSpreadAstSelection, gqlTyped, handleApolloError, handleCognitoCallback, httpOptions, mapEdges, processConnection, throwClaimIdMismatch, throwClaimNotApproved, KeyGraphService as ɵa, EncryptionService as ɵb, KeyService as ɵc, KeyFactoryService as ɵd, LrService as ɵe, RunOutsideAngular as ɵf, LrGraphQLService as ɵg, KeyMetaService as ɵh, TpPasswordResetAssemblyController as ɵi, TpAssemblyController as ɵj, SharedContactCardFields as ɵk, SharedContactCardService as ɵl, ScenarioAssemblyController as ɵm, TpPasswordResetPrivateService as ɵn };
10653
+ export { AccessRoleChoice, AccessRoleChoiceOrder, AccessRoleMethodChoice, ApiContactCard, ApiCurrentUser, ApproveScenarioClaimMutation, ApproveTpPasswordResetRequestMutation, ArchiveDirectoryMutation, ArchiveFileMutation, AuthService, BeginDeleteChildItemLinksWindowMutation, CancelKeyExchangeMutation, CancelScenarioClaimMutation, CancelTpPasswordResetRequestMutation, CancelUserDeleteMutation, ChangeDirectoryParentsMutation, ChangeFileParentsMutation, ClaimApproverState, ClaimState, CognitoChallengeName, CommonProcessorsService, CompleteKeyExchangeOtkMutation, CompleteTpPasswordResetRequestMutation, Config, ContactCard2Service, ContactCardAddress, ContactCardName, ContactCardsQuery, CreateContactCardMutation$1 as CreateContactCardMutation, CreateDirectoryMutation, CreateFileMutation, CreateLbopQuery, CreateScenarioClaimMutation, CreateScenarioMutation, CreateTpAssemblyKeyChallengeMutation, CreateTpPasswordResetMutation, CurrentUserKey, CurrentUserQuery, CurrentUserSharedKeyQuery2, DebugExpireScenarioClaimMutation, DebugExpireTpPasswordResetRequestMutation, DeclineKeyExchangeMutation, DefaultProcessorOptions, DeleteDirectoryMutation, DeleteFileMutation, DeleteLbopQuery, DeleteScenarioMutation, DeleteTpPasswordResetMutation, DetachedShareStateChoice, DirectoryQuery, ERROR_SOURCE, FeatureAction, Features, FetchKeyGraphField, FileOperationField, FileUploadService, GetOwnedContactCardKeyIdsQuery, GetReceivedContactCardKeyIdQuery, IdleService, InitiateKeyExchangeOtkMutation, ItemService, KC_CONFIG, KcAuthException, KcBadArgumentException, KcBadLogicException, KcBadRequestException, KcBadSignatureException, KcBadStateException, KcBadTimeSyncException, KcCodeMismatchException, KcConcurrentAccessException, KcEncryptionException, KcError, KcErrorCode, KcException, KcInternalErrorException, KcLbopErrorCode, KcLockedException, KcNotFoundException, KcSuspiciousOperationException, KcUnsupportedException, KeyExchangeFields, KeyExchangeMode, KeyExchangeOtkState, KeyExchangeQuery2, KeyExchangeService, KeyExchangeState, KeyExchangeTokenQuery2, KeyExchangesQuery2, KeyGraphField, KeyGraphFragment, LbopQuery, LbopService, LbopsQuery, LifeReadyModule, LinkTypeField, LockService, LockState, LoginHistoryQuery, LrApolloService, LrGraphQLService, LrMergedMutation, LrMutation, LrMutationBase, LrService, MainContactCardFields, MainContactCardPlainFields, MainContactCardProperty, NotificationService, OwnerPlainDataJson, PasswordChangeStatus, PasswordCheck, PasswordService, PermissionChoice, PersistService, PlanService, PlanState, PlanStateField, PreCompleteTpPasswordResetRequestMutation, ProfileDetailsService, ProfileService, QueryProcessorService, ReceiveScenarioClaimMutation, RecoveryStatus, RegisterResult, RegisterService, RejectScenarioClaimMutation, RejectTpPasswordResetRequestMutation, ReminderService, RequestUserDeleteMutation, RespondKeyExchangeOtkMutation, RevertFileMutation, ScenarioLastClaimState, ScenarioService, ScenarioState, ServerConfigService, ServerTimeQuery, SetDirectoryConfidentialMutation, SetFileConfidentialMutation, ShareTypeChoice, SharedContactCard2Service, SharedTrustedPartyDetails, SharedVaultFeature, TPFeatures, TempDirectoryQuery, TimeService, TpAssemblyState, TpClaimApproverState, TpClaimState, TpPasswordResetRequestService, TpPasswordResetService, TpPasswordResetUserService, TrustedPartiesQuery, TrustedParty, TrustedPartyDetails, TrustedPartyProperties, TrustedPartyService, TrustedPartyType, TwoFactorService, UnarchiveDirectoryMutation, UnarchiveFileMutation, UpdateContactCardMutation$1 as UpdateContactCardMutation, UpdateDirectoryMutation, UpdateFileMutation, UpdateLbopQuery, UpdateOwnedContactCardMutation, UpdateReceivedContactCardMutation, UpdateScenarioMutation, UpdateTpPasswordResetMutation, UserDeleteState, UserService, UserSharedKeyFields, WebCryptoService, awsFetch, configureAmplifyAuth, configureApollo, fragmentSpreadAstSelection, gqlTyped, handleApolloError, handleCognitoCallback, httpOptions, mapEdges, processConnection, throwClaimIdMismatch, throwClaimNotApproved, KeyGraphService as ɵa, EncryptionService as ɵb, KeyService as ɵc, KeyFactoryService as ɵd, LrService as ɵe, RunOutsideAngular as ɵf, LrGraphQLService as ɵg, KeyMetaService as ɵh, TpPasswordResetAssemblyController as ɵi, TpAssemblyController as ɵj, SharedContactCardFields as ɵk, SharedContactCardService as ɵl, ScenarioAssemblyController as ɵm, TpPasswordResetPrivateService as ɵn };
10759
10654
  //# sourceMappingURL=lifeready-core.js.map