oro-sdk-apis 1.18.0 → 1.19.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
|
@@ -1,3 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This type represents all the patient profile kind
|
|
3
|
+
*/
|
|
4
|
+
export type ProfileKind = 'myself' | 'child' | 'other'
|
|
5
|
+
/**
|
|
6
|
+
* this type is done as an example on how to add another data kind
|
|
7
|
+
*/
|
|
8
|
+
export type OtherKind = 'otherKindOfType'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* This type represents all the kind a data that can define `ChoiceInputData` (`OtherKind` is here only as an example on how to add a new kind)
|
|
12
|
+
*/
|
|
13
|
+
export type AllChoiceInputDataKind = ProfileKind | OtherKind
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* This interface represents a `StateTrigger` on selected profile kind
|
|
17
|
+
*/
|
|
18
|
+
export interface ProfileTrigger {
|
|
19
|
+
kind: 'profileTrigger'
|
|
20
|
+
value: ProfileKind
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* This interface is meant as an example of another kind of `StateTrigger`
|
|
25
|
+
*/
|
|
26
|
+
export interface OtherTrigger {
|
|
27
|
+
kind: 'otherTrigger'
|
|
28
|
+
field1: number
|
|
29
|
+
field2: string
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* This type represents all the state triggers that are defined.
|
|
34
|
+
*
|
|
35
|
+
* A state trigger is triggered onto app states. In other words, it is for triggers that cannot be defined thanks to pure workflow answers.
|
|
36
|
+
*/
|
|
37
|
+
export type StateTrigger = ProfileTrigger | OtherTrigger
|
|
38
|
+
|
|
1
39
|
export interface IndexedData<T> {
|
|
2
40
|
[key: string]: T
|
|
3
41
|
}
|
|
@@ -9,6 +47,8 @@ export interface ChoiceInputData {
|
|
|
9
47
|
text: string
|
|
10
48
|
className?: string
|
|
11
49
|
order?: number
|
|
50
|
+
/** If defined, the choice input contains a kind that can be used into app. For instance, to check if a specific `kind` of answer has been selected */
|
|
51
|
+
kind?: AllChoiceInputDataKind
|
|
12
52
|
}
|
|
13
53
|
|
|
14
54
|
export interface RadioInputIconOptionsData {
|
|
@@ -37,7 +77,14 @@ export interface EntryData {
|
|
|
37
77
|
summaryLabel?: string
|
|
38
78
|
summaryHidden?: boolean
|
|
39
79
|
className?: string
|
|
80
|
+
/**
|
|
81
|
+
* This field represents a list of `selectedAnswers` that must be set for this entry to be displayed.
|
|
82
|
+
*/
|
|
40
83
|
triggers?: string[]
|
|
84
|
+
/**
|
|
85
|
+
* This field represents a list of `StateTrigger` that must be fulfilled for this entry to be displayed.
|
|
86
|
+
*/
|
|
87
|
+
stateTriggers?: StateTrigger[]
|
|
41
88
|
}
|
|
42
89
|
|
|
43
90
|
export interface SlideData {
|
|
@@ -80,8 +127,23 @@ export interface GroupedGenericQuestionData<T, A = IndexedData<ChoiceInputData>>
|
|
|
80
127
|
order?: number
|
|
81
128
|
}
|
|
82
129
|
|
|
83
|
-
export declare type QuestionData =
|
|
84
|
-
|
|
130
|
+
export declare type QuestionData =
|
|
131
|
+
| GenericQuestionData<'title' | 'paragraph' | 'checkbox', void>
|
|
132
|
+
| GenericQuestionData<
|
|
133
|
+
| 'text'
|
|
134
|
+
| 'text-area'
|
|
135
|
+
| 'date'
|
|
136
|
+
| 'number'
|
|
137
|
+
| 'images'
|
|
138
|
+
| 'images-alias'
|
|
139
|
+
| 'body-parts'
|
|
140
|
+
| 'pharmacy-picker'
|
|
141
|
+
| 'place-address'
|
|
142
|
+
>
|
|
143
|
+
| GenericQuestionData<'checkbox-group' | 'select' | 'multiple' | 'text-select-group', IndexedData<ChoiceInputData>>
|
|
144
|
+
| GroupedGenericQuestionData<'radio', IndexedData<RadioInputData>>
|
|
145
|
+
| GroupedGenericQuestionData<'radio-card', IndexedData<RadioCardInputData>>
|
|
146
|
+
| GroupedGenericQuestionData<'language-picker', IndexedData<LanguagePickerData>>
|
|
85
147
|
|
|
86
148
|
export interface FieldData {
|
|
87
149
|
type: 'field'
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021 ORO Health Inc.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|