oro-sdk-apis 1.18.0 → 1.20.1
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/dist/models/guard.d.ts +1 -1
- package/dist/models/workflow.d.ts +46 -0
- package/dist/oro-sdk-apis.cjs.development.js.map +1 -1
- package/dist/oro-sdk-apis.cjs.production.min.js.map +1 -1
- package/dist/oro-sdk-apis.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/models/guard.ts +1 -1
- package/src/models/workflow.ts +68 -2
package/package.json
CHANGED
package/src/models/guard.ts
CHANGED
|
@@ -148,6 +148,6 @@ export interface LegalData {
|
|
|
148
148
|
|
|
149
149
|
export type RoleBasedScopes = AllRoleType
|
|
150
150
|
|
|
151
|
-
export type PermissionBasedScopes = 'consult.consults.get' | 'consult.consults.post' | 'practice.assignments.post'
|
|
151
|
+
export type PermissionBasedScopes = 'consult.consults.get' | 'consult.consults.post' | 'practice.assignments.post' | 'practice.configs.get' | 'teller.emails.post'
|
|
152
152
|
|
|
153
153
|
export type AllScopes = RoleBasedScopes | PermissionBasedScopes
|
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'
|
|
@@ -105,6 +167,10 @@ export interface WorkflowPageData {
|
|
|
105
167
|
questions: IndexedData<QuestionData>
|
|
106
168
|
title?: string
|
|
107
169
|
triggers?: string[]
|
|
170
|
+
/**
|
|
171
|
+
* This field represents a list of `ids` which will be spliced from the workflow groups and inserted into a designated location
|
|
172
|
+
*/
|
|
173
|
+
prioritizeIds?: string[]
|
|
108
174
|
}
|
|
109
175
|
|
|
110
176
|
export interface WorkflowData {
|