oro-sdk-apis 6.0.2 → 6.3.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
@@ -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
|
/**
|
@@ -299,6 +320,11 @@ export interface WorkflowData {
|
|
299
320
|
*/
|
300
321
|
extendingWorkflow?: string
|
301
322
|
|
323
|
+
/**
|
324
|
+
* (optional) the extending referenced workflows `createdAt` timestamp
|
325
|
+
*/
|
326
|
+
extendingWorkflowTimestamp?: string
|
327
|
+
|
302
328
|
/**
|
303
329
|
* (optional) rules for the extension of another workflow
|
304
330
|
*/
|
@@ -366,7 +392,8 @@ export interface WorkflowUploadedImage {
|
|
366
392
|
* This interface describes a workflow prepared and ready to be sent to vault
|
367
393
|
*/
|
368
394
|
export interface PopulatedWorkflowField {
|
369
|
-
|
395
|
+
previousAnswer?: PreviousAnswerData // Answer from previous consultation
|
396
|
+
answer?: SelectedAnswerData | WorkflowUploadedImage[] // Actual answer from the workflow
|
370
397
|
displayedAnswer?: any // This answer is to be used only when it's impossible to get data from workflow
|
371
398
|
kind: string // If we don't store question. We will need that field to at least know the field type
|
372
399
|
}
|