@lifeready/core 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/lifeready-core.umd.js +205 -181
- package/bundles/lifeready-core.umd.js.map +1 -1
- package/bundles/lifeready-core.umd.min.js +1 -1
- package/bundles/lifeready-core.umd.min.js.map +1 -1
- package/esm2015/lib/api/types/lr-graphql.types.js +18 -6
- package/esm2015/lib/category/category.gql.js +9 -31
- package/esm2015/lib/category/category.service.js +11 -41
- package/esm2015/lib/category/category.types.js +1 -1
- package/esm2015/lib/item2/item2.gql.js +19 -1
- package/esm2015/lib/item2/item2.service.js +38 -2
- package/esm2015/lib/item2/item2.types.js +1 -1
- package/esm2015/lib/record/record.gql.js +6 -3
- package/esm2015/lib/record/record.service.js +3 -15
- package/esm2015/lib/record/record.types.js +1 -1
- package/fesm2015/lifeready-core.js +125 -118
- package/fesm2015/lifeready-core.js.map +1 -1
- package/lib/api/types/lr-graphql.types.d.ts +28 -9
- package/lib/category/category.gql.d.ts +0 -1
- package/lib/category/category.service.d.ts +2 -3
- package/lib/category/category.types.d.ts +0 -4
- package/lib/item2/item2.gql.d.ts +16 -0
- package/lib/item2/item2.service.d.ts +15 -1
- package/lib/item2/item2.types.d.ts +8 -0
- package/lib/record/record.types.d.ts +2 -3
- package/lifeready-core.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -3620,10 +3620,21 @@
|
|
|
3620
3620
|
AccessRoleChoice["DENY"] = "DENY";
|
|
3621
3621
|
AccessRoleChoice["OWNER"] = "OWNER";
|
|
3622
3622
|
})(exports.AccessRoleChoice || (exports.AccessRoleChoice = {}));
|
|
3623
|
-
(function (
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
})(exports.
|
|
3623
|
+
(function (AccessRoleMethodChoice) {
|
|
3624
|
+
AccessRoleMethodChoice["INHERITED"] = "INHERITED";
|
|
3625
|
+
AccessRoleMethodChoice["DIRECT"] = "DIRECT";
|
|
3626
|
+
})(exports.AccessRoleMethodChoice || (exports.AccessRoleMethodChoice = {}));
|
|
3627
|
+
(function (PermissionChoice) {
|
|
3628
|
+
PermissionChoice["CREATE"] = "CREATE";
|
|
3629
|
+
PermissionChoice["READ"] = "READ";
|
|
3630
|
+
PermissionChoice["UPDATE"] = "UPDATE";
|
|
3631
|
+
PermissionChoice["DELETE"] = "DELETE";
|
|
3632
|
+
PermissionChoice["SHARE"] = "SHARE";
|
|
3633
|
+
PermissionChoice["ARCHIVE"] = "ARCHIVE";
|
|
3634
|
+
PermissionChoice["ACCESS_ARCHIVED"] = "ACCESS_ARCHIVED";
|
|
3635
|
+
PermissionChoice["UNARCHIVE"] = "UNARCHIVE";
|
|
3636
|
+
PermissionChoice["SET_CONFIDENTIAL"] = "SET_CONFIDENTIAL";
|
|
3637
|
+
})(exports.PermissionChoice || (exports.PermissionChoice = {}));
|
|
3627
3638
|
(function (FileOperationField) {
|
|
3628
3639
|
FileOperationField["CREATE"] = "CREATE";
|
|
3629
3640
|
FileOperationField["READ"] = "READ";
|
|
@@ -4059,25 +4070,24 @@
|
|
|
4059
4070
|
},
|
|
4060
4071
|
],
|
|
4061
4072
|
});
|
|
4062
|
-
var AccessFields = "\naccessRoles {\n role\n method\n inheritedFrom {\n id\n }\n trustedParty {\n id\n }\n isIssuer\n}";
|
|
4063
4073
|
var descendantDirectories = "\ndescendantDirectories(depth: " + DEFAULT_DESCENDANTS_DEPTH + ", plainMeta: $categoryFilter, archived: false) {\n recordsCount: directoriesCount(plainMeta: $recordFilter, archived: false)\n}\n";
|
|
4064
|
-
var CategoryFields = "\n id\n keyId\n archived\n plainMeta\n cipherMeta\n " +
|
|
4074
|
+
var CategoryFields = "\n id\n keyId\n archived\n plainMeta\n cipherMeta\n " + descendantDirectories + "\n";
|
|
4065
4075
|
var VaultFields = "\n id\n keyId\n plainMeta\n cipherMeta\n";
|
|
4066
4076
|
var GetRootDirectoryIdsQuery = gql__default['default'](templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\n query GetRootDirectoryIdsQuery($archived: Boolean) {\n rootDirectories(archived: $archived) {\n edges {\n node {\n id\n }\n }\n }\n }\n"], ["\n query GetRootDirectoryIdsQuery($archived: Boolean) {\n rootDirectories(archived: $archived) {\n edges {\n node {\n id\n }\n }\n }\n }\n"])));
|
|
4067
|
-
var GetCategoriesQuery = gql__default['default'](templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\nquery
|
|
4077
|
+
var GetCategoriesQuery = gql__default['default'](templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\nquery GetCategoriesQuery($vaultDirectoryId: LrRelayIdInput!, $categoryFilter: LrJSONFilter!, $recordFilter: LrJSONFilter!, $archived: Boolean)\n{\n directory(id: $vaultDirectoryId) {\n childDirectoryLinks(plainMeta: $categoryFilter, orderBy: \"created\", archived: $archived) {\n edges {\n node {\n childDirectory {\n ", "\n }\n }\n }\n }\n }\n keyGraph {\n ...KeyGraphFragment\n }\n}\n", "\n"], ["\nquery GetCategoriesQuery($vaultDirectoryId: LrRelayIdInput!, $categoryFilter: LrJSONFilter!, $recordFilter: LrJSONFilter!, $archived: Boolean)\n{\n directory(id: $vaultDirectoryId) {\n childDirectoryLinks(plainMeta: $categoryFilter, orderBy: \"created\", archived: $archived) {\n edges {\n node {\n childDirectory {\n ", "\n }\n }\n }\n }\n }\n keyGraph {\n ...KeyGraphFragment\n }\n}\n", "\n"])), CategoryFields, KeyGraphFragment);
|
|
4068
4078
|
var GetVaultsQuery = gql__default['default'](templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\nquery GetVaults($plainMetaFilter: LrJSONFilter!, $cachedKeyIds: [LrRelayIdInput!])\n{\n list: rootDirectories(plainMeta: $plainMetaFilter, orderBy: \"created\") {\n edges {\n node {\n ", "\n }\n }\n }\n keyGraph(cachedKeyIds: $cachedKeyIds) {\n ...KeyGraphFragment\n }\n}\n", "\n"], ["\nquery GetVaults($plainMetaFilter: LrJSONFilter!, $cachedKeyIds: [LrRelayIdInput!])\n{\n list: rootDirectories(plainMeta: $plainMetaFilter, orderBy: \"created\") {\n edges {\n node {\n ", "\n }\n }\n }\n keyGraph(cachedKeyIds: $cachedKeyIds) {\n ...KeyGraphFragment\n }\n}\n", "\n"])), VaultFields, KeyGraphFragment);
|
|
4069
|
-
var GetTrustedPartyCategoriesQuery = gql__default['default'](templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\nquery GetTrustedPartyCategoriesQuery($trustedPartyId: LrRelayIdInput!, $categoryFilter: LrJSONFilter!, $recordFilter: LrJSONFilter!, $contentFilter: LrJSONFilter, $cachedKeyIds: [LrRelayIdInput!])\n{\n tp(id: $trustedPartyId) {\n sharedItems {\n list: directories(plainMeta: $categoryFilter, orderBy: \"created\") {\n edges {\n node {\n ", "\n }\n }\n }\n records: directories(plainMeta: $recordFilter, orderBy: \"created\") {\n edges {\n node {\n id\n keyId\n archived\n plainMeta\n cipherMeta\n created\n modified\n
|
|
4070
|
-
var GetMySharedCategoriesQuery = gql__default['default'](templateObject_5$2 || (templateObject_5$2 = __makeTemplateObject(["\nquery GetMySharedCategoriesQuery($trustedPartyId: LrRelayIdInput!, $categoryFilter: LrJSONFilter!, $recordFilter: LrJSONFilter!, $contentFilter: LrJSONFilter, $cachedKeyIds: [LrRelayIdInput!])\n{\n tp(id: $trustedPartyId) {\n myItems {\n list: directories(plainMeta: $categoryFilter, orderBy: \"created\") {\n edges {\n node {\n ", "\n }\n }\n }\n records: directories(plainMeta: $recordFilter, orderBy: \"created\") {\n edges {\n node {\n id\n keyId\n archived\n plainMeta\n cipherMeta\n created\n modified\n
|
|
4079
|
+
var GetTrustedPartyCategoriesQuery = gql__default['default'](templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\nquery GetTrustedPartyCategoriesQuery($trustedPartyId: LrRelayIdInput!, $categoryFilter: LrJSONFilter!, $recordFilter: LrJSONFilter!, $contentFilter: LrJSONFilter, $cachedKeyIds: [LrRelayIdInput!])\n{\n tp(id: $trustedPartyId) {\n sharedItems {\n list: directories(plainMeta: $categoryFilter, orderBy: \"created\") {\n edges {\n node {\n ", "\n }\n }\n }\n records: directories(plainMeta: $recordFilter, orderBy: \"created\") {\n edges {\n node {\n id\n keyId\n archived\n plainMeta\n cipherMeta\n created\n modified\n content: childFileLinks(plainMeta: $contentFilter) {\n edges {\n node {\n childFile {\n id\n archived\n currentVersion {\n state {\n keyId\n plainMeta\n cipherMeta\n created\n modified\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n keyGraph(cachedKeyIds: $cachedKeyIds) {\n ...KeyGraphFragment\n }\n}\n", "\n"], ["\nquery GetTrustedPartyCategoriesQuery($trustedPartyId: LrRelayIdInput!, $categoryFilter: LrJSONFilter!, $recordFilter: LrJSONFilter!, $contentFilter: LrJSONFilter, $cachedKeyIds: [LrRelayIdInput!])\n{\n tp(id: $trustedPartyId) {\n sharedItems {\n list: directories(plainMeta: $categoryFilter, orderBy: \"created\") {\n edges {\n node {\n ", "\n }\n }\n }\n records: directories(plainMeta: $recordFilter, orderBy: \"created\") {\n edges {\n node {\n id\n keyId\n archived\n plainMeta\n cipherMeta\n created\n modified\n content: childFileLinks(plainMeta: $contentFilter) {\n edges {\n node {\n childFile {\n id\n archived\n currentVersion {\n state {\n keyId\n plainMeta\n cipherMeta\n created\n modified\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n keyGraph(cachedKeyIds: $cachedKeyIds) {\n ...KeyGraphFragment\n }\n}\n", "\n"])), CategoryFields, KeyGraphFragment);
|
|
4080
|
+
var GetMySharedCategoriesQuery = gql__default['default'](templateObject_5$2 || (templateObject_5$2 = __makeTemplateObject(["\nquery GetMySharedCategoriesQuery($trustedPartyId: LrRelayIdInput!, $categoryFilter: LrJSONFilter!, $recordFilter: LrJSONFilter!, $contentFilter: LrJSONFilter, $cachedKeyIds: [LrRelayIdInput!])\n{\n tp(id: $trustedPartyId) {\n myItems {\n list: directories(plainMeta: $categoryFilter, orderBy: \"created\") {\n edges {\n node {\n ", "\n }\n }\n }\n records: directories(plainMeta: $recordFilter, orderBy: \"created\") {\n edges {\n node {\n id\n keyId\n archived\n plainMeta\n cipherMeta\n created\n modified\n content: childFileLinks(plainMeta: $contentFilter) {\n edges {\n node {\n childFile {\n id\n archived\n currentVersion {\n state {\n keyId\n plainMeta\n cipherMeta\n created\n modified\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n keyGraph(cachedKeyIds: $cachedKeyIds) {\n ...KeyGraphFragment\n }\n}\n", "\n"], ["\nquery GetMySharedCategoriesQuery($trustedPartyId: LrRelayIdInput!, $categoryFilter: LrJSONFilter!, $recordFilter: LrJSONFilter!, $contentFilter: LrJSONFilter, $cachedKeyIds: [LrRelayIdInput!])\n{\n tp(id: $trustedPartyId) {\n myItems {\n list: directories(plainMeta: $categoryFilter, orderBy: \"created\") {\n edges {\n node {\n ", "\n }\n }\n }\n records: directories(plainMeta: $recordFilter, orderBy: \"created\") {\n edges {\n node {\n id\n keyId\n archived\n plainMeta\n cipherMeta\n created\n modified\n content: childFileLinks(plainMeta: $contentFilter) {\n edges {\n node {\n childFile {\n id\n archived\n currentVersion {\n state {\n keyId\n plainMeta\n cipherMeta\n created\n modified\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n keyGraph(cachedKeyIds: $cachedKeyIds) {\n ...KeyGraphFragment\n }\n}\n", "\n"])), CategoryFields, KeyGraphFragment);
|
|
4071
4081
|
var parentCategoriesField = function (depth) {
|
|
4072
4082
|
if (depth === void 0) { depth = DEFAULT_BREADCRUMB_DEPTH; }
|
|
4073
4083
|
if (!depth) {
|
|
4074
4084
|
return '';
|
|
4075
4085
|
}
|
|
4076
|
-
return "\nparentCategories: parentDirectoryLinks(plainMeta: $categoryFilter) {\n edges {\n node {\n parentDirectory {\n id\n keyId\n archived\n plainMeta\n cipherMeta\n " + parentCategoriesField(depth - 1) + "\n
|
|
4086
|
+
return "\nparentCategories: parentDirectoryLinks(plainMeta: $categoryFilter) {\n edges {\n node {\n parentDirectory {\n id\n keyId\n archived\n plainMeta\n cipherMeta\n " + parentCategoriesField(depth - 1) + "\n }\n }\n }\n}\n";
|
|
4077
4087
|
};
|
|
4078
4088
|
var GetCategoryQuery = function (depth) {
|
|
4079
4089
|
if (depth === void 0) { depth = DEFAULT_BREADCRUMB_DEPTH; }
|
|
4080
|
-
return gql__default['default'](templateObject_6$2 || (templateObject_6$2 = __makeTemplateObject(["\nquery GetCategory(\n $id: LrRelayIdInput!,\n $categoryFilter: LrJSONFilter!,\n $recordFilter: LrJSONFilter!,\n $contentFilter: LrJSONFilter,\n $cachedKeyIds: [LrRelayIdInput!]) {\n category: directory(id: $id) {\n id\n keyId\n archived\n plainMeta\n cipherMeta\n ", "\n ", "\n
|
|
4090
|
+
return gql__default['default'](templateObject_6$2 || (templateObject_6$2 = __makeTemplateObject(["\nquery GetCategory(\n $id: LrRelayIdInput!,\n $categoryFilter: LrJSONFilter!,\n $recordFilter: LrJSONFilter!,\n $contentFilter: LrJSONFilter,\n $cachedKeyIds: [LrRelayIdInput!]) {\n category: directory(id: $id) {\n id\n keyId\n archived\n plainMeta\n cipherMeta\n ", "\n ", "\n subCategories: childDirectoryLinks(plainMeta: $categoryFilter, orderBy: \"created\") {\n edges {\n node {\n childDirectory {\n ", "\n }\n }\n }\n }\n records: childDirectoryLinks(plainMeta: $recordFilter, orderBy: \"created\") {\n edges {\n node {\n childDirectory {\n id\n keyId\n archived\n plainMeta\n cipherMeta\n created\n modified\n content: childFileLinks(plainMeta: $contentFilter) {\n edges {\n node {\n childFile {\n id\n archived\n currentVersion {\n state {\n keyId\n plainMeta\n cipherMeta\n created\n modified\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n keyGraph(cachedKeyIds: $cachedKeyIds) {\n ...KeyGraphFragment\n }\n}\n", " "], ["\nquery GetCategory(\n $id: LrRelayIdInput!,\n $categoryFilter: LrJSONFilter!,\n $recordFilter: LrJSONFilter!,\n $contentFilter: LrJSONFilter,\n $cachedKeyIds: [LrRelayIdInput!]) {\n category: directory(id: $id) {\n id\n keyId\n archived\n plainMeta\n cipherMeta\n ", "\n ", "\n subCategories: childDirectoryLinks(plainMeta: $categoryFilter, orderBy: \"created\") {\n edges {\n node {\n childDirectory {\n ", "\n }\n }\n }\n }\n records: childDirectoryLinks(plainMeta: $recordFilter, orderBy: \"created\") {\n edges {\n node {\n childDirectory {\n id\n keyId\n archived\n plainMeta\n cipherMeta\n created\n modified\n content: childFileLinks(plainMeta: $contentFilter) {\n edges {\n node {\n childFile {\n id\n archived\n currentVersion {\n state {\n keyId\n plainMeta\n cipherMeta\n created\n modified\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n keyGraph(cachedKeyIds: $cachedKeyIds) {\n ...KeyGraphFragment\n }\n}\n", " "])), descendantDirectories, parentCategoriesField(depth), CategoryFields, KeyGraphFragment);
|
|
4081
4091
|
};
|
|
4082
4092
|
var GetCategoryKeyIdQuery = gql__default['default'](templateObject_7$1 || (templateObject_7$1 = __makeTemplateObject(["\n query GetCategoryKeyIdQuery(\n $id: LrRelayIdInput!\n $cachedKeyIds: [LrRelayIdInput!]\n ) {\n category: directory(id: $id) {\n keyId\n }\n keyGraph(cachedKeyIds: $cachedKeyIds) {\n ...KeyGraphFragment\n }\n }\n ", "\n"], ["\n query GetCategoryKeyIdQuery(\n $id: LrRelayIdInput!\n $cachedKeyIds: [LrRelayIdInput!]\n ) {\n category: directory(id: $id) {\n keyId\n }\n keyGraph(cachedKeyIds: $cachedKeyIds) {\n ...KeyGraphFragment\n }\n }\n ", "\n"])), KeyGraphFragment);
|
|
4083
4093
|
var CreateCategoryMutation = gql__default['default'](templateObject_8$1 || (templateObject_8$1 = __makeTemplateObject(["\n mutation CreateCategory(\n $plainMeta: LrJSONString\n $cipherMeta: String\n $parentDirectories: [ParentDirectoryInput!]\n $parentRootDirectory: ParentRootDirectoryInput\n ) {\n new: createDirectory(\n input: {\n plainMeta: $plainMeta\n cipherMeta: $cipherMeta\n parentDirectories: $parentDirectories\n parentRootDirectory: $parentRootDirectory\n }\n ) {\n category: directory {\n id\n keyId\n }\n }\n }\n"], ["\n mutation CreateCategory(\n $plainMeta: LrJSONString\n $cipherMeta: String\n $parentDirectories: [ParentDirectoryInput!]\n $parentRootDirectory: ParentRootDirectoryInput\n ) {\n new: createDirectory(\n input: {\n plainMeta: $plainMeta\n cipherMeta: $cipherMeta\n parentDirectories: $parentDirectories\n parentRootDirectory: $parentRootDirectory\n }\n ) {\n category: directory {\n id\n keyId\n }\n }\n }\n"])));
|
|
@@ -6814,7 +6824,7 @@
|
|
|
6814
6824
|
});
|
|
6815
6825
|
var GetRecordQuery = function (depth) {
|
|
6816
6826
|
if (depth === void 0) { depth = DEFAULT_BREADCRUMB_DEPTH; }
|
|
6817
|
-
return gql__default['default'](templateObject_1$d || (templateObject_1$d = __makeTemplateObject(["\nquery Record(\n $id: LrRelayIdInput!,\n $cachedKeyIds: [LrRelayIdInput!],\n $categoryFilter: LrJSONFilter,\n $contentFilter: LrJSONFilter,\n $attachmentsFilter: LrJSONFilter,\n) {\n record: directory(id: $id) {\n id\n keyId\n archived\n plainMeta\n cipherMeta\n created\n modified\n
|
|
6827
|
+
return gql__default['default'](templateObject_1$d || (templateObject_1$d = __makeTemplateObject(["\nquery Record(\n $id: LrRelayIdInput!,\n $cachedKeyIds: [LrRelayIdInput!],\n $categoryFilter: LrJSONFilter,\n $contentFilter: LrJSONFilter,\n $attachmentsFilter: LrJSONFilter,\n) {\n record: directory(id: $id) {\n id\n keyId\n archived\n plainMeta\n cipherMeta\n created\n modified\n confidentiality {\n isConfidential\n method\n }\n ", "\n content: childFileLinks(plainMeta: $contentFilter) {\n edges {\n node {\n childFile {\n id\n keyId\n archived\n currentVersion {\n state {\n id\n keyId\n plainMeta\n cipherMeta\n created\n modified\n }\n }\n versions {\n edges {\n node {\n operation\n }\n }\n }\n }\n }\n }\n }\n attachments: childFileLinks(plainMeta: $attachmentsFilter) {\n edges {\n node {\n childFile {\n id\n keyId\n archived\n currentVersion {\n state {\n id\n keyId\n plainMeta\n cipherMeta\n contentResource\n }\n }\n versions {\n edges {\n node {\n operation\n }\n }\n }\n }\n }\n }\n }\n }\n keyGraph(cachedKeyIds: $cachedKeyIds) {\n ...KeyGraphFragment\n }\n}\n", "\n"], ["\nquery Record(\n $id: LrRelayIdInput!,\n $cachedKeyIds: [LrRelayIdInput!],\n $categoryFilter: LrJSONFilter,\n $contentFilter: LrJSONFilter,\n $attachmentsFilter: LrJSONFilter,\n) {\n record: directory(id: $id) {\n id\n keyId\n archived\n plainMeta\n cipherMeta\n created\n modified\n confidentiality {\n isConfidential\n method\n }\n ", "\n content: childFileLinks(plainMeta: $contentFilter) {\n edges {\n node {\n childFile {\n id\n keyId\n archived\n currentVersion {\n state {\n id\n keyId\n plainMeta\n cipherMeta\n created\n modified\n }\n }\n versions {\n edges {\n node {\n operation\n }\n }\n }\n }\n }\n }\n }\n attachments: childFileLinks(plainMeta: $attachmentsFilter) {\n edges {\n node {\n childFile {\n id\n keyId\n archived\n currentVersion {\n state {\n id\n keyId\n plainMeta\n cipherMeta\n contentResource\n }\n }\n versions {\n edges {\n node {\n operation\n }\n }\n }\n }\n }\n }\n }\n }\n keyGraph(cachedKeyIds: $cachedKeyIds) {\n ...KeyGraphFragment\n }\n}\n", "\n"])), parentCategoriesField(depth), KeyGraphFragment);
|
|
6818
6828
|
};
|
|
6819
6829
|
var CreateRecordContainerMutation = gql__default['default'](templateObject_2$a || (templateObject_2$a = __makeTemplateObject(["\n mutation CreateRecordContainer(\n $plainMeta: LrJSONString\n $cipherMeta: String\n $parentDirectories: [ParentDirectoryInput!]\n $parentRootDirectory: ParentRootDirectoryInput\n ) {\n new: createDirectory(\n input: {\n plainMeta: $plainMeta\n cipherMeta: $cipherMeta\n parentDirectories: $parentDirectories\n parentRootDirectory: $parentRootDirectory\n }\n ) {\n category: directory {\n id\n keyId\n }\n }\n }\n"], ["\n mutation CreateRecordContainer(\n $plainMeta: LrJSONString\n $cipherMeta: String\n $parentDirectories: [ParentDirectoryInput!]\n $parentRootDirectory: ParentRootDirectoryInput\n ) {\n new: createDirectory(\n input: {\n plainMeta: $plainMeta\n cipherMeta: $cipherMeta\n parentDirectories: $parentDirectories\n parentRootDirectory: $parentRootDirectory\n }\n ) {\n category: directory {\n id\n keyId\n }\n }\n }\n"])));
|
|
6820
6830
|
var CreateRecordMutation = gql__default['default'](templateObject_3$8 || (templateObject_3$8 = __makeTemplateObject(["\n mutation CreateFile($input: CreateFileInput!) {\n createFile(input: $input) {\n file {\n id\n }\n }\n }\n"], ["\n mutation CreateFile($input: CreateFileInput!) {\n createFile(input: $input) {\n file {\n id\n }\n }\n }\n"])));
|
|
@@ -6825,66 +6835,6 @@
|
|
|
6825
6835
|
var DeleteFileMutation = gql__default['default'](templateObject_8$4 || (templateObject_8$4 = __makeTemplateObject(["\n mutation DeleteFile($fileId: LrRelayIdInput!) {\n deleteFile(input: { fileId: $fileId }) {\n id\n }\n }\n"], ["\n mutation DeleteFile($fileId: LrRelayIdInput!) {\n deleteFile(input: { fileId: $fileId }) {\n id\n }\n }\n"])));
|
|
6826
6836
|
var templateObject_1$d, templateObject_2$a, templateObject_3$8, templateObject_4$6, templateObject_5$6, templateObject_6$5, templateObject_7$4, templateObject_8$4;
|
|
6827
6837
|
|
|
6828
|
-
(function (AccessLevel) {
|
|
6829
|
-
AccessLevel["Owner"] = "OWNER";
|
|
6830
|
-
AccessLevel["Admin"] = "ADMIN";
|
|
6831
|
-
AccessLevel["Writer"] = "WRITER";
|
|
6832
|
-
AccessLevel["Reader"] = "READER";
|
|
6833
|
-
AccessLevel["Deny"] = "DENY";
|
|
6834
|
-
})(exports.AccessLevel || (exports.AccessLevel = {}));
|
|
6835
|
-
var SharedAccess = /** @class */ (function () {
|
|
6836
|
-
function SharedAccess() {
|
|
6837
|
-
}
|
|
6838
|
-
return SharedAccess;
|
|
6839
|
-
}());
|
|
6840
|
-
var DefaultCategory = /** @class */ (function () {
|
|
6841
|
-
function DefaultCategory() {
|
|
6842
|
-
}
|
|
6843
|
-
return DefaultCategory;
|
|
6844
|
-
}());
|
|
6845
|
-
var VaultRecordType = /** @class */ (function () {
|
|
6846
|
-
function VaultRecordType() {
|
|
6847
|
-
}
|
|
6848
|
-
return VaultRecordType;
|
|
6849
|
-
}());
|
|
6850
|
-
var VaultRecord = /** @class */ (function () {
|
|
6851
|
-
function VaultRecord() {
|
|
6852
|
-
}
|
|
6853
|
-
return VaultRecord;
|
|
6854
|
-
}());
|
|
6855
|
-
var Category = /** @class */ (function () {
|
|
6856
|
-
function Category() {
|
|
6857
|
-
}
|
|
6858
|
-
return Category;
|
|
6859
|
-
}());
|
|
6860
|
-
var CurrentCategory = /** @class */ (function (_super) {
|
|
6861
|
-
__extends(CurrentCategory, _super);
|
|
6862
|
-
function CurrentCategory() {
|
|
6863
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
6864
|
-
}
|
|
6865
|
-
return CurrentCategory;
|
|
6866
|
-
}(Category));
|
|
6867
|
-
var VaultCategory = /** @class */ (function () {
|
|
6868
|
-
function VaultCategory() {
|
|
6869
|
-
}
|
|
6870
|
-
return VaultCategory;
|
|
6871
|
-
}());
|
|
6872
|
-
var NewCategory = /** @class */ (function () {
|
|
6873
|
-
function NewCategory() {
|
|
6874
|
-
}
|
|
6875
|
-
return NewCategory;
|
|
6876
|
-
}());
|
|
6877
|
-
var UpdatedCategory = /** @class */ (function () {
|
|
6878
|
-
function UpdatedCategory() {
|
|
6879
|
-
}
|
|
6880
|
-
return UpdatedCategory;
|
|
6881
|
-
}());
|
|
6882
|
-
var Vault = /** @class */ (function () {
|
|
6883
|
-
function Vault() {
|
|
6884
|
-
}
|
|
6885
|
-
return Vault;
|
|
6886
|
-
}());
|
|
6887
|
-
|
|
6888
6838
|
var CategoryService = /** @class */ (function () {
|
|
6889
6839
|
function CategoryService(lrApollo, keyMetaService, keyGraph) {
|
|
6890
6840
|
this.lrApollo = lrApollo;
|
|
@@ -6935,30 +6885,36 @@
|
|
|
6935
6885
|
});
|
|
6936
6886
|
};
|
|
6937
6887
|
CategoryService.prototype.getCategories = function (input) {
|
|
6938
|
-
|
|
6888
|
+
var _a;
|
|
6939
6889
|
return __awaiter(this, void 0, void 0, function () {
|
|
6940
|
-
var res;
|
|
6941
|
-
return __generator(this, function (
|
|
6942
|
-
switch (
|
|
6943
|
-
case 0:
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
categoryFilter: CategoryFilter,
|
|
6948
|
-
recordFilter: RecordFilter,
|
|
6949
|
-
archived: input && input.archived,
|
|
6950
|
-
},
|
|
6951
|
-
})];
|
|
6890
|
+
var vaultDirectoryId, _b, res;
|
|
6891
|
+
return __generator(this, function (_c) {
|
|
6892
|
+
switch (_c.label) {
|
|
6893
|
+
case 0:
|
|
6894
|
+
_b = (input === null || input === void 0 ? void 0 : input.vaultDirectoryId);
|
|
6895
|
+
if (_b) return [3 /*break*/, 2];
|
|
6896
|
+
return [4 /*yield*/, this.getDefaultVault()];
|
|
6952
6897
|
case 1:
|
|
6953
|
-
|
|
6954
|
-
|
|
6955
|
-
throw new LrBadStateException('There is more than one default vault');
|
|
6898
|
+
_b = ((_a = (_c.sent())) === null || _a === void 0 ? void 0 : _a.id);
|
|
6899
|
+
_c.label = 2;
|
|
6956
6900
|
case 2:
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6901
|
+
vaultDirectoryId = _b;
|
|
6902
|
+
if (!vaultDirectoryId) {
|
|
6903
|
+
console.error('There is no default vault.');
|
|
6904
|
+
return [2 /*return*/, []];
|
|
6905
|
+
}
|
|
6906
|
+
return [4 /*yield*/, this.lrApollo.query({
|
|
6907
|
+
query: GetCategoriesQuery,
|
|
6908
|
+
variables: {
|
|
6909
|
+
vaultDirectoryId: vaultDirectoryId,
|
|
6910
|
+
categoryFilter: CategoryFilter,
|
|
6911
|
+
recordFilter: RecordFilter,
|
|
6912
|
+
archived: input === null || input === void 0 ? void 0 : input.archived,
|
|
6913
|
+
},
|
|
6914
|
+
})];
|
|
6915
|
+
case 3:
|
|
6916
|
+
res = _c.sent();
|
|
6917
|
+
return [2 /*return*/, this.mapCategories(res.directory.childDirectoryLinks)];
|
|
6962
6918
|
}
|
|
6963
6919
|
});
|
|
6964
6920
|
});
|
|
@@ -7331,7 +7287,7 @@
|
|
|
7331
7287
|
CategoryService.prototype.mapCategory = function (node) {
|
|
7332
7288
|
var _a;
|
|
7333
7289
|
return __awaiter(this, void 0, void 0, function () {
|
|
7334
|
-
var _b, name, isCustom, allowRecords, allowCustomCategories, code, isHidden,
|
|
7290
|
+
var _b, name, isCustom, allowRecords, allowCustomCategories, code, isHidden, e_2;
|
|
7335
7291
|
return __generator(this, function (_c) {
|
|
7336
7292
|
switch (_c.label) {
|
|
7337
7293
|
case 0:
|
|
@@ -7340,8 +7296,6 @@
|
|
|
7340
7296
|
case 1:
|
|
7341
7297
|
_b = (_c.sent()) || {}, name = _b.name, isCustom = _b.isCustom, allowRecords = _b.allowRecords, allowCustomCategories = _b.allowCustomCategories, code = _b.code;
|
|
7342
7298
|
isHidden = ((node.plainMeta && JSON.parse(node.plainMeta)) || {}).isHidden;
|
|
7343
|
-
isOwner = node.accessRoles &&
|
|
7344
|
-
node.accessRoles.some(function (x) { return x.role === exports.AccessLevel.Owner; });
|
|
7345
7299
|
return [2 /*return*/, {
|
|
7346
7300
|
id: node.id,
|
|
7347
7301
|
keyId: node.keyId,
|
|
@@ -7356,17 +7310,6 @@
|
|
|
7356
7310
|
? node.descendantDirectories.recordsCount === 0
|
|
7357
7311
|
: null,
|
|
7358
7312
|
allRecordsCount: (_a = node.descendantDirectories) === null || _a === void 0 ? void 0 : _a.recordsCount,
|
|
7359
|
-
myAccessLevel: isOwner ? exports.AccessLevel.Owner : node.accessRoles[0].role,
|
|
7360
|
-
sharedAccess: isOwner
|
|
7361
|
-
? node.accessRoles
|
|
7362
|
-
.filter(function (x) { return x.role !== exports.AccessLevel.Owner; })
|
|
7363
|
-
.map(function (x) { return ({
|
|
7364
|
-
trustedPartyId: x.trustedParty && x.trustedParty.id,
|
|
7365
|
-
accessLevel: x.role,
|
|
7366
|
-
isInherited: x.method === 'inherited',
|
|
7367
|
-
inheritedFrom: x.inheritedFrom && x.inheritedFrom.id,
|
|
7368
|
-
}); })
|
|
7369
|
-
: [],
|
|
7370
7313
|
}];
|
|
7371
7314
|
case 2:
|
|
7372
7315
|
e_2 = _c.sent();
|
|
@@ -7379,7 +7322,7 @@
|
|
|
7379
7322
|
};
|
|
7380
7323
|
CategoryService.prototype.mapRecord = function (node) {
|
|
7381
7324
|
return __awaiter(this, void 0, void 0, function () {
|
|
7382
|
-
var contents, _b, name, recordType,
|
|
7325
|
+
var contents, _b, name, recordType, e_3;
|
|
7383
7326
|
return __generator(this, function (_c) {
|
|
7384
7327
|
switch (_c.label) {
|
|
7385
7328
|
case 0:
|
|
@@ -7388,8 +7331,6 @@
|
|
|
7388
7331
|
return [4 /*yield*/, this.keyMetaService.decryptMeta(contents.currentVersion.state)];
|
|
7389
7332
|
case 1:
|
|
7390
7333
|
_b = (_c.sent()) || {}, name = _b.name, recordType = _b.recordType;
|
|
7391
|
-
isOwner = node.accessRoles &&
|
|
7392
|
-
node.accessRoles.some(function (x) { return x.role === exports.AccessLevel.Owner; });
|
|
7393
7334
|
return [2 /*return*/, {
|
|
7394
7335
|
id: node.id,
|
|
7395
7336
|
keyId: node.keyId,
|
|
@@ -7401,17 +7342,6 @@
|
|
|
7401
7342
|
new Date(contents.currentVersion.state.modified)
|
|
7402
7343
|
? node.modified
|
|
7403
7344
|
: contents.currentVersion.state.modified,
|
|
7404
|
-
myAccessLevel: isOwner ? exports.AccessLevel.Owner : node.accessRoles[0].role,
|
|
7405
|
-
sharedAccess: isOwner
|
|
7406
|
-
? node.accessRoles
|
|
7407
|
-
.filter(function (x) { return x.role !== exports.AccessLevel.Owner; })
|
|
7408
|
-
.map(function (x) { return ({
|
|
7409
|
-
trustedPartyId: x.trustedParty && x.trustedParty.id,
|
|
7410
|
-
accessLevel: x.role,
|
|
7411
|
-
isInherited: x.method === 'inherited',
|
|
7412
|
-
inheritedFrom: x.inheritedFrom && x.inheritedFrom.id,
|
|
7413
|
-
}); })
|
|
7414
|
-
: [],
|
|
7415
7345
|
}];
|
|
7416
7346
|
case 2:
|
|
7417
7347
|
e_3 = _c.sent();
|
|
@@ -7599,6 +7529,66 @@
|
|
|
7599
7529
|
{ type: CategoryService }
|
|
7600
7530
|
]; };
|
|
7601
7531
|
|
|
7532
|
+
(function (AccessLevel) {
|
|
7533
|
+
AccessLevel["Owner"] = "OWNER";
|
|
7534
|
+
AccessLevel["Admin"] = "ADMIN";
|
|
7535
|
+
AccessLevel["Writer"] = "WRITER";
|
|
7536
|
+
AccessLevel["Reader"] = "READER";
|
|
7537
|
+
AccessLevel["Deny"] = "DENY";
|
|
7538
|
+
})(exports.AccessLevel || (exports.AccessLevel = {}));
|
|
7539
|
+
var SharedAccess = /** @class */ (function () {
|
|
7540
|
+
function SharedAccess() {
|
|
7541
|
+
}
|
|
7542
|
+
return SharedAccess;
|
|
7543
|
+
}());
|
|
7544
|
+
var DefaultCategory = /** @class */ (function () {
|
|
7545
|
+
function DefaultCategory() {
|
|
7546
|
+
}
|
|
7547
|
+
return DefaultCategory;
|
|
7548
|
+
}());
|
|
7549
|
+
var VaultRecordType = /** @class */ (function () {
|
|
7550
|
+
function VaultRecordType() {
|
|
7551
|
+
}
|
|
7552
|
+
return VaultRecordType;
|
|
7553
|
+
}());
|
|
7554
|
+
var VaultRecord = /** @class */ (function () {
|
|
7555
|
+
function VaultRecord() {
|
|
7556
|
+
}
|
|
7557
|
+
return VaultRecord;
|
|
7558
|
+
}());
|
|
7559
|
+
var Category = /** @class */ (function () {
|
|
7560
|
+
function Category() {
|
|
7561
|
+
}
|
|
7562
|
+
return Category;
|
|
7563
|
+
}());
|
|
7564
|
+
var CurrentCategory = /** @class */ (function (_super) {
|
|
7565
|
+
__extends(CurrentCategory, _super);
|
|
7566
|
+
function CurrentCategory() {
|
|
7567
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
7568
|
+
}
|
|
7569
|
+
return CurrentCategory;
|
|
7570
|
+
}(Category));
|
|
7571
|
+
var VaultCategory = /** @class */ (function () {
|
|
7572
|
+
function VaultCategory() {
|
|
7573
|
+
}
|
|
7574
|
+
return VaultCategory;
|
|
7575
|
+
}());
|
|
7576
|
+
var NewCategory = /** @class */ (function () {
|
|
7577
|
+
function NewCategory() {
|
|
7578
|
+
}
|
|
7579
|
+
return NewCategory;
|
|
7580
|
+
}());
|
|
7581
|
+
var UpdatedCategory = /** @class */ (function () {
|
|
7582
|
+
function UpdatedCategory() {
|
|
7583
|
+
}
|
|
7584
|
+
return UpdatedCategory;
|
|
7585
|
+
}());
|
|
7586
|
+
var Vault = /** @class */ (function () {
|
|
7587
|
+
function Vault() {
|
|
7588
|
+
}
|
|
7589
|
+
return Vault;
|
|
7590
|
+
}());
|
|
7591
|
+
|
|
7602
7592
|
var CreateContactCardMutation$2 = gqlTyped(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\nmutation CreateContactCardMutation(\n $input: CreateContactCardInput!\n) {\n createContactCard(input: $input) {\n contactCard {\n id\n }\n }\n}\n"], ["\nmutation CreateContactCardMutation(\n $input: CreateContactCardInput!\n) {\n createContactCard(input: $input) {\n contactCard {\n id\n }\n }\n}\n"])));
|
|
7603
7593
|
var UpdateContactCardMutation$2 = gqlTyped(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\nmutation UpdateContactCardMutation($input: UpdateContactCardInput!) {\n updateContactCard(input: $input) {\n contactCard {\n id\n }\n }\n}\n"], ["\nmutation UpdateContactCardMutation($input: UpdateContactCardInput!) {\n updateContactCard(input: $input) {\n contactCard {\n id\n }\n }\n}\n"])));
|
|
7604
7594
|
var DeleteContactCardMutation$1 = gqlTyped(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject(["\nmutation DeleteContactCardMutation($input: DeleteContactCardInput!) {\n deleteContactCard(input: $input) {\n id\n }\n}\n"], ["\nmutation DeleteContactCardMutation($input: DeleteContactCardInput!) {\n deleteContactCard(input: $input) {\n id\n }\n}\n"])));
|
|
@@ -7912,7 +7902,9 @@
|
|
|
7912
7902
|
var ChangeFileParentsMutation = gqlTyped(templateObject_11$1 || (templateObject_11$1 = __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"])));
|
|
7913
7903
|
var BeginDeleteChildItemLinksWindowMutation = gqlTyped(templateObject_12$1 || (templateObject_12$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"])));
|
|
7914
7904
|
var TempDirectoryQuery = gqlTyped(templateObject_13$1 || (templateObject_13$1 = __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"])));
|
|
7915
|
-
var
|
|
7905
|
+
var SetFileConfidentialMutation = gqlTyped(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\nmutation SetFileConfidentialMutation($input: SetFileConfidentialInput!) {\n setFileConfidential(input: $input) {\n file {\n id\n }\n }\n}\n"], ["\nmutation SetFileConfidentialMutation($input: SetFileConfidentialInput!) {\n setFileConfidential(input: $input) {\n file {\n id\n }\n }\n}\n"])));
|
|
7906
|
+
var SetDirectoryConfidentialMutation = gqlTyped(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\nmutation SetDirectoryConfidentialMutation($input: SetDirectoryConfidentialInput!) {\n setDirectoryConfidential(input: $input) {\n directory {\n id\n }\n }\n}\n"], ["\nmutation SetDirectoryConfidentialMutation($input: SetDirectoryConfidentialInput!) {\n setDirectoryConfidential(input: $input) {\n directory {\n id\n }\n }\n}\n"])));
|
|
7907
|
+
var templateObject_1$g, templateObject_2$d, templateObject_3$b, templateObject_4$8, templateObject_5$7, templateObject_6$6, templateObject_7$5, templateObject_8$5, templateObject_9$3, templateObject_10$2, templateObject_11$1, templateObject_12$1, templateObject_13$1, templateObject_14, templateObject_15;
|
|
7916
7908
|
|
|
7917
7909
|
var DirectoryKeyQuery = gqlTyped(templateObject_1$h || (templateObject_1$h = __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"])));
|
|
7918
7910
|
var FileKeyQuery = gqlTyped(templateObject_2$e || (templateObject_2$e = __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"])));
|
|
@@ -8361,6 +8353,50 @@
|
|
|
8361
8353
|
});
|
|
8362
8354
|
});
|
|
8363
8355
|
};
|
|
8356
|
+
Item2Service.prototype.setFileConfidential = function (options) {
|
|
8357
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8358
|
+
return __generator(this, function (_c) {
|
|
8359
|
+
return [2 /*return*/, this.mutate(this.setFileConfidentialMutation(options))];
|
|
8360
|
+
});
|
|
8361
|
+
});
|
|
8362
|
+
};
|
|
8363
|
+
Item2Service.prototype.setFileConfidentialMutation = function (options) {
|
|
8364
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8365
|
+
return __generator(this, function (_c) {
|
|
8366
|
+
return [2 /*return*/, new LrMutation({
|
|
8367
|
+
mutation: SetFileConfidentialMutation,
|
|
8368
|
+
variables: {
|
|
8369
|
+
input: {
|
|
8370
|
+
fileId: options.fileId,
|
|
8371
|
+
confidential: options.confidential,
|
|
8372
|
+
},
|
|
8373
|
+
},
|
|
8374
|
+
})];
|
|
8375
|
+
});
|
|
8376
|
+
});
|
|
8377
|
+
};
|
|
8378
|
+
Item2Service.prototype.setDirectoryConfidential = function (options) {
|
|
8379
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8380
|
+
return __generator(this, function (_c) {
|
|
8381
|
+
return [2 /*return*/, this.mutate(this.setDirectoryConfidentialMutation(options))];
|
|
8382
|
+
});
|
|
8383
|
+
});
|
|
8384
|
+
};
|
|
8385
|
+
Item2Service.prototype.setDirectoryConfidentialMutation = function (options) {
|
|
8386
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8387
|
+
return __generator(this, function (_c) {
|
|
8388
|
+
return [2 /*return*/, new LrMutation({
|
|
8389
|
+
mutation: SetDirectoryConfidentialMutation,
|
|
8390
|
+
variables: {
|
|
8391
|
+
input: {
|
|
8392
|
+
directoryId: options.directoryId,
|
|
8393
|
+
confidential: options.confidential,
|
|
8394
|
+
},
|
|
8395
|
+
},
|
|
8396
|
+
})];
|
|
8397
|
+
});
|
|
8398
|
+
});
|
|
8399
|
+
};
|
|
8364
8400
|
// ------------------------------------------------------------------------------
|
|
8365
8401
|
// ------------------------------------------------------------------------------
|
|
8366
8402
|
// Helpers
|
|
@@ -12238,11 +12274,12 @@
|
|
|
12238
12274
|
this.recordAttachmentService = recordAttachmentService;
|
|
12239
12275
|
}
|
|
12240
12276
|
RecordService.prototype.getRecord = function (recordId) {
|
|
12277
|
+
var _a;
|
|
12241
12278
|
return __awaiter(this, void 0, void 0, function () {
|
|
12242
|
-
var record, contents,
|
|
12279
|
+
var record, contents, _b, name, recordType, fields, categories, attachments;
|
|
12243
12280
|
var _this = this;
|
|
12244
|
-
return __generator(this, function (
|
|
12245
|
-
switch (
|
|
12281
|
+
return __generator(this, function (_c) {
|
|
12282
|
+
switch (_c.label) {
|
|
12246
12283
|
case 0: return [4 /*yield*/, this.lrApollo.query({
|
|
12247
12284
|
query: GetRecordQuery(),
|
|
12248
12285
|
variables: {
|
|
@@ -12253,33 +12290,31 @@
|
|
|
12253
12290
|
},
|
|
12254
12291
|
})];
|
|
12255
12292
|
case 1:
|
|
12256
|
-
record = (
|
|
12293
|
+
record = (_c.sent()).record;
|
|
12257
12294
|
contents = record.content.edges[0].node.childFile;
|
|
12258
12295
|
return [4 /*yield*/, this.keyMetaService.decryptMeta(contents.currentVersion.state)];
|
|
12259
12296
|
case 2:
|
|
12260
|
-
|
|
12261
|
-
{}, name =
|
|
12297
|
+
_b = (_c.sent()) ||
|
|
12298
|
+
{}, name = _b.name, recordType = _b.recordType, fields = _b.fields;
|
|
12262
12299
|
return [4 /*yield*/, Promise.all(record.parentCategories.edges.map(function (x) { return __awaiter(_this, void 0, void 0, function () {
|
|
12263
|
-
var
|
|
12264
|
-
return __generator(this, function (
|
|
12265
|
-
switch (
|
|
12300
|
+
var _b;
|
|
12301
|
+
return __generator(this, function (_c) {
|
|
12302
|
+
switch (_c.label) {
|
|
12266
12303
|
case 0: return [4 /*yield*/, this.categoryService.mapParentCategories(x.node.parentDirectory)];
|
|
12267
12304
|
case 1:
|
|
12268
|
-
|
|
12305
|
+
_b = [(_c.sent())];
|
|
12269
12306
|
return [4 /*yield*/, this.categoryService.mapCategory(x.node.parentDirectory)];
|
|
12270
|
-
case 2: return [2 /*return*/, __spread.apply(void 0,
|
|
12271
|
-
|
|
12307
|
+
case 2: return [2 /*return*/, __spread.apply(void 0, _b.concat([[
|
|
12308
|
+
_c.sent()
|
|
12272
12309
|
]]))];
|
|
12273
12310
|
}
|
|
12274
12311
|
});
|
|
12275
12312
|
}); }))];
|
|
12276
12313
|
case 3:
|
|
12277
|
-
categories =
|
|
12314
|
+
categories = _c.sent();
|
|
12278
12315
|
return [4 /*yield*/, this.mapAttachments(record.attachments.edges)];
|
|
12279
12316
|
case 4:
|
|
12280
|
-
attachments =
|
|
12281
|
-
isOwner = record.accessRoles &&
|
|
12282
|
-
record.accessRoles.some(function (x) { return x.role === exports.AccessLevel.Owner; });
|
|
12317
|
+
attachments = _c.sent();
|
|
12283
12318
|
return [2 /*return*/, {
|
|
12284
12319
|
id: record.id,
|
|
12285
12320
|
keyId: record.keyId,
|
|
@@ -12290,18 +12325,8 @@
|
|
|
12290
12325
|
fields: fields,
|
|
12291
12326
|
categories: categories,
|
|
12292
12327
|
attachments: attachments,
|
|
12293
|
-
myAccessLevel: isOwner ? exports.AccessLevel.Owner : record.accessRoles[0].role,
|
|
12294
|
-
sharedAccess: isOwner
|
|
12295
|
-
? record.accessRoles
|
|
12296
|
-
.filter(function (x) { return x.role !== exports.AccessLevel.Owner; })
|
|
12297
|
-
.map(function (x) { return ({
|
|
12298
|
-
trustedPartyId: x.trustedParty && x.trustedParty.id,
|
|
12299
|
-
accessLevel: x.role,
|
|
12300
|
-
isInherited: x.method === 'inherited',
|
|
12301
|
-
inheritedFrom: x.inheritedFrom && x.inheritedFrom.id,
|
|
12302
|
-
}); })
|
|
12303
|
-
: [],
|
|
12304
12328
|
isArchived: !!record.archived,
|
|
12329
|
+
isConfidential: !!((_a = record.confidentiality) === null || _a === void 0 ? void 0 : _a.isConfidential),
|
|
12305
12330
|
createdOn: record.created,
|
|
12306
12331
|
lastModified: new Date(record.modified) >
|
|
12307
12332
|
new Date(contents.currentVersion.state.modified)
|
|
@@ -12315,18 +12340,18 @@
|
|
|
12315
12340
|
RecordService.prototype.mapAttachments = function (attachments) {
|
|
12316
12341
|
return __awaiter(this, void 0, void 0, function () {
|
|
12317
12342
|
var _this = this;
|
|
12318
|
-
return __generator(this, function (
|
|
12319
|
-
switch (
|
|
12343
|
+
return __generator(this, function (_b) {
|
|
12344
|
+
switch (_b.label) {
|
|
12320
12345
|
case 0: return [4 /*yield*/, Promise.all(attachments
|
|
12321
12346
|
.map(function (x) { return x.node.childFile; })
|
|
12322
12347
|
.map(function (x) { return __awaiter(_this, void 0, void 0, function () {
|
|
12323
|
-
var
|
|
12324
|
-
return __generator(this, function (
|
|
12325
|
-
switch (
|
|
12348
|
+
var _b, name, fieldId, fileType, fileSize, lastModified;
|
|
12349
|
+
return __generator(this, function (_c) {
|
|
12350
|
+
switch (_c.label) {
|
|
12326
12351
|
case 0: return [4 /*yield*/, this.keyMetaService.decryptMeta(x.currentVersion.state)];
|
|
12327
12352
|
case 1:
|
|
12328
|
-
|
|
12329
|
-
{}, name =
|
|
12353
|
+
_b = (_c.sent()) ||
|
|
12354
|
+
{}, name = _b.name, fieldId = _b.fieldId, fileType = _b.fileType, fileSize = _b.fileSize, lastModified = _b.lastModified;
|
|
12330
12355
|
return [2 /*return*/, {
|
|
12331
12356
|
fileId: x.id,
|
|
12332
12357
|
keyId: x.currentVersion.state.keyId,
|
|
@@ -12340,7 +12365,7 @@
|
|
|
12340
12365
|
}
|
|
12341
12366
|
});
|
|
12342
12367
|
}); }))];
|
|
12343
|
-
case 1: return [2 /*return*/,
|
|
12368
|
+
case 1: return [2 /*return*/, _b.sent()];
|
|
12344
12369
|
}
|
|
12345
12370
|
});
|
|
12346
12371
|
});
|
|
@@ -12348,11 +12373,11 @@
|
|
|
12348
12373
|
RecordService.prototype.createRecord = function (newRecord) {
|
|
12349
12374
|
return __awaiter(this, void 0, void 0, function () {
|
|
12350
12375
|
var wrappedContent, response, recordId, secureContent, doubleWrappedContent, e_1;
|
|
12351
|
-
return __generator(this, function (
|
|
12352
|
-
switch (
|
|
12376
|
+
return __generator(this, function (_b) {
|
|
12377
|
+
switch (_b.label) {
|
|
12353
12378
|
case 0: return [4 /*yield*/, this.keyMetaService.wrapContent(null, newRecord.categoryIds)];
|
|
12354
12379
|
case 1:
|
|
12355
|
-
wrappedContent =
|
|
12380
|
+
wrappedContent = _b.sent();
|
|
12356
12381
|
return [4 /*yield*/, this.lrApollo.mutate({
|
|
12357
12382
|
mutation: CreateRecordContainerMutation,
|
|
12358
12383
|
variables: {
|
|
@@ -12365,7 +12390,7 @@
|
|
|
12365
12390
|
},
|
|
12366
12391
|
})];
|
|
12367
12392
|
case 2:
|
|
12368
|
-
response =
|
|
12393
|
+
response = _b.sent();
|
|
12369
12394
|
recordId = response.new.category.id;
|
|
12370
12395
|
secureContent = {
|
|
12371
12396
|
name: newRecord.name,
|
|
@@ -12374,7 +12399,7 @@
|
|
|
12374
12399
|
};
|
|
12375
12400
|
return [4 /*yield*/, this.keyMetaService.doubleWrapContent(secureContent, [recordId])];
|
|
12376
12401
|
case 3:
|
|
12377
|
-
doubleWrappedContent =
|
|
12402
|
+
doubleWrappedContent = _b.sent();
|
|
12378
12403
|
// Create the file that holds the record contents
|
|
12379
12404
|
return [4 /*yield*/, this.lrApollo.mutate({
|
|
12380
12405
|
mutation: CreateRecordMutation,
|
|
@@ -12393,16 +12418,16 @@
|
|
|
12393
12418
|
})];
|
|
12394
12419
|
case 4:
|
|
12395
12420
|
// Create the file that holds the record contents
|
|
12396
|
-
|
|
12397
|
-
|
|
12421
|
+
_b.sent();
|
|
12422
|
+
_b.label = 5;
|
|
12398
12423
|
case 5:
|
|
12399
|
-
|
|
12424
|
+
_b.trys.push([5, 7, , 8]);
|
|
12400
12425
|
return [4 /*yield*/, this.recordAttachmentService.uploadAttachments(recordId, newRecord.attachments)];
|
|
12401
12426
|
case 6:
|
|
12402
|
-
|
|
12427
|
+
_b.sent();
|
|
12403
12428
|
return [3 /*break*/, 8];
|
|
12404
12429
|
case 7:
|
|
12405
|
-
e_1 =
|
|
12430
|
+
e_1 = _b.sent();
|
|
12406
12431
|
console.error(e_1);
|
|
12407
12432
|
return [2 /*return*/, { recordId: recordId, attachmentError: e_1 }];
|
|
12408
12433
|
case 8: return [2 /*return*/, { recordId: recordId }];
|
|
@@ -12413,8 +12438,8 @@
|
|
|
12413
12438
|
RecordService.prototype.updateRecord = function (recordId, updateId, updateKeyId, updatedRecord) {
|
|
12414
12439
|
return __awaiter(this, void 0, void 0, function () {
|
|
12415
12440
|
var secureContent, reWrappedContent, e_2;
|
|
12416
|
-
return __generator(this, function (
|
|
12417
|
-
switch (
|
|
12441
|
+
return __generator(this, function (_b) {
|
|
12442
|
+
switch (_b.label) {
|
|
12418
12443
|
case 0:
|
|
12419
12444
|
secureContent = {
|
|
12420
12445
|
name: updatedRecord.name,
|
|
@@ -12423,7 +12448,7 @@
|
|
|
12423
12448
|
};
|
|
12424
12449
|
return [4 /*yield*/, this.keyMetaService.reWrapContent(updateKeyId, secureContent)];
|
|
12425
12450
|
case 1:
|
|
12426
|
-
reWrappedContent =
|
|
12451
|
+
reWrappedContent = _b.sent();
|
|
12427
12452
|
return [4 /*yield*/, this.lrApollo.mutate({
|
|
12428
12453
|
mutation: UpdateRecordMutation,
|
|
12429
12454
|
variables: {
|
|
@@ -12436,16 +12461,16 @@
|
|
|
12436
12461
|
},
|
|
12437
12462
|
})];
|
|
12438
12463
|
case 2:
|
|
12439
|
-
|
|
12440
|
-
|
|
12464
|
+
_b.sent();
|
|
12465
|
+
_b.label = 3;
|
|
12441
12466
|
case 3:
|
|
12442
|
-
|
|
12467
|
+
_b.trys.push([3, 5, , 6]);
|
|
12443
12468
|
return [4 /*yield*/, this.recordAttachmentService.uploadAttachments(recordId, updatedRecord.attachments)];
|
|
12444
12469
|
case 4:
|
|
12445
|
-
|
|
12470
|
+
_b.sent();
|
|
12446
12471
|
return [3 /*break*/, 6];
|
|
12447
12472
|
case 5:
|
|
12448
|
-
e_2 =
|
|
12473
|
+
e_2 = _b.sent();
|
|
12449
12474
|
console.error(e_2);
|
|
12450
12475
|
return [2 /*return*/, { recordId: recordId, attachmentError: e_2 }];
|
|
12451
12476
|
case 6: return [2 /*return*/, { recordId: recordId }];
|
|
@@ -12455,7 +12480,7 @@
|
|
|
12455
12480
|
};
|
|
12456
12481
|
RecordService.prototype.archiveRecord = function (recordId) {
|
|
12457
12482
|
return __awaiter(this, void 0, void 0, function () {
|
|
12458
|
-
return __generator(this, function (
|
|
12483
|
+
return __generator(this, function (_b) {
|
|
12459
12484
|
// All content of the record should also be archived, hence, recursive=true
|
|
12460
12485
|
return [2 /*return*/, this.categoryService.archiveDirectory(recordId, true)];
|
|
12461
12486
|
});
|
|
@@ -12463,7 +12488,7 @@
|
|
|
12463
12488
|
};
|
|
12464
12489
|
RecordService.prototype.unarchiveRecord = function (recordId) {
|
|
12465
12490
|
return __awaiter(this, void 0, void 0, function () {
|
|
12466
|
-
return __generator(this, function (
|
|
12491
|
+
return __generator(this, function (_b) {
|
|
12467
12492
|
// All content of the record should also be unarchived, hence, recursive=true
|
|
12468
12493
|
return [2 /*return*/, this.categoryService.unarchiveDirectory(recordId, true)];
|
|
12469
12494
|
});
|
|
@@ -12471,14 +12496,14 @@
|
|
|
12471
12496
|
};
|
|
12472
12497
|
RecordService.prototype.deleteRecord = function (recordId) {
|
|
12473
12498
|
return __awaiter(this, void 0, void 0, function () {
|
|
12474
|
-
return __generator(this, function (
|
|
12475
|
-
switch (
|
|
12499
|
+
return __generator(this, function (_b) {
|
|
12500
|
+
switch (_b.label) {
|
|
12476
12501
|
case 0: return [4 /*yield*/, this.lrApollo.mutate({
|
|
12477
12502
|
mutation: DeleteRecordMutation,
|
|
12478
12503
|
variables: { recordId: recordId },
|
|
12479
12504
|
})];
|
|
12480
12505
|
case 1:
|
|
12481
|
-
|
|
12506
|
+
_b.sent();
|
|
12482
12507
|
return [2 /*return*/];
|
|
12483
12508
|
}
|
|
12484
12509
|
});
|
|
@@ -14651,7 +14676,6 @@
|
|
|
14651
14676
|
* Generated bundle index. Do not edit.
|
|
14652
14677
|
*/
|
|
14653
14678
|
|
|
14654
|
-
exports.AccessFields = AccessFields;
|
|
14655
14679
|
exports.ApiContactCard = ApiContactCard;
|
|
14656
14680
|
exports.ApiCurrentUser = ApiCurrentUser;
|
|
14657
14681
|
exports.ArchiveDirectoryMutation = ArchiveDirectoryMutation;
|