@juki-team/commons 0.1.31
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/README.md +3 -0
- package/biome.shared.json +102 -0
- package/dist/constants/commons.d.ts +62 -0
- package/dist/constants/commons.js +658 -0
- package/dist/constants/company.d.ts +9 -0
- package/dist/constants/company.js +24 -0
- package/dist/constants/contest.d.ts +15 -0
- package/dist/constants/contest.js +29 -0
- package/dist/constants/course.d.ts +8 -0
- package/dist/constants/course.js +12 -0
- package/dist/constants/date.d.ts +9 -0
- package/dist/constants/date.js +23 -0
- package/dist/constants/email.d.ts +2 -0
- package/dist/constants/email.js +34 -0
- package/dist/constants/entity.d.ts +3 -0
- package/dist/constants/entity.js +18 -0
- package/dist/constants/file.d.ts +28 -0
- package/dist/constants/file.js +46 -0
- package/dist/constants/index.d.ts +18 -0
- package/dist/constants/index.js +18 -0
- package/dist/constants/judge.d.ts +37 -0
- package/dist/constants/judge.js +221 -0
- package/dist/constants/problem.d.ts +37 -0
- package/dist/constants/problem.js +72 -0
- package/dist/constants/routing.d.ts +7 -0
- package/dist/constants/routing.js +7 -0
- package/dist/constants/services.d.ts +5 -0
- package/dist/constants/services.js +131 -0
- package/dist/constants/system.d.ts +8 -0
- package/dist/constants/system.js +9 -0
- package/dist/constants/teams.d.ts +15 -0
- package/dist/constants/teams.js +18 -0
- package/dist/constants/time.d.ts +9 -0
- package/dist/constants/time.js +9 -0
- package/dist/constants/user.d.ts +10 -0
- package/dist/constants/user.js +35 -0
- package/dist/constants/websocket.d.ts +6 -0
- package/dist/constants/websocket.js +5 -0
- package/dist/constants/worksheet.d.ts +11 -0
- package/dist/constants/worksheet.js +66 -0
- package/dist/dto/class.d.ts +115 -0
- package/dist/dto/class.js +1 -0
- package/dist/dto/code.d.ts +13 -0
- package/dist/dto/code.js +1 -0
- package/dist/dto/comments.d.ts +21 -0
- package/dist/dto/comments.js +1 -0
- package/dist/dto/contest.d.ts +95 -0
- package/dist/dto/contest.js +7 -0
- package/dist/dto/course.d.ts +34 -0
- package/dist/dto/course.js +1 -0
- package/dist/dto/entity.d.ts +92 -0
- package/dist/dto/entity.js +5 -0
- package/dist/dto/excalidraw.d.ts +12 -0
- package/dist/dto/excalidraw.js +1 -0
- package/dist/dto/file.d.ts +34 -0
- package/dist/dto/file.js +1 -0
- package/dist/dto/image.d.ts +6 -0
- package/dist/dto/image.js +1 -0
- package/dist/dto/index.d.ts +24 -0
- package/dist/dto/index.js +24 -0
- package/dist/dto/judge.d.ts +16 -0
- package/dist/dto/judge.js +1 -0
- package/dist/dto/markdown.d.ts +12 -0
- package/dist/dto/markdown.js +1 -0
- package/dist/dto/mermaid.d.ts +12 -0
- package/dist/dto/mermaid.js +1 -0
- package/dist/dto/organization.d.ts +102 -0
- package/dist/dto/organization.js +1 -0
- package/dist/dto/problem.d.ts +67 -0
- package/dist/dto/problem.js +1 -0
- package/dist/dto/scoreboard.d.ts +35 -0
- package/dist/dto/scoreboard.js +1 -0
- package/dist/dto/session.d.ts +15 -0
- package/dist/dto/session.js +1 -0
- package/dist/dto/socket.d.ts +257 -0
- package/dist/dto/socket.js +1 -0
- package/dist/dto/statistics.d.ts +43 -0
- package/dist/dto/statistics.js +1 -0
- package/dist/dto/submission.d.ts +95 -0
- package/dist/dto/submission.js +1 -0
- package/dist/dto/system.d.ts +91 -0
- package/dist/dto/system.js +1 -0
- package/dist/dto/url.d.ts +8 -0
- package/dist/dto/url.js +1 -0
- package/dist/dto/user.d.ts +109 -0
- package/dist/dto/user.js +1 -0
- package/dist/dto/virtual-user.d.ts +39 -0
- package/dist/dto/virtual-user.js +1 -0
- package/dist/dto/worksheet-submissions.d.ts +64 -0
- package/dist/dto/worksheet-submissions.js +1 -0
- package/dist/dto/worksheet.d.ts +39 -0
- package/dist/dto/worksheet.js +1 -0
- package/dist/helpers/class.d.ts +4 -0
- package/dist/helpers/class.js +10 -0
- package/dist/helpers/comments.d.ts +4 -0
- package/dist/helpers/comments.js +4 -0
- package/dist/helpers/commons.d.ts +33 -0
- package/dist/helpers/commons.js +191 -0
- package/dist/helpers/contest.d.ts +5 -0
- package/dist/helpers/contest.js +21 -0
- package/dist/helpers/document.d.ts +14 -0
- package/dist/helpers/document.js +38 -0
- package/dist/helpers/file.d.ts +1 -0
- package/dist/helpers/file.js +4 -0
- package/dist/helpers/index.d.ts +14 -0
- package/dist/helpers/index.js +14 -0
- package/dist/helpers/interval.d.ts +2 -0
- package/dist/helpers/interval.js +22 -0
- package/dist/helpers/judging.d.ts +25 -0
- package/dist/helpers/judging.js +107 -0
- package/dist/helpers/object.d.ts +1 -0
- package/dist/helpers/object.js +32 -0
- package/dist/helpers/responses.d.ts +8 -0
- package/dist/helpers/responses.js +78 -0
- package/dist/helpers/socket.d.ts +45 -0
- package/dist/helpers/socket.js +238 -0
- package/dist/helpers/time.d.ts +13 -0
- package/dist/helpers/time.js +101 -0
- package/dist/helpers/user.d.ts +11 -0
- package/dist/helpers/user.js +14 -0
- package/dist/helpers/worksheet.d.ts +10 -0
- package/dist/helpers/worksheet.js +131 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/prisma/enums/AssignmentClassType.d.ts +7 -0
- package/dist/prisma/enums/AssignmentClassType.js +6 -0
- package/dist/prisma/enums/ContestEventAction.d.ts +10 -0
- package/dist/prisma/enums/ContestEventAction.js +9 -0
- package/dist/prisma/enums/ContestProblemPrerequisiteType.d.ts +5 -0
- package/dist/prisma/enums/ContestProblemPrerequisiteType.js +4 -0
- package/dist/prisma/enums/ContestRole.d.ts +11 -0
- package/dist/prisma/enums/ContestRole.js +10 -0
- package/dist/prisma/enums/ContestStatus.d.ts +6 -0
- package/dist/prisma/enums/ContestStatus.js +5 -0
- package/dist/prisma/enums/CourseRole.d.ts +12 -0
- package/dist/prisma/enums/CourseRole.js +11 -0
- package/dist/prisma/enums/EntityObjectType.d.ts +13 -0
- package/dist/prisma/enums/EntityObjectType.js +12 -0
- package/dist/prisma/enums/EntityRole.d.ts +8 -0
- package/dist/prisma/enums/EntityRole.js +7 -0
- package/dist/prisma/enums/EntitySubjectType.d.ts +7 -0
- package/dist/prisma/enums/EntitySubjectType.js +6 -0
- package/dist/prisma/enums/FileRole.d.ts +9 -0
- package/dist/prisma/enums/FileRole.js +8 -0
- package/dist/prisma/enums/FileType.d.ts +5 -0
- package/dist/prisma/enums/FileType.js +4 -0
- package/dist/prisma/enums/GroupType.d.ts +5 -0
- package/dist/prisma/enums/GroupType.js +4 -0
- package/dist/prisma/enums/JudgeType.d.ts +12 -0
- package/dist/prisma/enums/JudgeType.js +11 -0
- package/dist/prisma/enums/OrganizationPlan.d.ts +7 -0
- package/dist/prisma/enums/OrganizationPlan.js +6 -0
- package/dist/prisma/enums/ProblemRole.d.ts +11 -0
- package/dist/prisma/enums/ProblemRole.js +10 -0
- package/dist/prisma/enums/ProblemScoringMode.d.ts +6 -0
- package/dist/prisma/enums/ProblemScoringMode.js +5 -0
- package/dist/prisma/enums/ProblemType.d.ts +6 -0
- package/dist/prisma/enums/ProblemType.js +5 -0
- package/dist/prisma/enums/ProblemVerdict.d.ts +14 -0
- package/dist/prisma/enums/ProblemVerdict.js +13 -0
- package/dist/prisma/enums/ShareLinkVisibility.d.ts +5 -0
- package/dist/prisma/enums/ShareLinkVisibility.js +4 -0
- package/dist/prisma/enums/SubmissionRunStatus.d.ts +18 -0
- package/dist/prisma/enums/SubmissionRunStatus.js +17 -0
- package/dist/prisma/enums/SystemRole.d.ts +9 -0
- package/dist/prisma/enums/SystemRole.js +8 -0
- package/dist/prisma/enums/TeamRole.d.ts +9 -0
- package/dist/prisma/enums/TeamRole.js +8 -0
- package/dist/prisma/enums/TelemetryType.d.ts +9 -0
- package/dist/prisma/enums/TelemetryType.js +8 -0
- package/dist/prisma/enums/UserRole.d.ts +10 -0
- package/dist/prisma/enums/UserRole.js +9 -0
- package/dist/prisma/enums/WorkingIn.d.ts +8 -0
- package/dist/prisma/enums/WorkingIn.js +7 -0
- package/dist/prisma/enums/WorksheetContentType.d.ts +10 -0
- package/dist/prisma/enums/WorksheetContentType.js +9 -0
- package/dist/prisma/enums/index.d.ts +26 -0
- package/dist/prisma/enums/index.js +26 -0
- package/dist/prototypes/Date.d.ts +62 -0
- package/dist/prototypes/Date.js +218 -0
- package/dist/prototypes/Error.d.ts +10 -0
- package/dist/prototypes/Error.js +17 -0
- package/dist/prototypes/Number.d.ts +7 -0
- package/dist/prototypes/Number.js +8 -0
- package/dist/prototypes/index.d.ts +3 -0
- package/dist/prototypes/index.js +3 -0
- package/dist/types/account.d.ts +9 -0
- package/dist/types/account.js +10 -0
- package/dist/types/class.d.ts +67 -0
- package/dist/types/class.js +7 -0
- package/dist/types/comments.d.ts +17 -0
- package/dist/types/comments.js +1 -0
- package/dist/types/commons.d.ts +84 -0
- package/dist/types/commons.js +69 -0
- package/dist/types/company.d.ts +6 -0
- package/dist/types/company.js +7 -0
- package/dist/types/contest.d.ts +144 -0
- package/dist/types/contest.js +6 -0
- package/dist/types/course.d.ts +13 -0
- package/dist/types/course.js +1 -0
- package/dist/types/entity.d.ts +116 -0
- package/dist/types/entity.js +50 -0
- package/dist/types/excalidraw.d.ts +9 -0
- package/dist/types/excalidraw.js +1 -0
- package/dist/types/file.d.ts +22 -0
- package/dist/types/file.js +13 -0
- package/dist/types/group.d.ts +9 -0
- package/dist/types/group.js +1 -0
- package/dist/types/index.d.ts +23 -0
- package/dist/types/index.js +23 -0
- package/dist/types/judge.d.ts +46 -0
- package/dist/types/judge.js +17 -0
- package/dist/types/markdown.d.ts +8 -0
- package/dist/types/markdown.js +1 -0
- package/dist/types/mermaid.d.ts +8 -0
- package/dist/types/mermaid.js +1 -0
- package/dist/types/notification.d.ts +7 -0
- package/dist/types/notification.js +8 -0
- package/dist/types/problems.d.ts +93 -0
- package/dist/types/problems.js +16 -0
- package/dist/types/services.d.ts +214 -0
- package/dist/types/services.js +147 -0
- package/dist/types/sheet.d.ts +104 -0
- package/dist/types/sheet.js +16 -0
- package/dist/types/socket.d.ts +49 -0
- package/dist/types/socket.js +49 -0
- package/dist/types/submission.d.ts +5 -0
- package/dist/types/submission.js +1 -0
- package/dist/types/teams.d.ts +96 -0
- package/dist/types/teams.js +28 -0
- package/dist/types/users.d.ts +65 -0
- package/dist/types/users.js +33 -0
- package/dist/types/worksheet.d.ts +42 -0
- package/dist/types/worksheet.js +11 -0
- package/package.json +42 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export var CodeLanguage;
|
|
2
|
+
(function (CodeLanguage) {
|
|
3
|
+
CodeLanguage["C_11"] = "c11";
|
|
4
|
+
CodeLanguage["CPP_11"] = "cpp11";
|
|
5
|
+
CodeLanguage["CPP_20"] = "cpp20";
|
|
6
|
+
CodeLanguage["JAVA_21"] = "java21";
|
|
7
|
+
CodeLanguage["PYTHON_3"] = "python3";
|
|
8
|
+
CodeLanguage["PYTHON_PYPY_3"] = "pypy3";
|
|
9
|
+
CodeLanguage["JAVASCRIPT_NODE_JS_22"] = "nodejs22";
|
|
10
|
+
// DEPRECATED
|
|
11
|
+
CodeLanguage["PYTHON_2"] = "python2";
|
|
12
|
+
CodeLanguage["PYTHON_PYPY_2"] = "pypy2";
|
|
13
|
+
CodeLanguage["ICPC_C"] = "ICPC_C";
|
|
14
|
+
CodeLanguage["C"] = "C";
|
|
15
|
+
CodeLanguage["CPP"] = "CPP";
|
|
16
|
+
CodeLanguage["ICPC_CPP"] = "ICPC_CPP";
|
|
17
|
+
CodeLanguage["CPP11"] = "CPP11";
|
|
18
|
+
CodeLanguage["CPP14"] = "CPP14";
|
|
19
|
+
CodeLanguage["CPP17"] = "CPP17";
|
|
20
|
+
CodeLanguage["JAVA"] = "JAVA";
|
|
21
|
+
CodeLanguage["ICPC_PYTHON"] = "ICPC_PYTHON";
|
|
22
|
+
CodeLanguage["PYTHON"] = "PYTHON";
|
|
23
|
+
CodeLanguage["PYTHON2"] = "PYTHON2";
|
|
24
|
+
CodeLanguage["PYTHON3"] = "PYTHON3";
|
|
25
|
+
CodeLanguage["JAVASCRIPT"] = "JAVASCRIPT";
|
|
26
|
+
CodeLanguage["TYPESCRIPT"] = "TYPESCRIPT";
|
|
27
|
+
CodeLanguage["JSX"] = "JSX";
|
|
28
|
+
CodeLanguage["TSX"] = "TSX";
|
|
29
|
+
CodeLanguage["MDX"] = "MDX";
|
|
30
|
+
CodeLanguage["PSEUDOCODE_PSEINT"] = "PSEUDOCODE_PSEINT";
|
|
31
|
+
CodeLanguage["LATEX"] = "LATEX";
|
|
32
|
+
CodeLanguage["JSON"] = "JSON";
|
|
33
|
+
CodeLanguage["HTML"] = "HTML";
|
|
34
|
+
CodeLanguage["TEXT"] = "TEXT";
|
|
35
|
+
CodeLanguage["DIFF"] = "DIFF";
|
|
36
|
+
CodeLanguage["MARKDOWN"] = "MARKDOWN";
|
|
37
|
+
CodeLanguage["ARDUINO"] = "ARDUINO";
|
|
38
|
+
CodeLanguage["DOT"] = "DOT";
|
|
39
|
+
CodeLanguage["MERMAID"] = "MERMAID";
|
|
40
|
+
CodeLanguage["BASH"] = "BASH";
|
|
41
|
+
})(CodeLanguage || (CodeLanguage = {}));
|
|
42
|
+
export var ScopeData;
|
|
43
|
+
(function (ScopeData) {
|
|
44
|
+
ScopeData["USER"] = "USER";
|
|
45
|
+
ScopeData["PROBLEM"] = "PROBLEM";
|
|
46
|
+
ScopeData["CONTEST"] = "CONTEST";
|
|
47
|
+
ScopeData["ATTEMPT"] = "ATTEMPT";
|
|
48
|
+
})(ScopeData || (ScopeData = {}));
|
|
49
|
+
export var Status;
|
|
50
|
+
(function (Status) {
|
|
51
|
+
Status["SUCCESS"] = "SUCCESS";
|
|
52
|
+
Status["ERROR"] = "ERROR";
|
|
53
|
+
Status["LOADING"] = "LOADING";
|
|
54
|
+
Status["NONE"] = "NONE";
|
|
55
|
+
})(Status || (Status = {}));
|
|
56
|
+
export var EntityStatus;
|
|
57
|
+
(function (EntityStatus) {
|
|
58
|
+
EntityStatus["PUBLIC"] = "PUBLIC";
|
|
59
|
+
EntityStatus["RESERVED"] = "RESERVED";
|
|
60
|
+
EntityStatus["PRIVATE"] = "PRIVATE";
|
|
61
|
+
EntityStatus["ARCHIVED"] = "ARCHIVED";
|
|
62
|
+
})(EntityStatus || (EntityStatus = {}));
|
|
63
|
+
export var EntityAccess;
|
|
64
|
+
(function (EntityAccess) {
|
|
65
|
+
EntityAccess["PRIVATE"] = "PRIVATE";
|
|
66
|
+
EntityAccess["RESTRICTED"] = "RESTRICTED";
|
|
67
|
+
EntityAccess["PUBLIC"] = "PUBLIC";
|
|
68
|
+
EntityAccess["EXPOSED"] = "EXPOSED";
|
|
69
|
+
})(EntityAccess || (EntityAccess = {}));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var OrganizationLogoType;
|
|
2
|
+
(function (OrganizationLogoType) {
|
|
3
|
+
OrganizationLogoType["HORIZONTAL_WHITE"] = "horizontal-white";
|
|
4
|
+
OrganizationLogoType["HORIZONTAL_COLOR"] = "horizontal-color";
|
|
5
|
+
OrganizationLogoType["VERTICAL_WHITE"] = "vertical-white";
|
|
6
|
+
OrganizationLogoType["VERTICAL_COLOR"] = "vertical-color";
|
|
7
|
+
})(OrganizationLogoType || (OrganizationLogoType = {}));
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import type { ContestDataResponseDTO, UpsertContestDTO, UserOrganizationBasicInfoResponseDTO } from '../dto/index.js';
|
|
2
|
+
import type { ContestEventAction, ContestProblemPrerequisiteType } from '../prisma/enums/index.js';
|
|
3
|
+
import type { CodeLanguage } from './commons.js';
|
|
4
|
+
import type { EntityMembers } from './entity.js';
|
|
5
|
+
import type { Judge } from './judge.js';
|
|
6
|
+
import type { UserBasicInfo } from './users.js';
|
|
7
|
+
export declare enum ContestTimeStatus {
|
|
8
|
+
UPCOMING = "upcoming",
|
|
9
|
+
LIVE = "live",
|
|
10
|
+
PAST = "past"
|
|
11
|
+
}
|
|
12
|
+
export type MetaProblemSearcher = {
|
|
13
|
+
name: string;
|
|
14
|
+
url: string;
|
|
15
|
+
id: string;
|
|
16
|
+
rating: number;
|
|
17
|
+
tag: string;
|
|
18
|
+
judge: Judge;
|
|
19
|
+
};
|
|
20
|
+
export type BaseClarification = {
|
|
21
|
+
answer: string;
|
|
22
|
+
publicVisible: boolean;
|
|
23
|
+
};
|
|
24
|
+
export interface NewClarification extends BaseClarification {
|
|
25
|
+
problem: string;
|
|
26
|
+
question: string;
|
|
27
|
+
}
|
|
28
|
+
export interface AnswerClarification extends NewClarification {
|
|
29
|
+
answered: boolean;
|
|
30
|
+
answeredTime: number;
|
|
31
|
+
judgeType: false;
|
|
32
|
+
user: string;
|
|
33
|
+
userAnswer: string;
|
|
34
|
+
id: string;
|
|
35
|
+
}
|
|
36
|
+
export type ContestUser = {
|
|
37
|
+
isOwner: boolean;
|
|
38
|
+
isAdministrator: boolean;
|
|
39
|
+
isManager: boolean;
|
|
40
|
+
isParticipant: boolean;
|
|
41
|
+
isGuest: boolean;
|
|
42
|
+
isSpectator: boolean;
|
|
43
|
+
};
|
|
44
|
+
export type ContestClarification = {
|
|
45
|
+
key: string;
|
|
46
|
+
problemJudgeKey: string;
|
|
47
|
+
question: string;
|
|
48
|
+
questionUser: UserOrganizationBasicInfoResponseDTO;
|
|
49
|
+
questionTimestamp: number;
|
|
50
|
+
answer: string;
|
|
51
|
+
answerTimestamp: number;
|
|
52
|
+
answerUser: UserOrganizationBasicInfoResponseDTO;
|
|
53
|
+
public: boolean;
|
|
54
|
+
};
|
|
55
|
+
export type ContestProblemPrerequisite = {
|
|
56
|
+
problemId: string;
|
|
57
|
+
type: ContestProblemPrerequisiteType;
|
|
58
|
+
delay: number;
|
|
59
|
+
};
|
|
60
|
+
export type ContestProblem = {
|
|
61
|
+
id: string;
|
|
62
|
+
index: string;
|
|
63
|
+
points: number;
|
|
64
|
+
color: string;
|
|
65
|
+
startTimestamp: number;
|
|
66
|
+
endTimestamp: number;
|
|
67
|
+
prerequisites: ContestProblemPrerequisite[];
|
|
68
|
+
maxAcceptedUsers: number;
|
|
69
|
+
group: string;
|
|
70
|
+
};
|
|
71
|
+
export type ContestSettings = {
|
|
72
|
+
clarifications: boolean;
|
|
73
|
+
numberJudgeValidations: number;
|
|
74
|
+
languages: CodeLanguage[];
|
|
75
|
+
penalty: number;
|
|
76
|
+
timeToSolve: number;
|
|
77
|
+
startTimestamp: number;
|
|
78
|
+
frozenTimestamp: number;
|
|
79
|
+
quietTimestamp: number;
|
|
80
|
+
endTimestamp: number;
|
|
81
|
+
scoreboardLocked: boolean;
|
|
82
|
+
upsolvingEnabled: boolean;
|
|
83
|
+
};
|
|
84
|
+
export type MemberUserData = {
|
|
85
|
+
userId: string;
|
|
86
|
+
lastVisitTimestamp: number | null;
|
|
87
|
+
joinedAtTimestamp: number;
|
|
88
|
+
};
|
|
89
|
+
export type ContestMembersBasic = {
|
|
90
|
+
administrators: {
|
|
91
|
+
[key: string]: MemberUserData;
|
|
92
|
+
};
|
|
93
|
+
judges: {
|
|
94
|
+
[key: string]: MemberUserData;
|
|
95
|
+
};
|
|
96
|
+
guests: {
|
|
97
|
+
[key: string]: MemberUserData;
|
|
98
|
+
};
|
|
99
|
+
spectators: {
|
|
100
|
+
[key: string]: MemberUserData;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
export interface ContestEvent {
|
|
104
|
+
action: ContestEventAction;
|
|
105
|
+
userId: string;
|
|
106
|
+
timestamp: number;
|
|
107
|
+
details: Record<string, unknown>;
|
|
108
|
+
}
|
|
109
|
+
export interface ContestGroup {
|
|
110
|
+
label: string;
|
|
111
|
+
value: string;
|
|
112
|
+
color: string;
|
|
113
|
+
}
|
|
114
|
+
export interface ContestBaseDocument {
|
|
115
|
+
key: string;
|
|
116
|
+
name: string;
|
|
117
|
+
description: string;
|
|
118
|
+
settings: ContestSettings;
|
|
119
|
+
problems: Record<string, ContestProblem>;
|
|
120
|
+
members: EntityMembers;
|
|
121
|
+
tags: string[];
|
|
122
|
+
groups: Record<string, ContestGroup>;
|
|
123
|
+
events: ContestEvent[];
|
|
124
|
+
}
|
|
125
|
+
export type ContestMembersResponse = {
|
|
126
|
+
administrators: {
|
|
127
|
+
[key: string]: UserBasicInfo;
|
|
128
|
+
};
|
|
129
|
+
judges: {
|
|
130
|
+
[key: string]: UserBasicInfo;
|
|
131
|
+
};
|
|
132
|
+
guests: {
|
|
133
|
+
[key: string]: UserBasicInfo;
|
|
134
|
+
};
|
|
135
|
+
spectators: {
|
|
136
|
+
[key: string]: UserBasicInfo;
|
|
137
|
+
};
|
|
138
|
+
contestants: {
|
|
139
|
+
[key: string]: UserBasicInfo;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
export type ContestTimeData = Pick<ContestDataResponseDTO, 'isLive' | 'isFrozenTime' | 'isQuietTime' | 'isEndless' | 'isPast' | 'isFuture' | 'isGlobal'> & {
|
|
143
|
+
settings: Pick<UpsertContestDTO['settings'], 'penalty' | 'startTimestamp' | 'frozenTimestamp' | 'quietTimestamp' | 'endTimestamp' | 'upsolvingEnabled'>;
|
|
144
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { EntityMembers, EntityState } from './entity.js';
|
|
2
|
+
export interface CourseBaseDocument {
|
|
3
|
+
key: string;
|
|
4
|
+
title: string;
|
|
5
|
+
abstract: string;
|
|
6
|
+
description: string;
|
|
7
|
+
coverImageUrl: string;
|
|
8
|
+
state: EntityState;
|
|
9
|
+
lessons: {
|
|
10
|
+
worksheetId: string;
|
|
11
|
+
}[];
|
|
12
|
+
members: EntityMembers;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import type { UserOrganizationBasicInfoResponseDTO } from '../dto/index.js';
|
|
2
|
+
export declare enum EntityMembersRank {
|
|
3
|
+
NONE = "NONE",
|
|
4
|
+
CLOSE = "CLOSE",
|
|
5
|
+
OPEN = "OPEN"
|
|
6
|
+
}
|
|
7
|
+
export declare enum EntityState {
|
|
8
|
+
RELEASED = "RELEASED",
|
|
9
|
+
ARCHIVED = "ARCHIVED"
|
|
10
|
+
}
|
|
11
|
+
export type EntityUsersMemberUserData = {
|
|
12
|
+
userId: string;
|
|
13
|
+
lastVisitTimestamp: number | null;
|
|
14
|
+
joinedAtTimestamp: number;
|
|
15
|
+
};
|
|
16
|
+
export type EntityTeamsMemberUserData = {
|
|
17
|
+
teamId: string;
|
|
18
|
+
lastVisitTimestamp: number | null;
|
|
19
|
+
joinedAtTimestamp: number;
|
|
20
|
+
};
|
|
21
|
+
export type EntityMembersUserData = EntityUsersMemberUserData | EntityTeamsMemberUserData;
|
|
22
|
+
export interface EntityMembers {
|
|
23
|
+
rankAdministrators: EntityMembersRank;
|
|
24
|
+
administrators: {
|
|
25
|
+
[key: string]: EntityMembersUserData;
|
|
26
|
+
};
|
|
27
|
+
rankManagers: EntityMembersRank;
|
|
28
|
+
managers: {
|
|
29
|
+
[key: string]: EntityMembersUserData;
|
|
30
|
+
};
|
|
31
|
+
rankGuests: EntityMembersRank;
|
|
32
|
+
guests: {
|
|
33
|
+
[key: string]: EntityMembersUserData;
|
|
34
|
+
};
|
|
35
|
+
rankSpectators: EntityMembersRank;
|
|
36
|
+
spectators: {
|
|
37
|
+
[key: string]: EntityMembersUserData;
|
|
38
|
+
};
|
|
39
|
+
rankParticipants: EntityMembersRank;
|
|
40
|
+
participants: {
|
|
41
|
+
[key: string]: EntityMembersUserData;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export interface EntityOwnerDocument {
|
|
45
|
+
ownerUserId: string;
|
|
46
|
+
}
|
|
47
|
+
export interface EntityCompanyDocument {
|
|
48
|
+
companyId: string;
|
|
49
|
+
}
|
|
50
|
+
export interface EntityTimestampsDocument {
|
|
51
|
+
createdAt: Date;
|
|
52
|
+
updatedAt: Date;
|
|
53
|
+
}
|
|
54
|
+
export interface EntityStateDocument {
|
|
55
|
+
state: EntityState;
|
|
56
|
+
}
|
|
57
|
+
export interface EntityLogChanges {
|
|
58
|
+
key: string;
|
|
59
|
+
path: string;
|
|
60
|
+
valueType: string | null;
|
|
61
|
+
value?: unknown;
|
|
62
|
+
oldValue?: unknown;
|
|
63
|
+
type: LogOperation;
|
|
64
|
+
}
|
|
65
|
+
export interface EntityLog {
|
|
66
|
+
changes: EntityLogChanges[];
|
|
67
|
+
timestamp: number;
|
|
68
|
+
customerUserId: string;
|
|
69
|
+
}
|
|
70
|
+
export interface EntityLogsDocument {
|
|
71
|
+
logs: EntityLog[];
|
|
72
|
+
}
|
|
73
|
+
export type NewEntityDocument<T> = T & EntityCompanyDocument & EntityOwnerDocument & EntityTimestampsDocument & EntityStateDocument & EntityLogsDocument;
|
|
74
|
+
export type CreateEntityDocument<T> = Omit<T, '_id' | 'createdAt' | 'updatedAt' | 'companyId' | 'ownerUserId' | 'state' | 'logs'>;
|
|
75
|
+
export type UpdateEntityDocument<T> = Partial<Omit<T, '_id' | 'createdAt' | 'updatedAt' | 'companyId' | 'ownerUserId' | 'state' | 'logs' | 'key'>>;
|
|
76
|
+
export declare enum EntityCollection {
|
|
77
|
+
COMPANY = "COMPANY",
|
|
78
|
+
PROBLEM = "PROBLEM",
|
|
79
|
+
CONTEST = "CONTEST",
|
|
80
|
+
JUDGE = "JUDGE",
|
|
81
|
+
USER = "USER",
|
|
82
|
+
SUBMISSION = "SUBMISSION"
|
|
83
|
+
}
|
|
84
|
+
export declare enum CollectionKey {
|
|
85
|
+
COMPANY = "C",
|
|
86
|
+
USER = "U",
|
|
87
|
+
PROBLEM = "P",
|
|
88
|
+
CLASS = "K",
|
|
89
|
+
CLASS_ASSIGNMENT = "KA",
|
|
90
|
+
CONTEST = "T",
|
|
91
|
+
SCOREBOARD = "B",
|
|
92
|
+
SCOREBOARD_EVENTS = "BE",
|
|
93
|
+
COURSE = "R",
|
|
94
|
+
FILE = "F",
|
|
95
|
+
GROUP = "G",
|
|
96
|
+
JUDGE = "J",
|
|
97
|
+
WORKSHEET = "W",
|
|
98
|
+
WORKSHEET_SUBMISSIONS = "WS",
|
|
99
|
+
SUBMIT = "S",
|
|
100
|
+
LOCALE = "L",
|
|
101
|
+
COMMENT = "M",
|
|
102
|
+
EXCALIDRAW = "E",
|
|
103
|
+
MARKDOWN = "MD",
|
|
104
|
+
DOCUMENT_TEMPLATE = "DT",
|
|
105
|
+
MERMAID = "MM"
|
|
106
|
+
}
|
|
107
|
+
export declare enum LogOperation {
|
|
108
|
+
REMOVE = "REMOVE",
|
|
109
|
+
ADD = "ADD",
|
|
110
|
+
UPDATE = "UPDATE"
|
|
111
|
+
}
|
|
112
|
+
export interface LogDataResponseDTO {
|
|
113
|
+
changes: EntityLogChanges[];
|
|
114
|
+
timestamp: number;
|
|
115
|
+
customerUser: UserOrganizationBasicInfoResponseDTO;
|
|
116
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export var EntityMembersRank;
|
|
2
|
+
(function (EntityMembersRank) {
|
|
3
|
+
EntityMembersRank["NONE"] = "NONE";
|
|
4
|
+
EntityMembersRank["CLOSE"] = "CLOSE";
|
|
5
|
+
EntityMembersRank["OPEN"] = "OPEN";
|
|
6
|
+
})(EntityMembersRank || (EntityMembersRank = {}));
|
|
7
|
+
export var EntityState;
|
|
8
|
+
(function (EntityState) {
|
|
9
|
+
EntityState["RELEASED"] = "RELEASED";
|
|
10
|
+
EntityState["ARCHIVED"] = "ARCHIVED";
|
|
11
|
+
})(EntityState || (EntityState = {}));
|
|
12
|
+
export var EntityCollection;
|
|
13
|
+
(function (EntityCollection) {
|
|
14
|
+
EntityCollection["COMPANY"] = "COMPANY";
|
|
15
|
+
EntityCollection["PROBLEM"] = "PROBLEM";
|
|
16
|
+
EntityCollection["CONTEST"] = "CONTEST";
|
|
17
|
+
EntityCollection["JUDGE"] = "JUDGE";
|
|
18
|
+
EntityCollection["USER"] = "USER";
|
|
19
|
+
EntityCollection["SUBMISSION"] = "SUBMISSION";
|
|
20
|
+
})(EntityCollection || (EntityCollection = {}));
|
|
21
|
+
export var CollectionKey;
|
|
22
|
+
(function (CollectionKey) {
|
|
23
|
+
CollectionKey["COMPANY"] = "C";
|
|
24
|
+
CollectionKey["USER"] = "U";
|
|
25
|
+
CollectionKey["PROBLEM"] = "P";
|
|
26
|
+
CollectionKey["CLASS"] = "K";
|
|
27
|
+
CollectionKey["CLASS_ASSIGNMENT"] = "KA";
|
|
28
|
+
CollectionKey["CONTEST"] = "T";
|
|
29
|
+
CollectionKey["SCOREBOARD"] = "B";
|
|
30
|
+
CollectionKey["SCOREBOARD_EVENTS"] = "BE";
|
|
31
|
+
CollectionKey["COURSE"] = "R";
|
|
32
|
+
CollectionKey["FILE"] = "F";
|
|
33
|
+
CollectionKey["GROUP"] = "G";
|
|
34
|
+
CollectionKey["JUDGE"] = "J";
|
|
35
|
+
CollectionKey["WORKSHEET"] = "W";
|
|
36
|
+
CollectionKey["WORKSHEET_SUBMISSIONS"] = "WS";
|
|
37
|
+
CollectionKey["SUBMIT"] = "S";
|
|
38
|
+
CollectionKey["LOCALE"] = "L";
|
|
39
|
+
CollectionKey["COMMENT"] = "M";
|
|
40
|
+
CollectionKey["EXCALIDRAW"] = "E";
|
|
41
|
+
CollectionKey["MARKDOWN"] = "MD";
|
|
42
|
+
CollectionKey["DOCUMENT_TEMPLATE"] = "DT";
|
|
43
|
+
CollectionKey["MERMAID"] = "MM";
|
|
44
|
+
})(CollectionKey || (CollectionKey = {}));
|
|
45
|
+
export var LogOperation;
|
|
46
|
+
(function (LogOperation) {
|
|
47
|
+
LogOperation["REMOVE"] = "REMOVE";
|
|
48
|
+
LogOperation["ADD"] = "ADD";
|
|
49
|
+
LogOperation["UPDATE"] = "UPDATE";
|
|
50
|
+
})(LogOperation || (LogOperation = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { FileType } from '../prisma/enums/index.js';
|
|
2
|
+
export declare enum FileMemberRole {
|
|
3
|
+
VIEWER = "VIEWER",
|
|
4
|
+
EDITOR = "EDITOR"
|
|
5
|
+
}
|
|
6
|
+
export type FolderFileContent = {
|
|
7
|
+
type: typeof FileType.FOLDER;
|
|
8
|
+
};
|
|
9
|
+
export type FileFileContent = {
|
|
10
|
+
type: typeof FileType.FILE;
|
|
11
|
+
mime: string;
|
|
12
|
+
key: string;
|
|
13
|
+
};
|
|
14
|
+
export type FileContent = FolderFileContent | FileFileContent;
|
|
15
|
+
export type SummaryFileContent = FolderFileContent | Omit<FileFileContent, 'key'>;
|
|
16
|
+
export declare enum FilesJukiPub {
|
|
17
|
+
SHARED = "shared",// files to share
|
|
18
|
+
SHARED_EXCALIDRAW = "shared/E",// `shared/${CollectionKey.EXCALIDRAW}`,
|
|
19
|
+
TEMP = "temp",// temporal files
|
|
20
|
+
PROBLEMS = "problems",
|
|
21
|
+
CONTESTS = "contests"
|
|
22
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export var FileMemberRole;
|
|
2
|
+
(function (FileMemberRole) {
|
|
3
|
+
FileMemberRole["VIEWER"] = "VIEWER";
|
|
4
|
+
FileMemberRole["EDITOR"] = "EDITOR";
|
|
5
|
+
})(FileMemberRole || (FileMemberRole = {}));
|
|
6
|
+
export var FilesJukiPub;
|
|
7
|
+
(function (FilesJukiPub) {
|
|
8
|
+
FilesJukiPub["SHARED"] = "shared";
|
|
9
|
+
FilesJukiPub["SHARED_EXCALIDRAW"] = "shared/E";
|
|
10
|
+
FilesJukiPub["TEMP"] = "temp";
|
|
11
|
+
FilesJukiPub["PROBLEMS"] = "problems";
|
|
12
|
+
FilesJukiPub["CONTESTS"] = "contests";
|
|
13
|
+
})(FilesJukiPub || (FilesJukiPub = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { GroupType } from '../prisma/enums/index.js';
|
|
2
|
+
import type { EntityMembers, EntityState } from './entity.js';
|
|
3
|
+
export interface GroupBaseDocument {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
state: EntityState;
|
|
7
|
+
types: GroupType;
|
|
8
|
+
members: EntityMembers;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export * from './account.js';
|
|
2
|
+
export * from './class.js';
|
|
3
|
+
export * from './comments.js';
|
|
4
|
+
export * from './commons.js';
|
|
5
|
+
export * from './company.js';
|
|
6
|
+
export * from './contest.js';
|
|
7
|
+
export * from './course.js';
|
|
8
|
+
export * from './entity.js';
|
|
9
|
+
export * from './excalidraw.js';
|
|
10
|
+
export * from './file.js';
|
|
11
|
+
export * from './group.js';
|
|
12
|
+
export * from './judge.js';
|
|
13
|
+
export * from './markdown.js';
|
|
14
|
+
export * from './mermaid.js';
|
|
15
|
+
export * from './notification.js';
|
|
16
|
+
export * from './problems.js';
|
|
17
|
+
export * from './services.js';
|
|
18
|
+
export * from './sheet.js';
|
|
19
|
+
export * from './socket.js';
|
|
20
|
+
export * from './submission.js';
|
|
21
|
+
export * from './teams.js';
|
|
22
|
+
export * from './users.js';
|
|
23
|
+
export * from './worksheet.js';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export * from './account.js';
|
|
2
|
+
export * from './class.js';
|
|
3
|
+
export * from './comments.js';
|
|
4
|
+
export * from './commons.js';
|
|
5
|
+
export * from './company.js';
|
|
6
|
+
export * from './contest.js';
|
|
7
|
+
export * from './course.js';
|
|
8
|
+
export * from './entity.js';
|
|
9
|
+
export * from './excalidraw.js';
|
|
10
|
+
export * from './file.js';
|
|
11
|
+
export * from './group.js';
|
|
12
|
+
export * from './judge.js';
|
|
13
|
+
export * from './markdown.js';
|
|
14
|
+
export * from './mermaid.js';
|
|
15
|
+
export * from './notification.js';
|
|
16
|
+
export * from './problems.js';
|
|
17
|
+
export * from './services.js';
|
|
18
|
+
export * from './sheet.js';
|
|
19
|
+
export * from './socket.js';
|
|
20
|
+
export * from './submission.js';
|
|
21
|
+
export * from './teams.js';
|
|
22
|
+
export * from './users.js';
|
|
23
|
+
export * from './worksheet.js';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ProblemVerdict } from '../prisma/enums/index.js';
|
|
2
|
+
import type { CodeLanguage } from './commons.js';
|
|
3
|
+
import type { DataLog } from './submission.js';
|
|
4
|
+
export type JudgeLanguage = {
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
associatedLanguage: CodeLanguage;
|
|
9
|
+
};
|
|
10
|
+
export interface JudgeBaseDocument {
|
|
11
|
+
key: string | Judge;
|
|
12
|
+
name: string;
|
|
13
|
+
languages: JudgeLanguage[];
|
|
14
|
+
problemTags: string[];
|
|
15
|
+
keyPrefix: string;
|
|
16
|
+
isExternal: boolean;
|
|
17
|
+
isSubmitSupported: boolean;
|
|
18
|
+
logo: string;
|
|
19
|
+
logoSize: [number, number];
|
|
20
|
+
url: string;
|
|
21
|
+
getLoginUrl: string;
|
|
22
|
+
getProfileUrl: string;
|
|
23
|
+
getSubmitUrl: string;
|
|
24
|
+
getSubmissionUrl: string;
|
|
25
|
+
getProblemUrl: string;
|
|
26
|
+
getUserSubmissionsUrl: string;
|
|
27
|
+
submissionsWithHighPriority: boolean;
|
|
28
|
+
}
|
|
29
|
+
export declare enum Judge {
|
|
30
|
+
JUKI_JUDGE = "JUKI_JUDGE",
|
|
31
|
+
CODEFORCES = "CODEFORCES",
|
|
32
|
+
CODEFORCES_GYM = "CODEFORCES_GYM",
|
|
33
|
+
JV_UMSA = "JV_UMSA",
|
|
34
|
+
UVA_ONLINE_JUDGE = "UVA_ONLINE_JUDGE",
|
|
35
|
+
AT_CODER = "AT_CODER",
|
|
36
|
+
CODECHEF = "CODECHEF",
|
|
37
|
+
TOPCODER = "TOPCODER",
|
|
38
|
+
LEETCODE = "LEETCODE"
|
|
39
|
+
}
|
|
40
|
+
export declare enum RunnerType {
|
|
41
|
+
HIGH_PERFORMANCE = "HIGH_PERFORMANCE",
|
|
42
|
+
LOW_PERFORMANCE = "LOW_PERFORMANCE"
|
|
43
|
+
}
|
|
44
|
+
export type TestCaseVerdict = DataLog & {
|
|
45
|
+
verdict: ProblemVerdict;
|
|
46
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export var Judge;
|
|
2
|
+
(function (Judge) {
|
|
3
|
+
Judge["JUKI_JUDGE"] = "JUKI_JUDGE";
|
|
4
|
+
Judge["CODEFORCES"] = "CODEFORCES";
|
|
5
|
+
Judge["CODEFORCES_GYM"] = "CODEFORCES_GYM";
|
|
6
|
+
Judge["JV_UMSA"] = "JV_UMSA";
|
|
7
|
+
Judge["UVA_ONLINE_JUDGE"] = "UVA_ONLINE_JUDGE";
|
|
8
|
+
Judge["AT_CODER"] = "AT_CODER";
|
|
9
|
+
Judge["CODECHEF"] = "CODECHEF";
|
|
10
|
+
Judge["TOPCODER"] = "TOPCODER";
|
|
11
|
+
Judge["LEETCODE"] = "LEETCODE";
|
|
12
|
+
})(Judge || (Judge = {}));
|
|
13
|
+
export var RunnerType;
|
|
14
|
+
(function (RunnerType) {
|
|
15
|
+
RunnerType["HIGH_PERFORMANCE"] = "HIGH_PERFORMANCE";
|
|
16
|
+
RunnerType["LOW_PERFORMANCE"] = "LOW_PERFORMANCE";
|
|
17
|
+
})(RunnerType || (RunnerType = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export var NotificationType;
|
|
2
|
+
(function (NotificationType) {
|
|
3
|
+
NotificationType["SUCCESS"] = "success";
|
|
4
|
+
NotificationType["INFO"] = "info";
|
|
5
|
+
NotificationType["WARNING"] = "warning";
|
|
6
|
+
NotificationType["ERROR"] = "error";
|
|
7
|
+
NotificationType["QUIET"] = "quiet";
|
|
8
|
+
})(NotificationType || (NotificationType = {}));
|