oro-sdk-apis 1.8.5 → 1.11.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/models/guard.d.ts +1 -0
- package/dist/models/practice.d.ts +12 -0
- 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/guard.ts +1 -0
- package/src/models/practice.ts +12 -1
- package/src/services/practice.ts +17 -7
- package/LICENSE +0 -21
package/dist/models/guard.d.ts
CHANGED
|
@@ -127,6 +127,9 @@ export declare type PracticeConfigPractitionerChatbox = PracticeConfig<PracticeC
|
|
|
127
127
|
planUpdatedMessage?: {
|
|
128
128
|
[languageISO639_3: string]: string;
|
|
129
129
|
};
|
|
130
|
+
examsUpdatedMessage?: {
|
|
131
|
+
[languageISO639_3: string]: string;
|
|
132
|
+
};
|
|
130
133
|
}>;
|
|
131
134
|
export declare type PracticeConfigPracticeOnlinePharmacy = PracticeConfig<PracticeConfigKind.PracticePharmacyPicker, {
|
|
132
135
|
onlinePharmacy?: {
|
|
@@ -247,6 +250,15 @@ export interface PracticePaymentIntent {
|
|
|
247
250
|
dateCreatedAt?: Date;
|
|
248
251
|
dateUpdateAt?: Date;
|
|
249
252
|
}
|
|
253
|
+
/**
|
|
254
|
+
* This interface is used as metadata when creating Stripe Invoice.
|
|
255
|
+
* It will be used to create the consult when stripe use our hook.
|
|
256
|
+
*/
|
|
257
|
+
export interface ConsultRequestMetadata {
|
|
258
|
+
tagSpecialtyRequired: string;
|
|
259
|
+
isoLocalityRequired?: string;
|
|
260
|
+
isoLanguageRequired: string;
|
|
261
|
+
}
|
|
250
262
|
export interface Assignment {
|
|
251
263
|
id?: number;
|
|
252
264
|
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,
|