oro-sdk-apis 1.14.0 → 1.16.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/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 +14 -1
- package/dist/models/index.d.ts +2 -0
- package/dist/models/init.d.ts +26 -0
- package/dist/models/practice.d.ts +13 -4
- package/dist/oro-sdk-apis.cjs.development.js +370 -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 +368 -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/dist/services/practice.d.ts +2 -2
- package/dist/services/teller.d.ts +9 -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 +19 -4
- package/src/models/index.ts +2 -0
- package/src/models/init.ts +37 -0
- package/src/models/practice.ts +13 -3
- 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 +4 -4
- package/src/services/teller.ts +32 -17
|
@@ -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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Uuid, Base64String, TokenData, RFC3339Date, Url } from './';
|
|
2
|
+
import { AllRoleType } from './practice';
|
|
2
3
|
export declare type AuthRefreshFunc = (refreshToken?: string) => Promise<AuthTokenResponse>;
|
|
3
4
|
export interface Tokens {
|
|
4
5
|
accessToken?: string;
|
|
@@ -13,9 +14,18 @@ export interface AuthTokenRequest {
|
|
|
13
14
|
export interface AuthTokenResponse {
|
|
14
15
|
accessToken: string;
|
|
15
16
|
tokenType: string;
|
|
16
|
-
refreshToken
|
|
17
|
+
refreshToken?: string;
|
|
17
18
|
expiresIn: number;
|
|
18
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* This interface is used to request a M2M token as a service
|
|
22
|
+
*/
|
|
23
|
+
export interface M2MTokenRequest {
|
|
24
|
+
clientId: string;
|
|
25
|
+
clientSecret: string;
|
|
26
|
+
requestedScopes: string[];
|
|
27
|
+
practiceUuid: string;
|
|
28
|
+
}
|
|
19
29
|
export interface AuthRecoverRequest {
|
|
20
30
|
practiceUuid: string;
|
|
21
31
|
email: string;
|
|
@@ -119,3 +129,6 @@ export interface LegalData {
|
|
|
119
129
|
rpAcceptedVersion: Url;
|
|
120
130
|
rpAcceptedAtIP?: string;
|
|
121
131
|
}
|
|
132
|
+
export declare type RoleBasedScopes = AllRoleType;
|
|
133
|
+
export declare type PermissionBasedScopes = 'consult.consults.get' | 'consult.consults.post' | 'practice.assignments.post';
|
|
134
|
+
export declare type AllScopes = RoleBasedScopes | PermissionBasedScopes;
|
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
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PlaceData } from
|
|
1
|
+
import { PlaceData } from '.';
|
|
2
2
|
export declare enum WorkflowType {
|
|
3
3
|
Onboard = "Onboard",
|
|
4
4
|
Followup = "Followup",
|
|
@@ -249,8 +249,17 @@ export interface ConsultRequestMetadata {
|
|
|
249
249
|
isoLocalityRequired?: string;
|
|
250
250
|
isoLanguageRequired: string;
|
|
251
251
|
}
|
|
252
|
-
export interface
|
|
253
|
-
|
|
252
|
+
export interface AssignmentRequest {
|
|
253
|
+
uuidAssignor: string;
|
|
254
|
+
uuidPractitioner?: string;
|
|
255
|
+
status?: AssignmentStatus;
|
|
256
|
+
uuidConsult?: string;
|
|
257
|
+
tagSpecialty?: string;
|
|
258
|
+
isoLocality?: string;
|
|
259
|
+
isoLanguage?: string;
|
|
260
|
+
}
|
|
261
|
+
export declare type Assignment = {
|
|
262
|
+
id: number;
|
|
254
263
|
uuidPractice: string;
|
|
255
264
|
uuidAssignor: string;
|
|
256
265
|
uuidPractitioner?: string;
|
|
@@ -258,7 +267,7 @@ export interface Assignment {
|
|
|
258
267
|
uuidConsult?: string;
|
|
259
268
|
tagSpecialty?: string;
|
|
260
269
|
timeAssigned?: string;
|
|
261
|
-
}
|
|
270
|
+
};
|
|
262
271
|
export interface PractitionerRole {
|
|
263
272
|
id?: number;
|
|
264
273
|
uuidPractice: string;
|