@lifeready/core 1.0.21 → 1.0.23
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 +10612 -10527
- package/bundles/lifeready-core.umd.js.map +1 -1
- package/bundles/lifeready-core.umd.min.js +1 -15
- package/bundles/lifeready-core.umd.min.js.map +1 -1
- package/esm2015/lib/_common/ast.js +2 -1
- package/esm2015/lib/_common/deferred-promise.js +1 -1
- package/esm2015/lib/_common/exceptions.js +1 -1
- package/esm2015/lib/_common/queries.gql.js +1 -1
- package/esm2015/lib/_common/run-outside-angular.js +3 -2
- package/esm2015/lib/_common/types.js +2 -1
- package/esm2015/lib/_common/utils.js +2 -1
- package/esm2015/lib/api/lr-apollo.service.js +4 -3
- package/esm2015/lib/api/lr-graphql/index.js +1 -1
- package/esm2015/lib/api/lr-graphql/lr-graphql.service.js +9 -8
- package/esm2015/lib/api/lr-graphql/lr-merged-mutation.js +5 -6
- package/esm2015/lib/api/lr-graphql/lr-mutation-base.js +1 -1
- package/esm2015/lib/api/lr-graphql/lr-mutation.js +3 -3
- package/esm2015/lib/api/lr-graphql/lr.service.js +1 -1
- package/esm2015/lib/api/query-processor/common-processors.service.js +4 -3
- package/esm2015/lib/api/query-processor/index.js +1 -1
- package/esm2015/lib/api/query-processor/query-processor.service.js +5 -4
- package/esm2015/lib/api/query-processor/tp-password-reset-processor.service.js +8 -7
- package/esm2015/lib/api/types/graphql.types.js +2 -1
- package/esm2015/lib/api/types/index.js +1 -1
- package/esm2015/lib/api/types/lr-graphql.types.js +1 -1
- package/esm2015/lib/auth/auth.config.js +1 -1
- package/esm2015/lib/auth/auth.gql.js +1 -28
- package/esm2015/lib/auth/auth.types.js +1 -1
- package/esm2015/lib/auth/life-ready-auth.service.js +36 -32
- package/esm2015/lib/category/category-meta.service.js +1 -1
- package/esm2015/lib/category/category.gql.js +3 -2
- package/esm2015/lib/category/category.service.js +9 -8
- package/esm2015/lib/category/category.types.js +1 -1
- package/esm2015/lib/contact-card/contact-card.gql.js +79 -0
- package/esm2015/lib/contact-card/contact-card.service.js +156 -0
- package/esm2015/lib/contact-card/contact-card2.gql.js +29 -0
- package/esm2015/lib/contact-card/contact-card2.service.js +103 -0
- package/esm2015/lib/encryption/encryption.service.js +190 -0
- package/esm2015/lib/file-upload/file-upload.service.js +74 -0
- package/esm2015/lib/file-upload/file-upload.types.js +2 -0
- package/esm2015/lib/idle/idle.service.js +168 -0
- package/esm2015/lib/idle/idle.types.js +7 -0
- package/esm2015/lib/item2/item2.gql.js +127 -0
- package/esm2015/lib/item2/item2.gql.private.js +23 -0
- package/esm2015/lib/item2/item2.service.js +519 -0
- package/esm2015/lib/item2/item2.types.js +2 -0
- package/esm2015/lib/key/key-factory.service.js +237 -0
- package/esm2015/lib/key/key-graph.service.js +300 -0
- package/esm2015/lib/key/key-meta.service.js +201 -0
- package/esm2015/lib/{cryptography → key}/key.service.js +4 -4
- package/esm2015/lib/key/key.types.js +11 -0
- package/esm2015/lib/key-exchange/key-exchange.gql.js +188 -0
- package/esm2015/lib/key-exchange/key-exchange.service.js +441 -0
- package/esm2015/lib/key-exchange/key-exchange.types.js +7 -0
- package/esm2015/lib/key-exchange/key-exchange2.gql.js +171 -0
- package/esm2015/lib/key-exchange/key-exchange2.service.js +500 -0
- package/esm2015/lib/lbop/lbop.service.js +357 -0
- package/esm2015/lib/life-ready.config.js +2 -1
- package/esm2015/lib/life-ready.module.js +2 -27
- package/esm2015/lib/lock/lock.gql.js +40 -0
- package/esm2015/lib/lock/lock.service.js +64 -0
- package/esm2015/lib/message/message.gql.js +32 -0
- package/esm2015/lib/message/message.service.js +118 -0
- package/esm2015/lib/message/message.types.js +2 -0
- package/esm2015/lib/notification/notification.gql.js +1 -1
- package/esm2015/lib/notification/notification.service.js +2 -2
- package/esm2015/lib/password/password.gql.js +28 -0
- package/esm2015/lib/password/password.service.js +316 -0
- package/esm2015/lib/persist/persist.service.js +181 -0
- package/esm2015/lib/plan/plan.gql.js +1 -1
- package/esm2015/lib/plan/plan.service.js +3 -2
- package/esm2015/lib/plan/plan.types.js +1 -1
- package/esm2015/lib/profile/profile-details.service.js +215 -0
- package/esm2015/lib/profile/profile.gql.js +98 -0
- package/esm2015/lib/profile/profile.service.js +170 -0
- package/esm2015/lib/profile/profile.types.js +34 -0
- package/esm2015/lib/record/record-attachment.service.js +16 -15
- package/esm2015/lib/record/record.gql.js +1 -1
- package/esm2015/lib/record/record.service.js +8 -8
- package/esm2015/lib/record/record.types.js +1 -1
- package/esm2015/lib/record-type/record-type.service.js +1 -1
- package/esm2015/lib/record-type/record-type.types.js +1 -1
- package/esm2015/lib/register/register.service.js +173 -0
- package/esm2015/lib/scenario/scenario.constants.js +1 -1
- package/esm2015/lib/scenario/scenario.controller.js +2 -2
- package/esm2015/lib/scenario/scenario.gql.js +1 -1
- package/esm2015/lib/scenario/scenario.private.gql.js +198 -0
- package/esm2015/lib/scenario/scenario.service.js +19 -17
- package/esm2015/lib/scenario/scenario.types.js +2 -1
- package/esm2015/lib/shared-contact-card/shared-contact-card.service.js +119 -0
- package/esm2015/lib/shared-contact-card/shared-contact-card2.gql.js +41 -0
- package/esm2015/lib/shared-contact-card/shared-contact-card2.service.js +117 -0
- package/esm2015/lib/slip39/slip39.service.js +167 -0
- package/esm2015/lib/time/time.service.js +146 -0
- package/esm2015/lib/tp-assembly/tp-assembly.js +365 -0
- package/esm2015/lib/tp-assembly/tp-assembly.private.gql.js +22 -0
- package/esm2015/lib/tp-assembly/tp-assembly.types.js +2 -0
- package/esm2015/lib/tp-password-reset/tp-password-reset-request.service.js +100 -0
- package/esm2015/lib/tp-password-reset/tp-password-reset-user.service.js +118 -0
- package/esm2015/lib/tp-password-reset/tp-password-reset.constants.js +4 -0
- package/esm2015/lib/tp-password-reset/tp-password-reset.controller.js +34 -0
- package/esm2015/lib/tp-password-reset/tp-password-reset.gql.js +74 -0
- package/esm2015/lib/tp-password-reset/tp-password-reset.private.gql.js +165 -0
- package/esm2015/lib/tp-password-reset/tp-password-reset.private.service.js +54 -0
- package/esm2015/lib/tp-password-reset/tp-password-reset.service.js +92 -0
- package/esm2015/lib/tp-password-reset/tp-password-reset.types.js +2 -0
- package/esm2015/lib/trusted-party/trusted-party.gql.js +148 -0
- package/esm2015/lib/trusted-party/trusted-party.service.js +327 -0
- package/esm2015/lib/trusted-party/trusted-party.types.js +41 -0
- package/esm2015/lib/trusted-party/trusted-party2.gql.js +64 -0
- package/esm2015/lib/trusted-party/trusted-party2.gql.private.js +25 -0
- package/esm2015/lib/trusted-party/trusted-party2.service.js +224 -0
- package/esm2015/lib/trusted-party/trusted-party2.types.js +2 -0
- package/esm2015/lib/two-factor/two-factor.service.js +74 -0
- package/esm2015/lib/user/user.gql.js +60 -0
- package/esm2015/lib/user/user.service.js +80 -0
- package/esm2015/lib/user/user.types.js +2 -0
- package/esm2015/lib/web-crypto/web-crypto.service.js +29 -0
- package/esm2015/lifeready-core.js +15 -13
- package/esm2015/public-api.js +49 -51
- package/fesm2015/lifeready-core.js +8764 -8737
- package/fesm2015/lifeready-core.js.map +1 -1
- package/lib/_common/types.d.ts +3 -1
- package/lib/_common/utils.d.ts +2 -2
- package/lib/api/lr-apollo.service.d.ts +2 -2
- package/lib/api/lr-graphql/lr-graphql.service.d.ts +26 -8
- package/lib/api/lr-graphql/lr-merged-mutation.d.ts +22 -4
- package/lib/api/lr-graphql/lr-mutation.d.ts +1 -2
- package/lib/api/query-processor/common-processors.service.d.ts +1 -1
- package/lib/api/query-processor/query-processor.service.d.ts +1 -1
- package/lib/api/query-processor/tp-password-reset-processor.service.d.ts +2 -2
- package/lib/api/types/lr-graphql.types.d.ts +14 -3
- package/lib/auth/auth.gql.d.ts +0 -3
- package/lib/auth/auth.types.d.ts +5 -5
- package/lib/auth/life-ready-auth.service.d.ts +13 -13
- package/lib/category/category.gql.d.ts +1 -1
- package/lib/category/category.service.d.ts +3 -3
- package/lib/{api → contact-card}/contact-card.service.d.ts +9 -9
- package/lib/contact-card/contact-card2.gql.d.ts +25 -0
- package/lib/contact-card/contact-card2.service.d.ts +64 -0
- package/lib/{cryptography → encryption}/encryption.service.d.ts +10 -9
- package/lib/{api/file.service.d.ts → file-upload/file-upload.service.d.ts} +5 -8
- package/lib/file-upload/file-upload.types.d.ts +5 -0
- package/lib/{auth → idle}/idle.service.d.ts +6 -6
- package/lib/{items2 → item2}/item2.gql.d.ts +16 -16
- package/lib/{items2 → item2}/item2.service.d.ts +34 -35
- package/lib/{cryptography → key}/key-factory.service.d.ts +4 -3
- package/lib/{cryptography → key}/key-graph.service.d.ts +6 -6
- package/lib/{cryptography → key}/key-meta.service.d.ts +1 -1
- package/lib/{cryptography → key}/key.service.d.ts +2 -2
- package/lib/{cryptography/cryptography.types.d.ts → key/key.types.d.ts} +13 -17
- package/lib/{api → key-exchange}/key-exchange.service.d.ts +5 -5
- package/lib/{api → key-exchange}/key-exchange.types.d.ts +4 -4
- package/lib/{api → key-exchange}/key-exchange2.gql.d.ts +1 -1
- package/lib/{api → key-exchange}/key-exchange2.service.d.ts +82 -29
- package/lib/{auth → lbop}/lbop.service.d.ts +7 -7
- package/lib/life-ready.config.d.ts +1 -1
- package/lib/{api → lock}/lock.gql.d.ts +1 -1
- package/lib/{api → lock}/lock.service.d.ts +1 -1
- package/lib/message/message.gql.d.ts +13 -0
- package/lib/message/message.service.d.ts +36 -0
- package/lib/message/message.types.d.ts +12 -0
- package/lib/notification/notification.service.d.ts +3 -2
- package/lib/password/password.gql.d.ts +3 -0
- package/lib/{auth → password}/password.service.d.ts +9 -9
- package/lib/{api → persist}/persist.service.d.ts +3 -3
- package/lib/plan/plan.service.d.ts +3 -2
- package/lib/plan/plan.types.d.ts +2 -1
- package/lib/{users → profile}/profile-details.service.d.ts +3 -3
- package/lib/{users → profile}/profile.gql.d.ts +2 -2
- package/lib/{users → profile}/profile.service.d.ts +6 -6
- package/lib/{users → profile}/profile.types.d.ts +3 -2
- package/lib/record/record-attachment.service.d.ts +6 -6
- package/lib/record/record.service.d.ts +3 -3
- package/lib/{auth → register}/register.service.d.ts +4 -4
- package/lib/scenario/scenario.controller.d.ts +1 -1
- package/lib/scenario/scenario.service.d.ts +105 -5
- package/lib/scenario/scenario.types.d.ts +1 -1
- package/lib/{api → shared-contact-card}/shared-contact-card.service.d.ts +9 -9
- package/lib/{api → shared-contact-card}/shared-contact-card2.gql.d.ts +1 -1
- package/lib/{api → shared-contact-card}/shared-contact-card2.service.d.ts +6 -6
- package/lib/{cryptography → slip39}/slip39.service.d.ts +0 -1
- package/lib/{trusted-parties → tp-assembly}/tp-assembly.d.ts +7 -7
- package/lib/{trusted-parties → tp-assembly}/tp-assembly.types.d.ts +3 -3
- package/lib/{trusted-parties → tp-password-reset}/tp-password-reset-request.service.d.ts +5 -9
- package/lib/{trusted-parties → tp-password-reset}/tp-password-reset-user.service.d.ts +7 -13
- package/lib/{trusted-parties → tp-password-reset}/tp-password-reset.controller.d.ts +1 -1
- package/lib/tp-password-reset/tp-password-reset.gql.d.ts +63 -0
- package/lib/{trusted-parties/tp-password-reset.gql.d.ts → tp-password-reset/tp-password-reset.private.gql.d.ts} +1 -63
- package/lib/tp-password-reset/tp-password-reset.private.service.d.ts +59 -0
- package/lib/{trusted-parties → tp-password-reset}/tp-password-reset.service.d.ts +6 -89
- package/lib/tp-password-reset/tp-password-reset.types.d.ts +40 -0
- package/lib/{trusted-parties → trusted-party}/trusted-party.service.d.ts +7 -7
- package/lib/{trusted-parties → trusted-party}/trusted-party.types.d.ts +2 -3
- package/lib/{trusted-parties → trusted-party}/trusted-party2.gql.d.ts +0 -22
- package/lib/trusted-party/trusted-party2.gql.private.d.ts +23 -0
- package/lib/{trusted-parties → trusted-party}/trusted-party2.service.d.ts +11 -35
- package/lib/trusted-party/trusted-party2.types.d.ts +12 -0
- package/lib/{users → user}/user.gql.d.ts +1 -1
- package/lib/{users → user}/user.service.d.ts +1 -1
- package/lib/{users → user}/user.types.d.ts +1 -1
- package/lifeready-core.d.ts +14 -12
- package/lifeready-core.metadata.json +1 -1
- package/package.json +2 -2
- package/public-api.d.ts +48 -50
- package/esm2015/lib/api/contact-card.gql.js +0 -79
- package/esm2015/lib/api/contact-card.service.js +0 -154
- package/esm2015/lib/api/contact-card2.gql.js +0 -60
- package/esm2015/lib/api/contact-card2.service.js +0 -103
- package/esm2015/lib/api/file.service.js +0 -74
- package/esm2015/lib/api/key-exchange.gql.js +0 -188
- package/esm2015/lib/api/key-exchange.service.js +0 -442
- package/esm2015/lib/api/key-exchange.types.js +0 -7
- package/esm2015/lib/api/key-exchange2.gql.js +0 -171
- package/esm2015/lib/api/key-exchange2.service.js +0 -480
- package/esm2015/lib/api/lock.gql.js +0 -40
- package/esm2015/lib/api/lock.service.js +0 -64
- package/esm2015/lib/api/message.service.js +0 -138
- package/esm2015/lib/api/persist.service.js +0 -181
- package/esm2015/lib/api/shared-contact-card.service.js +0 -119
- package/esm2015/lib/api/shared-contact-card2.gql.js +0 -41
- package/esm2015/lib/api/shared-contact-card2.service.js +0 -117
- package/esm2015/lib/api/time.service.js +0 -146
- package/esm2015/lib/auth/idle.service.js +0 -168
- package/esm2015/lib/auth/idle.types.js +0 -7
- package/esm2015/lib/auth/lbop.service.js +0 -355
- package/esm2015/lib/auth/password.service.js +0 -315
- package/esm2015/lib/auth/register.service.js +0 -172
- package/esm2015/lib/auth/two-factor.service.js +0 -74
- package/esm2015/lib/cryptography/cryptography.types.js +0 -11
- package/esm2015/lib/cryptography/encryption.service.js +0 -189
- package/esm2015/lib/cryptography/key-factory.service.js +0 -237
- package/esm2015/lib/cryptography/key-graph.service.js +0 -299
- package/esm2015/lib/cryptography/key-meta.service.js +0 -200
- package/esm2015/lib/cryptography/slip39.service.js +0 -169
- package/esm2015/lib/cryptography/web-crypto.service.js +0 -29
- package/esm2015/lib/items2/item2.gql.js +0 -127
- package/esm2015/lib/items2/item2.gql.private.js +0 -23
- package/esm2015/lib/items2/item2.service.js +0 -516
- package/esm2015/lib/items2/item2.types.js +0 -1
- package/esm2015/lib/scenario/scenario.gql.private.js +0 -198
- package/esm2015/lib/trusted-parties/tp-assembly.gql.private.js +0 -22
- package/esm2015/lib/trusted-parties/tp-assembly.js +0 -365
- package/esm2015/lib/trusted-parties/tp-assembly.types.js +0 -1
- package/esm2015/lib/trusted-parties/tp-password-reset-request.service.js +0 -113
- package/esm2015/lib/trusted-parties/tp-password-reset-user.service.js +0 -129
- package/esm2015/lib/trusted-parties/tp-password-reset.constants.js +0 -4
- package/esm2015/lib/trusted-parties/tp-password-reset.controller.js +0 -34
- package/esm2015/lib/trusted-parties/tp-password-reset.gql.js +0 -237
- package/esm2015/lib/trusted-parties/tp-password-reset.service.js +0 -95
- package/esm2015/lib/trusted-parties/trusted-party.gql.js +0 -148
- package/esm2015/lib/trusted-parties/trusted-party.service.js +0 -326
- package/esm2015/lib/trusted-parties/trusted-party.types.js +0 -41
- package/esm2015/lib/trusted-parties/trusted-party2.gql.js +0 -87
- package/esm2015/lib/trusted-parties/trusted-party2.service.js +0 -218
- package/esm2015/lib/users/profile-details.service.js +0 -214
- package/esm2015/lib/users/profile.gql.js +0 -97
- package/esm2015/lib/users/profile.service.js +0 -169
- package/esm2015/lib/users/profile.types.js +0 -34
- package/esm2015/lib/users/user.gql.js +0 -60
- package/esm2015/lib/users/user.service.js +0 -79
- package/esm2015/lib/users/user.types.js +0 -1
- package/lib/api/contact-card2.gql.d.ts +0 -34
- package/lib/api/contact-card2.service.d.ts +0 -50
- package/lib/api/message.service.d.ts +0 -59
- /package/lib/{api → contact-card}/contact-card.gql.d.ts +0 -0
- /package/lib/{auth → idle}/idle.types.d.ts +0 -0
- /package/lib/{items2 → item2}/item2.gql.private.d.ts +0 -0
- /package/lib/{items2 → item2}/item2.types.d.ts +0 -0
- /package/lib/{api → key-exchange}/key-exchange.gql.d.ts +0 -0
- /package/lib/scenario/{scenario.gql.private.d.ts → scenario.private.gql.d.ts} +0 -0
- /package/lib/{api → time}/time.service.d.ts +0 -0
- /package/lib/{trusted-parties/tp-assembly.gql.private.d.ts → tp-assembly/tp-assembly.private.gql.d.ts} +0 -0
- /package/lib/{trusted-parties → tp-password-reset}/tp-password-reset.constants.d.ts +0 -0
- /package/lib/{trusted-parties → trusted-party}/trusted-party.gql.d.ts +0 -0
- /package/lib/{auth → two-factor}/two-factor.service.d.ts +0 -0
- /package/lib/{cryptography → web-crypto}/web-crypto.service.d.ts +0 -0
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { Injector, NgZone } from '@angular/core';
|
|
2
|
-
import { KeyFactoryService } from '../cryptography/key-factory.service';
|
|
3
|
-
import { KeyGraphService } from '../cryptography/key-graph.service';
|
|
4
|
-
import { KeyService } from '../cryptography/key.service';
|
|
5
|
-
import { FileService } from '../api/file.service';
|
|
6
|
-
import { CreateDirectoryMutation, DeleteDirectoryMutation, CreateFileMutation, DeleteFileMutation, UpdateFileMutation, UpdateDirectoryMutation, ArchiveDirectoryMutation, UnarchiveDirectoryMutation } from './item2.gql';
|
|
7
|
-
import { ChangeFileParentsOptions, ChangeDirectoryParentsOptions, CreateDirectoryOptions, CreateFileOptions, DownloadFileContentOptions, FileParentDirectoryInput, ParentDirectoryInput, ParentRootDirectoryInput, UpdateDirectoryOptions, UpdateFileOptions, BeginDeleteChildItemLinksWindowOptions, CreateDirectoryTreeOptions, RevertFileOptions } from './item2.types';
|
|
8
2
|
import { LrMutation, LrService } from '../api/lr-graphql';
|
|
9
3
|
import { DirectoryNode, ID, LrRelayIdInput } from '../api/types';
|
|
10
|
-
import {
|
|
4
|
+
import { FileUploadService } from '../file-upload/file-upload.service';
|
|
5
|
+
import { KeyFactoryService } from '../key/key-factory.service';
|
|
6
|
+
import { KeyGraphService } from '../key/key-graph.service';
|
|
7
|
+
import { KeyService } from '../key/key.service';
|
|
8
|
+
import { LockService } from '../lock/lock.service';
|
|
9
|
+
import { BeginDeleteChildItemLinksWindowOptions, ChangeDirectoryParentsOptions, ChangeFileParentsOptions, CreateDirectoryOptions, CreateDirectoryTreeOptions, CreateFileOptions, DownloadFileContentOptions, FileParentDirectoryInput, ParentDirectoryInput, ParentRootDirectoryInput, RevertFileOptions, UpdateDirectoryOptions, UpdateFileOptions } from './item2.types';
|
|
11
10
|
export declare class Item2Service extends LrService {
|
|
12
11
|
private ngZone;
|
|
13
12
|
private injector;
|
|
14
|
-
private
|
|
13
|
+
private fileUploadService;
|
|
15
14
|
private keyService;
|
|
16
15
|
private keyFactory;
|
|
17
16
|
private keyGraph;
|
|
18
17
|
private lockService;
|
|
19
|
-
constructor(ngZone: NgZone, injector: Injector,
|
|
18
|
+
constructor(ngZone: NgZone, injector: Injector, fileUploadService: FileUploadService, keyService: KeyService, keyFactory: KeyFactoryService, keyGraph: KeyGraphService, lockService: LockService);
|
|
20
19
|
static TEMP_DIRECTORY_PLAIN_META: {
|
|
21
20
|
kcType: string;
|
|
22
21
|
};
|
|
@@ -24,10 +23,10 @@ export declare class Item2Service extends LrService {
|
|
|
24
23
|
downloadFileContent(options: DownloadFileContentOptions): Promise<ArrayBuffer>;
|
|
25
24
|
getDirectoryKeyId(directoryId: LrRelayIdInput): Promise<string>;
|
|
26
25
|
getFileKeyId(fileId: LrRelayIdInput): Promise<string>;
|
|
27
|
-
getDirectoryKey(directoryId: LrRelayIdInput, directoryKeyId?: LrRelayIdInput): Promise<import("../
|
|
28
|
-
getFileKey(fileId: LrRelayIdInput, fileKeyId?: LrRelayIdInput): Promise<import("../
|
|
29
|
-
createDirectoryExec(options: CreateDirectoryOptions): Promise<
|
|
30
|
-
createDirectory(options: CreateDirectoryOptions): Promise<LrMutation<
|
|
26
|
+
getDirectoryKey(directoryId: LrRelayIdInput, directoryKeyId?: LrRelayIdInput): Promise<import("../key/key.types").Key>;
|
|
27
|
+
getFileKey(fileId: LrRelayIdInput, fileKeyId?: LrRelayIdInput): Promise<import("../key/key.types").Key>;
|
|
28
|
+
createDirectoryExec(options: CreateDirectoryOptions): Promise<import("./item2.gql").CreateDirectoryMutationResult>;
|
|
29
|
+
createDirectory(options: CreateDirectoryOptions): Promise<LrMutation<import("./item2.gql").CreateDirectoryMutationResult, {
|
|
31
30
|
input: {
|
|
32
31
|
parentDirectories: ParentDirectoryInput[];
|
|
33
32
|
parentRootDirectory: ParentRootDirectoryInput;
|
|
@@ -35,7 +34,7 @@ export declare class Item2Service extends LrService {
|
|
|
35
34
|
cipherMeta: string;
|
|
36
35
|
};
|
|
37
36
|
}>>;
|
|
38
|
-
createDirectoryMutation(options: CreateDirectoryOptions): Promise<LrMutation<
|
|
37
|
+
createDirectoryMutation(options: CreateDirectoryOptions): Promise<LrMutation<import("./item2.gql").CreateDirectoryMutationResult, {
|
|
39
38
|
input: {
|
|
40
39
|
parentDirectories: ParentDirectoryInput[];
|
|
41
40
|
parentRootDirectory: ParentRootDirectoryInput;
|
|
@@ -43,34 +42,34 @@ export declare class Item2Service extends LrService {
|
|
|
43
42
|
cipherMeta: string;
|
|
44
43
|
};
|
|
45
44
|
}>>;
|
|
46
|
-
updateDirectoryExec(options: UpdateDirectoryOptions): Promise<
|
|
47
|
-
updateDirectory(options: UpdateDirectoryOptions): Promise<LrMutation<
|
|
45
|
+
updateDirectoryExec(options: UpdateDirectoryOptions): Promise<import("./item2.gql").UpdateDirectoryMutationResult>;
|
|
46
|
+
updateDirectory(options: UpdateDirectoryOptions): Promise<LrMutation<import("./item2.gql").UpdateDirectoryMutationResult, {
|
|
48
47
|
input: {
|
|
49
48
|
directoryId: string;
|
|
50
49
|
plainMeta: string;
|
|
51
50
|
cipherMeta: string;
|
|
52
51
|
};
|
|
53
52
|
}>>;
|
|
54
|
-
updateDirectoryMutation(options: UpdateDirectoryOptions): Promise<LrMutation<
|
|
53
|
+
updateDirectoryMutation(options: UpdateDirectoryOptions): Promise<LrMutation<import("./item2.gql").UpdateDirectoryMutationResult, {
|
|
55
54
|
input: {
|
|
56
55
|
directoryId: string;
|
|
57
56
|
plainMeta: string;
|
|
58
57
|
cipherMeta: string;
|
|
59
58
|
};
|
|
60
59
|
}>>;
|
|
61
|
-
deleteDirectoryExec(id: ID): Promise<
|
|
62
|
-
deleteDirectory(id: ID): LrMutation<
|
|
60
|
+
deleteDirectoryExec(id: ID): Promise<import("./item2.gql").DeleteDirectoryMutationResult>;
|
|
61
|
+
deleteDirectory(id: ID): LrMutation<import("./item2.gql").DeleteDirectoryMutationResult, {
|
|
63
62
|
input: {
|
|
64
63
|
directoryId: string;
|
|
65
64
|
};
|
|
66
65
|
}>;
|
|
67
|
-
deleteDirectoryMutation(id: ID): LrMutation<
|
|
66
|
+
deleteDirectoryMutation(id: ID): LrMutation<import("./item2.gql").DeleteDirectoryMutationResult, {
|
|
68
67
|
input: {
|
|
69
68
|
directoryId: string;
|
|
70
69
|
};
|
|
71
70
|
}>;
|
|
72
|
-
createFileExec(options: CreateFileOptions): Promise<
|
|
73
|
-
createFile(options: CreateFileOptions): Promise<LrMutation<
|
|
71
|
+
createFileExec(options: CreateFileOptions): Promise<import("./item2.gql").CreateFileMutationResult>;
|
|
72
|
+
createFile(options: CreateFileOptions): Promise<LrMutation<import("./item2.gql").CreateFileMutationResult, {
|
|
74
73
|
input: {
|
|
75
74
|
parentDirectories: FileParentDirectoryInput[];
|
|
76
75
|
wrappedStateKey: string;
|
|
@@ -79,7 +78,7 @@ export declare class Item2Service extends LrService {
|
|
|
79
78
|
cipherMeta: string;
|
|
80
79
|
};
|
|
81
80
|
}>>;
|
|
82
|
-
createFileMutation(options: CreateFileOptions): Promise<LrMutation<
|
|
81
|
+
createFileMutation(options: CreateFileOptions): Promise<LrMutation<import("./item2.gql").CreateFileMutationResult, {
|
|
83
82
|
input: {
|
|
84
83
|
parentDirectories: FileParentDirectoryInput[];
|
|
85
84
|
wrappedStateKey: string;
|
|
@@ -88,8 +87,8 @@ export declare class Item2Service extends LrService {
|
|
|
88
87
|
cipherMeta: string;
|
|
89
88
|
};
|
|
90
89
|
}>>;
|
|
91
|
-
updateFileExec(options: UpdateFileOptions): Promise<
|
|
92
|
-
updateFile(options: UpdateFileOptions): Promise<LrMutation<
|
|
90
|
+
updateFileExec(options: UpdateFileOptions): Promise<import("./item2.gql").UpdateFileMutationResult>;
|
|
91
|
+
updateFile(options: UpdateFileOptions): Promise<LrMutation<import("./item2.gql").UpdateFileMutationResult, {
|
|
93
92
|
input: {
|
|
94
93
|
fileId: string;
|
|
95
94
|
wrappedStateKey: string;
|
|
@@ -98,7 +97,7 @@ export declare class Item2Service extends LrService {
|
|
|
98
97
|
cipherMeta: string;
|
|
99
98
|
};
|
|
100
99
|
}>>;
|
|
101
|
-
updateFileMutation(options: UpdateFileOptions): Promise<LrMutation<
|
|
100
|
+
updateFileMutation(options: UpdateFileOptions): Promise<LrMutation<import("./item2.gql").UpdateFileMutationResult, {
|
|
102
101
|
input: {
|
|
103
102
|
fileId: string;
|
|
104
103
|
wrappedStateKey: string;
|
|
@@ -114,38 +113,38 @@ export declare class Item2Service extends LrService {
|
|
|
114
113
|
revertFileMutation(options: RevertFileOptions): Promise<LrMutation<import("./item2.gql").RevertFileMutationResult, {
|
|
115
114
|
input: RevertFileOptions;
|
|
116
115
|
}>>;
|
|
117
|
-
deleteFileExec(id: ID): Promise<
|
|
118
|
-
deleteFile(id: ID): LrMutation<
|
|
116
|
+
deleteFileExec(id: ID): Promise<import("./item2.gql").DeleteFileMutationResult>;
|
|
117
|
+
deleteFile(id: ID): LrMutation<import("./item2.gql").DeleteFileMutationResult, {
|
|
119
118
|
input: {
|
|
120
119
|
fileId: string;
|
|
121
120
|
};
|
|
122
121
|
}>;
|
|
123
|
-
deleteFileMutation(id: ID): LrMutation<
|
|
122
|
+
deleteFileMutation(id: ID): LrMutation<import("./item2.gql").DeleteFileMutationResult, {
|
|
124
123
|
input: {
|
|
125
124
|
fileId: string;
|
|
126
125
|
};
|
|
127
126
|
}>;
|
|
128
|
-
archiveDirectoryExec(directoryId: string, recursive: boolean): Promise<
|
|
129
|
-
archiveDirectory(directoryId: string, recursive: boolean): LrMutation<
|
|
127
|
+
archiveDirectoryExec(directoryId: string, recursive: boolean): Promise<import("./item2.gql").ArchiveDirectoryMutationResult>;
|
|
128
|
+
archiveDirectory(directoryId: string, recursive: boolean): LrMutation<import("./item2.gql").ArchiveDirectoryMutationResult, {
|
|
130
129
|
input: {
|
|
131
130
|
directoryId: string;
|
|
132
131
|
recursive: boolean;
|
|
133
132
|
};
|
|
134
133
|
}>;
|
|
135
|
-
archiveDirectoryMutation(directoryId: string, recursive: boolean): LrMutation<
|
|
134
|
+
archiveDirectoryMutation(directoryId: string, recursive: boolean): LrMutation<import("./item2.gql").ArchiveDirectoryMutationResult, {
|
|
136
135
|
input: {
|
|
137
136
|
directoryId: string;
|
|
138
137
|
recursive: boolean;
|
|
139
138
|
};
|
|
140
139
|
}>;
|
|
141
|
-
unarchiveDirectoryExec(directoryId: string, recursive: boolean): Promise<
|
|
142
|
-
unarchiveDirectory(directoryId: string, recursive: boolean): LrMutation<
|
|
140
|
+
unarchiveDirectoryExec(directoryId: string, recursive: boolean): Promise<import("./item2.gql").UnarchiveDirectoryMutationResult>;
|
|
141
|
+
unarchiveDirectory(directoryId: string, recursive: boolean): LrMutation<import("./item2.gql").UnarchiveDirectoryMutationResult, {
|
|
143
142
|
input: {
|
|
144
143
|
directoryId: string;
|
|
145
144
|
recursive: boolean;
|
|
146
145
|
};
|
|
147
146
|
}>;
|
|
148
|
-
unarchiveDirectoryMutation(directoryId: string, recursive: boolean): LrMutation<
|
|
147
|
+
unarchiveDirectoryMutation(directoryId: string, recursive: boolean): LrMutation<import("./item2.gql").UnarchiveDirectoryMutationResult, {
|
|
149
148
|
input: {
|
|
150
149
|
directoryId: string;
|
|
151
150
|
recursive: boolean;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { JWK } from 'node-jose';
|
|
3
|
-
import {
|
|
4
|
-
import { WebCryptoService } from '
|
|
3
|
+
import { JSONObject } from '../api/types';
|
|
4
|
+
import { WebCryptoService } from '../web-crypto/web-crypto.service';
|
|
5
|
+
import { DeriveKeyResult, DeriveLbopKeyParams, DerivePassIdpParams, DerivePassKeyParams, LbopKeyParams, PassIdpParams, PassKeyParams } from './key.types';
|
|
5
6
|
export declare function sha256(message: any): Promise<string>;
|
|
6
7
|
export declare class KeyFactoryService {
|
|
7
8
|
private webCryptoService;
|
|
@@ -13,7 +14,7 @@ export declare class KeyFactoryService {
|
|
|
13
14
|
readonly DEFAULT_PASS_IDP_PBKDF_ITER = 100000;
|
|
14
15
|
readonly DEFAULT_PASS_KEY_PBKDF_ITER = 100000;
|
|
15
16
|
readonly DEFAULT_LBOP_KEY_PBKDF_ITER = 100000;
|
|
16
|
-
static asKey(key: string | Buffer |
|
|
17
|
+
static asKey(key: string | Buffer | Record<string, JSONObject> | JWK.RawKey, form?: 'json' | 'private' | 'pkcs8' | 'public' | 'spki' | 'pkix' | 'x509' | 'pem', extras?: Record<string, unknown>): Promise<JWK.Key>;
|
|
17
18
|
randomString(digits: number): string;
|
|
18
19
|
randomDigitsNoZeros(digits: number): string;
|
|
19
20
|
randomChoices<T>(array: T[], chooseN: number): T[];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { JWK } from 'node-jose';
|
|
2
2
|
import { JSONObject } from '../api/types';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { DecryptOptions, EncryptionService } from './encryption.service';
|
|
3
|
+
import { DecryptOptions, EncryptionService } from '../encryption/encryption.service';
|
|
4
|
+
import { CurrentUserKey } from '../profile/profile.types';
|
|
6
5
|
import { KeyFactoryService } from './key-factory.service';
|
|
7
6
|
import { KeyService } from './key.service';
|
|
7
|
+
import { Key, KeyGraphEdge, KeyGraphResponse, PassKey } from './key.types';
|
|
8
8
|
export interface GraphKey extends Key {
|
|
9
9
|
task?: Promise<any>;
|
|
10
10
|
}
|
|
@@ -21,8 +21,8 @@ export declare class KeyGraphService {
|
|
|
21
21
|
key(id: any): GraphKey;
|
|
22
22
|
passKey(id: any): PassKey;
|
|
23
23
|
addKeys(src: KeyGraphResponse): void;
|
|
24
|
-
tracePath(distances: any, keyId: string):
|
|
25
|
-
getPath(knownKeyId: string, keyId: string):
|
|
24
|
+
tracePath(distances: any, keyId: string): KeyGraphEdge[];
|
|
25
|
+
getPath(knownKeyId: string, keyId: string): KeyGraphEdge[];
|
|
26
26
|
getJwkKey(keyOrId: string | Key, getKeyIdCallback?: () => Promise<string> | string): Promise<JWK.Key>;
|
|
27
27
|
getKey(keyOrId: string | Key, getKeyIdCallback?: () => Promise<string> | string): Promise<Key>;
|
|
28
28
|
private _unwrapLink;
|
|
@@ -32,7 +32,7 @@ export declare class KeyGraphService {
|
|
|
32
32
|
decryptFromString<T>(keyOrId: string | Key, cipherData: string, options?: DecryptOptions): Promise<T>;
|
|
33
33
|
decryptFile(keyId: string, file: any): Promise<any>;
|
|
34
34
|
encryptToString(key: string | Key | JWK.Key, content: any): Promise<string>;
|
|
35
|
-
wrapKey
|
|
35
|
+
wrapKey(wrappingKey: string | Key | JWK.Key, key: JWK.Key): Promise<string>;
|
|
36
36
|
encryptWithNewKey(wrappingKeyId: string, cipherClearJson: JSONObject): Promise<{
|
|
37
37
|
key: JWK.Key;
|
|
38
38
|
wrappingKeyId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JWK } from 'node-jose';
|
|
2
2
|
import { LrApolloService } from '../api/lr-apollo.service';
|
|
3
|
-
import { EncryptionService } from '
|
|
3
|
+
import { EncryptionService } from '../encryption/encryption.service';
|
|
4
4
|
import { KeyFactoryService } from './key-factory.service';
|
|
5
5
|
import { KeyGraphService } from './key-graph.service';
|
|
6
6
|
import { KeyService } from './key.service';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Key, PassKey } from './cryptography.types';
|
|
2
|
-
import { PersistService } from '../api/persist.service';
|
|
3
1
|
import { LifeReadyConfig } from '../life-ready.config';
|
|
2
|
+
import { PersistService } from '../persist/persist.service';
|
|
3
|
+
import { Key, PassKey } from './key.types';
|
|
4
4
|
export declare class UserKeys {
|
|
5
5
|
passKey: PassKey;
|
|
6
6
|
masterKey: Key;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { JWK } from 'node-jose';
|
|
2
|
+
import { JSONObject, PassKeyNode } from '../api/types';
|
|
3
|
+
import { SomeRequired } from '../_common/types';
|
|
2
4
|
export interface Key {
|
|
3
5
|
id: string;
|
|
4
6
|
pbk?: string;
|
|
@@ -19,20 +21,14 @@ export interface LbopKeyParams {
|
|
|
19
21
|
iterations: number;
|
|
20
22
|
}
|
|
21
23
|
export interface PassIdpVerifier {
|
|
22
|
-
wrappedPrK:
|
|
23
|
-
pbk:
|
|
24
|
+
wrappedPrK: Record<string, JSONObject>;
|
|
25
|
+
pbk: Record<string, JSONObject>;
|
|
24
26
|
}
|
|
25
27
|
export interface LbopKeyVerifier {
|
|
26
|
-
wrappedKey:
|
|
27
|
-
key:
|
|
28
|
-
}
|
|
29
|
-
export interface PassKey {
|
|
30
|
-
id: string;
|
|
31
|
-
passKeyParams?: PassKeyParams;
|
|
32
|
-
passIdpParams?: PassIdpParams;
|
|
33
|
-
wrappedPassIdpVerifierPrk?: object;
|
|
34
|
-
created?: string;
|
|
28
|
+
wrappedKey: Record<string, JSONObject>;
|
|
29
|
+
key: Record<string, JSONObject>;
|
|
35
30
|
}
|
|
31
|
+
export declare type PassKey = SomeRequired<PassKeyNode, 'id'>;
|
|
36
32
|
export interface KeyLink {
|
|
37
33
|
keyId: string;
|
|
38
34
|
wrappingKeyId: string;
|
|
@@ -43,20 +39,20 @@ export interface PassKeyLink {
|
|
|
43
39
|
passKeyId: string;
|
|
44
40
|
wrappedKey: string;
|
|
45
41
|
}
|
|
46
|
-
export declare enum
|
|
42
|
+
export declare enum KeyGraphNodeType {
|
|
47
43
|
Key = "key",
|
|
48
44
|
PassKey = "passKey"
|
|
49
45
|
}
|
|
50
|
-
export interface
|
|
51
|
-
type:
|
|
46
|
+
export interface KeyGraphNode {
|
|
47
|
+
type: KeyGraphNodeType;
|
|
52
48
|
data: Key | PassKey;
|
|
53
49
|
}
|
|
54
|
-
export declare enum
|
|
50
|
+
export declare enum KeyGraphEdgeType {
|
|
55
51
|
KeyLink = "keyLink",
|
|
56
52
|
PassKeyLink = "passKeyLink"
|
|
57
53
|
}
|
|
58
|
-
export interface
|
|
59
|
-
type:
|
|
54
|
+
export interface KeyGraphEdge {
|
|
55
|
+
type: KeyGraphEdgeType;
|
|
60
56
|
data: KeyLink | PassKeyLink;
|
|
61
57
|
}
|
|
62
58
|
export interface KeyGraphResponse {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { LrApolloService } from '../api/lr-apollo.service';
|
|
1
2
|
import { LifeReadyAuthService } from '../auth/life-ready-auth.service';
|
|
2
|
-
import { EncryptionService } from '../
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { EncryptionService } from '../encryption/encryption.service';
|
|
4
|
+
import { KeyFactoryService as KFS } from '../key/key-factory.service';
|
|
5
|
+
import { KeyService } from '../key/key.service';
|
|
6
|
+
import { UserService } from '../user/user.service';
|
|
5
7
|
import { CompleteOtk, DecryptedKeyExchange, GetKeyExchangeListOptions, GetKeyExchangeOptions, InitiateOtkInput, KeyExchange, RespondOtk, RespondOtkInput, UserSharedKey } from './key-exchange.types';
|
|
6
|
-
import { LrApolloService } from './lr-apollo.service';
|
|
7
|
-
import { KeyFactoryService as KFS } from '../cryptography/key-factory.service';
|
|
8
8
|
export declare class KeyExchangeService {
|
|
9
9
|
private keyFactory;
|
|
10
10
|
private keyService;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Key } from '../cryptography/cryptography.types';
|
|
2
|
-
import { AccessLevel } from '../category/category.types';
|
|
3
1
|
import { JWK } from 'node-jose';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { JSONObject, KeyExchangeMode, KeyExchangeState } from '../api/types';
|
|
3
|
+
import { AccessLevel } from '../category/category.types';
|
|
4
|
+
import { Key } from '../key/key.types';
|
|
5
|
+
import { ContactCardName, TrustedPartyDetails } from '../profile/profile.types';
|
|
6
6
|
export interface PlainInitiatorRootKeyCipher {
|
|
7
7
|
nonce: string;
|
|
8
8
|
oneTimePrk: object;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JWK } from 'node-jose';
|
|
2
|
-
import { Connection, DateTime, ID, JSONObject, LrEmail, OtKeyCipherClearJson2 } from '
|
|
2
|
+
import { Connection, DateTime, ID, JSONObject, LrEmail, OtKeyCipherClearJson2 } from '../api/types';
|
|
3
3
|
export declare type KeyExchangeState2 = 'IN_PROGRESS' | 'COMPLETED' | 'DECLINED' | 'CANCELLED' | 'DELETED';
|
|
4
4
|
export interface KeyExchangeFragment {
|
|
5
5
|
id: ID;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { NgZone } from '@angular/core';
|
|
1
|
+
import { Injector, NgZone } from '@angular/core';
|
|
2
2
|
import { JWK } from 'node-jose';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { LrMutation, LrService } from '../api/lr-graphql';
|
|
4
|
+
import { ContactCardSharedCipherData, JSONObject, OtKeyCipherClearJson2 } from '../api/types';
|
|
5
|
+
import { OwnerPlainDataJson } from '../contact-card/contact-card2.service';
|
|
6
|
+
import { EncryptionService } from '../encryption/encryption.service';
|
|
7
|
+
import { KeyFactoryService } from '../key/key-factory.service';
|
|
8
|
+
import { KeyGraphService } from '../key/key-graph.service';
|
|
9
|
+
import { KeyService } from '../key/key.service';
|
|
9
10
|
import { CancelKeyExchangeMutation, CompleteKeyExchangeOtkMutation, CurrentUserSharedKeyQuery2, DeclineKeyExchangeMutation, InitiateKeyExchangeOtkMutation, KeyExchangeFragment, KeyExchangeState2, RespondKeyExchangeOtkMutation } from './key-exchange2.gql';
|
|
10
|
-
import { LrGraphQLService, LrMutation } from './lr-graphql';
|
|
11
|
-
import { ContactCardSharedCipherData, JSONObject, OtKeyCipherClearJson2 } from './types';
|
|
12
11
|
/**
|
|
13
12
|
* The decrypted content of the one-time key cipher;
|
|
14
13
|
* When user supplies this information the lib doesn't need to do another API call
|
|
@@ -35,7 +34,7 @@ export interface ContactCardOwnerCipherData {
|
|
|
35
34
|
export declare type SendContactCardInput = ContactCardOwnerPlainData & ContactCardOwnerCipherData & ContactCardSharedCipherData;
|
|
36
35
|
export interface InitiateOtkInput2 {
|
|
37
36
|
email?: string;
|
|
38
|
-
message?:
|
|
37
|
+
message?: JSONObject;
|
|
39
38
|
contactCard?: SendContactCardInput;
|
|
40
39
|
upgrade?: boolean;
|
|
41
40
|
}
|
|
@@ -43,7 +42,7 @@ export interface RespondOtkInput2 {
|
|
|
43
42
|
keyExchangeId: string;
|
|
44
43
|
token: string;
|
|
45
44
|
decryptedOtk: DecryptedOtk2;
|
|
46
|
-
message?:
|
|
45
|
+
message?: JSONObject;
|
|
47
46
|
initiatorContactCard?: ContactCardReceiverCipherData;
|
|
48
47
|
responderContactCard?: SendContactCardInput;
|
|
49
48
|
}
|
|
@@ -56,24 +55,24 @@ export interface CompleteOtkInput2 {
|
|
|
56
55
|
}
|
|
57
56
|
export interface InitiatorRootKeyCipherClearJson2 {
|
|
58
57
|
nonce: string;
|
|
59
|
-
oneTimePrk:
|
|
60
|
-
otKey:
|
|
58
|
+
oneTimePrk: Record<string, JSONObject>;
|
|
59
|
+
otKey: Record<string, JSONObject>;
|
|
61
60
|
initiatorContactCard?: ContactCardOwnerCipherData & ContactCardSharedCipherData;
|
|
62
61
|
initiator: {
|
|
63
|
-
message?:
|
|
62
|
+
message?: JSONObject;
|
|
64
63
|
contactCard?: ContactCardSharedCipherData;
|
|
65
64
|
};
|
|
66
65
|
}
|
|
67
66
|
export interface InitiatorOneTimePbkCipherClearJson {
|
|
68
67
|
nonce: string;
|
|
69
|
-
sharedKey:
|
|
70
|
-
mkSharedKey:
|
|
68
|
+
sharedKey: Record<string, JSONObject>;
|
|
69
|
+
mkSharedKey: Record<string, JSONObject>;
|
|
71
70
|
responder: {
|
|
72
|
-
pbk:
|
|
73
|
-
sigPbk:
|
|
74
|
-
message?:
|
|
71
|
+
pbk: Record<string, JSONObject>;
|
|
72
|
+
sigPbk: Record<string, JSONObject>;
|
|
73
|
+
message?: JSONObject;
|
|
75
74
|
contactCard?: ContactCardSharedCipherData & {
|
|
76
|
-
sharedCipherKey:
|
|
75
|
+
sharedCipherKey: Record<string, JSONObject>;
|
|
77
76
|
};
|
|
78
77
|
};
|
|
79
78
|
}
|
|
@@ -81,16 +80,15 @@ export interface GetKeyExchangeOptions2 {
|
|
|
81
80
|
otKeyK?: string;
|
|
82
81
|
token?: string;
|
|
83
82
|
}
|
|
84
|
-
export declare class KeyExchange2Service {
|
|
83
|
+
export declare class KeyExchange2Service extends LrService {
|
|
85
84
|
private ngZone;
|
|
85
|
+
private injector;
|
|
86
86
|
private keyFactory;
|
|
87
87
|
private keyService;
|
|
88
88
|
private encryptionService;
|
|
89
|
-
private userService;
|
|
90
89
|
private keyGraph;
|
|
91
|
-
private lrGraphQL;
|
|
92
90
|
private readonly CLIENT_NONCE_LENGTH;
|
|
93
|
-
constructor(ngZone: NgZone, keyFactory: KeyFactoryService, keyService: KeyService, encryptionService: EncryptionService,
|
|
91
|
+
constructor(ngZone: NgZone, injector: Injector, keyFactory: KeyFactoryService, keyService: KeyService, encryptionService: EncryptionService, keyGraph: KeyGraphService);
|
|
94
92
|
private getOtKey;
|
|
95
93
|
private decryptOtk;
|
|
96
94
|
private decryptResponseCipher;
|
|
@@ -121,19 +119,21 @@ export declare class KeyExchange2Service {
|
|
|
121
119
|
id: string;
|
|
122
120
|
};
|
|
123
121
|
}>;
|
|
124
|
-
|
|
122
|
+
declineKeyExchangeExec(id: string, token: string): Promise<DeclineKeyExchangeMutation>;
|
|
123
|
+
declineKeyExchange(id: string, token: string): LrMutation<DeclineKeyExchangeMutation, {
|
|
125
124
|
input: {
|
|
126
125
|
id: string;
|
|
127
126
|
token: string;
|
|
128
127
|
};
|
|
129
|
-
}
|
|
128
|
+
}>;
|
|
130
129
|
declineKeyExchangeMutation(id: string, token: string): LrMutation<DeclineKeyExchangeMutation, {
|
|
131
130
|
input: {
|
|
132
131
|
id: string;
|
|
133
132
|
token: string;
|
|
134
133
|
};
|
|
135
134
|
}>;
|
|
136
|
-
|
|
135
|
+
initiateOtkExec(input?: InitiateOtkInput2): Promise<InitiateKeyExchangeOtkMutation>;
|
|
136
|
+
initiateOtk(input?: InitiateOtkInput2): Promise<{
|
|
137
137
|
lrMutation: LrMutation<InitiateKeyExchangeOtkMutation, {
|
|
138
138
|
input: {
|
|
139
139
|
initiatorRootKeyCipher: string;
|
|
@@ -152,7 +152,44 @@ export declare class KeyExchange2Service {
|
|
|
152
152
|
}>;
|
|
153
153
|
otKeyK: string;
|
|
154
154
|
}>;
|
|
155
|
-
|
|
155
|
+
initiateOtkMutation({ message, email, contactCard, upgrade, }?: InitiateOtkInput2): Promise<{
|
|
156
|
+
lrMutation: LrMutation<InitiateKeyExchangeOtkMutation, {
|
|
157
|
+
input: {
|
|
158
|
+
initiatorRootKeyCipher: string;
|
|
159
|
+
initiatorPxkId: string;
|
|
160
|
+
initiatorSigPxkId: string;
|
|
161
|
+
otKeyParams: string;
|
|
162
|
+
otKeyCipher: string;
|
|
163
|
+
sendEmail: {
|
|
164
|
+
email: string;
|
|
165
|
+
rawOtKey: string;
|
|
166
|
+
};
|
|
167
|
+
createTp: boolean;
|
|
168
|
+
initiatorPlainDataSig: string;
|
|
169
|
+
upgrade: boolean;
|
|
170
|
+
};
|
|
171
|
+
}>;
|
|
172
|
+
otKeyK: string;
|
|
173
|
+
}>;
|
|
174
|
+
respondOtkExec(input: RespondOtkInput2): Promise<RespondKeyExchangeOtkMutation>;
|
|
175
|
+
respondOtk(input: RespondOtkInput2): Promise<LrMutation<RespondKeyExchangeOtkMutation, {
|
|
176
|
+
input: {
|
|
177
|
+
keyExchangeId: string;
|
|
178
|
+
keyExchangeToken: string;
|
|
179
|
+
rootKeyId: string;
|
|
180
|
+
masterKeyId: string;
|
|
181
|
+
responderPxkId: string;
|
|
182
|
+
responderSigPxkId: string;
|
|
183
|
+
signedInitiatorPbk: string;
|
|
184
|
+
signedInitiatorSigPbk: string;
|
|
185
|
+
rkWrappedSharedKey: string;
|
|
186
|
+
mkWrappedMkSharedKey: string;
|
|
187
|
+
initiatorOneTimePbkCipher: string;
|
|
188
|
+
initiatorContactCard: any;
|
|
189
|
+
responderContactCard: any;
|
|
190
|
+
};
|
|
191
|
+
}>>;
|
|
192
|
+
respondOtkMutation({ keyExchangeId, token, decryptedOtk, message, initiatorContactCard, responderContactCard, }: RespondOtkInput2): Promise<LrMutation<RespondKeyExchangeOtkMutation, {
|
|
156
193
|
input: {
|
|
157
194
|
keyExchangeId: string;
|
|
158
195
|
keyExchangeToken: string;
|
|
@@ -169,7 +206,23 @@ export declare class KeyExchange2Service {
|
|
|
169
206
|
responderContactCard: any;
|
|
170
207
|
};
|
|
171
208
|
}>>;
|
|
172
|
-
|
|
209
|
+
completeOtkExec(input: CompleteOtkInput2): Promise<CompleteKeyExchangeOtkMutation>;
|
|
210
|
+
completeOtk(input: CompleteOtkInput2): Promise<LrMutation<CompleteKeyExchangeOtkMutation, {
|
|
211
|
+
input: {
|
|
212
|
+
keyExchangeId: string;
|
|
213
|
+
rootKeyId: string;
|
|
214
|
+
masterKeyId: string;
|
|
215
|
+
initiatorSigPxkId: string;
|
|
216
|
+
signedResponderPbk: string;
|
|
217
|
+
signedResponderSigPbk: string;
|
|
218
|
+
rkWrappedSharedKey: string;
|
|
219
|
+
mkWrappedMkSharedKey: string;
|
|
220
|
+
responderContactCardCipher: any;
|
|
221
|
+
initiatorContactCardCipher: any;
|
|
222
|
+
initiatorContactCardSharedCipher: any;
|
|
223
|
+
};
|
|
224
|
+
}>>;
|
|
225
|
+
completeOtkMutation({ keyExchangeId, initiatorRootKeyCipher, initiatorOneTimePbkCipher, responderContactCard, initiatorContactCard, }: CompleteOtkInput2): Promise<LrMutation<CompleteKeyExchangeOtkMutation, {
|
|
173
226
|
input: {
|
|
174
227
|
keyExchangeId: string;
|
|
175
228
|
rootKeyId: string;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { LrApolloService } from '../api/lr-apollo.service';
|
|
2
1
|
import { HttpClient } from '@angular/common/http';
|
|
3
2
|
import { AuthClass } from '@aws-amplify/auth/lib-esm/Auth';
|
|
4
3
|
import { JWK } from 'node-jose';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { LrApolloService } from '../api/lr-apollo.service';
|
|
5
|
+
import { LifeReadyAuthService } from '../auth/life-ready-auth.service';
|
|
6
|
+
import { EncryptionService } from '../encryption/encryption.service';
|
|
7
|
+
import { KeyFactoryService as KFS } from '../key/key-factory.service';
|
|
8
|
+
import { KeyGraphService } from '../key/key-graph.service';
|
|
9
|
+
import { KeyService } from '../key/key.service';
|
|
8
10
|
import { LifeReadyConfig } from '../life-ready.config';
|
|
9
|
-
import {
|
|
10
|
-
import { PasswordService } from './password.service';
|
|
11
|
-
import { KeyFactoryService as KFS } from '../cryptography/key-factory.service';
|
|
11
|
+
import { PasswordService } from '../password/password.service';
|
|
12
12
|
export interface SetPasswordParams {
|
|
13
13
|
lbopId: string;
|
|
14
14
|
newPassword: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { AuthClass } from '@aws-amplify/auth/lib-esm/Auth';
|
|
3
2
|
import { ApolloClientOptions } from '@apollo/client/core';
|
|
3
|
+
import { AuthClass } from '@aws-amplify/auth/lib-esm/Auth';
|
|
4
4
|
export declare const LR_CONFIG: InjectionToken<LifeReadyConfig>;
|
|
5
5
|
export interface LifeReadyConfig {
|
|
6
6
|
authUrl: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ID, MessageNode } from '../api/types';
|
|
2
|
+
export interface SendMessageMutationResult {
|
|
3
|
+
sendMessage: {
|
|
4
|
+
message: {
|
|
5
|
+
id: ID;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export declare const SendMessageMutation: import("../_common/ast").TypedDocumentNode<SendMessageMutationResult>;
|
|
10
|
+
export interface MessageQueryResult {
|
|
11
|
+
message: MessageNode;
|
|
12
|
+
}
|
|
13
|
+
export declare const MessageQuery: import("../_common/ast").TypedDocumentNode<MessageQueryResult>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Injector, NgZone } from '@angular/core';
|
|
2
|
+
import { JWK } from 'node-jose';
|
|
3
|
+
import { LrMutation, LrService } from '../api/lr-graphql';
|
|
4
|
+
import { MessageNode } from '../api/types';
|
|
5
|
+
import { EncryptionService } from '../encryption/encryption.service';
|
|
6
|
+
import { KeyExchangeService } from '../key-exchange/key-exchange.service';
|
|
7
|
+
import { KeyGraphService } from '../key/key-graph.service';
|
|
8
|
+
import { SendMessageInput } from './message.types';
|
|
9
|
+
export declare class MessageService extends LrService {
|
|
10
|
+
private ngZone;
|
|
11
|
+
private injector;
|
|
12
|
+
private keyGraph;
|
|
13
|
+
private encryptionService;
|
|
14
|
+
private keyExchangeService;
|
|
15
|
+
private readonly encrypt;
|
|
16
|
+
private readonly decrypt;
|
|
17
|
+
private readonly sign;
|
|
18
|
+
private readonly verify;
|
|
19
|
+
constructor(ngZone: NgZone, injector: Injector, keyGraph: KeyGraphService, encryptionService: EncryptionService, keyExchangeService: KeyExchangeService);
|
|
20
|
+
sendMessage(input: SendMessageInput): Promise<import("./message.gql").SendMessageMutationResult>;
|
|
21
|
+
sendMessageMutation({ username, userId, plainMessageJson, plainCipherMessageJson, }: SendMessageInput): Promise<LrMutation<import("./message.gql").SendMessageMutationResult, {
|
|
22
|
+
input: {
|
|
23
|
+
receiverUsername: string;
|
|
24
|
+
receiverId: string;
|
|
25
|
+
sharedKeyId: string;
|
|
26
|
+
senderSigPbkId: string;
|
|
27
|
+
signedCipherMessage: string;
|
|
28
|
+
plainMessage: string;
|
|
29
|
+
};
|
|
30
|
+
}>>;
|
|
31
|
+
decryptMessage(message: MessageNode, options: {
|
|
32
|
+
sharedKey: JWK.Key;
|
|
33
|
+
senderSigPbk: JWK.Key;
|
|
34
|
+
}): Promise<void>;
|
|
35
|
+
getMessage(id: string): Promise<MessageNode>;
|
|
36
|
+
}
|