oro-sdk-apis 1.47.0 → 1.48.0
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
package/src/models/workflow.ts
CHANGED
@@ -78,9 +78,45 @@ export interface EntryData {
|
|
78
78
|
summaryHidden?: boolean
|
79
79
|
className?: string
|
80
80
|
/**
|
81
|
-
* This field represents a list of `selectedAnswers` that must be set for this entry to be displayed
|
81
|
+
* This field represents a list of `selectedAnswers` that must be set for this entry to be displayed using the followng logical combination of rules:
|
82
|
+
*
|
83
|
+
* #### Single string
|
84
|
+
*
|
85
|
+
* ```
|
86
|
+
* // Required: rule1
|
87
|
+
* rules: rule1
|
88
|
+
* ```
|
89
|
+
*
|
90
|
+
* #### Array of strings (AND is applied between statements):
|
91
|
+
*
|
92
|
+
* ```
|
93
|
+
* // Required: rule1 AND rule2
|
94
|
+
* rules: [ rule1, rule2 ]
|
95
|
+
* ```
|
96
|
+
*
|
97
|
+
* #### Array of arrays of strings (OR is applied between inner arrays. AND is applied between inner arrays statements)
|
98
|
+
*
|
99
|
+
* ```
|
100
|
+
* // Required: rule1 OR rule2
|
101
|
+
* rules: [
|
102
|
+
* [ rule1 ],
|
103
|
+
* [ rule2 ]
|
104
|
+
* ]
|
105
|
+
*
|
106
|
+
* // Required: rule1 OR (rule2 AND rule3)
|
107
|
+
* rules: [
|
108
|
+
* [ rule1 ],
|
109
|
+
* [ rule2, rule3 ]
|
110
|
+
* ]
|
111
|
+
*
|
112
|
+
* // THIS IS FORBIDDEN
|
113
|
+
* rules: [
|
114
|
+
* rule1, // <-- THIS IS FORBIDDEN. Instead use [ rule1 ]
|
115
|
+
* [ rule2, rule3 ]
|
116
|
+
* ]
|
117
|
+
* ```
|
82
118
|
*/
|
83
|
-
triggers?: string[]
|
119
|
+
triggers?: string[][] | string[] | string
|
84
120
|
/**
|
85
121
|
* This field represents a list of `StateTrigger` that must be fulfilled for this entry to be displayed.
|
86
122
|
*/
|
@@ -130,7 +166,7 @@ export interface ImagesAliasQuestionOptions {
|
|
130
166
|
/**
|
131
167
|
* Should display photo guide instructions or not
|
132
168
|
*/
|
133
|
-
|
169
|
+
photoGuide?: boolean
|
134
170
|
}
|
135
171
|
|
136
172
|
export interface GenericQuestionData<T, A = IndexedData<ChoiceInputData>, O = undefined> extends EntryData {
|
@@ -167,12 +203,14 @@ export declare type QuestionData =
|
|
167
203
|
| 'place-address'
|
168
204
|
>
|
169
205
|
| GenericQuestionData<'images-alias', IndexedData<ChoiceInputData>, ImagesAliasQuestionOptions>
|
170
|
-
| GenericQuestionData<
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
206
|
+
| GenericQuestionData<
|
207
|
+
'checkbox-group' | 'hair-loss-frontal' | 'select' | 'multiple' | 'text-select-group',
|
208
|
+
IndexedData<ChoiceInputData>
|
209
|
+
>
|
210
|
+
| GroupedGenericQuestionData<
|
211
|
+
'radio' | 'hair-selector-women' | 'hair-selector-men' | 'hair-loss-stage',
|
212
|
+
IndexedData<RadioInputData>
|
213
|
+
>
|
176
214
|
| GroupedGenericQuestionData<'radio-card' | 'profile-selector', IndexedData<RadioCardInputData>>
|
177
215
|
| GroupedGenericQuestionData<'language-picker', IndexedData<LanguagePickerData>>
|
178
216
|
|
@@ -258,4 +296,4 @@ export interface PopulatedWorkflowData {
|
|
258
296
|
workflowCreatedAt: string // The workflow version
|
259
297
|
locale?: string
|
260
298
|
fields: Record<string, PopulatedWorkflowField> // key corresponds to the QuestionData key in the workflow
|
261
|
-
}
|
299
|
+
}
|