oro-sdk-apis 1.51.0 → 1.54.0-dev1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/models/practice.d.ts +58 -2
- package/dist/models/workflow.d.ts +1 -1
- package/dist/oro-sdk-apis.cjs.development.js +5 -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 +5 -3
- package/dist/oro-sdk-apis.esm.js.map +1 -1
- package/dist/services/practice.d.ts +4 -4
- package/package.json +1 -1
- package/src/models/practice.ts +68 -0
- package/src/models/workflow.ts +1 -1
- package/src/services/practice.ts +6 -5
@@ -132,7 +132,9 @@ export declare enum PracticeConfigKind {
|
|
132
132
|
PractitionerChatbox = "PractitionerChatbox",
|
133
133
|
PractitionerConsultList = "PractitionerConsultList",
|
134
134
|
PractitionerSearch = "PractitionerSearch",
|
135
|
-
PracticeRegisterWalkthrough = "PracticeRegisterWalkthrough"
|
135
|
+
PracticeRegisterWalkthrough = "PracticeRegisterWalkthrough",
|
136
|
+
PracticeExamsAndResults = "PracticeExamsAndResults",
|
137
|
+
PracticeLayout = "PracticeLayout"
|
136
138
|
}
|
137
139
|
/**
|
138
140
|
* Defines the close consultation types to hide in the close consultation modal of a practice
|
@@ -310,7 +312,25 @@ export declare type PracticeConfigPracticeRegisterWalkthrough = PracticeConfig<P
|
|
310
312
|
*/
|
311
313
|
workflowUuid?: string;
|
312
314
|
}>;
|
313
|
-
|
315
|
+
/**
|
316
|
+
* This config is used for all configs related to the Exams and Results module
|
317
|
+
*/
|
318
|
+
export declare type PracticeConfigPracticeExamsAndResults = PracticeConfig<PracticeConfigKind.PracticeExamsAndResults, {
|
319
|
+
/**
|
320
|
+
* If true, then show the deprecated URL prescription pad
|
321
|
+
*/
|
322
|
+
showUrlPrescriptionPad?: boolean;
|
323
|
+
}>;
|
324
|
+
/**
|
325
|
+
* This config is used for all configs related to the Layout of the app (Navbar, Footer, etc)
|
326
|
+
*/
|
327
|
+
export declare type PracticeConfigPracticeLayout = PracticeConfig<PracticeConfigKind.PracticeLayout, {
|
328
|
+
/**
|
329
|
+
* If true, then show the FAQ link in the Navbar
|
330
|
+
*/
|
331
|
+
showFaqLink?: boolean;
|
332
|
+
}>;
|
333
|
+
export declare type PracticeConfigs = PracticeConfigPractitionerSearch | PracticeConfigPractitionerConsultList | PracticeConfigPractitionerChatbox | PracticeConfigPracticeLocaleSwitcher | PracticeConfigPracticeCookieBanner | PracticeConfigPracticeOnlinePharmacy | PracticeConfigPracticeCssVariables | PracticeConfigPracticeFontsLinks | PracticeConfigPracticePrescriptionFields | PracticeConfigPracticeConfigExample | PracticeConfigPracticeConsultTabs | PracticeConfigPatientConsultCard | PracticeConfigPracticeExamsAndResults | PracticeConfigPracticeLayout;
|
314
334
|
export interface PracticeWorkflow {
|
315
335
|
id?: number;
|
316
336
|
uuidPractice: string;
|
@@ -415,10 +435,44 @@ export interface PracticePaymentIntent {
|
|
415
435
|
* It will be used to create the consult when stripe use our hook.
|
416
436
|
*/
|
417
437
|
export interface ConsultRequestMetadata {
|
438
|
+
/**
|
439
|
+
* Defines the kind of `PaymentIntentRequestMetadata` it is
|
440
|
+
*
|
441
|
+
* Note: it can be `undefined` to handle backward compatibility when this interface didn't had a `kind`
|
442
|
+
*/
|
443
|
+
kind: 'ConsultRequestMetadata' | undefined;
|
444
|
+
/**
|
445
|
+
* The specialty required by the consultation
|
446
|
+
*/
|
418
447
|
tagSpecialtyRequired: string;
|
448
|
+
/**
|
449
|
+
* The locality required for the consultation in iso. COUNTRY (ISO 3166) - PROVINCE - COUNTY - CITY
|
450
|
+
*/
|
419
451
|
isoLocalityRequired?: string;
|
452
|
+
/**
|
453
|
+
* The language required for the consultation. Should respect ISO 639-3 https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes
|
454
|
+
*/
|
420
455
|
isoLanguageRequired: string;
|
421
456
|
}
|
457
|
+
/**
|
458
|
+
* This interface is used as metadata when creating Stripe Invoice.
|
459
|
+
* It will be used to create the consult when stripe use our hook.
|
460
|
+
*/
|
461
|
+
export interface RefillTreatmentRequestMetadata {
|
462
|
+
/**
|
463
|
+
* Defines the kind of `PaymentIntentRequestMetadata` it is
|
464
|
+
*/
|
465
|
+
kind: 'RefillTreatmentRequestMetadata';
|
466
|
+
/**
|
467
|
+
* The consult uuid to refill
|
468
|
+
*/
|
469
|
+
consultUuid: string;
|
470
|
+
}
|
471
|
+
/**
|
472
|
+
* This interface is used as metadata when creating Stripe Invoice.
|
473
|
+
* It will be used when stripe use our hook.
|
474
|
+
*/
|
475
|
+
export declare type PaymentIntentRequestMetadata = ConsultRequestMetadata | RefillTreatmentRequestMetadata;
|
422
476
|
export interface AssignmentRequest {
|
423
477
|
uuidAssignor: string;
|
424
478
|
uuidPractitioner?: string;
|
@@ -506,6 +560,8 @@ export interface HydratedPracticeConfigs {
|
|
506
560
|
[PracticeConfigKind.PractitionerConsultList]?: PracticeConfigPractitionerConsultList;
|
507
561
|
[PracticeConfigKind.PractitionerSearch]?: PracticeConfigPractitionerSearch;
|
508
562
|
[PracticeConfigKind.PracticeRegisterWalkthrough]?: PracticeConfigPracticeRegisterWalkthrough;
|
563
|
+
[PracticeConfigKind.PracticeExamsAndResults]?: PracticeConfigPracticeExamsAndResults;
|
564
|
+
[PracticeConfigKind.PracticeLayout]?: PracticeConfigPracticeLayout;
|
509
565
|
}
|
510
566
|
export interface Practice {
|
511
567
|
uuid: string;
|
@@ -176,7 +176,7 @@ export interface GroupedGenericQuestionData<T, A = IndexedData<ChoiceInputData>>
|
|
176
176
|
inlineLabel?: boolean;
|
177
177
|
order?: number;
|
178
178
|
}
|
179
|
-
export declare type QuestionData = GenericQuestionData<'title' | 'paragraph' | 'checkbox', void> | GenericQuestionData<'text' | 'text-area' | 'date' | 'number' | 'images' | 'body-parts' | 'pharmacy-picker' | 'online-pharmacy-picker' | 'place-address'> | GenericQuestionData<'images-alias', IndexedData<ChoiceInputData>, ImagesAliasQuestionOptions> | GenericQuestionData<'checkbox-group' | 'hair-loss-frontal' | 'select' | 'multiple' | 'text-select-group', IndexedData<ChoiceInputData>> | GroupedGenericQuestionData<'radio' | 'hair-selector-women' | 'hair-selector-men' | 'hair-loss-stage', IndexedData<RadioInputData>> | GroupedGenericQuestionData<'radio-card' | 'profile-selector', IndexedData<RadioCardInputData>> | GroupedGenericQuestionData<'language-picker', IndexedData<LanguagePickerData>> | GroupedGenericQuestionData<'tile-radio', IndexedData<TileRadioData>>;
|
179
|
+
export declare type QuestionData = GenericQuestionData<'title' | 'paragraph' | 'checkbox', void> | GenericQuestionData<'text' | 'text-area' | 'date' | 'number' | 'images' | 'body-parts' | 'pharmacy-picker' | 'online-pharmacy-picker' | 'place-address'> | GenericQuestionData<'images-alias', IndexedData<ChoiceInputData>, ImagesAliasQuestionOptions> | GenericQuestionData<'checkbox-group' | 'hair-loss-frontal' | 'select' | 'multiple' | 'text-select-group', IndexedData<ChoiceInputData>> | GroupedGenericQuestionData<'radio' | 'hair-selector-women' | 'hair-selector-men' | 'hair-loss-stage' | 'hair-loss-other', IndexedData<RadioInputData>> | GroupedGenericQuestionData<'radio-card' | 'profile-selector', IndexedData<RadioCardInputData>> | GroupedGenericQuestionData<'language-picker', IndexedData<LanguagePickerData>> | GroupedGenericQuestionData<'tile-radio', IndexedData<TileRadioData>>;
|
180
180
|
export interface FieldData {
|
181
181
|
type: 'field';
|
182
182
|
className?: string;
|
@@ -1164,6 +1164,8 @@ var VaultDataMissing = /*#__PURE__*/function (_Error8) {
|
|
1164
1164
|
PracticeConfigKind["PractitionerConsultList"] = "PractitionerConsultList";
|
1165
1165
|
PracticeConfigKind["PractitionerSearch"] = "PractitionerSearch";
|
1166
1166
|
PracticeConfigKind["PracticeRegisterWalkthrough"] = "PracticeRegisterWalkthrough";
|
1167
|
+
PracticeConfigKind["PracticeExamsAndResults"] = "PracticeExamsAndResults";
|
1168
|
+
PracticeConfigKind["PracticeLayout"] = "PracticeLayout";
|
1167
1169
|
})(exports.PracticeConfigKind || (exports.PracticeConfigKind = {}));
|
1168
1170
|
|
1169
1171
|
(function (StripePriceType) {
|
@@ -2392,17 +2394,17 @@ var PracticeService = /*#__PURE__*/function () {
|
|
2392
2394
|
* @param isoLocality (optional) the desired locality
|
2393
2395
|
* @param url_subdomain (optional) the url of the sub domain (@bruno-morel need you to document that)
|
2394
2396
|
* @param promotionCode (optional) promotion code to apply
|
2395
|
-
* @param
|
2397
|
+
* @param requestMetadata (optional) the request metadata to use. If defined, when payment service call our hooks in practice, it will use it to do required action (create a consult, refill a consult, etc.).
|
2396
2398
|
* @returns
|
2397
2399
|
*/
|
2398
2400
|
;
|
2399
2401
|
|
2400
|
-
_proto.practiceCreatePaymentsIntent = function practiceCreatePaymentsIntent(practiceUuid, planId, userEmail, isoLocality, url_subdomain,
|
2402
|
+
_proto.practiceCreatePaymentsIntent = function practiceCreatePaymentsIntent(practiceUuid, planId, userEmail, isoLocality, url_subdomain, requestMetadata) {
|
2401
2403
|
return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents/", {
|
2402
2404
|
idPlan: planId,
|
2403
2405
|
hashUserEmail: userEmail ? this.getPaymentIntentHashedEmail(userEmail) : undefined,
|
2404
2406
|
isoLocality: isoLocality,
|
2405
|
-
|
2407
|
+
requestMetadata: requestMetadata
|
2406
2408
|
}, {
|
2407
2409
|
params: {
|
2408
2410
|
url_subdomain: url_subdomain
|