oro-sdk 2.1.4-dev1.0 → 2.2.1
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/README.md +26 -34
- package/dist/client.d.ts +4 -4
- package/dist/helpers/client.d.ts +1 -1
- package/dist/helpers/patient-registration.d.ts +1 -1
- package/dist/helpers/vault-grants.d.ts +1 -1
- package/dist/helpers/workflow.d.ts +1 -1
- package/dist/index.d.ts +15 -1
- package/dist/models/client.d.ts +1 -1
- package/dist/models/error.d.ts +0 -14
- package/dist/models/index.d.ts +0 -7
- package/dist/oro-sdk.cjs.development.js +313 -2367
- 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 +246 -2344
- package/dist/oro-sdk.esm.js.map +1 -1
- package/dist/sdk-revision/client.d.ts +2 -2
- package/dist/services/index.d.ts +0 -9
- package/package.json +4 -1
- package/src/client.ts +161 -435
- package/src/helpers/client.ts +1 -1
- package/src/helpers/patient-registration.ts +85 -166
- package/src/helpers/vault-grants.ts +1 -1
- package/src/helpers/workflow.ts +21 -59
- package/src/index.ts +42 -28
- package/src/models/client.ts +1 -1
- package/src/models/error.ts +6 -13
- package/src/models/index.ts +0 -7
- package/src/sdk-revision/client.ts +25 -20
- package/src/services/external/clinia.ts +1 -1
- package/src/services/index.ts +0 -9
- package/dist/models/consult.d.ts +0 -102
- package/dist/models/diagnosis.d.ts +0 -122
- package/dist/models/guard.d.ts +0 -119
- package/dist/models/practice.d.ts +0 -353
- package/dist/models/shared.d.ts +0 -8
- package/dist/models/vault.d.ts +0 -124
- package/dist/models/workflow.d.ts +0 -106
- package/dist/services/api.d.ts +0 -11
- package/dist/services/axios.d.ts +0 -14
- package/dist/services/consult.d.ts +0 -54
- package/dist/services/diagnosis.d.ts +0 -44
- package/dist/services/guard.d.ts +0 -92
- package/dist/services/practice.d.ts +0 -100
- package/dist/services/teller.d.ts +0 -9
- package/dist/services/vault.d.ts +0 -54
- package/dist/services/workflow.d.ts +0 -21
- package/src/models/consult.ts +0 -110
- package/src/models/diagnosis.ts +0 -141
- package/src/models/guard.ts +0 -136
- package/src/models/practice.ts +0 -411
- package/src/models/shared.ts +0 -6
- package/src/models/vault.ts +0 -158
- package/src/models/workflow.ts +0 -142
- package/src/services/api.ts +0 -77
- package/src/services/axios.ts +0 -91
- package/src/services/consult.ts +0 -265
- package/src/services/diagnosis.ts +0 -144
- package/src/services/guard.ts +0 -228
- package/src/services/practice.ts +0 -537
- package/src/services/teller.ts +0 -39
- package/src/services/vault.ts +0 -178
- package/src/services/workflow.ts +0 -36
package/README.md
CHANGED
@@ -4,7 +4,7 @@ ORO SDK package is intended to be run in browser only. It contains everything ne
|
|
4
4
|
|
5
5
|
## Requirements
|
6
6
|
|
7
|
-
- npm 6.14.
|
7
|
+
- npm >=6.14.13
|
8
8
|
|
9
9
|
> Powered by [tsdx](https://github.com/formium/tsdx)
|
10
10
|
|
@@ -24,49 +24,41 @@ npm start # watch
|
|
24
24
|
npm build # build
|
25
25
|
```
|
26
26
|
|
27
|
-
### Linking the
|
27
|
+
### Linking and running the app with sdk
|
28
28
|
|
29
|
-
|
30
|
-
```
|
31
|
-
❯ npm -v
|
32
|
-
6.14.13
|
29
|
+
#### First you need to publish locally the `oro-sdk`
|
33
30
|
|
34
|
-
|
35
|
-
|
36
|
-
```
|
37
|
-
In **`oro-apis/sdk/js`**:
|
31
|
+
Two cases are possible:
|
32
|
+
1. You are updating `oro-apis/sdk/ts`:
|
38
33
|
|
39
|
-
|
34
|
+
In **`oro-apis/sdk/ts`**:
|
40
35
|
|
41
|
-
```bash
|
42
|
-
npm install
|
43
|
-
npm run link:watch
|
44
|
-
```
|
36
|
+
```bash
|
37
|
+
npm install
|
38
|
+
npm run link:watch
|
39
|
+
```
|
40
|
+
2. You are updating `oro-apis/sdk/apis`:
|
45
41
|
|
46
|
-
In **`oro-
|
42
|
+
In **`oro-apis/sdk/apis`**:
|
47
43
|
|
48
|
-
```bash
|
49
|
-
npm
|
50
|
-
npm link
|
51
|
-
```
|
52
|
-
|
53
|
-
in `/web/src/services/oro-client.ts` set the correct module, at line 15 comment out the module definition and use the already written local definition, don't forget to change PATH_TO_oro-apis to what it is on your machine. When done it should look like this:
|
44
|
+
```bash
|
45
|
+
npm install
|
46
|
+
npm run link:watch
|
47
|
+
```
|
54
48
|
|
55
|
-
|
56
|
-
const module = await import('PATH_TO_oro-apis/sdk/js/node_modules/oro-toolbox')
|
57
|
-
//const module = await import('oro-toolbox')
|
58
|
-
```
|
49
|
+
In **`oro-apis/sdk/ts`**:
|
59
50
|
|
60
|
-
|
51
|
+
```bash
|
52
|
+
npm install
|
53
|
+
npm uninstall oro-sdk-apis # optional
|
54
|
+
npm run link:watch:apis
|
55
|
+
```
|
61
56
|
|
62
|
-
|
63
|
-
sirv('PATH_TO_oro-apis/sdk/js/node_modules/oro-toolbox', { dev }),
|
64
|
-
```
|
57
|
+
#### Then you need to link it locally to the app
|
65
58
|
|
66
|
-
|
59
|
+
In **`oro-apps/web`**:
|
67
60
|
|
68
61
|
```bash
|
69
|
-
npm
|
62
|
+
npm uninstall oro-sdk # optional
|
63
|
+
npm run dev:link
|
70
64
|
```
|
71
|
-
|
72
|
-
> Caveat: There is some caveat using `npm link` please see [doc](https://docs.npmjs.com/cli/v7/commands/npm-link#caveat)
|
package/dist/client.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
+
import { Consult, ConsultRequest, ConsultService, DataCreateResponse, DiagnosisService, Document, DocumentType, Grant, GuardService, IdentityResponse, LocalizedData, LockboxManifest, Meta, Metadata, MetadataCategory, PopulatedWorkflowData, Practice, PracticeService, TellerService, TokenData, TosAndCpAcceptanceRequest, Uuid, VaultIndex, VaultService, WorkflowData, WorkflowService } from 'oro-sdk-apis';
|
1
2
|
import * as OroToolbox from 'oro-toolbox';
|
2
|
-
import {
|
3
|
-
import { ConsultService, DiagnosisService, GuardService, PracticeService, TellerService, VaultService, WorkflowService } from './services';
|
3
|
+
import { LocalEncryptedData, RecoveryData, RegisterPatientOutput, UserPreference } from './models';
|
4
4
|
export declare class OroClient {
|
5
5
|
private toolbox;
|
6
6
|
tellerClient: TellerService;
|
@@ -19,7 +19,7 @@ export declare class OroClient {
|
|
19
19
|
constructor(toolbox: typeof OroToolbox, tellerClient: TellerService, vaultClient: VaultService, guardClient: GuardService, practiceClient: PracticeService, consultClient: ConsultService, workflowClient: WorkflowService, diagnosisClient: DiagnosisService, authenticationCallback?: ((err: Error) => void) | undefined);
|
20
20
|
/**
|
21
21
|
* clears the vaultIndex and cached metadata grants
|
22
|
-
|
22
|
+
*/
|
23
23
|
cleanIndex(): Promise<void>;
|
24
24
|
/**
|
25
25
|
* Generates an RSA key pair and password payload (rsa private key encrypted with the password)
|
@@ -70,7 +70,7 @@ export declare class OroClient {
|
|
70
70
|
* @throws IncompleteAuthentication if rsa is not set
|
71
71
|
* @calls authenticationCallback if rsa is not set
|
72
72
|
*/
|
73
|
-
localDecryptJsonPayload({ encryptedKey, encryptedData
|
73
|
+
localDecryptJsonPayload({ encryptedKey, encryptedData }: LocalEncryptedData): any;
|
74
74
|
/**
|
75
75
|
* Effectively kills your "session"
|
76
76
|
*/
|
package/dist/helpers/client.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { PopulatedWorkflowData, MetadataCategory, SelectedAnswersData } from '
|
1
|
+
import { PopulatedWorkflowData, MetadataCategory, SelectedAnswersData } from 'oro-sdk-apis';
|
2
2
|
import { PersonalInformations } from '../models/client';
|
3
3
|
/**
|
4
4
|
* This function extract PersonalInformations from data input object coming from workflow
|
@@ -1,5 +1,5 @@
|
|
1
|
+
import { ConsultRequest, MetadataCategory, Uuid, WorkflowData } from 'oro-sdk-apis';
|
1
2
|
import { OroClient, RegisterPatientOutput } from '..';
|
2
|
-
import { ConsultRequest, MetadataCategory, Uuid, WorkflowData } from '../models';
|
3
3
|
export declare function registerPatient(patientUuid: Uuid, consultRequest: ConsultRequest, workflow: WorkflowData, oroClient: OroClient, masterKey?: Uuid, recoveryQA?: {
|
4
4
|
recoverySecurityQuestions: string[];
|
5
5
|
recoverySecurityAnswers: string[];
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { CryptoRSA } from "oro-toolbox";
|
2
|
-
import { EncryptedIndexEntry, Grant } from "
|
2
|
+
import { EncryptedIndexEntry, Grant } from "oro-sdk-apis";
|
3
3
|
/**
|
4
4
|
* Decrypts and returns the encrypted grants
|
5
5
|
* If something went wrong during decryption, that grant will be removed from the list
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { MetadataCategory, PopulatedWorkflowData, SelectedAnswerData, SelectedAnswersData, WorkflowData, WorkflowUploadedImage } from '
|
1
|
+
import { MetadataCategory, PopulatedWorkflowData, SelectedAnswerData, SelectedAnswersData, WorkflowData, WorkflowUploadedImage } from 'oro-sdk-apis';
|
2
2
|
export declare function filterTriggeredAnsweredWithKind(workflowData: WorkflowData, kind: 'text' | 'date' | 'number' | 'images' | 'images-alias' | 'body-parts' | 'pharmacy-picker'): Promise<SelectedAnswerData[]>;
|
3
3
|
/**
|
4
4
|
* Filters and Populates the `selectedAnswers` from the workflow by
|
package/dist/index.d.ts
CHANGED
@@ -2,8 +2,22 @@ import { OroClient } from './client';
|
|
2
2
|
import * as OroToolboxNamespace from 'oro-toolbox';
|
3
3
|
export declare type OroToolbox = typeof OroToolboxNamespace;
|
4
4
|
export declare let wasmPath: string;
|
5
|
-
|
5
|
+
/**
|
6
|
+
* This function helps you to initialize and OroClient instance
|
7
|
+
* @param toolbox the OroToolbox object
|
8
|
+
* @param tellerBaseURL the teller service base URL
|
9
|
+
* @param vaultBaseURL the vault service base URL
|
10
|
+
* @param guardBaseURL the guard service base URL
|
11
|
+
* @param practiceBaseURL the practice service base URL
|
12
|
+
* @param consultBaseURL the consult service base URL
|
13
|
+
* @param workflowBaseURL the workflow service base URL
|
14
|
+
* @param diagnosisBaseURL the diagnosis service base URL
|
15
|
+
* @param authenticationCallback (optional) authenticationCallback the authentification callback
|
16
|
+
* @returns an instance of OroClient
|
17
|
+
*/
|
18
|
+
declare const init: (toolbox: OroToolbox, tellerBaseURL: string, vaultBaseURL: string, guardBaseURL: string, practiceBaseURL: string, consultBaseURL: string, workflowBaseURL: string, diagnosisBaseURL: string, authenticationCallback?: ((err: Error) => void) | undefined) => OroClient;
|
6
19
|
export { OroClient } from './client';
|
20
|
+
export * from 'oro-sdk-apis';
|
7
21
|
export * from './models';
|
8
22
|
export * from './helpers';
|
9
23
|
export * from './services';
|
package/dist/models/client.d.ts
CHANGED
package/dist/models/error.d.ts
CHANGED
@@ -6,21 +6,7 @@ export declare class MissingLockbox extends Error {
|
|
6
6
|
}
|
7
7
|
export declare class MissingLockboxOwner extends Error {
|
8
8
|
}
|
9
|
-
export declare class IndexBuildError extends Error {
|
10
|
-
}
|
11
9
|
export declare class AssociatedLockboxNotFound extends Error {
|
12
10
|
}
|
13
11
|
export declare class WorkflowAnswersMissingError extends Error {
|
14
12
|
}
|
15
|
-
export declare class AuthenticationFailed extends Error {
|
16
|
-
}
|
17
|
-
export declare class AuthenticationBadRequest extends Error {
|
18
|
-
}
|
19
|
-
export declare class AuthenticationServerError extends Error {
|
20
|
-
}
|
21
|
-
export declare class IdentityCreationFailed extends Error {
|
22
|
-
}
|
23
|
-
export declare class IdentityCreationBadRequest extends Error {
|
24
|
-
}
|
25
|
-
export declare class IdentityCreationConflict extends Error {
|
26
|
-
}
|
package/dist/models/index.d.ts
CHANGED