oro-sdk-apis 1.14.0 → 1.15.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/dist/helpers/hash.d.ts +6 -0
- package/dist/helpers/index.d.ts +2 -0
- package/dist/helpers/init.d.ts +9 -0
- package/dist/index.d.ts +2 -24
- package/dist/models/guard.d.ts +10 -1
- package/dist/models/index.d.ts +2 -0
- package/dist/models/init.d.ts +26 -0
- package/dist/oro-sdk-apis.cjs.development.js +349 -124
- package/dist/oro-sdk-apis.cjs.development.js.map +1 -1
- package/dist/oro-sdk-apis.cjs.production.min.js +1 -1
- package/dist/oro-sdk-apis.cjs.production.min.js.map +1 -1
- package/dist/oro-sdk-apis.esm.js +347 -125
- package/dist/oro-sdk-apis.esm.js.map +1 -1
- package/dist/services/api.d.ts +9 -1
- package/dist/services/apisPracticeManager.d.ts +25 -0
- package/dist/services/guard.d.ts +8 -1
- package/dist/services/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/helpers/hash.ts +11 -0
- package/src/helpers/index.ts +2 -0
- package/src/helpers/init.ts +47 -0
- package/src/index.ts +2 -52
- package/src/models/guard.ts +13 -4
- package/src/models/index.ts +2 -0
- package/src/models/init.ts +37 -0
- package/src/services/api.ts +51 -34
- package/src/services/apisPracticeManager.ts +52 -0
- package/src/services/guard.ts +46 -4
- package/src/services/index.ts +1 -0
- package/src/services/practice.ts +2 -3
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ServiceCollection, ServiceCollectionRequest } from '../models';
|
|
2
|
+
/**
|
|
3
|
+
* This function is used to initialize services with a provided url
|
|
4
|
+
* @param services an object containing the url of the services to init
|
|
5
|
+
* @param authenticationCallback (optional) the authentification callback. Called when the token were not able to be refreshed.
|
|
6
|
+
* @param useLocalStorage (default: true) if true store tokens into local storage (only for browsers)
|
|
7
|
+
* @returns an instance of each services with a provided url
|
|
8
|
+
*/
|
|
9
|
+
export declare const init: (services: ServiceCollectionRequest, authenticationCallback?: ((err: Error, practiceUuid?: string | undefined) => void) | undefined, useLocalStorage?: boolean) => ServiceCollection;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,27 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
* This function is used to initialize services with a provided url
|
|
4
|
-
* @param services an object containing the url of the services to init
|
|
5
|
-
* @param (optional) authenticationCallback the authentification callback
|
|
6
|
-
* @returns an instance of each services with a provided url
|
|
7
|
-
*/
|
|
8
|
-
declare const init: (services: {
|
|
9
|
-
tellerBaseURL?: string;
|
|
10
|
-
vaultBaseURL?: string;
|
|
11
|
-
guardBaseURL?: string;
|
|
12
|
-
practiceBaseURL?: string;
|
|
13
|
-
consultBaseURL?: string;
|
|
14
|
-
workflowBaseURL?: string;
|
|
15
|
-
diagnosisBaseURL?: string;
|
|
16
|
-
}, authenticationCallback?: ((err: Error) => void) | undefined) => {
|
|
17
|
-
tellerService: TellerService | undefined;
|
|
18
|
-
practiceService: PracticeService | undefined;
|
|
19
|
-
consultService: ConsultService | undefined;
|
|
20
|
-
vaultService: VaultService | undefined;
|
|
21
|
-
guardService: GuardService | undefined;
|
|
22
|
-
workflowService: WorkflowService | undefined;
|
|
23
|
-
diagnosisService: DiagnosisService | undefined;
|
|
24
|
-
};
|
|
1
|
+
import { init } from './helpers';
|
|
2
|
+
export * from './helpers';
|
|
25
3
|
export * from './models';
|
|
26
4
|
export * from './services';
|
|
27
5
|
export default init;
|
package/dist/models/guard.d.ts
CHANGED
|
@@ -13,9 +13,18 @@ export interface AuthTokenRequest {
|
|
|
13
13
|
export interface AuthTokenResponse {
|
|
14
14
|
accessToken: string;
|
|
15
15
|
tokenType: string;
|
|
16
|
-
refreshToken
|
|
16
|
+
refreshToken?: string;
|
|
17
17
|
expiresIn: number;
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* This interface is used to request a M2M token as a service
|
|
21
|
+
*/
|
|
22
|
+
export interface M2MTokenRequest {
|
|
23
|
+
clientId: string;
|
|
24
|
+
clientSecret: string;
|
|
25
|
+
requestedScopes: string[];
|
|
26
|
+
practiceUuid: string;
|
|
27
|
+
}
|
|
19
28
|
export interface AuthRecoverRequest {
|
|
20
29
|
practiceUuid: string;
|
|
21
30
|
email: string;
|
package/dist/models/index.d.ts
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { APIService, ConsultService, DiagnosisService, GuardService, PracticeService, TellerService, VaultService, WorkflowService } from '../services';
|
|
2
|
+
/**
|
|
3
|
+
* This interface represents a collection of service urls you need to initialize
|
|
4
|
+
*/
|
|
5
|
+
export interface ServiceCollectionRequest {
|
|
6
|
+
tellerBaseURL?: string;
|
|
7
|
+
vaultBaseURL?: string;
|
|
8
|
+
guardBaseURL?: string;
|
|
9
|
+
practiceBaseURL?: string;
|
|
10
|
+
consultBaseURL?: string;
|
|
11
|
+
workflowBaseURL?: string;
|
|
12
|
+
diagnosisBaseURL?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* This interface represents a collection of service
|
|
16
|
+
*/
|
|
17
|
+
export interface ServiceCollection {
|
|
18
|
+
apiService: APIService;
|
|
19
|
+
tellerService?: TellerService;
|
|
20
|
+
practiceService?: PracticeService;
|
|
21
|
+
consultService?: ConsultService;
|
|
22
|
+
vaultService?: VaultService;
|
|
23
|
+
guardService?: GuardService;
|
|
24
|
+
workflowService?: WorkflowService;
|
|
25
|
+
diagnosisService?: DiagnosisService;
|
|
26
|
+
}
|