oro-sdk-apis 1.24.0 → 1.26.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/README.md +2 -0
- package/dist/models/practice.d.ts +12 -5
- package/dist/models/workflow.d.ts +39 -3
- package/dist/oro-sdk-apis.cjs.development.js +4 -4
- 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 +4 -4
- package/dist/oro-sdk-apis.esm.js.map +1 -1
- package/dist/services/practice.d.ts +1 -1
- package/package.json +1 -1
- package/src/models/practice.ts +22 -7
- package/src/models/workflow.ts +41 -3
- package/src/services/practice.ts +1 -2
package/README.md
CHANGED
|
@@ -36,6 +36,8 @@ In all cases (node.js or app), you need to use:
|
|
|
36
36
|
npm run link:watch
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
+
Make sure that you are using the same version of node and npm in the SDK and in the service that you are trying to link.
|
|
40
|
+
|
|
39
41
|
### Publishing package
|
|
40
42
|
|
|
41
43
|
1. (Only first time) Locally run `npm login` and use the creds in 1password (tech-team-oro) . This will create ~/.npmrc . You will require a OTP but it's sent on tech@orohealth.me so you should all have it.
|
|
@@ -110,10 +110,11 @@ export interface PracticeAccount {
|
|
|
110
110
|
export declare enum PracticeConfigKind {
|
|
111
111
|
PractitionerConsultList = "PractitionerConsultList",
|
|
112
112
|
PractitionerChatbox = "PractitionerChatbox",
|
|
113
|
-
|
|
113
|
+
PracticeConfigExample = "PracticeConfigExample",
|
|
114
114
|
PracticeLocaleSwitcher = "PracticeLocaleSwitcher",
|
|
115
115
|
PracticeCookieBanner = "PracticeCookieBanner",
|
|
116
|
-
PracticePharmacyPicker = "PracticePharmacyPicker"
|
|
116
|
+
PracticePharmacyPicker = "PracticePharmacyPicker",
|
|
117
|
+
PracticeCssVariables = "PracticeCssVariables"
|
|
117
118
|
}
|
|
118
119
|
export interface PracticeConfig<K, T> {
|
|
119
120
|
uuidPractice: string;
|
|
@@ -147,10 +148,15 @@ export declare type PracticeConfigPracticeCookieBanner = PracticeConfig<Practice
|
|
|
147
148
|
policyLink?: string;
|
|
148
149
|
useOfCookieLink?: string;
|
|
149
150
|
}>;
|
|
150
|
-
export declare type
|
|
151
|
+
export declare type PracticeConfigPracticeConfigExample = PracticeConfig<PracticeConfigKind.PracticeConfigExample, {
|
|
151
152
|
primaryColor?: string;
|
|
152
153
|
}>;
|
|
153
|
-
|
|
154
|
+
/**
|
|
155
|
+
* This interface describes all practice css variables
|
|
156
|
+
* The keys should reflect the exact css name
|
|
157
|
+
*/
|
|
158
|
+
export declare type PracticeConfigPracticeCssVariables = PracticeConfig<PracticeConfigKind.PracticeCssVariables, Record<string, string>>;
|
|
159
|
+
export declare type PracticeConfigs = PracticeConfigPractitionerConsultList | PracticeConfigPractitionerChatbox | PracticeConfigPracticeLocaleSwitcher | PracticeConfigPracticeCookieBanner | PracticeConfigPracticeOnlinePharmacy | PracticeConfigPracticeCssVariables | PracticeConfigPracticeConfigExample;
|
|
154
160
|
export interface PracticeWorkflow {
|
|
155
161
|
id?: number;
|
|
156
162
|
uuidPractice: string;
|
|
@@ -331,10 +337,11 @@ export interface Practitioner {
|
|
|
331
337
|
export interface HydratedPracticeConfigs {
|
|
332
338
|
[PracticeConfigKind.PractitionerConsultList]?: PracticeConfigPractitionerConsultList;
|
|
333
339
|
[PracticeConfigKind.PractitionerChatbox]?: PracticeConfigPractitionerChatbox;
|
|
334
|
-
[PracticeConfigKind.
|
|
340
|
+
[PracticeConfigKind.PracticeConfigExample]?: PracticeConfigPracticeConfigExample;
|
|
335
341
|
[PracticeConfigKind.PracticeLocaleSwitcher]?: PracticeConfigPracticeLocaleSwitcher;
|
|
336
342
|
[PracticeConfigKind.PracticeCookieBanner]?: PracticeConfigPracticeCookieBanner;
|
|
337
343
|
[PracticeConfigKind.PracticePharmacyPicker]?: PracticeConfigPracticeOnlinePharmacy;
|
|
344
|
+
[PracticeConfigKind.PracticeCssVariables]?: PracticeConfigPracticeCssVariables;
|
|
338
345
|
}
|
|
339
346
|
export interface Practice {
|
|
340
347
|
uuid: string;
|
|
@@ -96,7 +96,25 @@ export declare enum MetadataCategory {
|
|
|
96
96
|
Prescription = "Prescription",
|
|
97
97
|
Raw = "Raw"
|
|
98
98
|
}
|
|
99
|
-
|
|
99
|
+
/**
|
|
100
|
+
* This interface describes all images-alias question kind options
|
|
101
|
+
*/
|
|
102
|
+
export interface ImagesAliasQuestionOptions {
|
|
103
|
+
/**
|
|
104
|
+
* Comma separated list of accepted formats. Will be given to the input html element.
|
|
105
|
+
* Use same format as described [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#accept)
|
|
106
|
+
*/
|
|
107
|
+
accept?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Should allow multiple uploads or not
|
|
110
|
+
*/
|
|
111
|
+
multiple?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Should display photo guide instructions or not
|
|
114
|
+
*/
|
|
115
|
+
photoGuide?: boolean;
|
|
116
|
+
}
|
|
117
|
+
export interface GenericQuestionData<T, A = IndexedData<ChoiceInputData>, O = undefined> extends EntryData {
|
|
100
118
|
kind: T;
|
|
101
119
|
metaCategory: MetadataCategory;
|
|
102
120
|
answers?: A;
|
|
@@ -104,13 +122,17 @@ export interface GenericQuestionData<T, A = IndexedData<ChoiceInputData>> extend
|
|
|
104
122
|
placeholder?: string;
|
|
105
123
|
defaultValue?: any;
|
|
106
124
|
value?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Options to forward to the workflow component
|
|
127
|
+
*/
|
|
128
|
+
options?: O;
|
|
107
129
|
}
|
|
108
130
|
export interface GroupedGenericQuestionData<T, A = IndexedData<ChoiceInputData>> extends GenericQuestionData<T, A> {
|
|
109
131
|
inline?: boolean;
|
|
110
132
|
inlineLabel?: boolean;
|
|
111
133
|
order?: number;
|
|
112
134
|
}
|
|
113
|
-
export declare type QuestionData = GenericQuestionData<'title' | 'paragraph' | 'checkbox', void> | GenericQuestionData<'text' | 'text-area' | 'date' | 'number' | 'images' | '
|
|
135
|
+
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' | 'select' | 'multiple' | 'text-select-group', IndexedData<ChoiceInputData>> | GroupedGenericQuestionData<'radio', IndexedData<RadioInputData>> | GroupedGenericQuestionData<'radio-card' | 'profile-selector', IndexedData<RadioCardInputData>> | GroupedGenericQuestionData<'language-picker', IndexedData<LanguagePickerData>>;
|
|
114
136
|
export interface FieldData {
|
|
115
137
|
type: 'field';
|
|
116
138
|
className?: string;
|
|
@@ -148,13 +170,27 @@ export interface WorkflowData {
|
|
|
148
170
|
walkthroughSlides?: SlideData[];
|
|
149
171
|
}
|
|
150
172
|
/**
|
|
151
|
-
* This interface describes
|
|
173
|
+
* This interface describes an upload of an image (could be a picture, a pdf, a text file, etc.)
|
|
152
174
|
*/
|
|
153
175
|
export interface WorkflowUploadedImage {
|
|
176
|
+
/**
|
|
177
|
+
* Depending on the driver used by WorkflowInput:
|
|
178
|
+
* - 'indexdb': will fetch the image in IndexDB with this id
|
|
179
|
+
* - 'vault': will fetch the image in the vault with this id
|
|
180
|
+
*/
|
|
154
181
|
idbId?: string;
|
|
182
|
+
/**
|
|
183
|
+
* The name of the image
|
|
184
|
+
*/
|
|
155
185
|
name: string;
|
|
186
|
+
/**
|
|
187
|
+
* the image data (could be a picture, a pdf, a text file, etc.)
|
|
188
|
+
*/
|
|
156
189
|
imageData?: string;
|
|
157
190
|
}
|
|
191
|
+
/**
|
|
192
|
+
* This interface describes a workflow prepared and ready to be sent to vault
|
|
193
|
+
*/
|
|
158
194
|
export interface PopulatedWorkflowField {
|
|
159
195
|
answer: SelectedAnswerData | WorkflowUploadedImage[];
|
|
160
196
|
displayedAnswer?: any;
|
|
@@ -1528,10 +1528,11 @@ var IdentityCreationConflict = /*#__PURE__*/function (_Error7) {
|
|
|
1528
1528
|
(function (PracticeConfigKind) {
|
|
1529
1529
|
PracticeConfigKind["PractitionerConsultList"] = "PractitionerConsultList";
|
|
1530
1530
|
PracticeConfigKind["PractitionerChatbox"] = "PractitionerChatbox";
|
|
1531
|
-
PracticeConfigKind["
|
|
1531
|
+
PracticeConfigKind["PracticeConfigExample"] = "PracticeConfigExample";
|
|
1532
1532
|
PracticeConfigKind["PracticeLocaleSwitcher"] = "PracticeLocaleSwitcher";
|
|
1533
1533
|
PracticeConfigKind["PracticeCookieBanner"] = "PracticeCookieBanner";
|
|
1534
1534
|
PracticeConfigKind["PracticePharmacyPicker"] = "PracticePharmacyPicker";
|
|
1535
|
+
PracticeConfigKind["PracticeCssVariables"] = "PracticeCssVariables";
|
|
1535
1536
|
})(exports.PracticeConfigKind || (exports.PracticeConfigKind = {}));
|
|
1536
1537
|
|
|
1537
1538
|
(function (StripePriceType) {
|
|
@@ -2711,7 +2712,7 @@ var PracticeService = /*#__PURE__*/function () {
|
|
|
2711
2712
|
*/
|
|
2712
2713
|
;
|
|
2713
2714
|
|
|
2714
|
-
_proto.practiceCreatePaymentsIntent = function practiceCreatePaymentsIntent(practiceUuid, planId, userEmail, isoLocality, url_subdomain,
|
|
2715
|
+
_proto.practiceCreatePaymentsIntent = function practiceCreatePaymentsIntent(practiceUuid, planId, userEmail, isoLocality, url_subdomain, consultRequest) {
|
|
2715
2716
|
return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents/", {
|
|
2716
2717
|
idPlan: planId,
|
|
2717
2718
|
hashUserEmail: userEmail ? this.getPaymentIntentHashedEmail(userEmail) : undefined,
|
|
@@ -2719,8 +2720,7 @@ var PracticeService = /*#__PURE__*/function () {
|
|
|
2719
2720
|
consultRequest: consultRequest
|
|
2720
2721
|
}, {
|
|
2721
2722
|
params: {
|
|
2722
|
-
url_subdomain: url_subdomain
|
|
2723
|
-
promotionCode: promotionCode
|
|
2723
|
+
url_subdomain: url_subdomain
|
|
2724
2724
|
}
|
|
2725
2725
|
});
|
|
2726
2726
|
};
|