@lifeready/core 6.0.4 → 6.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/lifeready-core.umd.js +3482 -7309
- 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/auth2/auth.config.js +57 -0
- package/esm2015/lib/auth2/auth2.gql.private.js +8 -1
- package/esm2015/lib/auth2/auth2.service.js +3 -4
- package/esm2015/lib/auth2/auth2.types.js +1 -1
- package/esm2015/lib/file-upload/file-upload.service.js +17 -12
- package/esm2015/lib/idle/idle.service.js +1 -2
- package/esm2015/lib/item2/item2.service.js +15 -45
- package/esm2015/lib/item2/item2.types.js +1 -1
- package/esm2015/lib/key/key-meta.service.js +16 -8
- package/esm2015/lib/key-exchange/key-exchange2.service.js +6 -25
- package/esm2015/lib/life-ready.module.js +2 -9
- package/esm2015/lib/password/password.service.js +1 -1
- package/esm2015/lib/profile/profile-details.service.js +120 -75
- package/esm2015/lib/profile/profile.gql.js +134 -1
- package/esm2015/lib/profile/profile.service.js +8 -5
- package/esm2015/lib/profile/profile.types.js +14 -3
- package/esm2015/lib/shared-contact-card/shared-contact-card.service.js +2 -2
- package/esm2015/lib/tp-password-reset/tp-password-reset.types.js +1 -1
- package/esm2015/lib/trusted-party/trusted-party2.service.js +3 -7
- package/esm2015/lifeready-core.js +7 -9
- package/esm2015/public-api.js +2 -20
- package/fesm2015/lifeready-core.js +3207 -6516
- package/fesm2015/lifeready-core.js.map +1 -1
- package/lib/auth2/auth2.gql.private.d.ts +15 -2
- package/lib/auth2/auth2.service.d.ts +1 -1
- package/lib/auth2/auth2.types.d.ts +19 -2
- package/lib/file-upload/file-upload.service.d.ts +3 -3
- package/lib/item2/item2.service.d.ts +11 -74
- package/lib/item2/item2.types.d.ts +1 -1
- package/lib/key/key-meta.service.d.ts +8 -1
- package/lib/key-exchange/key-exchange2.service.d.ts +5 -66
- package/lib/password/password.service.d.ts +1 -1
- package/lib/profile/profile-details.service.d.ts +10 -11
- package/lib/profile/profile.gql.d.ts +12 -0
- package/lib/profile/profile.service.d.ts +1 -3
- package/lib/profile/profile.types.d.ts +31 -4
- package/lib/shared-contact-card/shared-contact-card.service.d.ts +1 -2
- package/lib/tp-password-reset/tp-password-reset.types.d.ts +3 -3
- package/lib/trusted-party/trusted-party2.service.d.ts +2 -7
- package/lifeready-core.d.ts +6 -8
- package/lifeready-core.metadata.json +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -19
- package/esm2015/lib/auth/auth.config.js +0 -57
- package/esm2015/lib/auth/auth.gql.js +0 -16
- package/esm2015/lib/auth/auth.types.js +0 -18
- package/esm2015/lib/auth/life-ready-auth.service.js +0 -568
- package/esm2015/lib/category/category-meta.service.js +0 -99
- package/esm2015/lib/category/category.gql.js +0 -385
- package/esm2015/lib/category/category.service.js +0 -361
- package/esm2015/lib/category/category.types.js +0 -29
- package/esm2015/lib/key-exchange/key-exchange.gql.js +0 -188
- package/esm2015/lib/key-exchange/key-exchange.service.js +0 -436
- package/esm2015/lib/key-exchange/key-exchange.types.js +0 -7
- package/esm2015/lib/message/message.gql.js +0 -32
- package/esm2015/lib/message/message.service.js +0 -118
- package/esm2015/lib/message/message.types.js +0 -2
- package/esm2015/lib/plan/plan.gql.js +0 -123
- package/esm2015/lib/plan/plan.service.js +0 -150
- package/esm2015/lib/plan/plan.types.js +0 -11
- package/esm2015/lib/record/record-attachment.service.js +0 -102
- package/esm2015/lib/record/record.gql.js +0 -182
- package/esm2015/lib/record/record.service.js +0 -194
- package/esm2015/lib/record/record.types.js +0 -15
- package/esm2015/lib/record-type/record-type.service.js +0 -75
- package/esm2015/lib/record-type/record-type.types.js +0 -28
- package/esm2015/lib/trusted-party/trusted-party.gql.js +0 -148
- package/esm2015/lib/trusted-party/trusted-party.service.js +0 -308
- package/esm2015/lib/trusted-party/trusted-party.types.js +0 -41
- package/lib/auth/auth.gql.d.ts +0 -12
- package/lib/auth/auth.types.d.ts +0 -52
- package/lib/auth/life-ready-auth.service.d.ts +0 -73
- package/lib/category/category-meta.service.d.ts +0 -23
- package/lib/category/category.gql.d.ts +0 -44
- package/lib/category/category.service.d.ts +0 -66
- package/lib/category/category.types.d.ts +0 -75
- package/lib/key-exchange/key-exchange.gql.d.ts +0 -9
- package/lib/key-exchange/key-exchange.service.d.ts +0 -37
- package/lib/key-exchange/key-exchange.types.d.ts +0 -188
- package/lib/message/message.gql.d.ts +0 -13
- package/lib/message/message.service.d.ts +0 -36
- package/lib/message/message.types.d.ts +0 -12
- package/lib/plan/plan.gql.d.ts +0 -11
- package/lib/plan/plan.service.d.ts +0 -34
- package/lib/plan/plan.types.d.ts +0 -32
- package/lib/record/record-attachment.service.d.ts +0 -16
- package/lib/record/record.gql.d.ts +0 -14
- package/lib/record/record.service.d.ts +0 -25
- package/lib/record/record.types.d.ts +0 -56
- package/lib/record-type/record-type.service.d.ts +0 -11
- package/lib/record-type/record-type.types.d.ts +0 -50
- package/lib/trusted-party/trusted-party.gql.d.ts +0 -9
- package/lib/trusted-party/trusted-party.service.d.ts +0 -43
- package/lib/trusted-party/trusted-party.types.d.ts +0 -101
- /package/lib/{auth → auth2}/auth.config.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TpPasswordResetUserNode, UserNode } from '../api/types';
|
|
1
|
+
import { TpPasswordResetUserApprovalNode, TpPasswordResetUserApprover, TpPasswordResetUserAssembly, TpPasswordResetUserNode, TpPasswordResetUserSubAssembly, UserNode } from '../api/types';
|
|
2
2
|
import { UserKeys } from '../key/key.service';
|
|
3
3
|
export interface CurrentUserQueryResult {
|
|
4
4
|
currentUser: Pick<Required<UserNode>, 'username' | 'sessionEncryptionKey'> & {
|
|
@@ -7,6 +7,19 @@ export interface CurrentUserQueryResult {
|
|
|
7
7
|
}
|
|
8
8
|
export declare const CurrentUserQuery: import("../_common/ast").TypedDocumentNode<CurrentUserQueryResult>;
|
|
9
9
|
export interface ResetUserQueryResult {
|
|
10
|
-
tpPasswordResetUser: Pick<Required<TpPasswordResetUserNode>, 'username' | 'sessionEncryptionKey' | 'state' | 'passKey' | 'masterKey' | 'pxk' | '
|
|
10
|
+
tpPasswordResetUser: Pick<Required<TpPasswordResetUserNode>, 'username' | 'sessionEncryptionKey' | 'state' | 'passKey' | 'masterKey' | 'pxk' | 'approvals' | 'assemblyCipherData' | 'wrappedAssemblyKeyVerifierPrk'> & {
|
|
11
|
+
assembly: Pick<Required<TpPasswordResetUserAssembly>, 'singleReject' | 'quorum'> & {
|
|
12
|
+
subAssemblies: (Pick<Required<TpPasswordResetUserSubAssembly>, 'singleReject' | 'quorum'> & {
|
|
13
|
+
approvers: Pick<Required<TpPasswordResetUserApprover>, 'name' | 'email' | 'state'>[];
|
|
14
|
+
})[];
|
|
15
|
+
};
|
|
16
|
+
approvals: Pick<Required<TpPasswordResetUserApprovalNode>, 'id' | 'modified' | 'approverEmail' | 'receiverCipher' | 'receiverCipherPartialAssemblyKey'>;
|
|
17
|
+
};
|
|
11
18
|
}
|
|
12
19
|
export declare const ResetUserQuery: import("../_common/ast").TypedDocumentNode<ResetUserQueryResult>;
|
|
20
|
+
export interface SetSessionEncryptionKeyMutation {
|
|
21
|
+
setSessionEncryptionKey: {
|
|
22
|
+
sessionEncryptionKey: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export declare const SetSessionEncryptionKeyMutation: import("../_common/ast").TypedDocumentNode<SetSessionEncryptionKeyMutation>;
|
|
@@ -67,5 +67,5 @@ export declare class Auth2Service extends LrService {
|
|
|
67
67
|
* Clears the caches user. So we can simulate a page refresh and test getUser().
|
|
68
68
|
*/
|
|
69
69
|
debugClearUser(): void;
|
|
70
|
-
|
|
70
|
+
getCurrentUserAttributes(): Promise<LrCognitoUserAttribute[]>;
|
|
71
71
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CognitoUser } from '@aws-amplify/auth';
|
|
2
2
|
import { CognitoUserAttribute } from 'amazon-cognito-identity-js';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { JWK } from 'node-jose';
|
|
4
|
+
import { JSONObject, TpClaimState, TpPasswordResetUserApprovalNode, TpPasswordResetUserApprover, TpPasswordResetUserAssembly, TpPasswordResetUserNode, TpPasswordResetUserSubAssembly, UserNode } from '../api/types';
|
|
5
|
+
import { PassIdpParams, PassKeyParams } from '../key/key.types';
|
|
5
6
|
export declare type AuthUser = Pick<Required<UserNode>, 'username'> & {
|
|
6
7
|
sub: string;
|
|
7
8
|
loginEmail: string;
|
|
@@ -50,3 +51,19 @@ export interface LoginResult {
|
|
|
50
51
|
challenge?: LoginChallenge;
|
|
51
52
|
user?: AuthUser;
|
|
52
53
|
}
|
|
54
|
+
export interface PassKeyBundle {
|
|
55
|
+
passKeyParams: PassKeyParams;
|
|
56
|
+
passKey: JWK.Key;
|
|
57
|
+
passIdpParams: PassIdpParams;
|
|
58
|
+
passIdp: JWK.Key;
|
|
59
|
+
passIdpVerifier: JWK.Key;
|
|
60
|
+
wrappedPassIdpVerifierPrk: Record<string, JSONObject>;
|
|
61
|
+
}
|
|
62
|
+
export declare type ResetUser = Pick<Required<TpPasswordResetUserNode>, 'username' | 'state' | 'approvals'> & {
|
|
63
|
+
assembly: Pick<Required<TpPasswordResetUserAssembly>, 'singleReject' | 'quorum'> & {
|
|
64
|
+
subAssemblies: (Pick<Required<TpPasswordResetUserSubAssembly>, 'singleReject' | 'quorum'> & {
|
|
65
|
+
approvers: Pick<Required<TpPasswordResetUserApprover>, 'name' | 'email' | 'state'>[];
|
|
66
|
+
})[];
|
|
67
|
+
};
|
|
68
|
+
approvals: Pick<Required<TpPasswordResetUserApprovalNode>, 'id' | 'modified' | 'approverEmail' | 'receiverCipher' | 'receiverCipherPartialAssemblyKey'>;
|
|
69
|
+
};
|
|
@@ -8,8 +8,8 @@ export declare class FileUploadService {
|
|
|
8
8
|
private http;
|
|
9
9
|
private auth;
|
|
10
10
|
constructor(config: KcConfig, http: HttpClient, auth: AuthClass);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
loadFile(file: File): Promise<ArrayBuffer>;
|
|
11
|
+
downloadEncryptedFileJson(fileStateNodeId: string): Promise<JSONObject>;
|
|
12
|
+
downloadEncryptedFile(fileStateNodeId: string): Promise<string>;
|
|
13
|
+
loadFile(file: File | ArrayBuffer): Promise<ArrayBuffer>;
|
|
14
14
|
uploadEncryptedFile(options: UploadEncryptedFileOptions): Promise<string>;
|
|
15
15
|
}
|
|
@@ -28,15 +28,7 @@ export declare class Item2Service extends LrService {
|
|
|
28
28
|
getFileKeyId(fileId: LrRelayIdInput): Promise<string>;
|
|
29
29
|
getDirectoryKey(directoryId: LrRelayIdInput, directoryKeyId?: LrRelayIdInput): Promise<import("../key/key.types").Key>;
|
|
30
30
|
getFileKey(fileId: LrRelayIdInput, fileKeyId?: LrRelayIdInput): Promise<import("../key/key.types").Key>;
|
|
31
|
-
|
|
32
|
-
createDirectory(options: CreateDirectoryOptions): Promise<LrMutation<import("./item2.gql").CreateDirectoryMutationResult, {
|
|
33
|
-
input: {
|
|
34
|
-
parentDirectories: ParentDirectoryInput[];
|
|
35
|
-
parentRootDirectory: ParentRootDirectoryInput;
|
|
36
|
-
plainMeta: string;
|
|
37
|
-
cipherMeta: string;
|
|
38
|
-
};
|
|
39
|
-
}>>;
|
|
31
|
+
createDirectory(options: CreateDirectoryOptions): Promise<import("./item2.gql").CreateDirectoryMutationResult>;
|
|
40
32
|
createDirectoryMutation(options: CreateDirectoryOptions): Promise<LrMutation<import("./item2.gql").CreateDirectoryMutationResult, {
|
|
41
33
|
input: {
|
|
42
34
|
parentDirectories: ParentDirectoryInput[];
|
|
@@ -45,14 +37,7 @@ export declare class Item2Service extends LrService {
|
|
|
45
37
|
cipherMeta: string;
|
|
46
38
|
};
|
|
47
39
|
}>>;
|
|
48
|
-
|
|
49
|
-
updateDirectory(options: UpdateDirectoryOptions): Promise<LrMutation<import("./item2.gql").UpdateDirectoryMutationResult, {
|
|
50
|
-
input: {
|
|
51
|
-
directoryId: string;
|
|
52
|
-
plainMeta: string;
|
|
53
|
-
cipherMeta: string;
|
|
54
|
-
};
|
|
55
|
-
}>>;
|
|
40
|
+
updateDirectory(options: UpdateDirectoryOptions): Promise<import("./item2.gql").UpdateDirectoryMutationResult>;
|
|
56
41
|
updateDirectoryMutation(options: UpdateDirectoryOptions): Promise<LrMutation<import("./item2.gql").UpdateDirectoryMutationResult, {
|
|
57
42
|
input: {
|
|
58
43
|
directoryId: string;
|
|
@@ -60,27 +45,13 @@ export declare class Item2Service extends LrService {
|
|
|
60
45
|
cipherMeta: string;
|
|
61
46
|
};
|
|
62
47
|
}>>;
|
|
63
|
-
|
|
64
|
-
deleteDirectory(id: ID): LrMutation<import("./item2.gql").DeleteDirectoryMutationResult, {
|
|
65
|
-
input: {
|
|
66
|
-
directoryId: string;
|
|
67
|
-
};
|
|
68
|
-
}>;
|
|
48
|
+
deleteDirectory(id: ID): Promise<import("./item2.gql").DeleteDirectoryMutationResult>;
|
|
69
49
|
deleteDirectoryMutation(id: ID): LrMutation<import("./item2.gql").DeleteDirectoryMutationResult, {
|
|
70
50
|
input: {
|
|
71
51
|
directoryId: string;
|
|
72
52
|
};
|
|
73
53
|
}>;
|
|
74
|
-
|
|
75
|
-
createFile(options: CreateFileOptions): Promise<LrMutation<import("./item2.gql").CreateFileMutationResult, {
|
|
76
|
-
input: {
|
|
77
|
-
parentDirectories: FileParentDirectoryInput[];
|
|
78
|
-
wrappedStateKey: string;
|
|
79
|
-
contentResource: string;
|
|
80
|
-
plainMeta: string;
|
|
81
|
-
cipherMeta: string;
|
|
82
|
-
};
|
|
83
|
-
}>>;
|
|
54
|
+
createFile(options: CreateFileOptions): Promise<import("./item2.gql").CreateFileMutationResult>;
|
|
84
55
|
createFileMutation(options: CreateFileOptions): Promise<LrMutation<import("./item2.gql").CreateFileMutationResult, {
|
|
85
56
|
input: {
|
|
86
57
|
parentDirectories: FileParentDirectoryInput[];
|
|
@@ -90,16 +61,7 @@ export declare class Item2Service extends LrService {
|
|
|
90
61
|
cipherMeta: string;
|
|
91
62
|
};
|
|
92
63
|
}>>;
|
|
93
|
-
|
|
94
|
-
updateFile(options: UpdateFileOptions): Promise<LrMutation<import("./item2.gql").UpdateFileMutationResult, {
|
|
95
|
-
input: {
|
|
96
|
-
fileId: string;
|
|
97
|
-
wrappedStateKey: string;
|
|
98
|
-
contentResource: string;
|
|
99
|
-
plainMeta: string;
|
|
100
|
-
cipherMeta: string;
|
|
101
|
-
};
|
|
102
|
-
}>>;
|
|
64
|
+
updateFile(options: UpdateFileOptions): Promise<import("./item2.gql").UpdateFileMutationResult>;
|
|
103
65
|
updateFileMutation(options: UpdateFileOptions): Promise<LrMutation<import("./item2.gql").UpdateFileMutationResult, {
|
|
104
66
|
input: {
|
|
105
67
|
fileId: string;
|
|
@@ -109,62 +71,37 @@ export declare class Item2Service extends LrService {
|
|
|
109
71
|
cipherMeta: string;
|
|
110
72
|
};
|
|
111
73
|
}>>;
|
|
112
|
-
|
|
113
|
-
revertFile(options: RevertFileOptions): Promise<LrMutation<import("./item2.gql").RevertFileMutationResult, {
|
|
114
|
-
input: RevertFileOptions;
|
|
115
|
-
}>>;
|
|
74
|
+
revertFile(options: RevertFileOptions): Promise<import("./item2.gql").RevertFileMutationResult>;
|
|
116
75
|
revertFileMutation(options: RevertFileOptions): Promise<LrMutation<import("./item2.gql").RevertFileMutationResult, {
|
|
117
76
|
input: RevertFileOptions;
|
|
118
77
|
}>>;
|
|
119
|
-
|
|
120
|
-
deleteFile(id: ID): LrMutation<import("./item2.gql").DeleteFileMutationResult, {
|
|
121
|
-
input: {
|
|
122
|
-
fileId: string;
|
|
123
|
-
};
|
|
124
|
-
}>;
|
|
78
|
+
deleteFile(id: ID): Promise<import("./item2.gql").DeleteFileMutationResult>;
|
|
125
79
|
deleteFileMutation(id: ID): LrMutation<import("./item2.gql").DeleteFileMutationResult, {
|
|
126
80
|
input: {
|
|
127
81
|
fileId: string;
|
|
128
82
|
};
|
|
129
83
|
}>;
|
|
130
|
-
|
|
131
|
-
archiveDirectory(directoryId: string, options: ArchiveDirectoryOptions): LrMutation<import("./item2.gql").ArchiveDirectoryMutationResult, {
|
|
132
|
-
input: {
|
|
133
|
-
directoryId: string;
|
|
134
|
-
recursive: boolean;
|
|
135
|
-
};
|
|
136
|
-
}>;
|
|
84
|
+
archiveDirectory(directoryId: string, options: ArchiveDirectoryOptions): Promise<import("./item2.gql").ArchiveDirectoryMutationResult>;
|
|
137
85
|
archiveDirectoryMutation(directoryId: string, options: ArchiveDirectoryOptions): LrMutation<import("./item2.gql").ArchiveDirectoryMutationResult, {
|
|
138
86
|
input: {
|
|
139
87
|
directoryId: string;
|
|
140
88
|
recursive: boolean;
|
|
141
89
|
};
|
|
142
90
|
}>;
|
|
143
|
-
|
|
91
|
+
archiveFile(fileId: string): Promise<import("./item2.gql").ArchiveFileMutationResult>;
|
|
144
92
|
archiveFileMutation(fileId: string): LrMutation<import("./item2.gql").ArchiveFileMutationResult, {
|
|
145
93
|
input: {
|
|
146
94
|
fileId: string;
|
|
147
95
|
};
|
|
148
96
|
}>;
|
|
149
|
-
|
|
150
|
-
unarchiveDirectory(directoryId: string, options: UnarchiveDirectoryOptions): LrMutation<import("./item2.gql").UnarchiveDirectoryMutationResult, {
|
|
151
|
-
input: {
|
|
152
|
-
directoryId: string;
|
|
153
|
-
recursive: boolean;
|
|
154
|
-
};
|
|
155
|
-
}>;
|
|
97
|
+
unarchiveDirectory(directoryId: string, options: UnarchiveDirectoryOptions): Promise<import("./item2.gql").UnarchiveDirectoryMutationResult>;
|
|
156
98
|
unarchiveDirectoryMutation(directoryId: string, options: UnarchiveDirectoryOptions): LrMutation<import("./item2.gql").UnarchiveDirectoryMutationResult, {
|
|
157
99
|
input: {
|
|
158
100
|
directoryId: string;
|
|
159
101
|
recursive: boolean;
|
|
160
102
|
};
|
|
161
103
|
}>;
|
|
162
|
-
|
|
163
|
-
unarchiveFile(fileId: string): LrMutation<import("./item2.gql").UnarchiveFileMutationResult, {
|
|
164
|
-
input: {
|
|
165
|
-
fileId: string;
|
|
166
|
-
};
|
|
167
|
-
}>;
|
|
104
|
+
unarchiveFile(fileId: string): Promise<import("./item2.gql").UnarchiveFileMutationResult>;
|
|
168
105
|
unarchiveFileMutation(fileId: string): LrMutation<import("./item2.gql").UnarchiveFileMutationResult, {
|
|
169
106
|
input: {
|
|
170
107
|
fileId: string;
|
|
@@ -44,7 +44,7 @@ export interface UpdateDirectoryOptions extends CommonDirectoryOptions {
|
|
|
44
44
|
export interface CommonFileOptions {
|
|
45
45
|
plainMetaJson?: JSONObject;
|
|
46
46
|
cipherMetaClearJson?: JSONObject;
|
|
47
|
-
file?: File;
|
|
47
|
+
file?: File | ArrayBuffer;
|
|
48
48
|
upload?: (cipherFileContent: string) => Promise<string>;
|
|
49
49
|
}
|
|
50
50
|
export interface CreateFileOptions extends CommonFileOptions {
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { JWK } from 'node-jose';
|
|
2
2
|
import { LrApolloService } from '../api/lr-apollo.service';
|
|
3
|
+
import { ID } from '../api/types';
|
|
3
4
|
import { EncryptionService } from '../encryption/encryption.service';
|
|
4
5
|
import { KeyFactoryService } from './key-factory.service';
|
|
5
6
|
import { KeyGraphService } from './key-graph.service';
|
|
6
7
|
import { KeyService } from './key.service';
|
|
8
|
+
export interface DirectoryKeyQueryResult {
|
|
9
|
+
directory: {
|
|
10
|
+
keyId: ID;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export declare const DirectoryKeyQuery: import("../_common/ast").TypedDocumentNode<DirectoryKeyQueryResult>;
|
|
7
14
|
export interface HasCipherMeta {
|
|
8
15
|
keyId: string;
|
|
9
16
|
cipherMeta: string;
|
|
@@ -40,5 +47,5 @@ export declare class KeyMetaService {
|
|
|
40
47
|
}>;
|
|
41
48
|
wrapContent(secureContent: any, categoryIds?: string[]): Promise<WrappedContent>;
|
|
42
49
|
wrapContentWithKey(secureContent: any, keyId: string): Promise<WrappedContent>;
|
|
43
|
-
private
|
|
50
|
+
private getDirectoryKeyId;
|
|
44
51
|
}
|
|
@@ -109,49 +109,20 @@ export declare class KeyExchange2Service extends LrService {
|
|
|
109
109
|
username?: string;
|
|
110
110
|
userId?: string;
|
|
111
111
|
}): Promise<CurrentUserSharedKeyQuery2>;
|
|
112
|
-
cancelKeyExchange(id: string): Promise<
|
|
113
|
-
input: {
|
|
114
|
-
id: string;
|
|
115
|
-
};
|
|
116
|
-
}>>;
|
|
112
|
+
cancelKeyExchange(id: string): Promise<CancelKeyExchangeMutation>;
|
|
117
113
|
cancelKeyExchangeMutation(id: string): LrMutation<CancelKeyExchangeMutation, {
|
|
118
114
|
input: {
|
|
119
115
|
id: string;
|
|
120
116
|
};
|
|
121
117
|
}>;
|
|
122
|
-
|
|
123
|
-
declineKeyExchange(id: string, token: string): LrMutation<DeclineKeyExchangeMutation, {
|
|
124
|
-
input: {
|
|
125
|
-
id: string;
|
|
126
|
-
token: string;
|
|
127
|
-
};
|
|
128
|
-
}>;
|
|
118
|
+
declineKeyExchange(id: string, token: string): Promise<DeclineKeyExchangeMutation>;
|
|
129
119
|
declineKeyExchangeMutation(id: string, token: string): LrMutation<DeclineKeyExchangeMutation, {
|
|
130
120
|
input: {
|
|
131
121
|
id: string;
|
|
132
122
|
token: string;
|
|
133
123
|
};
|
|
134
124
|
}>;
|
|
135
|
-
|
|
136
|
-
initiateOtk(input?: InitiateOtkInput2): Promise<{
|
|
137
|
-
lrMutation: LrMutation<InitiateKeyExchangeOtkMutation, {
|
|
138
|
-
input: {
|
|
139
|
-
initiatorRootKeyCipher: string;
|
|
140
|
-
initiatorPxkId: string;
|
|
141
|
-
initiatorSigPxkId: string;
|
|
142
|
-
otKeyParams: string;
|
|
143
|
-
otKeyCipher: string;
|
|
144
|
-
sendEmail: {
|
|
145
|
-
email: string;
|
|
146
|
-
rawOtKey: string;
|
|
147
|
-
};
|
|
148
|
-
createTp: boolean;
|
|
149
|
-
initiatorPlainDataSig: string;
|
|
150
|
-
upgrade: boolean;
|
|
151
|
-
};
|
|
152
|
-
}>;
|
|
153
|
-
otKeyK: string;
|
|
154
|
-
}>;
|
|
125
|
+
initiateOtk(input?: InitiateOtkInput2): Promise<InitiateKeyExchangeOtkMutation>;
|
|
155
126
|
initiateOtkMutation({ message, email, contactCard, upgrade, }?: InitiateOtkInput2): Promise<{
|
|
156
127
|
lrMutation: LrMutation<InitiateKeyExchangeOtkMutation, {
|
|
157
128
|
input: {
|
|
@@ -171,24 +142,7 @@ export declare class KeyExchange2Service extends LrService {
|
|
|
171
142
|
}>;
|
|
172
143
|
otKeyK: string;
|
|
173
144
|
}>;
|
|
174
|
-
|
|
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
|
-
}>>;
|
|
145
|
+
respondOtk(input: RespondOtkInput2): Promise<RespondKeyExchangeOtkMutation>;
|
|
192
146
|
respondOtkMutation({ keyExchangeId, token, decryptedOtk, message, initiatorContactCard, responderContactCard, }: RespondOtkInput2): Promise<LrMutation<RespondKeyExchangeOtkMutation, {
|
|
193
147
|
input: {
|
|
194
148
|
keyExchangeId: string;
|
|
@@ -206,22 +160,7 @@ export declare class KeyExchange2Service extends LrService {
|
|
|
206
160
|
responderContactCard: any;
|
|
207
161
|
};
|
|
208
162
|
}>>;
|
|
209
|
-
|
|
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
|
-
}>>;
|
|
163
|
+
completeOtk(input: CompleteOtkInput2): Promise<CompleteKeyExchangeOtkMutation>;
|
|
225
164
|
completeOtkMutation({ keyExchangeId, initiatorRootKeyCipher, initiatorOneTimePbkCipher, responderContactCard, initiatorContactCard, }: CompleteOtkInput2): Promise<LrMutation<CompleteKeyExchangeOtkMutation, {
|
|
226
165
|
input: {
|
|
227
166
|
keyExchangeId: string;
|
|
@@ -2,7 +2,7 @@ import { HttpClient } from '@angular/common/http';
|
|
|
2
2
|
import { AuthClass } from '@aws-amplify/auth/lib-esm/Auth';
|
|
3
3
|
import { Duration } from 'moment';
|
|
4
4
|
import { JWK } from 'node-jose';
|
|
5
|
-
import { PassKeyBundle } from '../
|
|
5
|
+
import { PassKeyBundle } from '../auth2/auth2.types';
|
|
6
6
|
import { EncryptionService } from '../encryption/encryption.service';
|
|
7
7
|
import { KeyFactoryService as KFS } from '../key/key-factory.service';
|
|
8
8
|
import { KeyGraphService } from '../key/key-graph.service';
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { LifeReadyAuthService } from '../auth/life-ready-auth.service';
|
|
1
|
+
import { LrGraphQLService } from '../api/lr-graphql';
|
|
3
2
|
import { SharedContactCardService } from '../shared-contact-card/shared-contact-card.service';
|
|
4
|
-
import { TrustedPartyService } from '../trusted-party/trusted-party.service';
|
|
5
|
-
import { SharedTrustedPartyDetails } from '../trusted-party/trusted-party.types';
|
|
6
3
|
import { ProfileService } from './profile.service';
|
|
7
|
-
import { MainContactCardFields, TrustedPartyDetails } from './profile.types';
|
|
4
|
+
import { MainContactCard, MainContactCardFields, SharedTrustedPartyDetails, TrustedPartyDetails } from './profile.types';
|
|
8
5
|
export declare class ProfileDetailsService {
|
|
9
6
|
private sharedContactCardService;
|
|
10
|
-
private trustedPartyService;
|
|
11
7
|
private profileService;
|
|
12
|
-
private
|
|
13
|
-
constructor(sharedContactCardService: SharedContactCardService,
|
|
14
|
-
updateDetails(fields: MainContactCardFields): Promise<
|
|
8
|
+
private api;
|
|
9
|
+
constructor(sharedContactCardService: SharedContactCardService, profileService: ProfileService, api: LrGraphQLService);
|
|
10
|
+
updateDetails(fields: MainContactCardFields): Promise<MainContactCard>;
|
|
11
|
+
updateTrustedPartyDetails(details: SharedTrustedPartyDetails): Promise<void>;
|
|
12
|
+
synchronizeSharedDetails(details: TrustedPartyDetails): Promise<void>;
|
|
13
|
+
private fetchMainContactCard;
|
|
14
|
+
private getTrustedParties;
|
|
15
|
+
private mapTrustedParty;
|
|
15
16
|
private synchronizeContactCards;
|
|
16
17
|
private getChanges;
|
|
17
18
|
private synchronizeSharedContactCard;
|
|
18
|
-
updateTrustedPartyDetails(details: SharedTrustedPartyDetails): Promise<void>;
|
|
19
|
-
synchronizeSharedDetails(details: TrustedPartyDetails): Promise<void>;
|
|
20
19
|
private checkField;
|
|
21
20
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { Connection, ContactCardNode, TpNode } from '../api/types';
|
|
1
2
|
import { HasKeyGraph } from '../key/key.types';
|
|
2
3
|
import { HasEdges } from './../_common/types';
|
|
3
4
|
import { ApiContactCard, ApiCurrentUser } from './profile.types';
|
|
5
|
+
export declare const UserSharedKeyFields = "\n userSigPrk {\n id\n }\n otherSigPbk {\n id\n }\n sharedKey {\n id\n }\n mkSharedKey {\n id\n }\n mkPxk {\n id\n pbk\n }\n mkReshareRequestCipher\n mkReshareResponseCipher\n mkReshareRequestSent\n mkReshareResponseSent\n";
|
|
6
|
+
export declare const KeyExchangeFields = "\n id\n token\n state\n mode\n isInitiator\n initiator {\n id\n username\n }\n responder {\n id\n username\n }\n created\n modified\n tokenExpiryTime\n isExpired\n initiatorRootKeyCipher\n initiatorActionRequired\n responderActionRequired\n responderEmailAddress\n otk {\n state\n otKeyParams\n otKeyCipher\n sharedKey {\n id\n }\n mkSharedKey {\n id\n }\n initiatorSigPxk {\n id\n }\n responderSigPxk {\n id\n }\n initiatorOneTimePbkCipher\n responderPbkCipher\n}";
|
|
7
|
+
export declare const TrustedPartyProperties: string;
|
|
4
8
|
export interface CurrentUserQueryType extends HasKeyGraph {
|
|
5
9
|
currentUser: ApiCurrentUser;
|
|
6
10
|
contactCards: HasEdges<ApiContactCard>;
|
|
@@ -9,3 +13,11 @@ export interface CurrentUserQueryType extends HasKeyGraph {
|
|
|
9
13
|
export declare const CurrentUserQuery: import("graphql").DocumentNode;
|
|
10
14
|
export declare const CreateContactCardMutation: import("graphql").DocumentNode;
|
|
11
15
|
export declare const UpdateContactCardMutation: import("graphql").DocumentNode;
|
|
16
|
+
export interface TrustedPartiesQueryResult {
|
|
17
|
+
tps: Connection<TpNode>;
|
|
18
|
+
}
|
|
19
|
+
export declare const TrustedPartiesQuery: import("../_common/ast").TypedDocumentNode<TrustedPartiesQueryResult>;
|
|
20
|
+
export interface ContactCardsQueryResult {
|
|
21
|
+
contactCards: Connection<ContactCardNode>;
|
|
22
|
+
}
|
|
23
|
+
export declare const ContactCardsQuery: import("../_common/ast").TypedDocumentNode<ContactCardsQueryResult>;
|
|
@@ -6,7 +6,6 @@ import { KeyGraphService } from '../key/key-graph.service';
|
|
|
6
6
|
import { KeyMetaService } from '../key/key-meta.service';
|
|
7
7
|
import { KeyService } from '../key/key.service';
|
|
8
8
|
import { KcConfig } from '../life-ready.config';
|
|
9
|
-
import { UserPlan } from '../plan/plan.types';
|
|
10
9
|
import { ApiContactCard, ApiCurrentUser, MainContactCard, MainContactCardFields, PassIdpApiResult } from './profile.types';
|
|
11
10
|
export declare class ProfileService {
|
|
12
11
|
private config;
|
|
@@ -21,10 +20,9 @@ export declare class ProfileService {
|
|
|
21
20
|
getCurrentUser(): Promise<{
|
|
22
21
|
currentUser: ApiCurrentUser;
|
|
23
22
|
contactCard: ApiContactCard;
|
|
24
|
-
userPlans: UserPlan[];
|
|
25
23
|
}>;
|
|
26
24
|
decryptContactCard(contactCard: ApiContactCard): Promise<MainContactCard>;
|
|
27
|
-
updateDetails(id: string, keyId: string, fields: MainContactCardFields): Promise<
|
|
25
|
+
updateDetails(id: string, keyId: string, fields: MainContactCardFields): Promise<MainContactCard>;
|
|
28
26
|
private prepareContactCardInput;
|
|
29
27
|
private createContactCard;
|
|
30
28
|
private updateContactCard;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DateTime, UserDeleteNode } from '../api/types';
|
|
1
|
+
import { DateTime, UserDeleteNode, UserSharedKeyNode } from '../api/types';
|
|
2
|
+
import { IdKeyPair } from '../item2/item2.types';
|
|
2
3
|
import { PassIdpParams, PassKey } from '../key/key.types';
|
|
3
4
|
export declare enum FeatureAction {
|
|
4
5
|
ACCESS = "access"
|
|
@@ -72,9 +73,8 @@ export declare class MainContactCardFields {
|
|
|
72
73
|
phone: MainContactCardProperty<string>;
|
|
73
74
|
address: MainContactCardProperty<ContactCardAddress>;
|
|
74
75
|
}
|
|
75
|
-
export
|
|
76
|
-
|
|
77
|
-
keyId: string;
|
|
76
|
+
export interface MainContactCard extends IdKeyPair {
|
|
77
|
+
fields: MainContactCardFields;
|
|
78
78
|
}
|
|
79
79
|
export declare class MainContactCardPlainFields {
|
|
80
80
|
name: ContactCardName;
|
|
@@ -105,3 +105,30 @@ export declare class TrustedPartyDetails {
|
|
|
105
105
|
value: ContactCardAddress;
|
|
106
106
|
}[];
|
|
107
107
|
}
|
|
108
|
+
export declare class SharedTrustedPartyDetails extends TrustedPartyDetails {
|
|
109
|
+
id: string;
|
|
110
|
+
ownedKeyId: string;
|
|
111
|
+
sharedKeyId: string;
|
|
112
|
+
}
|
|
113
|
+
export declare class TPFeatures {
|
|
114
|
+
sharedVault: SharedVaultFeature;
|
|
115
|
+
}
|
|
116
|
+
export declare class SharedVaultFeature {
|
|
117
|
+
hasAccess: boolean;
|
|
118
|
+
}
|
|
119
|
+
export declare enum TrustedPartyType {
|
|
120
|
+
User = "user",
|
|
121
|
+
Organisation = "organisation"
|
|
122
|
+
}
|
|
123
|
+
export declare class TrustedParty {
|
|
124
|
+
id: string;
|
|
125
|
+
type: TrustedPartyType;
|
|
126
|
+
name: string;
|
|
127
|
+
hasScenarios: boolean;
|
|
128
|
+
hasSharedVault: boolean;
|
|
129
|
+
details: TrustedPartyDetails;
|
|
130
|
+
mySharedDetails: SharedTrustedPartyDetails;
|
|
131
|
+
userSharedKey: UserSharedKeyNode;
|
|
132
|
+
username: string;
|
|
133
|
+
features: TPFeatures;
|
|
134
|
+
}
|
|
@@ -4,8 +4,7 @@ import { EncryptionService } from '../encryption/encryption.service';
|
|
|
4
4
|
import { KeyGraphService } from '../key/key-graph.service';
|
|
5
5
|
import { KeyService } from '../key/key.service';
|
|
6
6
|
import { Key } from '../key/key.types';
|
|
7
|
-
import { TrustedPartyDetails } from '../profile/profile.types';
|
|
8
|
-
import { SharedTrustedPartyDetails } from '../trusted-party/trusted-party.types';
|
|
7
|
+
import { SharedTrustedPartyDetails, TrustedPartyDetails } from '../profile/profile.types';
|
|
9
8
|
import { User } from '../user/user.types';
|
|
10
9
|
export declare const SharedContactCardFields = "\n id\n owner {\n id\n username\n }\n ownerKey {\n id\n }\n ownerCipherData\n receiver {\n id\n username\n }\n receiverKey {\n id\n }\n receiverCipherData\n sharedKey {\n id\n }\n sharedCipherData\n sharedCipherDataSig\n sharedCipherDataSigPxk {\n id\n }\n";
|
|
11
10
|
export interface SharedContactCard {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSONObject } from '../api/types';
|
|
2
2
|
import { Key } from '../key/key.types';
|
|
3
|
-
export interface
|
|
3
|
+
export interface TpAssemblyApprover {
|
|
4
4
|
id: string;
|
|
5
5
|
tp: {
|
|
6
6
|
id: string;
|
|
@@ -16,8 +16,8 @@ export interface TpSubAssembly {
|
|
|
16
16
|
singleReject: boolean;
|
|
17
17
|
quorum: number;
|
|
18
18
|
subjectCipherData: string;
|
|
19
|
-
|
|
20
|
-
approvers:
|
|
19
|
+
subjectCipherDataClearJson: JSONObject;
|
|
20
|
+
approvers: TpAssemblyApprover[];
|
|
21
21
|
}
|
|
22
22
|
export interface TpAssembly {
|
|
23
23
|
singleReject: boolean;
|
|
@@ -17,12 +17,7 @@ export declare class TrustedParty2Service extends LrService {
|
|
|
17
17
|
private keyFactory;
|
|
18
18
|
private encryptionService;
|
|
19
19
|
constructor(ngZone: NgZone, injector: Injector, keyGraph: KeyGraphService, item2Service: Item2Service, keyService: KeyService, keyFactory: KeyFactoryService, encryptionService: EncryptionService);
|
|
20
|
-
|
|
21
|
-
deleteTp(tpId: LrRelayIdInput): LrMutation<DeleteTpMutation, {
|
|
22
|
-
input: {
|
|
23
|
-
id: string;
|
|
24
|
-
};
|
|
25
|
-
}>;
|
|
20
|
+
deleteTp(tpId: LrRelayIdInput): Promise<DeleteTpMutation>;
|
|
26
21
|
deleteTpMutation(tpId: LrRelayIdInput): LrMutation<DeleteTpMutation, {
|
|
27
22
|
input: {
|
|
28
23
|
id: string;
|
|
@@ -66,7 +61,7 @@ export declare class TrustedParty2Service extends LrService {
|
|
|
66
61
|
};
|
|
67
62
|
}>>;
|
|
68
63
|
private unshareItemMutation;
|
|
69
|
-
|
|
64
|
+
requestMkReshareMutation(tpId: LrRelayIdInput): Promise<LrMutation<RequestTpMkReshareMutation, {
|
|
70
65
|
input: {
|
|
71
66
|
tpId: string;
|
|
72
67
|
masterKeyId: string;
|
package/lifeready-core.d.ts
CHANGED
|
@@ -2,17 +2,15 @@
|
|
|
2
2
|
* Generated bundle index. Do not edit.
|
|
3
3
|
*/
|
|
4
4
|
export * from './public-api';
|
|
5
|
-
export { RunOutsideAngular as
|
|
6
|
-
export { LrGraphQLService as
|
|
7
|
-
export { TpPasswordResetProcessorService as ɵg } from './lib/api/query-processor/tp-password-reset-processor.service';
|
|
5
|
+
export { RunOutsideAngular as ɵf } from './lib/_common/run-outside-angular';
|
|
6
|
+
export { LrGraphQLService as ɵg, LrService as ɵe } from './lib/api/lr-graphql';
|
|
8
7
|
export { EncryptionService as ɵb } from './lib/encryption/encryption.service';
|
|
9
8
|
export { KeyFactoryService as ɵd } from './lib/key/key-factory.service';
|
|
10
9
|
export { KeyGraphService as ɵa } from './lib/key/key-graph.service';
|
|
11
|
-
export { KeyMetaService as
|
|
10
|
+
export { KeyMetaService as ɵh } from './lib/key/key-meta.service';
|
|
12
11
|
export { KeyService as ɵc } from './lib/key/key.service';
|
|
13
|
-
export { ScenarioAssemblyController as
|
|
14
|
-
export { SharedContactCardService as ɵl } from './lib/shared-contact-card/shared-contact-card.service';
|
|
12
|
+
export { ScenarioAssemblyController as ɵm } from './lib/scenario/scenario.controller';
|
|
13
|
+
export { SharedContactCardFields as ɵk, SharedContactCardService as ɵl } from './lib/shared-contact-card/shared-contact-card.service';
|
|
15
14
|
export { TpAssemblyController as ɵj } from './lib/tp-assembly/tp-assembly';
|
|
16
15
|
export { TpPasswordResetAssemblyController as ɵi } from './lib/tp-password-reset/tp-password-reset.controller';
|
|
17
|
-
export { TpPasswordResetPrivateService as
|
|
18
|
-
export { TrustedPartyService as ɵm } from './lib/trusted-party/trusted-party.service';
|
|
16
|
+
export { TpPasswordResetPrivateService as ɵn } from './lib/tp-password-reset/tp-password-reset.private.service';
|