oro-sdk-apis 6.0.2 → 6.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,6 +36,24 @@ export interface IndexedData<T> {
36
36
  }
37
37
  export declare type SelectedAnswerData = string | string[];
38
38
  export declare type SelectedAnswersData = IndexedData<SelectedAnswerData>[];
39
+ /**
40
+ * Tracking between the selected answers and the previous ones (if exist)
41
+ */
42
+ export interface PreviousAnswerData<T = (SelectedAnswerData | WorkflowUploadedImage[])> {
43
+ /**
44
+ * The answer from the previous consultation
45
+ */
46
+ previousAnswer: T;
47
+ /**
48
+ * The timestamp of when the previous answer was entered
49
+ */
50
+ timestamp?: Date;
51
+ /**
52
+ * Whether the value from the current answer and the previous answer has changed
53
+ */
54
+ changed: boolean;
55
+ }
56
+ export declare type PreviousAnswersData = IndexedData<PreviousAnswerData>[];
39
57
  export interface ChoiceInputData {
40
58
  text: string;
41
59
  className?: string;
@@ -230,6 +248,7 @@ export interface WorkflowData {
230
248
  summaryImageFieldName?: string;
231
249
  summarySymptomsFieldName?: string;
232
250
  selectedAnswers?: SelectedAnswersData;
251
+ previousAnswers?: PreviousAnswersData;
233
252
  serviceImage?: string;
234
253
  walkthroughSlides?: SlideData[];
235
254
  /**
@@ -248,6 +267,10 @@ export interface WorkflowData {
248
267
  * (optional) extension of another workflow referenced by uuid
249
268
  */
250
269
  extendingWorkflow?: string;
270
+ /**
271
+ * (optional) the extending referenced workflows `createdAt` timestamp
272
+ */
273
+ extendingWorkflowTimestamp?: string;
251
274
  /**
252
275
  * (optional) rules for the extension of another workflow
253
276
  */
@@ -310,7 +333,8 @@ export interface WorkflowUploadedImage {
310
333
  * This interface describes a workflow prepared and ready to be sent to vault
311
334
  */
312
335
  export interface PopulatedWorkflowField {
313
- answer: SelectedAnswerData | WorkflowUploadedImage[];
336
+ previousAnswer?: PreviousAnswerData;
337
+ answer?: SelectedAnswerData | WorkflowUploadedImage[];
314
338
  displayedAnswer?: any;
315
339
  kind: string;
316
340
  }