oro-sdk-apis 1.24.1 → 1.27.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 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
- PracticeTheme = "PracticeTheme",
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;
@@ -124,6 +125,7 @@ export declare type PracticeConfigPractitionerConsultList = PracticeConfig<Pract
124
125
  hideLocality?: boolean;
125
126
  hideFax?: boolean;
126
127
  hideExpiresAt?: boolean;
128
+ showExpirationInDays?: boolean;
127
129
  }>;
128
130
  export declare type PracticeConfigPracticeLocaleSwitcher = PracticeConfig<PracticeConfigKind.PracticeLocaleSwitcher, {
129
131
  hideLocaleSwitcher?: boolean;
@@ -147,10 +149,15 @@ export declare type PracticeConfigPracticeCookieBanner = PracticeConfig<Practice
147
149
  policyLink?: string;
148
150
  useOfCookieLink?: string;
149
151
  }>;
150
- export declare type PracticeConfigPracticeTheme = PracticeConfig<PracticeConfigKind.PracticeTheme, {
152
+ export declare type PracticeConfigPracticeConfigExample = PracticeConfig<PracticeConfigKind.PracticeConfigExample, {
151
153
  primaryColor?: string;
152
154
  }>;
153
- export declare type PracticeConfigs = PracticeConfigPractitionerConsultList | PracticeConfigPractitionerChatbox | PracticeConfigPracticeLocaleSwitcher | PracticeConfigPracticeCookieBanner | PracticeConfigPracticeOnlinePharmacy | PracticeConfigPracticeTheme;
155
+ /**
156
+ * This interface describes all practice css variables
157
+ * The keys should reflect the exact css name
158
+ */
159
+ export declare type PracticeConfigPracticeCssVariables = PracticeConfig<PracticeConfigKind.PracticeCssVariables, Record<string, string>>;
160
+ export declare type PracticeConfigs = PracticeConfigPractitionerConsultList | PracticeConfigPractitionerChatbox | PracticeConfigPracticeLocaleSwitcher | PracticeConfigPracticeCookieBanner | PracticeConfigPracticeOnlinePharmacy | PracticeConfigPracticeCssVariables | PracticeConfigPracticeConfigExample;
154
161
  export interface PracticeWorkflow {
155
162
  id?: number;
156
163
  uuidPractice: string;
@@ -331,10 +338,11 @@ export interface Practitioner {
331
338
  export interface HydratedPracticeConfigs {
332
339
  [PracticeConfigKind.PractitionerConsultList]?: PracticeConfigPractitionerConsultList;
333
340
  [PracticeConfigKind.PractitionerChatbox]?: PracticeConfigPractitionerChatbox;
334
- [PracticeConfigKind.PracticeTheme]?: PracticeConfigPracticeTheme;
341
+ [PracticeConfigKind.PracticeConfigExample]?: PracticeConfigPracticeConfigExample;
335
342
  [PracticeConfigKind.PracticeLocaleSwitcher]?: PracticeConfigPracticeLocaleSwitcher;
336
343
  [PracticeConfigKind.PracticeCookieBanner]?: PracticeConfigPracticeCookieBanner;
337
344
  [PracticeConfigKind.PracticePharmacyPicker]?: PracticeConfigPracticeOnlinePharmacy;
345
+ [PracticeConfigKind.PracticeCssVariables]?: PracticeConfigPracticeCssVariables;
338
346
  }
339
347
  export interface Practice {
340
348
  uuid: string;
@@ -96,7 +96,25 @@ export declare enum MetadataCategory {
96
96
  Prescription = "Prescription",
97
97
  Raw = "Raw"
98
98
  }
99
- export interface GenericQuestionData<T, A = IndexedData<ChoiceInputData>> extends EntryData {
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' | 'images-alias' | 'body-parts' | 'pharmacy-picker' | 'online-pharmacy-picker' | 'place-address'> | 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>>;
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 a workflow prepared and ready to be sent to vault
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["PracticeTheme"] = "PracticeTheme";
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) {