@lifeready/core 1.0.19 → 1.0.21

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 (30) hide show
  1. package/bundles/lifeready-core.umd.js +157 -128
  2. package/bundles/lifeready-core.umd.js.map +1 -1
  3. package/bundles/lifeready-core.umd.min.js +1 -1
  4. package/bundles/lifeready-core.umd.min.js.map +1 -1
  5. package/esm2015/lib/api/key-exchange.types.js +1 -1
  6. package/esm2015/lib/api/message.service.js +1 -1
  7. package/esm2015/lib/api/types/lr-graphql.types.js +18 -9
  8. package/esm2015/lib/auth/auth.gql.js +1 -6
  9. package/esm2015/lib/auth/password.service.js +3 -8
  10. package/esm2015/lib/items2/item2.gql.js +10 -22
  11. package/esm2015/lib/items2/item2.gql.private.js +23 -0
  12. package/esm2015/lib/items2/item2.service.js +19 -2
  13. package/esm2015/lib/items2/item2.types.js +1 -1
  14. package/esm2015/lib/scenario/scenario.service.js +1 -2
  15. package/esm2015/lib/trusted-parties/tp-assembly.js +8 -5
  16. package/esm2015/lib/trusted-parties/tp-assembly.types.js +1 -1
  17. package/esm2015/lib/trusted-parties/tp-password-reset.service.js +1 -1
  18. package/fesm2015/lifeready-core.js +73 -46
  19. package/fesm2015/lifeready-core.js.map +1 -1
  20. package/lib/api/key-exchange.types.d.ts +2 -2
  21. package/lib/api/message.service.d.ts +5 -4
  22. package/lib/api/types/lr-graphql.types.d.ts +18 -2
  23. package/lib/items2/item2.gql.d.ts +8 -18
  24. package/lib/items2/item2.gql.private.d.ts +19 -0
  25. package/lib/items2/item2.service.d.ts +8 -1
  26. package/lib/items2/item2.types.d.ts +9 -5
  27. package/lib/trusted-parties/tp-assembly.types.d.ts +5 -3
  28. package/lib/trusted-parties/tp-password-reset.service.d.ts +3 -3
  29. package/lifeready-core.metadata.json +1 -1
  30. package/package.json +1 -1
@@ -19,8 +19,8 @@ export interface PlainInitiatorRootKeyCipher {
19
19
  };
20
20
  }
21
21
  export interface SharedContactCardInput {
22
- plainCipherDataJson?: any;
23
- plainSharedCipherDataJson?: any;
22
+ plainCipherDataJson?: JSONObject;
23
+ plainSharedCipherDataJson?: JSONObject;
24
24
  sharedCipherKey?: object;
25
25
  }
