oro-sdk-apis 6.0.1 → 6.1.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/consult.d.ts +1 -0
- package/dist/models/workflow.d.ts +21 -1
- package/dist/oro-sdk-apis.cjs.development.js +1 -0
- 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 +1 -0
- package/dist/oro-sdk-apis.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/models/consult.ts +1 -0
- package/src/models/workflow.ts +24 -2
package/package.json
CHANGED
package/src/models/consult.ts
CHANGED
package/src/models/workflow.ts
CHANGED
@@ -43,6 +43,26 @@ export interface IndexedData<T> {
|
|
43
43
|
export type SelectedAnswerData = string | string[]
|
44
44
|
export type SelectedAnswersData = IndexedData<SelectedAnswerData>[]
|
45
45
|
|
46
|
+
/**
|
47
|
+
* Tracking between the selected answers and the previous ones (if exist)
|
48
|
+
*/
|
49
|
+
export interface PreviousAnswerData<T = (SelectedAnswerData | WorkflowUploadedImage[])> {
|
50
|
+
/**
|
51
|
+
* The answer from the previous consultation
|
52
|
+
*/
|
53
|
+
previousAnswer: T
|
54
|
+
/**
|
55
|
+
* The timestamp of when the previous answer was entered
|
56
|
+
*/
|
57
|
+
timestamp?: Date
|
58
|
+
/**
|
59
|
+
* Whether the value from the current answer and the previous answer has changed
|
60
|
+
*/
|
61
|
+
changed: boolean
|
62
|
+
}
|
63
|
+
|
64
|
+
export type PreviousAnswersData = IndexedData<PreviousAnswerData>[]
|
65
|
+
|
46
66
|
export interface ChoiceInputData {
|
47
67
|
text: string
|
48
68
|
className?: string
|
@@ -278,7 +298,8 @@ export interface WorkflowData {
|
|
278
298
|
pages: WorkflowPageData[]
|
279
299
|
summaryImageFieldName?: string // this field is used to show the consult summary image
|
280
300
|
summarySymptomsFieldName?: string // this field is used to show the consult summary symptoms
|
281
|
-
selectedAnswers?: SelectedAnswersData
|
301
|
+
selectedAnswers?: SelectedAnswersData // all current answers
|
302
|
+
previousAnswers?: PreviousAnswersData // if exists, it is a 1-1 mapping of the selectedAnswers' previous values
|
282
303
|
serviceImage?: string
|
283
304
|
walkthroughSlides?: SlideData[]
|
284
305
|
/**
|
@@ -366,7 +387,8 @@ export interface WorkflowUploadedImage {
|
|
366
387
|
* This interface describes a workflow prepared and ready to be sent to vault
|
367
388
|
*/
|
368
389
|
export interface PopulatedWorkflowField {
|
369
|
-
|
390
|
+
previousAnswer?: PreviousAnswerData // Answer from previous consultation
|
391
|
+
answer?: SelectedAnswerData | WorkflowUploadedImage[] // Actual answer from the workflow
|
370
392
|
displayedAnswer?: any // This answer is to be used only when it's impossible to get data from workflow
|
371
393
|
kind: string // If we don't store question. We will need that field to at least know the field type
|
372
394
|
}
|