oro-sdk-apis 1.25.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/package.json
CHANGED
package/src/models/workflow.ts
CHANGED
|
@@ -111,7 +111,26 @@ export enum MetadataCategory { //these are generic metadata categories
|
|
|
111
111
|
Raw = 'Raw',
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
/**
|
|
115
|
+
* This interface describes all images-alias question kind options
|
|
116
|
+
*/
|
|
117
|
+
export interface ImagesAliasQuestionOptions {
|
|
118
|
+
/**
|
|
119
|
+
* Comma separated list of accepted formats. Will be given to the input html element.
|
|
120
|
+
* Use same format as described [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#accept)
|
|
121
|
+
*/
|
|
122
|
+
accept?: string
|
|
123
|
+
/**
|
|
124
|
+
* Should allow multiple uploads or not
|
|
125
|
+
*/
|
|
126
|
+
multiple?: boolean
|
|
127
|
+
/**
|
|
128
|
+
* Should display photo guide instructions or not
|
|
129
|
+
*/
|
|
130
|
+
photoGuide?: boolean
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface GenericQuestionData<T, A = IndexedData<ChoiceInputData>, O = undefined> extends EntryData {
|
|
115
134
|
kind: T
|
|
116
135
|
metaCategory: MetadataCategory
|
|
117
136
|
answers?: A
|
|
@@ -119,6 +138,10 @@ export interface GenericQuestionData<T, A = IndexedData<ChoiceInputData>> extend
|
|
|
119
138
|
placeholder?: string
|
|
120
139
|
defaultValue?: any
|
|
121
140
|
value?: string
|
|
141
|
+
/**
|
|
142
|
+
* Options to forward to the workflow component
|
|
143
|
+
*/
|
|
144
|
+
options?: O
|
|
122
145
|
}
|
|
123
146
|
|
|
124
147
|
export interface GroupedGenericQuestionData<T, A = IndexedData<ChoiceInputData>> extends GenericQuestionData<T, A> {
|
|
@@ -135,12 +158,12 @@ export declare type QuestionData =
|
|
|
135
158
|
| 'date'
|
|
136
159
|
| 'number'
|
|
137
160
|
| 'images'
|
|
138
|
-
| 'images-alias'
|
|
139
161
|
| 'body-parts'
|
|
140
162
|
| 'pharmacy-picker'
|
|
141
163
|
| 'online-pharmacy-picker'
|
|
142
164
|
| 'place-address'
|
|
143
165
|
>
|
|
166
|
+
| GenericQuestionData<'images-alias', IndexedData<ChoiceInputData>, ImagesAliasQuestionOptions>
|
|
144
167
|
| GenericQuestionData<'checkbox-group' | 'select' | 'multiple' | 'text-select-group', IndexedData<ChoiceInputData>>
|
|
145
168
|
| GroupedGenericQuestionData<'radio', IndexedData<RadioInputData>>
|
|
146
169
|
| GroupedGenericQuestionData<'radio-card' | 'profile-selector', IndexedData<RadioCardInputData>>
|
|
@@ -187,13 +210,28 @@ export interface WorkflowData {
|
|
|
187
210
|
}
|
|
188
211
|
|
|
189
212
|
/**
|
|
190
|
-
* This interface describes
|
|
213
|
+
* This interface describes an upload of an image (could be a picture, a pdf, a text file, etc.)
|
|
191
214
|
*/
|
|
192
215
|
export interface WorkflowUploadedImage {
|
|
216
|
+
/**
|
|
217
|
+
* Depending on the driver used by WorkflowInput:
|
|
218
|
+
* - 'indexdb': will fetch the image in IndexDB with this id
|
|
219
|
+
* - 'vault': will fetch the image in the vault with this id
|
|
220
|
+
*/
|
|
193
221
|
idbId?: string
|
|
222
|
+
/**
|
|
223
|
+
* The name of the image
|
|
224
|
+
*/
|
|
194
225
|
name: string
|
|
226
|
+
/**
|
|
227
|
+
* the image data (could be a picture, a pdf, a text file, etc.)
|
|
228
|
+
*/
|
|
195
229
|
imageData?: string
|
|
196
230
|
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* This interface describes a workflow prepared and ready to be sent to vault
|
|
234
|
+
*/
|
|
197
235
|
export interface PopulatedWorkflowField {
|
|
198
236
|
answer: SelectedAnswerData | WorkflowUploadedImage[] // Actual answer from the workflow
|
|
199
237
|
displayedAnswer?: any // This answer is to be used only when it's impossible to get data from workflow
|