26
26
  export interface PreparedPermissions {
@@ -3,6 +3,7 @@ import { EncryptionService } from '../cryptography/encryption.service';
3
3
  import { KeyGraphService } from '../cryptography/key-graph.service';
4
4
  import { KeyExchangeService } from './key-exchange.service';
5
5
  import { LrApolloService } from './lr-apollo.service';
6
+ import { JSONObject } from './types';
6
7
  export declare const SendMessageMutation: import("graphql").DocumentNode;
7
8
  export declare const MessageQuery: import("graphql").DocumentNode;
8
9
  export interface SendMessage {
@@ -13,8 +14,8 @@ export interface SendMessage {
13
14
  export interface SendMessageInput {
14
15
  username?: string;
15
16
  userId?: string;
16
- plainMessageJson?: any;
17
- plainCipherMessageJson?: any;
17
+ plainMessageJson?: JSONObject;
18
+ plainCipherMessageJson?: JSONObject;
18
19
  }
19
20
  export interface Message {
20
21
  id: string;
@@ -27,9 +28,9 @@ export interface Message {
27
28
  username: string;
28
29
  };
29
30
  plainMessage: string;
30
- plainMessageJson?: any;
31
+ plainMessageJson?: JSONObject;
31
32
  signedCipherMessage: string;
32
- plainSignedCipherMessageJson?: any;
33
+ plainSignedCipherMessageJson?: JSONObject;
33
34
  senderSigPbk: {
34
35
  id: string;
35
36
  };
@@ -151,7 +151,7 @@ export interface AccessRole {
151
151
  trustedParty?: TpNode;
152
152
  isIssuer?: boolean;
153
153
  }
154
- export declare enum FileVersionOperation {
154
+ export declare enum FileOperationField {
155
155
  CREATE = "CREATE",
156
156
  READ = "READ",
157
157
  UPDATE = "UPDATE",
@@ -161,7 +161,7 @@ export declare enum FileVersionOperation {
161
161
  export interface FileVersionNode extends Node, TimeStamped {
162
162
  file?: FileNode;
163
163
  state?: FileStateNode;
164
- operation?: FileVersionOperation;
164
+ operation?: FileOperationField;
165
165
  author?: UserNode;
166
166
  }
167
167
  export interface FileStateNode extends Node, TimeStamped {
@@ -370,6 +370,8 @@ export interface TpAssemblyNode extends Node, TimeStamped {
370
370
  singleReject?: boolean;
371
371
  quorum?: number;
372
372
  subjectKey?: KeyNode;
373
+ subjectCipherData?: string;
374
+ subjectCipherDataClearJson?: JSONObject;
373
375
  assemblyKey?: KeyNode;
374
376
  assemblyCipherData?: string;
375
377
  assemblyCipherDataClearJson?: JSONObject;
@@ -445,6 +447,18 @@ export declare enum ClaimApproverState {
445
447
  APPROVED = "APPROVED",
446
448
  REJECTED = "REJECTED"
447
449
  }
450
+ export declare enum ScenarioLastClaimState {
451
+ CLAIMED = "CLAIMED",
452
+ APPROVED = "APPROVED",
453
+ REJECTED = "REJECTED",
454
+ EXPIRED = "EXPIRED",
455
+ CANCELLED = "CANCELLED",
456
+ RESET = "RESET"
457
+ }
458
+ export interface ScenarioLatestClaim {
459
+ state?: ScenarioLastClaimState;
460
+ created?: DateTime;
461
+ }
448
462
  export interface ScenarioNode extends Node, TimeStamped {
449
463
  subject?: UserNode;
450
464
  subjectKey?: KeyNode;
@@ -457,6 +471,7 @@ export interface ScenarioNode extends Node, TimeStamped {
457
471
  claims?: Connection<ScenarioClaimNode>;
458
472
  claim?: ScenarioClaimNode;
459
473
  assemblyState?: ScenarioAssemblyState;
474
+ latestClaim?: ScenarioLatestClaim;
460
475
  }
461
476
  export interface ScenarioClaimNode extends Node, TimeStamped {
462
477
  claimant?: ScenarioClaimantNode;
@@ -519,6 +534,7 @@ export interface SharedScenarioNode extends Node, TimeStamped {
519
534
  assembly?: SharedTpAssemblyNode;
520
535
  sharedClaim?: SharedScenarioClaimNode;
521
536
  assemblyState?: ScenarioAssemblyState;
537
+ latestClaim?: ScenarioLatestClaim;
522
538
  }
523
539
  export interface SharedScenarioClaimNode extends Node, TimeStamped {
524
540
  state?: ClaimState;
@@ -1,22 +1,4 @@
1
1
  import { DateTime, ID } from '../api/types';
2
- export interface DirectoryKeyQuery {
3
- directory: {
4
- keyId: ID;
5
- };
6
- }
7
- export declare const DirectoryKeyQuery: import("../_common/ast").TypedDocumentNode<DirectoryKeyQuery>;
8
- export interface FileKeyQuery {
9
- file: {
10
- keyId: ID;
11
- };
12
- }
13
- export declare const FileKeyQuery: import("../_common/ast").TypedDocumentNode<FileKeyQuery>;
14
- export interface FileStateKeyQuery {
15
- fileState: {
16
- keyId: ID;
17
- };
18
- }
19
- export declare const FileStateKeyQuery: import("../_common/ast").TypedDocumentNode<FileStateKeyQuery>;
20
2
  export interface CreateDirectoryMutation {
21
3
  createDirectory: {
22
4
  directory: {
@@ -57,6 +39,14 @@ export interface UpdateFileMutation {
57
39
  };
58
40
  }
59
41
  export declare const UpdateFileMutation: import("../_common/ast").TypedDocumentNode<UpdateFileMutation>;
42
+ export interface RevertFileMutationResult {
43
+ revertFile: {
44
+ file: {
45
+ id: ID;
46
+ };
47
+ };
48
+ }
49
+ export declare const RevertFileMutation: import("../_common/ast").TypedDocumentNode<RevertFileMutationResult>;
60
50
  export interface DeleteFileMutation {
61
51
  deleteFile: {
62
52
  id: ID;
@@ -0,0 +1,19 @@
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 FileStateKeyQueryResult {
15
+ fileState: {
16
+ keyId: ID;
17
+ };
18
+ }
19
+ export declare const FileStateKeyQuery: import("../_common/ast").TypedDocumentNode<FileStateKeyQueryResult>;
@@ -4,7 +4,7 @@ import { KeyGraphService } from '../cryptography/key-graph.service';
4
4
  import { KeyService } from '../cryptography/key.service';
5
5
  import { FileService } from '../api/file.service';
6
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 } from './item2.types';
7
+ import { ChangeFileParentsOptions, ChangeDirectoryParentsOptions, CreateDirectoryOptions, CreateFileOptions, DownloadFileContentOptions, FileParentDirectoryInput, ParentDirectoryInput, ParentRootDirectoryInput, UpdateDirectoryOptions, UpdateFileOptions, BeginDeleteChildItemLinksWindowOptions, CreateDirectoryTreeOptions, RevertFileOptions } from './item2.types';
8
8
  import { LrMutation, LrService } from '../api/lr-graphql';
9
9
  import { DirectoryNode, ID, LrRelayIdInput } from '../api/types';
10
10
  import { LockService } from '../api/lock.service';
@@ -107,6 +107,13 @@ export declare class Item2Service extends LrService {
107
107
  cipherMeta: string;
108
108
  };
109
109
  }>>;
110
+ revertFileExec(options: RevertFileOptions): Promise<import("./item2.gql").RevertFileMutationResult>;
111
+ revertFile(options: RevertFileOptions): Promise<LrMutation<import("./item2.gql").RevertFileMutationResult, {
112
+ input: RevertFileOptions;
113
+ }>>;
114
+ revertFileMutation(options: RevertFileOptions): Promise<LrMutation<import("./item2.gql").RevertFileMutationResult, {
115
+ input: RevertFileOptions;
116
+ }>>;
110
117
  deleteFileExec(id: ID): Promise<DeleteFileMutation>;
111
118
  deleteFile(id: ID): LrMutation<DeleteFileMutation, {
112
119
  input: {
@@ -1,4 +1,4 @@
1
- import { LinkTypeField, LrRelayIdInput } from '../api/types';
1
+ import { JSONObject, LinkTypeField, LrRelayIdInput } from '../api/types';
2
2
  export interface ParentDirectoryOptions {
3
3
  directoryId: LrRelayIdInput;
4
4
  wrappingKeyId?: LrRelayIdInput;
@@ -24,8 +24,8 @@ export interface DownloadFileContentOptions {
24
24
  fileStateKeyId?: LrRelayIdInput;
25
25
  }
26
26
  export interface CommonDirectoryOptions {
27
- plainMetaJson?: any;
28
- cipherMetaClearJson?: any;
27
+ plainMetaJson?: JSONObject;
28
+ cipherMetaClearJson?: JSONObject;
29
29
  }
30
30
  export interface CreateDirectoryOptions extends CommonDirectoryOptions {
31
31
  asRootDirectory?: boolean;
@@ -36,8 +36,8 @@ export interface UpdateDirectoryOptions extends CommonDirectoryOptions {
36
36
  directoryKeyId?: LrRelayIdInput;
37
37
  }
38
38
  export interface CommonFileOptions {
39
- plainMetaJson?: any;
40
- cipherMetaClearJson?: any;
39
+ plainMetaJson?: JSONObject;
40
+ cipherMetaClearJson?: JSONObject;
41
41
  file?: File;
42
42
  upload?: (cipherFileContent: string) => Promise<string>;
43
43
  }
@@ -48,6 +48,10 @@ export interface UpdateFileOptions extends CommonFileOptions {
48
48
  fileId: LrRelayIdInput;
49
49
  fileKeyId?: LrRelayIdInput;
50
50
  }
51
+ export interface RevertFileOptions {
52
+ fileId: LrRelayIdInput;
53
+ versionId: LrRelayIdInput;
54
+ }
51
55
  export interface ChangeItemParentsOptions {
52
56
  parentsToRemove: LrRelayIdInput[];
53
57
  parentsToAdd: ParentDirectoryOptions[];
@@ -1,3 +1,4 @@
1
+ import { JSONObject } from '../api/types';
1
2
  import * as slip from '../cryptography/slip39.service';
2
3
  export interface PartialAssemblyKey {
3
4
  slip39: {
@@ -13,7 +14,7 @@ export interface CreateTpSubAssemblyInput {
13
14
  quorum: number;
14
15
  singleReject: boolean;
15
16
  approverTps: TpAssemblyApproverInput[];
16
- subjectCipherDataClearJson?: any;
17
+ subjectCipherDataClearJson?: JSONObject;
17
18
  }
18
19
  export interface UpdateTpSubAssemblyInput extends CreateTpSubAssemblyInput {
19
20
  id: string;
@@ -21,6 +22,7 @@ export interface UpdateTpSubAssemblyInput extends CreateTpSubAssemblyInput {
21
22
  export interface TpAssemblyInput {
22
23
  quorum: number;
23
24
  singleReject: boolean;
25
+ subjectCipherDataClearJson?: JSONObject;
24
26
  }
25
27
  export interface CreateTpAssemblyInput extends TpAssemblyInput {
26
28
  createSubAssemblies: CreateTpSubAssemblyInput[];
@@ -33,6 +35,6 @@ export interface UpdateTpAssemblyInput extends TpAssemblyInput {
33
35
  export interface TpAssemblyApproverInput {
34
36
  tpId: string;
35
37
  wrappingKeyId?: string;
36
- sharedCipherDataClearJson?: any;
37
- sharedCipherApprovalDataClearJson?: any;
38
+ sharedCipherDataClearJson?: JSONObject;
39
+ sharedCipherApprovalDataClearJson?: JSONObject;
38
40
  }
@@ -2,7 +2,7 @@ import { Injector, NgZone } from '@angular/core';
2
2
  import { Key } from '../cryptography/cryptography.types';
3
3
  import { TpPasswordResetAssemblyController } from './tp-password-reset.controller';
4
4
  import { LrMutation, LrService } from '../api/lr-graphql';
5
- import { TpNode } from '../api/types';
5
+ import { JSONObject, TpNode } from '../api/types';
6
6
  import { CreateTpAssemblyInput, UpdateTpAssemblyInput } from './tp-assembly.types';
7
7
  export interface TpAssemblyApprovers {
8
8
  id: string;
@@ -11,9 +11,9 @@ export interface TpAssemblyApprovers {
11
11
  };
12
12
  sharedKey: Key;
13
13
  sharedCipherData?: string;
14
- sharedCipherDataClearJson?: any;
14
+ sharedCipherDataClearJson?: JSONObject;
15
15
  sharedCipherApprovalData?: string;
16
- sharedCipherApprovalDataClearJson?: any;
16
+ sharedCipherApprovalDataClearJson?: JSONObject;
17
17
  }
18
18
  export interface TpSubAssembly {
19
19
  id: string;