@juki-team/commons 0.2.4 → 0.2.6
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/index.d.ts +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/constants/{company.d.ts → organization.d.ts} +2 -2
- package/dist/constants/{company.js → organization.js} +2 -2
- package/dist/constants/problem.js +1 -1
- package/dist/constants/services.d.ts +1 -1
- package/dist/constants/services.js +44 -43
- package/dist/constants/user.js +1 -1
- package/dist/dto/contest.d.ts +4 -4
- package/dist/dto/organization.d.ts +2 -2
- package/dist/dto/problem.d.ts +4 -4
- package/dist/dto/session.d.ts +2 -2
- package/dist/dto/statistics.d.ts +1 -1
- package/dist/dto/submission.d.ts +5 -5
- package/dist/dto/system.d.ts +2 -2
- package/dist/dto/user.d.ts +9 -9
- package/dist/enums/manual/CollectionKey.d.ts +1 -1
- package/dist/enums/manual/CollectionKey.js +1 -1
- package/dist/enums/manual/EntityCollection.d.ts +1 -1
- package/dist/enums/manual/EntityCollection.js +1 -1
- package/dist/enums/manual/ErrorCode.d.ts +43 -42
- package/dist/enums/manual/ErrorCode.js +44 -43
- package/dist/enums/prisma/TelemetryType.js +1 -1
- package/dist/helpers/comments.d.ts +1 -1
- package/dist/helpers/comments.js +1 -1
- package/dist/helpers/socket.js +3 -3
- package/dist/helpers/user.d.ts +2 -2
- package/dist/helpers/user.js +4 -4
- package/dist/types/entity.d.ts +5 -5
- package/package.json +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from './commons.js';
|
|
2
|
-
export * from './company.js';
|
|
3
2
|
export * from './contest.js';
|
|
4
3
|
export * from './course.js';
|
|
5
4
|
export * from './date.js';
|
|
@@ -8,6 +7,7 @@ export * from './email.js';
|
|
|
8
7
|
export * from './entity.js';
|
|
9
8
|
export * from './file.js';
|
|
10
9
|
export * from './judge.js';
|
|
10
|
+
export * from './organization.js';
|
|
11
11
|
export * from './problem.js';
|
|
12
12
|
export * from './routing.js';
|
|
13
13
|
export * from './services.js';
|
package/dist/constants/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from './commons.js';
|
|
2
|
-
export * from './company.js';
|
|
3
2
|
export * from './contest.js';
|
|
4
3
|
export * from './course.js';
|
|
5
4
|
export * from './date.js';
|
|
@@ -8,6 +7,7 @@ export * from './email.js';
|
|
|
8
7
|
export * from './entity.js';
|
|
9
8
|
export * from './file.js';
|
|
10
9
|
export * from './judge.js';
|
|
10
|
+
export * from './organization.js';
|
|
11
11
|
export * from './problem.js';
|
|
12
12
|
export * from './routing.js';
|
|
13
13
|
export * from './services.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OrganizationPlan } from '../enums/index.js';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
2
|
+
export declare const JUKI_APP_ORGANIZATION_KEY = "juki-app";
|
|
3
|
+
export declare const ORGANIZATION_PLAN: {
|
|
4
4
|
[Key in OrganizationPlan]: {
|
|
5
5
|
value: OrganizationPlan;
|
|
6
6
|
label: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OrganizationPlan } from '../enums/index.js';
|
|
2
|
-
export const
|
|
3
|
-
export const
|
|
2
|
+
export const JUKI_APP_ORGANIZATION_KEY = 'juki-app';
|
|
3
|
+
export const ORGANIZATION_PLAN = {
|
|
4
4
|
[OrganizationPlan.FREE]: {
|
|
5
5
|
value: OrganizationPlan.FREE,
|
|
6
6
|
label: 'free',
|
|
@@ -55,7 +55,7 @@ export const PROBLEM_TYPE = {
|
|
|
55
55
|
"The resulting user's executable does I/O standard input and output. " +
|
|
56
56
|
"The output produced by the contestant's program is saved. " +
|
|
57
57
|
'The problem editor save a single source code in C++ 17. ' +
|
|
58
|
-
"The editor's source code can read judge input filepath argv[1], judge output filepath argv[2], user's output filepath argv[3], user's error filepath argv[4], user's log filepath argv[5], user's source filepath argv[6] and submission information filepath argv[7] (
|
|
58
|
+
"The editor's source code can read judge input filepath argv[1], judge output filepath argv[2], user's output filepath argv[3], user's error filepath argv[4], user's log filepath argv[5], user's source filepath argv[6] and submission information filepath argv[7] (organizationId, submitId, runId, userId, contestId, problemId, language, userNickname, timestamp). " +
|
|
59
59
|
'The resulting editor\'s executable should be "AC" or a number between 1 and 100 for partial accepted',
|
|
60
60
|
},
|
|
61
61
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ErrorCode } from '../enums/index.js';
|
|
2
2
|
export declare const getErrorMessage: (code: ErrorCode) => string;
|
|
3
3
|
export declare const ERROR_HTTP_STATUS: {
|
|
4
|
-
[Key in ErrorCode]: 500 | 400 | 401 | 403 | 404 | 405;
|
|
4
|
+
[Key in ErrorCode]: 500 | 400 | 401 | 403 | 404 | 405 | 409;
|
|
5
5
|
};
|
|
@@ -8,36 +8,37 @@ export const ERROR_HTTP_STATUS = {
|
|
|
8
8
|
[ErrorCode.FORBIDDEN]: 403,
|
|
9
9
|
[ErrorCode.NOT_FOUND]: 404,
|
|
10
10
|
[ErrorCode.METHOD_NOT_ALLOWED]: 405,
|
|
11
|
+
[ErrorCode.CONFLICT]: 409,
|
|
11
12
|
// UI general errors
|
|
12
13
|
[ErrorCode.ABORTED_REQUEST]: 400,
|
|
13
14
|
[ErrorCode.ERROR_ON_RESPONSE]: 400,
|
|
14
15
|
[ErrorCode.SERVICE_NOT_FOUND]: 404,
|
|
15
|
-
//
|
|
16
|
-
[ErrorCode.
|
|
17
|
-
[ErrorCode.
|
|
18
|
-
[ErrorCode.
|
|
19
|
-
[ErrorCode.
|
|
20
|
-
[ErrorCode.
|
|
21
|
-
[ErrorCode.
|
|
22
|
-
[ErrorCode.
|
|
23
|
-
[ErrorCode.
|
|
24
|
-
[ErrorCode.
|
|
16
|
+
// Organization errors
|
|
17
|
+
[ErrorCode.INTERNAL_SERVER_ERROR_ON_ORGANIZATION_SERVICE]: 500,
|
|
18
|
+
[ErrorCode.ORGANIZATION_NOT_CREATED]: 500,
|
|
19
|
+
[ErrorCode.ORGANIZATION_NOT_FOUND]: 404,
|
|
20
|
+
[ErrorCode.ORGANIZATION_NOT_UPDATED]: 500,
|
|
21
|
+
[ErrorCode.ORGANIZATION_NOT_DELETED]: 500,
|
|
22
|
+
[ErrorCode.NOT_ALLOWED_TO_CREATE_ORGANIZATION]: 403,
|
|
23
|
+
[ErrorCode.NOT_ALLOWED_TO_VIEW_ORGANIZATION]: 403,
|
|
24
|
+
[ErrorCode.NOT_ALLOWED_TO_UPDATE_ORGANIZATION]: 403,
|
|
25
|
+
[ErrorCode.NOT_ALLOWED_TO_DELETE_ORGANIZATION]: 403,
|
|
25
26
|
// User errors
|
|
26
27
|
[ErrorCode.INTERNAL_SERVER_ERROR_ON_USERS_SERVICE]: 500,
|
|
27
28
|
[ErrorCode.USER_NOT_CREATED]: 500,
|
|
28
29
|
[ErrorCode.USER_NOT_FOUND]: 404,
|
|
30
|
+
[ErrorCode.USER_NOT_FOUND_BY_EMAIL]: 404,
|
|
31
|
+
[ErrorCode.USER_NOT_FOUND_BY_NICKNAME]: 404,
|
|
29
32
|
[ErrorCode.USER_NOT_UPDATED]: 500,
|
|
30
33
|
[ErrorCode.USER_NOT_DELETED]: 500,
|
|
31
|
-
[ErrorCode.
|
|
32
|
-
[ErrorCode.
|
|
33
|
-
[ErrorCode.
|
|
34
|
-
[ErrorCode.
|
|
34
|
+
[ErrorCode.NOT_ALLOWED_TO_CREATE_USER]: 403,
|
|
35
|
+
[ErrorCode.NOT_ALLOWED_TO_VIEW_USER]: 403,
|
|
36
|
+
[ErrorCode.NOT_ALLOWED_TO_UPDATE_USER]: 403,
|
|
37
|
+
[ErrorCode.NOT_ALLOWED_TO_DELETE_USER]: 403,
|
|
35
38
|
[ErrorCode.USER_IS_REPORTED]: 403,
|
|
36
39
|
[ErrorCode.USER_IS_ARCHIVED]: 403,
|
|
37
|
-
[ErrorCode.
|
|
38
|
-
[ErrorCode.
|
|
39
|
-
[ErrorCode.THE_EMAIL_IS_ALREADY_REGISTERED]: 400,
|
|
40
|
-
[ErrorCode.THE_NICKNAME_IS_ALREADY_TAKEN]: 400,
|
|
40
|
+
[ErrorCode.EMAIL_ALREADY_IN_USE]: 409,
|
|
41
|
+
[ErrorCode.NICKNAME_ALREADY_TAKEN]: 409,
|
|
41
42
|
[ErrorCode.INCORRECT_PASSWORD]: 401,
|
|
42
43
|
[ErrorCode.USER_SESSION_NOT_CREATED]: 500,
|
|
43
44
|
[ErrorCode.USER_SESSION_NOT_FOUND]: 404,
|
|
@@ -49,13 +50,13 @@ export const ERROR_HTTP_STATUS = {
|
|
|
49
50
|
[ErrorCode.PROBLEM_NOT_FOUND]: 404,
|
|
50
51
|
[ErrorCode.PROBLEM_NOT_UPDATED]: 500,
|
|
51
52
|
[ErrorCode.PROBLEM_NOT_DELETED]: 500,
|
|
52
|
-
[ErrorCode.
|
|
53
|
-
[ErrorCode.
|
|
54
|
-
[ErrorCode.
|
|
55
|
-
[ErrorCode.
|
|
53
|
+
[ErrorCode.NOT_ALLOWED_TO_CREATE_PROBLEM]: 403,
|
|
54
|
+
[ErrorCode.NOT_ALLOWED_TO_VIEW_PROBLEM]: 403,
|
|
55
|
+
[ErrorCode.NOT_ALLOWED_TO_UPDATE_PROBLEM]: 403,
|
|
56
|
+
[ErrorCode.NOT_ALLOWED_TO_DELETE_PROBLEM]: 403,
|
|
56
57
|
[ErrorCode.PROBLEM_MODE_NOT_SUPPORTED]: 400,
|
|
57
58
|
[ErrorCode.PROBLEM_TYPE_NOT_SUPPORTED]: 400,
|
|
58
|
-
[ErrorCode.
|
|
59
|
+
[ErrorCode.PROBLEM_TIME_LIMIT_MUST_BE_NUMBER]: 400,
|
|
59
60
|
[ErrorCode.PROBLEM_MEMORY_LIMIT_MUST_BE_NUMBER]: 400,
|
|
60
61
|
[ErrorCode.TEST_CASE_FILE_EMPTY]: 400,
|
|
61
62
|
// Contest errors
|
|
@@ -64,21 +65,21 @@ export const ERROR_HTTP_STATUS = {
|
|
|
64
65
|
[ErrorCode.CONTEST_NOT_FOUND]: 404,
|
|
65
66
|
[ErrorCode.CONTEST_NOT_UPDATED]: 500,
|
|
66
67
|
[ErrorCode.CONTEST_NOT_DELETED]: 500,
|
|
67
|
-
[ErrorCode.
|
|
68
|
-
[ErrorCode.
|
|
69
|
-
[ErrorCode.
|
|
70
|
-
[ErrorCode.
|
|
71
|
-
[ErrorCode.
|
|
72
|
-
[ErrorCode.
|
|
68
|
+
[ErrorCode.NOT_ALLOWED_TO_CREATE_CONTEST]: 403,
|
|
69
|
+
[ErrorCode.NOT_ALLOWED_TO_VIEW_CONTEST]: 403,
|
|
70
|
+
[ErrorCode.NOT_ALLOWED_TO_UPDATE_CONTEST]: 403,
|
|
71
|
+
[ErrorCode.NOT_ALLOWED_TO_DELETE_CONTEST]: 403,
|
|
72
|
+
[ErrorCode.NOT_ALLOWED_TO_REGISTER_TO_CONTEST]: 403,
|
|
73
|
+
[ErrorCode.ALREADY_REGISTERED]: 409,
|
|
73
74
|
[ErrorCode.NOT_ALLOWED_TO_VIEW_CONTESTS]: 403,
|
|
74
75
|
[ErrorCode.SCOREBOARD_NOT_CREATED]: 500,
|
|
75
76
|
[ErrorCode.SCOREBOARD_NOT_FOUND]: 404,
|
|
76
77
|
[ErrorCode.SCOREBOARD_NOT_UPDATED]: 500,
|
|
77
78
|
[ErrorCode.SCOREBOARD_NOT_DELETED]: 500,
|
|
78
|
-
[ErrorCode.
|
|
79
|
-
[ErrorCode.
|
|
80
|
-
[ErrorCode.
|
|
81
|
-
[ErrorCode.
|
|
79
|
+
[ErrorCode.NOT_ALLOWED_TO_CREATE_SCOREBOARD]: 403,
|
|
80
|
+
[ErrorCode.NOT_ALLOWED_TO_VIEW_SCOREBOARD]: 403,
|
|
81
|
+
[ErrorCode.NOT_ALLOWED_TO_UPDATE_SCOREBOARD]: 403,
|
|
82
|
+
[ErrorCode.NOT_ALLOWED_TO_DELETE_SCOREBOARD]: 403,
|
|
82
83
|
[ErrorCode.CLARIFICATION_NOT_CREATED]: 500,
|
|
83
84
|
[ErrorCode.CLARIFICATION_NOT_FOUND]: 404,
|
|
84
85
|
[ErrorCode.CLARIFICATION_NOT_UPDATED]: 500,
|
|
@@ -94,7 +95,7 @@ export const ERROR_HTTP_STATUS = {
|
|
|
94
95
|
[ErrorCode.SUBMISSION_NOT_UPDATED]: 500,
|
|
95
96
|
[ErrorCode.SOURCE_EMPTY]: 400,
|
|
96
97
|
[ErrorCode.PROGRAMMING_LANGUAGE_NOT_SUPPORTED]: 400,
|
|
97
|
-
[ErrorCode.
|
|
98
|
+
[ErrorCode.NOT_ALLOWED_TO_SUBMIT_PROBLEM_IN_CONTEST]: 403,
|
|
98
99
|
[ErrorCode.JUDGEMENT_UNAVAILABLE]: 500,
|
|
99
100
|
// Utils errors
|
|
100
101
|
[ErrorCode.INTERNAL_SERVER_ERROR_ON_UTILS_SERVICES]: 500,
|
|
@@ -102,17 +103,17 @@ export const ERROR_HTTP_STATUS = {
|
|
|
102
103
|
[ErrorCode.CODES_ERROR]: 400,
|
|
103
104
|
[ErrorCode.COMPILATION_FAILED]: 400,
|
|
104
105
|
[ErrorCode.FILES_ERROR]: 400,
|
|
105
|
-
[ErrorCode.
|
|
106
|
+
[ErrorCode.EMAIL_NOT_SENT]: 500,
|
|
106
107
|
// Team errors
|
|
107
108
|
[ErrorCode.INTERNAL_SERVER_ERROR_ON_TEAMS_SERVICE]: 500,
|
|
108
109
|
[ErrorCode.TEAM_NOT_CREATED]: 500,
|
|
109
110
|
[ErrorCode.TEAM_NOT_FOUND]: 404,
|
|
110
111
|
[ErrorCode.TEAM_NOT_UPDATED]: 500,
|
|
111
112
|
[ErrorCode.TEAM_NOT_DELETED]: 500,
|
|
112
|
-
[ErrorCode.
|
|
113
|
-
[ErrorCode.
|
|
114
|
-
[ErrorCode.
|
|
115
|
-
[ErrorCode.
|
|
113
|
+
[ErrorCode.NOT_ALLOWED_TO_CREATE_TEAM]: 403,
|
|
114
|
+
[ErrorCode.NOT_ALLOWED_TO_VIEW_TEAM]: 403,
|
|
115
|
+
[ErrorCode.NOT_ALLOWED_TO_UPDATE_TEAM]: 403,
|
|
116
|
+
[ErrorCode.NOT_ALLOWED_TO_DELETE_TEAM]: 403,
|
|
116
117
|
[ErrorCode.TEAM_IS_REPORTED]: 403,
|
|
117
118
|
[ErrorCode.TEAM_IS_ARCHIVED]: 403,
|
|
118
119
|
// File errors
|
|
@@ -121,10 +122,10 @@ export const ERROR_HTTP_STATUS = {
|
|
|
121
122
|
[ErrorCode.FILE_NOT_FOUND]: 404,
|
|
122
123
|
[ErrorCode.FILE_NOT_UPDATED]: 500,
|
|
123
124
|
[ErrorCode.FILE_NOT_DELETED]: 500,
|
|
124
|
-
[ErrorCode.
|
|
125
|
-
[ErrorCode.
|
|
126
|
-
[ErrorCode.
|
|
127
|
-
[ErrorCode.
|
|
125
|
+
[ErrorCode.NOT_ALLOWED_TO_CREATE_FILE]: 403,
|
|
126
|
+
[ErrorCode.NOT_ALLOWED_TO_VIEW_FILE]: 403,
|
|
127
|
+
[ErrorCode.NOT_ALLOWED_TO_UPDATE_FILE]: 403,
|
|
128
|
+
[ErrorCode.NOT_ALLOWED_TO_DELETE_FILE]: 403,
|
|
128
129
|
[ErrorCode.FILE_IS_RESERVED]: 403,
|
|
129
130
|
[ErrorCode.FILE_IS_PRIVATE]: 403,
|
|
130
131
|
[ErrorCode.FILE_IS_ARCHIVED]: 403,
|
package/dist/constants/user.js
CHANGED
package/dist/dto/contest.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ContestEventAction, ContestProblemBlockedByType, EntityState } from '../enums/index.js';
|
|
2
2
|
import type { ContestBaseDocument, ContestClarification, ContestProblem, ContestProblemPrerequisite, ContestSettings, ContestUser, ProblemSettings, ProblemStatement, TextLanguage } from '../types/index.js';
|
|
3
3
|
import type { EntityMembersDTO, EntityMembersWithTimestampsResponseDTO } from './entity.js';
|
|
4
|
-
import type {
|
|
4
|
+
import type { EntityOrganizationSummaryListResponseDTO, EntityOrganizationSystemSummaryListResponseDTO, ProblemJudgeSummaryListResponseDTO, ProblemSummaryListResponseDTO } from './problem.js';
|
|
5
5
|
import type { EntityOwnerSystemSummaryListResponseDTO, UserOrganizationBasicInfoResponseDTO } from './user.js';
|
|
6
6
|
export type UpsertContestProblemPrerequisiteDTO = (Omit<ContestProblemPrerequisite, 'problemId'> & {
|
|
7
7
|
problemIndex: string;
|
|
@@ -20,7 +20,7 @@ export interface UpsertContestDTO extends Omit<ContestBaseDocument, 'key' | 'mem
|
|
|
20
20
|
export interface ContestSummaryListResponseDTO extends Pick<ContestBaseDocument, 'key' | 'name' | 'tags'> {
|
|
21
21
|
user: ContestUser;
|
|
22
22
|
owner: UserOrganizationBasicInfoResponseDTO;
|
|
23
|
-
|
|
23
|
+
organization: EntityOrganizationSummaryListResponseDTO;
|
|
24
24
|
settings: Pick<ContestSettings, 'startTimestamp' | 'endTimestamp' | 'frozenTimestamp' | 'quietTimestamp' | 'penalty' | 'upsolvingEnabled'>;
|
|
25
25
|
totalContestants: number;
|
|
26
26
|
isLive: boolean;
|
|
@@ -35,7 +35,7 @@ export interface ContestSystemSummaryListResponseDTO extends ContestSummaryListR
|
|
|
35
35
|
state: EntityState;
|
|
36
36
|
id: string;
|
|
37
37
|
owner: EntityOwnerSystemSummaryListResponseDTO;
|
|
38
|
-
|
|
38
|
+
organization: EntityOrganizationSystemSummaryListResponseDTO;
|
|
39
39
|
creationTimestamp: number;
|
|
40
40
|
updateTimestamp: number;
|
|
41
41
|
}
|
|
@@ -45,7 +45,7 @@ export interface ContestProblemBasicDataResponseDTO extends Omit<ContestProblem,
|
|
|
45
45
|
prerequisites: UpsertContestProblemPrerequisiteDTO;
|
|
46
46
|
judge: ProblemJudgeSummaryListResponseDTO;
|
|
47
47
|
tags: string[];
|
|
48
|
-
|
|
48
|
+
organization: EntityOrganizationSummaryListResponseDTO;
|
|
49
49
|
}
|
|
50
50
|
export interface ContestContestProblemDataResponseDTO extends Omit<ProblemSummaryListResponseDTO, 'user'> {
|
|
51
51
|
author: string;
|
|
@@ -6,7 +6,7 @@ export interface OrganizationJudgeResponseDTO {
|
|
|
6
6
|
name: string;
|
|
7
7
|
keyPrefix: string;
|
|
8
8
|
}
|
|
9
|
-
export interface
|
|
9
|
+
export interface OrganizationTrustedOrganizationResponseDTO {
|
|
10
10
|
key: string;
|
|
11
11
|
name: string;
|
|
12
12
|
}
|
|
@@ -20,7 +20,7 @@ export interface OrganizationResponseDTO extends EmailDataResponseDTO {
|
|
|
20
20
|
plan: OrganizationPlan;
|
|
21
21
|
startTimestamp: number;
|
|
22
22
|
judges: OrganizationJudgeResponseDTO[];
|
|
23
|
-
|
|
23
|
+
trustedOrganizations: OrganizationTrustedOrganizationResponseDTO[];
|
|
24
24
|
styles: OrganizationStylesResponseDTO;
|
|
25
25
|
}
|
|
26
26
|
export interface OrganizationUserPermissionsResponseDTO extends OrganizationResponseDTO {
|
package/dist/dto/problem.d.ts
CHANGED
|
@@ -6,11 +6,11 @@ export interface ProblemJudgeSummaryListResponseDTO extends Pick<JudgeBaseDocume
|
|
|
6
6
|
isCustom: boolean;
|
|
7
7
|
isMain: boolean;
|
|
8
8
|
}
|
|
9
|
-
export interface
|
|
9
|
+
export interface EntityOrganizationSummaryListResponseDTO {
|
|
10
10
|
key: string;
|
|
11
11
|
}
|
|
12
12
|
export interface ProblemBasicSummaryListResponseDTO {
|
|
13
|
-
|
|
13
|
+
organization: EntityOrganizationSummaryListResponseDTO;
|
|
14
14
|
judge: ProblemJudgeSummaryListResponseDTO;
|
|
15
15
|
key: string;
|
|
16
16
|
name: string;
|
|
@@ -39,7 +39,7 @@ export interface ProblemJudgeSystemSummaryListResponseDTO extends ProblemJudgeSu
|
|
|
39
39
|
name: string;
|
|
40
40
|
id: string;
|
|
41
41
|
}
|
|
42
|
-
export interface
|
|
42
|
+
export interface EntityOrganizationSystemSummaryListResponseDTO extends EntityOrganizationSummaryListResponseDTO {
|
|
43
43
|
name: string;
|
|
44
44
|
id: string;
|
|
45
45
|
}
|
|
@@ -48,7 +48,7 @@ export interface ProblemSystemSummaryListResponseDTO extends ProblemSummaryListR
|
|
|
48
48
|
id: string;
|
|
49
49
|
owner: EntityOwnerSystemSummaryListResponseDTO;
|
|
50
50
|
judge: ProblemJudgeSystemSummaryListResponseDTO;
|
|
51
|
-
|
|
51
|
+
organization: EntityOrganizationSystemSummaryListResponseDTO;
|
|
52
52
|
creationTimestamp: number;
|
|
53
53
|
updateTimestamp: number;
|
|
54
54
|
}
|
package/dist/dto/session.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { EntityOrganizationSystemSummaryListResponseDTO } from './problem.js';
|
|
2
2
|
import type { UserBasicResponseDTO } from './user.js';
|
|
3
3
|
export interface SessionBasicResponseDTO {
|
|
4
4
|
id: string;
|
|
@@ -11,5 +11,5 @@ export interface SessionBasicResponseDTO {
|
|
|
11
11
|
export interface UserSessionSystemSummaryListResponseDTO extends SessionBasicResponseDTO {
|
|
12
12
|
userId: string;
|
|
13
13
|
user: UserBasicResponseDTO;
|
|
14
|
-
|
|
14
|
+
organization: EntityOrganizationSystemSummaryListResponseDTO;
|
|
15
15
|
}
|
package/dist/dto/statistics.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { UserOrganizationBasicInfoResponseDTO } from './user.js';
|
|
2
2
|
export type GroupByTimestampKey = 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second' | number;
|
|
3
3
|
export type StatisticsGrouped<T> = Partial<Record<GroupByTimestampKey, Record<number, T>>>;
|
|
4
|
-
export interface
|
|
4
|
+
export interface StatisticsOrganizationResponseDTO {
|
|
5
5
|
codeEditorRuns: StatisticsGrouped<number>;
|
|
6
6
|
judgingRuns: StatisticsGrouped<number>;
|
|
7
7
|
reJudgingRuns: StatisticsGrouped<number>;
|
package/dist/dto/submission.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CodeLanguage, EntityState, ProblemScoringMode, ProblemType, ProblemVerdict, SubmissionRunStatus } from '../enums/index.js';
|
|
2
2
|
import type { ContestUser, DataLog } from '../types/index.js';
|
|
3
|
-
import type {
|
|
3
|
+
import type { EntityOrganizationSummaryListResponseDTO, EntityOrganizationSystemSummaryListResponseDTO, ProblemJudgeSummaryListResponseDTO } from './problem.js';
|
|
4
4
|
import type { UserOrganizationBasicInfoResponseDTO } from './user.js';
|
|
5
5
|
export interface SubmissionProblemSummaryListResponseDTO {
|
|
6
6
|
isAdministrator: boolean;
|
|
@@ -11,7 +11,7 @@ export interface SubmissionProblemSummaryListResponseDTO {
|
|
|
11
11
|
type: ProblemType;
|
|
12
12
|
timeLimit: number;
|
|
13
13
|
memoryLimit: number;
|
|
14
|
-
|
|
14
|
+
organization: EntityOrganizationSummaryListResponseDTO;
|
|
15
15
|
judge: ProblemJudgeSummaryListResponseDTO;
|
|
16
16
|
}
|
|
17
17
|
export interface SubmissionContestSummaryListResponseDTO {
|
|
@@ -21,7 +21,7 @@ export interface SubmissionContestSummaryListResponseDTO {
|
|
|
21
21
|
isManager: boolean;
|
|
22
22
|
problemIndex: string;
|
|
23
23
|
problemColor: string;
|
|
24
|
-
|
|
24
|
+
organization: EntityOrganizationSummaryListResponseDTO;
|
|
25
25
|
isFrozen: boolean;
|
|
26
26
|
isQuiet: boolean;
|
|
27
27
|
isUpsolving: boolean;
|
|
@@ -52,7 +52,7 @@ export interface SubmissionSummaryListResponseDTO {
|
|
|
52
52
|
processed: number;
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
|
-
|
|
55
|
+
organization: EntityOrganizationSummaryListResponseDTO;
|
|
56
56
|
}
|
|
57
57
|
export interface SubmissionProblemSystemSummaryListResponseDTO extends SubmissionProblemSummaryListResponseDTO {
|
|
58
58
|
id: string;
|
|
@@ -64,7 +64,7 @@ export interface SubmissionContestSystemSummaryListResponseDTO extends Submissio
|
|
|
64
64
|
export interface SubmissionSystemSummaryListResponseDTO extends SubmissionSummaryListResponseDTO {
|
|
65
65
|
problem: SubmissionProblemSystemSummaryListResponseDTO;
|
|
66
66
|
contest: SubmissionContestSystemSummaryListResponseDTO | null;
|
|
67
|
-
|
|
67
|
+
organization: EntityOrganizationSystemSummaryListResponseDTO;
|
|
68
68
|
creationTimestamp: number;
|
|
69
69
|
updateTimestamp: number;
|
|
70
70
|
state: EntityState;
|
package/dist/dto/system.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface EcsTask {
|
|
|
16
16
|
containers?: TaskResponseDTOContainer[];
|
|
17
17
|
}
|
|
18
18
|
export interface EcsTaskSystemSummaryListResponseDTO extends EcsTask {
|
|
19
|
-
|
|
19
|
+
isHighRunnerOrganizationKeys: string[];
|
|
20
20
|
}
|
|
21
21
|
export interface EcsTaskDefinition {
|
|
22
22
|
family: string;
|
|
@@ -27,7 +27,7 @@ export interface EcsTaskDefinition {
|
|
|
27
27
|
registeredAt: Date;
|
|
28
28
|
}
|
|
29
29
|
export interface EcsTaskDefinitionSystemSummaryListResponseDTO extends EcsTaskDefinition {
|
|
30
|
-
|
|
30
|
+
isHighRunnerOrganizationKeys: string[];
|
|
31
31
|
}
|
|
32
32
|
export interface Ec2Instance {
|
|
33
33
|
instanceId: string;
|
package/dist/dto/user.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { ContestRole, CourseRole, FileRole, ProblemRole, SystemRole, TeamRole, UserRole } from '../enums/index.js';
|
|
2
2
|
import type { RecordId, UserBasicInfo, UserHandles, UserSettings } from '../types/index.js';
|
|
3
3
|
import type { OrganizationStylesResponseDTO } from './organization.js';
|
|
4
|
-
import type {
|
|
4
|
+
import type { EntityOrganizationSummaryListResponseDTO, EntityOrganizationSystemSummaryListResponseDTO } from './problem.js';
|
|
5
5
|
export interface EntityOwnerSystemSummaryListResponseDTO {
|
|
6
6
|
id: string;
|
|
7
7
|
nickname: string;
|
|
8
8
|
imageUrl: string;
|
|
9
|
-
|
|
9
|
+
organization: EntityOrganizationSummaryListResponseDTO;
|
|
10
10
|
}
|
|
11
11
|
export interface UserOrganizationBasicInfoResponseDTO extends UserBasicInfo {
|
|
12
|
-
|
|
12
|
+
organization: EntityOrganizationSummaryListResponseDTO;
|
|
13
13
|
}
|
|
14
14
|
export interface UserSummaryListResponseDTO extends UserOrganizationBasicInfoResponseDTO {
|
|
15
15
|
email: string;
|
|
@@ -30,7 +30,7 @@ export interface UserSystemSummaryListResponseDTO extends UserSummaryListRespons
|
|
|
30
30
|
courseRole: CourseRole;
|
|
31
31
|
canResetPassword: boolean;
|
|
32
32
|
owner: EntityOwnerSystemSummaryListResponseDTO;
|
|
33
|
-
|
|
33
|
+
organization: EntityOrganizationSystemSummaryListResponseDTO;
|
|
34
34
|
createdAt: number;
|
|
35
35
|
updatedAt: number;
|
|
36
36
|
archivedAt: number | null;
|
|
@@ -66,7 +66,7 @@ export type UserPermissionsResponseDTO = {
|
|
|
66
66
|
create: boolean;
|
|
67
67
|
manage: boolean;
|
|
68
68
|
};
|
|
69
|
-
|
|
69
|
+
organization: {
|
|
70
70
|
manage: boolean;
|
|
71
71
|
administrate: boolean;
|
|
72
72
|
};
|
|
@@ -81,9 +81,9 @@ export type UserPing = {
|
|
|
81
81
|
settings: UserSettings;
|
|
82
82
|
isLogged: boolean;
|
|
83
83
|
sessionId: RecordId;
|
|
84
|
-
|
|
84
|
+
organization: EntityOrganizationSummaryListResponseDTO;
|
|
85
85
|
};
|
|
86
|
-
export type
|
|
86
|
+
export type OrganizationPingResponseDTO = {
|
|
87
87
|
key: string;
|
|
88
88
|
contactEmail: string;
|
|
89
89
|
contactCellPhoneNumber: string;
|
|
@@ -95,7 +95,7 @@ export type CompanyPingResponseDTO = {
|
|
|
95
95
|
};
|
|
96
96
|
export interface PingResponseDTO {
|
|
97
97
|
user: UserPing;
|
|
98
|
-
|
|
98
|
+
organization: OrganizationPingResponseDTO;
|
|
99
99
|
}
|
|
100
100
|
export interface UserRankResponseDTO {
|
|
101
101
|
imageUrl: string;
|
|
@@ -105,5 +105,5 @@ export interface UserRankResponseDTO {
|
|
|
105
105
|
institution: string;
|
|
106
106
|
problemPoints: number;
|
|
107
107
|
competitionPoints: number;
|
|
108
|
-
|
|
108
|
+
organization: EntityOrganizationSummaryListResponseDTO;
|
|
109
109
|
}
|
|
@@ -4,34 +4,35 @@ export declare const ErrorCode: {
|
|
|
4
4
|
readonly FORBIDDEN: "FORBIDDEN";
|
|
5
5
|
readonly NOT_FOUND: "NOT_FOUND";
|
|
6
6
|
readonly METHOD_NOT_ALLOWED: "METHOD_NOT_ALLOWED";
|
|
7
|
+
readonly CONFLICT: "CONFLICT";
|
|
7
8
|
readonly INTERNAL_SERVER_ERROR: "INTERNAL_SERVER_ERROR";
|
|
8
9
|
readonly ABORTED_REQUEST: "ABORTED_REQUEST";
|
|
9
10
|
readonly ERROR_ON_RESPONSE: "ERROR_ON_RESPONSE";
|
|
10
11
|
readonly SERVICE_NOT_FOUND: "SERVICE_NOT_FOUND";
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
19
|
-
readonly
|
|
12
|
+
readonly INTERNAL_SERVER_ERROR_ON_ORGANIZATION_SERVICE: "INTERNAL_SERVER_ERROR_ON_ORGANIZATION_SERVICE";
|
|
13
|
+
readonly ORGANIZATION_NOT_CREATED: "ORGANIZATION_NOT_CREATED";
|
|
14
|
+
readonly ORGANIZATION_NOT_FOUND: "ORGANIZATION_NOT_FOUND";
|
|
15
|
+
readonly ORGANIZATION_NOT_UPDATED: "ORGANIZATION_NOT_UPDATED";
|
|
16
|
+
readonly ORGANIZATION_NOT_DELETED: "ORGANIZATION_NOT_DELETED";
|
|
17
|
+
readonly NOT_ALLOWED_TO_CREATE_ORGANIZATION: "NOT_ALLOWED_TO_CREATE_ORGANIZATION";
|
|
18
|
+
readonly NOT_ALLOWED_TO_VIEW_ORGANIZATION: "NOT_ALLOWED_TO_VIEW_ORGANIZATION";
|
|
19
|
+
readonly NOT_ALLOWED_TO_UPDATE_ORGANIZATION: "NOT_ALLOWED_TO_UPDATE_ORGANIZATION";
|
|
20
|
+
readonly NOT_ALLOWED_TO_DELETE_ORGANIZATION: "NOT_ALLOWED_TO_DELETE_ORGANIZATION";
|
|
20
21
|
readonly INTERNAL_SERVER_ERROR_ON_USERS_SERVICE: "INTERNAL_SERVER_ERROR_ON_USERS_SERVICE";
|
|
21
22
|
readonly USER_NOT_CREATED: "USER_NOT_CREATED";
|
|
22
23
|
readonly USER_NOT_FOUND: "USER_NOT_FOUND";
|
|
24
|
+
readonly USER_NOT_FOUND_BY_EMAIL: "USER_NOT_FOUND_BY_EMAIL";
|
|
25
|
+
readonly USER_NOT_FOUND_BY_NICKNAME: "USER_NOT_FOUND_BY_NICKNAME";
|
|
23
26
|
readonly USER_NOT_UPDATED: "USER_NOT_UPDATED";
|
|
24
27
|
readonly USER_NOT_DELETED: "USER_NOT_DELETED";
|
|
25
|
-
readonly
|
|
26
|
-
readonly
|
|
27
|
-
readonly
|
|
28
|
-
readonly
|
|
28
|
+
readonly NOT_ALLOWED_TO_CREATE_USER: "NOT_ALLOWED_TO_CREATE_USER";
|
|
29
|
+
readonly NOT_ALLOWED_TO_VIEW_USER: "NOT_ALLOWED_TO_VIEW_USER";
|
|
30
|
+
readonly NOT_ALLOWED_TO_UPDATE_USER: "NOT_ALLOWED_TO_UPDATE_USER";
|
|
31
|
+
readonly NOT_ALLOWED_TO_DELETE_USER: "NOT_ALLOWED_TO_DELETE_USER";
|
|
29
32
|
readonly USER_IS_REPORTED: "USER_IS_REPORTED";
|
|
30
33
|
readonly USER_IS_ARCHIVED: "USER_IS_ARCHIVED";
|
|
31
|
-
readonly
|
|
32
|
-
readonly
|
|
33
|
-
readonly THE_EMAIL_IS_ALREADY_REGISTERED: "THE_EMAIL_IS_ALREADY_REGISTERED";
|
|
34
|
-
readonly THE_NICKNAME_IS_ALREADY_TAKEN: "THE_NICKNAME_IS_ALREADY_TAKEN";
|
|
34
|
+
readonly EMAIL_ALREADY_IN_USE: "EMAIL_ALREADY_IN_USE";
|
|
35
|
+
readonly NICKNAME_ALREADY_TAKEN: "NICKNAME_ALREADY_TAKEN";
|
|
35
36
|
readonly INCORRECT_PASSWORD: "INCORRECT_PASSWORD";
|
|
36
37
|
readonly USER_SESSION_NOT_CREATED: "USER_SESSION_NOT_CREATED";
|
|
37
38
|
readonly USER_SESSION_NOT_FOUND: "USER_SESSION_NOT_FOUND";
|
|
@@ -42,13 +43,13 @@ export declare const ErrorCode: {
|
|
|
42
43
|
readonly PROBLEM_NOT_FOUND: "PROBLEM_NOT_FOUND";
|
|
43
44
|
readonly PROBLEM_NOT_UPDATED: "PROBLEM_NOT_UPDATED";
|
|
44
45
|
readonly PROBLEM_NOT_DELETED: "PROBLEM_NOT_DELETED";
|
|
45
|
-
readonly
|
|
46
|
-
readonly
|
|
47
|
-
readonly
|
|
48
|
-
readonly
|
|
46
|
+
readonly NOT_ALLOWED_TO_CREATE_PROBLEM: "NOT_ALLOWED_TO_CREATE_PROBLEM";
|
|
47
|
+
readonly NOT_ALLOWED_TO_VIEW_PROBLEM: "NOT_ALLOWED_TO_VIEW_PROBLEM";
|
|
48
|
+
readonly NOT_ALLOWED_TO_UPDATE_PROBLEM: "NOT_ALLOWED_TO_UPDATE_PROBLEM";
|
|
49
|
+
readonly NOT_ALLOWED_TO_DELETE_PROBLEM: "NOT_ALLOWED_TO_DELETE_PROBLEM";
|
|
49
50
|
readonly PROBLEM_MODE_NOT_SUPPORTED: "PROBLEM_MODE_NOT_SUPPORTED";
|
|
50
51
|
readonly PROBLEM_TYPE_NOT_SUPPORTED: "PROBLEM_TYPE_NOT_SUPPORTED";
|
|
51
|
-
readonly
|
|
52
|
+
readonly PROBLEM_TIME_LIMIT_MUST_BE_NUMBER: "PROBLEM_TIME_LIMIT_MUST_BE_NUMBER";
|
|
52
53
|
readonly PROBLEM_MEMORY_LIMIT_MUST_BE_NUMBER: "PROBLEM_MEMORY_LIMIT_MUST_BE_NUMBER";
|
|
53
54
|
readonly TEST_CASE_FILE_EMPTY: "TEST_CASE_FILE_EMPTY";
|
|
54
55
|
readonly INTERNAL_SERVER_ERROR_ON_CONTESTS_SERVICE: "INTERNAL_SERVER_ERROR_ON_CONTESTS_SERVICE";
|
|
@@ -56,21 +57,21 @@ export declare const ErrorCode: {
|
|
|
56
57
|
readonly CONTEST_NOT_FOUND: "CONTEST_NOT_FOUND";
|
|
57
58
|
readonly CONTEST_NOT_UPDATED: "CONTEST_NOT_UPDATED";
|
|
58
59
|
readonly CONTEST_NOT_DELETED: "CONTEST_NOT_DELETED";
|
|
59
|
-
readonly
|
|
60
|
-
readonly
|
|
61
|
-
readonly
|
|
62
|
-
readonly
|
|
63
|
-
readonly
|
|
64
|
-
readonly
|
|
60
|
+
readonly NOT_ALLOWED_TO_CREATE_CONTEST: "NOT_ALLOWED_TO_CREATE_CONTEST";
|
|
61
|
+
readonly NOT_ALLOWED_TO_VIEW_CONTEST: "NOT_ALLOWED_TO_VIEW_CONTEST";
|
|
62
|
+
readonly NOT_ALLOWED_TO_UPDATE_CONTEST: "NOT_ALLOWED_TO_UPDATE_CONTEST";
|
|
63
|
+
readonly NOT_ALLOWED_TO_DELETE_CONTEST: "NOT_ALLOWED_TO_DELETE_CONTEST";
|
|
64
|
+
readonly NOT_ALLOWED_TO_REGISTER_TO_CONTEST: "NOT_ALLOWED_TO_REGISTER_TO_CONTEST";
|
|
65
|
+
readonly ALREADY_REGISTERED: "ALREADY_REGISTERED";
|
|
65
66
|
readonly NOT_ALLOWED_TO_VIEW_CONTESTS: "NOT_ALLOWED_TO_VIEW_CONTESTS";
|
|
66
67
|
readonly SCOREBOARD_NOT_CREATED: "SCOREBOARD_NOT_CREATED";
|
|
67
68
|
readonly SCOREBOARD_NOT_FOUND: "SCOREBOARD_NOT_FOUND";
|
|
68
69
|
readonly SCOREBOARD_NOT_UPDATED: "SCOREBOARD_NOT_UPDATED";
|
|
69
70
|
readonly SCOREBOARD_NOT_DELETED: "SCOREBOARD_NOT_DELETED";
|
|
70
|
-
readonly
|
|
71
|
-
readonly
|
|
72
|
-
readonly
|
|
73
|
-
readonly
|
|
71
|
+
readonly NOT_ALLOWED_TO_CREATE_SCOREBOARD: "NOT_ALLOWED_TO_CREATE_SCOREBOARD";
|
|
72
|
+
readonly NOT_ALLOWED_TO_VIEW_SCOREBOARD: "NOT_ALLOWED_TO_VIEW_SCOREBOARD";
|
|
73
|
+
readonly NOT_ALLOWED_TO_UPDATE_SCOREBOARD: "NOT_ALLOWED_TO_UPDATE_SCOREBOARD";
|
|
74
|
+
readonly NOT_ALLOWED_TO_DELETE_SCOREBOARD: "NOT_ALLOWED_TO_DELETE_SCOREBOARD";
|
|
74
75
|
readonly CLARIFICATION_NOT_CREATED: "CLARIFICATION_NOT_CREATED";
|
|
75
76
|
readonly CLARIFICATION_NOT_FOUND: "CLARIFICATION_NOT_FOUND";
|
|
76
77
|
readonly CLARIFICATION_NOT_UPDATED: "CLARIFICATION_NOT_UPDATED";
|
|
@@ -85,23 +86,23 @@ export declare const ErrorCode: {
|
|
|
85
86
|
readonly SUBMISSION_NOT_UPDATED: "SUBMISSION_NOT_UPDATED";
|
|
86
87
|
readonly SOURCE_EMPTY: "SOURCE_EMPTY";
|
|
87
88
|
readonly PROGRAMMING_LANGUAGE_NOT_SUPPORTED: "PROGRAMMING_LANGUAGE_NOT_SUPPORTED";
|
|
88
|
-
readonly
|
|
89
|
+
readonly NOT_ALLOWED_TO_SUBMIT_PROBLEM_IN_CONTEST: "NOT_ALLOWED_TO_SUBMIT_PROBLEM_IN_CONTEST";
|
|
89
90
|
readonly JUDGEMENT_UNAVAILABLE: "JUDGEMENT_UNAVAILABLE";
|
|
90
91
|
readonly INTERNAL_SERVER_ERROR_ON_UTILS_SERVICES: "INTERNAL_SERVER_ERROR_ON_UTILS_SERVICES";
|
|
91
92
|
readonly EMPTY_IMAGE: "EMPTY_IMAGE";
|
|
92
93
|
readonly CODES_ERROR: "CODES_ERROR";
|
|
93
94
|
readonly COMPILATION_FAILED: "COMPILATION_FAILED";
|
|
94
95
|
readonly FILES_ERROR: "FILES_ERROR";
|
|
95
|
-
readonly
|
|
96
|
+
readonly EMAIL_NOT_SENT: "EMAIL_NOT_SENT";
|
|
96
97
|
readonly INTERNAL_SERVER_ERROR_ON_TEAMS_SERVICE: "INTERNAL_SERVER_ERROR_ON_TEAMS_SERVICE";
|
|
97
98
|
readonly TEAM_NOT_CREATED: "TEAM_NOT_CREATED";
|
|
98
99
|
readonly TEAM_NOT_FOUND: "TEAM_NOT_FOUND";
|
|
99
100
|
readonly TEAM_NOT_UPDATED: "TEAM_NOT_UPDATED";
|
|
100
101
|
readonly TEAM_NOT_DELETED: "TEAM_NOT_DELETED";
|
|
101
|
-
readonly
|
|
102
|
-
readonly
|
|
103
|
-
readonly
|
|
104
|
-
readonly
|
|
102
|
+
readonly NOT_ALLOWED_TO_CREATE_TEAM: "NOT_ALLOWED_TO_CREATE_TEAM";
|
|
103
|
+
readonly NOT_ALLOWED_TO_VIEW_TEAM: "NOT_ALLOWED_TO_VIEW_TEAM";
|
|
104
|
+
readonly NOT_ALLOWED_TO_UPDATE_TEAM: "NOT_ALLOWED_TO_UPDATE_TEAM";
|
|
105
|
+
readonly NOT_ALLOWED_TO_DELETE_TEAM: "NOT_ALLOWED_TO_DELETE_TEAM";
|
|
105
106
|
readonly TEAM_IS_REPORTED: "TEAM_IS_REPORTED";
|
|
106
107
|
readonly TEAM_IS_ARCHIVED: "TEAM_IS_ARCHIVED";
|
|
107
108
|
readonly INTERNAL_SERVER_ERROR_ON_FILES_SERVICE: "INTERNAL_SERVER_ERROR_ON_FILES_SERVICE";
|
|
@@ -109,10 +110,10 @@ export declare const ErrorCode: {
|
|
|
109
110
|
readonly FILE_NOT_FOUND: "FILE_NOT_FOUND";
|
|
110
111
|
readonly FILE_NOT_UPDATED: "FILE_NOT_UPDATED";
|
|
111
112
|
readonly FILE_NOT_DELETED: "FILE_NOT_DELETED";
|
|
112
|
-
readonly
|
|
113
|
-
readonly
|
|
114
|
-
readonly
|
|
115
|
-
readonly
|
|
113
|
+
readonly NOT_ALLOWED_TO_CREATE_FILE: "NOT_ALLOWED_TO_CREATE_FILE";
|
|
114
|
+
readonly NOT_ALLOWED_TO_VIEW_FILE: "NOT_ALLOWED_TO_VIEW_FILE";
|
|
115
|
+
readonly NOT_ALLOWED_TO_UPDATE_FILE: "NOT_ALLOWED_TO_UPDATE_FILE";
|
|
116
|
+
readonly NOT_ALLOWED_TO_DELETE_FILE: "NOT_ALLOWED_TO_DELETE_FILE";
|
|
116
117
|
readonly FILE_IS_RESERVED: "FILE_IS_RESERVED";
|
|
117
118
|
readonly FILE_IS_PRIVATE: "FILE_IS_PRIVATE";
|
|
118
119
|
readonly FILE_IS_ARCHIVED: "FILE_IS_ARCHIVED";
|
|
@@ -5,37 +5,38 @@ export const ErrorCode = {
|
|
|
5
5
|
FORBIDDEN: 'FORBIDDEN',
|
|
6
6
|
NOT_FOUND: 'NOT_FOUND',
|
|
7
7
|
METHOD_NOT_ALLOWED: 'METHOD_NOT_ALLOWED',
|
|
8
|
+
CONFLICT: 'CONFLICT',
|
|
8
9
|
INTERNAL_SERVER_ERROR: 'INTERNAL_SERVER_ERROR',
|
|
9
10
|
// UI general errors
|
|
10
11
|
ABORTED_REQUEST: 'ABORTED_REQUEST',
|
|
11
12
|
ERROR_ON_RESPONSE: 'ERROR_ON_RESPONSE',
|
|
12
13
|
SERVICE_NOT_FOUND: 'SERVICE_NOT_FOUND',
|
|
13
|
-
//
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
// Organization errors
|
|
15
|
+
INTERNAL_SERVER_ERROR_ON_ORGANIZATION_SERVICE: 'INTERNAL_SERVER_ERROR_ON_ORGANIZATION_SERVICE',
|
|
16
|
+
ORGANIZATION_NOT_CREATED: 'ORGANIZATION_NOT_CREATED',
|
|
17
|
+
ORGANIZATION_NOT_FOUND: 'ORGANIZATION_NOT_FOUND',
|
|
18
|
+
ORGANIZATION_NOT_UPDATED: 'ORGANIZATION_NOT_UPDATED',
|
|
19
|
+
ORGANIZATION_NOT_DELETED: 'ORGANIZATION_NOT_DELETED',
|
|
20
|
+
NOT_ALLOWED_TO_CREATE_ORGANIZATION: 'NOT_ALLOWED_TO_CREATE_ORGANIZATION',
|
|
21
|
+
NOT_ALLOWED_TO_VIEW_ORGANIZATION: 'NOT_ALLOWED_TO_VIEW_ORGANIZATION',
|
|
22
|
+
NOT_ALLOWED_TO_UPDATE_ORGANIZATION: 'NOT_ALLOWED_TO_UPDATE_ORGANIZATION',
|
|
23
|
+
NOT_ALLOWED_TO_DELETE_ORGANIZATION: 'NOT_ALLOWED_TO_DELETE_ORGANIZATION',
|
|
23
24
|
// User errors
|
|
24
25
|
INTERNAL_SERVER_ERROR_ON_USERS_SERVICE: 'INTERNAL_SERVER_ERROR_ON_USERS_SERVICE',
|
|
25
26
|
USER_NOT_CREATED: 'USER_NOT_CREATED',
|
|
26
27
|
USER_NOT_FOUND: 'USER_NOT_FOUND',
|
|
28
|
+
USER_NOT_FOUND_BY_EMAIL: 'USER_NOT_FOUND_BY_EMAIL',
|
|
29
|
+
USER_NOT_FOUND_BY_NICKNAME: 'USER_NOT_FOUND_BY_NICKNAME',
|
|
27
30
|
USER_NOT_UPDATED: 'USER_NOT_UPDATED',
|
|
28
31
|
USER_NOT_DELETED: 'USER_NOT_DELETED',
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
NOT_ALLOWED_TO_CREATE_USER: 'NOT_ALLOWED_TO_CREATE_USER',
|
|
33
|
+
NOT_ALLOWED_TO_VIEW_USER: 'NOT_ALLOWED_TO_VIEW_USER',
|
|
34
|
+
NOT_ALLOWED_TO_UPDATE_USER: 'NOT_ALLOWED_TO_UPDATE_USER',
|
|
35
|
+
NOT_ALLOWED_TO_DELETE_USER: 'NOT_ALLOWED_TO_DELETE_USER',
|
|
33
36
|
USER_IS_REPORTED: 'USER_IS_REPORTED',
|
|
34
37
|
USER_IS_ARCHIVED: 'USER_IS_ARCHIVED',
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
THE_EMAIL_IS_ALREADY_REGISTERED: 'THE_EMAIL_IS_ALREADY_REGISTERED',
|
|
38
|
-
THE_NICKNAME_IS_ALREADY_TAKEN: 'THE_NICKNAME_IS_ALREADY_TAKEN',
|
|
38
|
+
EMAIL_ALREADY_IN_USE: 'EMAIL_ALREADY_IN_USE',
|
|
39
|
+
NICKNAME_ALREADY_TAKEN: 'NICKNAME_ALREADY_TAKEN',
|
|
39
40
|
INCORRECT_PASSWORD: 'INCORRECT_PASSWORD',
|
|
40
41
|
USER_SESSION_NOT_CREATED: 'USER_SESSION_NOT_CREATED',
|
|
41
42
|
USER_SESSION_NOT_FOUND: 'USER_SESSION_NOT_FOUND',
|
|
@@ -47,13 +48,13 @@ export const ErrorCode = {
|
|
|
47
48
|
PROBLEM_NOT_FOUND: 'PROBLEM_NOT_FOUND',
|
|
48
49
|
PROBLEM_NOT_UPDATED: 'PROBLEM_NOT_UPDATED',
|
|
49
50
|
PROBLEM_NOT_DELETED: 'PROBLEM_NOT_DELETED',
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
NOT_ALLOWED_TO_CREATE_PROBLEM: 'NOT_ALLOWED_TO_CREATE_PROBLEM',
|
|
52
|
+
NOT_ALLOWED_TO_VIEW_PROBLEM: 'NOT_ALLOWED_TO_VIEW_PROBLEM',
|
|
53
|
+
NOT_ALLOWED_TO_UPDATE_PROBLEM: 'NOT_ALLOWED_TO_UPDATE_PROBLEM',
|
|
54
|
+
NOT_ALLOWED_TO_DELETE_PROBLEM: 'NOT_ALLOWED_TO_DELETE_PROBLEM',
|
|
54
55
|
PROBLEM_MODE_NOT_SUPPORTED: 'PROBLEM_MODE_NOT_SUPPORTED',
|
|
55
56
|
PROBLEM_TYPE_NOT_SUPPORTED: 'PROBLEM_TYPE_NOT_SUPPORTED',
|
|
56
|
-
|
|
57
|
+
PROBLEM_TIME_LIMIT_MUST_BE_NUMBER: 'PROBLEM_TIME_LIMIT_MUST_BE_NUMBER',
|
|
57
58
|
PROBLEM_MEMORY_LIMIT_MUST_BE_NUMBER: 'PROBLEM_MEMORY_LIMIT_MUST_BE_NUMBER',
|
|
58
59
|
TEST_CASE_FILE_EMPTY: 'TEST_CASE_FILE_EMPTY',
|
|
59
60
|
// Contest errors
|
|
@@ -62,21 +63,21 @@ export const ErrorCode = {
|
|
|
62
63
|
CONTEST_NOT_FOUND: 'CONTEST_NOT_FOUND',
|
|
63
64
|
CONTEST_NOT_UPDATED: 'CONTEST_NOT_UPDATED',
|
|
64
65
|
CONTEST_NOT_DELETED: 'CONTEST_NOT_DELETED',
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
NOT_ALLOWED_TO_CREATE_CONTEST: 'NOT_ALLOWED_TO_CREATE_CONTEST',
|
|
67
|
+
NOT_ALLOWED_TO_VIEW_CONTEST: 'NOT_ALLOWED_TO_VIEW_CONTEST',
|
|
68
|
+
NOT_ALLOWED_TO_UPDATE_CONTEST: 'NOT_ALLOWED_TO_UPDATE_CONTEST',
|
|
69
|
+
NOT_ALLOWED_TO_DELETE_CONTEST: 'NOT_ALLOWED_TO_DELETE_CONTEST',
|
|
70
|
+
NOT_ALLOWED_TO_REGISTER_TO_CONTEST: 'NOT_ALLOWED_TO_REGISTER_TO_CONTEST',
|
|
71
|
+
ALREADY_REGISTERED: 'ALREADY_REGISTERED',
|
|
71
72
|
NOT_ALLOWED_TO_VIEW_CONTESTS: 'NOT_ALLOWED_TO_VIEW_CONTESTS',
|
|
72
73
|
SCOREBOARD_NOT_CREATED: 'SCOREBOARD_NOT_CREATED',
|
|
73
74
|
SCOREBOARD_NOT_FOUND: 'SCOREBOARD_NOT_FOUND',
|
|
74
75
|
SCOREBOARD_NOT_UPDATED: 'SCOREBOARD_NOT_UPDATED',
|
|
75
76
|
SCOREBOARD_NOT_DELETED: 'SCOREBOARD_NOT_DELETED',
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
NOT_ALLOWED_TO_CREATE_SCOREBOARD: 'NOT_ALLOWED_TO_CREATE_SCOREBOARD',
|
|
78
|
+
NOT_ALLOWED_TO_VIEW_SCOREBOARD: 'NOT_ALLOWED_TO_VIEW_SCOREBOARD',
|
|
79
|
+
NOT_ALLOWED_TO_UPDATE_SCOREBOARD: 'NOT_ALLOWED_TO_UPDATE_SCOREBOARD',
|
|
80
|
+
NOT_ALLOWED_TO_DELETE_SCOREBOARD: 'NOT_ALLOWED_TO_DELETE_SCOREBOARD',
|
|
80
81
|
CLARIFICATION_NOT_CREATED: 'CLARIFICATION_NOT_CREATED',
|
|
81
82
|
CLARIFICATION_NOT_FOUND: 'CLARIFICATION_NOT_FOUND',
|
|
82
83
|
CLARIFICATION_NOT_UPDATED: 'CLARIFICATION_NOT_UPDATED',
|
|
@@ -92,7 +93,7 @@ export const ErrorCode = {
|
|
|
92
93
|
SUBMISSION_NOT_UPDATED: 'SUBMISSION_NOT_UPDATED',
|
|
93
94
|
SOURCE_EMPTY: 'SOURCE_EMPTY',
|
|
94
95
|
PROGRAMMING_LANGUAGE_NOT_SUPPORTED: 'PROGRAMMING_LANGUAGE_NOT_SUPPORTED',
|
|
95
|
-
|
|
96
|
+
NOT_ALLOWED_TO_SUBMIT_PROBLEM_IN_CONTEST: 'NOT_ALLOWED_TO_SUBMIT_PROBLEM_IN_CONTEST',
|
|
96
97
|
JUDGEMENT_UNAVAILABLE: 'JUDGEMENT_UNAVAILABLE',
|
|
97
98
|
// Utils errors
|
|
98
99
|
INTERNAL_SERVER_ERROR_ON_UTILS_SERVICES: 'INTERNAL_SERVER_ERROR_ON_UTILS_SERVICES',
|
|
@@ -100,17 +101,17 @@ export const ErrorCode = {
|
|
|
100
101
|
CODES_ERROR: 'CODES_ERROR',
|
|
101
102
|
COMPILATION_FAILED: 'COMPILATION_FAILED',
|
|
102
103
|
FILES_ERROR: 'FILES_ERROR',
|
|
103
|
-
|
|
104
|
+
EMAIL_NOT_SENT: 'EMAIL_NOT_SENT',
|
|
104
105
|
// Team errors
|
|
105
106
|
INTERNAL_SERVER_ERROR_ON_TEAMS_SERVICE: 'INTERNAL_SERVER_ERROR_ON_TEAMS_SERVICE',
|
|
106
107
|
TEAM_NOT_CREATED: 'TEAM_NOT_CREATED',
|
|
107
108
|
TEAM_NOT_FOUND: 'TEAM_NOT_FOUND',
|
|
108
109
|
TEAM_NOT_UPDATED: 'TEAM_NOT_UPDATED',
|
|
109
110
|
TEAM_NOT_DELETED: 'TEAM_NOT_DELETED',
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
NOT_ALLOWED_TO_CREATE_TEAM: 'NOT_ALLOWED_TO_CREATE_TEAM',
|
|
112
|
+
NOT_ALLOWED_TO_VIEW_TEAM: 'NOT_ALLOWED_TO_VIEW_TEAM',
|
|
113
|
+
NOT_ALLOWED_TO_UPDATE_TEAM: 'NOT_ALLOWED_TO_UPDATE_TEAM',
|
|
114
|
+
NOT_ALLOWED_TO_DELETE_TEAM: 'NOT_ALLOWED_TO_DELETE_TEAM',
|
|
114
115
|
TEAM_IS_REPORTED: 'TEAM_IS_REPORTED',
|
|
115
116
|
TEAM_IS_ARCHIVED: 'TEAM_IS_ARCHIVED',
|
|
116
117
|
// File errors
|
|
@@ -119,10 +120,10 @@ export const ErrorCode = {
|
|
|
119
120
|
FILE_NOT_FOUND: 'FILE_NOT_FOUND',
|
|
120
121
|
FILE_NOT_UPDATED: 'FILE_NOT_UPDATED',
|
|
121
122
|
FILE_NOT_DELETED: 'FILE_NOT_DELETED',
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
NOT_ALLOWED_TO_CREATE_FILE: 'NOT_ALLOWED_TO_CREATE_FILE',
|
|
124
|
+
NOT_ALLOWED_TO_VIEW_FILE: 'NOT_ALLOWED_TO_VIEW_FILE',
|
|
125
|
+
NOT_ALLOWED_TO_UPDATE_FILE: 'NOT_ALLOWED_TO_UPDATE_FILE',
|
|
126
|
+
NOT_ALLOWED_TO_DELETE_FILE: 'NOT_ALLOWED_TO_DELETE_FILE',
|
|
126
127
|
FILE_IS_RESERVED: 'FILE_IS_RESERVED',
|
|
127
128
|
FILE_IS_PRIVATE: 'FILE_IS_PRIVATE',
|
|
128
129
|
FILE_IS_ARCHIVED: 'FILE_IS_ARCHIVED',
|
|
@@ -4,5 +4,5 @@ export const TelemetryType = {
|
|
|
4
4
|
EC2: 'EC2',
|
|
5
5
|
ECS_TASK: 'ECS_TASK',
|
|
6
6
|
INSTANCES: 'INSTANCES',
|
|
7
|
-
USER_SESSION: 'USER_SESSION', //
|
|
7
|
+
USER_SESSION: 'USER_SESSION', // organization-id/user-id: { timestamp: number, href: string, uiId: string
|
|
8
8
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const getAssignmentCommentKey: (classKey: string, cycleKey: string, sessionKey: string, assignmentKey: string) => string;
|
|
2
|
-
export declare const getAssignmentUserCommentKey: (classKey: string, cycleKey: string, sessionKey: string, assignmentKey: string, userNickname: string,
|
|
2
|
+
export declare const getAssignmentUserCommentKey: (classKey: string, cycleKey: string, sessionKey: string, assignmentKey: string, userNickname: string, userOrganization: string) => string;
|
|
3
3
|
export declare const getProblemCommentKey: (problemKey: string) => string;
|
|
4
4
|
export declare const getContestCommentKey: (contestKey: string) => string;
|
package/dist/helpers/comments.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export const getAssignmentCommentKey = (classKey, cycleKey, sessionKey, assignmentKey) => `class:${classKey}|cycle:${cycleKey}|session:${sessionKey}|assignment:${assignmentKey}`;
|
|
2
|
-
export const getAssignmentUserCommentKey = (classKey, cycleKey, sessionKey, assignmentKey, userNickname,
|
|
2
|
+
export const getAssignmentUserCommentKey = (classKey, cycleKey, sessionKey, assignmentKey, userNickname, userOrganization) => `class:${classKey}|cycle:${cycleKey}|session:${sessionKey}|assignment:${assignmentKey}|user_nickname:${userNickname}|user_organization:${userOrganization}`;
|
|
3
3
|
export const getProblemCommentKey = (problemKey) => `problem:${problemKey}`;
|
|
4
4
|
export const getContestCommentKey = (contestKey) => `contest:${contestKey}`;
|
package/dist/helpers/socket.js
CHANGED
|
@@ -129,14 +129,14 @@ export const isUserMessageWebSocketResponseEventDTO = (event) => {
|
|
|
129
129
|
return false;
|
|
130
130
|
const v = event;
|
|
131
131
|
const user = v.user;
|
|
132
|
-
const
|
|
132
|
+
const organization = user?.organization;
|
|
133
133
|
return (event.event === WebSocketResponseEvent.USER_MESSAGE &&
|
|
134
134
|
typeof user?.nickname === 'string' &&
|
|
135
135
|
!!user.nickname &&
|
|
136
136
|
typeof user?.imageUrl === 'string' &&
|
|
137
137
|
!!user.imageUrl &&
|
|
138
|
-
typeof
|
|
139
|
-
!!
|
|
138
|
+
typeof organization?.key === 'string' &&
|
|
139
|
+
!!organization.key &&
|
|
140
140
|
!!v.content);
|
|
141
141
|
};
|
|
142
142
|
export const isSendDataWebSocketResponseEventDTO = (event) => {
|
package/dist/helpers/user.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ClientId, RecordId } from '../types/index.js';
|
|
2
|
-
export declare const getUserKey: (userNickname: string,
|
|
2
|
+
export declare const getUserKey: (userNickname: string, userOrganizationKey: string) => string;
|
|
3
3
|
export declare const getParamsOfUserKey: (userKey: string) => {
|
|
4
4
|
userNickname: string;
|
|
5
|
-
|
|
5
|
+
userOrganizationKey: string;
|
|
6
6
|
};
|
|
7
7
|
export declare const getClientId: (sessionId: RecordId, uiId: string) => ClientId;
|
|
8
8
|
export declare const getParamsOfClientId: (clientId: ClientId) => {
|
package/dist/helpers/user.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export const getUserKey = (userNickname,
|
|
2
|
-
return `${userNickname}|${
|
|
1
|
+
export const getUserKey = (userNickname, userOrganizationKey) => {
|
|
2
|
+
return `${userNickname}|${userOrganizationKey}`;
|
|
3
3
|
};
|
|
4
4
|
export const getParamsOfUserKey = (userKey) => {
|
|
5
|
-
const [userNickname,
|
|
6
|
-
return { userNickname,
|
|
5
|
+
const [userNickname, userOrganizationKey] = userKey.split('|');
|
|
6
|
+
return { userNickname, userOrganizationKey };
|
|
7
7
|
};
|
|
8
8
|
export const getClientId = (sessionId, uiId) => {
|
|
9
9
|
return `${sessionId}|${uiId}`;
|
package/dist/types/entity.d.ts
CHANGED
|
@@ -36,8 +36,8 @@ export interface EntityMembers {
|
|
|
36
36
|
export interface EntityOwnerDocument {
|
|
37
37
|
ownerUserId: string;
|
|
38
38
|
}
|
|
39
|
-
export interface
|
|
40
|
-
|
|
39
|
+
export interface EntityOrganizationDocument {
|
|
40
|
+
organizationId: string;
|
|
41
41
|
}
|
|
42
42
|
export interface EntityTimestampsDocument {
|
|
43
43
|
createdAt: Date;
|
|
@@ -62,9 +62,9 @@ export interface EntityLog {
|
|
|
62
62
|
export interface EntityLogsDocument {
|
|
63
63
|
logs: EntityLog[];
|
|
64
64
|
}
|
|
65
|
-
export type NewEntityDocument<T> = T &
|
|
66
|
-
export type CreateEntityDocument<T> = Omit<T, '_id' | 'createdAt' | 'updatedAt' | '
|
|
67
|
-
export type UpdateEntityDocument<T> = Partial<Omit<T, '_id' | 'createdAt' | 'updatedAt' | '
|
|
65
|
+
export type NewEntityDocument<T> = T & EntityOrganizationDocument & EntityOwnerDocument & EntityTimestampsDocument & EntityStateDocument & EntityLogsDocument;
|
|
66
|
+
export type CreateEntityDocument<T> = Omit<T, '_id' | 'createdAt' | 'updatedAt' | 'organizationId' | 'ownerUserId' | 'state' | 'logs'>;
|
|
67
|
+
export type UpdateEntityDocument<T> = Partial<Omit<T, '_id' | 'createdAt' | 'updatedAt' | 'organizationId' | 'ownerUserId' | 'state' | 'logs' | 'key'>>;
|
|
68
68
|
export interface LogDataResponseDTO {
|
|
69
69
|
changes: EntityLogChanges[];
|
|
70
70
|
timestamp: number;
|