@juki-team/commons 0.1.43 → 0.1.45
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/cjs/index.cjs +410 -543
- package/dist/esm/index.js +320 -489
- package/dist/types/constants/entity.d.ts +3 -3
- package/dist/types/constants/index.d.ts +1 -1
- package/dist/types/constants/organization.d.ts +9 -0
- package/dist/types/constants/websocket.d.ts +5 -18
- package/dist/types/dto/class.d.ts +34 -34
- package/dist/types/dto/code.d.ts +1 -1
- package/dist/types/dto/comments.d.ts +9 -9
- package/dist/types/dto/contest.d.ts +46 -42
- package/dist/types/dto/course.d.ts +13 -13
- package/dist/types/dto/entity.d.ts +30 -25
- package/dist/types/dto/excalidraw.d.ts +7 -7
- package/dist/types/dto/file.d.ts +10 -15
- package/dist/types/dto/image.d.ts +2 -2
- package/dist/types/dto/index.d.ts +1 -1
- package/dist/types/dto/judge.d.ts +5 -5
- package/dist/types/dto/markdown.d.ts +7 -7
- package/dist/types/dto/mermaid.d.ts +7 -7
- package/dist/types/dto/{company.d.ts → organization.d.ts} +16 -16
- package/dist/types/dto/problem.d.ts +22 -22
- package/dist/types/dto/scoreboard.d.ts +8 -18
- package/dist/types/dto/session.d.ts +9 -9
- package/dist/types/dto/socket.d.ts +43 -126
- package/dist/types/dto/statistics.d.ts +7 -7
- package/dist/types/dto/submission.d.ts +22 -22
- package/dist/types/dto/system.d.ts +7 -82
- package/dist/types/dto/url.d.ts +1 -1
- package/dist/types/dto/user.d.ts +22 -22
- package/dist/types/dto/virtual-user.d.ts +3 -25
- package/dist/types/dto/worksheet-submissions.d.ts +22 -22
- package/dist/types/dto/worksheet.d.ts +12 -12
- package/dist/types/helpers/class.d.ts +4 -4
- package/dist/types/helpers/comments.d.ts +1 -1
- package/dist/types/helpers/contest.d.ts +4 -4
- package/dist/types/helpers/date.d.ts +68 -0
- package/dist/types/helpers/document.d.ts +2 -2
- package/dist/types/helpers/index.d.ts +3 -0
- package/dist/types/helpers/number.d.ts +2 -0
- package/dist/types/helpers/responses.d.ts +1 -1
- package/dist/types/helpers/socket.d.ts +37 -50
- package/dist/types/helpers/time.d.ts +0 -11
- package/dist/types/helpers/user.d.ts +2 -2
- package/dist/types/index.d.ts +0 -1
- package/dist/types/types/class.d.ts +6 -6
- package/dist/types/types/comments.d.ts +2 -2
- package/dist/types/types/contest.d.ts +20 -23
- package/dist/types/types/entity.d.ts +13 -19
- package/dist/types/types/file.d.ts +6 -0
- package/dist/types/types/index.d.ts +3 -1
- package/dist/types/types/{company.d.ts → organization.d.ts} +2 -2
- package/dist/types/types/prisma.d.ts +2 -2
- package/dist/types/types/problems.d.ts +1 -1
- package/dist/types/types/scoreboard.d.ts +11 -0
- package/dist/types/types/sheet.d.ts +1 -1
- package/dist/types/types/socket.d.ts +12 -16
- package/dist/types/types/system.d.ts +76 -0
- package/dist/types/types/teams.d.ts +8 -8
- package/dist/types/types/virtual-user.d.ts +22 -0
- package/package.json +1 -1
- package/dist/types/constants/company.d.ts +0 -9
- package/dist/types/prototypes/Date.d.ts +0 -62
- package/dist/types/prototypes/Number.d.ts +0 -7
- package/dist/types/prototypes/index.d.ts +0 -3
- /package/dist/types/{prototypes/Error.d.ts → helpers/errors.d.ts} +0 -0
|
@@ -1,64 +1,51 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CodeRunStatusWebSocketResponseEventDto, ContestChangesWebSocketResponseEventDto, ProblemCrawledWebSocketResponseEventDto, SendDataEc2InstancesListWebSocketResponseEventDto, SendDataEcsTaskDefinitionListWebSocketResponseEventDto, SendDataEcsTasksListWebSocketResponseEventDto, SendDataRunCommandWebSocketResponseEventDto, SendDataSsmSessionsListWebSocketResponseEventDto, SendDataWebSocketResponseEventDto, SubmissionRunStatusWebSocketResponseEventDto, SubmissionsCrawlWebSocketResponseEventDto, SubscribeCodeRunStatusWebSocketEventDto, SubscribeContestChangesWebSocketEventDto, SubscribeGetDataWebSocketEventDto, SubscribeProblemCrawledWebSocketEventDto, SubscribeSubmissionRunStatusWebSocketEventDto, SubscribeSubmissionsCrawlWebSocketEventDto, SubscribeUserNotificationWebsocketEventDto, UnsubscribeCodeRunStatusWebSocketEventDto, UnsubscribeContestChangesWebSocketEventDto, UnsubscribeGetDataWebSocketEventDto, UnsubscribeProblemCrawledWebSocketEventDto, UnsubscribeSubmissionRunStatusWebSocketEventDto, UnsubscribeSubmissionsCrawlWebSocketEventDto, UnsubscribeUserNotificationWebSocketEventDto, UserMessageWebSocketResponseEventDto, UserNotificationContestClarificationWebSocketResponseEventDto, UserNotificationSubmissionWebSocketResponseEventDto, UserNotificationWebSocketResponseEventDto, WebSocketChannelsMessageDto, WebSocketResponseEventDto, WebSocketSubscribeEventDto, WebSocketUnsubscribeEventDto } from '../dto';
|
|
2
2
|
import { ClientId, WebSocketResponseEvent, WebSocketResponseEventKey } from '../types';
|
|
3
|
-
export declare const isWebsocketSubscription: (event: any) => event is
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
19
|
-
export declare const
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const
|
|
22
|
-
export declare const
|
|
23
|
-
export declare const
|
|
24
|
-
export declare const
|
|
25
|
-
export declare const
|
|
26
|
-
export declare const
|
|
27
|
-
export declare const
|
|
28
|
-
export declare const
|
|
29
|
-
export declare const
|
|
30
|
-
export declare const
|
|
31
|
-
export declare const
|
|
32
|
-
export declare const
|
|
33
|
-
export declare const
|
|
34
|
-
export declare const isSendDataEc2InstancesListWebSocketResponseEventDTO: (event: any) => event is SendDataEc2InstancesListWebSocketResponseEventDTO;
|
|
35
|
-
export declare const isSendDataEcsTasksListWebSocketResponseEventDTO: (event: any) => event is SendDataEcsTasksListWebSocketResponseEventDTO;
|
|
36
|
-
export declare const isSendDataSsmSessionsListWebSocketResponseEventDTO: (event: any) => event is SendDataSsmSessionsListWebSocketResponseEventDTO;
|
|
37
|
-
export declare const isSendDataRunCommandWebSocketResponseEventDTO: (event: any) => event is SendDataRunCommandWebSocketResponseEventDTO;
|
|
38
|
-
export declare const isSendDataClientTrackWebSocketResponseEventDTO: (event: any) => event is SendDataClientTrackWebSocketResponseEventDTO;
|
|
39
|
-
export declare const isSenDataChatCompletionsWebSocketResponseEventDTO: (event: any) => event is SendDataChatCompletionsWebSocketResponseEventDTO;
|
|
40
|
-
export declare const isProblemCrawledWebSocketResponseEventDTO: (event: any) => event is ProblemCrawledWebSocketResponseEventDTO;
|
|
41
|
-
export declare const isSubmissionsCrawlWebSocketResponseEventDTO: (event: any) => event is SubmissionsCrawlWebSocketResponseEventDTO;
|
|
42
|
-
export declare const isContestChangesWebSocketResponseEventDTO: (event: any) => event is ContestChangesWebSocketResponseEventDTO;
|
|
43
|
-
export declare const isClientTrackWebSocketResponseEventDTO: (event: any) => event is ClientTrackWebSocketResponseEventDTO;
|
|
44
|
-
export declare const isUserNotificationWebSocketResponseEventDTO: (event: any) => event is UserNotificationWebSocketResponseEventDTO;
|
|
45
|
-
export declare const isUserNotificationSubmissionWebSocketResponseEventDTO: (event: any) => event is UserNotificationSubmissionWebSocketResponseEventDTO;
|
|
46
|
-
export declare const isUserNotificationContestClarificationWebSocketResponseEventDTO: (event: any) => event is UserNotificationContestClarificationWebSocketResponseEventDTO;
|
|
3
|
+
export declare const isWebsocketSubscription: (event: any) => event is WebSocketSubscribeEventDto | WebSocketUnsubscribeEventDto;
|
|
4
|
+
export declare const isSubscribeCodeRunStatusWebSocketEventDto: (event: any) => event is SubscribeCodeRunStatusWebSocketEventDto;
|
|
5
|
+
export declare const isUnsubscribeCodeRunStatusWebSocketEventDto: (event: any) => event is UnsubscribeCodeRunStatusWebSocketEventDto;
|
|
6
|
+
export declare const isSubscribeSubmissionRunStatusWebSocketEventDto: (event: any) => event is SubscribeSubmissionRunStatusWebSocketEventDto;
|
|
7
|
+
export declare const isUnsubscribeSubmissionRunStatusWebSocketEventDto: (event: any) => event is UnsubscribeSubmissionRunStatusWebSocketEventDto;
|
|
8
|
+
export declare const isSubscribeGetDataWebSocketEventDto: (event: any) => event is SubscribeGetDataWebSocketEventDto;
|
|
9
|
+
export declare const isUnsubscribeGetDataWebSocketEventDto: (event: any) => event is UnsubscribeGetDataWebSocketEventDto;
|
|
10
|
+
export declare const isSubscribeProblemCrawledWebSocketEventDto: (event: any) => event is SubscribeProblemCrawledWebSocketEventDto;
|
|
11
|
+
export declare const isUnsubscribeProblemCrawledWebSocketEventDto: (event: any) => event is UnsubscribeProblemCrawledWebSocketEventDto;
|
|
12
|
+
export declare const isSubscribeSubmissionsCrawlWebSocketEventDto: (event: any) => event is SubscribeSubmissionsCrawlWebSocketEventDto;
|
|
13
|
+
export declare const isUnsubscribeSubmissionsCrawlWebSocketEventDto: (event: any) => event is UnsubscribeSubmissionsCrawlWebSocketEventDto;
|
|
14
|
+
export declare const isSubscribeContestChangesWebSocketEventDto: (event: any) => event is SubscribeContestChangesWebSocketEventDto;
|
|
15
|
+
export declare const isUnsubscribeContestChangesWebSocketEventDto: (event: any) => event is UnsubscribeContestChangesWebSocketEventDto;
|
|
16
|
+
export declare const isSubscribeUserNotificationWebSocketEventDto: (event: any) => event is SubscribeUserNotificationWebsocketEventDto;
|
|
17
|
+
export declare const isUnsubscribeUserNotificationWebSocketEventDto: (event: any) => event is UnsubscribeUserNotificationWebSocketEventDto;
|
|
18
|
+
export declare const isWebSocketResponseEventDto: (event: any) => event is WebSocketResponseEventDto;
|
|
19
|
+
export declare const isCodeRunStatusMessageWebSocketResponseEventDto: (event: any) => event is CodeRunStatusWebSocketResponseEventDto;
|
|
20
|
+
export declare const isSubmissionRunStatusMessageWebSocketResponseEventDto: (event: any) => event is SubmissionRunStatusWebSocketResponseEventDto;
|
|
21
|
+
export declare const isUserMessageWebSocketResponseEventDto: (event: any) => event is UserMessageWebSocketResponseEventDto;
|
|
22
|
+
export declare const isSendDataWebSocketResponseEventDto: (event: any) => event is SendDataWebSocketResponseEventDto;
|
|
23
|
+
export declare const isSendDataEcsTaskDefinitionListWebSocketResponseEventDto: (event: any) => event is SendDataEcsTaskDefinitionListWebSocketResponseEventDto;
|
|
24
|
+
export declare const isSendDataEc2InstancesListWebSocketResponseEventDto: (event: any) => event is SendDataEc2InstancesListWebSocketResponseEventDto;
|
|
25
|
+
export declare const isSendDataEcsTasksListWebSocketResponseEventDto: (event: any) => event is SendDataEcsTasksListWebSocketResponseEventDto;
|
|
26
|
+
export declare const isSendDataSsmSessionsListWebSocketResponseEventDto: (event: any) => event is SendDataSsmSessionsListWebSocketResponseEventDto;
|
|
27
|
+
export declare const isSendDataRunCommandWebSocketResponseEventDto: (event: any) => event is SendDataRunCommandWebSocketResponseEventDto;
|
|
28
|
+
export declare const isProblemCrawledWebSocketResponseEventDto: (event: any) => event is ProblemCrawledWebSocketResponseEventDto;
|
|
29
|
+
export declare const isSubmissionsCrawlWebSocketResponseEventDto: (event: any) => event is SubmissionsCrawlWebSocketResponseEventDto;
|
|
30
|
+
export declare const isContestChangesWebSocketResponseEventDto: (event: any) => event is ContestChangesWebSocketResponseEventDto;
|
|
31
|
+
export declare const isUserNotificationWebSocketResponseEventDto: (event: any) => event is UserNotificationWebSocketResponseEventDto;
|
|
32
|
+
export declare const isUserNotificationSubmissionWebSocketResponseEventDto: (event: any) => event is UserNotificationSubmissionWebSocketResponseEventDto;
|
|
33
|
+
export declare const isUserNotificationContestClarificationWebSocketResponseEventDto: (event: any) => event is UserNotificationContestClarificationWebSocketResponseEventDto;
|
|
47
34
|
export declare const getWebSocketResponseEventKey: (event: WebSocketResponseEvent, clientId: ClientId, id: string) => WebSocketResponseEventKey;
|
|
48
|
-
export declare const
|
|
35
|
+
export declare const isWebSocketChannelsMessageDto: (message: any) => message is WebSocketChannelsMessageDto;
|
|
49
36
|
/**
|
|
50
37
|
* Key used by the client to dispatch a response received on a TOPIC channel to its subscribers.
|
|
51
|
-
* It is the same key that `
|
|
38
|
+
* It is the same key that `getKeyWebSocketEventDto` (base-ui) computes for the subscription.
|
|
52
39
|
* Returns null when the response is not addressed to this client.
|
|
53
40
|
*/
|
|
54
|
-
export declare const getWebSocketResponseEventKeyOfResponse: (response:
|
|
41
|
+
export declare const getWebSocketResponseEventKeyOfResponse: (response: WebSocketResponseEventDto, clientId: ClientId) => WebSocketResponseEventKey | null;
|
|
55
42
|
/**
|
|
56
43
|
* TOPIC channel that the client has to attach to receive the events of a subscription,
|
|
57
44
|
* or null when the events arrive by the private channels (session / user) the client is always attached to.
|
|
58
45
|
* Ably rejects the attach if the token has no capability for the channel.
|
|
59
46
|
*/
|
|
60
|
-
export declare const getChannelOfWebSocketSubscribeEvent: (event:
|
|
47
|
+
export declare const getChannelOfWebSocketSubscribeEvent: (event: WebSocketSubscribeEventDto) => string | null;
|
|
61
48
|
/**
|
|
62
49
|
* Contest whose role channels the client needs (the API grants them when the token is requested with this contest).
|
|
63
50
|
*/
|
|
64
|
-
export declare const getContestKeyOfWebSocketSubscribeEvent: (event:
|
|
51
|
+
export declare const getContestKeyOfWebSocketSubscribeEvent: (event: WebSocketSubscribeEventDto) => string | null;
|
|
@@ -1,13 +1,2 @@
|
|
|
1
1
|
import { SplitTime } from '../types';
|
|
2
2
|
export declare function splitTime(timeRemaining: number): [SplitTime, SplitTime, SplitTime, SplitTime, SplitTime, SplitTime];
|
|
3
|
-
export declare function normalizeToLocalStartOfDay(timestamp: number | Date): Date;
|
|
4
|
-
export declare function normalizeToLocalStartOfHour(timestamp: number | Date): Date;
|
|
5
|
-
export declare function normalizeToLocalStartOfMinutes(timestamp: number | Date): Date;
|
|
6
|
-
export declare function normalizeToLocalStartOfSeconds(timestamp: number | Date): Date;
|
|
7
|
-
export declare const getYears: (d: Date) => number;
|
|
8
|
-
export declare const getMonths: (d: Date) => number;
|
|
9
|
-
export declare const getDays: (d: Date) => number;
|
|
10
|
-
export declare const getHours: (d: Date) => number;
|
|
11
|
-
export declare const getMinutes: (d: Date) => number;
|
|
12
|
-
export declare const getSeconds: (d: Date) => number;
|
|
13
|
-
export declare const getMilliseconds: (d: Date) => number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ClientId, RecordId } from '../types';
|
|
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/types/index.d.ts
CHANGED
|
@@ -11,8 +11,8 @@ export interface AssignmentBasicInfo {
|
|
|
11
11
|
index: number;
|
|
12
12
|
type: AssignmentClass;
|
|
13
13
|
points: number;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
startsAt: number;
|
|
15
|
+
endsAt: number;
|
|
16
16
|
title: string;
|
|
17
17
|
content: BodyWorksheet[];
|
|
18
18
|
tags: string[];
|
|
@@ -31,8 +31,8 @@ interface ClassCycleSession {
|
|
|
31
31
|
index: number;
|
|
32
32
|
name: string;
|
|
33
33
|
assignments: ClassCycleSessionAssignments;
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
startsAt: number;
|
|
35
|
+
endsAt: number;
|
|
36
36
|
state: EntityState;
|
|
37
37
|
}
|
|
38
38
|
export interface ClassCycleSessions {
|
|
@@ -50,8 +50,8 @@ export type ClassCycle = {
|
|
|
50
50
|
name: string;
|
|
51
51
|
sessions: ClassCycleSessions;
|
|
52
52
|
tags: ClassCycleTag[];
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
startsAt: number;
|
|
54
|
+
endsAt: number;
|
|
55
55
|
state: EntityState;
|
|
56
56
|
};
|
|
57
57
|
export interface ClassCycles {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ContestDataResponseDTO, UpsertContestDTO, UserCompanyBasicInfoResponseDTO } from '../dto';
|
|
2
1
|
import { CodeLanguage } from './commons';
|
|
3
2
|
import { EntityMembers } from './entity';
|
|
4
3
|
import { Judge } from './judge';
|
|
@@ -45,17 +44,6 @@ export type ContestUser = {
|
|
|
45
44
|
isGuest: boolean;
|
|
46
45
|
isSpectator: boolean;
|
|
47
46
|
};
|
|
48
|
-
export type ContestClarification = {
|
|
49
|
-
key: string;
|
|
50
|
-
problemJudgeKey: string;
|
|
51
|
-
question: string;
|
|
52
|
-
questionUser: UserCompanyBasicInfoResponseDTO;
|
|
53
|
-
questionTimestamp: number;
|
|
54
|
-
answer: string;
|
|
55
|
-
answerTimestamp: number;
|
|
56
|
-
answerUser: UserCompanyBasicInfoResponseDTO;
|
|
57
|
-
public: boolean;
|
|
58
|
-
};
|
|
59
47
|
export declare enum ContestProblemPrerequisiteType {
|
|
60
48
|
INDIVIDUALLY = "INDIVIDUALLY",
|
|
61
49
|
CONTEST = "CONTEST"
|
|
@@ -70,8 +58,8 @@ export type ContestProblem = {
|
|
|
70
58
|
index: string;
|
|
71
59
|
points: number;
|
|
72
60
|
color: string;
|
|
73
|
-
|
|
74
|
-
|
|
61
|
+
startsAt: number;
|
|
62
|
+
endsAt: number;
|
|
75
63
|
prerequisites: ContestProblemPrerequisite[];
|
|
76
64
|
maxAcceptedUsers: number;
|
|
77
65
|
group: string;
|
|
@@ -82,17 +70,17 @@ export type ContestSettings = {
|
|
|
82
70
|
languages: CodeLanguage[];
|
|
83
71
|
penalty: number;
|
|
84
72
|
timeToSolve: number;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
73
|
+
startsAt: number;
|
|
74
|
+
frozenAt: number;
|
|
75
|
+
silencedAt: number;
|
|
76
|
+
endsAt: number;
|
|
89
77
|
scoreboardLocked: boolean;
|
|
90
78
|
upsolvingEnabled: boolean;
|
|
91
79
|
};
|
|
92
80
|
export type MemberUserData = {
|
|
93
81
|
userId: string;
|
|
94
|
-
|
|
95
|
-
|
|
82
|
+
lastVisitedAt: number | null;
|
|
83
|
+
joinedAt: number;
|
|
96
84
|
};
|
|
97
85
|
export type ContestMembersBasic = {
|
|
98
86
|
administrators: {
|
|
@@ -156,6 +144,15 @@ export type ContestMembersResponse = {
|
|
|
156
144
|
[key: string]: UserBasicInfo;
|
|
157
145
|
};
|
|
158
146
|
};
|
|
159
|
-
export
|
|
160
|
-
|
|
161
|
-
|
|
147
|
+
export interface ContestTimeFlags {
|
|
148
|
+
isLive: boolean;
|
|
149
|
+
isFrozenTime: boolean;
|
|
150
|
+
isQuietTime: boolean;
|
|
151
|
+
isEndless: boolean;
|
|
152
|
+
isPast: boolean;
|
|
153
|
+
isFuture: boolean;
|
|
154
|
+
isGlobal: boolean;
|
|
155
|
+
}
|
|
156
|
+
export interface ContestTimeData extends ContestTimeFlags {
|
|
157
|
+
settings: Pick<ContestSettings, 'penalty' | 'startsAt' | 'frozenAt' | 'silencedAt' | 'endsAt' | 'upsolvingEnabled'>;
|
|
158
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { UserCompanyBasicInfoResponseDTO } from '../dto';
|
|
2
1
|
export declare enum EntityMembersRank {
|
|
3
2
|
NONE = "NONE",
|
|
4
3
|
CLOSE = "CLOSE",
|
|
@@ -10,13 +9,13 @@ export declare enum EntityState {
|
|
|
10
9
|
}
|
|
11
10
|
export type EntityUsersMemberUserData = {
|
|
12
11
|
userId: string;
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
lastVisitedAt: number | null;
|
|
13
|
+
joinedAt: number;
|
|
15
14
|
};
|
|
16
15
|
export type EntityTeamsMemberUserData = {
|
|
17
16
|
teamId: string;
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
lastVisitedAt: number | null;
|
|
18
|
+
joinedAt: number;
|
|
20
19
|
};
|
|
21
20
|
export type EntityMembersUserData = EntityUsersMemberUserData | EntityTeamsMemberUserData;
|
|
22
21
|
export interface EntityMembers {
|
|
@@ -44,12 +43,12 @@ export interface EntityMembers {
|
|
|
44
43
|
export interface EntityOwnerDocument {
|
|
45
44
|
ownerUserId: string;
|
|
46
45
|
}
|
|
47
|
-
export interface
|
|
48
|
-
|
|
46
|
+
export interface EntityOrganizationDocument {
|
|
47
|
+
organizationId: string;
|
|
49
48
|
}
|
|
50
49
|
export interface EntityTimestampsDocument {
|
|
51
|
-
createdAt:
|
|
52
|
-
updatedAt:
|
|
50
|
+
createdAt: number;
|
|
51
|
+
updatedAt: number;
|
|
53
52
|
}
|
|
54
53
|
export interface EntityStateDocument {
|
|
55
54
|
state: EntityState;
|
|
@@ -70,11 +69,11 @@ export interface EntityLog {
|
|
|
70
69
|
export interface EntityLogsDocument {
|
|
71
70
|
logs: EntityLog[];
|
|
72
71
|
}
|
|
73
|
-
export type NewEntityDocument<T> = T &
|
|
74
|
-
export type CreateEntityDocument<T> = Omit<T, '_id' | 'createdAt' | 'updatedAt' | '
|
|
75
|
-
export type UpdateEntityDocument<T> = Partial<Omit<T, '_id' | 'createdAt' | 'updatedAt' | '
|
|
72
|
+
export type NewEntityDocument<T> = T & EntityOrganizationDocument & EntityOwnerDocument & EntityTimestampsDocument & EntityStateDocument & EntityLogsDocument;
|
|
73
|
+
export type CreateEntityDocument<T> = Omit<T, '_id' | 'createdAt' | 'updatedAt' | 'organizationId' | 'ownerUserId' | 'state' | 'logs'>;
|
|
74
|
+
export type UpdateEntityDocument<T> = Partial<Omit<T, '_id' | 'createdAt' | 'updatedAt' | 'organizationId' | 'ownerUserId' | 'state' | 'logs' | 'key'>>;
|
|
76
75
|
export declare enum EntityCollection {
|
|
77
|
-
|
|
76
|
+
ORGANIZATION = "ORGANIZATION",
|
|
78
77
|
PROBLEM = "PROBLEM",
|
|
79
78
|
CONTEST = "CONTEST",
|
|
80
79
|
JUDGE = "JUDGE",
|
|
@@ -82,7 +81,7 @@ export declare enum EntityCollection {
|
|
|
82
81
|
SUBMISSION = "SUBMISSION"
|
|
83
82
|
}
|
|
84
83
|
export declare enum CollectionKey {
|
|
85
|
-
|
|
84
|
+
ORGANIZATION = "C",
|
|
86
85
|
USER = "U",
|
|
87
86
|
PROBLEM = "P",
|
|
88
87
|
CLASS = "K",
|
|
@@ -109,8 +108,3 @@ export declare enum LogOperation {
|
|
|
109
108
|
ADD = "ADD",
|
|
110
109
|
UPDATE = "UPDATE"
|
|
111
110
|
}
|
|
112
|
-
export interface LogDataResponseDTO {
|
|
113
|
-
changes: EntityLogChanges[];
|
|
114
|
-
timestamp: number;
|
|
115
|
-
customerUser: UserCompanyBasicInfoResponseDTO;
|
|
116
|
-
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EntityState } from './entity';
|
|
1
2
|
import { Role } from './users';
|
|
2
3
|
export type FileRole = Role.RESTRICTED | Role.GUEST | Role.REGULAR | Role.MASTER | Role.ADMIN | Role.SUPER_ADMIN;
|
|
3
4
|
export declare enum FileMemberRole {
|
|
@@ -25,3 +26,8 @@ export declare enum FilesJukiPub {
|
|
|
25
26
|
PROBLEMS = "problems",
|
|
26
27
|
CONTESTS = "contests"
|
|
27
28
|
}
|
|
29
|
+
export interface FileBasic {
|
|
30
|
+
name: string;
|
|
31
|
+
description: string;
|
|
32
|
+
state: EntityState;
|
|
33
|
+
}
|
|
@@ -2,7 +2,7 @@ export * from './account';
|
|
|
2
2
|
export * from './class';
|
|
3
3
|
export * from './comments';
|
|
4
4
|
export * from './commons';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './organization';
|
|
6
6
|
export * from './contest';
|
|
7
7
|
export * from './course';
|
|
8
8
|
export * from './entity';
|
|
@@ -15,10 +15,12 @@ export * from './mermaid';
|
|
|
15
15
|
export * from './notification';
|
|
16
16
|
export * from './prisma';
|
|
17
17
|
export * from './problems';
|
|
18
|
+
export * from './scoreboard';
|
|
18
19
|
export * from './services';
|
|
19
20
|
export * from './sheet';
|
|
20
21
|
export * from './socket';
|
|
21
22
|
export * from './submission';
|
|
23
|
+
export * from './system';
|
|
22
24
|
export * from './teams';
|
|
23
25
|
export * from './users';
|
|
24
26
|
export * from './virtual-user';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export declare enum
|
|
1
|
+
export declare enum OrganizationPlan {
|
|
2
2
|
FREE = "FREE",// shared runner and shared compiles
|
|
3
3
|
STANDARD = "STANDARD",// 1 dedicated runner, 1 dedicated compiler
|
|
4
4
|
PREMIUM = "PREMIUM",// 1 dedicated runner, 1 dedicated compiler + extra hours billed
|
|
5
5
|
CUSTOM = "CUSTOM"
|
|
6
6
|
}
|
|
7
|
-
export declare enum
|
|
7
|
+
export declare enum OrganizationLogoType {
|
|
8
8
|
HORIZONTAL_WHITE = "horizontal-white",
|
|
9
9
|
HORIZONTAL_COLOR = "horizontal-color",
|
|
10
10
|
VERTICAL_WHITE = "vertical-white",
|
|
@@ -153,9 +153,9 @@ export type User = {
|
|
|
153
153
|
emailSubscription: EmailSubscription;
|
|
154
154
|
emailValidationState: EmailValidationState;
|
|
155
155
|
emailValidationToken: string;
|
|
156
|
-
|
|
156
|
+
emailValidatedAt: Date;
|
|
157
157
|
passwordResetToken: string | null;
|
|
158
|
-
|
|
158
|
+
passwordResetAt: Date | null;
|
|
159
159
|
status: UserStatus;
|
|
160
160
|
userRole: UserRole;
|
|
161
161
|
teamRole: TeamRole;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
import { RecordId } from './commons';
|
|
2
|
-
export declare enum WebSocketMessageEvent {
|
|
3
|
-
PING = "PING",
|
|
4
|
-
CLIENT_TRACK_LOCATION = "CLIENT_TRACK_LOCATION",
|
|
5
|
-
CLIENT_TRACK_SCREENSHOT = "CLIENT_TRACK_SCREENSHOT",
|
|
6
|
-
CLIENT_TRACK_DEVICE = "CLIENT_TRACK_DEVICE",
|
|
7
|
-
CHAT_COMPLETIONS = "CHAT_COMPLETIONS"
|
|
8
|
-
}
|
|
9
2
|
/**
|
|
10
3
|
* Subscriptions of the client. With the TOPIC channels they are not sent to the server anymore:
|
|
11
4
|
* they only say which channel the client attaches (`getChannelOfWebSocketSubscribeEvent`) and the dispatch key.
|
|
@@ -23,15 +16,10 @@ export declare enum WebSocketSubscriptionEvent {
|
|
|
23
16
|
UNSUBSCRIBE_SUBMISSIONS_CRAWL = "UNSUBSCRIBE_SUBMISSIONS_CRAWL",
|
|
24
17
|
SUBSCRIBE_CONTEST_CHANGES = "SUBSCRIBE_CONTEST_CHANGES",
|
|
25
18
|
UNSUBSCRIBE_CONTEST_CHANGES = "UNSUBSCRIBE_CONTEST_CHANGES",
|
|
26
|
-
SUBSCRIBE_CLIENT_TRACK = "SUBSCRIBE_CLIENT_TRACK",
|
|
27
|
-
UNSUBSCRIBE_CLIENT_TRACK = "UNSUBSCRIBE_CLIENT_TRACK",
|
|
28
19
|
SUBSCRIBE_USER_NOTIFICATION = "SUBSCRIBE_USER_NOTIFICATION",
|
|
29
|
-
UNSUBSCRIBE_USER_NOTIFICATION = "UNSUBSCRIBE_USER_NOTIFICATION"
|
|
30
|
-
SUBSCRIBE_CLIENT_TRACK_DATA = "SUBSCRIBE_CLIENT_TRACK_DATA",
|
|
31
|
-
UNSUBSCRIBE_CLIENT_TRACK_DATA = "UNSUBSCRIBE_CLIENT_TRACK_DATA"
|
|
20
|
+
UNSUBSCRIBE_USER_NOTIFICATION = "UNSUBSCRIBE_USER_NOTIFICATION"
|
|
32
21
|
}
|
|
33
22
|
export declare enum WebSocketResponseEvent {
|
|
34
|
-
PONG = "PONG",
|
|
35
23
|
CODE_RUN_STATUS = "CODE_RUN_STATUS",
|
|
36
24
|
SUBMISSION_RUN_STATUS = "SUBMISSION_RUN_STATUS",
|
|
37
25
|
USER_MESSAGE = "USER_MESSAGE",
|
|
@@ -41,12 +29,9 @@ export declare enum WebSocketResponseEvent {
|
|
|
41
29
|
SEND_DATA_EC2_INSTANCES_LIST = "SEND_DATA_EC2_INSTANCES_LIST",
|
|
42
30
|
SEND_DATA_SSM_SESSIONS_LIST = "SEND_DATA_SSM_SESSIONS_LIST",
|
|
43
31
|
SEND_DATA_RUN_COMMAND = "SEND_DATA_RUN_COMMAND",
|
|
44
|
-
SEND_DATA_CLIENT_TRACK = "SEND_DATA_CLIENT_TRACK",
|
|
45
|
-
SEND_DATA_CHAT_COMPLETIONS = "SEND_DATA_CHAT_COMPLETIONS",
|
|
46
32
|
PROBLEM_CRAWLED = "PROBLEM_CRAWLED",
|
|
47
33
|
SUBMISSIONS_CRAWL = "SUBMISSIONS_CRAWL",
|
|
48
34
|
CONTEST_CHANGES = "CONTEST_CHANGES",
|
|
49
|
-
CLIENT_TRACK = "CLIENT_TRACK",
|
|
50
35
|
USER_NOTIFICATION_ = "USER_NOTIFICATION_",
|
|
51
36
|
USER_NOTIFICATION_SUBMISSION = "USER_NOTIFICATION_SUBMISSION",
|
|
52
37
|
USER_NOTIFICATION_CONTEST_CLARIFICATION = "USER_NOTIFICATION_CONTEST_CLARIFICATION"
|
|
@@ -66,3 +51,14 @@ export declare enum ContestChannelRole {
|
|
|
66
51
|
GUESTS = "guests",
|
|
67
52
|
SPECTATORS = "spectators"
|
|
68
53
|
}
|
|
54
|
+
export type InfoLogCaseStatus = {
|
|
55
|
+
inputKey: string;
|
|
56
|
+
out: string;
|
|
57
|
+
err: string;
|
|
58
|
+
log: string;
|
|
59
|
+
};
|
|
60
|
+
export type TestInfo = {
|
|
61
|
+
sampleCase: boolean;
|
|
62
|
+
caseResultsExecuted: number;
|
|
63
|
+
caseResultsTotal: number;
|
|
64
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export type TaskResponseDtoContainer = {
|
|
2
|
+
runtimeId?: string;
|
|
3
|
+
};
|
|
4
|
+
export interface EcsTask {
|
|
5
|
+
taskArn: string;
|
|
6
|
+
taskDefinitionArn: string;
|
|
7
|
+
group: string;
|
|
8
|
+
version: number;
|
|
9
|
+
cpu: string;
|
|
10
|
+
memory: string;
|
|
11
|
+
launchType: string;
|
|
12
|
+
createdAt: number;
|
|
13
|
+
startedAt: number;
|
|
14
|
+
desiredStatus: string;
|
|
15
|
+
lastStatus: string;
|
|
16
|
+
containers?: TaskResponseDtoContainer[];
|
|
17
|
+
}
|
|
18
|
+
export interface EcsTaskDefinition {
|
|
19
|
+
family: string;
|
|
20
|
+
taskDefinitionArn: string;
|
|
21
|
+
revision: number;
|
|
22
|
+
cpu: string;
|
|
23
|
+
memory: string;
|
|
24
|
+
registeredAt: number;
|
|
25
|
+
}
|
|
26
|
+
export interface Ec2Instance {
|
|
27
|
+
instanceId: string;
|
|
28
|
+
state: 'pending' | 'running' | 'shutting-down' | 'stopped' | 'stopping' | 'terminated' | undefined;
|
|
29
|
+
instanceType: string;
|
|
30
|
+
privateIpAddress: string;
|
|
31
|
+
publicIpAddress: string;
|
|
32
|
+
tags: {
|
|
33
|
+
key: string;
|
|
34
|
+
value: string;
|
|
35
|
+
}[];
|
|
36
|
+
launchTime: Date | undefined;
|
|
37
|
+
instanceLifecycle: 'capacity-block' | 'scheduled' | 'spot' | 'interruptible-capacity-reservation' | undefined;
|
|
38
|
+
imageId: string;
|
|
39
|
+
vpcId: string;
|
|
40
|
+
subnet: {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
};
|
|
44
|
+
securityGroups: {
|
|
45
|
+
groupId: string;
|
|
46
|
+
groupName: string;
|
|
47
|
+
}[];
|
|
48
|
+
raw: any;
|
|
49
|
+
}
|
|
50
|
+
export type SqsProperties = {
|
|
51
|
+
QueueArn: string;
|
|
52
|
+
ApproximateNumberOfMessages: string;
|
|
53
|
+
ApproximateNumberOfMessagesNotVisible: string;
|
|
54
|
+
ApproximateNumberOfMessagesDelayed: string;
|
|
55
|
+
createdAt: number;
|
|
56
|
+
updatedAt: number;
|
|
57
|
+
VisibilityTimeout: string;
|
|
58
|
+
MaximumMessageSize: string;
|
|
59
|
+
MessageRetentionPeriod: string;
|
|
60
|
+
DelaySeconds: string;
|
|
61
|
+
ReceiveMessageWaitTimeSeconds: string;
|
|
62
|
+
SqsManagedSseEnabled: string;
|
|
63
|
+
FifoQueue: string;
|
|
64
|
+
DeduplicationScope: string;
|
|
65
|
+
FifoThroughputLimit: string;
|
|
66
|
+
ContentBasedDeduplication: string;
|
|
67
|
+
};
|
|
68
|
+
export type SsmSession = {
|
|
69
|
+
sessionId: string;
|
|
70
|
+
target: string;
|
|
71
|
+
status: 'Connected' | 'Connecting' | 'Disconnected' | 'Failed' | 'Terminating' | 'Terminated' | undefined;
|
|
72
|
+
startsAt: number;
|
|
73
|
+
owner: string;
|
|
74
|
+
maxSessionDuration: number;
|
|
75
|
+
raw: any;
|
|
76
|
+
};
|
|
@@ -7,8 +7,8 @@ export interface TeamMember {
|
|
|
7
7
|
}
|
|
8
8
|
export interface Assignment {
|
|
9
9
|
id: number;
|
|
10
|
-
createdAt:
|
|
11
|
-
updatedAt:
|
|
10
|
+
createdAt: number;
|
|
11
|
+
updatedAt: number;
|
|
12
12
|
users: [];
|
|
13
13
|
name: string;
|
|
14
14
|
type: AssignmentType;
|
|
@@ -16,14 +16,14 @@ export interface Assignment {
|
|
|
16
16
|
}
|
|
17
17
|
export interface Comment {
|
|
18
18
|
id: number;
|
|
19
|
-
createdAt:
|
|
20
|
-
updatedAt:
|
|
19
|
+
createdAt: number;
|
|
20
|
+
updatedAt: number;
|
|
21
21
|
comment: string;
|
|
22
22
|
}
|
|
23
23
|
export interface Task {
|
|
24
24
|
id: number;
|
|
25
|
-
createdAt:
|
|
26
|
-
updatedAt:
|
|
25
|
+
createdAt: number;
|
|
26
|
+
updatedAt: number;
|
|
27
27
|
comments: Comment[];
|
|
28
28
|
assigned: UserBasic[];
|
|
29
29
|
subtasks: [];
|
|
@@ -40,7 +40,7 @@ export interface Training {
|
|
|
40
40
|
}
|
|
41
41
|
export interface Team {
|
|
42
42
|
id: number;
|
|
43
|
-
createdAt:
|
|
43
|
+
createdAt: number;
|
|
44
44
|
name: string;
|
|
45
45
|
aboutTeam: string;
|
|
46
46
|
country: string;
|
|
@@ -60,7 +60,7 @@ export interface TrainingBasic {
|
|
|
60
60
|
}
|
|
61
61
|
export interface TeamBasic {
|
|
62
62
|
id: number;
|
|
63
|
-
createdAt:
|
|
63
|
+
createdAt: number;
|
|
64
64
|
name: string;
|
|
65
65
|
aboutTeam: string;
|
|
66
66
|
country: string;
|
|
@@ -5,3 +5,25 @@ export declare enum WorkingIn {
|
|
|
5
5
|
CRAWLING_LANGUAGES = "CRAWLING_LANGUAGES",
|
|
6
6
|
CRAWLING_PROBLEM_DATA = "CRAWLING_PROBLEM_DATA"
|
|
7
7
|
}
|
|
8
|
+
export type CookieSameSite = 'Strict' | 'Lax' | 'None';
|
|
9
|
+
export type CookiePriority = 'Low' | 'Medium' | 'High';
|
|
10
|
+
export interface CookiePartitionKey {
|
|
11
|
+
sourceOrigin: string;
|
|
12
|
+
hasCrossSiteAncestor?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface Cookie {
|
|
15
|
+
name: string;
|
|
16
|
+
value: string;
|
|
17
|
+
domain: string;
|
|
18
|
+
path: string;
|
|
19
|
+
expires: number;
|
|
20
|
+
size: number;
|
|
21
|
+
httpOnly?: boolean;
|
|
22
|
+
secure: boolean;
|
|
23
|
+
session: boolean;
|
|
24
|
+
sameSite?: CookieSameSite;
|
|
25
|
+
priority?: CookiePriority;
|
|
26
|
+
sameParty?: boolean;
|
|
27
|
+
partitionKey?: CookiePartitionKey | string;
|
|
28
|
+
partitionKeyOpaque?: boolean;
|
|
29
|
+
}
|