@lifeready/core 6.1.1 → 6.1.3
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 +98 -142
- 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/encryption/encryption.service.js +7 -6
- package/esm2015/lib/item2/item2.service.js +3 -2
- package/esm2015/lib/key/key-graph.service.js +3 -3
- package/esm2015/lib/key/key-meta.service.js +1 -57
- package/esm2015/lib/key/key.types.js +6 -1
- package/esm2015/lib/key-exchange/key-exchange2.gql.js +27 -25
- package/esm2015/lib/key-exchange/key-exchange2.service.js +1 -1
- package/esm2015/lib/profile/profile.gql.js +2 -64
- package/esm2015/public-api.js +2 -1
- package/fesm2015/lifeready-core.js +197 -309
- package/fesm2015/lifeready-core.js.map +1 -1
- package/lib/item2/item2.service.d.ts +1 -1
- package/lib/key/key.types.d.ts +4 -1
- package/lib/key-exchange/key-exchange2.gql.d.ts +27 -13
- package/lib/key-exchange/key-exchange2.service.d.ts +4 -4
- package/lib/profile/profile.gql.d.ts +0 -2
- package/lifeready-core.metadata.json +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -23,7 +23,7 @@ export declare class Item2Service extends LrService {
|
|
|
23
23
|
kcType: string;
|
|
24
24
|
};
|
|
25
25
|
static TEMP_DIRECTORY_PLAIN_META_FILTER: string;
|
|
26
|
-
downloadFileContent(options: DownloadFileContentOptions): Promise<
|
|
26
|
+
downloadFileContent(options: DownloadFileContentOptions): Promise<Uint8Array>;
|
|
27
27
|
getDirectoryKeyId(directoryId: LrRelayIdInput): Promise<string>;
|
|
28
28
|
getFileKeyId(fileId: LrRelayIdInput): Promise<string>;
|
|
29
29
|
getDirectoryKey(directoryId: LrRelayIdInput, directoryKeyId?: LrRelayIdInput): Promise<import("../key/key.types").Key>;
|
package/lib/key/key.types.d.ts
CHANGED
|
@@ -64,7 +64,10 @@ export interface KeyGraphResponse {
|
|
|
64
64
|
export interface HasKeyGraph {
|
|
65
65
|
keyGraph?: KeyGraphResponse;
|
|
66
66
|
}
|
|
67
|
-
export declare
|
|
67
|
+
export declare enum PayloadType {
|
|
68
|
+
JSON = "JSON",
|
|
69
|
+
UINT_8_ARRAY = "UINT_8_ARRAY"
|
|
70
|
+
}
|
|
68
71
|
export interface DeriveKeyResult {
|
|
69
72
|
jwk: JWK.Key;
|
|
70
73
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JWK } from 'node-jose';
|
|
2
2
|
import { Connection, DateTime, ID, JSONObject, JSONString, LrEmail, OtKeyCipherClearJson2 } from '../api/types';
|
|
3
3
|
export declare type KeyExchangeState2 = 'IN_PROGRESS' | 'COMPLETED' | 'DECLINED' | 'CANCELLED' | 'DELETED';
|
|
4
|
-
export interface
|
|
4
|
+
export interface KeyExchangeFieldsResult {
|
|
5
5
|
id: ID;
|
|
6
6
|
token: string;
|
|
7
7
|
state: KeyExchangeState2;
|
|
@@ -49,8 +49,8 @@ export interface KeyExchangeFragment {
|
|
|
49
49
|
responderPbkCipher: string;
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
-
export declare const
|
|
53
|
-
export interface
|
|
52
|
+
export declare const KeyExchangeFields = "\n id\n token\n state\n mode\n isInitiator\n initiator {\n id\n username\n config\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 }\n";
|
|
53
|
+
export interface UserSharedKeyFieldsResult {
|
|
54
54
|
userSigPrk: {
|
|
55
55
|
id: ID;
|
|
56
56
|
};
|
|
@@ -63,18 +63,26 @@ export interface UserSharedKeyFragment {
|
|
|
63
63
|
mkSharedKey: {
|
|
64
64
|
id: ID;
|
|
65
65
|
};
|
|
66
|
+
mkPxk: {
|
|
67
|
+
id: ID;
|
|
68
|
+
pbk: JSONObject;
|
|
69
|
+
};
|
|
70
|
+
mkReshareRequestCipher: string;
|
|
71
|
+
mkReshareResponseCipher: string;
|
|
72
|
+
mkReshareRequestSent: boolean;
|
|
73
|
+
mkReshareResponseSent: boolean;
|
|
66
74
|
}
|
|
67
|
-
export declare const
|
|
75
|
+
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";
|
|
68
76
|
export interface KeyExchangesQuery2 {
|
|
69
|
-
keyExchanges: Connection<
|
|
77
|
+
keyExchanges: Connection<KeyExchangeFieldsResult>;
|
|
70
78
|
}
|
|
71
79
|
export declare const KeyExchangesQuery2: import("../_common/ast").TypedDocumentNode<KeyExchangesQuery2>;
|
|
72
80
|
export interface KeyExchangeQuery2 {
|
|
73
|
-
keyExchange:
|
|
81
|
+
keyExchange: KeyExchangeFieldsResult;
|
|
74
82
|
}
|
|
75
83
|
export declare const KeyExchangeQuery2: import("../_common/ast").TypedDocumentNode<KeyExchangeQuery2>;
|
|
76
84
|
export interface KeyExchangeTokenQuery2 {
|
|
77
|
-
keyExchange:
|
|
85
|
+
keyExchange: KeyExchangeFieldsResult;
|
|
78
86
|
}
|
|
79
87
|
export declare const KeyExchangeTokenQuery2: import("../_common/ast").TypedDocumentNode<KeyExchangeTokenQuery2>;
|
|
80
88
|
export interface CancelKeyExchangeMutation {
|
|
@@ -95,33 +103,39 @@ export interface DeclineKeyExchangeMutation {
|
|
|
95
103
|
export declare const DeclineKeyExchangeMutation: import("../_common/ast").TypedDocumentNode<DeclineKeyExchangeMutation>;
|
|
96
104
|
export interface InitiateKeyExchangeOtkMutation {
|
|
97
105
|
initiateKeyExchangeOtk: {
|
|
98
|
-
keyExchange:
|
|
106
|
+
keyExchange: KeyExchangeFieldsResult;
|
|
99
107
|
};
|
|
100
108
|
}
|
|
101
109
|
export declare const InitiateKeyExchangeOtkMutation: import("../_common/ast").TypedDocumentNode<InitiateKeyExchangeOtkMutation>;
|
|
102
110
|
export interface RespondKeyExchangeOtkMutation {
|
|
103
111
|
respondKeyExchangeOtk: {
|
|
104
|
-
keyExchange:
|
|
105
|
-
userSharedKey:
|
|
112
|
+
keyExchange: KeyExchangeFieldsResult;
|
|
113
|
+
userSharedKey: UserSharedKeyFieldsResult;
|
|
106
114
|
tp: {
|
|
107
115
|
id: ID;
|
|
116
|
+
user: {
|
|
117
|
+
config: unknown;
|
|
118
|
+
};
|
|
108
119
|
};
|
|
109
120
|
};
|
|
110
121
|
}
|
|
111
122
|
export declare const RespondKeyExchangeOtkMutation: import("../_common/ast").TypedDocumentNode<RespondKeyExchangeOtkMutation>;
|
|
112
123
|
export interface CompleteKeyExchangeOtkMutation {
|
|
113
124
|
completeKeyExchangeOtk: {
|
|
114
|
-
keyExchange:
|
|
115
|
-
userSharedKey:
|
|
125
|
+
keyExchange: KeyExchangeFieldsResult;
|
|
126
|
+
userSharedKey: UserSharedKeyFieldsResult;
|
|
116
127
|
tp: {
|
|
117
128
|
id: ID;
|
|
129
|
+
user: {
|
|
130
|
+
config: unknown;
|
|
131
|
+
};
|
|
118
132
|
};
|
|
119
133
|
};
|
|
120
134
|
}
|
|
121
135
|
export declare const CompleteKeyExchangeOtkMutation: import("../_common/ast").TypedDocumentNode<CompleteKeyExchangeOtkMutation>;
|
|
122
136
|
export interface CurrentUserSharedKeyQuery2 {
|
|
123
137
|
currentUserSharedKey: {
|
|
124
|
-
userSharedKey:
|
|
138
|
+
userSharedKey: UserSharedKeyFieldsResult;
|
|
125
139
|
};
|
|
126
140
|
}
|
|
127
141
|
export declare const CurrentUserSharedKeyQuery2: import("../_common/ast").TypedDocumentNode<CurrentUserSharedKeyQuery2>;
|
|
@@ -7,7 +7,7 @@ import { EncryptionService } from '../encryption/encryption.service';
|
|
|
7
7
|
import { KeyFactoryService } from '../key/key-factory.service';
|
|
8
8
|
import { KeyGraphService } from '../key/key-graph.service';
|
|
9
9
|
import { KeyService } from '../key/key.service';
|
|
10
|
-
import { CancelKeyExchangeMutation, CompleteKeyExchangeOtkMutation, CurrentUserSharedKeyQuery2, DeclineKeyExchangeMutation, InitiateKeyExchangeOtkMutation,
|
|
10
|
+
import { CancelKeyExchangeMutation, CompleteKeyExchangeOtkMutation, CurrentUserSharedKeyQuery2, DeclineKeyExchangeMutation, InitiateKeyExchangeOtkMutation, KeyExchangeFieldsResult, KeyExchangeState2, RespondKeyExchangeOtkMutation } from './key-exchange2.gql';
|
|
11
11
|
/**
|
|
12
12
|
* The decrypted content of the one-time key cipher;
|
|
13
13
|
* When user supplies this information the lib doesn't need to do another API call
|
|
@@ -94,17 +94,17 @@ export declare class KeyExchange2Service extends LrService {
|
|
|
94
94
|
private decryptResponseCipher;
|
|
95
95
|
private decryptKeyExchangeAsInitiator;
|
|
96
96
|
private decryptKeyExchangeAsResponder;
|
|
97
|
-
decryptKeyExchange(keyExchange:
|
|
97
|
+
decryptKeyExchange(keyExchange: KeyExchangeFieldsResult, otKeyK?: string): Promise<KeyExchangeFieldsResult>;
|
|
98
98
|
getKeyExchanges({ state }?: {
|
|
99
99
|
state?: KeyExchangeState2;
|
|
100
|
-
}): Promise<
|
|
100
|
+
}): Promise<KeyExchangeFieldsResult[]>;
|
|
101
101
|
/**
|
|
102
102
|
* @param id If the current user can responder the key exchange if they are either the initiator or the receiver.
|
|
103
103
|
* @param token If not signed in, or not the initiator or responder, 'token' must be given.
|
|
104
104
|
* @param otKeyK Is the raw one-time key (string). If the responder is explicitly specified at time of initiation, then
|
|
105
105
|
* it's possible to have the otKey wrapped by the public key of the responder. In which case, the otKeyK is not needed.
|
|
106
106
|
*/
|
|
107
|
-
getKeyExchange(id: string, { otKeyK, token }?: GetKeyExchangeOptions2): Promise<
|
|
107
|
+
getKeyExchange(id: string, { otKeyK, token }?: GetKeyExchangeOptions2): Promise<KeyExchangeFieldsResult>;
|
|
108
108
|
getCurrentUserSharedKey(input: {
|
|
109
109
|
username?: string;
|
|
110
110
|
userId?: string;
|
|
@@ -2,8 +2,6 @@ import { Connection, ContactCardNode, TpNode } from '../api/types';
|
|
|
2
2
|
import { HasKeyGraph } from '../key/key.types';
|
|
3
3
|
import { HasEdges } from './../_common/types';
|
|
4
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
5
|
export declare const TrustedPartyProperties: string;
|
|
8
6
|
export interface CurrentUserQueryType extends HasKeyGraph {
|
|
9
7
|
currentUser: ApiCurrentUser;
|