@juki-team/commons 0.2.16 → 0.2.19
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/entity.d.ts +3 -3
- package/dist/constants/entity.js +1 -1
- package/dist/constants/user.d.ts +2 -2
- package/dist/dto/class.d.ts +30 -30
- package/dist/dto/code.d.ts +1 -1
- package/dist/dto/comments.d.ts +7 -7
- package/dist/dto/contest.d.ts +43 -39
- package/dist/dto/course.d.ts +13 -13
- package/dist/dto/entity.d.ts +49 -30
- package/dist/dto/excalidraw.d.ts +7 -7
- package/dist/dto/file.d.ts +10 -15
- package/dist/dto/image.d.ts +1 -1
- package/dist/dto/judge.d.ts +3 -3
- package/dist/dto/markdown.d.ts +7 -7
- package/dist/dto/mermaid.d.ts +7 -7
- package/dist/dto/organization.d.ts +18 -14
- package/dist/dto/problem.d.ts +19 -26
- package/dist/dto/scoreboard.d.ts +8 -18
- package/dist/dto/session.d.ts +6 -6
- package/dist/dto/socket.d.ts +54 -65
- package/dist/dto/statistics.d.ts +7 -7
- package/dist/dto/submission.d.ts +20 -19
- package/dist/dto/system.d.ts +4 -84
- package/dist/dto/url.d.ts +1 -1
- package/dist/dto/user.d.ts +19 -25
- package/dist/dto/virtualUser.d.ts +2 -23
- package/dist/dto/worksheet.d.ts +11 -11
- package/dist/dto/worksheetSubmission.d.ts +25 -25
- package/dist/helpers/assignment.d.ts +4 -4
- package/dist/helpers/entity.d.ts +2 -2
- package/dist/helpers/entity.js +1 -1
- package/dist/helpers/socket.d.ts +43 -43
- package/dist/helpers/socket.js +90 -90
- package/dist/types/contest.d.ts +12 -15
- package/dist/types/entity.d.ts +0 -6
- package/dist/types/file.d.ts +6 -1
- package/dist/types/index.d.ts +3 -0
- package/dist/types/problem.d.ts +1 -1
- package/dist/types/scoreboard.d.ts +11 -0
- package/dist/types/scoreboard.js +1 -0
- package/dist/types/socket.d.ts +11 -0
- package/dist/types/system.d.ts +76 -0
- package/dist/types/system.js +1 -0
- package/dist/types/text.d.ts +2 -2
- package/dist/types/virtualUser.d.ts +22 -0
- package/dist/types/virtualUser.js +1 -0
- package/package.json +1 -1
package/dist/helpers/socket.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProblemVerdict, SubmissionRunStatus, WebSocketMessageEvent, WebSocketResponseEvent, WebSocketSubscriptionEvent, } from '../enums/index.js';
|
|
2
|
-
export const
|
|
2
|
+
export const isWebSocketSubscription = (event) => {
|
|
3
3
|
if (typeof event !== 'object' || event === null)
|
|
4
4
|
return false;
|
|
5
5
|
const v = event;
|
|
@@ -9,86 +9,86 @@ export const isWebsocketSubscription = (event) => {
|
|
|
9
9
|
!!v.clientId);
|
|
10
10
|
};
|
|
11
11
|
// Custom CHANNEL_PUBLISH_MESSAGES
|
|
12
|
-
export const
|
|
13
|
-
return
|
|
12
|
+
export const isPingWebSocketEventDto = (event) => {
|
|
13
|
+
return isWebSocketSubscription(event) && event.event === WebSocketMessageEvent.PING;
|
|
14
14
|
};
|
|
15
|
-
export const
|
|
16
|
-
return
|
|
15
|
+
export const isClientTrackLocationWebSocketEventDto = (event) => {
|
|
16
|
+
return isWebSocketSubscription(event) && event.event === WebSocketMessageEvent.CLIENT_TRACK_LOCATION;
|
|
17
17
|
};
|
|
18
|
-
export const
|
|
19
|
-
return
|
|
18
|
+
export const isClientTrackScreenshotWebSocketEventDto = (event) => {
|
|
19
|
+
return isWebSocketSubscription(event) && event.event === WebSocketMessageEvent.CLIENT_TRACK_SCREENSHOT;
|
|
20
20
|
};
|
|
21
|
-
export const
|
|
22
|
-
return
|
|
21
|
+
export const isClientTrackDeviceWebSocketEventDto = (event) => {
|
|
22
|
+
return isWebSocketSubscription(event) && event.event === WebSocketMessageEvent.CLIENT_TRACK_DEVICE;
|
|
23
23
|
};
|
|
24
|
-
export const
|
|
25
|
-
return
|
|
24
|
+
export const isChatCompletionsWebSocketEventDto = (event) => {
|
|
25
|
+
return isWebSocketSubscription(event) && event.event === WebSocketMessageEvent.CHAT_COMPLETIONS;
|
|
26
26
|
};
|
|
27
27
|
// CHANNEL_PUBLISH_SUBSCRIPTIONS
|
|
28
|
-
export const
|
|
29
|
-
if (!
|
|
28
|
+
export const isSubscribeCodeRunStatusWebSocketEventDto = (event) => {
|
|
29
|
+
if (!isWebSocketSubscription(event))
|
|
30
30
|
return false;
|
|
31
31
|
const v = event;
|
|
32
32
|
return event.event === WebSocketSubscriptionEvent.SUBSCRIBE_CODE_RUN_STATUS && typeof v.runId === 'string' && !!v.runId;
|
|
33
33
|
};
|
|
34
|
-
export const
|
|
35
|
-
if (!
|
|
34
|
+
export const isUnsubscribeCodeRunStatusWebSocketEventDto = (event) => {
|
|
35
|
+
if (!isWebSocketSubscription(event))
|
|
36
36
|
return false;
|
|
37
37
|
const v = event;
|
|
38
38
|
return event.event === WebSocketSubscriptionEvent.UNSUBSCRIBE_CODE_RUN_STATUS && typeof v.runId === 'string' && !!v.runId;
|
|
39
39
|
};
|
|
40
|
-
export const
|
|
41
|
-
if (!
|
|
40
|
+
export const isSubscribeSubmissionRunStatusWebSocketEventDto = (event) => {
|
|
41
|
+
if (!isWebSocketSubscription(event))
|
|
42
42
|
return false;
|
|
43
43
|
const v = event;
|
|
44
44
|
return (event.event === WebSocketSubscriptionEvent.SUBSCRIBE_SUBMISSION_RUN_STATUS && typeof v.submitId === 'string' && !!v.submitId);
|
|
45
45
|
};
|
|
46
|
-
export const
|
|
47
|
-
if (!
|
|
46
|
+
export const isUnsubscribeSubmissionRunStatusWebSocketEventDto = (event) => {
|
|
47
|
+
if (!isWebSocketSubscription(event))
|
|
48
48
|
return false;
|
|
49
49
|
const v = event;
|
|
50
50
|
return (event.event === WebSocketSubscriptionEvent.UNSUBSCRIBE_SUBMISSION_RUN_STATUS &&
|
|
51
51
|
typeof v.submitId === 'string' &&
|
|
52
52
|
!!v.submitId);
|
|
53
53
|
};
|
|
54
|
-
export const
|
|
55
|
-
return
|
|
54
|
+
export const isSubscribeGetDataWebSocketEventDto = (event) => {
|
|
55
|
+
return isWebSocketSubscription(event) && event.event === WebSocketSubscriptionEvent.SUBSCRIBE_GET_DATA;
|
|
56
56
|
};
|
|
57
|
-
export const
|
|
58
|
-
return
|
|
57
|
+
export const isUnsubscribeGetDataWebSocketEventDto = (event) => {
|
|
58
|
+
return isWebSocketSubscription(event) && event.event === WebSocketSubscriptionEvent.UNSUBSCRIBE_GET_DATA;
|
|
59
59
|
};
|
|
60
|
-
export const
|
|
61
|
-
return
|
|
60
|
+
export const isSubscribeProblemCrawledWebSocketEventDto = (event) => {
|
|
61
|
+
return isWebSocketSubscription(event) && event.event === WebSocketSubscriptionEvent.SUBSCRIBE_PROBLEM_CRAWLED;
|
|
62
62
|
};
|
|
63
|
-
export const
|
|
64
|
-
return
|
|
63
|
+
export const isUnsubscribeProblemCrawledWebSocketEventDto = (event) => {
|
|
64
|
+
return isWebSocketSubscription(event) && event.event === WebSocketSubscriptionEvent.UNSUBSCRIBE_PROBLEM_CRAWLED;
|
|
65
65
|
};
|
|
66
|
-
export const
|
|
67
|
-
return
|
|
66
|
+
export const isSubscribeSubmissionsCrawlWebSocketEventDto = (event) => {
|
|
67
|
+
return isWebSocketSubscription(event) && event.event === WebSocketSubscriptionEvent.SUBSCRIBE_SUBMISSIONS_CRAWL;
|
|
68
68
|
};
|
|
69
|
-
export const
|
|
70
|
-
return
|
|
69
|
+
export const isUnsubscribeSubmissionsCrawlWebSocketEventDto = (event) => {
|
|
70
|
+
return isWebSocketSubscription(event) && event.event === WebSocketSubscriptionEvent.UNSUBSCRIBE_SUBMISSIONS_CRAWL;
|
|
71
71
|
};
|
|
72
|
-
export const
|
|
73
|
-
return
|
|
72
|
+
export const isSubscribeContestChangesWebSocketEventDto = (event) => {
|
|
73
|
+
return isWebSocketSubscription(event) && event.event === WebSocketSubscriptionEvent.SUBSCRIBE_CONTEST_CHANGES;
|
|
74
74
|
};
|
|
75
|
-
export const
|
|
76
|
-
return
|
|
75
|
+
export const isUnsubscribeContestChangesWebSocketEventDto = (event) => {
|
|
76
|
+
return isWebSocketSubscription(event) && event.event === WebSocketSubscriptionEvent.UNSUBSCRIBE_CONTEST_CHANGES;
|
|
77
77
|
};
|
|
78
|
-
export const
|
|
79
|
-
return
|
|
78
|
+
export const isSubscribeClientTrackWebSocketEventDto = (event) => {
|
|
79
|
+
return isWebSocketSubscription(event) && event.event === WebSocketSubscriptionEvent.SUBSCRIBE_CLIENT_TRACK;
|
|
80
80
|
};
|
|
81
|
-
export const
|
|
82
|
-
return
|
|
81
|
+
export const isUnsubscribeClientTrackWebSocketEventDto = (event) => {
|
|
82
|
+
return isWebSocketSubscription(event) && event.event === WebSocketSubscriptionEvent.UNSUBSCRIBE_CLIENT_TRACK;
|
|
83
83
|
};
|
|
84
|
-
export const
|
|
85
|
-
return
|
|
84
|
+
export const isSubscribeUserNotificationWebSocketEventDto = (event) => {
|
|
85
|
+
return isWebSocketSubscription(event) && event.event === WebSocketSubscriptionEvent.SUBSCRIBE_USER_NOTIFICATION;
|
|
86
86
|
};
|
|
87
|
-
export const
|
|
88
|
-
return
|
|
87
|
+
export const isUnsubscribeUserNotificationWebSocketEventDto = (event) => {
|
|
88
|
+
return isWebSocketSubscription(event) && event.event === WebSocketSubscriptionEvent.UNSUBSCRIBE_USER_NOTIFICATION;
|
|
89
89
|
};
|
|
90
|
-
// is
|
|
91
|
-
export const
|
|
90
|
+
// is WebSocketResponseEventDto, CHANNEL_SUBSCRIBE_CLIENT
|
|
91
|
+
export const isWebSocketResponseEventDto = (event) => {
|
|
92
92
|
if (typeof event !== 'object' || event === null)
|
|
93
93
|
return false;
|
|
94
94
|
const v = event;
|
|
@@ -98,14 +98,14 @@ export const isWebSocketResponseEventDTO = (event) => {
|
|
|
98
98
|
typeof v.createdAt === 'number' &&
|
|
99
99
|
!!v.createdAt);
|
|
100
100
|
};
|
|
101
|
-
export const
|
|
102
|
-
if (!
|
|
101
|
+
export const isPongWebSocketResponseEventDto = (event) => {
|
|
102
|
+
if (!isWebSocketResponseEventDto(event))
|
|
103
103
|
return false;
|
|
104
104
|
const v = event;
|
|
105
105
|
return event.event === WebSocketResponseEvent.PONG && !!v.data;
|
|
106
106
|
};
|
|
107
|
-
export const
|
|
108
|
-
if (!
|
|
107
|
+
export const isCodeRunStatusMessageWebSocketResponseEventDto = (event) => {
|
|
108
|
+
if (!isWebSocketResponseEventDto(event))
|
|
109
109
|
return false;
|
|
110
110
|
const v = event;
|
|
111
111
|
return (event.event === WebSocketResponseEvent.CODE_RUN_STATUS &&
|
|
@@ -113,8 +113,8 @@ export const isCodeRunStatusMessageWebSocketResponseEventDTO = (event) => {
|
|
|
113
113
|
!!v.runId &&
|
|
114
114
|
Object.values(SubmissionRunStatus).includes(v.status));
|
|
115
115
|
};
|
|
116
|
-
export const
|
|
117
|
-
if (!
|
|
116
|
+
export const isSubmissionRunStatusMessageWebSocketResponseEventDto = (event) => {
|
|
117
|
+
if (!isWebSocketResponseEventDto(event))
|
|
118
118
|
return false;
|
|
119
119
|
const v = event;
|
|
120
120
|
return (event.event === WebSocketResponseEvent.SUBMISSION_RUN_STATUS &&
|
|
@@ -124,8 +124,8 @@ export const isSubmissionRunStatusMessageWebSocketResponseEventDTO = (event) =>
|
|
|
124
124
|
Object.values(ProblemVerdict).includes(v.verdict) &&
|
|
125
125
|
typeof v.points === 'number');
|
|
126
126
|
};
|
|
127
|
-
export const
|
|
128
|
-
if (!
|
|
127
|
+
export const isUserMessageWebSocketResponseEventDto = (event) => {
|
|
128
|
+
if (!isWebSocketResponseEventDto(event))
|
|
129
129
|
return false;
|
|
130
130
|
const v = event;
|
|
131
131
|
const user = v.user;
|
|
@@ -139,7 +139,7 @@ export const isUserMessageWebSocketResponseEventDTO = (event) => {
|
|
|
139
139
|
!!organization.key &&
|
|
140
140
|
!!v.content);
|
|
141
141
|
};
|
|
142
|
-
export const
|
|
142
|
+
export const isSendDataWebSocketResponseEventDto = (event) => {
|
|
143
143
|
if (typeof event !== 'object' || event === null)
|
|
144
144
|
return false;
|
|
145
145
|
const v = event;
|
|
@@ -156,63 +156,63 @@ export const isSendDataWebSocketResponseEventDTO = (event) => {
|
|
|
156
156
|
!!v.dataId &&
|
|
157
157
|
!!v.content);
|
|
158
158
|
};
|
|
159
|
-
export const
|
|
160
|
-
return (
|
|
161
|
-
|
|
159
|
+
export const isSendDataEcsTaskDefinitionListWebSocketResponseEventDto = (event) => {
|
|
160
|
+
return (isWebSocketResponseEventDto(event) &&
|
|
161
|
+
isSendDataWebSocketResponseEventDto(event) &&
|
|
162
162
|
event.event === WebSocketResponseEvent.SEND_DATA_ECS_TASK_DEFINITIONS_LIST);
|
|
163
163
|
};
|
|
164
|
-
export const
|
|
165
|
-
return (
|
|
166
|
-
|
|
164
|
+
export const isSendDataEc2InstancesListWebSocketResponseEventDto = (event) => {
|
|
165
|
+
return (isWebSocketResponseEventDto(event) &&
|
|
166
|
+
isSendDataWebSocketResponseEventDto(event) &&
|
|
167
167
|
event.event === WebSocketResponseEvent.SEND_DATA_EC2_INSTANCES_LIST);
|
|
168
168
|
};
|
|
169
|
-
export const
|
|
170
|
-
return (
|
|
171
|
-
|
|
169
|
+
export const isSendDataEcsTasksListWebSocketResponseEventDto = (event) => {
|
|
170
|
+
return (isWebSocketResponseEventDto(event) &&
|
|
171
|
+
isSendDataWebSocketResponseEventDto(event) &&
|
|
172
172
|
event.event === WebSocketResponseEvent.SEND_DATA_ECS_TASKS_LIST);
|
|
173
173
|
};
|
|
174
|
-
export const
|
|
175
|
-
return (
|
|
176
|
-
|
|
174
|
+
export const isSendDataSsmSessionsListWebSocketResponseEventDto = (event) => {
|
|
175
|
+
return (isWebSocketResponseEventDto(event) &&
|
|
176
|
+
isSendDataWebSocketResponseEventDto(event) &&
|
|
177
177
|
event.event === WebSocketResponseEvent.SEND_DATA_SSM_SESSIONS_LIST);
|
|
178
178
|
};
|
|
179
|
-
export const
|
|
180
|
-
return (
|
|
181
|
-
|
|
179
|
+
export const isSendDataRunCommandWebSocketResponseEventDto = (event) => {
|
|
180
|
+
return (isWebSocketResponseEventDto(event) &&
|
|
181
|
+
isSendDataWebSocketResponseEventDto(event) &&
|
|
182
182
|
event.event === WebSocketResponseEvent.SEND_DATA_RUN_COMMAND);
|
|
183
183
|
};
|
|
184
|
-
export const
|
|
185
|
-
return (
|
|
186
|
-
|
|
184
|
+
export const isSendDataClientTrackWebSocketResponseEventDto = (event) => {
|
|
185
|
+
return (isWebSocketResponseEventDto(event) &&
|
|
186
|
+
isSendDataWebSocketResponseEventDto(event) &&
|
|
187
187
|
event.event === WebSocketResponseEvent.SEND_DATA_CLIENT_TRACK);
|
|
188
188
|
};
|
|
189
|
-
export const
|
|
190
|
-
return (
|
|
191
|
-
|
|
189
|
+
export const isSendDataChatCompletionsWebSocketResponseEventDto = (event) => {
|
|
190
|
+
return (isWebSocketResponseEventDto(event) &&
|
|
191
|
+
isSendDataWebSocketResponseEventDto(event) &&
|
|
192
192
|
event.event === WebSocketResponseEvent.SEND_DATA_CHAT_COMPLETIONS);
|
|
193
193
|
};
|
|
194
|
-
export const
|
|
195
|
-
if (!
|
|
194
|
+
export const isProblemCrawledWebSocketResponseEventDto = (event) => {
|
|
195
|
+
if (!isWebSocketResponseEventDto(event))
|
|
196
196
|
return false;
|
|
197
197
|
const v = event;
|
|
198
198
|
return event.event === WebSocketResponseEvent.PROBLEM_CRAWLED && !!v.content;
|
|
199
199
|
};
|
|
200
|
-
export const
|
|
201
|
-
if (!
|
|
200
|
+
export const isSubmissionsCrawlWebSocketResponseEventDto = (event) => {
|
|
201
|
+
if (!isWebSocketResponseEventDto(event))
|
|
202
202
|
return false;
|
|
203
203
|
const v = event;
|
|
204
204
|
return event.event === WebSocketResponseEvent.SUBMISSIONS_CRAWL && !!v.content;
|
|
205
205
|
};
|
|
206
|
-
export const
|
|
207
|
-
if (!
|
|
206
|
+
export const isContestChangesWebSocketResponseEventDto = (event) => {
|
|
207
|
+
if (!isWebSocketResponseEventDto(event))
|
|
208
208
|
return false;
|
|
209
209
|
const v = event;
|
|
210
210
|
return event.event === WebSocketResponseEvent.CONTEST_CHANGES && !!v.content;
|
|
211
211
|
};
|
|
212
|
-
export const
|
|
213
|
-
return
|
|
212
|
+
export const isClientTrackWebSocketResponseEventDto = (event) => {
|
|
213
|
+
return isWebSocketResponseEventDto(event) && event.event === WebSocketResponseEvent.CLIENT_TRACK;
|
|
214
214
|
};
|
|
215
|
-
export const
|
|
215
|
+
export const isUserNotificationWebSocketResponseEventDto = (event) => {
|
|
216
216
|
if (typeof event !== 'object' || event === null)
|
|
217
217
|
return false;
|
|
218
218
|
const v = event;
|
|
@@ -221,14 +221,14 @@ export const isUserNotificationWebSocketResponseEventDTO = (event) => {
|
|
|
221
221
|
WebSocketResponseEvent.USER_NOTIFICATION_CONTEST_CLARIFICATION,
|
|
222
222
|
].includes(v.event) && !!v.content);
|
|
223
223
|
};
|
|
224
|
-
export const
|
|
225
|
-
return (
|
|
226
|
-
|
|
224
|
+
export const isUserNotificationSubmissionWebSocketResponseEventDto = (event) => {
|
|
225
|
+
return (isWebSocketResponseEventDto(event) &&
|
|
226
|
+
isUserNotificationWebSocketResponseEventDto(event) &&
|
|
227
227
|
event.event === WebSocketResponseEvent.USER_NOTIFICATION_SUBMISSION);
|
|
228
228
|
};
|
|
229
|
-
export const
|
|
230
|
-
return (
|
|
231
|
-
|
|
229
|
+
export const isUserNotificationContestClarificationWebSocketResponseEventDto = (event) => {
|
|
230
|
+
return (isWebSocketResponseEventDto(event) &&
|
|
231
|
+
isUserNotificationWebSocketResponseEventDto(event) &&
|
|
232
232
|
event.event === WebSocketResponseEvent.USER_NOTIFICATION_CONTEST_CLARIFICATION);
|
|
233
233
|
};
|
|
234
234
|
// generic
|
package/dist/types/contest.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ContestDataResponseDTO, UpsertContestDTO, UserOrganizationBasicInfoResponseDTO } from '../dto/index.js';
|
|
2
1
|
import type { CodeLanguage, ContestEventAction, ContestProblemPrerequisiteType, Judge } from '../enums/index.js';
|
|
3
2
|
import type { EntityMembers } from './entity.js';
|
|
4
3
|
import type { UserBasicInfo } from './user.js';
|
|
@@ -34,17 +33,6 @@ export type ContestUser = {
|
|
|
34
33
|
isGuest: boolean;
|
|
35
34
|
isSpectator: boolean;
|
|
36
35
|
};
|
|
37
|
-
export type ContestClarification = {
|
|
38
|
-
key: string;
|
|
39
|
-
problemJudgeKey: string;
|
|
40
|
-
question: string;
|
|
41
|
-
questionUser: UserOrganizationBasicInfoResponseDTO;
|
|
42
|
-
askedAt: number;
|
|
43
|
-
answer: string;
|
|
44
|
-
answeredAt: number;
|
|
45
|
-
answerUser: UserOrganizationBasicInfoResponseDTO;
|
|
46
|
-
public: boolean;
|
|
47
|
-
};
|
|
48
36
|
export type ContestProblemPrerequisite = {
|
|
49
37
|
problemId: string;
|
|
50
38
|
type: ContestProblemPrerequisiteType;
|
|
@@ -133,6 +121,15 @@ export type ContestMembersResponse = {
|
|
|
133
121
|
[key: string]: UserBasicInfo;
|
|
134
122
|
};
|
|
135
123
|
};
|
|
136
|
-
export
|
|
137
|
-
|
|
138
|
-
|
|
124
|
+
export interface ContestTimeFlags {
|
|
125
|
+
isLive: boolean;
|
|
126
|
+
isFrozenTime: boolean;
|
|
127
|
+
isQuietTime: boolean;
|
|
128
|
+
isEndless: boolean;
|
|
129
|
+
isPast: boolean;
|
|
130
|
+
isFuture: boolean;
|
|
131
|
+
isGlobal: boolean;
|
|
132
|
+
}
|
|
133
|
+
export interface ContestTimeData extends ContestTimeFlags {
|
|
134
|
+
settings: Pick<ContestSettings, 'penalty' | 'startsAt' | 'frozenAt' | 'silencedAt' | 'endsAt' | 'upsolvingEnabled'>;
|
|
135
|
+
}
|
package/dist/types/entity.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { UserOrganizationBasicInfoResponseDTO } from '../dto/index.js';
|
|
2
1
|
import type { EntityMembersRank, EntityState, LogOperation } from '../enums/index.js';
|
|
3
2
|
export type EntityUsersMemberUserData = {
|
|
4
3
|
userId: string;
|
|
@@ -65,8 +64,3 @@ export interface EntityLogsDocument {
|
|
|
65
64
|
export type NewEntityDocument<T> = T & EntityOrganizationDocument & EntityOwnerDocument & EntityTimestampsDocument & EntityStateDocument & EntityLogsDocument;
|
|
66
65
|
export type CreateEntityDocument<T> = Omit<T, '_id' | 'createdAt' | 'updatedAt' | 'organizationId' | 'ownerUserId' | 'state' | 'logs'>;
|
|
67
66
|
export type UpdateEntityDocument<T> = Partial<Omit<T, '_id' | 'createdAt' | 'updatedAt' | 'organizationId' | 'ownerUserId' | 'state' | 'logs' | 'key'>>;
|
|
68
|
-
export interface LogDataResponseDTO {
|
|
69
|
-
changes: EntityLogChanges[];
|
|
70
|
-
timestamp: number;
|
|
71
|
-
customerUser: UserOrganizationBasicInfoResponseDTO;
|
|
72
|
-
}
|
package/dist/types/file.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import type { FileType } from '../enums/index.js';
|
|
1
|
+
import type { EntityState, FileType } from '../enums/index.js';
|
|
2
|
+
export interface FileBasic {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
state: EntityState;
|
|
6
|
+
}
|
|
2
7
|
export type FolderFileContent = {
|
|
3
8
|
type: typeof FileType.FOLDER;
|
|
4
9
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -14,10 +14,13 @@ export type * from './judge.js';
|
|
|
14
14
|
export type * from './markdown.js';
|
|
15
15
|
export type * from './mermaid.js';
|
|
16
16
|
export type * from './problem.js';
|
|
17
|
+
export type * from './scoreboard.js';
|
|
17
18
|
export type * from './services.js';
|
|
18
19
|
export type * from './socket.js';
|
|
19
20
|
export type * from './submission.js';
|
|
21
|
+
export type * from './system.js';
|
|
20
22
|
export type * from './teams.js';
|
|
21
23
|
export type * from './text.js';
|
|
22
24
|
export type * from './user.js';
|
|
25
|
+
export type * from './virtualUser.js';
|
|
23
26
|
export type * from './worksheet.js';
|
package/dist/types/problem.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types/socket.d.ts
CHANGED
|
@@ -2,3 +2,14 @@ import type { WebSocketResponseEvent } from '../enums/index.js';
|
|
|
2
2
|
import type { RecordId } from './id.js';
|
|
3
3
|
export type ClientId = `${RecordId}|${string}`;
|
|
4
4
|
export type WebSocketResponseEventKey = `${WebSocketResponseEvent}-${ClientId}-${string}`;
|
|
5
|
+
export type InfoLogCaseStatus = {
|
|
6
|
+
inputKey: string;
|
|
7
|
+
out: string;
|
|
8
|
+
err: string;
|
|
9
|
+
log: string;
|
|
10
|
+
};
|
|
11
|
+
export type TestInfo = {
|
|
12
|
+
sampleCase: boolean;
|
|
13
|
+
caseResultsExecuted: number;
|
|
14
|
+
caseResultsTotal: number;
|
|
15
|
+
};
|
|
@@ -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: unknown;
|
|
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: unknown;
|
|
76
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types/text.d.ts
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type CookieSameSite = 'Strict' | 'Lax' | 'None';
|
|
2
|
+
export type CookiePriority = 'Low' | 'Medium' | 'High';
|
|
3
|
+
export interface CookiePartitionKey {
|
|
4
|
+
sourceOrigin: string;
|
|
5
|
+
hasCrossSiteAncestor?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface Cookie {
|
|
8
|
+
name: string;
|
|
9
|
+
value: string;
|
|
10
|
+
domain: string;
|
|
11
|
+
path: string;
|
|
12
|
+
expires: number;
|
|
13
|
+
size: number;
|
|
14
|
+
httpOnly?: boolean;
|
|
15
|
+
secure: boolean;
|
|
16
|
+
session: boolean;
|
|
17
|
+
sameSite?: CookieSameSite;
|
|
18
|
+
priority?: CookiePriority;
|
|
19
|
+
sameParty?: boolean;
|
|
20
|
+
partitionKey?: CookiePartitionKey | string;
|
|
21
|
+
partitionKeyOpaque?: boolean;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|