@taiger-common/model 1.0.46 → 1.0.48

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.
@@ -1,7 +1,16 @@
1
1
  import { Schema } from 'mongoose';
2
2
  import validator from 'validator';
3
- import { DocumentStatusType } from '@taiger-common/core';
3
+ import { Role } from '../constants/users';
4
4
  import { PROGRAM_SUBJECT_KEYS } from './Program';
5
+ // --- Interfaces for frontend/backend type reference ---
6
+ export var DocumentStatusType;
7
+ (function (DocumentStatusType) {
8
+ DocumentStatusType["Uploaded"] = "uploaded";
9
+ DocumentStatusType["Missing"] = "missing";
10
+ DocumentStatusType["Accepted"] = "accepted";
11
+ DocumentStatusType["Rejected"] = "rejected";
12
+ DocumentStatusType["NotNeeded"] = "notneeded";
13
+ })(DocumentStatusType || (DocumentStatusType = {}));
5
14
  var ManagerType = {
6
15
  Agent: 'Agent',
7
16
  Editor: 'Editor',
@@ -20,6 +29,11 @@ var attributeSchema = new Schema({
20
29
  }
21
30
  });
22
31
  var userSchema = new Schema({
32
+ role: {
33
+ type: String,
34
+ enum: Object.values(Role),
35
+ required: true
36
+ },
23
37
  firstname: {
24
38
  type: String,
25
39
  trim: true
@@ -0,0 +1,9 @@
1
+ export declare const Role: {
2
+ Admin: string;
3
+ Manager: string;
4
+ External: string;
5
+ Guest: string;
6
+ Agent: string;
7
+ Editor: string;
8
+ Student: string;
9
+ };
@@ -24,6 +24,284 @@
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
26
  import { Schema } from 'mongoose';
27
+ export declare const PROGRAM_SUBJECTS: {
28
+ LING: {
29
+ label: string;
30
+ category: string;
31
+ };
32
+ MUS: {
33
+ label: string;
34
+ category: string;
35
+ };
36
+ THEO: {
37
+ label: string;
38
+ category: string;
39
+ };
40
+ ARCH: {
41
+ label: string;
42
+ category: string;
43
+ };
44
+ 'ARCH-BE': {
45
+ label: string;
46
+ category: string;
47
+ };
48
+ 'ART-DES': {
49
+ label: string;
50
+ category: string;
51
+ };
52
+ CLAH: {
53
+ label: string;
54
+ category: string;
55
+ };
56
+ ELL: {
57
+ label: string;
58
+ category: string;
59
+ };
60
+ HIST: {
61
+ label: string;
62
+ category: string;
63
+ };
64
+ ARTH: {
65
+ label: string;
66
+ category: string;
67
+ };
68
+ 'MOD-LANG': {
69
+ label: string;
70
+ category: string;
71
+ };
72
+ 'PERF-ART': {
73
+ label: string;
74
+ category: string;
75
+ };
76
+ PHIL: {
77
+ label: string;
78
+ category: string;
79
+ };
80
+ 'CHEM-ENG': {
81
+ label: string;
82
+ category: string;
83
+ };
84
+ 'CIV-STR-ENG': {
85
+ label: string;
86
+ category: string;
87
+ };
88
+ CSIS: {
89
+ label: string;
90
+ category: string;
91
+ };
92
+ 'DS-AI': {
93
+ label: string;
94
+ category: string;
95
+ };
96
+ 'ELEC-ENG': {
97
+ label: string;
98
+ category: string;
99
+ };
100
+ 'PETRO-ENG': {
101
+ label: string;
102
+ category: string;
103
+ };
104
+ 'MECH-ENG': {
105
+ label: string;
106
+ category: string;
107
+ };
108
+ 'MIN-MIN-ENG': {
109
+ label: string;
110
+ category: string;
111
+ };
112
+ 'AG-FOR': {
113
+ label: string;
114
+ category: string;
115
+ };
116
+ 'ANA-PHYS': {
117
+ label: string;
118
+ category: string;
119
+ };
120
+ 'BIO-SCI': {
121
+ label: string;
122
+ category: string;
123
+ };
124
+ DENT: {
125
+ label: string;
126
+ category: string;
127
+ };
128
+ MED: {
129
+ label: string;
130
+ category: string;
131
+ };
132
+ NURS: {
133
+ label: string;
134
+ category: string;
135
+ };
136
+ PHARM: {
137
+ label: string;
138
+ category: string;
139
+ };
140
+ PSYCH: {
141
+ label: string;
142
+ category: string;
143
+ };
144
+ 'VET-SCI': {
145
+ label: string;
146
+ category: string;
147
+ };
148
+ CHEM: {
149
+ label: string;
150
+ category: string;
151
+ };
152
+ 'EAR-MAR-SCI': {
153
+ label: string;
154
+ category: string;
155
+ };
156
+ 'ENV-SCI': {
157
+ label: string;
158
+ category: string;
159
+ };
160
+ GEO: {
161
+ label: string;
162
+ category: string;
163
+ };
164
+ GEOL: {
165
+ label: string;
166
+ category: string;
167
+ };
168
+ GEOPH: {
169
+ label: string;
170
+ category: string;
171
+ };
172
+ 'MAT-SCI': {
173
+ label: string;
174
+ category: string;
175
+ };
176
+ MATH: {
177
+ label: string;
178
+ category: string;
179
+ };
180
+ 'PHYS-ASTRO': {
181
+ label: string;
182
+ category: string;
183
+ };
184
+ 'ACC-FIN': {
185
+ label: string;
186
+ category: string;
187
+ };
188
+ ANTH: {
189
+ label: string;
190
+ category: string;
191
+ };
192
+ 'BUS-MGMT': {
193
+ label: string;
194
+ category: string;
195
+ };
196
+ 'COMM-MEDIA': {
197
+ label: string;
198
+ category: string;
199
+ };
200
+ 'DEV-STUD': {
201
+ label: string;
202
+ category: string;
203
+ };
204
+ ECON: {
205
+ label: string;
206
+ category: string;
207
+ };
208
+ 'EDU-TRAIN': {
209
+ label: string;
210
+ category: string;
211
+ };
212
+ 'HOSP-MGMT': {
213
+ label: string;
214
+ category: string;
215
+ };
216
+ LAW: {
217
+ label: string;
218
+ category: string;
219
+ };
220
+ 'LIB-INFO': {
221
+ label: string;
222
+ category: string;
223
+ };
224
+ MKT: {
225
+ label: string;
226
+ category: string;
227
+ };
228
+ POL: {
229
+ label: string;
230
+ category: string;
231
+ };
232
+ 'SOC-POL': {
233
+ label: string;
234
+ category: string;
235
+ };
236
+ SOC: {
237
+ label: string;
238
+ category: string;
239
+ };
240
+ SPORT: {
241
+ label: string;
242
+ category: string;
243
+ };
244
+ 'STAT-OR': {
245
+ label: string;
246
+ category: string;
247
+ };
248
+ };
249
+ export declare enum SemesterType {
250
+ SummerSemester = "SS",
251
+ WinterSemester = "WS",
252
+ Rolling = "Rolling"
253
+ }
254
+ export declare const DIFFICULTY: {
255
+ EASY: string;
256
+ HARD: string;
257
+ };
258
+ export declare const SCHOOL_TAGS: {
259
+ U15: {
260
+ label: string;
261
+ category: string;
262
+ };
263
+ TU9: {
264
+ label: string;
265
+ category: string;
266
+ };
267
+ EUROTECH: {
268
+ label: string;
269
+ category: string;
270
+ };
271
+ GERMAN_ELITE: {
272
+ label: string;
273
+ category: string;
274
+ };
275
+ TIME: {
276
+ label: string;
277
+ category: string;
278
+ };
279
+ TOP50: {
280
+ label: string;
281
+ category: string;
282
+ };
283
+ TOP100: {
284
+ label: string;
285
+ category: string;
286
+ };
287
+ TOP150: {
288
+ label: string;
289
+ category: string;
290
+ };
291
+ TOP250: {
292
+ label: string;
293
+ category: string;
294
+ };
295
+ TOP500: {
296
+ label: string;
297
+ category: string;
298
+ };
299
+ };
300
+ export declare enum SchoolType {
301
+ University = "University",
302
+ University_of_Applied_Sciences = "University_of_Applied_Sciences"
303
+ }
304
+ export declare const SCHOOL_TYPES: SchoolType[];
27
305
  export declare const PROGRAM_SUBJECT_KEYS: string[];
28
306
  export declare const DIFFICULTY_KEYS: string[];
29
307
  export interface IProgram {
@@ -324,7 +602,7 @@ export declare const programModule: {
324
602
  };
325
603
  schoolType: {
326
604
  type: StringConstructor;
327
- enum: import("@taiger-common/core").SchoolType[];
605
+ enum: SchoolType[];
328
606
  };
329
607
  isEssayConsultantNeeded: {
330
608
  type: BooleanConstructor;
@@ -1,4 +1,11 @@
1
1
  import { Schema } from 'mongoose';
2
+ export declare enum DocumentStatusType {
3
+ Uploaded = "uploaded",
4
+ Missing = "missing",
5
+ Accepted = "accepted",
6
+ Rejected = "rejected",
7
+ NotNeeded = "notneeded"
8
+ }
2
9
  export interface IUserNotification {
3
10
  isRead_survey_not_complete?: boolean;
4
11
  isRead_uni_assist_task_assigned?: boolean;
@@ -93,6 +100,7 @@ export interface IUserAttribute {
93
100
  name: string;
94
101
  }
95
102
  export interface IUser {
103
+ role?: string;
96
104
  firstname?: string;
97
105
  firstname_chinese?: string;
98
106
  lastname?: string;