@lifeready/core 6.1.2 → 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.
@@ -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 KeyExchangeFragment {
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 KeyExchangeFragment: import("../_common/ast").TypedDocumentNode<KeyExchangeFragment>;
53
- export interface UserSharedKeyFragment {
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 UserSharedKeyFragment: import("../_common/ast").TypedDocumentNode<UserSharedKeyFragment>;
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<KeyExchangeFragment>;
77
+ keyExchanges: Connection<KeyExchangeFieldsResult>;
70
78
  }
71
79
  export declare const KeyExchangesQuery2: import("../_common/ast").TypedDocumentNode<KeyExchangesQuery2>;
72
80
  export interface KeyExchangeQuery2 {
73
- keyExchange: KeyExchangeFragment;
81
+ keyExchange: KeyExchangeFieldsResult;
74
82
  }
75
83
  export declare const KeyExchangeQuery2: import("../_common/ast").TypedDocumentNode<KeyExchangeQuery2>;
76
84
  export interface KeyExchangeTokenQuery2 {
77
- keyExchange: KeyExchangeFragment;
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: KeyExchangeFragment;
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: KeyExchangeFragment;
105
- userSharedKey: UserSharedKeyFragment;
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: KeyExchangeFragment;
115
- userSharedKey: UserSharedKeyFragment;
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: UserSharedKeyFragment;
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, KeyExchangeFragment, KeyExchangeState2, RespondKeyExchangeOtkMutation } from './key-exchange2.gql';
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: KeyExchangeFragment, otKeyK?: string): Promise<KeyExchangeFragment>;
97
+ decryptKeyExchange(keyExchange: KeyExchangeFieldsResult, otKeyK?: string): Promise<KeyExchangeFieldsResult>;
98
98
  getKeyExchanges({ state }?: {
99
99
  state?: KeyExchangeState2;
100
- }): Promise<KeyExchangeFragment[]>;
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<KeyExchangeFragment>;
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;