oro-sdk-apis 1.9.0 → 1.11.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/models/external/clinia.d.ts +60 -0
- package/dist/models/external/index.d.ts +1 -0
- package/dist/models/guard.d.ts +1 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/practice.d.ts +11 -12
- package/dist/oro-sdk-apis.cjs.development.js +16 -3
- 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 +16 -3
- package/dist/oro-sdk-apis.esm.js.map +1 -1
- package/dist/services/practice.d.ts +13 -2
- package/package.json +1 -1
- package/src/models/external/clinia.ts +75 -0
- package/src/models/external/index.ts +1 -0
- package/src/models/guard.ts +1 -0
- package/src/models/index.ts +1 -0
- package/src/models/practice.ts +14 -6
- package/src/services/practice.ts +17 -7
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export declare type FacetFilter = 'type:PHARMACY' | 'type:CLINIC' | 'type:PHARMACY_VIRTUAL';
|
|
2
|
+
export interface CliniaResponse<T> {
|
|
3
|
+
facets: any;
|
|
4
|
+
meta: {
|
|
5
|
+
query: string;
|
|
6
|
+
page: number;
|
|
7
|
+
numPages: number;
|
|
8
|
+
perPage: number;
|
|
9
|
+
total: number;
|
|
10
|
+
};
|
|
11
|
+
records: T[];
|
|
12
|
+
}
|
|
13
|
+
export interface PlaceData {
|
|
14
|
+
id: string;
|
|
15
|
+
documentType: string;
|
|
16
|
+
type: string;
|
|
17
|
+
name: string;
|
|
18
|
+
address: AddressData;
|
|
19
|
+
geoPoint: GeoPointData;
|
|
20
|
+
distance: number;
|
|
21
|
+
onlineBookingUrl: string;
|
|
22
|
+
openingHours: Map<string, Array<IntervalData>>;
|
|
23
|
+
phones: Array<PhoneData>;
|
|
24
|
+
socials: Array<SocialData>;
|
|
25
|
+
note: string;
|
|
26
|
+
services: Array<string>;
|
|
27
|
+
owner: string;
|
|
28
|
+
}
|
|
29
|
+
export interface AddressData {
|
|
30
|
+
streetAddress: string;
|
|
31
|
+
suiteNumber: string;
|
|
32
|
+
postalCode: string;
|
|
33
|
+
neighborhood: string;
|
|
34
|
+
locality: string;
|
|
35
|
+
place: string;
|
|
36
|
+
region: string;
|
|
37
|
+
regionCode: string;
|
|
38
|
+
country: string;
|
|
39
|
+
countryCode: string;
|
|
40
|
+
}
|
|
41
|
+
export interface PhoneData {
|
|
42
|
+
number: string;
|
|
43
|
+
extension: string;
|
|
44
|
+
countryCode: string;
|
|
45
|
+
type: 'MAIN' | 'ALTERNATE' | 'RECEPTION' | 'FAX' | 'TEXT_TELEPHONE_TTY' | 'INFO' | 'OTHER';
|
|
46
|
+
isTollFree: boolean;
|
|
47
|
+
province?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface IntervalData {
|
|
50
|
+
start: string;
|
|
51
|
+
end: string;
|
|
52
|
+
}
|
|
53
|
+
export interface GeoPointData {
|
|
54
|
+
lat: number;
|
|
55
|
+
lng: number;
|
|
56
|
+
}
|
|
57
|
+
export interface SocialData {
|
|
58
|
+
url: string;
|
|
59
|
+
type: string;
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './clinia';
|
package/dist/models/guard.d.ts
CHANGED
package/dist/models/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PlaceData } from ".";
|
|
1
2
|
export declare enum WorkflowType {
|
|
2
3
|
Onboard = "Onboard",
|
|
3
4
|
Followup = "Followup",
|
|
@@ -132,18 +133,7 @@ export declare type PracticeConfigPractitionerChatbox = PracticeConfig<PracticeC
|
|
|
132
133
|
};
|
|
133
134
|
}>;
|
|
134
135
|
export declare type PracticeConfigPracticeOnlinePharmacy = PracticeConfig<PracticeConfigKind.PracticePharmacyPicker, {
|
|
135
|
-
onlinePharmacy?:
|
|
136
|
-
name: string;
|
|
137
|
-
id: string;
|
|
138
|
-
phones: {
|
|
139
|
-
countryCode: string;
|
|
140
|
-
number: string;
|
|
141
|
-
extension: string | null;
|
|
142
|
-
type: string;
|
|
143
|
-
isTollFree: boolean;
|
|
144
|
-
province?: string;
|
|
145
|
-
}[];
|
|
146
|
-
};
|
|
136
|
+
onlinePharmacy?: PlaceData;
|
|
147
137
|
}>;
|
|
148
138
|
export declare type PracticeConfigPracticeCookieBanner = PracticeConfig<PracticeConfigKind.PracticeCookieBanner, {
|
|
149
139
|
showCookieBanner?: boolean;
|
|
@@ -250,6 +240,15 @@ export interface PracticePaymentIntent {
|
|
|
250
240
|
dateCreatedAt?: Date;
|
|
251
241
|
dateUpdateAt?: Date;
|
|
252
242
|
}
|
|
243
|
+
/**
|
|
244
|
+
* This interface is used as metadata when creating Stripe Invoice.
|
|
245
|
+
* It will be used to create the consult when stripe use our hook.
|
|
246
|
+
*/
|
|
247
|
+
export interface ConsultRequestMetadata {
|
|
248
|
+
tagSpecialtyRequired: string;
|
|
249
|
+
isoLocalityRequired?: string;
|
|
250
|
+
isoLanguageRequired: string;
|
|
251
|
+
}
|
|
253
252
|
export interface Assignment {
|
|
254
253
|
id?: number;
|
|
255
254
|
uuidPractice: string;
|
|
@@ -2402,13 +2402,26 @@ var PracticeService = /*#__PURE__*/function () {
|
|
|
2402
2402
|
|
|
2403
2403
|
_proto.getPaymentIntentHashedEmail = function getPaymentIntentHashedEmail(email) {
|
|
2404
2404
|
return _.Buffer.from(hash_js.sha256().update(email.toLowerCase()).digest('hex'), 'hex').toString('base64');
|
|
2405
|
-
}
|
|
2405
|
+
}
|
|
2406
|
+
/**
|
|
2407
|
+
* Creates a PracticePaymentIntent
|
|
2408
|
+
* @param practiceUuid the uuid of the practice
|
|
2409
|
+
* @param planId the plan id to use
|
|
2410
|
+
* @param userEmail the email address of the user
|
|
2411
|
+
* @param isoLocality (optional) the desired locality
|
|
2412
|
+
* @param url_subdomain (optional) the url of the sub domain (@bruno-morel need you to document that)
|
|
2413
|
+
* @param promotionCode (optional) promotion code to apply
|
|
2414
|
+
* @param consultRequest (optional) consult request to use. If defined, when payment service call our hooks in practice, it will try to create a consult with these infos.
|
|
2415
|
+
* @returns
|
|
2416
|
+
*/
|
|
2417
|
+
;
|
|
2406
2418
|
|
|
2407
|
-
_proto.practiceCreatePaymentsIntent = function practiceCreatePaymentsIntent(practiceUuid, planId, userEmail, isoLocality, url_subdomain, promotionCode) {
|
|
2419
|
+
_proto.practiceCreatePaymentsIntent = function practiceCreatePaymentsIntent(practiceUuid, planId, userEmail, isoLocality, url_subdomain, promotionCode, consultRequest) {
|
|
2408
2420
|
return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents/", {
|
|
2409
2421
|
idPlan: planId,
|
|
2410
2422
|
hashUserEmail: userEmail ? this.getPaymentIntentHashedEmail(userEmail) : undefined,
|
|
2411
|
-
isoLocality: isoLocality
|
|
2423
|
+
isoLocality: isoLocality,
|
|
2424
|
+
consultRequest: consultRequest
|
|
2412
2425
|
}, {
|
|
2413
2426
|
params: {
|
|
2414
2427
|
url_subdomain: url_subdomain,
|