@juki-team/commons 0.1.46 → 0.1.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.
- package/dist/{types/constants → constants}/commons.d.ts +1 -1
- package/dist/constants/commons.js +648 -0
- package/dist/{types/constants → constants}/contest.d.ts +1 -1
- package/dist/constants/contest.js +28 -0
- package/dist/{types/constants → constants}/course.d.ts +1 -1
- package/dist/constants/course.js +12 -0
- package/dist/constants/date.js +23 -0
- package/dist/constants/email.js +34 -0
- package/dist/{types/constants → constants}/entity.d.ts +1 -1
- package/dist/constants/entity.js +18 -0
- package/dist/{types/constants → constants}/file.d.ts +1 -1
- package/dist/constants/file.js +45 -0
- package/dist/constants/index.d.ts +18 -0
- package/dist/constants/index.js +18 -0
- package/dist/{types/constants → constants}/judge.d.ts +1 -1
- package/dist/constants/judge.js +225 -0
- package/dist/{types/constants → constants}/organization.d.ts +1 -1
- package/dist/constants/organization.js +24 -0
- package/dist/{types/constants → constants}/problem.d.ts +1 -1
- package/dist/constants/problem.js +69 -0
- package/dist/constants/routing.js +7 -0
- package/dist/{types/constants → constants}/services.d.ts +1 -1
- package/dist/constants/services.js +157 -0
- package/dist/{types/constants → constants}/system.d.ts +1 -1
- package/dist/constants/system.js +9 -0
- package/dist/{types/constants → constants}/teams.d.ts +1 -1
- package/dist/constants/teams.js +17 -0
- package/dist/constants/time.js +9 -0
- package/dist/{types/constants → constants}/user.d.ts +2 -2
- package/dist/constants/user.js +40 -0
- package/dist/{types/constants → constants}/websocket.d.ts +7 -3
- package/dist/constants/websocket.js +56 -0
- package/dist/{types/constants → constants}/worksheet.d.ts +1 -1
- package/dist/constants/worksheet.js +66 -0
- package/dist/{types/dto → dto}/class.d.ts +3 -3
- package/dist/dto/class.js +1 -0
- package/dist/{types/dto → dto}/code.d.ts +1 -1
- package/dist/dto/code.js +1 -0
- package/dist/{types/dto → dto}/comments.d.ts +1 -1
- package/dist/dto/comments.js +1 -0
- package/dist/{types/dto → dto}/contest.d.ts +4 -4
- package/dist/dto/contest.js +7 -0
- package/dist/{types/dto → dto}/course.d.ts +4 -4
- package/dist/dto/course.js +1 -0
- package/dist/{types/dto → dto}/entity.d.ts +2 -2
- package/dist/dto/entity.js +5 -0
- package/dist/{types/dto → dto}/excalidraw.d.ts +3 -3
- package/dist/dto/excalidraw.js +1 -0
- package/dist/{types/dto → dto}/file.d.ts +2 -2
- package/dist/dto/file.js +1 -0
- package/dist/dto/image.js +1 -0
- package/dist/dto/index.d.ts +25 -0
- package/dist/dto/index.js +25 -0
- package/dist/{types/dto → dto}/judge.d.ts +1 -1
- package/dist/dto/judge.js +1 -0
- package/dist/{types/dto → dto}/markdown.d.ts +3 -3
- package/dist/dto/markdown.js +1 -0
- package/dist/{types/dto → dto}/mermaid.d.ts +3 -3
- package/dist/dto/mermaid.js +1 -0
- package/dist/{types/dto → dto}/organization.d.ts +3 -3
- package/dist/dto/organization.js +1 -0
- package/dist/{types/dto → dto}/problem.d.ts +3 -3
- package/dist/dto/problem.js +1 -0
- package/dist/{types/dto → dto}/scoreboard.d.ts +2 -2
- package/dist/dto/scoreboard.js +1 -0
- package/dist/{types/dto → dto}/session.d.ts +2 -2
- package/dist/dto/session.js +1 -0
- package/dist/{types/dto → dto}/socket.d.ts +5 -5
- package/dist/dto/socket.js +1 -0
- package/dist/{types/dto → dto}/statistics.d.ts +1 -1
- package/dist/dto/statistics.js +1 -0
- package/dist/{types/dto → dto}/submission.d.ts +3 -3
- package/dist/dto/submission.js +1 -0
- package/dist/{types/dto → dto}/system.d.ts +1 -1
- package/dist/dto/system.js +1 -0
- package/dist/dto/url.js +1 -0
- package/dist/{types/dto → dto}/user.d.ts +3 -3
- package/dist/dto/user.js +1 -0
- package/dist/{types/dto → dto}/virtual-user.d.ts +1 -1
- package/dist/dto/virtual-user.js +1 -0
- package/dist/{types/dto → dto}/worksheet-submissions.d.ts +3 -3
- package/dist/dto/worksheet-submissions.js +1 -0
- package/dist/{types/dto → dto}/worksheet.d.ts +3 -3
- package/dist/dto/worksheet.js +1 -0
- package/dist/{types/helpers → helpers}/class.d.ts +1 -1
- package/dist/helpers/class.js +10 -0
- package/dist/helpers/comments.js +4 -0
- package/dist/{types/helpers → helpers}/commons.d.ts +1 -1
- package/dist/helpers/commons.js +187 -0
- package/dist/{types/helpers → helpers}/contest.d.ts +1 -1
- package/dist/helpers/contest.js +21 -0
- package/dist/helpers/date.js +181 -0
- package/dist/{types/helpers → helpers}/document.d.ts +2 -2
- package/dist/helpers/document.js +51 -0
- package/dist/{types/helpers → helpers}/errors.d.ts +1 -1
- package/dist/helpers/errors.js +17 -0
- package/dist/helpers/file.js +4 -0
- package/dist/helpers/index.d.ts +17 -0
- package/dist/helpers/index.js +17 -0
- package/dist/helpers/interval.js +24 -0
- package/dist/{types/helpers → helpers}/judging.d.ts +1 -1
- package/dist/helpers/judging.js +124 -0
- package/dist/helpers/number.js +2 -0
- package/dist/helpers/object.js +33 -0
- package/dist/{types/helpers → helpers}/responses.d.ts +2 -2
- package/dist/helpers/responses.js +95 -0
- package/dist/{types/helpers → helpers}/socket.d.ts +3 -3
- package/dist/helpers/socket.js +279 -0
- package/dist/{types/helpers → helpers}/time.d.ts +1 -1
- package/dist/helpers/time.js +69 -0
- package/dist/{types/helpers → helpers}/user.d.ts +1 -1
- package/dist/helpers/user.js +14 -0
- package/dist/{types/helpers → helpers}/worksheet.d.ts +1 -1
- package/dist/helpers/worksheet.js +107 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/types/account.js +10 -0
- package/dist/types/{types/class.d.ts → class.d.ts} +2 -2
- package/dist/types/class.js +7 -0
- package/dist/types/comments.js +1 -0
- package/dist/types/{types/commons.d.ts → commons.d.ts} +1 -1
- package/dist/types/commons.js +69 -0
- package/dist/types/{types/contest.d.ts → contest.d.ts} +4 -4
- package/dist/types/contest.js +27 -0
- package/dist/types/{types/course.d.ts → course.d.ts} +1 -1
- package/dist/types/course.js +1 -0
- package/dist/types/entity.js +50 -0
- package/dist/types/{types/excalidraw.d.ts → excalidraw.d.ts} +1 -1
- package/dist/types/excalidraw.js +1 -0
- package/dist/types/{types/file.d.ts → file.d.ts} +2 -2
- package/dist/types/file.js +19 -0
- package/dist/types/{types/group.d.ts → group.d.ts} +1 -1
- package/dist/types/group.js +5 -0
- package/dist/types/index.d.ts +27 -4
- package/dist/types/index.js +27 -0
- package/dist/types/{types/judge.d.ts → judge.d.ts} +2 -2
- package/dist/types/judge.js +49 -0
- package/dist/types/{types/markdown.d.ts → markdown.d.ts} +1 -1
- package/dist/types/markdown.js +1 -0
- package/dist/types/{types/mermaid.d.ts → mermaid.d.ts} +1 -1
- package/dist/types/mermaid.js +1 -0
- package/dist/types/notification.js +8 -0
- package/dist/types/organization.js +14 -0
- package/dist/types/{types/prisma.d.ts → prisma.d.ts} +1 -1
- package/dist/types/prisma.js +106 -0
- package/dist/types/{types/problems.d.ts → problems.d.ts} +3 -3
- package/dist/types/problems.js +28 -0
- package/dist/types/scoreboard.js +1 -0
- package/dist/types/{types/services.d.ts → services.d.ts} +1 -1
- package/dist/types/services.js +152 -0
- package/dist/types/{types/sheet.d.ts → sheet.d.ts} +2 -2
- package/dist/types/sheet.js +16 -0
- package/dist/types/{types/socket.d.ts → socket.d.ts} +3 -2
- package/dist/types/socket.js +76 -0
- package/dist/types/submission.js +1 -0
- package/dist/types/system.js +1 -0
- package/dist/types/{types/teams.d.ts → teams.d.ts} +2 -2
- package/dist/types/teams.js +1 -0
- package/dist/types/{types/users.d.ts → users.d.ts} +2 -2
- package/dist/types/users.js +23 -0
- package/dist/types/virtual-user.js +8 -0
- package/dist/types/{types/worksheet.d.ts → worksheet.d.ts} +3 -3
- package/dist/types/worksheet.js +11 -0
- package/package.json +8 -11
- package/dist/cjs/index.cjs +0 -3695
- package/dist/esm/index.js +0 -3415
- package/dist/types/constants/index.d.ts +0 -18
- package/dist/types/dto/index.d.ts +0 -25
- package/dist/types/helpers/index.d.ts +0 -17
- package/dist/types/types/index.d.ts +0 -27
- /package/dist/{types/constants → constants}/date.d.ts +0 -0
- /package/dist/{types/constants → constants}/email.d.ts +0 -0
- /package/dist/{types/constants → constants}/routing.d.ts +0 -0
- /package/dist/{types/constants → constants}/time.d.ts +0 -0
- /package/dist/{types/dto → dto}/image.d.ts +0 -0
- /package/dist/{types/dto → dto}/url.d.ts +0 -0
- /package/dist/{types/helpers → helpers}/comments.d.ts +0 -0
- /package/dist/{types/helpers → helpers}/date.d.ts +0 -0
- /package/dist/{types/helpers → helpers}/file.d.ts +0 -0
- /package/dist/{types/helpers → helpers}/interval.d.ts +0 -0
- /package/dist/{types/helpers → helpers}/number.d.ts +0 -0
- /package/dist/{types/helpers → helpers}/object.d.ts +0 -0
- /package/dist/types/{types/account.d.ts → account.d.ts} +0 -0
- /package/dist/types/{types/comments.d.ts → comments.d.ts} +0 -0
- /package/dist/types/{types/entity.d.ts → entity.d.ts} +0 -0
- /package/dist/types/{types/notification.d.ts → notification.d.ts} +0 -0
- /package/dist/types/{types/organization.d.ts → organization.d.ts} +0 -0
- /package/dist/types/{types/scoreboard.d.ts → scoreboard.d.ts} +0 -0
- /package/dist/types/{types/submission.d.ts → submission.d.ts} +0 -0
- /package/dist/types/{types/system.d.ts → system.d.ts} +0 -0
- /package/dist/types/{types/virtual-user.d.ts → virtual-user.d.ts} +0 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { ErrorCode } from '../types/index.js';
|
|
2
|
+
export const ERROR = {
|
|
3
|
+
// Http Errors
|
|
4
|
+
[ErrorCode.ERR500]: { value: ErrorCode.ERR500, message: 'internal server error', status: 500 },
|
|
5
|
+
[ErrorCode.ERR400]: { value: ErrorCode.ERR400, message: 'bad request', status: 400 },
|
|
6
|
+
[ErrorCode.ERR401]: { value: ErrorCode.ERR401, message: 'unauthorized', status: 401 },
|
|
7
|
+
[ErrorCode.ERR403]: { value: ErrorCode.ERR403, message: 'forbidden', status: 403 },
|
|
8
|
+
[ErrorCode.ERR404]: { value: ErrorCode.ERR404, message: 'not found', status: 404 },
|
|
9
|
+
[ErrorCode.ERR405]: { value: ErrorCode.ERR405, message: 'method not allowed', status: 405 },
|
|
10
|
+
// UI general errors
|
|
11
|
+
[ErrorCode.ERR9997]: { value: ErrorCode.ERR9997, message: 'aborted request', status: 400 },
|
|
12
|
+
[ErrorCode.ERR9998]: { value: ErrorCode.ERR9998, message: 'error on response', status: 400 },
|
|
13
|
+
[ErrorCode.ERR9999]: { value: ErrorCode.ERR9999, message: 'service no found', status: 400 },
|
|
14
|
+
// ORGANIZATION ERRORS ERR99XX
|
|
15
|
+
[ErrorCode.ERR9900]: { value: ErrorCode.ERR9900, message: 'internal server error on organization service', status: 500 },
|
|
16
|
+
// Organization server errors
|
|
17
|
+
[ErrorCode.ERR9910]: { value: ErrorCode.ERR9910, message: 'organization not created', status: 500 },
|
|
18
|
+
[ErrorCode.ERR9911]: { value: ErrorCode.ERR9911, message: 'organization not found', status: 500 },
|
|
19
|
+
[ErrorCode.ERR9912]: { value: ErrorCode.ERR9912, message: 'organization not updated', status: 500 },
|
|
20
|
+
[ErrorCode.ERR9913]: { value: ErrorCode.ERR9913, message: 'organization not deleted', status: 500 },
|
|
21
|
+
// Organization user permission error
|
|
22
|
+
[ErrorCode.ERR9914]: { value: ErrorCode.ERR9914, message: 'not allowed to create the organization', status: 400 },
|
|
23
|
+
[ErrorCode.ERR9915]: { value: ErrorCode.ERR9915, message: 'not allowed to view the organization', status: 400 },
|
|
24
|
+
[ErrorCode.ERR9916]: { value: ErrorCode.ERR9916, message: 'not allowed to updated the organization', status: 400 },
|
|
25
|
+
[ErrorCode.ERR9917]: { value: ErrorCode.ERR9917, message: 'not allowed to deleted the organization', status: 400 },
|
|
26
|
+
// USER ERRORS ERR00XX
|
|
27
|
+
[ErrorCode.ERR0000]: { value: ErrorCode.ERR0000, message: 'internal server error on users service', status: 500 },
|
|
28
|
+
// User server errors
|
|
29
|
+
[ErrorCode.ERR0010]: { value: ErrorCode.ERR0010, message: 'user not created', status: 500 },
|
|
30
|
+
[ErrorCode.ERR0011]: { value: ErrorCode.ERR0011, message: 'user not found', status: 500 },
|
|
31
|
+
[ErrorCode.ERR0012]: { value: ErrorCode.ERR0012, message: 'user not updated', status: 500 },
|
|
32
|
+
[ErrorCode.ERR0013]: { value: ErrorCode.ERR0013, message: 'user not deleted', status: 500 },
|
|
33
|
+
// User user permission error
|
|
34
|
+
[ErrorCode.ERR0014]: { value: ErrorCode.ERR0014, message: 'not allowed to create the user', status: 400 },
|
|
35
|
+
[ErrorCode.ERR0015]: { value: ErrorCode.ERR0015, message: 'not allowed to view the user', status: 400 },
|
|
36
|
+
[ErrorCode.ERR0016]: { value: ErrorCode.ERR0016, message: 'not allowed to updated the user', status: 400 },
|
|
37
|
+
[ErrorCode.ERR0017]: { value: ErrorCode.ERR0017, message: 'not allowed to deleted the user', status: 400 },
|
|
38
|
+
// User status permissions errors
|
|
39
|
+
[ErrorCode.ERR0018]: { value: ErrorCode.ERR0018, message: 'user is reported', status: 400 },
|
|
40
|
+
[ErrorCode.ERR0019]: { value: ErrorCode.ERR0019, message: 'user is archived', status: 400 },
|
|
41
|
+
// User others permissions errors
|
|
42
|
+
[ErrorCode.ERR0020]: { value: ErrorCode.ERR0020, message: 'user with email requested not found', status: 400 },
|
|
43
|
+
[ErrorCode.ERR0021]: { value: ErrorCode.ERR0021, message: 'user with nickname requested not found', status: 400 },
|
|
44
|
+
[ErrorCode.ERR0022]: { value: ErrorCode.ERR0022, message: 'the email is already registered', status: 400 },
|
|
45
|
+
[ErrorCode.ERR0023]: { value: ErrorCode.ERR0023, message: 'the nickname is already taken', status: 400 },
|
|
46
|
+
[ErrorCode.ERR0024]: { value: ErrorCode.ERR0024, message: 'incorrect password', status: 400 },
|
|
47
|
+
// User sessions errors
|
|
48
|
+
[ErrorCode.ERR0050]: { value: ErrorCode.ERR0050, message: 'user session not created', status: 500 },
|
|
49
|
+
[ErrorCode.ERR0051]: { value: ErrorCode.ERR0051, message: 'user session not found', status: 500 },
|
|
50
|
+
[ErrorCode.ERR0052]: { value: ErrorCode.ERR0052, message: 'user session not updated', status: 500 },
|
|
51
|
+
[ErrorCode.ERR0053]: { value: ErrorCode.ERR0053, message: 'user session not deleted', status: 500 },
|
|
52
|
+
// PROBLEM ERRORS ERR01XX
|
|
53
|
+
[ErrorCode.ERR0100]: { value: ErrorCode.ERR0100, message: 'internal server error on problems service', status: 500 },
|
|
54
|
+
// Problem server errors
|
|
55
|
+
[ErrorCode.ERR0110]: { value: ErrorCode.ERR0110, message: 'problem not created', status: 500 },
|
|
56
|
+
[ErrorCode.ERR0111]: { value: ErrorCode.ERR0111, message: 'problem not found', status: 500 },
|
|
57
|
+
[ErrorCode.ERR0112]: { value: ErrorCode.ERR0112, message: 'problem not updated', status: 500 },
|
|
58
|
+
[ErrorCode.ERR0113]: { value: ErrorCode.ERR0113, message: 'problem not deleted', status: 500 },
|
|
59
|
+
// Problem user permission error
|
|
60
|
+
[ErrorCode.ERR0114]: { value: ErrorCode.ERR0114, message: 'not allowed to create the problem', status: 400 },
|
|
61
|
+
[ErrorCode.ERR0115]: { value: ErrorCode.ERR0115, message: 'not allowed to view the problem', status: 400 },
|
|
62
|
+
[ErrorCode.ERR0116]: { value: ErrorCode.ERR0116, message: 'not allowed to updated the problem', status: 400 },
|
|
63
|
+
[ErrorCode.ERR0117]: { value: ErrorCode.ERR0117, message: 'not allowed to deleted the problem', status: 400 },
|
|
64
|
+
// Problem others permissions errors
|
|
65
|
+
[ErrorCode.ERR0118]: { value: ErrorCode.ERR0118, message: 'problem mode not supported', status: 500 },
|
|
66
|
+
[ErrorCode.ERR0119]: { value: ErrorCode.ERR0119, message: 'problem type not supported', status: 500 },
|
|
67
|
+
[ErrorCode.ERR0120]: { value: ErrorCode.ERR0120, message: 'problem time limit must be a number', status: 500 },
|
|
68
|
+
[ErrorCode.ERR0121]: { value: ErrorCode.ERR0121, message: 'problem memory limit must be number', status: 500 },
|
|
69
|
+
[ErrorCode.ERR0122]: { value: ErrorCode.ERR0122, message: 'test case file empty', status: 400 },
|
|
70
|
+
// Contest Errors ERR02XX
|
|
71
|
+
[ErrorCode.ERR0200]: { value: ErrorCode.ERR0200, message: 'internal server error on contests service', status: 500 },
|
|
72
|
+
// Contest Server Error
|
|
73
|
+
[ErrorCode.ERR0210]: { value: ErrorCode.ERR0210, message: 'contest not created', status: 500 },
|
|
74
|
+
[ErrorCode.ERR0211]: { value: ErrorCode.ERR0211, message: 'contest not found', status: 500 },
|
|
75
|
+
[ErrorCode.ERR0212]: { value: ErrorCode.ERR0212, message: 'contest not updated', status: 500 },
|
|
76
|
+
[ErrorCode.ERR0213]: { value: ErrorCode.ERR0213, message: 'contest not deleted', status: 500 },
|
|
77
|
+
// Contest User Permission error
|
|
78
|
+
[ErrorCode.ERR0214]: { value: ErrorCode.ERR0214, message: 'not allowed to create the contest', status: 400 },
|
|
79
|
+
[ErrorCode.ERR0215]: { value: ErrorCode.ERR0215, message: 'not allowed to view the contest', status: 400 },
|
|
80
|
+
[ErrorCode.ERR0216]: { value: ErrorCode.ERR0216, message: 'not allowed to updated the contest', status: 400 },
|
|
81
|
+
[ErrorCode.ERR0217]: { value: ErrorCode.ERR0217, message: 'not allowed to deleted the contest', status: 400 },
|
|
82
|
+
// Contest Others permissions errors
|
|
83
|
+
[ErrorCode.ERR0218]: { value: ErrorCode.ERR0218, message: 'not allowed to register to the contest', status: 400 },
|
|
84
|
+
[ErrorCode.ERR0219]: { value: ErrorCode.ERR0219, message: 'is already registered', status: 400 },
|
|
85
|
+
[ErrorCode.ERR0220]: { value: ErrorCode.ERR0220, message: 'not allowed to view contests', status: 400 },
|
|
86
|
+
[ErrorCode.ERR0230]: { value: ErrorCode.ERR0230, message: 'scoreboard not created', status: 500 },
|
|
87
|
+
[ErrorCode.ERR0231]: { value: ErrorCode.ERR0231, message: 'scoreboard not found', status: 500 },
|
|
88
|
+
[ErrorCode.ERR0232]: { value: ErrorCode.ERR0232, message: 'scoreboard not updated', status: 500 },
|
|
89
|
+
[ErrorCode.ERR0233]: { value: ErrorCode.ERR0233, message: 'scoreboard not deleted', status: 500 },
|
|
90
|
+
[ErrorCode.ERR0234]: { value: ErrorCode.ERR0234, message: 'not allowed to create the scoreboard', status: 400 },
|
|
91
|
+
[ErrorCode.ERR0235]: { value: ErrorCode.ERR0235, message: 'not allowed to view the scoreboard', status: 400 },
|
|
92
|
+
[ErrorCode.ERR0236]: { value: ErrorCode.ERR0236, message: 'not allowed to update the scoreboard', status: 400 },
|
|
93
|
+
[ErrorCode.ERR0237]: { value: ErrorCode.ERR0237, message: 'not allowed to delete the scoreboard', status: 400 },
|
|
94
|
+
[ErrorCode.ERR0240]: { value: ErrorCode.ERR0240, message: 'clarification not created', status: 500 },
|
|
95
|
+
[ErrorCode.ERR0241]: { value: ErrorCode.ERR0241, message: 'clarification not found', status: 500 },
|
|
96
|
+
[ErrorCode.ERR0242]: { value: ErrorCode.ERR0242, message: 'clarification not updated', status: 500 },
|
|
97
|
+
[ErrorCode.ERR0243]: { value: ErrorCode.ERR0243, message: 'clarification not deleted', status: 500 },
|
|
98
|
+
[ErrorCode.ERR0244]: { value: ErrorCode.ERR0244, message: 'not allowed to submit clarification', status: 400 },
|
|
99
|
+
[ErrorCode.ERR0245]: { value: ErrorCode.ERR0245, message: 'not allowed to view clarification', status: 400 },
|
|
100
|
+
[ErrorCode.ERR0246]: { value: ErrorCode.ERR0246, message: 'not allowed to update clarification', status: 400 },
|
|
101
|
+
[ErrorCode.ERR0247]: { value: ErrorCode.ERR0247, message: 'not allowed to delete clarification', status: 400 },
|
|
102
|
+
// Submission Errors ERR03XXX
|
|
103
|
+
[ErrorCode.ERR0300]: {
|
|
104
|
+
value: ErrorCode.ERR0300,
|
|
105
|
+
message: 'internal server error on submissions service',
|
|
106
|
+
status: 500,
|
|
107
|
+
},
|
|
108
|
+
[ErrorCode.ERR0301]: { value: ErrorCode.ERR0301, message: 'submission not found', status: 500 },
|
|
109
|
+
[ErrorCode.ERR0302]: { value: ErrorCode.ERR0302, message: 'submission not created', status: 500 },
|
|
110
|
+
[ErrorCode.ERR0303]: { value: ErrorCode.ERR0303, message: 'submission not updated', status: 500 },
|
|
111
|
+
[ErrorCode.ERR0310]: { value: ErrorCode.ERR0310, message: 'source empty', status: 400 },
|
|
112
|
+
[ErrorCode.ERR0311]: { value: ErrorCode.ERR0311, message: 'programming language not supported', status: 400 },
|
|
113
|
+
[ErrorCode.ERR0321]: {
|
|
114
|
+
value: ErrorCode.ERR0321,
|
|
115
|
+
message: 'not allowed submit the problem in the contest',
|
|
116
|
+
status: 400,
|
|
117
|
+
},
|
|
118
|
+
[ErrorCode.ERR0331]: { value: ErrorCode.ERR0331, message: 'judgement unavailable', status: 400 },
|
|
119
|
+
// Utils Errors ERR04XX
|
|
120
|
+
[ErrorCode.ERR0400]: { value: ErrorCode.ERR0400, message: 'internal server error on utils services', status: 500 },
|
|
121
|
+
[ErrorCode.ERR0410]: { value: ErrorCode.ERR0410, message: 'empty image', status: 400 },
|
|
122
|
+
[ErrorCode.ERR0420]: { value: ErrorCode.ERR0420, message: '', status: 400 }, // codes
|
|
123
|
+
[ErrorCode.ERR0421]: { value: ErrorCode.ERR0421, message: 'compilation failed', status: 400 }, // codes
|
|
124
|
+
[ErrorCode.ERR0430]: { value: ErrorCode.ERR0430, message: '', status: 400 }, // files
|
|
125
|
+
[ErrorCode.ERR0440]: { value: ErrorCode.ERR0440, message: 'the email could not be sent', status: 400 }, // mails
|
|
126
|
+
// TEAMS ERRORS ERR06XX
|
|
127
|
+
[ErrorCode.ERR0600]: { value: ErrorCode.ERR0600, message: 'internal server error on teams service', status: 500 },
|
|
128
|
+
// Teams server errors
|
|
129
|
+
[ErrorCode.ERR0610]: { value: ErrorCode.ERR0610, message: 'team not created', status: 400 },
|
|
130
|
+
[ErrorCode.ERR0611]: { value: ErrorCode.ERR0611, message: 'team not found', status: 400 },
|
|
131
|
+
[ErrorCode.ERR0612]: { value: ErrorCode.ERR0612, message: 'team not updated', status: 400 },
|
|
132
|
+
[ErrorCode.ERR0613]: { value: ErrorCode.ERR0613, message: 'team not deleted', status: 400 },
|
|
133
|
+
// Teams user permission error
|
|
134
|
+
[ErrorCode.ERR0614]: { value: ErrorCode.ERR0614, message: 'not allowed to create the team', status: 400 },
|
|
135
|
+
[ErrorCode.ERR0615]: { value: ErrorCode.ERR0615, message: 'not allowed to view the team', status: 400 },
|
|
136
|
+
[ErrorCode.ERR0616]: { value: ErrorCode.ERR0616, message: 'not allowed to updated the team', status: 400 },
|
|
137
|
+
[ErrorCode.ERR0617]: { value: ErrorCode.ERR0617, message: 'not allowed to deleted the team', status: 400 },
|
|
138
|
+
// Teams status permission error
|
|
139
|
+
[ErrorCode.ERR0618]: { value: ErrorCode.ERR0618, message: 'team is reported', status: 400 },
|
|
140
|
+
[ErrorCode.ERR0619]: { value: ErrorCode.ERR0619, message: 'team is archived', status: 400 },
|
|
141
|
+
// FILES ERRORS ERR08XX
|
|
142
|
+
[ErrorCode.ERR0800]: { value: ErrorCode.ERR0800, message: 'internal server error on files service', status: 500 },
|
|
143
|
+
// Files server errors
|
|
144
|
+
[ErrorCode.ERR0810]: { value: ErrorCode.ERR0810, message: 'file not created', status: 400 },
|
|
145
|
+
[ErrorCode.ERR0811]: { value: ErrorCode.ERR0811, message: 'file not found', status: 400 },
|
|
146
|
+
[ErrorCode.ERR0812]: { value: ErrorCode.ERR0812, message: 'file not updated', status: 400 },
|
|
147
|
+
[ErrorCode.ERR0813]: { value: ErrorCode.ERR0813, message: 'file not deleted', status: 400 },
|
|
148
|
+
// Files user permission error
|
|
149
|
+
[ErrorCode.ERR0814]: { value: ErrorCode.ERR0814, message: 'not allowed to create the file', status: 400 },
|
|
150
|
+
[ErrorCode.ERR0815]: { value: ErrorCode.ERR0815, message: 'not allowed to view the file', status: 400 },
|
|
151
|
+
[ErrorCode.ERR0816]: { value: ErrorCode.ERR0816, message: 'not allowed to updated the file', status: 400 },
|
|
152
|
+
[ErrorCode.ERR0817]: { value: ErrorCode.ERR0817, message: 'not allowed to deleted the file', status: 400 },
|
|
153
|
+
// Files status permission error
|
|
154
|
+
[ErrorCode.ERR0818]: { value: ErrorCode.ERR0818, message: 'file is reserved', status: 400 },
|
|
155
|
+
[ErrorCode.ERR0819]: { value: ErrorCode.ERR0819, message: 'file is private', status: 400 },
|
|
156
|
+
[ErrorCode.ERR0820]: { value: ErrorCode.ERR0820, message: 'file is archived', status: 400 },
|
|
157
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SystemRole } from '../types/index.js';
|
|
2
|
+
export const SYSTEM_ROLE = {
|
|
3
|
+
[SystemRole.GUEST]: { value: SystemRole.GUEST, label: 'guest', level: 5 },
|
|
4
|
+
[SystemRole.REGULAR]: { value: SystemRole.REGULAR, label: 'regular', level: 4 },
|
|
5
|
+
[SystemRole.MANAGER]: { value: SystemRole.MANAGER, label: 'manager', level: 3 },
|
|
6
|
+
[SystemRole.MASTER]: { value: SystemRole.MASTER, label: 'master', level: 2 },
|
|
7
|
+
[SystemRole.ADMIN]: { value: SystemRole.ADMIN, label: 'admin', level: 1 },
|
|
8
|
+
[SystemRole.SUPER_ADMIN]: { value: SystemRole.SUPER_ADMIN, label: 'super admin', level: 0 },
|
|
9
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MemberRole, TeamRole } from '../types/index.js';
|
|
2
|
+
export const MEMBER_ROLE = {
|
|
3
|
+
[MemberRole.COACH]: { value: MemberRole.COACH, label: 'coach' },
|
|
4
|
+
[MemberRole.CO_COACH]: { value: MemberRole.CO_COACH, label: 'co-coach' },
|
|
5
|
+
[MemberRole.STAFF]: { value: MemberRole.STAFF, label: 'staff' },
|
|
6
|
+
[MemberRole.ATTENDEE]: { value: MemberRole.ATTENDEE, label: 'attendee' },
|
|
7
|
+
[MemberRole.RESERVE]: { value: MemberRole.RESERVE, label: 'reserve' },
|
|
8
|
+
[MemberRole.CONTESTANT]: { value: MemberRole.CONTESTANT, label: 'contestant' },
|
|
9
|
+
};
|
|
10
|
+
export const TEAM_ROLE = {
|
|
11
|
+
[TeamRole.RESTRICTED]: { value: TeamRole.RESTRICTED, label: 'restricted', level: 5 },
|
|
12
|
+
[TeamRole.GUEST]: { value: TeamRole.GUEST, label: 'guest', level: 4 },
|
|
13
|
+
[TeamRole.REGULAR]: { value: TeamRole.REGULAR, label: 'regular', level: 3 },
|
|
14
|
+
[TeamRole.MANAGER]: { value: TeamRole.MANAGER, label: 'manager', level: 2 },
|
|
15
|
+
[TeamRole.ADMIN]: { value: TeamRole.ADMIN, label: 'admin', level: 1 },
|
|
16
|
+
[TeamRole.SUPER_ADMIN]: { value: TeamRole.SUPER_ADMIN, label: 'super admin', level: 0 },
|
|
17
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const ONE_SECOND = 1000;
|
|
2
|
+
export const SEC_30 = ONE_SECOND * 30;
|
|
3
|
+
export const SEC_60 = ONE_SECOND * 60;
|
|
4
|
+
export const SEC_90 = ONE_SECOND * 90;
|
|
5
|
+
export const SEC_120 = ONE_SECOND * 120;
|
|
6
|
+
export const ONE_MINUTE = ONE_SECOND * 60;
|
|
7
|
+
export const ONE_HOUR = ONE_MINUTE * 60;
|
|
8
|
+
export const ONE_DAY = ONE_HOUR * 24;
|
|
9
|
+
export const ONE_WEEK = ONE_DAY * 7;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UserPermissions } from '../dto';
|
|
2
|
-
import { UserRole, UserStatus } from '../types';
|
|
1
|
+
import { UserPermissions } from '../dto/index.js';
|
|
2
|
+
import { UserRole, UserStatus } from '../types/index.js';
|
|
3
3
|
export declare const USER_STATUS: {
|
|
4
4
|
[key in UserStatus]: {
|
|
5
5
|
value: UserStatus;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { UserRole, UserStatus } from '../types/index.js';
|
|
2
|
+
export const USER_STATUS = {
|
|
3
|
+
[UserStatus.ACTIVE]: { value: UserStatus.ACTIVE, label: 'active' },
|
|
4
|
+
[UserStatus.REPORTED]: { value: UserStatus.REPORTED, label: 'reported' },
|
|
5
|
+
[UserStatus.ARCHIVED]: { value: UserStatus.ARCHIVED, label: 'archived' },
|
|
6
|
+
};
|
|
7
|
+
export const USER_ROLE = {
|
|
8
|
+
[UserRole.RESTRICTED]: { value: UserRole.RESTRICTED, label: 'restricted', level: 6 },
|
|
9
|
+
[UserRole.GUEST]: { value: UserRole.GUEST, label: 'guest', level: 5 },
|
|
10
|
+
[UserRole.LIMITED]: { value: UserRole.LIMITED, label: 'limited', level: 4 },
|
|
11
|
+
[UserRole.REGULAR]: { value: UserRole.REGULAR, label: 'regular', level: 3 },
|
|
12
|
+
[UserRole.MANAGER]: { value: UserRole.MANAGER, label: 'manager', level: 2 },
|
|
13
|
+
[UserRole.ADMIN]: { value: UserRole.ADMIN, label: 'admin', level: 1 },
|
|
14
|
+
[UserRole.SUPER_ADMIN]: { value: UserRole.SUPER_ADMIN, label: 'super admin', level: 0 },
|
|
15
|
+
};
|
|
16
|
+
export const EMPTY_USER_PERMISSIONS = {
|
|
17
|
+
users: {
|
|
18
|
+
create: false,
|
|
19
|
+
manage: false,
|
|
20
|
+
administrate: false,
|
|
21
|
+
},
|
|
22
|
+
problems: {
|
|
23
|
+
create: false,
|
|
24
|
+
manage: false,
|
|
25
|
+
},
|
|
26
|
+
submissions: {
|
|
27
|
+
manage: false,
|
|
28
|
+
},
|
|
29
|
+
contests: {
|
|
30
|
+
create: false,
|
|
31
|
+
manage: false,
|
|
32
|
+
},
|
|
33
|
+
organization: {
|
|
34
|
+
manage: false,
|
|
35
|
+
administrate: false,
|
|
36
|
+
},
|
|
37
|
+
services: {
|
|
38
|
+
administrate: false,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { ContestChannelRole, ProblemChannelRole, UserChannelRole } from '../types';
|
|
1
|
+
import { ContestChannelRole, ProblemChannelRole, UserChannelRole } from '../types/index.js';
|
|
2
2
|
/** private: events of one session (code runs, requested data) */
|
|
3
3
|
export declare const CHANNEL_SESSION: (sessionId: string) => string;
|
|
4
4
|
/** private: events of one user (own submissions while the contest is frozen, notifications, own problem crawls) */
|
|
5
5
|
export declare const CHANNEL_USER: (userId: string) => string;
|
|
6
|
-
/**
|
|
7
|
-
|
|
6
|
+
/**
|
|
7
|
+
* per role: public events of one user (judging of its submissions visible to everyone, see `UserChannelRole`).
|
|
8
|
+
* By its public key (`getUserKey(nickname, organizationKey)`), the one the clients know; the private channel
|
|
9
|
+
* (`CHANNEL_USER`) is by id. They never collide: the role channel has one more segment.
|
|
10
|
+
*/
|
|
11
|
+
export declare const CHANNEL_USER_ROLE: (userKey: string, role: UserChannelRole) => string;
|
|
8
12
|
/** public: status of a submission when it is visible to everyone */
|
|
9
13
|
export declare const CHANNEL_SUBMISSION: (submitId: string) => string;
|
|
10
14
|
/** per role: events of a problem for one role (judging of its submissions, see `ProblemChannelRole`) */
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ContestChannelRole, ProblemChannelRole, UserChannelRole } from '../types/index.js';
|
|
2
|
+
// TOPIC channels
|
|
3
|
+
// The backend publishes each event once on the channel of its topic and Ably does the fan-out.
|
|
4
|
+
// Who can subscribe to each channel is decided by the API in the Ably token (capability), never by the client.
|
|
5
|
+
// Dynamic segments are encoded so a key can never inject a `:` (the Ably segment separator used by the wildcards).
|
|
6
|
+
const segment = (value) => encodeURIComponent(value);
|
|
7
|
+
/** private: events of one session (code runs, requested data) */
|
|
8
|
+
export const CHANNEL_SESSION = (sessionId) => `session:${segment(sessionId)}`;
|
|
9
|
+
/** private: events of one user (own submissions while the contest is frozen, notifications, own problem crawls) */
|
|
10
|
+
export const CHANNEL_USER = (userId) => `user:${segment(userId)}`;
|
|
11
|
+
/**
|
|
12
|
+
* per role: public events of one user (judging of its submissions visible to everyone, see `UserChannelRole`).
|
|
13
|
+
* By its public key (`getUserKey(nickname, organizationKey)`), the one the clients know; the private channel
|
|
14
|
+
* (`CHANNEL_USER`) is by id. They never collide: the role channel has one more segment.
|
|
15
|
+
*/
|
|
16
|
+
export const CHANNEL_USER_ROLE = (userKey, role) => `user:${segment(userKey)}:${role}`;
|
|
17
|
+
/** public: status of a submission when it is visible to everyone */
|
|
18
|
+
export const CHANNEL_SUBMISSION = (submitId) => `submission:${segment(submitId)}`;
|
|
19
|
+
/** per role: events of a problem for one role (judging of its submissions, see `ProblemChannelRole`) */
|
|
20
|
+
export const CHANNEL_PROBLEM = (problemKey, role) => `problem:${segment(problemKey)}:${role}`;
|
|
21
|
+
/** per role: events of a contest for one role (and the roles above it, see `ContestChannelRole`) */
|
|
22
|
+
export const CHANNEL_CONTEST = (contestKey, role) => `contest:${segment(contestKey)}:${role}`;
|
|
23
|
+
/**
|
|
24
|
+
* presence of the clients (tabs) of the logged users of a organization (by its key), data: `UserPresenceData`.
|
|
25
|
+
* The clients only enter (capability `presence`), only the administrators of the organization receive it
|
|
26
|
+
* (capability `presence-subscribe`). Ably limits the presence members per channel (200 by default,
|
|
27
|
+
* more with server-side batching enabled on the `presence` namespace).
|
|
28
|
+
* The identity of a member is its `clientId` (`sessionId|uiId`, verified by Ably), never its data.
|
|
29
|
+
*/
|
|
30
|
+
export const CHANNEL_ORGANIZATION_PRESENCE = (organizationKey) => `presence:organization:${segment(organizationKey)}`;
|
|
31
|
+
// capability resources (wildcards) of the public channels.
|
|
32
|
+
// Ably: a trailing `*` replaces one or more segments, any other `*` exactly one segment. So `user:*:spectators`
|
|
33
|
+
// matches every `user:{userKey}:spectators` but never the private `user:{userId}`.
|
|
34
|
+
// There is no public `problem:*`: it would also match the role channels `problem:{problemKey}:{role}`.
|
|
35
|
+
export const CHANNEL_SUBMISSION_ALL = 'submission:*';
|
|
36
|
+
export const CHANNEL_USER_SPECTATORS_ALL = `user:*:${UserChannelRole.SPECTATORS}`;
|
|
37
|
+
/**
|
|
38
|
+
* Returns the contest and role of a `CHANNEL_CONTEST` channel name, or null if it is not one.
|
|
39
|
+
*/
|
|
40
|
+
export const getContestChannelParams = (channel) => {
|
|
41
|
+
const [namespace, contestKey, role, ...rest] = channel.split(':');
|
|
42
|
+
if (namespace !== 'contest' || !contestKey || rest.length || !Object.values(ContestChannelRole).includes(role)) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
return { contestKey: decodeURIComponent(contestKey), role: role };
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Returns the problem and role of a `CHANNEL_PROBLEM` channel name, or null if it is not one.
|
|
49
|
+
*/
|
|
50
|
+
export const getProblemChannelParams = (channel) => {
|
|
51
|
+
const [namespace, problemKey, role, ...rest] = channel.split(':');
|
|
52
|
+
if (namespace !== 'problem' || !problemKey || rest.length || !Object.values(ProblemChannelRole).includes(role)) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
return { problemKey: decodeURIComponent(problemKey), role: role };
|
|
56
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { v4 } from 'uuid';
|
|
2
|
+
import { AspectRatio, WorksheetType } from '../types/index.js';
|
|
3
|
+
export const NEW_PAGE_SHEET = () => ({
|
|
4
|
+
id: v4(),
|
|
5
|
+
type: WorksheetType.NEW_PAGE,
|
|
6
|
+
title: '',
|
|
7
|
+
points: 0,
|
|
8
|
+
});
|
|
9
|
+
export const ASPECT_RATIO = {
|
|
10
|
+
[AspectRatio.RATIO_21_9]: {
|
|
11
|
+
aspectRatio: AspectRatio.RATIO_21_9,
|
|
12
|
+
width: 2520,
|
|
13
|
+
height: 1080,
|
|
14
|
+
decimal: 21 / 9,
|
|
15
|
+
label: 'ultrawide',
|
|
16
|
+
},
|
|
17
|
+
[AspectRatio.RATIO_20_9]: {
|
|
18
|
+
aspectRatio: AspectRatio.RATIO_20_9,
|
|
19
|
+
width: 2400,
|
|
20
|
+
height: 1080,
|
|
21
|
+
decimal: 20 / 9,
|
|
22
|
+
label: 'mobile wide',
|
|
23
|
+
},
|
|
24
|
+
[AspectRatio.RATIO_16_9]: {
|
|
25
|
+
aspectRatio: AspectRatio.RATIO_16_9,
|
|
26
|
+
width: 1920,
|
|
27
|
+
height: 1080,
|
|
28
|
+
decimal: 16 / 9,
|
|
29
|
+
label: 'widescreen',
|
|
30
|
+
},
|
|
31
|
+
[AspectRatio.RATIO_16_10]: {
|
|
32
|
+
aspectRatio: AspectRatio.RATIO_16_10,
|
|
33
|
+
width: 1920,
|
|
34
|
+
height: 1200,
|
|
35
|
+
decimal: 16 / 10,
|
|
36
|
+
label: 'widescreen tall',
|
|
37
|
+
},
|
|
38
|
+
[AspectRatio.RATIO_3_2]: {
|
|
39
|
+
aspectRatio: AspectRatio.RATIO_3_2,
|
|
40
|
+
width: 1440,
|
|
41
|
+
height: 960,
|
|
42
|
+
decimal: 3 / 2,
|
|
43
|
+
label: 'balanced',
|
|
44
|
+
},
|
|
45
|
+
[AspectRatio.RATIO_4_3]: {
|
|
46
|
+
aspectRatio: AspectRatio.RATIO_4_3,
|
|
47
|
+
width: 1024,
|
|
48
|
+
height: 768,
|
|
49
|
+
decimal: 4 / 3,
|
|
50
|
+
label: 'standard',
|
|
51
|
+
},
|
|
52
|
+
[AspectRatio.RATIO_5_4]: {
|
|
53
|
+
aspectRatio: AspectRatio.RATIO_5_4,
|
|
54
|
+
width: 1280,
|
|
55
|
+
height: 1024,
|
|
56
|
+
decimal: 5 / 4,
|
|
57
|
+
label: 'square old',
|
|
58
|
+
},
|
|
59
|
+
[AspectRatio.RATIO_1_1]: {
|
|
60
|
+
aspectRatio: AspectRatio.RATIO_1_1,
|
|
61
|
+
width: 1000,
|
|
62
|
+
height: 1000,
|
|
63
|
+
decimal: 1,
|
|
64
|
+
label: 'square',
|
|
65
|
+
},
|
|
66
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AssignmentBasicInfo, AssignmentClass, ClassBaseDocument, ClassCycleTag, EntityState } from '../types';
|
|
2
|
-
import { EntityMembersDto, EntityMembersResponseDto } from './entity';
|
|
3
|
-
import { UserOrganizationBasicInfoResponseDto, UserSummaryListResponseDto } from './user';
|
|
1
|
+
import { AssignmentBasicInfo, AssignmentClass, ClassBaseDocument, ClassCycleTag, EntityState } from '../types/index.js';
|
|
2
|
+
import { EntityMembersDto, EntityMembersResponseDto } from './entity.js';
|
|
3
|
+
import { UserOrganizationBasicInfoResponseDto, UserSummaryListResponseDto } from './user.js';
|
|
4
4
|
interface ClassUserResponseDto {
|
|
5
5
|
isOwner: boolean;
|
|
6
6
|
isManager: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/dto/code.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ContestBaseDocument, ContestEventAction, ContestProblemPrerequisite, ContestProblem, ContestSettings, ContestTimeFlags, ContestUser, EntityState, ProblemSettings, ProblemStatement, TextLanguage } from '../types';
|
|
2
|
-
import { EntityMembersDto, EntityMembersWithTimestampsResponseDto } from './entity';
|
|
3
|
-
import { EntityOrganizationSummaryListResponseDto, EntityOrganizationSystemSummaryListResponseDto, ProblemJudgeSummaryListResponseDto, ProblemSummaryListResponseDto } from './problem';
|
|
4
|
-
import { EntityOwnerSystemSummaryListResponseDto, UserOrganizationBasicInfoResponseDto } from './user';
|
|
1
|
+
import { ContestBaseDocument, ContestEventAction, ContestProblemPrerequisite, ContestProblem, ContestSettings, ContestTimeFlags, ContestUser, EntityState, ProblemSettings, ProblemStatement, TextLanguage } from '../types/index.js';
|
|
2
|
+
import { EntityMembersDto, EntityMembersWithTimestampsResponseDto } from './entity.js';
|
|
3
|
+
import { EntityOrganizationSummaryListResponseDto, EntityOrganizationSystemSummaryListResponseDto, ProblemJudgeSummaryListResponseDto, ProblemSummaryListResponseDto } from './problem.js';
|
|
4
|
+
import { EntityOwnerSystemSummaryListResponseDto, UserOrganizationBasicInfoResponseDto } from './user.js';
|
|
5
5
|
export type UpsertContestProblemPrerequisiteDto = (Omit<ContestProblemPrerequisite, 'problemId'> & {
|
|
6
6
|
problemIndex: string;
|
|
7
7
|
})[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var ContestProblemBlockedByType;
|
|
2
|
+
(function (ContestProblemBlockedByType) {
|
|
3
|
+
ContestProblemBlockedByType["UNMET_PREREQUISITES"] = "UNMET_PREREQUISITES";
|
|
4
|
+
ContestProblemBlockedByType["MAX_ACCEPTED_SUBMISSIONS_ACHIEVED"] = "MAX_ACCEPTED_SUBMISSIONS_ACHIEVED";
|
|
5
|
+
ContestProblemBlockedByType["START_TIME_IN_THE_FUTURE"] = "START_TIME_IN_THE_FUTURE";
|
|
6
|
+
ContestProblemBlockedByType["END_TIME_IN_THE_PAST"] = "END_TIME_IN_THE_PAST";
|
|
7
|
+
})(ContestProblemBlockedByType || (ContestProblemBlockedByType = {}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CourseBaseDocument } from '../types';
|
|
2
|
-
import { EntityMembersDto, EntityMembersResponseDto } from './entity';
|
|
3
|
-
import { UserOrganizationBasicInfoResponseDto } from './user';
|
|
4
|
-
import { WorksheetSummaryListResponseDto } from './worksheet';
|
|
1
|
+
import { CourseBaseDocument } from '../types/index.js';
|
|
2
|
+
import { EntityMembersDto, EntityMembersResponseDto } from './entity.js';
|
|
3
|
+
import { UserOrganizationBasicInfoResponseDto } from './user.js';
|
|
4
|
+
import { WorksheetSummaryListResponseDto } from './worksheet.js';
|
|
5
5
|
export type CourseUserResponseDto = {
|
|
6
6
|
isOwner: boolean;
|
|
7
7
|
isManager: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EntityAccess, EntityLogChanges, EntityMembersRank } from '../types';
|
|
2
|
-
import { UserOrganizationBasicInfoResponseDto } from './user';
|
|
1
|
+
import { EntityAccess, EntityLogChanges, EntityMembersRank } from '../types/index.js';
|
|
2
|
+
import { UserOrganizationBasicInfoResponseDto } from './user.js';
|
|
3
3
|
export interface EntityMembersDto {
|
|
4
4
|
rankAdministrators: EntityMembersRank;
|
|
5
5
|
administrators: string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ExcalidrawBaseDocument } from '../types';
|
|
2
|
-
import { EntityMembersDto, EntityMembersResponseDto } from './entity';
|
|
3
|
-
import { UserOrganizationBasicInfoResponseDto } from './user';
|
|
1
|
+
import { ExcalidrawBaseDocument } from '../types/index.js';
|
|
2
|
+
import { EntityMembersDto, EntityMembersResponseDto } from './entity.js';
|
|
3
|
+
import { UserOrganizationBasicInfoResponseDto } from './user.js';
|
|
4
4
|
export interface ExcalidrawResponseDto extends Omit<ExcalidrawBaseDocument, 'members'> {
|
|
5
5
|
owner: UserOrganizationBasicInfoResponseDto;
|
|
6
6
|
members: EntityMembersResponseDto;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FileBasic, FileContent, FileMemberRole, SummaryFileContent, UserBasic } from '../types';
|
|
2
|
-
import { DocumentMembersResponseDto, DocumentUserResponseDto } from './entity';
|
|
1
|
+
import { FileBasic, FileContent, FileMemberRole, SummaryFileContent, UserBasic } from '../types/index.js';
|
|
2
|
+
import { DocumentMembersResponseDto, DocumentUserResponseDto } from './entity.js';
|
|
3
3
|
export interface CreateFileDto extends FileBasic {
|
|
4
4
|
folderId: string;
|
|
5
5
|
content: FileContent;
|
package/dist/dto/file.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export * from './class.js';
|
|
2
|
+
export * from './code.js';
|
|
3
|
+
export * from './comments.js';
|
|
4
|
+
export * from './organization.js';
|
|
5
|
+
export * from './contest.js';
|
|
6
|
+
export * from './course.js';
|
|
7
|
+
export * from './entity.js';
|
|
8
|
+
export * from './excalidraw.js';
|
|
9
|
+
export * from './file.js';
|
|
10
|
+
export * from './image.js';
|
|
11
|
+
export * from './judge.js';
|
|
12
|
+
export * from './problem.js';
|
|
13
|
+
export * from './markdown.js';
|
|
14
|
+
export * from './mermaid.js';
|
|
15
|
+
export * from './scoreboard.js';
|
|
16
|
+
export * from './session.js';
|
|
17
|
+
export * from './socket.js';
|
|
18
|
+
export * from './statistics.js';
|
|
19
|
+
export * from './submission.js';
|
|
20
|
+
export * from './system.js';
|
|
21
|
+
export * from './url.js';
|
|
22
|
+
export * from './user.js';
|
|
23
|
+
export * from './virtual-user.js';
|
|
24
|
+
export * from './worksheet.js';
|
|
25
|
+
export * from './worksheet-submissions.js';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export * from './class.js';
|
|
2
|
+
export * from './code.js';
|
|
3
|
+
export * from './comments.js';
|
|
4
|
+
export * from './organization.js';
|
|
5
|
+
export * from './contest.js';
|
|
6
|
+
export * from './course.js';
|
|
7
|
+
export * from './entity.js';
|
|
8
|
+
export * from './excalidraw.js';
|
|
9
|
+
export * from './file.js';
|
|
10
|
+
export * from './image.js';
|
|
11
|
+
export * from './judge.js';
|
|
12
|
+
export * from './problem.js';
|
|
13
|
+
export * from './markdown.js';
|
|
14
|
+
export * from './mermaid.js';
|
|
15
|
+
export * from './scoreboard.js';
|
|
16
|
+
export * from './session.js';
|
|
17
|
+
export * from './socket.js';
|
|
18
|
+
export * from './statistics.js';
|
|
19
|
+
export * from './submission.js';
|
|
20
|
+
export * from './system.js';
|
|
21
|
+
export * from './url.js';
|
|
22
|
+
export * from './user.js';
|
|
23
|
+
export * from './virtual-user.js';
|
|
24
|
+
export * from './worksheet.js';
|
|
25
|
+
export * from './worksheet-submissions.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JudgeBaseDocument } from '../types';
|
|
1
|
+
import { JudgeBaseDocument } from '../types/index.js';
|
|
2
2
|
export interface JudgeDataResponseDto extends Omit<JudgeBaseDocument, 'getProblemUrl' | 'getUserSubmissionsUrl' | 'getLoginUrl' | 'getSubmitUrl'> {
|
|
3
3
|
}
|
|
4
4
|
export interface JudgeSummaryListResponseDto extends Omit<JudgeBaseDocument, 'getProblemUrl' | 'getUserSubmissionsUrl' | 'getSubmissionUrl' | 'getLoginUrl' | 'getProfileUrl' | 'getSubmitUrl'> {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MarkdownBaseDocument } from '../types';
|
|
2
|
-
import { EntityMembersDto, EntityMembersResponseDto } from './entity';
|
|
3
|
-
import { UserOrganizationBasicInfoResponseDto } from './user';
|
|
1
|
+
import { MarkdownBaseDocument } from '../types/index.js';
|
|
2
|
+
import { EntityMembersDto, EntityMembersResponseDto } from './entity.js';
|
|
3
|
+
import { UserOrganizationBasicInfoResponseDto } from './user.js';
|
|
4
4
|
export interface MarkdownResponseDto extends Omit<MarkdownBaseDocument, 'members'> {
|
|
5
5
|
owner: UserOrganizationBasicInfoResponseDto;
|
|
6
6
|
members: EntityMembersResponseDto;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MermaidBaseDocument } from '../types';
|
|
2
|
-
import { EntityMembersDto, EntityMembersResponseDto } from './entity';
|
|
3
|
-
import { UserOrganizationBasicInfoResponseDto } from './user';
|
|
1
|
+
import { MermaidBaseDocument } from '../types/index.js';
|
|
2
|
+
import { EntityMembersDto, EntityMembersResponseDto } from './entity.js';
|
|
3
|
+
import { UserOrganizationBasicInfoResponseDto } from './user.js';
|
|
4
4
|
export interface MermaidResponseDto extends Omit<MermaidBaseDocument, 'members'> {
|
|
5
5
|
owner: UserOrganizationBasicInfoResponseDto;
|
|
6
6
|
members: EntityMembersResponseDto;
|