@juki-team/commons 0.1.32 → 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/helpers/date.d.ts +68 -0
- package/dist/helpers/date.js +181 -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/number.d.ts +2 -0
- package/dist/helpers/number.js +2 -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 -1
- package/dist/index.js +0 -1
- 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 +21 -4
- 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/prototypes/Date.d.ts +0 -62
- package/dist/prototypes/Date.js +0 -218
- package/dist/prototypes/Number.d.ts +0 -7
- package/dist/prototypes/Number.js +0 -8
- package/dist/prototypes/index.d.ts +0 -3
- package/dist/prototypes/index.js +0 -3
- 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/{prototypes/Error.d.ts → helpers/errors.d.ts} +0 -0
- /package/dist/{prototypes/Error.js → helpers/errors.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
package/dist/helpers/object.d.ts
CHANGED
package/dist/helpers/object.js
CHANGED
|
@@ -30,3 +30,31 @@ function sizeOf(obj) {
|
|
|
30
30
|
export function memorySizeOf(obj) {
|
|
31
31
|
return sizeOf(obj);
|
|
32
32
|
}
|
|
33
|
+
function mergeRecords(b, u) {
|
|
34
|
+
const mergeKeys = new Set([...Object.keys(b), ...Object.keys(u)]);
|
|
35
|
+
for (const key of mergeKeys) {
|
|
36
|
+
if (u[key] !== null && u[key] !== undefined && b[key] !== u[key]) {
|
|
37
|
+
b[key] = objectUpdate(b[key], u[key]);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return b;
|
|
41
|
+
}
|
|
42
|
+
export function objectUpdate(base, update) {
|
|
43
|
+
if (JSON.stringify(base) === JSON.stringify(update)) {
|
|
44
|
+
return base;
|
|
45
|
+
}
|
|
46
|
+
if (base !== null && update !== null && !Array.isArray(base) && typeof base === 'object' && typeof update === 'object') {
|
|
47
|
+
return mergeRecords(base, update);
|
|
48
|
+
}
|
|
49
|
+
if (update !== null && update !== undefined) {
|
|
50
|
+
return update;
|
|
51
|
+
}
|
|
52
|
+
return base;
|
|
53
|
+
}
|
|
54
|
+
export function objectsUpdate(base, ...objects) {
|
|
55
|
+
let newObject = { ...base };
|
|
56
|
+
for (const update of objects) {
|
|
57
|
+
newObject = objectUpdate(newObject, update);
|
|
58
|
+
}
|
|
59
|
+
return newObject;
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const getProblemJudgeKey = (judge, key) => `${judge}-${key}`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { JkError } from '../prototypes/index.js';
|
|
2
1
|
import { type ContentResponse, type ContentsMeta, type ContentsResponse, type ErrorResponse } from '../types/index.js';
|
|
2
|
+
import { JkError } from './errors.js';
|
|
3
3
|
export declare function toJkError(err: unknown): JkError;
|
|
4
4
|
export declare function errorsResponse(message: string, ...errors: JkError[]): ErrorResponse;
|
|
5
5
|
export declare function contentResponse<T>(message: string, content: T): ContentResponse<T>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { getErrorMessage } from '../constants/index.js';
|
|
2
|
-
import { JkError } from '../prototypes/index.js';
|
|
3
2
|
import { ErrorCode, } from '../types/index.js';
|
|
4
|
-
import { consoleError
|
|
3
|
+
import { consoleError } from './console.js';
|
|
4
|
+
import { JkError } from './errors.js';
|
|
5
|
+
import { isStringJson } from './json.js';
|
|
5
6
|
export function toJkError(err) {
|
|
6
7
|
const error = new Error();
|
|
7
8
|
let code = err?.code;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const indexToLetters: (index: number) => string;
|
|
2
|
+
export declare const lettersToIndex: (index: string) => number;
|
|
3
|
+
export declare const chunkString: (str: string, size: number) => string[];
|
|
4
|
+
export declare const getRandomString: (length: number) => string;
|
|
5
|
+
export declare const stringToArrayBuffer: (str: string) => ArrayBuffer;
|
|
6
|
+
export declare const join: (array: (string | null | Date)[]) => string;
|
|
7
|
+
export declare const split: (text: string) => string[];
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { SEPARATOR_TOKEN, UPPERCASE_LETTERS } from '../constants/commons.js';
|
|
2
|
+
export const indexToLetters = (index) => {
|
|
3
|
+
const d = Math.ceil(index / 26);
|
|
4
|
+
if (d === 1) {
|
|
5
|
+
return UPPERCASE_LETTERS.charAt(index - 1);
|
|
6
|
+
}
|
|
7
|
+
return UPPERCASE_LETTERS.charAt(d - 2) + UPPERCASE_LETTERS.charAt(index - 26 * (d - 1) - 1);
|
|
8
|
+
};
|
|
9
|
+
export const lettersToIndex = (index) => {
|
|
10
|
+
if (index.length) {
|
|
11
|
+
if (index.length === 1) {
|
|
12
|
+
const d = UPPERCASE_LETTERS.indexOf(index);
|
|
13
|
+
if (d !== -1) {
|
|
14
|
+
return d + 1;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
else if (index.length === 2) {
|
|
18
|
+
const a = index.charAt(0);
|
|
19
|
+
const b = index.charAt(1);
|
|
20
|
+
const numA = lettersToIndex(a);
|
|
21
|
+
const numB = lettersToIndex(b);
|
|
22
|
+
return numA * 26 + numB;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return 0;
|
|
26
|
+
};
|
|
27
|
+
export const chunkString = (str, size) => {
|
|
28
|
+
const numChunks = Math.ceil(str.length / size);
|
|
29
|
+
const chunks = new Array(numChunks);
|
|
30
|
+
for (let i = 0, o = 0; i < numChunks; ++i, o += size) {
|
|
31
|
+
chunks[i] = str.substr(o, size);
|
|
32
|
+
}
|
|
33
|
+
return chunks;
|
|
34
|
+
};
|
|
35
|
+
export const getRandomString = (length) => {
|
|
36
|
+
const charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
|
37
|
+
let retVal = '';
|
|
38
|
+
for (let i = 0; i < length; ++i) {
|
|
39
|
+
retVal += charset.charAt(Math.floor(Math.random() * charset.length));
|
|
40
|
+
}
|
|
41
|
+
return retVal;
|
|
42
|
+
};
|
|
43
|
+
export const stringToArrayBuffer = (str) => {
|
|
44
|
+
const buf = new ArrayBuffer(str.length);
|
|
45
|
+
const view = new Uint8Array(buf);
|
|
46
|
+
for (let i = 0; i < str.length; i++) {
|
|
47
|
+
view[i] = str.charCodeAt(i) & 0xff;
|
|
48
|
+
}
|
|
49
|
+
return buf;
|
|
50
|
+
};
|
|
51
|
+
export const join = (array) => array.join(SEPARATOR_TOKEN);
|
|
52
|
+
export const split = (text) => text.split(SEPARATOR_TOKEN);
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -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';
|
|
@@ -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;
|