@lifeready/core 7.0.4 → 7.1.2
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 +356 -49
- package/bundles/lifeready-core.umd.js.map +1 -1
- package/bundles/lifeready-core.umd.min.js +1 -1
- package/bundles/lifeready-core.umd.min.js.map +1 -1
- package/esm2015/lib/api/types/lr-graphql.types.js +22 -1
- package/esm2015/lib/item/item.gql.private.js +19 -1
- package/esm2015/lib/item/item.service.js +22 -2
- package/esm2015/lib/key/key-graph.service.js +9 -3
- package/esm2015/lib/trusted-party/trusted-party.gql.js +69 -1
- package/esm2015/lib/trusted-party/trusted-party.service.js +166 -17
- package/esm2015/lib/trusted-party/trusted-party.types.js +1 -1
- package/fesm2015/lifeready-core.js +299 -17
- package/fesm2015/lifeready-core.js.map +1 -1
- package/lib/api/types/lr-graphql.types.d.ts +42 -16
- package/lib/item/item.gql.private.d.ts +16 -0
- package/lib/item/item.service.d.ts +2 -0
- package/lib/trusted-party/trusted-party.gql.d.ts +60 -0
- package/lib/trusted-party/trusted-party.service.d.ts +70 -5
- package/lib/trusted-party/trusted-party.types.d.ts +17 -1
- package/lifeready-core.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -72,6 +72,10 @@ export interface UserNode extends Node {
|
|
|
72
72
|
export interface UserFeatureState extends TimeStamped {
|
|
73
73
|
notificationsLastViewed?: DateTime;
|
|
74
74
|
}
|
|
75
|
+
export interface PublicProfile {
|
|
76
|
+
userId?: ID;
|
|
77
|
+
email?: string;
|
|
78
|
+
}
|
|
75
79
|
export interface ServerTime {
|
|
76
80
|
timestamp?: string;
|
|
77
81
|
}
|
|
@@ -96,6 +100,7 @@ export interface AccessControlledResource {
|
|
|
96
100
|
accessRole?: AccessRoleChoice;
|
|
97
101
|
permissions?: PermissionChoice[];
|
|
98
102
|
tpAccessRoles?: AccessRole[];
|
|
103
|
+
allAccessRoles?: AllAccessRole[];
|
|
99
104
|
confidentiality?: ConfidentialResource;
|
|
100
105
|
}
|
|
101
106
|
export interface DirectoryNode extends Node, TimeStamped, AccessControlledResource {
|
|
@@ -146,26 +151,31 @@ export interface DirectoryLinkNodeLrNList {
|
|
|
146
151
|
export interface FileLinkNodeLrNList {
|
|
147
152
|
list?: FileLinkNode[];
|
|
148
153
|
}
|
|
149
|
-
export
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
role?: AccessRoleChoice;
|
|
153
|
-
issuer?: UserNode;
|
|
154
|
-
isIssuer?: boolean;
|
|
154
|
+
export declare enum TpShareTypeChoice {
|
|
155
|
+
TP = "TP",
|
|
156
|
+
DETACHED = "DETACHED"
|
|
155
157
|
}
|
|
156
|
-
export
|
|
157
|
-
|
|
158
|
+
export declare enum TpDetachedShareStateChoice {
|
|
159
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
160
|
+
COMPLETED = "COMPLETED"
|
|
158
161
|
}
|
|
159
|
-
export interface
|
|
160
|
-
item?:
|
|
162
|
+
export interface TpSharedItem<ItemType> extends Node, TimeStamped {
|
|
163
|
+
item?: ItemType;
|
|
161
164
|
tp?: TpNode;
|
|
162
165
|
role?: AccessRoleChoice;
|
|
163
166
|
issuer?: UserNode;
|
|
164
167
|
isIssuer?: boolean;
|
|
168
|
+
subject?: PublicProfile;
|
|
169
|
+
shareType?: TpShareTypeChoice;
|
|
170
|
+
detachedShareState?: TpDetachedShareStateChoice;
|
|
165
171
|
}
|
|
166
|
-
export interface
|
|
167
|
-
list?:
|
|
172
|
+
export interface TpSharedItemLrNList<SharedItemType> {
|
|
173
|
+
list?: SharedItemType[];
|
|
168
174
|
}
|
|
175
|
+
export declare type TpSharedDirectoryNode = TpSharedItem<DirectoryNode>;
|
|
176
|
+
export declare type TpSharedFileNode = TpSharedItem<FileNode>;
|
|
177
|
+
export declare type TpSharedDirectoryNodeLrNList = TpSharedItemLrNList<TpSharedDirectoryNode>;
|
|
178
|
+
export declare type TpSharedFileNodeLrNList = TpSharedItemLrNList<TpSharedFileNode>;
|
|
169
179
|
export interface Descendants {
|
|
170
180
|
directories?: Connection<DirectoryNode>;
|
|
171
181
|
files?: Connection<FileNode>;
|
|
@@ -176,9 +186,19 @@ export declare enum AccessRoleChoice {
|
|
|
176
186
|
READER = "READER",
|
|
177
187
|
WRITER = "WRITER",
|
|
178
188
|
ADMIN = "ADMIN",
|
|
189
|
+
CUSTODIAN = "CUSTODIAN",
|
|
179
190
|
DENY = "DENY",
|
|
180
191
|
OWNER = "OWNER"
|
|
181
192
|
}
|
|
193
|
+
export declare enum AccessRoleChoiceOrder {
|
|
194
|
+
READER = 0,
|
|
195
|
+
WRITER = 1,
|
|
196
|
+
ADMIN = 2,
|
|
197
|
+
CUSTODIAN = 3,
|
|
198
|
+
DENY = 4,
|
|
199
|
+
CONFIDENTIAL = 5,
|
|
200
|
+
OWNER = 6
|
|
201
|
+
}
|
|
182
202
|
export declare enum AccessRoleMethodChoice {
|
|
183
203
|
INHERITED = "INHERITED",
|
|
184
204
|
DIRECT = "DIRECT"
|
|
@@ -202,15 +222,21 @@ export interface InheritedRole {
|
|
|
202
222
|
role?: AccessRoleChoice;
|
|
203
223
|
source?: DirectoryNode;
|
|
204
224
|
}
|
|
205
|
-
export interface
|
|
206
|
-
issuer?: UserNode;
|
|
207
|
-
subject?: UserNode;
|
|
225
|
+
export interface AccessRoleBase {
|
|
208
226
|
role?: AccessRoleChoice;
|
|
209
227
|
method?: AccessRoleMethodChoice;
|
|
210
228
|
inheritedRole?: InheritedRole;
|
|
211
|
-
tp?: TpNode;
|
|
212
229
|
isIssuer?: boolean;
|
|
213
230
|
}
|
|
231
|
+
export interface AccessRole extends AccessRoleBase {
|
|
232
|
+
issuer?: UserNode;
|
|
233
|
+
subject?: UserNode;
|
|
234
|
+
tp?: TpNode;
|
|
235
|
+
}
|
|
236
|
+
export interface AllAccessRole extends AccessRoleBase {
|
|
237
|
+
issuer?: PublicProfile;
|
|
238
|
+
subject?: PublicProfile;
|
|
239
|
+
}
|
|
214
240
|
export declare enum FileOperationField {
|
|
215
241
|
CREATE = "CREATE",
|
|
216
242
|
READ = "READ",
|
|
@@ -11,6 +11,22 @@ export interface FileKeyQueryResult {
|
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
export declare const FileKeyQuery: import("../_common/ast").TypedDocumentNode<FileKeyQueryResult>;
|
|
14
|
+
export interface DirectoryKeyFromSharedDirectoryQueryResult {
|
|
15
|
+
tpSharedDirectory: {
|
|
16
|
+
item: {
|
|
17
|
+
keyId: ID;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export declare const DirectoryKeyFromSharedDirectoryQuery: import("../_common/ast").TypedDocumentNode<DirectoryKeyFromSharedDirectoryQueryResult>;
|
|
22
|
+
export interface FileKeyFromSharedFileQueryResult {
|
|
23
|
+
tpSharedFile: {
|
|
24
|
+
item: {
|
|
25
|
+
keyId: ID;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export declare const FileKeyFromSharedFileQuery: import("../_common/ast").TypedDocumentNode<FileKeyFromSharedFileQueryResult>;
|
|
14
30
|
export interface FileStateKeyQueryResult {
|
|
15
31
|
fileState: {
|
|
16
32
|
keyId: ID;
|
|
@@ -26,6 +26,8 @@ export declare class ItemService extends LrService {
|
|
|
26
26
|
downloadFileContent(options: DownloadFileContentOptions): Promise<Uint8Array>;
|
|
27
27
|
getDirectoryKeyId(directoryId: LrRelayIdInput): Promise<string>;
|
|
28
28
|
getFileKeyId(fileId: LrRelayIdInput): Promise<string>;
|
|
29
|
+
getDirectoryKeyIdFromSharedDirectory(sharedDirectoryId: LrRelayIdInput): Promise<string>;
|
|
30
|
+
getFileKeyIdFromSharedFile(sharedFileId: LrRelayIdInput): Promise<string>;
|
|
29
31
|
getDirectoryKey(directoryId: LrRelayIdInput, directoryKeyId?: LrRelayIdInput): Promise<import("../key/key.types").Key>;
|
|
30
32
|
getFileKey(fileId: LrRelayIdInput, fileKeyId?: LrRelayIdInput): Promise<import("../key/key.types").Key>;
|
|
31
33
|
createDirectory(options: CreateDirectoryOptions): Promise<import("./item.gql").CreateDirectoryMutationResult>;
|
|
@@ -37,6 +37,66 @@ export interface UnshareFileMutation {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
export declare const UnshareFileMutation: import("../_common/ast").TypedDocumentNode<UnshareFileMutation>;
|
|
40
|
+
export interface CreateSharedDirectoryMutationResult {
|
|
41
|
+
createSharedDirectory: {
|
|
42
|
+
tpSharedDirectory: {
|
|
43
|
+
id: ID;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export declare const CreateSharedDirectoryMutation: import("../_common/ast").TypedDocumentNode<CreateSharedDirectoryMutationResult>;
|
|
48
|
+
export interface CreateSharedFileMutationResult {
|
|
49
|
+
createSharedFile: {
|
|
50
|
+
tpSharedFile: {
|
|
51
|
+
id: ID;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export declare const CreateSharedFileMutation: import("../_common/ast").TypedDocumentNode<CreateSharedFileMutationResult>;
|
|
56
|
+
export interface UpdateSharedDirectoryMutationResult {
|
|
57
|
+
updateSharedDirectory: {
|
|
58
|
+
tpSharedDirectory: {
|
|
59
|
+
id: ID;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export declare const UpdateSharedDirectoryMutation: import("../_common/ast").TypedDocumentNode<UpdateSharedDirectoryMutationResult>;
|
|
64
|
+
export interface UpdateSharedFileMutationResult {
|
|
65
|
+
updateSharedFile: {
|
|
66
|
+
tpSharedFile: {
|
|
67
|
+
id: ID;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export declare const UpdateSharedFileMutation: import("../_common/ast").TypedDocumentNode<UpdateSharedFileMutationResult>;
|
|
72
|
+
export interface DeleteSharedDirectoryMutationResult {
|
|
73
|
+
deleteSharedDirectory: {
|
|
74
|
+
id: ID;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export declare const DeleteSharedDirectoryMutation: import("../_common/ast").TypedDocumentNode<DeleteSharedDirectoryMutationResult>;
|
|
78
|
+
export interface DeleteSharedFileMutationResult {
|
|
79
|
+
deleteSharedFile: {
|
|
80
|
+
id: ID;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export declare const DeleteSharedFileMutation: import("../_common/ast").TypedDocumentNode<DeleteSharedFileMutationResult>;
|
|
84
|
+
export interface CompleteDetachedSharedDirectoryMutationResult {
|
|
85
|
+
completeDetachedSharedDirectory: {
|
|
86
|
+
tpSharedDirectory: {
|
|
87
|
+
id: ID;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
export declare const CompleteDetachedSharedDirectoryMutation: import("../_common/ast").TypedDocumentNode<CompleteDetachedSharedDirectoryMutationResult>;
|
|
92
|
+
export interface CompleteDetachedSharedFileMutationResult {
|
|
93
|
+
completeDetachedSharedDirectory: {
|
|
94
|
+
tpSharedDirectory: {
|
|
95
|
+
id: ID;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
export declare const CompleteDetachedSharedFileMutation: import("../_common/ast").TypedDocumentNode<CompleteDetachedSharedFileMutationResult>;
|
|
40
100
|
export interface RequestTpMkReshareMutation {
|
|
41
101
|
requestTpMkReshare: {
|
|
42
102
|
id: ID;
|
|
@@ -6,8 +6,8 @@ import { ItemService } from '../item/item.service';
|
|
|
6
6
|
import { KeyFactoryService } from '../key/key-factory.service';
|
|
7
7
|
import { KeyGraphService } from '../key/key-graph.service';
|
|
8
8
|
import { KeyService } from '../key/key.service';
|
|
9
|
-
import { CompleteTpMkReshareMutation, DeleteTpMutation, RequestTpMkReshareMutation, RespondTpMkReshareMutation, ShareDirectoryMutation, UnshareDirectoryMutation } from './trusted-party.gql';
|
|
10
|
-
import { ShareItemOptions, UnshareItemOptions } from './trusted-party.types';
|
|
9
|
+
import { CompleteTpMkReshareMutation, DeleteTpMutation, RequestTpMkReshareMutation, RespondTpMkReshareMutation, ShareDirectoryMutation, ShareFileMutation, UnshareDirectoryMutation } from './trusted-party.gql';
|
|
10
|
+
import { CompleteDetachedSharedItemOptions, CreateSharedItemOptions, ShareItemOptions, UnshareItemOptions, UpdateSharedItemOptions } from './trusted-party.types';
|
|
11
11
|
export declare class TrustedPartyService extends LrService {
|
|
12
12
|
private ngZone;
|
|
13
13
|
private injector;
|
|
@@ -34,8 +34,8 @@ export declare class TrustedPartyService extends LrService {
|
|
|
34
34
|
wrappedKey: string;
|
|
35
35
|
};
|
|
36
36
|
}>>;
|
|
37
|
-
shareFile(options: ShareItemOptions): Promise<
|
|
38
|
-
shareFileMutation(options: ShareItemOptions): Promise<LrMutation<
|
|
37
|
+
shareFile(options: ShareItemOptions): Promise<ShareFileMutation>;
|
|
38
|
+
shareFileMutation(options: ShareItemOptions): Promise<LrMutation<ShareFileMutation, {
|
|
39
39
|
input: {
|
|
40
40
|
id: string;
|
|
41
41
|
tpId: string;
|
|
@@ -45,7 +45,7 @@ export declare class TrustedPartyService extends LrService {
|
|
|
45
45
|
wrappedKey: string;
|
|
46
46
|
};
|
|
47
47
|
}>>;
|
|
48
|
-
private
|
|
48
|
+
private prepareShareItemMutation;
|
|
49
49
|
unshareDirectory(options: UnshareItemOptions): Promise<UnshareDirectoryMutation>;
|
|
50
50
|
unshareDirectoryMutation(options: UnshareItemOptions): Promise<LrMutation<UnshareDirectoryMutation, {
|
|
51
51
|
input: {
|
|
@@ -61,6 +61,71 @@ export declare class TrustedPartyService extends LrService {
|
|
|
61
61
|
};
|
|
62
62
|
}>>;
|
|
63
63
|
private unshareItemMutation;
|
|
64
|
+
createSharedDirectory(options: CreateSharedItemOptions): Promise<import("./trusted-party.gql").CreateSharedDirectoryMutationResult>;
|
|
65
|
+
createSharedDirectoryMutation(options: CreateSharedItemOptions): Promise<LrMutation<import("./trusted-party.gql").CreateSharedDirectoryMutationResult, {
|
|
66
|
+
input: {
|
|
67
|
+
id: string;
|
|
68
|
+
tpId: string;
|
|
69
|
+
accessRole: import("../api/types").AccessRoleChoice;
|
|
70
|
+
keyId: string;
|
|
71
|
+
wrappingKeyId: string;
|
|
72
|
+
wrappedKey: string;
|
|
73
|
+
shareType: import("../api/types").TpShareTypeChoice;
|
|
74
|
+
};
|
|
75
|
+
}>>;
|
|
76
|
+
createSharedFile(options: CreateSharedItemOptions): Promise<import("./trusted-party.gql").CreateSharedFileMutationResult>;
|
|
77
|
+
createSharedFileMutation(options: CreateSharedItemOptions): Promise<LrMutation<import("./trusted-party.gql").CreateSharedFileMutationResult, {
|
|
78
|
+
input: {
|
|
79
|
+
id: string;
|
|
80
|
+
tpId: string;
|
|
81
|
+
accessRole: import("../api/types").AccessRoleChoice;
|
|
82
|
+
keyId: string;
|
|
83
|
+
wrappingKeyId: string;
|
|
84
|
+
wrappedKey: string;
|
|
85
|
+
shareType: import("../api/types").TpShareTypeChoice;
|
|
86
|
+
};
|
|
87
|
+
}>>;
|
|
88
|
+
private prepareCreateSharedItemMutation;
|
|
89
|
+
updateSharedDirectory(options: UpdateSharedItemOptions): Promise<import("./trusted-party.gql").UpdateSharedDirectoryMutationResult>;
|
|
90
|
+
updateSharedDirectoryMutation(options: UpdateSharedItemOptions): Promise<LrMutation<import("./trusted-party.gql").UpdateSharedDirectoryMutationResult, {
|
|
91
|
+
input: {
|
|
92
|
+
id: string;
|
|
93
|
+
accessRole: import("../api/types").AccessRoleChoice;
|
|
94
|
+
};
|
|
95
|
+
}>>;
|
|
96
|
+
updateSharedFile(options: UpdateSharedItemOptions): Promise<import("./trusted-party.gql").UpdateSharedFileMutationResult>;
|
|
97
|
+
updateSharedFileMutation(options: UpdateSharedItemOptions): Promise<LrMutation<import("./trusted-party.gql").UpdateSharedFileMutationResult, {
|
|
98
|
+
input: {
|
|
99
|
+
id: string;
|
|
100
|
+
accessRole: import("../api/types").AccessRoleChoice;
|
|
101
|
+
};
|
|
102
|
+
}>>;
|
|
103
|
+
private prepareUpdateSharedItemMutation;
|
|
104
|
+
deleteSharedDirectory(id: string): Promise<import("./trusted-party.gql").DeleteSharedDirectoryMutationResult>;
|
|
105
|
+
deleteSharedDirectoryMutation(id: string): Promise<LrMutation<import("./trusted-party.gql").DeleteSharedDirectoryMutationResult, {
|
|
106
|
+
input: {
|
|
107
|
+
id: string;
|
|
108
|
+
};
|
|
109
|
+
}>>;
|
|
110
|
+
completeDetachedSharedDirectory(options: CompleteDetachedSharedItemOptions): Promise<import("./trusted-party.gql").CompleteDetachedSharedDirectoryMutationResult>;
|
|
111
|
+
completeDetachedSharedDirectoryMutation(options: CompleteDetachedSharedItemOptions): Promise<LrMutation<import("./trusted-party.gql").CompleteDetachedSharedDirectoryMutationResult, {
|
|
112
|
+
input: {
|
|
113
|
+
id: string;
|
|
114
|
+
keyId: string;
|
|
115
|
+
wrappingKeyId: string;
|
|
116
|
+
wrappedKey: string;
|
|
117
|
+
};
|
|
118
|
+
}>>;
|
|
119
|
+
completeDetachedSharedFile(options: CompleteDetachedSharedItemOptions): Promise<import("./trusted-party.gql").CompleteDetachedSharedFileMutationResult>;
|
|
120
|
+
completeDetachedSharedFileMutation(options: CompleteDetachedSharedItemOptions): Promise<LrMutation<import("./trusted-party.gql").CompleteDetachedSharedFileMutationResult, {
|
|
121
|
+
input: {
|
|
122
|
+
id: string;
|
|
123
|
+
keyId: string;
|
|
124
|
+
wrappingKeyId: string;
|
|
125
|
+
wrappedKey: string;
|
|
126
|
+
};
|
|
127
|
+
}>>;
|
|
128
|
+
private prepareCompleteDetachedSharedItemMutation;
|
|
64
129
|
requestMkReshareMutation(tpId: LrRelayIdInput): Promise<LrMutation<RequestTpMkReshareMutation, {
|
|
65
130
|
input: {
|
|
66
131
|
tpId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccessRoleChoice, LrRelayIdInput } from '../api/types';
|
|
1
|
+
import { AccessRoleChoice, LrRelayIdInput, TpShareTypeChoice } from '../api/types';
|
|
2
2
|
export interface ShareItemOptions {
|
|
3
3
|
itemId: LrRelayIdInput;
|
|
4
4
|
itemKeyId?: LrRelayIdInput;
|
|
@@ -10,3 +10,19 @@ export interface UnshareItemOptions {
|
|
|
10
10
|
itemId: string;
|
|
11
11
|
tpId: string;
|
|
12
12
|
}
|
|
13
|
+
export interface CreateSharedItemOptions {
|
|
14
|
+
itemId: LrRelayIdInput;
|
|
15
|
+
itemKeyId?: LrRelayIdInput;
|
|
16
|
+
tpId: LrRelayIdInput;
|
|
17
|
+
tpSharedKeyId?: LrRelayIdInput;
|
|
18
|
+
accessRole: AccessRoleChoice;
|
|
19
|
+
shareType: TpShareTypeChoice;
|
|
20
|
+
}
|
|
21
|
+
export interface UpdateSharedItemOptions {
|
|
22
|
+
sharedItemId: LrRelayIdInput;
|
|
23
|
+
accessRole: AccessRoleChoice;
|
|
24
|
+
}
|
|
25
|
+
export interface CompleteDetachedSharedItemOptions {
|
|
26
|
+
sharedItemId: LrRelayIdInput;
|
|
27
|
+
itemKeyId?: LrRelayIdInput;
|
|
28
|
+
}
|