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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "6.0.1",
2
+ "version": "6.1.0",
3
3
  "main": "dist/index.js",
4
4
  "typings": "dist/index.d.ts",
5
5
  "files": [
@@ -56,6 +56,7 @@ export interface ConsultTransmission {
56
56
  }
57
57
 
58
58
  export enum ConsultType {
59
+ FollowUp = "FollowUp",
59
60
  Onboard = 'Onboard',
60
61
  Refill = 'Refill',
61
62
  }
@@ -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
- answer: SelectedAnswerData | WorkflowUploadedImage[] // Actual answer from the workflow
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
  }