@lifeready/core 9.0.8 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/fesm2022/lifeready-core.mjs +10522 -0
  2. package/fesm2022/lifeready-core.mjs.map +1 -0
  3. package/package.json +21 -16
  4. package/types/lifeready-core.d.ts +5329 -0
  5. package/bundles/lifeready-core.umd.js +0 -13231
  6. package/bundles/lifeready-core.umd.js.map +0 -1
  7. package/bundles/lifeready-core.umd.min.js +0 -2
  8. package/bundles/lifeready-core.umd.min.js.map +0 -1
  9. package/esm2015/lib/_common/ast.js +0 -41
  10. package/esm2015/lib/_common/deferred-promise.js +0 -24
  11. package/esm2015/lib/_common/exceptions.js +0 -186
  12. package/esm2015/lib/_common/index.js +0 -3
  13. package/esm2015/lib/_common/kc-lodash.js +0 -11
  14. package/esm2015/lib/_common/key.js +0 -28
  15. package/esm2015/lib/_common/queries.gql.js +0 -43
  16. package/esm2015/lib/_common/run-outside-angular.js +0 -80
  17. package/esm2015/lib/_common/storage.js +0 -28
  18. package/esm2015/lib/_common/types.js +0 -2
  19. package/esm2015/lib/_common/utils.js +0 -73
  20. package/esm2015/lib/api/lr-apollo.service.js +0 -47
  21. package/esm2015/lib/api/lr-graphql/index.js +0 -6
  22. package/esm2015/lib/api/lr-graphql/lr-graphql.service.js +0 -170
  23. package/esm2015/lib/api/lr-graphql/lr-merged-mutation.js +0 -216
  24. package/esm2015/lib/api/lr-graphql/lr-mutation-base.js +0 -51
  25. package/esm2015/lib/api/lr-graphql/lr-mutation.js +0 -91
  26. package/esm2015/lib/api/lr-graphql/lr.service.js +0 -18
  27. package/esm2015/lib/api/query-processor/common-processors.service.js +0 -94
  28. package/esm2015/lib/api/query-processor/index.js +0 -3
  29. package/esm2015/lib/api/query-processor/query-processor.service.js +0 -307
  30. package/esm2015/lib/api/query-processor/tp-password-reset-processor.service.js +0 -110
  31. package/esm2015/lib/api/types/graphql.types.js +0 -8
  32. package/esm2015/lib/api/types/index.js +0 -3
  33. package/esm2015/lib/api/types/lr-graphql.types.js +0 -182
  34. package/esm2015/lib/auth/auth.config.js +0 -57
  35. package/esm2015/lib/auth/auth.gql.private.js +0 -85
  36. package/esm2015/lib/auth/auth.service.js +0 -616
  37. package/esm2015/lib/auth/auth.types.js +0 -19
  38. package/esm2015/lib/contact-card/contact-card.gql.js +0 -79
  39. package/esm2015/lib/contact-card/contact-card.service.js +0 -156
  40. package/esm2015/lib/contact-card/contact-card2.gql.js +0 -29
  41. package/esm2015/lib/contact-card/contact-card2.service.js +0 -103
  42. package/esm2015/lib/encryption/encryption.service.js +0 -188
  43. package/esm2015/lib/file-upload/file-upload.service.js +0 -70
  44. package/esm2015/lib/file-upload/file-upload.types.js +0 -2
  45. package/esm2015/lib/idle/idle.service.js +0 -159
  46. package/esm2015/lib/idle/idle.types.js +0 -7
  47. package/esm2015/lib/item/item.gql.js +0 -166
  48. package/esm2015/lib/item/item.gql.private.js +0 -41
  49. package/esm2015/lib/item/item.service.js +0 -662
  50. package/esm2015/lib/item/item.types.js +0 -2
  51. package/esm2015/lib/key/key-factory.service.js +0 -226
  52. package/esm2015/lib/key/key-graph.service.js +0 -314
  53. package/esm2015/lib/key/key-meta.service.js +0 -153
  54. package/esm2015/lib/key/key.service.js +0 -124
  55. package/esm2015/lib/key/key.types.js +0 -16
  56. package/esm2015/lib/key-exchange/key-exchange.gql.js +0 -174
  57. package/esm2015/lib/key-exchange/key-exchange.service.js +0 -496
  58. package/esm2015/lib/lbop/lbop.service.js +0 -351
  59. package/esm2015/lib/life-ready.config.js +0 -96
  60. package/esm2015/lib/life-ready.module.js +0 -42
  61. package/esm2015/lib/lock/lock.gql.js +0 -40
  62. package/esm2015/lib/lock/lock.service.js +0 -64
  63. package/esm2015/lib/notification/notification.gql.js +0 -43
  64. package/esm2015/lib/notification/notification.service.js +0 -118
  65. package/esm2015/lib/password/password.gql.js +0 -28
  66. package/esm2015/lib/password/password.service.js +0 -309
  67. package/esm2015/lib/persist/persist.service.js +0 -181
  68. package/esm2015/lib/plan/plan.gql.js +0 -91
  69. package/esm2015/lib/plan/plan.service.js +0 -191
  70. package/esm2015/lib/plan/plan.types.js +0 -2
  71. package/esm2015/lib/profile/profile-details.service.js +0 -261
  72. package/esm2015/lib/profile/profile.gql.js +0 -170
  73. package/esm2015/lib/profile/profile.service.js +0 -166
  74. package/esm2015/lib/profile/profile.types.js +0 -45
  75. package/esm2015/lib/register/register.service.js +0 -173
  76. package/esm2015/lib/register/register.types.js +0 -3
  77. package/esm2015/lib/reminder/reminder.gql.js +0 -27
  78. package/esm2015/lib/reminder/reminder.service.js +0 -85
  79. package/esm2015/lib/reminder/reminder.types.js +0 -2
  80. package/esm2015/lib/scenario/scenario.constants.js +0 -2
  81. package/esm2015/lib/scenario/scenario.controller.js +0 -34
  82. package/esm2015/lib/scenario/scenario.gql.js +0 -90
  83. package/esm2015/lib/scenario/scenario.private.gql.js +0 -200
  84. package/esm2015/lib/scenario/scenario.service.js +0 -679
  85. package/esm2015/lib/scenario/scenario.types.js +0 -2
  86. package/esm2015/lib/server-config/server-config.gql.js +0 -9
  87. package/esm2015/lib/server-config/server-config.service.js +0 -41
  88. package/esm2015/lib/shared-contact-card/shared-contact-card.service.js +0 -119
  89. package/esm2015/lib/shared-contact-card/shared-contact-card2.gql.js +0 -41
  90. package/esm2015/lib/shared-contact-card/shared-contact-card2.service.js +0 -117
  91. package/esm2015/lib/slip39/slip39.service.js +0 -167
  92. package/esm2015/lib/time/time.service.js +0 -152
  93. package/esm2015/lib/tp-assembly/tp-assembly.js +0 -363
  94. package/esm2015/lib/tp-assembly/tp-assembly.private.gql.js +0 -22
  95. package/esm2015/lib/tp-assembly/tp-assembly.types.js +0 -2
  96. package/esm2015/lib/tp-password-reset/tp-password-reset-request.service.js +0 -98
  97. package/esm2015/lib/tp-password-reset/tp-password-reset-user.service.js +0 -121
  98. package/esm2015/lib/tp-password-reset/tp-password-reset.constants.js +0 -4
  99. package/esm2015/lib/tp-password-reset/tp-password-reset.controller.js +0 -34
  100. package/esm2015/lib/tp-password-reset/tp-password-reset.gql.js +0 -74
  101. package/esm2015/lib/tp-password-reset/tp-password-reset.private.gql.js +0 -166
  102. package/esm2015/lib/tp-password-reset/tp-password-reset.private.service.js +0 -54
  103. package/esm2015/lib/tp-password-reset/tp-password-reset.service.js +0 -110
  104. package/esm2015/lib/tp-password-reset/tp-password-reset.types.js +0 -2
  105. package/esm2015/lib/trusted-party/trusted-party.gql.js +0 -96
  106. package/esm2015/lib/trusted-party/trusted-party.gql.private.js +0 -51
  107. package/esm2015/lib/trusted-party/trusted-party.service.js +0 -461
  108. package/esm2015/lib/trusted-party/trusted-party.types.js +0 -2
  109. package/esm2015/lib/two-factor/two-factor.service.js +0 -74
  110. package/esm2015/lib/user/user.gql.js +0 -32
  111. package/esm2015/lib/user/user.service.js +0 -58
  112. package/esm2015/lib/user/user.types.js +0 -2
  113. package/esm2015/lib/web-crypto/web-crypto.service.js +0 -29
  114. package/esm2015/lifeready-core.js +0 -17
  115. package/esm2015/public-api.js +0 -60
  116. package/fesm2015/lifeready-core.js +0 -10970
  117. package/fesm2015/lifeready-core.js.map +0 -1
  118. package/lib/_common/ast.d.ts +0 -11
  119. package/lib/_common/deferred-promise.d.ts +0 -12
  120. package/lib/_common/exceptions.d.ts +0 -126
  121. package/lib/_common/index.d.ts +0 -2
  122. package/lib/_common/kc-lodash.d.ts +0 -5
  123. package/lib/_common/key.d.ts +0 -14
  124. package/lib/_common/queries.gql.d.ts +0 -4
  125. package/lib/_common/run-outside-angular.d.ts +0 -14
  126. package/lib/_common/storage.d.ts +0 -13
  127. package/lib/_common/types.d.ts +0 -15
  128. package/lib/_common/utils.d.ts +0 -12
  129. package/lib/api/lr-apollo.service.d.ts +0 -15
  130. package/lib/api/lr-graphql/index.d.ts +0 -5
  131. package/lib/api/lr-graphql/lr-graphql.service.d.ts +0 -81
  132. package/lib/api/lr-graphql/lr-merged-mutation.d.ts +0 -46
  133. package/lib/api/lr-graphql/lr-mutation-base.d.ts +0 -28
  134. package/lib/api/lr-graphql/lr-mutation.d.ts +0 -48
  135. package/lib/api/lr-graphql/lr.service.d.ts +0 -9
  136. package/lib/api/query-processor/common-processors.service.d.ts +0 -36
  137. package/lib/api/query-processor/index.d.ts +0 -2
  138. package/lib/api/query-processor/query-processor.service.d.ts +0 -18
  139. package/lib/api/query-processor/tp-password-reset-processor.service.d.ts +0 -15
  140. package/lib/api/types/graphql.types.d.ts +0 -30
  141. package/lib/api/types/index.d.ts +0 -2
  142. package/lib/api/types/lr-graphql.types.d.ts +0 -807
  143. package/lib/auth/auth.config.d.ts +0 -5
  144. package/lib/auth/auth.gql.private.d.ts +0 -25
  145. package/lib/auth/auth.service.d.ts +0 -72
  146. package/lib/auth/auth.types.d.ts +0 -70
  147. package/lib/contact-card/contact-card.gql.d.ts +0 -7
  148. package/lib/contact-card/contact-card.service.d.ts +0 -53
  149. package/lib/contact-card/contact-card2.gql.d.ts +0 -25
  150. package/lib/contact-card/contact-card2.service.d.ts +0 -64
  151. package/lib/encryption/encryption.service.d.ts +0 -42
  152. package/lib/file-upload/file-upload.service.d.ts +0 -15
  153. package/lib/file-upload/file-upload.types.d.ts +0 -5
  154. package/lib/idle/idle.service.d.ts +0 -47
  155. package/lib/idle/idle.types.d.ts +0 -10
  156. package/lib/item/item.gql.d.ts +0 -134
  157. package/lib/item/item.gql.private.d.ts +0 -35
  158. package/lib/item/item.service.d.ts +0 -201
  159. package/lib/item/item.types.d.ts +0 -95
  160. package/lib/key/key-factory.service.d.ts +0 -40
  161. package/lib/key/key-graph.service.d.ts +0 -41
  162. package/lib/key/key-meta.service.d.ts +0 -51
  163. package/lib/key/key.service.d.ts +0 -36
  164. package/lib/key/key.types.d.ts +0 -86
  165. package/lib/key-exchange/key-exchange.gql.d.ts +0 -141
  166. package/lib/key-exchange/key-exchange.service.d.ts +0 -179
  167. package/lib/lbop/lbop.service.d.ts +0 -99
  168. package/lib/life-ready.config.d.ts +0 -26
  169. package/lib/life-ready.module.d.ts +0 -5
  170. package/lib/lock/lock.gql.d.ts +0 -27
  171. package/lib/lock/lock.service.d.ts +0 -34
  172. package/lib/notification/notification.gql.d.ts +0 -37
  173. package/lib/notification/notification.service.d.ts +0 -64
  174. package/lib/password/password.gql.d.ts +0 -3
  175. package/lib/password/password.service.d.ts +0 -79
  176. package/lib/persist/persist.service.d.ts +0 -31
  177. package/lib/plan/plan.gql.d.ts +0 -69
  178. package/lib/plan/plan.service.d.ts +0 -111
  179. package/lib/plan/plan.types.d.ts +0 -16
  180. package/lib/profile/profile-details.service.d.ts +0 -20
  181. package/lib/profile/profile.gql.d.ts +0 -21
  182. package/lib/profile/profile.service.d.ts +0 -32
  183. package/lib/profile/profile.types.d.ts +0 -121
  184. package/lib/register/register.service.d.ts +0 -25
  185. package/lib/register/register.types.d.ts +0 -6
  186. package/lib/reminder/reminder.gql.d.ts +0 -23
  187. package/lib/reminder/reminder.service.d.ts +0 -33
  188. package/lib/reminder/reminder.types.d.ts +0 -17
  189. package/lib/scenario/scenario.constants.d.ts +0 -1
  190. package/lib/scenario/scenario.controller.d.ts +0 -10
  191. package/lib/scenario/scenario.gql.d.ts +0 -78
  192. package/lib/scenario/scenario.private.gql.d.ts +0 -16
  193. package/lib/scenario/scenario.service.d.ts +0 -655
  194. package/lib/scenario/scenario.types.d.ts +0 -64
  195. package/lib/server-config/server-config.gql.d.ts +0 -5
  196. package/lib/server-config/server-config.service.d.ts +0 -9
  197. package/lib/shared-contact-card/shared-contact-card.service.d.ts +0 -33
  198. package/lib/shared-contact-card/shared-contact-card2.gql.d.ts +0 -36
  199. package/lib/shared-contact-card/shared-contact-card2.service.d.ts +0 -45
  200. package/lib/slip39/slip39.service.d.ts +0 -42
  201. package/lib/time/time.service.d.ts +0 -26
  202. package/lib/tp-assembly/tp-assembly.d.ts +0 -177
  203. package/lib/tp-assembly/tp-assembly.private.gql.d.ts +0 -5
  204. package/lib/tp-assembly/tp-assembly.types.d.ts +0 -40
  205. package/lib/tp-password-reset/tp-password-reset-request.service.d.ts +0 -16
  206. package/lib/tp-password-reset/tp-password-reset-user.service.d.ts +0 -29
  207. package/lib/tp-password-reset/tp-password-reset.constants.d.ts +0 -3
  208. package/lib/tp-password-reset/tp-password-reset.controller.d.ts +0 -10
  209. package/lib/tp-password-reset/tp-password-reset.gql.d.ts +0 -63
  210. package/lib/tp-password-reset/tp-password-reset.private.gql.d.ts +0 -163
  211. package/lib/tp-password-reset/tp-password-reset.private.service.d.ts +0 -59
  212. package/lib/tp-password-reset/tp-password-reset.service.d.ts +0 -112
  213. package/lib/tp-password-reset/tp-password-reset.types.d.ts +0 -40
  214. package/lib/trusted-party/trusted-party.gql.d.ts +0 -85
  215. package/lib/trusted-party/trusted-party.gql.private.d.ts +0 -40
  216. package/lib/trusted-party/trusted-party.service.d.ts +0 -192
  217. package/lib/trusted-party/trusted-party.types.d.ts +0 -31
  218. package/lib/two-factor/two-factor.service.d.ts +0 -15
  219. package/lib/user/user.gql.d.ts +0 -8
  220. package/lib/user/user.service.d.ts +0 -9
  221. package/lib/user/user.types.d.ts +0 -16
  222. package/lib/web-crypto/web-crypto.service.d.ts +0 -5
  223. package/lifeready-core.d.ts +0 -16
  224. package/lifeready-core.metadata.json +0 -1
  225. package/public-api.d.ts +0 -56
