@juki-team/commons 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/commons.d.ts +1 -1
- package/dist/constants/commons.js +1 -1
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/dto/index.d.ts +2 -1
- package/dist/dto/index.js +2 -1
- package/dist/helpers/array.d.ts +3 -0
- package/dist/helpers/array.js +28 -0
- package/dist/helpers/console.d.ts +3 -0
- package/dist/helpers/console.js +9 -0
- package/dist/{date/index.d.ts → helpers/date.d.ts} +11 -0
- package/dist/{date/index.js → helpers/date.js} +24 -0
- package/dist/helpers/document.d.ts +1 -11
- package/dist/helpers/document.js +1 -21
- package/dist/helpers/duration.d.ts +2 -0
- package/dist/helpers/duration.js +57 -0
- package/dist/helpers/entity.d.ts +11 -0
- package/dist/helpers/entity.js +20 -0
- package/dist/helpers/file.d.ts +6 -1
- package/dist/helpers/file.js +23 -2
- package/dist/helpers/http.d.ts +1 -0
- package/dist/helpers/http.js +8 -0
- package/dist/helpers/index.d.ts +12 -3
- package/dist/helpers/index.js +12 -3
- package/dist/helpers/json.d.ts +3 -0
- package/dist/helpers/json.js +31 -0
- package/dist/helpers/object.d.ts +2 -0
- package/dist/helpers/object.js +28 -0
- package/dist/helpers/problem.d.ts +2 -0
- package/dist/helpers/problem.js +1 -0
- package/dist/helpers/responses.d.ts +1 -1
- package/dist/helpers/responses.js +3 -2
- package/dist/helpers/string.d.ts +7 -0
- package/dist/helpers/string.js +52 -0
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -3
- package/dist/prisma/enums/index.d.ts +11 -11
- package/dist/prisma/enums/index.js +11 -11
- package/dist/types/assignment.d.ts +28 -0
- package/dist/types/assignment.js +7 -0
- package/dist/types/class.d.ts +1 -27
- package/dist/types/class.js +1 -7
- package/dist/types/code.d.ts +39 -0
- package/dist/types/{commons.js → code.js} +0 -28
- package/dist/types/contest.d.ts +2 -2
- package/dist/types/device.d.ts +7 -0
- package/dist/types/device.js +1 -0
- package/dist/types/duration.d.ts +7 -0
- package/dist/types/duration.js +1 -0
- package/dist/types/entity.d.ts +12 -0
- package/dist/types/entity.js +14 -0
- package/dist/types/id.d.ts +3 -0
- package/dist/types/id.js +1 -0
- package/dist/types/index.d.ts +10 -5
- package/dist/types/index.js +10 -5
- package/dist/types/judge.d.ts +1 -1
- package/dist/types/{problems.d.ts → problem.d.ts} +2 -1
- package/dist/types/services.d.ts +1 -1
- package/dist/types/socket.d.ts +1 -1
- package/dist/types/state.d.ts +12 -0
- package/dist/types/state.js +14 -0
- package/dist/types/teams.d.ts +1 -1
- package/dist/types/text.d.ts +4 -0
- package/dist/types/text.js +1 -0
- package/dist/types/{users.d.ts → user.d.ts} +1 -1
- package/dist/types/{users.js → user.js} +1 -1
- package/dist/types/worksheet.d.ts +105 -2
- package/dist/types/worksheet.js +16 -0
- package/package.json +6 -19
- package/dist/helpers/commons.d.ts +0 -33
- package/dist/helpers/commons.js +0 -191
- package/dist/helpers/time.d.ts +0 -13
- package/dist/helpers/time.js +0 -101
- package/dist/types/commons.d.ts +0 -84
- package/dist/types/sheet.d.ts +0 -104
- package/dist/types/sheet.js +0 -16
- /package/dist/constants/{time.d.ts → duration.d.ts} +0 -0
- /package/dist/constants/{time.js → duration.js} +0 -0
- /package/dist/dto/{virtual-user.d.ts → virtualUser.d.ts} +0 -0
- /package/dist/dto/{virtual-user.js → virtualUser.js} +0 -0
- /package/dist/dto/{worksheet-submissions.d.ts → worksheetSubmission.d.ts} +0 -0
- /package/dist/dto/{worksheet-submissions.js → worksheetSubmission.js} +0 -0
- /package/dist/helpers/{class.d.ts → assignment.d.ts} +0 -0
- /package/dist/helpers/{class.js → assignment.js} +0 -0
- /package/dist/{errors/index.d.ts → helpers/errors.d.ts} +0 -0
- /package/dist/{errors/index.js → helpers/errors.js} +0 -0
- /package/dist/{number/index.d.ts → helpers/number.d.ts} +0 -0
- /package/dist/{number/index.js → helpers/number.js} +0 -0
- /package/dist/types/{problems.js → problem.js} +0 -0
- /package/dist/types/{account.d.ts → profile.d.ts} +0 -0
- /package/dist/types/{account.js → profile.js} +0 -0
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
export { AssignmentClassType } from './AssignmentClassType.js';
|
|
2
|
-
export { ContestStatus } from './ContestStatus.js';
|
|
3
|
-
export { ContestProblemPrerequisiteType } from './ContestProblemPrerequisiteType.js';
|
|
4
2
|
export { ContestEventAction } from './ContestEventAction.js';
|
|
3
|
+
export { ContestProblemPrerequisiteType } from './ContestProblemPrerequisiteType.js';
|
|
4
|
+
export { ContestRole } from './ContestRole.js';
|
|
5
|
+
export { ContestStatus } from './ContestStatus.js';
|
|
6
|
+
export { CourseRole } from './CourseRole.js';
|
|
5
7
|
export { EntityObjectType } from './EntityObjectType.js';
|
|
6
|
-
export { EntitySubjectType } from './EntitySubjectType.js';
|
|
7
8
|
export { EntityRole } from './EntityRole.js';
|
|
8
|
-
export {
|
|
9
|
+
export { EntitySubjectType } from './EntitySubjectType.js';
|
|
10
|
+
export { FileRole } from './FileRole.js';
|
|
9
11
|
export { FileType } from './FileType.js';
|
|
10
12
|
export { GroupType } from './GroupType.js';
|
|
11
13
|
export { JudgeType } from './JudgeType.js';
|
|
12
14
|
export { OrganizationPlan } from './OrganizationPlan.js';
|
|
13
|
-
export {
|
|
15
|
+
export { ProblemRole } from './ProblemRole.js';
|
|
14
16
|
export { ProblemScoringMode } from './ProblemScoringMode.js';
|
|
17
|
+
export { ProblemType } from './ProblemType.js';
|
|
15
18
|
export { ProblemVerdict } from './ProblemVerdict.js';
|
|
19
|
+
export { ShareLinkVisibility } from './ShareLinkVisibility.js';
|
|
16
20
|
export { SubmissionRunStatus } from './SubmissionRunStatus.js';
|
|
17
|
-
export { TelemetryType } from './TelemetryType.js';
|
|
18
|
-
export { UserRole } from './UserRole.js';
|
|
19
21
|
export { SystemRole } from './SystemRole.js';
|
|
20
|
-
export { ProblemRole } from './ProblemRole.js';
|
|
21
|
-
export { ContestRole } from './ContestRole.js';
|
|
22
22
|
export { TeamRole } from './TeamRole.js';
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
23
|
+
export { TelemetryType } from './TelemetryType.js';
|
|
24
|
+
export { UserRole } from './UserRole.js';
|
|
25
25
|
export { WorkingIn } from './WorkingIn.js';
|
|
26
26
|
export { WorksheetContentType } from './WorksheetContentType.js';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { EntityState } from './entity.js';
|
|
2
|
+
import type { BodyWorksheet } from './worksheet.js';
|
|
3
|
+
export declare enum AssignmentClass {
|
|
4
|
+
NONE = "NONE",
|
|
5
|
+
COURSE = "COURSE",
|
|
6
|
+
WORKSHEET = "WORKSHEET",
|
|
7
|
+
CONTEST = "CONTEST"
|
|
8
|
+
}
|
|
9
|
+
export interface AssignmentBasicInfo {
|
|
10
|
+
id: string;
|
|
11
|
+
index: number;
|
|
12
|
+
type: AssignmentClass;
|
|
13
|
+
points: number;
|
|
14
|
+
startTimestamp: number;
|
|
15
|
+
endTimestamp: number;
|
|
16
|
+
title: string;
|
|
17
|
+
content: BodyWorksheet[];
|
|
18
|
+
tags: string[];
|
|
19
|
+
graded: boolean;
|
|
20
|
+
visible: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface ClassCycleSessionAssignment extends AssignmentBasicInfo {
|
|
23
|
+
entityId: string;
|
|
24
|
+
state: EntityState;
|
|
25
|
+
}
|
|
26
|
+
export interface ClassCycleSessionAssignments {
|
|
27
|
+
[key: string]: ClassCycleSessionAssignment;
|
|
28
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var AssignmentClass;
|
|
2
|
+
(function (AssignmentClass) {
|
|
3
|
+
AssignmentClass["NONE"] = "NONE";
|
|
4
|
+
AssignmentClass["COURSE"] = "COURSE";
|
|
5
|
+
AssignmentClass["WORKSHEET"] = "WORKSHEET";
|
|
6
|
+
AssignmentClass["CONTEST"] = "CONTEST";
|
|
7
|
+
})(AssignmentClass || (AssignmentClass = {}));
|
package/dist/types/class.d.ts
CHANGED
|
@@ -1,31 +1,5 @@
|
|
|
1
|
+
import type { ClassCycleSessionAssignments } from './assignment.js';
|
|
1
2
|
import type { EntityMembers, EntityState } from './entity.js';
|
|
2
|
-
import type { BodyWorksheet } from './sheet.js';
|
|
3
|
-
export declare enum AssignmentClass {
|
|
4
|
-
NONE = "NONE",
|
|
5
|
-
COURSE = "COURSE",
|
|
6
|
-
WORKSHEET = "WORKSHEET",
|
|
7
|
-
CONTEST = "CONTEST"
|
|
8
|
-
}
|
|
9
|
-
export interface AssignmentBasicInfo {
|
|
10
|
-
id: string;
|
|
11
|
-
index: number;
|
|
12
|
-
type: AssignmentClass;
|
|
13
|
-
points: number;
|
|
14
|
-
startTimestamp: number;
|
|
15
|
-
endTimestamp: number;
|
|
16
|
-
title: string;
|
|
17
|
-
content: BodyWorksheet[];
|
|
18
|
-
tags: string[];
|
|
19
|
-
graded: boolean;
|
|
20
|
-
visible: boolean;
|
|
21
|
-
}
|
|
22
|
-
export interface ClassCycleSessionAssignment extends AssignmentBasicInfo {
|
|
23
|
-
entityId: string;
|
|
24
|
-
state: EntityState;
|
|
25
|
-
}
|
|
26
|
-
export interface ClassCycleSessionAssignments {
|
|
27
|
-
[key: string]: ClassCycleSessionAssignment;
|
|
28
|
-
}
|
|
29
3
|
interface ClassCycleSession {
|
|
30
4
|
id: string;
|
|
31
5
|
index: number;
|
package/dist/types/class.js
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
(function (AssignmentClass) {
|
|
3
|
-
AssignmentClass["NONE"] = "NONE";
|
|
4
|
-
AssignmentClass["COURSE"] = "COURSE";
|
|
5
|
-
AssignmentClass["WORKSHEET"] = "WORKSHEET";
|
|
6
|
-
AssignmentClass["CONTEST"] = "CONTEST";
|
|
7
|
-
})(AssignmentClass || (AssignmentClass = {}));
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare enum CodeLanguage {
|
|
2
|
+
C_11 = "c11",
|
|
3
|
+
CPP_11 = "cpp11",
|
|
4
|
+
CPP_20 = "cpp20",
|
|
5
|
+
JAVA_21 = "java21",
|
|
6
|
+
PYTHON_3 = "python3",
|
|
7
|
+
PYTHON_PYPY_3 = "pypy3",
|
|
8
|
+
JAVASCRIPT_NODE_JS_22 = "nodejs22",
|
|
9
|
+
PYTHON_2 = "python2",
|
|
10
|
+
PYTHON_PYPY_2 = "pypy2",
|
|
11
|
+
ICPC_C = "ICPC_C",
|
|
12
|
+
C = "C",
|
|
13
|
+
CPP = "CPP",
|
|
14
|
+
ICPC_CPP = "ICPC_CPP",
|
|
15
|
+
CPP11 = "CPP11",
|
|
16
|
+
CPP14 = "CPP14",
|
|
17
|
+
CPP17 = "CPP17",
|
|
18
|
+
JAVA = "JAVA",
|
|
19
|
+
ICPC_PYTHON = "ICPC_PYTHON",
|
|
20
|
+
PYTHON = "PYTHON",
|
|
21
|
+
PYTHON2 = "PYTHON2",
|
|
22
|
+
PYTHON3 = "PYTHON3",
|
|
23
|
+
JAVASCRIPT = "JAVASCRIPT",
|
|
24
|
+
TYPESCRIPT = "TYPESCRIPT",
|
|
25
|
+
JSX = "JSX",
|
|
26
|
+
TSX = "TSX",
|
|
27
|
+
MDX = "MDX",
|
|
28
|
+
PSEUDOCODE_PSEINT = "PSEUDOCODE_PSEINT",
|
|
29
|
+
LATEX = "LATEX",
|
|
30
|
+
JSON = "JSON",
|
|
31
|
+
HTML = "HTML",
|
|
32
|
+
TEXT = "TEXT",
|
|
33
|
+
DIFF = "DIFF",
|
|
34
|
+
MARKDOWN = "MARKDOWN",
|
|
35
|
+
ARDUINO = "ARDUINO",
|
|
36
|
+
DOT = "DOT",
|
|
37
|
+
MERMAID = "MERMAID",
|
|
38
|
+
BASH = "BASH"
|
|
39
|
+
}
|
|
@@ -39,31 +39,3 @@ export var CodeLanguage;
|
|
|
39
39
|
CodeLanguage["MERMAID"] = "MERMAID";
|
|
40
40
|
CodeLanguage["BASH"] = "BASH";
|
|
41
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 = {}));
|
package/dist/types/contest.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ContestDataResponseDTO, UpsertContestDTO, UserOrganizationBasicInfoResponseDTO } from '../dto/index.js';
|
|
2
2
|
import type { ContestEventAction, ContestProblemPrerequisiteType } from '../prisma/enums/index.js';
|
|
3
|
-
import type { CodeLanguage } from './
|
|
3
|
+
import type { CodeLanguage } from './code.js';
|
|
4
4
|
import type { EntityMembers } from './entity.js';
|
|
5
5
|
import type { Judge } from './judge.js';
|
|
6
|
-
import type { UserBasicInfo } from './
|
|
6
|
+
import type { UserBasicInfo } from './user.js';
|
|
7
7
|
export declare enum ContestTimeStatus {
|
|
8
8
|
UPCOMING = "upcoming",
|
|
9
9
|
LIVE = "live",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types/entity.d.ts
CHANGED
|
@@ -8,6 +8,18 @@ export declare enum EntityState {
|
|
|
8
8
|
RELEASED = "RELEASED",
|
|
9
9
|
ARCHIVED = "ARCHIVED"
|
|
10
10
|
}
|
|
11
|
+
export declare enum EntityStatus {
|
|
12
|
+
PUBLIC = "PUBLIC",
|
|
13
|
+
RESERVED = "RESERVED",
|
|
14
|
+
PRIVATE = "PRIVATE",
|
|
15
|
+
ARCHIVED = "ARCHIVED"
|
|
16
|
+
}
|
|
17
|
+
export declare enum EntityAccess {
|
|
18
|
+
PRIVATE = "PRIVATE",
|
|
19
|
+
RESTRICTED = "RESTRICTED",
|
|
20
|
+
PUBLIC = "PUBLIC",
|
|
21
|
+
EXPOSED = "EXPOSED"
|
|
22
|
+
}
|
|
11
23
|
export type EntityUsersMemberUserData = {
|
|
12
24
|
userId: string;
|
|
13
25
|
lastVisitTimestamp: number | null;
|
package/dist/types/entity.js
CHANGED
|
@@ -9,6 +9,20 @@ export var EntityState;
|
|
|
9
9
|
EntityState["RELEASED"] = "RELEASED";
|
|
10
10
|
EntityState["ARCHIVED"] = "ARCHIVED";
|
|
11
11
|
})(EntityState || (EntityState = {}));
|
|
12
|
+
export var EntityStatus;
|
|
13
|
+
(function (EntityStatus) {
|
|
14
|
+
EntityStatus["PUBLIC"] = "PUBLIC";
|
|
15
|
+
EntityStatus["RESERVED"] = "RESERVED";
|
|
16
|
+
EntityStatus["PRIVATE"] = "PRIVATE";
|
|
17
|
+
EntityStatus["ARCHIVED"] = "ARCHIVED";
|
|
18
|
+
})(EntityStatus || (EntityStatus = {}));
|
|
19
|
+
export var EntityAccess;
|
|
20
|
+
(function (EntityAccess) {
|
|
21
|
+
EntityAccess["PRIVATE"] = "PRIVATE";
|
|
22
|
+
EntityAccess["RESTRICTED"] = "RESTRICTED";
|
|
23
|
+
EntityAccess["PUBLIC"] = "PUBLIC";
|
|
24
|
+
EntityAccess["EXPOSED"] = "EXPOSED";
|
|
25
|
+
})(EntityAccess || (EntityAccess = {}));
|
|
12
26
|
export var EntityCollection;
|
|
13
27
|
(function (EntityCollection) {
|
|
14
28
|
EntityCollection["COMPANY"] = "COMPANY";
|
package/dist/types/id.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,23 +1,28 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './assignment.js';
|
|
2
2
|
export * from './class.js';
|
|
3
|
+
export * from './code.js';
|
|
3
4
|
export * from './comments.js';
|
|
4
|
-
export * from './commons.js';
|
|
5
5
|
export * from './company.js';
|
|
6
6
|
export * from './contest.js';
|
|
7
7
|
export * from './course.js';
|
|
8
|
+
export * from './device.js';
|
|
9
|
+
export * from './duration.js';
|
|
8
10
|
export * from './entity.js';
|
|
9
11
|
export * from './excalidraw.js';
|
|
10
12
|
export * from './file.js';
|
|
11
13
|
export * from './group.js';
|
|
14
|
+
export * from './id.js';
|
|
12
15
|
export * from './judge.js';
|
|
13
16
|
export * from './markdown.js';
|
|
14
17
|
export * from './mermaid.js';
|
|
15
18
|
export * from './notification.js';
|
|
16
|
-
export * from './
|
|
19
|
+
export * from './problem.js';
|
|
20
|
+
export * from './profile.js';
|
|
17
21
|
export * from './services.js';
|
|
18
|
-
export * from './sheet.js';
|
|
19
22
|
export * from './socket.js';
|
|
23
|
+
export * from './state.js';
|
|
20
24
|
export * from './submission.js';
|
|
21
25
|
export * from './teams.js';
|
|
22
|
-
export * from './
|
|
26
|
+
export * from './text.js';
|
|
27
|
+
export * from './user.js';
|
|
23
28
|
export * from './worksheet.js';
|
package/dist/types/index.js
CHANGED
|
@@ -1,23 +1,28 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './assignment.js';
|
|
2
2
|
export * from './class.js';
|
|
3
|
+
export * from './code.js';
|
|
3
4
|
export * from './comments.js';
|
|
4
|
-
export * from './commons.js';
|
|
5
5
|
export * from './company.js';
|
|
6
6
|
export * from './contest.js';
|
|
7
7
|
export * from './course.js';
|
|
8
|
+
export * from './device.js';
|
|
9
|
+
export * from './duration.js';
|
|
8
10
|
export * from './entity.js';
|
|
9
11
|
export * from './excalidraw.js';
|
|
10
12
|
export * from './file.js';
|
|
11
13
|
export * from './group.js';
|
|
14
|
+
export * from './id.js';
|
|
12
15
|
export * from './judge.js';
|
|
13
16
|
export * from './markdown.js';
|
|
14
17
|
export * from './mermaid.js';
|
|
15
18
|
export * from './notification.js';
|
|
16
|
-
export * from './
|
|
19
|
+
export * from './problem.js';
|
|
20
|
+
export * from './profile.js';
|
|
17
21
|
export * from './services.js';
|
|
18
|
-
export * from './sheet.js';
|
|
19
22
|
export * from './socket.js';
|
|
23
|
+
export * from './state.js';
|
|
20
24
|
export * from './submission.js';
|
|
21
25
|
export * from './teams.js';
|
|
22
|
-
export * from './
|
|
26
|
+
export * from './text.js';
|
|
27
|
+
export * from './user.js';
|
|
23
28
|
export * from './worksheet.js';
|
package/dist/types/judge.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ProblemScoringMode, ProblemType } from '../prisma/enums/index.js';
|
|
2
|
-
import type { CodeLanguage
|
|
2
|
+
import type { CodeLanguage } from './code.js';
|
|
3
3
|
import type { EntityMembers } from './entity.js';
|
|
4
4
|
import type { ProblemTestCase } from './services.js';
|
|
5
|
+
import type { TextLanguage } from './text.js';
|
|
5
6
|
export interface TestCase {
|
|
6
7
|
id: string;
|
|
7
8
|
group: number;
|
package/dist/types/services.d.ts
CHANGED
package/dist/types/socket.d.ts
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export var ScopeData;
|
|
2
|
+
(function (ScopeData) {
|
|
3
|
+
ScopeData["USER"] = "USER";
|
|
4
|
+
ScopeData["PROBLEM"] = "PROBLEM";
|
|
5
|
+
ScopeData["CONTEST"] = "CONTEST";
|
|
6
|
+
ScopeData["ATTEMPT"] = "ATTEMPT";
|
|
7
|
+
})(ScopeData || (ScopeData = {}));
|
|
8
|
+
export var Status;
|
|
9
|
+
(function (Status) {
|
|
10
|
+
Status["SUCCESS"] = "SUCCESS";
|
|
11
|
+
Status["ERROR"] = "ERROR";
|
|
12
|
+
Status["LOADING"] = "LOADING";
|
|
13
|
+
Status["NONE"] = "NONE";
|
|
14
|
+
})(Status || (Status = {}));
|
package/dist/types/teams.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ContestRole, CourseRole, ProblemRole, SystemRole, TeamRole, UserRole } from '../prisma/enums/index.js';
|
|
2
|
-
import { ProfileSetting } from './
|
|
2
|
+
import { ProfileSetting } from './profile.js';
|
|
3
3
|
export interface UserBasicInfo {
|
|
4
4
|
nickname: string;
|
|
5
5
|
imageUrl: string;
|
|
@@ -1,6 +1,109 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SubmissionRunStatus } from '../prisma/enums/index.js';
|
|
2
|
+
import type { CodeLanguage } from './code.js';
|
|
2
3
|
import type { EntityMembers } from './entity.js';
|
|
3
|
-
import type {
|
|
4
|
+
import type { Theme } from './user.js';
|
|
5
|
+
export declare enum WorksheetType {
|
|
6
|
+
JK_MD = "JK_MD",
|
|
7
|
+
CODE_EDITOR = "CODE_EDITOR",
|
|
8
|
+
LIST = "LIST",
|
|
9
|
+
GRAPH = "GRAPH",
|
|
10
|
+
QUIZ_PROBLEM = "QUIZ_PROBLEM",
|
|
11
|
+
QUIZ_TEXT = "QUIZ_TEXT",
|
|
12
|
+
QUIZ_OPTIONS = "QUIZ_OPTIONS",
|
|
13
|
+
NEW_PAGE = "NEW_PAGE"
|
|
14
|
+
}
|
|
15
|
+
export type BasicWorksheet = {
|
|
16
|
+
id: string;
|
|
17
|
+
type: WorksheetType;
|
|
18
|
+
title: string;
|
|
19
|
+
points: number;
|
|
20
|
+
};
|
|
21
|
+
export type JkmdSheet = BasicWorksheet & {
|
|
22
|
+
type: WorksheetType.JK_MD;
|
|
23
|
+
content: string;
|
|
24
|
+
};
|
|
25
|
+
export type SubmissionTestCase = {
|
|
26
|
+
out: string;
|
|
27
|
+
err: string;
|
|
28
|
+
log: string;
|
|
29
|
+
status: SubmissionRunStatus;
|
|
30
|
+
};
|
|
31
|
+
export interface CodeEditorTestCase extends SubmissionTestCase {
|
|
32
|
+
key: string;
|
|
33
|
+
in: string;
|
|
34
|
+
testOut: string;
|
|
35
|
+
withPE: boolean;
|
|
36
|
+
sample: boolean;
|
|
37
|
+
hidden: boolean;
|
|
38
|
+
index: number;
|
|
39
|
+
messageTimestamp: number;
|
|
40
|
+
}
|
|
41
|
+
export type CodeEditorFile<T> = {
|
|
42
|
+
description: string;
|
|
43
|
+
folderPath: string;
|
|
44
|
+
source: string;
|
|
45
|
+
language: T;
|
|
46
|
+
index: number;
|
|
47
|
+
name: string;
|
|
48
|
+
hidden: boolean;
|
|
49
|
+
readonly: boolean;
|
|
50
|
+
protected: boolean;
|
|
51
|
+
active: boolean;
|
|
52
|
+
};
|
|
53
|
+
export type CodeEditorFiles<T> = {
|
|
54
|
+
[key: string]: CodeEditorFile<T>;
|
|
55
|
+
};
|
|
56
|
+
export type CodeEditorTestCases = {
|
|
57
|
+
[key: string]: CodeEditorTestCase;
|
|
58
|
+
};
|
|
59
|
+
export type CodeEditorSheet = BasicWorksheet & {
|
|
60
|
+
type: WorksheetType.CODE_EDITOR;
|
|
61
|
+
files: CodeEditorFiles<CodeLanguage>;
|
|
62
|
+
testCases: CodeEditorTestCases;
|
|
63
|
+
languages: CodeLanguage[];
|
|
64
|
+
height: number;
|
|
65
|
+
};
|
|
66
|
+
export type GraphSheet = BasicWorksheet & {
|
|
67
|
+
type: WorksheetType.GRAPH;
|
|
68
|
+
dots: string[];
|
|
69
|
+
};
|
|
70
|
+
export type QuizProblemSheet = BasicWorksheet & {
|
|
71
|
+
type: WorksheetType.QUIZ_PROBLEM;
|
|
72
|
+
problemKey: string;
|
|
73
|
+
languages: CodeLanguage[];
|
|
74
|
+
height: number;
|
|
75
|
+
};
|
|
76
|
+
export type QuizTextSheet = BasicWorksheet & {
|
|
77
|
+
type: WorksheetType.QUIZ_TEXT;
|
|
78
|
+
description: string;
|
|
79
|
+
answer: string;
|
|
80
|
+
inputType: 'text' | 'number' | 'textarea';
|
|
81
|
+
};
|
|
82
|
+
export declare enum QuizScoringMode {
|
|
83
|
+
TOTAL = "TOTAL",
|
|
84
|
+
PARTIAL = "PARTIAL"
|
|
85
|
+
}
|
|
86
|
+
export type QuizOptionsSheet = BasicWorksheet & {
|
|
87
|
+
type: WorksheetType.QUIZ_OPTIONS;
|
|
88
|
+
description: string;
|
|
89
|
+
options: {
|
|
90
|
+
label: string;
|
|
91
|
+
correct: boolean;
|
|
92
|
+
id: string;
|
|
93
|
+
}[];
|
|
94
|
+
multiple: boolean;
|
|
95
|
+
scoringMode: QuizScoringMode;
|
|
96
|
+
};
|
|
97
|
+
export type ListSheet = BasicWorksheet & {
|
|
98
|
+
type: WorksheetType.LIST;
|
|
99
|
+
header: string;
|
|
100
|
+
content: (JkmdSheet | CodeEditorSheet | GraphSheet | QuizProblemSheet | QuizTextSheet | QuizOptionsSheet)[];
|
|
101
|
+
children: ListSheet[];
|
|
102
|
+
};
|
|
103
|
+
export type NewPageSheet = BasicWorksheet & {
|
|
104
|
+
type: WorksheetType.NEW_PAGE;
|
|
105
|
+
};
|
|
106
|
+
export type BodyWorksheet = JkmdSheet | CodeEditorSheet | ListSheet | GraphSheet | QuizProblemSheet | QuizTextSheet | QuizOptionsSheet | NewPageSheet;
|
|
4
107
|
export declare enum AspectRatio {
|
|
5
108
|
RATIO_21_9 = "21:9",
|
|
6
109
|
RATIO_20_9 = "20:9",
|
package/dist/types/worksheet.js
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
export var WorksheetType;
|
|
2
|
+
(function (WorksheetType) {
|
|
3
|
+
WorksheetType["JK_MD"] = "JK_MD";
|
|
4
|
+
WorksheetType["CODE_EDITOR"] = "CODE_EDITOR";
|
|
5
|
+
WorksheetType["LIST"] = "LIST";
|
|
6
|
+
WorksheetType["GRAPH"] = "GRAPH";
|
|
7
|
+
WorksheetType["QUIZ_PROBLEM"] = "QUIZ_PROBLEM";
|
|
8
|
+
WorksheetType["QUIZ_TEXT"] = "QUIZ_TEXT";
|
|
9
|
+
WorksheetType["QUIZ_OPTIONS"] = "QUIZ_OPTIONS";
|
|
10
|
+
WorksheetType["NEW_PAGE"] = "NEW_PAGE";
|
|
11
|
+
})(WorksheetType || (WorksheetType = {}));
|
|
12
|
+
export var QuizScoringMode;
|
|
13
|
+
(function (QuizScoringMode) {
|
|
14
|
+
QuizScoringMode["TOTAL"] = "TOTAL";
|
|
15
|
+
QuizScoringMode["PARTIAL"] = "PARTIAL";
|
|
16
|
+
})(QuizScoringMode || (QuizScoringMode = {}));
|
|
1
17
|
export var AspectRatio;
|
|
2
18
|
(function (AspectRatio) {
|
|
3
19
|
AspectRatio["RATIO_21_9"] = "21:9";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juki-team/commons",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"author": "juki-team",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -8,35 +8,19 @@
|
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
9
|
"sideEffects": false,
|
|
10
10
|
"exports": {
|
|
11
|
-
".": {
|
|
12
|
-
"types": "./dist/index.d.ts",
|
|
13
|
-
"import": "./dist/index.js"
|
|
14
|
-
},
|
|
15
11
|
"./constants": {
|
|
16
12
|
"types": "./dist/constants/index.d.ts",
|
|
17
13
|
"import": "./dist/constants/index.js"
|
|
18
14
|
},
|
|
19
|
-
"./date": {
|
|
20
|
-
"types": "./dist/date/index.d.ts",
|
|
21
|
-
"import": "./dist/date/index.js"
|
|
22
|
-
},
|
|
23
15
|
"./dto": {
|
|
24
16
|
"types": "./dist/dto/index.d.ts",
|
|
25
17
|
"import": "./dist/dto/index.js"
|
|
26
18
|
},
|
|
27
|
-
"./errors": {
|
|
28
|
-
"types": "./dist/errors/index.d.ts",
|
|
29
|
-
"import": "./dist/errors/index.js"
|
|
30
|
-
},
|
|
31
19
|
"./helpers": {
|
|
32
20
|
"types": "./dist/helpers/index.d.ts",
|
|
33
21
|
"import": "./dist/helpers/index.js"
|
|
34
22
|
},
|
|
35
|
-
"./
|
|
36
|
-
"types": "./dist/number/index.d.ts",
|
|
37
|
-
"import": "./dist/number/index.js"
|
|
38
|
-
},
|
|
39
|
-
"./prisma/enums": {
|
|
23
|
+
"./prisma-enums": {
|
|
40
24
|
"types": "./dist/prisma/enums/index.d.ts",
|
|
41
25
|
"import": "./dist/prisma/enums/index.js"
|
|
42
26
|
},
|
|
@@ -45,7 +29,10 @@
|
|
|
45
29
|
"import": "./dist/types/index.js"
|
|
46
30
|
}
|
|
47
31
|
},
|
|
48
|
-
"files": [
|
|
32
|
+
"files": [
|
|
33
|
+
"dist",
|
|
34
|
+
"biome.shared.json"
|
|
35
|
+
],
|
|
49
36
|
"repository": "https://github.com/juki-team/commons.git",
|
|
50
37
|
"publishConfig": {
|
|
51
38
|
"access": "public",
|