asma-types 2.0.52 → 2.0.53
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 +4 -1
- package/.prettierrc +0 -15
- package/.vscode/settings.json +0 -14
- package/cspell.json +0 -118
- package/src/index.ts +0 -6
- package/src/interfaces/api/advoca/ISaveToDataBase.ts +0 -18
- package/src/interfaces/api/advoca/IUploadedDocument.ts +0 -24
- package/src/interfaces/artifactEnums.ts +0 -59
- package/src/interfaces/enums.ts +0 -573
- package/src/interfaces/jwtClaims.ts +0 -88
- package/src/utilities/OneOf.ts +0 -31
- package/src/utilities/index.ts +0 -3
- package/src/utilities/valueof.type.ts +0 -1
- package/tsconfig.json +0 -83
package/package.json
CHANGED
package/.prettierrc
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"bracketSpacing": true,
|
|
3
|
-
"endOfLine": "auto",
|
|
4
|
-
"htmlWhitespaceSensitivity": "css",
|
|
5
|
-
"proseWrap": "preserve",
|
|
6
|
-
"trailingComma": "all",
|
|
7
|
-
"useTabs": false,
|
|
8
|
-
"tabWidth": 4,
|
|
9
|
-
"semi": false,
|
|
10
|
-
"singleQuote": true,
|
|
11
|
-
"jsxSingleQuote": true,
|
|
12
|
-
"jsxBracketSameLine": false,
|
|
13
|
-
"arrowParens": "always",
|
|
14
|
-
"printWidth": 120
|
|
15
|
-
}
|
package/.vscode/settings.json
DELETED
package/cspell.json
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Version of the setting file. Always 0.2
|
|
3
|
-
"version": "0.2",
|
|
4
|
-
// language - current active spelling language
|
|
5
|
-
"language": "en, nb, nb-NO",
|
|
6
|
-
// words - list of words to be always considered correct
|
|
7
|
-
"words": [
|
|
8
|
-
"actno",
|
|
9
|
-
"adcuris",
|
|
10
|
-
"adonisjs",
|
|
11
|
-
"ADOPUS",
|
|
12
|
-
"advoca",
|
|
13
|
-
"akar",
|
|
14
|
-
"antd",
|
|
15
|
-
"Antrd",
|
|
16
|
-
"Arbeidoginkludering",
|
|
17
|
-
"ASMA",
|
|
18
|
-
"Atrd",
|
|
19
|
-
"authtype",
|
|
20
|
-
"avans",
|
|
21
|
-
"bdhbsh",
|
|
22
|
-
"carasent",
|
|
23
|
-
"Cardea",
|
|
24
|
-
"clsx",
|
|
25
|
-
"contenteditable",
|
|
26
|
-
"datatest",
|
|
27
|
-
"DDTHH",
|
|
28
|
-
"Deltakeransvarlig",
|
|
29
|
-
"descr",
|
|
30
|
-
"devextreme",
|
|
31
|
-
"didnt",
|
|
32
|
-
"dtstart",
|
|
33
|
-
"enumtrigger",
|
|
34
|
-
"fluentui",
|
|
35
|
-
"fretex",
|
|
36
|
-
"genql",
|
|
37
|
-
"geocode",
|
|
38
|
-
"googlebot",
|
|
39
|
-
"hasura",
|
|
40
|
-
"headlessui",
|
|
41
|
-
"iconfont",
|
|
42
|
-
"iconify",
|
|
43
|
-
"Iframes",
|
|
44
|
-
"ilike",
|
|
45
|
-
"IUUID",
|
|
46
|
-
"jobbkonsulent",
|
|
47
|
-
"jobbkonsulenten",
|
|
48
|
-
"letsencrypt",
|
|
49
|
-
"liga",
|
|
50
|
-
"loglevel",
|
|
51
|
-
"mertasan",
|
|
52
|
-
"Mfes",
|
|
53
|
-
"microapp",
|
|
54
|
-
"millis",
|
|
55
|
-
"multiversion",
|
|
56
|
-
"myside",
|
|
57
|
-
"navlink",
|
|
58
|
-
"Nbid",
|
|
59
|
-
"nonprod",
|
|
60
|
-
"oidc",
|
|
61
|
-
"openreplay",
|
|
62
|
-
"opentype",
|
|
63
|
-
"pades",
|
|
64
|
-
"pkey",
|
|
65
|
-
"predef",
|
|
66
|
-
"preprod",
|
|
67
|
-
"qiankun",
|
|
68
|
-
"Qnrs",
|
|
69
|
-
"registrator",
|
|
70
|
-
"revman",
|
|
71
|
-
"rrule",
|
|
72
|
-
"Sekundaeransvarlig",
|
|
73
|
-
"showable",
|
|
74
|
-
"signicat",
|
|
75
|
-
"signin",
|
|
76
|
-
"skjemaet",
|
|
77
|
-
"Snaphsots",
|
|
78
|
-
"soknad",
|
|
79
|
-
"soknadid",
|
|
80
|
-
"srvproxy",
|
|
81
|
-
"stylelint",
|
|
82
|
-
"subquestion",
|
|
83
|
-
"svgr",
|
|
84
|
-
"tailwindcss",
|
|
85
|
-
"Tiltak",
|
|
86
|
-
"truetype",
|
|
87
|
-
"twotone",
|
|
88
|
-
"voca"
|
|
89
|
-
],
|
|
90
|
-
"ignorePaths": [
|
|
91
|
-
"package-lock.json",
|
|
92
|
-
"node_modules",
|
|
93
|
-
"vscode-extension",
|
|
94
|
-
".git/objects",
|
|
95
|
-
".vscode",
|
|
96
|
-
".vscode-insiders",
|
|
97
|
-
"cspell.json",
|
|
98
|
-
"dist",
|
|
99
|
-
"yarn*",
|
|
100
|
-
"*norwegian_postal_codes*",
|
|
101
|
-
"target/npmlist.json",
|
|
102
|
-
"img",
|
|
103
|
-
"*.backup",
|
|
104
|
-
//TODO this is temporary shall be removed when all misspellings are fixed in .scss files
|
|
105
|
-
"*.scss",
|
|
106
|
-
//TODO this is temporary as well need to fix all misspellings
|
|
107
|
-
"tailwind.config.js"
|
|
108
|
-
],
|
|
109
|
-
"import": [
|
|
110
|
-
"@cspell/dict-nb-no/cspell-ext.json"
|
|
111
|
-
],
|
|
112
|
-
"ignoreRegExpList": [
|
|
113
|
-
"enum.*"
|
|
114
|
-
]
|
|
115
|
-
// flagWords - list of words to be always considered incorrect
|
|
116
|
-
// This is useful for offensive words and common spelling errors.
|
|
117
|
-
// For example "hte" should be "the"
|
|
118
|
-
}
|
package/src/index.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export type { IUploadedDocument } from './interfaces/api/advoca/IUploadedDocument.js'
|
|
2
|
-
export type { IFeedBack, ISaveToDataBase } from './interfaces/api/advoca/ISaveToDataBase.js'
|
|
3
|
-
export * from './interfaces/jwtClaims.js'
|
|
4
|
-
export * from './interfaces/enums.js'
|
|
5
|
-
export * from './interfaces/artifactEnums.js'
|
|
6
|
-
export * from './utilities/index.js'
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export interface ISaveToDataBase {
|
|
2
|
-
method: string
|
|
3
|
-
json: string
|
|
4
|
-
uuid: string | undefined
|
|
5
|
-
feedback: IFeedBack
|
|
6
|
-
url: string
|
|
7
|
-
origin?: {
|
|
8
|
-
method: string
|
|
9
|
-
// history: any
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface IFeedBack {
|
|
14
|
-
error?: string
|
|
15
|
-
type: string
|
|
16
|
-
message: string
|
|
17
|
-
show_time: number
|
|
18
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export interface IUploadedDocument {
|
|
2
|
-
created_at: string
|
|
3
|
-
customer: {
|
|
4
|
-
comm_consents_descr: string
|
|
5
|
-
contact_email: string
|
|
6
|
-
contact_message: string
|
|
7
|
-
contact_tel: string
|
|
8
|
-
|
|
9
|
-
id: number
|
|
10
|
-
logo: string
|
|
11
|
-
name: string
|
|
12
|
-
updated_at: string
|
|
13
|
-
}
|
|
14
|
-
customer_id: number
|
|
15
|
-
id: number
|
|
16
|
-
name: string
|
|
17
|
-
path: string
|
|
18
|
-
patientIds: { id: number; soknad_id: string }[]
|
|
19
|
-
region: number
|
|
20
|
-
sds_id: number
|
|
21
|
-
updated_at: string
|
|
22
|
-
upload_patient_id: number
|
|
23
|
-
success: string
|
|
24
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { ValueOf } from '../utilities/valueof.type.js'
|
|
2
|
-
|
|
3
|
-
export enum ArtifactPresenterTypes {
|
|
4
|
-
Qnr = 'Questionnaire',
|
|
5
|
-
DocumentProxy = 'DocumentProxy',
|
|
6
|
-
DocumentConnector = 'DocumentConnector',
|
|
7
|
-
DocumentOutlook = 'DocumentOutlook',
|
|
8
|
-
ArtifactPackage = 'ArtifactPackage',
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export enum FileExtension {
|
|
12
|
-
ZIP = 'zip',
|
|
13
|
-
XLSX = 'xlsx',
|
|
14
|
-
XLS = 'xls',
|
|
15
|
-
TXT = 'txt',
|
|
16
|
-
RAR = 'rar',
|
|
17
|
-
PPTX = 'pptx',
|
|
18
|
-
PPT = 'ppt',
|
|
19
|
-
PNG = 'png',
|
|
20
|
-
WEBP = 'webp',
|
|
21
|
-
PDF = 'pdf',
|
|
22
|
-
SVG = 'svg',
|
|
23
|
-
ODT = 'odt',
|
|
24
|
-
JPG = 'jpg',
|
|
25
|
-
JPEG = 'jpeg',
|
|
26
|
-
GIF = 'gif',
|
|
27
|
-
DOCX = 'docx',
|
|
28
|
-
DOC = 'doc',
|
|
29
|
-
APP = 'app',
|
|
30
|
-
RTF = 'rtf',
|
|
31
|
-
HTML = 'html',
|
|
32
|
-
UNKNOWN = 'unknown',
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export const ScheduleFormat = {
|
|
36
|
-
ONE_TIME: 'one_time',
|
|
37
|
-
DAILY: 'daily',
|
|
38
|
-
WEEKLY: 'weekly',
|
|
39
|
-
MONTHLY: 'monthly',
|
|
40
|
-
} as const
|
|
41
|
-
|
|
42
|
-
export type ScheduleFormatType = ValueOf<typeof ScheduleFormat>
|
|
43
|
-
|
|
44
|
-
export const ArtifactPackageStatus = {
|
|
45
|
-
ACTIVE: 'active',
|
|
46
|
-
CANCELED: 'canceled',
|
|
47
|
-
FINISHED: 'finished',
|
|
48
|
-
} as const
|
|
49
|
-
|
|
50
|
-
export type IArtifactPackageStatus = ValueOf<typeof ArtifactPackageStatus>
|
|
51
|
-
|
|
52
|
-
export type SelectedArtifact = `id:${string}.type:${'doc' | 'doc_connector' | 'qnr'}.patient_id:${string}`
|
|
53
|
-
|
|
54
|
-
export enum AnonymousQnrInvitationTypes {
|
|
55
|
-
CODE = '#CODE#',
|
|
56
|
-
URL = '#URL#',
|
|
57
|
-
NAME = '#NAME#',
|
|
58
|
-
ACTIVITY_ID = '#ACTIVITY_ID#',
|
|
59
|
-
}
|
package/src/interfaces/enums.ts
DELETED
|
@@ -1,573 +0,0 @@
|
|
|
1
|
-
// deprecated, replaced with QueriesInitiator
|
|
2
|
-
|
|
3
|
-
import type { ValueOf } from '../utilities'
|
|
4
|
-
import type { SelectedArtifact } from './artifactEnums.js'
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated replaced with QueriesInitiator
|
|
8
|
-
*/
|
|
9
|
-
export enum InitiatorTypes {
|
|
10
|
-
Customer = 'customer',
|
|
11
|
-
Patient = 'patient',
|
|
12
|
-
SelfCompletable = 'self-completable',
|
|
13
|
-
}
|
|
14
|
-
// deprecated, replaced with TemplatesContext
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated replaced with TemplatesContext
|
|
17
|
-
*/
|
|
18
|
-
export enum QnrContextTypes {
|
|
19
|
-
Advoca = 'advoca',
|
|
20
|
-
Portal = 'portal',
|
|
21
|
-
Outlook = 'outlook',
|
|
22
|
-
}
|
|
23
|
-
export enum DocSignicatSignStatusTypes {
|
|
24
|
-
Completed = 'completed',
|
|
25
|
-
Rejected = 'rejected',
|
|
26
|
-
Waiting = 'waiting',
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export enum DocProxyStatusTypes {
|
|
30
|
-
Signed = 'signed',
|
|
31
|
-
WaitingForSigning = 'waiting_for_signing',
|
|
32
|
-
OnlyForView = 'only_for_view',
|
|
33
|
-
/* download = 'download',
|
|
34
|
-
uploaded = 'uploaded' */
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export enum AsyncChatArtifactExtension {
|
|
38
|
-
DOC = 'doc',
|
|
39
|
-
DOCX = 'docx',
|
|
40
|
-
JPEG = 'jpeg',
|
|
41
|
-
JPG = 'jpg',
|
|
42
|
-
PDF = 'pdf',
|
|
43
|
-
PNG = 'png',
|
|
44
|
-
WEBP = 'webp',
|
|
45
|
-
UNKNOWN = 'unknown',
|
|
46
|
-
}
|
|
47
|
-
export enum QuestionTypes {
|
|
48
|
-
BooleanQuestion = 'BooleanQuestion',
|
|
49
|
-
CheckBoxes = 'CheckBoxes',
|
|
50
|
-
CompositeQuestion = 'CompositeQuestion',
|
|
51
|
-
DateField = 'DateField',
|
|
52
|
-
Dropdown = 'Dropdown',
|
|
53
|
-
FormatNumber = 'FormatNumber',
|
|
54
|
-
LinearScale = 'LinearScale',
|
|
55
|
-
Link = 'Link',
|
|
56
|
-
RadioButtons = 'RadioButtons',
|
|
57
|
-
TextLong = 'TextLong',
|
|
58
|
-
TextShort = 'TextShort',
|
|
59
|
-
Emoticons = 'Emoticons',
|
|
60
|
-
DocumentUpload = 'DocumentUpload',
|
|
61
|
-
Readonly = 'Readonly',
|
|
62
|
-
ExpressionQuestion = 'ExpressionQuestion',
|
|
63
|
-
Chart = 'Chart',
|
|
64
|
-
Widget = 'Widget',
|
|
65
|
-
Space = 'Space',
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export enum ActorTypes {
|
|
69
|
-
Mappable = 'mappable',
|
|
70
|
-
Custom = 'custom',
|
|
71
|
-
Complex = 'complex',
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export enum ConsentsGroupTypes {
|
|
75
|
-
General = 'GENERAL',
|
|
76
|
-
Query = 'QUERY',
|
|
77
|
-
Communication = 'COMMUNICATION',
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export enum ConsentsTypeTypes {
|
|
81
|
-
Mandatory = 'MANDATORY',
|
|
82
|
-
Optional = 'OPTIONAL',
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export enum DocumentPatientSecurityLevelTypes {
|
|
86
|
-
ONE = '1',
|
|
87
|
-
TWO = '2',
|
|
88
|
-
THREE = '3',
|
|
89
|
-
FOUR = '4',
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export enum QueriesStatusTypes {
|
|
93
|
-
InBound = 'INBOUND',
|
|
94
|
-
InProgress = 'IN_PROGRESS',
|
|
95
|
-
AwaitingReply = 'AWAITING_REPLY',
|
|
96
|
-
Expired = 'EXPIRED',
|
|
97
|
-
Completed = 'COMPLETED',
|
|
98
|
-
Processed = 'PROCESSED',
|
|
99
|
-
Rejected = 'REJECTED',
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export enum QueriesInitiatorTypes {
|
|
103
|
-
Patient = 'PATIENT',
|
|
104
|
-
Customer = 'CUSTOMER',
|
|
105
|
-
SelfCompletable = 'SELFCOMPLETABLE',
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export enum SmsTemplatesCategoryTypes {
|
|
109
|
-
Info = 'INFO',
|
|
110
|
-
Reject = 'REJECT',
|
|
111
|
-
NewChat = 'NEW_CHAT',
|
|
112
|
-
UnseenNotifications = 'UNSEEN_NOTIFICATIONS',
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export enum TemplatesContextTypes {
|
|
116
|
-
Advoca = 'ADVOCA',
|
|
117
|
-
Portal = 'PORTAL',
|
|
118
|
-
Outlook = 'OUTLOOK',
|
|
119
|
-
Start = 'START',
|
|
120
|
-
Research = 'RESEARCH',
|
|
121
|
-
Plan = 'PLAN',
|
|
122
|
-
Summary = 'SUMMARY',
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export enum TemplatesAccessibleTypes {
|
|
126
|
-
Patient = 'PATIENT',
|
|
127
|
-
Customer = 'CUSTOMER',
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/* export enum InitiatorTypes {
|
|
131
|
-
Customer = 'customer',
|
|
132
|
-
Patient = 'patient',
|
|
133
|
-
SelfCompletable = 'self-completable',
|
|
134
|
-
} */
|
|
135
|
-
|
|
136
|
-
export enum DocumentTypes {
|
|
137
|
-
individual = 'individual',
|
|
138
|
-
group = 'group',
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/* export enum EprTypes {
|
|
142
|
-
ADOPUS = 'ADOPUS',
|
|
143
|
-
} */
|
|
144
|
-
|
|
145
|
-
export enum QuestionStateTypes {
|
|
146
|
-
ForAllTemplates = 'ForAllTemplates',
|
|
147
|
-
}
|
|
148
|
-
/* export enum QnrStatusTypes {
|
|
149
|
-
Inbound = 'INBOUND',
|
|
150
|
-
AwaitingReply = 'AWAITING_REPLY',
|
|
151
|
-
InProgress = 'IN_PROGRESS',
|
|
152
|
-
Completed = 'COMPLETED',
|
|
153
|
-
Processed = 'PROCESSED',
|
|
154
|
-
Expired = 'EXPIRED',
|
|
155
|
-
Rejected = 'REJECTED',
|
|
156
|
-
} */
|
|
157
|
-
|
|
158
|
-
/* export enum QuestionTypes {
|
|
159
|
-
BooleanQuestion = 'BooleanQuestion',
|
|
160
|
-
CheckBoxes = 'CheckBoxes',
|
|
161
|
-
CompositeQuestion = 'CompositeQuestion',
|
|
162
|
-
DateField = 'DateField',
|
|
163
|
-
Dropdown = 'Dropdown',
|
|
164
|
-
FormatNumber = 'FormatNumber',
|
|
165
|
-
LinearScale = 'LinearScale',
|
|
166
|
-
Link = 'Link',
|
|
167
|
-
RadioButtons = 'RadioButtons',
|
|
168
|
-
TextLong = 'TextLong',
|
|
169
|
-
TextShort = 'TextShort',
|
|
170
|
-
Emoticons = 'Emoticons',
|
|
171
|
-
DocumentUpload = 'DocumentUpload',
|
|
172
|
-
} */
|
|
173
|
-
|
|
174
|
-
export enum DROPDOWN {
|
|
175
|
-
Ordinary = 'ORDINARY',
|
|
176
|
-
PostCodeWithCity = 'REGION_POST_CODE',
|
|
177
|
-
Country = 'COUNTRY',
|
|
178
|
-
Organization = 'ORGANIZATION',
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
export enum NumberTypes {
|
|
182
|
-
PersonalNumber = 'PERSONAL_NUMBER',
|
|
183
|
-
NorwegianPhoneNr = 'NORWEGIAN_PHONE_NR',
|
|
184
|
-
Customizable = 'CUSTOMIZABLE',
|
|
185
|
-
CurrencyNok = 'CURRENCY_NOK',
|
|
186
|
-
Ordinary = 'ORDINARY',
|
|
187
|
-
Years = 'YEARS',
|
|
188
|
-
DateOfBirth = 'DATE_OF_BIRTH',
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
/* export enum ConsentTypes {
|
|
192
|
-
Mandatory = 'MANDATORY',
|
|
193
|
-
Optional = 'OPTIONAL',
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
export enum ConsentGroup {
|
|
197
|
-
General = 'GENERAL',
|
|
198
|
-
Query = 'QUERY',
|
|
199
|
-
Communication = 'COMMUNICATION',
|
|
200
|
-
} */
|
|
201
|
-
|
|
202
|
-
export const DocStatus = {
|
|
203
|
-
Signed: 'signed',
|
|
204
|
-
WaitingForSigning: 'waiting_for_signing',
|
|
205
|
-
OnlyForView: 'only_for_view',
|
|
206
|
-
Rejected: 'rejected',
|
|
207
|
-
/* download = 'download',
|
|
208
|
-
uploaded = 'uploaded' */
|
|
209
|
-
} as const
|
|
210
|
-
|
|
211
|
-
export type DocStatusTypes = (typeof DocStatus)[keyof typeof DocStatus]
|
|
212
|
-
|
|
213
|
-
export enum DocPickerTypes {
|
|
214
|
-
dokkladd = 'Dokkladd',
|
|
215
|
-
postJournal = 'PostJournal',
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
export enum UploadSource {
|
|
219
|
-
Local = 'local',
|
|
220
|
-
Adopus = 'adopus',
|
|
221
|
-
Dokkladd = 'dokkladd',
|
|
222
|
-
Outlook = 'outlook',
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
export enum SourceDocType {
|
|
226
|
-
Adopus = 'adopus_doc_id',
|
|
227
|
-
Dokkladd = 'dokkladd_doc_id',
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
export enum MenuContextTypes {
|
|
231
|
-
Chat = 'chat',
|
|
232
|
-
Portal = 'portal',
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
export enum UsersMenuContext {
|
|
236
|
-
Patients = 'patients',
|
|
237
|
-
Therapist = 'therapist',
|
|
238
|
-
Actor_Involved = 'actor_involved',
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
export enum FileTypeEnum {
|
|
242
|
-
Doc = 'doc',
|
|
243
|
-
Qnr = 'questionnaire',
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
export enum SecurityLevelEnum {
|
|
247
|
-
Four = '4',
|
|
248
|
-
Three = '3',
|
|
249
|
-
Two = '2',
|
|
250
|
-
One = '1',
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
export enum SeenFilterStatusEnums {
|
|
254
|
-
seen = 'seen',
|
|
255
|
-
unseen = 'unseen',
|
|
256
|
-
show_all = 'show_all',
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
export enum OverviewScopeEnums {
|
|
260
|
-
Customer = 'CUSTOMER',
|
|
261
|
-
Patient = 'PATIENT',
|
|
262
|
-
Archived = 'archived',
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
/* export enum DocStatusEnums {
|
|
266
|
-
signed = 'signed',
|
|
267
|
-
waiting_for_signing = 'waiting_for_signing',
|
|
268
|
-
only_for_view = 'only_for_view',
|
|
269
|
-
/* download = 'download',
|
|
270
|
-
uploaded = 'uploaded'
|
|
271
|
-
} */
|
|
272
|
-
|
|
273
|
-
export enum SignedByTherapistEnum {
|
|
274
|
-
canceled = 'canceled',
|
|
275
|
-
complete = 'complete',
|
|
276
|
-
postponed = 'postponed',
|
|
277
|
-
waiting_for_signing = 'waiting_for_signing',
|
|
278
|
-
sent_for_signing = 'sent_for_signing',
|
|
279
|
-
not_set_for_signing = 'not_set_for_signing',
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
export enum TemplatesFilterOptionsEnum {
|
|
283
|
-
archived = 'archived',
|
|
284
|
-
withMyRole = 'withMyRole',
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
export enum TemplateFilterStatusTypes {
|
|
288
|
-
not_received = 'not_received',
|
|
289
|
-
active = 'active',
|
|
290
|
-
completed = 'completed',
|
|
291
|
-
inactive = 'inactive',
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
export const TemplateStatusIcon = {
|
|
295
|
-
[TemplateFilterStatusTypes.active]: 'fa-question-circle',
|
|
296
|
-
[TemplateFilterStatusTypes.completed]: 'fa-list-alt',
|
|
297
|
-
[TemplateFilterStatusTypes.not_received]: 'fa-times-circle',
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
export enum TDelivery {
|
|
301
|
-
send = 'send',
|
|
302
|
-
not_send = 'not_send',
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
export const TDeliveryColor = {
|
|
306
|
-
[TDelivery.send]: 'purple',
|
|
307
|
-
[TDelivery.not_send]: 'red',
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
export const TTemplateStatus = {
|
|
311
|
-
...QueriesStatusTypes,
|
|
312
|
-
[TemplateFilterStatusTypes.not_received]: TemplateFilterStatusTypes.not_received,
|
|
313
|
-
[TemplateFilterStatusTypes.inactive]: TemplateFilterStatusTypes.inactive,
|
|
314
|
-
}
|
|
315
|
-
export const TemplateStatusColor = {
|
|
316
|
-
[TemplateFilterStatusTypes.completed]: 'blue',
|
|
317
|
-
[TemplateFilterStatusTypes.not_received]: 'gray',
|
|
318
|
-
[TemplateFilterStatusTypes.active]: 'green',
|
|
319
|
-
[TemplateFilterStatusTypes.inactive]: 'red',
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
export type TemplateStatusTypes = (typeof TTemplateStatus)[keyof typeof TTemplateStatus]
|
|
323
|
-
|
|
324
|
-
export type TemplateStatusIconTypes = (typeof TemplateFilterStatusTypes)[keyof typeof TemplateStatusIcon]
|
|
325
|
-
|
|
326
|
-
export enum PortalRoutesPaths {
|
|
327
|
-
Overview = 'overview',
|
|
328
|
-
Orders = 'orders',
|
|
329
|
-
TemplateQueryParam = 'template',
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
export const ProtectedRoutesPaths = {
|
|
333
|
-
login: 'login',
|
|
334
|
-
homeIndex: '/',
|
|
335
|
-
home: 'home',
|
|
336
|
-
customer: 'customer',
|
|
337
|
-
documents: 'customer/documents',
|
|
338
|
-
documentsGenerate: 'customer/documents/generate',
|
|
339
|
-
documentsPostJournal: 'customer/documents/post-journal',
|
|
340
|
-
documentsDrafts: 'customer/documents/drafts',
|
|
341
|
-
documentsShared: 'customer/documents/shared',
|
|
342
|
-
documentsArchived: 'customer/documents/archived',
|
|
343
|
-
consents: 'consents',
|
|
344
|
-
pendingConsents: 'pending-consents',
|
|
345
|
-
shortcuts: 'shortcuts',
|
|
346
|
-
qnrCompleted: 'completed-schemas',
|
|
347
|
-
chat: 'chat',
|
|
348
|
-
chatParamId: '/chat?chat=',
|
|
349
|
-
contextMeChat: 'context-me-chat',
|
|
350
|
-
tasks: 'tasks',
|
|
351
|
-
calendar: 'calendar',
|
|
352
|
-
overview: 'overview',
|
|
353
|
-
tiltak: 'information-on-tiltak',
|
|
354
|
-
candidateProfile: 'candidate-profile',
|
|
355
|
-
jobSearch: 'job-search',
|
|
356
|
-
jobSeeker: 'patient-profile',
|
|
357
|
-
directory: 'directory',
|
|
358
|
-
myParticipants: 'my-participants',
|
|
359
|
-
myParticipantsGroups: 'groups',
|
|
360
|
-
myParticipantsAccepted: 'accepted',
|
|
361
|
-
myParticipantsWaiting: 'waiting',
|
|
362
|
-
myParticipantsToBeDeleted: 'to-be-deleted',
|
|
363
|
-
myParticipantsAll: 'all-participants',
|
|
364
|
-
smsPainter: 'sms-painter',
|
|
365
|
-
organizations: 'organizations',
|
|
366
|
-
organizationsNew: 'organizations/new',
|
|
367
|
-
organizationsEdit: 'organizations/edit',
|
|
368
|
-
organizationsImport: 'organizations/import',
|
|
369
|
-
//
|
|
370
|
-
plans: 'plans',
|
|
371
|
-
qnrModule: 'qnr-module',
|
|
372
|
-
allQnrs: 'all-qnrs',
|
|
373
|
-
summary: 'summary',
|
|
374
|
-
inboxOutbox: 'qnrs/inbox-outbox',
|
|
375
|
-
inbox: 'qnrs/inbox',
|
|
376
|
-
outbox: 'qnrs/outbox',
|
|
377
|
-
outboxGroups: 'qnrs/outbox-groups',
|
|
378
|
-
//
|
|
379
|
-
qnrTemplatesList: 'all-qnrs/qnr-templates-list',
|
|
380
|
-
allQnrsAndFiles: 'all-qnrs/all-qnrs-and-files',
|
|
381
|
-
manageQnrs: 'all-qnrs/manage-qnrs',
|
|
382
|
-
manageParcels: 'all-qnrs/manage-parcels',
|
|
383
|
-
smsTemplates: 'all-qnrs/sms-templates',
|
|
384
|
-
anonymousForms: 'all-qnrs/anonymous-forms',
|
|
385
|
-
sendOrders: 'all-qnrs/send-orders',
|
|
386
|
-
anonymousQnrs: 'all-qnrs/anonymous-qnrs',
|
|
387
|
-
//
|
|
388
|
-
qnrView: 'qnr-view',
|
|
389
|
-
qnrModuleQnrView: 'qnr-module/qnr-view',
|
|
390
|
-
plansQnrView: 'plans/qnr-view',
|
|
391
|
-
summaryQnrView: 'summary/qnr-view',
|
|
392
|
-
//
|
|
393
|
-
artifactPresenter: 'artifact-presenter',
|
|
394
|
-
//portal routes
|
|
395
|
-
portalOverview: 'portal-advoca/overview',
|
|
396
|
-
portalQnrModule: 'qnr-module',
|
|
397
|
-
portalMicrosoftOffice: 'microsoft-office/onedrive',
|
|
398
|
-
portalDesigner: 'designer',
|
|
399
|
-
portalDashboard: 'dashboard/services',
|
|
400
|
-
//
|
|
401
|
-
anonymousSchema: 'anonymous-schema',
|
|
402
|
-
|
|
403
|
-
//devextreme
|
|
404
|
-
devextreme: 'devextreme',
|
|
405
|
-
devextremeRichEdit: 'devextreme/rich-edit',
|
|
406
|
-
devextremeReports: 'devextreme/reports',
|
|
407
|
-
privacyStatement: 'privacy-statement',
|
|
408
|
-
meetingSessionRoom: 'meeting-session/:roomSession',
|
|
409
|
-
|
|
410
|
-
// revman
|
|
411
|
-
selectFeatures: 'revman/features',
|
|
412
|
-
selectVersions: 'revman/multiversion',
|
|
413
|
-
|
|
414
|
-
// admin panel
|
|
415
|
-
customers: 'admin-panel/customers',
|
|
416
|
-
adjustTemplates: 'admin-panel/adjust-templates',
|
|
417
|
-
qnrTemplates: 'admin-panel/adjust-templates/qnr-templates',
|
|
418
|
-
documentEditor: 'admin-panel/adjust-templates/document-editor',
|
|
419
|
-
privacyAndConsents: 'admin-panel/privacy-and-consents',
|
|
420
|
-
shortcutsSettings: 'admin-panel/shortcuts-settings',
|
|
421
|
-
designerOverview: 'admin-panel/designer-overview',
|
|
422
|
-
aoTextTable: 'admin-panel/ao-text-table',
|
|
423
|
-
|
|
424
|
-
//settings
|
|
425
|
-
settingsAdministration: 'settings/administration',
|
|
426
|
-
settingsAdministrationOrganizationsNew: 'settings/administration/organizations/new',
|
|
427
|
-
settingsAdministrationOrganizationsEdit: 'settings/administration/organizations/edit',
|
|
428
|
-
consentsEditor: 'settings/consents-editor',
|
|
429
|
-
|
|
430
|
-
//reports
|
|
431
|
-
timeTrackingList: 'reports/time-tracking-list',
|
|
432
|
-
reports: 'reports/reports',
|
|
433
|
-
timeTrackingTeamLeaderList: 'reports/time-tracking-team-leader-list',
|
|
434
|
-
loginReports: 'reports/login-reports',
|
|
435
|
-
|
|
436
|
-
// time plan templates
|
|
437
|
-
createTimePlanTemplate: 'time-plan-templates/create',
|
|
438
|
-
timePlanTemplate: 'time-plan-templates/:templateId',
|
|
439
|
-
} as const
|
|
440
|
-
|
|
441
|
-
export type IProtectedRoutesPaths = (typeof ProtectedRoutesPaths)[keyof typeof ProtectedRoutesPaths]
|
|
442
|
-
|
|
443
|
-
export enum ExpressionOperators {
|
|
444
|
-
Addition = '+',
|
|
445
|
-
Subtraction = '-',
|
|
446
|
-
Multiplication = '*',
|
|
447
|
-
Division = '/',
|
|
448
|
-
Mean = 'mean( )',
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
export enum ExpressionPrefix {
|
|
452
|
-
'AtSign' = '@',
|
|
453
|
-
'Hashtag' = '#',
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
export type IExpressionOperators = (typeof ExpressionOperators)[keyof typeof ExpressionOperators]
|
|
457
|
-
export type IExpressionPrefix = (typeof ExpressionPrefix)[keyof typeof ExpressionPrefix]
|
|
458
|
-
|
|
459
|
-
export const Language = {
|
|
460
|
-
EN: 'en',
|
|
461
|
-
NO: 'no',
|
|
462
|
-
} as const
|
|
463
|
-
export type ILanguage = (typeof Language)[keyof typeof Language]
|
|
464
|
-
|
|
465
|
-
export const SearchParams = {
|
|
466
|
-
Action: 'action',
|
|
467
|
-
ActivityId: 'activity_id',
|
|
468
|
-
Hide: 'hide',
|
|
469
|
-
QnrVersion: 'qnr_version',
|
|
470
|
-
SelectedArtifact: 'selected_artifact',
|
|
471
|
-
SelectedPatientId: 'selected_patient_id',
|
|
472
|
-
SelectedQnrId: 'selected_qnr_id',
|
|
473
|
-
SelectedGroupId: 'selected_group_id',
|
|
474
|
-
UserContext: 'user_context',
|
|
475
|
-
QnrContext: 'qnr_context',
|
|
476
|
-
Device: 'device',
|
|
477
|
-
ShowHighlightedQnr: 'show_highlighted_qnr',
|
|
478
|
-
GroupId: 'group_id',
|
|
479
|
-
Status: 'status',
|
|
480
|
-
DocId: 'doc_id',
|
|
481
|
-
RequestId: 'requestId',
|
|
482
|
-
TaskId: 'taskId',
|
|
483
|
-
Subdomain: 'subdomain',
|
|
484
|
-
code: 'code',
|
|
485
|
-
user_details: 'user_details',
|
|
486
|
-
focus_tab: 'focus_tab',
|
|
487
|
-
} as const
|
|
488
|
-
|
|
489
|
-
export type ISearchParams = (typeof SearchParams)[keyof typeof SearchParams]
|
|
490
|
-
|
|
491
|
-
export enum SelectedTab {
|
|
492
|
-
QnrTemplates = 'qnr_templates',
|
|
493
|
-
AnonymousQnrTemplates = 'anonymous_qnr_templates',
|
|
494
|
-
SmsTemplates = 'sms_templates',
|
|
495
|
-
TaskTemplates = 'task_templates',
|
|
496
|
-
EventTemplates = 'event_templates',
|
|
497
|
-
ReportPermissions = 'report_permissions',
|
|
498
|
-
DocumentTemplates = 'document_templates',
|
|
499
|
-
TimePlanTemplates = 'time_plan_templates',
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
export const SearchParamWithValues = {
|
|
503
|
-
action: '' as string,
|
|
504
|
-
activity_id: '' as string,
|
|
505
|
-
hide: [] as string[],
|
|
506
|
-
qnr_version: '' as string,
|
|
507
|
-
selected_artifact: '' as SelectedArtifact,
|
|
508
|
-
selected_patient_id: '' as string,
|
|
509
|
-
selected_group_id: '' as string,
|
|
510
|
-
selected_qnr_id: '' as string,
|
|
511
|
-
user_context: '' as IUserContext,
|
|
512
|
-
qnr_context: '' as string,
|
|
513
|
-
device: '' as IDevice,
|
|
514
|
-
show_highlighted_qnr: '' as string,
|
|
515
|
-
group_id: '' as string,
|
|
516
|
-
status: '' as string,
|
|
517
|
-
doc_id: '' as string,
|
|
518
|
-
requestId: '' as string,
|
|
519
|
-
taskId: '' as string,
|
|
520
|
-
subdomain: '' as string,
|
|
521
|
-
code: '' as string,
|
|
522
|
-
user_details: '' as string,
|
|
523
|
-
qnr_viewer_readonly: '' as string,
|
|
524
|
-
focus_tab: SelectedTab.QnrTemplates as SelectedTab,
|
|
525
|
-
} as const
|
|
526
|
-
|
|
527
|
-
export type ISearchParamWithValues = (typeof SearchParamWithValues)[keyof typeof SearchParamWithValues]
|
|
528
|
-
|
|
529
|
-
export const UserContext = {
|
|
530
|
-
ME: 'ME',
|
|
531
|
-
RECIPIENT: 'RECIPIENT',
|
|
532
|
-
} as const
|
|
533
|
-
|
|
534
|
-
export const Device = {
|
|
535
|
-
TRUSTED: 'TRUSTED',
|
|
536
|
-
UNTRUSTED: 'UNTRUSTED',
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
export const OverviewCalendarTaskVariations = {
|
|
540
|
-
DEFAULT: 'DEFAULT',
|
|
541
|
-
THERAPIST: 'THERAPIST',
|
|
542
|
-
} as const
|
|
543
|
-
|
|
544
|
-
export const OverviewCalendarEventVariations = {
|
|
545
|
-
DEFAULT: 'DEFAULT',
|
|
546
|
-
THERAPIST: 'THERAPIST',
|
|
547
|
-
} as const
|
|
548
|
-
|
|
549
|
-
export const OverviewWidgetsVariationMap = {
|
|
550
|
-
CALENDAR_EVENT: OverviewCalendarEventVariations,
|
|
551
|
-
CALENDAR_TASK: OverviewCalendarTaskVariations,
|
|
552
|
-
} as const
|
|
553
|
-
|
|
554
|
-
export type IDevice = (typeof Device)[keyof typeof Device]
|
|
555
|
-
|
|
556
|
-
export type IUserContext = (typeof UserContext)[keyof typeof UserContext]
|
|
557
|
-
|
|
558
|
-
export type IOverviewCalendarTaskVariations =
|
|
559
|
-
(typeof OverviewCalendarTaskVariations)[keyof typeof OverviewCalendarTaskVariations]
|
|
560
|
-
export type IOverviewCalendarEventVariations =
|
|
561
|
-
(typeof OverviewCalendarEventVariations)[keyof typeof OverviewCalendarEventVariations]
|
|
562
|
-
|
|
563
|
-
export type IOverviewWidgetsVariationMapKey = keyof typeof OverviewWidgetsVariationMap
|
|
564
|
-
export type IOverviewWidgetsVariationMap =
|
|
565
|
-
(typeof OverviewWidgetsVariationMap)[keyof typeof OverviewWidgetsVariationMap]
|
|
566
|
-
|
|
567
|
-
export const mutationOperations = {
|
|
568
|
-
INSERT: 'INSERT',
|
|
569
|
-
UPDATE: 'UPDATE',
|
|
570
|
-
DELETE: 'DELETE',
|
|
571
|
-
} as const
|
|
572
|
-
|
|
573
|
-
export type IMutationOperation = ValueOf<typeof mutationOperations>
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
//import type { roles_enum, feature_names_enum } from "asma-genql-directory/lib"
|
|
2
|
-
|
|
3
|
-
//type roles_enum = 'RECIPIENT' | 'SUPER_USER' | 'THERAPIST' | 'USER'
|
|
4
|
-
// type feature_names_enum =
|
|
5
|
-
// | 'autoImportableQnr'
|
|
6
|
-
// | 'dashboardTraceability'
|
|
7
|
-
// | 'ordersOverviewOnSelectedRecipientsForQnr'
|
|
8
|
-
// | 'predefinedUserForQnr'
|
|
9
|
-
// | 'rejectableQnr'
|
|
10
|
-
// | 'signByTherapistDocument'
|
|
11
|
-
// | 'test'
|
|
12
|
-
//
|
|
13
|
-
/**
|
|
14
|
-
* R roles_enum
|
|
15
|
-
*/
|
|
16
|
-
export type IUUID = `${string}-${string}-${string}-${string}-${string}`
|
|
17
|
-
export interface IBaseJwtClaims<R extends string,J extends string = 'ADCURIS'|'ADOPUS'|'UNKNOWN'> {
|
|
18
|
-
user_id: IUUID
|
|
19
|
-
role: R
|
|
20
|
-
journal: J
|
|
21
|
-
subdomain: string
|
|
22
|
-
genesis_set: string
|
|
23
|
-
name: string
|
|
24
|
-
journal_role: string
|
|
25
|
-
region: string
|
|
26
|
-
srv_urls: ISrvUrls
|
|
27
|
-
customer_id: IUUID
|
|
28
|
-
genesis_role?: string
|
|
29
|
-
/**@deprecated use journal_user_name instead*/
|
|
30
|
-
brukerBrukerNavn?: string
|
|
31
|
-
journal_user_name?: string
|
|
32
|
-
journal_user_id?: string
|
|
33
|
-
vt?: number
|
|
34
|
-
exp?: number
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface IAdminJwtClaims<R extends string> extends ITherapistOrSuperUserJwtClaims<R> {}
|
|
38
|
-
/**
|
|
39
|
-
* R roles_enum
|
|
40
|
-
*/
|
|
41
|
-
export interface IRecipientJwtClaims<R extends string> extends IBaseJwtClaims<R> {
|
|
42
|
-
access_level: 1 | 2 | 3 | 4
|
|
43
|
-
related_customers: string
|
|
44
|
-
identity: string
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* R roles_enum
|
|
48
|
-
* F feature_names_enum
|
|
49
|
-
*/
|
|
50
|
-
export interface ITherapistOrSuperUserJwtClaims<R extends string> extends IBaseJwtClaims<R> {
|
|
51
|
-
}
|
|
52
|
-
export interface IService {
|
|
53
|
-
[key: string]: string[]
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export interface ISrvUrls {
|
|
57
|
-
[key: string]: string
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface IAiLearningJwtClaims<R extends string> extends IBaseJwtClaims<R> {
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* R roles_enum
|
|
64
|
-
*/
|
|
65
|
-
export function isRecipientJwtClaims<R extends string>(claims?: IBaseJwtClaims<R>): claims is IRecipientJwtClaims<R> {
|
|
66
|
-
return claims?.role.toUpperCase() === 'RECIPIENT'
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
*
|
|
70
|
-
* @param claims R roles_enum
|
|
71
|
-
* F feature_names_enum
|
|
72
|
-
* @returns
|
|
73
|
-
*/
|
|
74
|
-
export function isTherapistJwtClaims<R extends string>(claims?: IBaseJwtClaims<R>): claims is ITherapistOrSuperUserJwtClaims<R> {
|
|
75
|
-
return claims?.role.toUpperCase() === 'THERAPIST' || claims?.role?.toUpperCase() === 'SUPER_USER'
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
*
|
|
79
|
-
* @param claims R roles_enum
|
|
80
|
-
* @returns
|
|
81
|
-
*/
|
|
82
|
-
export function isAdminJwtClaims<R extends string>(claims?: IBaseJwtClaims<R>): claims is IAdminJwtClaims<R> {
|
|
83
|
-
return claims?.role.toUpperCase() === 'ADMIN'
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export function isAiLearningJwtClaims<R extends string>(claims?: IBaseJwtClaims<R>): claims is IRecipientJwtClaims<R> {
|
|
87
|
-
return claims?.role.toUpperCase() === 'AI_LEARNING'
|
|
88
|
-
}
|
package/src/utilities/OneOf.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//type BaseMessage = { id: string, timestamp: number };
|
|
3
|
-
//type TextMessage = BaseMessage & { text: string; };
|
|
4
|
-
//type ImgMessage = BaseMessage & { imgPath: string };
|
|
5
|
-
//type UrlMessage = BaseMessage & { url: string; };
|
|
6
|
-
|
|
7
|
-
//type Message = TextMessage | UrlMessage | ImgMessage;
|
|
8
|
-
//type MessageTypesArray = OneOf<[TextMessage, UrlMessage, ImgMessage]>;
|
|
9
|
-
|
|
10
|
-
type MergeTypes<TypesArray extends any[], Res = {}> =
|
|
11
|
-
TypesArray extends [infer Head, ...infer Rem]
|
|
12
|
-
? MergeTypes<Rem, Res & Head>
|
|
13
|
-
: Res;
|
|
14
|
-
|
|
15
|
-
export type OneOf<
|
|
16
|
-
TypesArray extends any[],
|
|
17
|
-
Res = never,
|
|
18
|
-
AllProperties = MergeTypes<TypesArray>> =
|
|
19
|
-
TypesArray extends [infer Head, ...infer Rem]
|
|
20
|
-
? OneOf<Rem, Res | OnlyFirst<Head, AllProperties>, AllProperties>
|
|
21
|
-
: Res;
|
|
22
|
-
|
|
23
|
-
//type SimpleOneOf<F, S> = OnlyFirst<F, S> | OnlyFirst<S, F>;
|
|
24
|
-
|
|
25
|
-
type OnlyFirst<F, S> = F & {[Key in keyof Omit<S, keyof F>]?: never};
|
|
26
|
-
|
|
27
|
-
/* const message: MessageTypesArray = {
|
|
28
|
-
id: '1',
|
|
29
|
-
timestamp: new Date().getTime(),
|
|
30
|
-
imgPath: 'path'
|
|
31
|
-
} */
|
package/src/utilities/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type ValueOf<T> = T[keyof T]
|
package/tsconfig.json
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
|
4
|
-
|
|
5
|
-
/* Basic Options */
|
|
6
|
-
// "incremental": true, /* Enable incremental compilation */
|
|
7
|
-
"target": "ES2019" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
|
|
8
|
-
"module": "ES2020" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
|
|
9
|
-
// "lib": [], /* Specify library files to be included in the compilation. */
|
|
10
|
-
// "allowJs": true, /* Allow javascript files to be compiled. */
|
|
11
|
-
// "checkJs": true, /* Report errors in .js files. */
|
|
12
|
-
"jsx": "react-jsx" /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */,
|
|
13
|
-
"declaration": true /* Generates corresponding '.d.ts' file. */,
|
|
14
|
-
"declarationMap": true /* Generates a sourcemap for each corresponding '.d.ts' file. */,
|
|
15
|
-
"sourceMap": true /* Generates corresponding '.map' file. */,
|
|
16
|
-
// "outFile": "./", /* Concatenate and emit output to single file. */
|
|
17
|
-
"outDir": "lib" /* Redirect output structure to the directory. */,
|
|
18
|
-
"rootDir": "src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
|
|
19
|
-
// "composite": true, /* Enable project compilation */
|
|
20
|
-
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
|
|
21
|
-
// "removeComments": true, /* Do not emit comments to output. */
|
|
22
|
-
// "noEmit": true, /* Do not emit outputs. */
|
|
23
|
-
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
|
|
24
|
-
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
|
|
25
|
-
|
|
26
|
-
/* Strict Type-Checking Options */
|
|
27
|
-
"strict": true /* Enable all strict type-checking options. */,
|
|
28
|
-
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
|
|
29
|
-
"strictNullChecks": true /* Enable strict null checks. */,
|
|
30
|
-
"strictFunctionTypes": true /* Enable strict checking of function types. */,
|
|
31
|
-
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
|
32
|
-
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
|
33
|
-
"noImplicitThis": true /* Raise error on 'this' expressions with an implied 'any' type. */,
|
|
34
|
-
"alwaysStrict": true /* Parse in strict mode and emit "use strict" for each source file. */,
|
|
35
|
-
"noUncheckedIndexedAccess": true,
|
|
36
|
-
/* Additional Checks */
|
|
37
|
-
"noUnusedLocals": true /* Report errors on unused locals. */,
|
|
38
|
-
"noUnusedParameters": true /* Report errors on unused parameters. */,
|
|
39
|
-
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */,
|
|
40
|
-
"noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */,
|
|
41
|
-
//"noUncheckedIndexedAccess": true /* Include 'undefined' in index signature results */,
|
|
42
|
-
//"noPropertyAccessFromIndexSignature": true /* Require undeclared properties from index signatures to use element accesses. */,
|
|
43
|
-
|
|
44
|
-
/* Module Resolution Options */
|
|
45
|
-
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
|
|
46
|
-
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
|
47
|
-
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
|
48
|
-
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
|
49
|
-
// "typeRoots": [], /* List of folders to include type definitions from. */
|
|
50
|
-
// "types": [], /* Type declaration files to be included in compilation. */
|
|
51
|
-
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
|
52
|
-
"esModuleInterop": false /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
|
|
53
|
-
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
|
54
|
-
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
55
|
-
|
|
56
|
-
/* Source Map Options */
|
|
57
|
-
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
|
58
|
-
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
59
|
-
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
|
60
|
-
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
|
61
|
-
|
|
62
|
-
/* Experimental Options */
|
|
63
|
-
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|
|
64
|
-
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
|
65
|
-
|
|
66
|
-
/* Advanced Options */
|
|
67
|
-
"skipLibCheck": true /* Skip type checking of declaration files. */,
|
|
68
|
-
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */,
|
|
69
|
-
|
|
70
|
-
"allowJs": false,
|
|
71
|
-
"allowSyntheticDefaultImports": true,
|
|
72
|
-
|
|
73
|
-
"strictBindCallApply": true,
|
|
74
|
-
|
|
75
|
-
"noPropertyAccessFromIndexSignature": true,
|
|
76
|
-
"resolveJsonModule": true,
|
|
77
|
-
"experimentalDecorators": false,
|
|
78
|
-
"verbatimModuleSyntax": true,
|
|
79
|
-
"useUnknownInCatchVariables": false
|
|
80
|
-
},
|
|
81
|
-
"include": ["src", "lib/interfaces"],
|
|
82
|
-
"exclude": ["node_modules", "lib"]
|
|
83
|
-
}
|