@@ -1,5 +0,0 @@
1
- import { AuthClass } from '@aws-amplify/auth/lib-esm/Auth';
2
- import { KcConfig } from '../life-ready.config';
3
- export declare function handleCognitoCallback<T>(method: (callback: (err?: Error, result?: T) => void) => void): Promise<T>;
4
- export declare const awsFetch: (authUrl: string) => (url: any, options: any) => Promise<Response>;
5
- export declare const configureAmplifyAuth: ({ authUrl: authUrl, userPoolId, userPoolWebClientId }: KcConfig, auth: AuthClass) => () => void;
@@ -1,25 +0,0 @@
1
- import { TpPasswordResetUser, TpPasswordResetUserApprovalNode, TpPasswordResetUserApprover, TpPasswordResetUserAssembly, TpPasswordResetUserSubAssembly, UserNode } from '../api/types';
2
- import { UserKeys } from '../key/key.service';
3
- export interface CurrentUserQueryResult {
4
- currentUser: Pick<Required<UserNode>, 'id' | 'username' | 'sessionEncryptionKey'> & {
5
- currentUserKey: UserKeys;
6
- };
7
- }
8
- export declare const CurrentUserQuery: import("../_common/ast").TypedDocumentNode<CurrentUserQueryResult>;
9
- export interface ResetUserQueryResult {
10
- tpPasswordResetUser: Pick<Required<TpPasswordResetUser>, '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
- };
18
- }
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>;
@@ -1,72 +0,0 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import { Injector, NgZone } from '@angular/core';
3
- import { AuthClass } from '@aws-amplify/auth/lib-esm/Auth';
4
- import { LrGraphQLService, LrService } from '../api/lr-graphql';
5
- import { EncryptionService } from '../encryption/encryption.service';
6
- import { IdleService } from '../idle/idle.service';
7
- import { KeyFactoryService } from '../key/key-factory.service';
8
- import { KeyGraphService } from '../key/key-graph.service';
9
- import { KeyService } from '../key/key.service';
10
- import { KcConfig } from '../life-ready.config';
11
- import { PasswordService } from '../password/password.service';
12
- import { PersistService } from '../persist/persist.service';
13
- import { TpPasswordResetAssemblyController } from '../tp-password-reset/tp-password-reset.controller';
14
- import { AuthUser, LoginChallenge, LoginOptions, LoginResult, LogoutListener, LrCognitoUserAttribute } from './auth.types';
15
- export declare class AuthService extends LrService {
16
- private ngZone;
17
- private injector;
18
- private http;
19
- private cognito;
20
- private api;
21
- private keyService;
22
- private keyGraphService;
23
- private keyFactoryService;
24
- private passwordService;
25
- private idleService;
26
- private persistService;
27
- private encryptionService;
28
- private assemblyController;
29
- private kcConfig;
30
- static CHALLENGE_TIMEOUT: number;
31
- private logoutListeners;
32
- private user;
33
- private password;
34
- constructor(ngZone: NgZone, injector: Injector, http: HttpClient, cognito: AuthClass, api: LrGraphQLService, keyService: KeyService, keyGraphService: KeyGraphService, keyFactoryService: KeyFactoryService, passwordService: PasswordService, idleService: IdleService, persistService: PersistService, encryptionService: EncryptionService, assemblyController: TpPasswordResetAssemblyController, kcConfig: KcConfig);
35
- importPassword(plainPassword: string): Promise<CryptoKey>;
36
- logout(): Promise<void>;
37
- addLogoutListener(callback: LogoutListener): void;
38
- removeLogoutListener(callback: LogoutListener): void;
39
- login(emailOrPhone: string, password: CryptoKey, { tpPasswordResetAutoComplete }?: LoginOptions): Promise<LoginResult>;
40
- verifyLogin(options: {
41
- challenge: LoginChallenge;
42
- code: string;
43
- rememberMe: boolean;
44
- }): Promise<LoginResult>;
45
- getUser(): Promise<AuthUser>;
46
- refreshAccessToken(): Promise<unknown>;
47
- private fetchCurrentUser;
48
- private fetchResetUser;
49
- private kcLogout;
50
- private fetchPassIdpParams;
51
- private loginImpl;
52
- private loginIdp;
53
- private loginIdpImpl;
54
- private handlePostAuth;
55
- private handlePasswordRecovery;
56
- private handleSessionEncryptionKey;
57
- private getCognitoUserAttribute;
58
- private loadUserKeys;
59
- private loadUser;
60
- private loadRegularUser;
61
- private loadResetUser;
62
- private recoverAssemblyKey;
63
- completeResetRequest(newPassword: CryptoKey): Promise<void>;
64
- debugLogin(username: string, password: CryptoKey): Promise<AuthUser>;
65
- private debugLoadUser;
66
- /**
67
- * Clears the caches user. So we can simulate a page refresh and test getUser().
68
- */
69
- debugClearUser(): void;
70
- getCurrentUserAttributes(): Promise<LrCognitoUserAttribute[]>;
71
- debugRetainRbacCache(b: boolean): void;
72
- }
@@ -1,70 +0,0 @@
1
- import { CognitoUser } from '@aws-amplify/auth';
2
- import { CognitoUserAttribute } from 'amazon-cognito-identity-js';
3
- import { JWK } from 'node-jose';
4
- import { ID, JSONObject, TpClaimState, TpPasswordResetUser, TpPasswordResetUserApprovalNode, TpPasswordResetUserApprover, TpPasswordResetUserAssembly, TpPasswordResetUserSubAssembly, UserNode } from '../api/types';
5
- import { PassIdpParams, PassKeyParams } from '../key/key.types';
6
- export declare type AuthUser = Pick<Required<UserNode>, 'username'> & {
7
- id?: ID;
8
- sub: string;
9
- loginEmail: string;
10
- resetUser: null | {
11
- state: TpClaimState;
12
- };
13
- };
14
- export declare type LogoutListener = () => void | Promise<void>;
15
- export interface LoginOptions {
16
- tpPasswordResetAutoComplete?: boolean;
17
- }
18
- export declare enum RecoveryStatus {
19
- NONE = "NONE",
20
- NEW_PASSWORD = "NEW_PASSWORD",
21
- OLD_PASSWORD = "OLD_PASSWORD"
22
- }
23
- export declare enum PasswordChangeStatus {
24
- IN_PROGRESS = "IN_PROGRESS",
25
- RECOVERY = "RECOVERY"
26
- }
27
- export interface PassIdpResult {
28
- passwordChangeStatus?: PasswordChangeStatus;
29
- currentPassIdpParams: PassIdpParams;
30
- newPassIdpParams: PassIdpParams;
31
- tpPasswordReset: {
32
- passIdpParams: PassIdpParams;
33
- resetUsername: string;
34
- };
35
- }
36
- export declare enum CognitoChallengeName {
37
- NEW_PASSWORD_REQUIRED = "NEW_PASSWORD_REQUIRED",
38
- SMS_MFA = "SMS_MFA",
39
- SOFTWARE_TOKEN_MFA = "SOFTWARE_TOKEN_MFA",
40
- MFA_SETUP = "MFA_SETUP"
41
- }
42
- export declare type LrCognitoUser = CognitoUser & {
43
- challengeName: CognitoChallengeName;
44
- challengeParam: JSONObject;
45
- };
46
- export declare type LrCognitoUserAttribute = CognitoUserAttribute;
47
- export interface LoginChallenge {
48
- cognitoUser: LrCognitoUser;
49
- recoveryStatus: RecoveryStatus;
50
- }
51
- export interface LoginResult {
52
- challenge?: LoginChallenge;
53
- user?: AuthUser;
54
- }
55
- export interface PassKeyBundle {
56
- passKeyParams: PassKeyParams;
57
- passKey: JWK.Key;
58
- passIdpParams: PassIdpParams;
59
- passIdp: JWK.Key;
60
- passIdpVerifier: JWK.Key;
61
- wrappedPassIdpVerifierPrk: Record<string, JSONObject>;
62
- }
63
- export declare type ResetUser = Pick<Required<TpPasswordResetUser>, 'username' | 'state' | 'approvals'> & {
64
- assembly: Pick<Required<TpPasswordResetUserAssembly>, 'singleReject' | 'quorum'> & {
65
- subAssemblies: (Pick<Required<TpPasswordResetUserSubAssembly>, 'singleReject' | 'quorum'> & {
66
- approvers: Pick<Required<TpPasswordResetUserApprover>, 'name' | 'email' | 'state'>[];
67
- })[];
68
- };
69
- approvals: Pick<Required<TpPasswordResetUserApprovalNode>, 'id' | 'modified' | 'approverEmail' | 'receiverCipher' | 'receiverCipherPartialAssemblyKey'>;
70
- };
@@ -1,7 +0,0 @@
1
- export declare const ContactCardFields = "\nid\npublicData\npublicSearchable\ncipherData\nkey {\n id\n}\n";
2
- export declare const ContactCardQuery: import("graphql").DocumentNode;
3
- export declare const SearchContactCardQuery: import("graphql").DocumentNode;
4
- export declare const ContactCardListQuery: import("graphql").DocumentNode;
5
- export declare const CreateContactCardMutation: import("graphql").DocumentNode;
6
- export declare const UpdateContactCardMutation: import("graphql").DocumentNode;
7
- export declare const DeleteContactCardMutation: import("graphql").DocumentNode;
@@ -1,53 +0,0 @@
1
- import { LrApolloService } from '../api/lr-apollo.service';
2
- import { JSONObject } from '../api/types';
3
- import { EncryptionService } from '../encryption/encryption.service';
4
- import { KeyFactoryService } from '../key/key-factory.service';
5
- import { KeyGraphService } from '../key/key-graph.service';
6
- import { KeyMetaService } from '../key/key-meta.service';
7
- import { KeyService } from '../key/key.service';
8
- import { Key } from '../key/key.types';
9
- import { MainContactCardPlainFields } from '../profile/profile.types';
10
- import { HasEdges } from '../_common/types';
11
- export declare class ContactCard {
12
- id: string;
13
- key: Key;
14
- sigPxk: Key;
15
- publicData: string;
16
- publicDataSig: string;
17
- publicSearchable: string;
18
- publicSearchableSig: string;
19
- plainData: string;
20
- plainDataSig: string;
21
- cipherData: string;
22
- publicDataJson: JSONObject;
23
- publicSearchableJson: JSONObject;
24
- plainCipherDataJson: JSONObject;
25
- plainDataJson: JSONObject;
26
- }
27
- export interface CreateContactCardInput {
28
- publicDataJson: JSONObject;
29
- publicSearchableJson: JSONObject;
30
- plainCipherDataJson: JSONObject;
31
- plainDataJson: MainContactCardPlainFields;
32
- }
33
- export interface UpdateContactCardInput extends CreateContactCardInput {
34
- id: string;
35
- }
36
- export declare class ContactCardService {
37
- private keyFactory;
38
- private keyService;
39
- private lrApollo;
40
- private keyGraph;
41
- private encryptionService;
42
- private keyMetaService;
43
- constructor(keyFactory: KeyFactoryService, keyService: KeyService, lrApollo: LrApolloService, keyGraph: KeyGraphService, encryptionService: EncryptionService, keyMetaService: KeyMetaService);
44
- decryptContactCard(cc: ContactCard): Promise<ContactCard>;
45
- decryptContactCardEdges(hasEdges: HasEdges<ContactCard>): Promise<ContactCard[]>;
46
- searchContactCard(publicSearchable: object): Promise<ContactCard[]>;
47
- getContactCardList(): Promise<ContactCard[]>;
48
- getContactCard(id: string): Promise<ContactCard>;
49
- private prepareContactCardInput;
50
- createContactCard(input: CreateContactCardInput): Promise<ContactCard>;
51
- updateContactCard(input: UpdateContactCardInput): Promise<ContactCard>;
52
- deleteContactCard(id: string): Promise<string>;
53
- }
@@ -1,25 +0,0 @@
1
- import { ID } from '../api/types';
2
- export interface CreateContactCardMutationResult {
3
- createContactCard: {
4
- contactCard: {
5
- id: ID;
6
- };
7
- };
8
- }
9
- export declare const CreateContactCardMutation: import("../_common/ast").TypedDocumentNode<CreateContactCardMutationResult>;
10
- export interface UpdateContactCardMutationResult {
11
- updateContactCard: {
12
- contactCard: {
13
- id: ID;
14
- };
15
- };
16
- }
17
- export declare const UpdateContactCardMutation: import("../_common/ast").TypedDocumentNode<UpdateContactCardMutationResult>;
18
- export interface DeleteContactCardMutationResult {
19
- deleteContactCard: {
20
- deleteContactCard: {
21
- id: ID;
22
- };
23
- };
24
- }
25
- export declare const DeleteContactCardMutation: import("../_common/ast").TypedDocumentNode<DeleteContactCardMutationResult>;
@@ -1,64 +0,0 @@
1
- import { NgZone } from '@angular/core';
2
- import { LrMutation } from '../api/lr-graphql';
3
- import { JSONObject } from '../api/types';
4
- import { EncryptionService } from '../encryption/encryption.service';
5
- import { KeyFactoryService } from '../key/key-factory.service';
6
- import { KeyGraphService } from '../key/key-graph.service';
7
- import { KeyMetaService } from '../key/key-meta.service';
8
- import { KeyService } from '../key/key.service';
9
- import { MainContactCardPlainFields } from '../profile/profile.types';
10
- export interface CreateContactCardInput2 {
11
- publicDataJson: JSONObject;
12
- publicSearchableJson: JSONObject;
13
- plainCipherDataJson: JSONObject;
14
- plainDataJson: MainContactCardPlainFields;
15
- }
16
- export interface ContactCardName2 {
17
- name: string;
18
- title?: string;
19
- firstName?: string;
20
- lastName?: string;
21
- }
22
- export declare class OwnerPlainDataJson {
23
- name: ContactCardName2;
24
- }
25
- export interface UpdateContactCardInput2 extends CreateContactCardInput2 {
26
- id: string;
27
- keyId: string;
28
- }
29
- export declare class ContactCard2Service {
30
- private keyFactory;
31
- private keyService;
32
- private encryptionService;
33
- private keyGraph;
34
- private keyMetaService;
35
- private ngZone;
36
- constructor(keyFactory: KeyFactoryService, keyService: KeyService, encryptionService: EncryptionService, keyGraph: KeyGraphService, keyMetaService: KeyMetaService, ngZone: NgZone);
37
- createContactCard(input: CreateContactCardInput2): Promise<LrMutation<import("./contact-card2.gql").CreateContactCardMutationResult, {
38
- input: {
39
- wrappingKeyId: string;
40
- wrappedKey: string;
41
- cipherData: string;
42
- sigPxkId: string;
43
- publicDataSig: string;
44
- publicSearchableSig: string;
45
- plainDataSig: string;
46
- };
47
- }>>;
48
- updateContactCard(input: UpdateContactCardInput2): Promise<LrMutation<import("./contact-card2.gql").UpdateContactCardMutationResult, {
49
- input: {
50
- id: string;
51
- cipherData: string;
52
- sigPxkId: string;
53
- publicDataSig: string;
54
- publicSearchableSig: string;
55
- plainDataSig: string;
56
- };
57
- }>>;
58
- deleteContactCard(id: string): LrMutation<import("./contact-card2.gql").DeleteContactCardMutationResult, {
59
- input: {
60
- id: string;
61
- };
62
- }>;
63
- private prepareContactCardInput;
64
- }
@@ -1,42 +0,0 @@
1
- /// <reference types="node" />
2
- import { JWE, JWK } from 'node-jose';
3
- import { JSONObject } from '../api/types';
4
- import { Key, PayloadType } from '../key/key.types';
5
- import { TimeService } from '../time/time.service';
6
- export declare enum JoseSerialization {
7
- JSON = "JSON",
8
- COMPACT = "COMPACT"
9
- }
10
- export interface VerifyOptions {
11
- payloadType?: PayloadType;
12
- returnOnlyPayload?: boolean;
13
- }
14
- export interface DecryptOptions {
15
- payloadType?: PayloadType;
16
- returnOnlyPayload?: boolean;
17
- serializations?: JoseSerialization[];
18
- }
19
- export declare const VERIFY_OPTIONS_DEFAULT: VerifyOptions;
20
- export declare const DECRYPT_OPTIONS_DEFAULT: DecryptOptions;
21
- export declare function isSymmetricKey(key: JWK.Key): boolean;
22
- export declare function asJwk(key: JWK.Key | Key | any): JWK.Key | null;
23
- export declare class EncryptionService {
24
- private timeService;
25
- constructor(timeService: TimeService);
26
- decrypt(key: JWK.Key | Key, // string is assumed to be key.id, will unwrap key.
27
- jwe: Record<string, JSONObject> | string, // string will be JSON.parsed
28
- options?: DecryptOptions): Promise<JWE.DecryptResult | any>;
29
- encryptToString(key: JWK.Key, content: ArrayBuffer | string | Record<string, JSONObject>): Promise<string>;
30
- encrypt(key: JWK.Key, content: ArrayBuffer | string | Record<string, JSONObject>): Promise<any>;
31
- sign(key: JWK.Key, content: Buffer | string | Record<string, JSONObject>): Promise<any>;
32
- signToString(key: JWK.Key, content: Buffer | string | Record<string, JSONObject>): Promise<string>;
33
- verify(key: JWK.Key, jws: Record<string, JSONObject>, options?: VerifyOptions): Promise<any>;
34
- encryptThenSign({ key, sigPrk, }: {
35
- key: JWK.Key;
36
- sigPrk: JWK.Key;
37
- }, content: ArrayBuffer | string | Record<string, JSONObject>): Promise<{
38
- cipher: string;
39
- sig: string;
40
- }>;
41
- private decodePayload;
42
- }
@@ -1,15 +0,0 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import { AuthClass } from '@aws-amplify/auth/lib-esm/Auth';
3
- import { JSONObject } from '../api/types';
4
- import { KcConfig } from '../life-ready.config';
5
- import { UploadEncryptedFileOptions } from './file-upload.types';
6
- export declare class FileUploadService {
7
- private config;
8
- private http;
9
- private auth;
10
- constructor(config: KcConfig, http: HttpClient, auth: AuthClass);
11
- downloadEncryptedFileJson(fileStateNodeId: string): Promise<JSONObject>;
12
- downloadEncryptedFile(fileStateNodeId: string): Promise<string>;
13
- loadFile(file: File | ArrayBuffer): Promise<ArrayBuffer>;
14
- uploadEncryptedFile(options: UploadEncryptedFileOptions): Promise<string>;
15
- }
@@ -1,5 +0,0 @@
1
- export declare type FileContentContext = 'FILE_STATE';
2
- export interface UploadEncryptedFileOptions {
3
- encryptedContent: string;
4
- fileName?: string;
5
- }
@@ -1,47 +0,0 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import { AuthClass } from '@aws-amplify/auth/lib-esm/Auth';
3
- import { Idle } from '@ng-idle/core';
4
- import { Keepalive } from '@ng-idle/keepalive';
5
- import { KeyService } from '../key/key.service';
6
- import { Key } from '../key/key.types';
7
- import { KcConfig } from '../life-ready.config';
8
- import { KeepaliveResult } from './idle.types';
9
- /**
10
- * onInit: true when onTimeout is called from the init() function. i.e. tab was closed and on reloading the webapp it already timed out.
11
- */
12
- export declare type IdleServiceOnTimeout = ({ onInit: boolean, }: {
13
- onInit: any;
14
- }) => void | Promise<void>;
15
- export declare type IdleServiceOnKeepalive = () => void | Promise<void>;
16
- export interface IdleServiceInit {
17
- onTimeout?: IdleServiceOnTimeout;
18
- onKeepalive?: IdleServiceOnKeepalive;
19
- idleSec?: number;
20
- timeoutSec?: number;
21
- keepAliveIntervalSec?: number;
22
- }
23
- export declare class IdleService {
24
- private config;
25
- private http;
26
- private idle;
27
- private keepalive;
28
- private keyService;
29
- private auth;
30
- private readonly IDLE_EXPIRY_KEY;
31
- private readonly IDLING_KEY;
32
- private initCalled;
33
- private onTimeout;
34
- private onKeepalive;
35
- constructor(config: KcConfig, http: HttpClient, idle: Idle, keepalive: Keepalive, keyService: KeyService, auth: AuthClass);
36
- private assertInit;
37
- init(params?: IdleServiceInit): Promise<void>;
38
- keepalivePost(): Promise<{
39
- expiresAfterSeconds: number;
40
- keepaliveResult: KeepaliveResult;
41
- }>;
42
- persistMasterKey(masterKey: Key): Promise<void>;
43
- private onPing;
44
- start(): Promise<void>;
45
- stop(): void;
46
- private reset;
47
- }
@@ -1,10 +0,0 @@
1
- export declare enum Config {
2
- TIMEOUT = 0.01,
3
- IDLE = 1200,
4
- KEEP_ALIVE_INTERVAL = 60
5
- }
6
- export interface KeepaliveResult {
7
- session: {
8
- expires_after_seconds: number;
9
- };
10
- }
@@ -1,134 +0,0 @@
1
- import { DateTime, ID } from '../api/types';
2
- import { IdKeyPair } from './item.types';
3
- export interface CreateDirectoryMutationResult {
4
- createDirectory: {
5
- directory: IdKeyPair;
6
- };
7
- }
8
- export declare const CreateDirectoryMutation: import("../_common/ast").TypedDocumentNode<CreateDirectoryMutationResult>;
9
- export interface UpdateDirectoryMutationResult {
10
- updateDirectory: {
11
- directory: {
12
- id: ID;
13
- modified: DateTime;
14
- };
15
- };
16
- }
17
- export declare const UpdateDirectoryMutation: import("../_common/ast").TypedDocumentNode<UpdateDirectoryMutationResult>;
18
- export interface DeleteDirectoryMutationResult {
19
- deleteDirectory: {
20
- id: ID;
21
- };
22
- }
23
- export declare const DeleteDirectoryMutation: import("../_common/ast").TypedDocumentNode<DeleteDirectoryMutationResult>;
24
- export interface CreateFileMutationResult {
25
- createFile: {
26
- file: IdKeyPair;
27
- };
28
- }
29
- export declare const CreateFileMutation: import("../_common/ast").TypedDocumentNode<CreateFileMutationResult>;
30
- export interface UpdateFileMutationResult {
31
- updateFile: {
32
- file: {
33
- id: ID;
34
- };
35
- };
36
- }
37
- export declare const UpdateFileMutation: import("../_common/ast").TypedDocumentNode<UpdateFileMutationResult>;
38
- export interface RevertFileMutationResult {
39
- revertFile: {
40
- file: {
41
- id: ID;
42
- };
43
- };
44
- }
45
- export declare const RevertFileMutation: import("../_common/ast").TypedDocumentNode<RevertFileMutationResult>;
46
- export interface DeleteFileMutationResult {
47
- deleteFile: {
48
- id: ID;
49
- };
50
- }
51
- export declare const DeleteFileMutation: import("../_common/ast").TypedDocumentNode<DeleteFileMutationResult>;
52
- export interface ArchiveDirectoryMutationResult {
53
- archiveDirectory: {
54
- directory: {
55
- id: ID;
56
- };
57
- };
58
- }
59
- export declare const ArchiveDirectoryMutation: import("../_common/ast").TypedDocumentNode<ArchiveDirectoryMutationResult>;
60
- export interface ArchiveFileMutationResult {
61
- archiveFile: {
62
- file: {
63
- id: ID;
64
- };
65
- };
66
- }
67
- export declare const ArchiveFileMutation: import("../_common/ast").TypedDocumentNode<ArchiveFileMutationResult>;
68
- export interface UnarchiveDirectoryMutationResult {
69
- unarchiveDirectory: {
70
- directory: {
71
- id: ID;
72
- };
73
- };
74
- }
75
- export declare const UnarchiveDirectoryMutation: import("../_common/ast").TypedDocumentNode<UnarchiveDirectoryMutationResult>;
76
- export interface UnarchiveFileMutationResult {
77
- unarchiveFile: {
78
- file: {
79
- id: ID;
80
- };
81
- };
82
- }
83
- export declare const UnarchiveFileMutation: import("../_common/ast").TypedDocumentNode<UnarchiveFileMutationResult>;
84
- export interface ChangeDirectoryParentsMutationResult {
85
- changeDirectoryParents: {
86
- directory: IdKeyPair;
87
- };
88
- }
89
- export declare const ChangeDirectoryParentsMutation: import("../_common/ast").TypedDocumentNode<ChangeDirectoryParentsMutationResult>;
90
- export interface ChangeFileParentsMutationResult {
91
- changeFileParents: {
92
- file: IdKeyPair;
93
- };
94
- }
95
- export declare const ChangeFileParentsMutation: import("../_common/ast").TypedDocumentNode<ChangeFileParentsMutationResult>;
96
- export interface BeginDeleteChildItemLinksWindowMutationResult {
97
- beginDeleteChildItemLinksWindow: {
98
- begin: DateTime;
99
- end: DateTime;
100
- scheduled: DateTime;
101
- windowMs: number;
102
- directory: {
103
- id: ID;
104
- };
105
- };
106
- }
107
- export declare const BeginDeleteChildItemLinksWindowMutation: import("../_common/ast").TypedDocumentNode<BeginDeleteChildItemLinksWindowMutationResult>;
108
- export interface TempDirectoryQueryResult {
109
- rootDirectories: {
110
- edges: {
111
- node: IdKeyPair;
112
- }[];
113
- };
114
- lock: {
115
- version: string;
116
- };
117
- }
118
- export declare const TempDirectoryQuery: import("../_common/ast").TypedDocumentNode<TempDirectoryQueryResult>;
119
- export interface SetFileConfidentialMutationResult {
120
- setFileConfidential: {
121
- file: {
122
- id: ID;
123
- };
124
- };
125
- }
126
- export declare const SetFileConfidentialMutation: import("../_common/ast").TypedDocumentNode<SetFileConfidentialMutationResult>;
127
- export interface SetDirectoryConfidentialMutationResult {
128
- setDirectoryConfidential: {
129
- directory: {
130
- id: ID;
131
- };
132
- };
133
- }
134
- export declare const SetDirectoryConfidentialMutation: import("../_common/ast").TypedDocumentNode<SetDirectoryConfidentialMutationResult>;
@@ -1,35 +0,0 @@
1
- import { ID } from '../api/types';
2
- export interface DirectoryKeyQueryResult {
3
- directory: {
4
- keyId: ID;
5
- };
6
- }
7
- export declare const DirectoryKeyQuery: import("../_common/ast").TypedDocumentNode<DirectoryKeyQueryResult>;
8
- export interface FileKeyQueryResult {
9
- file: {
10
- keyId: ID;
11
- };
12
- }
13
- export declare const FileKeyQuery: import("../_common/ast").TypedDocumentNode<FileKeyQueryResult>;
14
- export interface DirectoryKeyFromDirectoryShareQueryResult {
15
- directoryShare: {
16
- item: {
17
- keyId: ID;
18
- };
19
- };
20
- }
21
- export declare const DirectoryKeyFromDirectoryShareQuery: import("../_common/ast").TypedDocumentNode<DirectoryKeyFromDirectoryShareQueryResult>;
22
- export interface FileKeyFromFileShareQueryResult {
23
- fileShare: {
24
- item: {
25
- keyId: ID;
26
- };
27
- };
28
- }
29
- export declare const FileKeyFromFileShareQuery: import("../_common/ast").TypedDocumentNode<FileKeyFromFileShareQueryResult>;
30
- export interface FileStateKeyQueryResult {
31
- fileState: {
32
- keyId: ID;
33
- };
34
- }
35
- export declare const FileStateKeyQuery: import("../_common/ast").TypedDocumentNode<FileStateKeyQueryResult>;