oro-sdk 3.13.0 → 3.16.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.
- package/LICENSE +21 -0
- package/dist/client.d.ts +9 -24
- package/dist/models/error.d.ts +2 -0
- package/dist/oro-sdk.cjs.development.js +723 -903
- package/dist/oro-sdk.cjs.development.js.map +1 -1
- package/dist/oro-sdk.cjs.production.min.js +1 -1
- package/dist/oro-sdk.cjs.production.min.js.map +1 -1
- package/dist/oro-sdk.esm.js +724 -905
- package/dist/oro-sdk.esm.js.map +1 -1
- package/dist/sdk-revision/client.d.ts +6 -15
- package/package.json +2 -2
- package/src/client.ts +65 -134
- package/src/helpers/patient-registration.ts +2 -2
- package/src/models/error.ts +7 -6
- package/src/sdk-revision/client.ts +14 -52
package/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2021 ORO Health Inc.
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
package/dist/client.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Consult, ConsultRequest, ConsultService, DataCreateResponse, DiagnosisService, Document, DocumentType, Grant, GuardService, IdentityResponse, LocalizedData, LockboxManifest, Meta, Metadata, MetadataCategory, PopulatedWorkflowData, Practice, PracticeService, SearchService, TellerService, TokenData, TosAndCpAcceptanceRequest, Uuid, VaultIndex, VaultService, WorkflowData, WorkflowService } from 'oro-sdk-apis';
|
1
|
+
import { Consult, ConsultRequest, ConsultService, DataCreateResponse, DiagnosisService, Document, DocumentType, Grant, GuardService, IdentityResponse, LocalizedData, LockboxManifest, Meta, Metadata, MetadataCategory, PopulatedWorkflowData, Practice, PracticeService, RoleBasedScopes, SearchService, TellerService, TokenData, TosAndCpAcceptanceRequest, Uuid, VaultIndex, VaultService, WorkflowData, WorkflowService } from 'oro-sdk-apis';
|
2
2
|
import * as OroToolbox from 'oro-toolbox';
|
3
3
|
import { LocalEncryptedData, RecoveryData, RegisterPatientOutput, UserPreference } from './models';
|
4
4
|
export declare class OroClient {
|
@@ -98,22 +98,6 @@ export declare class OroClient {
|
|
98
98
|
recoverySecurityQuestions: string[];
|
99
99
|
recoverySecurityAnswers: string[];
|
100
100
|
}, indexSearch?: boolean): Promise<RegisterPatientOutput>;
|
101
|
-
/**
|
102
|
-
* Builds the vault index for the logged user
|
103
|
-
*
|
104
|
-
* Steps:
|
105
|
-
* 1. Retrieves, decrypts and sets the lockbox IndexSnapshot
|
106
|
-
* 2. Retrieves, decrypts and adds all other index entries starting at the snapshot timestamp
|
107
|
-
* 3. Updates the IndexSnapshot if changed
|
108
|
-
* @deprecated
|
109
|
-
* @returns the latest vault index
|
110
|
-
*/
|
111
|
-
buildVaultIndex(forceRefresh?: boolean): Promise<void>;
|
112
|
-
/**
|
113
|
-
* Setter for the vault index
|
114
|
-
* @param index
|
115
|
-
*/
|
116
|
-
setVaultIndex(index: VaultIndex): void;
|
117
101
|
/**
|
118
102
|
* Fetches all grants, and consultations that exist in each lockbox
|
119
103
|
* Then updates the index for the current user with the lockbox consult relationship
|
@@ -126,11 +110,6 @@ export declare class OroClient {
|
|
126
110
|
* @param indexOwnerUuid
|
127
111
|
*/
|
128
112
|
vaultIndexAdd(entries: VaultIndex, indexOwnerUuid?: Uuid): Promise<void>;
|
129
|
-
/**
|
130
|
-
* adds or updates the index snapshot for the logged user
|
131
|
-
* @param index
|
132
|
-
*/
|
133
|
-
indexSnapshotAdd(index: VaultIndex): Promise<void>;
|
134
113
|
/**
|
135
114
|
* @name grantLockbox
|
136
115
|
* @description Grants a lockbox by retrieving the shared secret of the lockbox and encrypting it with the grantees public key
|
@@ -243,7 +222,13 @@ export declare class OroClient {
|
|
243
222
|
*/
|
244
223
|
getGrants(filter?: {
|
245
224
|
consultationId: Uuid;
|
246
|
-
}
|
225
|
+
}): Promise<Grant[]>;
|
226
|
+
/**
|
227
|
+
* Fetches the role of the account that is logged in
|
228
|
+
*
|
229
|
+
* @returns the role based scopes defined by the whoami
|
230
|
+
*/
|
231
|
+
getAccountRole(): Promise<RoleBasedScopes[]>;
|
247
232
|
/**
|
248
233
|
* @name getCachedSecretCryptor
|
249
234
|
* @description Retrieves the cached lockbox secret or fetches the secret from vault, then creates the symmetric cryptor and stores it in memory
|
@@ -358,7 +343,7 @@ export declare class OroClient {
|
|
358
343
|
* @param practiceUuid the uuid of the practice to look consult into
|
359
344
|
* @returns the list of consults
|
360
345
|
*/
|
361
|
-
getAssignedConsultations(practiceUuid: Uuid
|
346
|
+
getAssignedConsultations(practiceUuid: Uuid): Promise<Consult[]>;
|
362
347
|
/**
|
363
348
|
* Gets the past consultations of the patient as well as his relatives if any
|
364
349
|
* @param consultationId any consultation uuid from which we will fetch all the other consultations of the same patient as the owner of this consultation id
|
package/dist/models/error.d.ts
CHANGED
@@ -2,6 +2,8 @@ export declare class IncompleteAuthentication extends Error {
|
|
2
2
|
}
|
3
3
|
export declare class MissingGrant extends Error {
|
4
4
|
}
|
5
|
+
export declare class MissingGrantFilter extends Error {
|
6
|
+
}
|
5
7
|
export declare class MissingLockbox extends Error {
|
6
8
|
}
|
7
9
|
export declare class MissingLockboxOwner extends Error {
|