@juki-team/commons 0.1.47 → 0.1.49

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.
Files changed (191) hide show
  1. package/dist/{types/constants → constants}/commons.d.ts +1 -1
  2. package/dist/constants/commons.js +648 -0
  3. package/dist/{types/constants → constants}/contest.d.ts +1 -1
  4. package/dist/constants/contest.js +28 -0
  5. package/dist/{types/constants → constants}/course.d.ts +1 -1
  6. package/dist/constants/course.js +12 -0
  7. package/dist/constants/date.js +23 -0
  8. package/dist/constants/email.js +34 -0
  9. package/dist/{types/constants → constants}/entity.d.ts +1 -1
  10. package/dist/constants/entity.js +18 -0
  11. package/dist/{types/constants → constants}/file.d.ts +1 -1
  12. package/dist/constants/file.js +45 -0
  13. package/dist/constants/index.d.ts +18 -0
  14. package/dist/constants/index.js +18 -0
  15. package/dist/{types/constants → constants}/judge.d.ts +1 -1
  16. package/dist/constants/judge.js +225 -0
  17. package/dist/{types/constants → constants}/organization.d.ts +1 -1
  18. package/dist/constants/organization.js +24 -0
  19. package/dist/{types/constants → constants}/problem.d.ts +1 -1
  20. package/dist/constants/problem.js +69 -0
  21. package/dist/constants/routing.js +7 -0
  22. package/dist/{types/constants → constants}/services.d.ts +1 -1
  23. package/dist/constants/services.js +157 -0
  24. package/dist/{types/constants → constants}/system.d.ts +1 -1
  25. package/dist/constants/system.js +9 -0
  26. package/dist/{types/constants → constants}/teams.d.ts +1 -1
  27. package/dist/constants/teams.js +17 -0
  28. package/dist/constants/time.js +9 -0
  29. package/dist/{types/constants → constants}/user.d.ts +2 -2
  30. package/dist/constants/user.js +40 -0
  31. package/dist/{types/constants → constants}/websocket.d.ts +1 -1
  32. package/dist/constants/websocket.js +56 -0
  33. package/dist/{types/constants → constants}/worksheet.d.ts +1 -1
  34. package/dist/constants/worksheet.js +66 -0
  35. package/dist/{types/dto → dto}/class.d.ts +3 -3
  36. package/dist/dto/class.js +1 -0
  37. package/dist/{types/dto → dto}/code.d.ts +1 -1
  38. package/dist/dto/code.js +1 -0
  39. package/dist/{types/dto → dto}/comments.d.ts +1 -1
  40. package/dist/dto/comments.js +1 -0
  41. package/dist/{types/dto → dto}/contest.d.ts +4 -4
  42. package/dist/dto/contest.js +7 -0
  43. package/dist/{types/dto → dto}/course.d.ts +4 -4
  44. package/dist/dto/course.js +1 -0
  45. package/dist/{types/dto → dto}/entity.d.ts +2 -2
  46. package/dist/dto/entity.js +5 -0
  47. package/dist/{types/dto → dto}/excalidraw.d.ts +3 -3
  48. package/dist/dto/excalidraw.js +1 -0
  49. package/dist/{types/dto → dto}/file.d.ts +2 -2
  50. package/dist/dto/file.js +1 -0
  51. package/dist/dto/image.js +1 -0
  52. package/dist/dto/index.d.ts +25 -0
  53. package/dist/dto/index.js +25 -0
  54. package/dist/{types/dto → dto}/judge.d.ts +1 -1
  55. package/dist/dto/judge.js +1 -0
  56. package/dist/{types/dto → dto}/markdown.d.ts +3 -3
  57. package/dist/dto/markdown.js +1 -0
  58. package/dist/{types/dto → dto}/mermaid.d.ts +3 -3
  59. package/dist/dto/mermaid.js +1 -0
  60. package/dist/{types/dto → dto}/organization.d.ts +3 -3
  61. package/dist/dto/organization.js +1 -0
  62. package/dist/{types/dto → dto}/problem.d.ts +3 -3
  63. package/dist/dto/problem.js +1 -0
  64. package/dist/{types/dto → dto}/scoreboard.d.ts +2 -2
  65. package/dist/dto/scoreboard.js +1 -0
  66. package/dist/{types/dto → dto}/session.d.ts +2 -2
  67. package/dist/dto/session.js +1 -0
  68. package/dist/{types/dto → dto}/socket.d.ts +3 -3
  69. package/dist/dto/socket.js +1 -0
  70. package/dist/{types/dto → dto}/statistics.d.ts +1 -1
  71. package/dist/dto/statistics.js +1 -0
  72. package/dist/{types/dto → dto}/submission.d.ts +3 -3
  73. package/dist/dto/submission.js +1 -0
  74. package/dist/{types/dto → dto}/system.d.ts +1 -1
  75. package/dist/dto/system.js +1 -0
  76. package/dist/dto/url.js +1 -0
  77. package/dist/{types/dto → dto}/user.d.ts +3 -3
  78. package/dist/dto/user.js +1 -0
  79. package/dist/{types/dto → dto}/virtual-user.d.ts +1 -1
  80. package/dist/dto/virtual-user.js +1 -0
  81. package/dist/{types/dto → dto}/worksheet-submissions.d.ts +3 -3
  82. package/dist/dto/worksheet-submissions.js +1 -0
  83. package/dist/{types/dto → dto}/worksheet.d.ts +3 -3
  84. package/dist/dto/worksheet.js +1 -0
  85. package/dist/{types/helpers → helpers}/class.d.ts +1 -1
  86. package/dist/helpers/class.js +10 -0
  87. package/dist/helpers/comments.js +4 -0
  88. package/dist/{types/helpers → helpers}/commons.d.ts +1 -1
  89. package/dist/helpers/commons.js +187 -0
  90. package/dist/{types/helpers → helpers}/contest.d.ts +1 -1
  91. package/dist/helpers/contest.js +21 -0
  92. package/dist/helpers/date.js +181 -0
  93. package/dist/{types/helpers → helpers}/document.d.ts +2 -2
  94. package/dist/helpers/document.js +51 -0
  95. package/dist/{types/helpers → helpers}/errors.d.ts +1 -1
  96. package/dist/helpers/errors.js +17 -0
  97. package/dist/helpers/file.js +4 -0
  98. package/dist/helpers/index.d.ts +17 -0
  99. package/dist/helpers/index.js +17 -0
  100. package/dist/helpers/interval.js +24 -0
  101. package/dist/{types/helpers → helpers}/judging.d.ts +1 -1
  102. package/dist/helpers/judging.js +124 -0
  103. package/dist/helpers/number.js +2 -0
  104. package/dist/helpers/object.js +33 -0
  105. package/dist/{types/helpers → helpers}/responses.d.ts +2 -2
  106. package/dist/helpers/responses.js +95 -0
  107. package/dist/{types/helpers → helpers}/socket.d.ts +2 -2
  108. package/dist/helpers/socket.js +279 -0
  109. package/dist/{types/helpers → helpers}/time.d.ts +1 -1
  110. package/dist/helpers/time.js +69 -0
  111. package/dist/{types/helpers → helpers}/user.d.ts +1 -1
  112. package/dist/helpers/user.js +14 -0
  113. package/dist/{types/helpers → helpers}/worksheet.d.ts +1 -1
  114. package/dist/helpers/worksheet.js +107 -0
  115. package/dist/index.d.ts +4 -0
  116. package/dist/index.js +4 -0
  117. package/dist/types/account.js +10 -0
  118. package/dist/types/{types/class.d.ts → class.d.ts} +2 -2
  119. package/dist/types/class.js +7 -0
  120. package/dist/types/comments.js +1 -0
  121. package/dist/types/{types/commons.d.ts → commons.d.ts} +1 -1
  122. package/dist/types/commons.js +69 -0
  123. package/dist/types/{types/contest.d.ts → contest.d.ts} +4 -4
  124. package/dist/types/contest.js +27 -0
  125. package/dist/types/{types/course.d.ts → course.d.ts} +1 -1
  126. package/dist/types/course.js +1 -0
  127. package/dist/types/entity.js +50 -0
  128. package/dist/types/{types/excalidraw.d.ts → excalidraw.d.ts} +1 -1
  129. package/dist/types/excalidraw.js +1 -0
  130. package/dist/types/{types/file.d.ts → file.d.ts} +2 -2
  131. package/dist/types/file.js +19 -0
  132. package/dist/types/{types/group.d.ts → group.d.ts} +1 -1
  133. package/dist/types/group.js +5 -0
  134. package/dist/types/index.d.ts +27 -4
  135. package/dist/types/index.js +27 -0
  136. package/dist/types/{types/judge.d.ts → judge.d.ts} +2 -2
  137. package/dist/types/judge.js +49 -0
  138. package/dist/types/{types/markdown.d.ts → markdown.d.ts} +1 -1
  139. package/dist/types/markdown.js +1 -0
  140. package/dist/types/{types/mermaid.d.ts → mermaid.d.ts} +1 -1
  141. package/dist/types/mermaid.js +1 -0
  142. package/dist/types/notification.js +8 -0
  143. package/dist/types/organization.js +14 -0
  144. package/dist/types/{types/prisma.d.ts → prisma.d.ts} +1 -1
  145. package/dist/types/prisma.js +106 -0
  146. package/dist/types/{types/problems.d.ts → problems.d.ts} +3 -3
  147. package/dist/types/problems.js +28 -0
  148. package/dist/types/scoreboard.js +1 -0
  149. package/dist/types/{types/services.d.ts → services.d.ts} +1 -1
  150. package/dist/types/services.js +152 -0
  151. package/dist/types/{types/sheet.d.ts → sheet.d.ts} +2 -2
  152. package/dist/types/sheet.js +16 -0
  153. package/dist/types/{types/socket.d.ts → socket.d.ts} +1 -1
  154. package/dist/types/socket.js +76 -0
  155. package/dist/types/submission.js +1 -0
  156. package/dist/types/system.js +1 -0
  157. package/dist/types/{types/teams.d.ts → teams.d.ts} +2 -2
  158. package/dist/types/teams.js +1 -0
  159. package/dist/types/{types/users.d.ts → users.d.ts} +2 -2
  160. package/dist/types/users.js +23 -0
  161. package/dist/types/virtual-user.js +8 -0
  162. package/dist/types/{types/worksheet.d.ts → worksheet.d.ts} +3 -3
  163. package/dist/types/worksheet.js +11 -0
  164. package/package.json +8 -11
  165. package/dist/cjs/index.cjs +0 -3700
  166. package/dist/esm/index.js +0 -3420
  167. package/dist/types/constants/index.d.ts +0 -18
  168. package/dist/types/dto/index.d.ts +0 -25
  169. package/dist/types/helpers/index.d.ts +0 -17
  170. package/dist/types/types/index.d.ts +0 -27
  171. /package/dist/{types/constants → constants}/date.d.ts +0 -0
  172. /package/dist/{types/constants → constants}/email.d.ts +0 -0
  173. /package/dist/{types/constants → constants}/routing.d.ts +0 -0
  174. /package/dist/{types/constants → constants}/time.d.ts +0 -0
  175. /package/dist/{types/dto → dto}/image.d.ts +0 -0
  176. /package/dist/{types/dto → dto}/url.d.ts +0 -0
  177. /package/dist/{types/helpers → helpers}/comments.d.ts +0 -0
  178. /package/dist/{types/helpers → helpers}/date.d.ts +0 -0
  179. /package/dist/{types/helpers → helpers}/file.d.ts +0 -0
  180. /package/dist/{types/helpers → helpers}/interval.d.ts +0 -0
  181. /package/dist/{types/helpers → helpers}/number.d.ts +0 -0
  182. /package/dist/{types/helpers → helpers}/object.d.ts +0 -0
  183. /package/dist/types/{types/account.d.ts → account.d.ts} +0 -0
  184. /package/dist/types/{types/comments.d.ts → comments.d.ts} +0 -0
  185. /package/dist/types/{types/entity.d.ts → entity.d.ts} +0 -0
  186. /package/dist/types/{types/notification.d.ts → notification.d.ts} +0 -0
  187. /package/dist/types/{types/organization.d.ts → organization.d.ts} +0 -0
  188. /package/dist/types/{types/scoreboard.d.ts → scoreboard.d.ts} +0 -0
  189. /package/dist/types/{types/submission.d.ts → submission.d.ts} +0 -0
  190. /package/dist/types/{types/system.d.ts → system.d.ts} +0 -0
  191. /package/dist/types/{types/virtual-user.d.ts → virtual-user.d.ts} +0 -0
@@ -0,0 +1,69 @@
1
+ export function splitTime(timeRemaining) {
2
+ const remaining = [];
3
+ // const aYearMilliseconds = 1000 * 60 * 60 * 24 * 365;
4
+ // const remainingYears = Math.floor(timeRemaining / aYearMilliseconds);
5
+ // remaining.push({ remaining: remainingYears, label: 'years', milliseconds: aYearMilliseconds });
6
+ // const aWeekMilliseconds = 1000 * 60 * 60 * 24 * 7;
7
+ // const remainingWeeks = Math.floor((timeRemaining % aYearMilliseconds) / aWeekMilliseconds);
8
+ // remaining.push({ remaining: remainingWeeks, label: 'weeks', milliseconds: aWeekMilliseconds });
9
+ const aSecondMilliseconds = 1000;
10
+ const aMinuteMilliseconds = aSecondMilliseconds * 60;
11
+ const aHourMilliseconds = aMinuteMilliseconds * 60;
12
+ const aDayMilliseconds = aHourMilliseconds * 24;
13
+ const aWeekMilliseconds = aDayMilliseconds * 7;
14
+ const remainingWeeks = Math.floor(timeRemaining / aWeekMilliseconds);
15
+ remaining.push({
16
+ remaining: remainingWeeks,
17
+ label: remainingWeeks === 1 ? 'week' : 'weeks',
18
+ abbreviatedLabel: 'w',
19
+ milliseconds: aWeekMilliseconds,
20
+ digits: 2,
21
+ });
22
+ const remainingDays = Math.floor((timeRemaining % aWeekMilliseconds) / aDayMilliseconds);
23
+ remaining.push({
24
+ remaining: remainingDays,
25
+ label: remainingDays === 1 ? 'day' : 'days',
26
+ abbreviatedLabel: 'd',
27
+ milliseconds: aDayMilliseconds,
28
+ digits: 2,
29
+ });
30
+ const remainingHours = Math.floor((timeRemaining % aDayMilliseconds) / aHourMilliseconds);
31
+ remaining.push({
32
+ remaining: remainingHours,
33
+ label: remainingHours === 1 ? 'hour' : 'hours',
34
+ abbreviatedLabel: 'h',
35
+ milliseconds: aHourMilliseconds,
36
+ digits: 2,
37
+ });
38
+ const remainingMinutes = Math.floor((timeRemaining % aHourMilliseconds) / aMinuteMilliseconds);
39
+ remaining.push({
40
+ remaining: remainingMinutes,
41
+ label: remainingMinutes === 1 ? 'minute' : 'minutes',
42
+ abbreviatedLabel: 'm',
43
+ milliseconds: aMinuteMilliseconds,
44
+ digits: 2,
45
+ });
46
+ const remainingSeconds = Math.floor((timeRemaining % aMinuteMilliseconds) / aSecondMilliseconds);
47
+ remaining.push({
48
+ remaining: remainingSeconds,
49
+ label: remainingSeconds === 1 ? 'second' : 'seconds',
50
+ abbreviatedLabel: 's',
51
+ milliseconds: aSecondMilliseconds,
52
+ digits: 2,
53
+ });
54
+ const remainingMilliseconds = Math.floor(timeRemaining % aSecondMilliseconds);
55
+ remaining.push({
56
+ remaining: remainingMilliseconds,
57
+ label: remainingMilliseconds === 1 ? 'millisecond' : 'milliseconds',
58
+ abbreviatedLabel: 'ms',
59
+ milliseconds: 1,
60
+ digits: 3,
61
+ });
62
+ // while (remaining[0].remaining <= 0) {
63
+ // remaining.shift();
64
+ // if (remaining.length === 3) {
65
+ // break;
66
+ // }
67
+ // }
68
+ return remaining;
69
+ }
@@ -1,4 +1,4 @@
1
- import { ClientId, RecordId } from '../types';
1
+ import { ClientId, RecordId } from '../types/index.js';
2
2
  export declare const getUserKey: (userNickname: string, userOrganizationKey: string) => string;
3
3
  export declare const getParamsOfUserKey: (userKey: string) => {
4
4
  userNickname: string;
@@ -0,0 +1,14 @@
1
+ export const getUserKey = (userNickname, userOrganizationKey) => {
2
+ return userNickname + '|' + userOrganizationKey;
3
+ };
4
+ export const getParamsOfUserKey = (userKey) => {
5
+ const [userNickname, userOrganizationKey] = userKey.split('|');
6
+ return { userNickname, userOrganizationKey };
7
+ };
8
+ export const getClientId = (sessionId, uiId) => {
9
+ return `${sessionId}|${uiId}`;
10
+ };
11
+ export const getParamsOfClientId = (clientId) => {
12
+ const [sessionId, uiId] = clientId.split('|');
13
+ return { sessionId, uiId };
14
+ };
@@ -1,4 +1,4 @@
1
- import { BasicWorksheet, BodyWorksheet, CodeEditorSheet, JkmdSheet, QuizOptionsSheet, QuizProblemSheet, QuizTextSheet, SummaryWorksheetsInPages, WorksheetsInPages } from '../types';
1
+ import { BasicWorksheet, BodyWorksheet, CodeEditorSheet, JkmdSheet, QuizOptionsSheet, QuizProblemSheet, QuizTextSheet, SummaryWorksheetsInPages, WorksheetsInPages } from '../types/index.js';
2
2
  export declare const getWorksheetsInPages: (initialSheets: BodyWorksheet[]) => WorksheetsInPages;
3
3
  export declare const getSummaryWorksheetsInPages: (initialSheets: BodyWorksheet[]) => SummaryWorksheetsInPages;
4
4
  export declare const getTotalExercisesOfSummaryWorksheetsInPages: (content: SummaryWorksheetsInPages) => number;
@@ -0,0 +1,107 @@
1
+ import { NEW_PAGE_SHEET } from '../constants/worksheet.js';
2
+ import { Judge, WorksheetType, } from '../types/index.js';
3
+ export const getWorksheetsInPages = (initialSheets) => {
4
+ const sheets = [...initialSheets];
5
+ if (sheets[0]?.type !== WorksheetType.NEW_PAGE) {
6
+ sheets.unshift(NEW_PAGE_SHEET());
7
+ }
8
+ let newPage = sheets[0];
9
+ let content = [];
10
+ const sheetsByPages = [];
11
+ for (let i = 1; i < sheets.length; i++) {
12
+ const sheet = sheets[i];
13
+ if (sheet.type === WorksheetType.NEW_PAGE) {
14
+ sheetsByPages.push({
15
+ header: newPage,
16
+ content: [...content],
17
+ });
18
+ newPage = sheet;
19
+ content = [];
20
+ }
21
+ else {
22
+ content.push(sheet);
23
+ }
24
+ }
25
+ sheetsByPages.push({
26
+ header: newPage,
27
+ content: [...content],
28
+ });
29
+ return sheetsByPages;
30
+ };
31
+ export const getSummaryWorksheetsInPages = (initialSheets) => {
32
+ const sheets = [...initialSheets];
33
+ if (sheets[0]?.type !== WorksheetType.NEW_PAGE) {
34
+ sheets.unshift(NEW_PAGE_SHEET());
35
+ }
36
+ let newPage = sheets[0];
37
+ let content = [];
38
+ const sheetsByPages = [];
39
+ for (let i = 1; i < sheets.length; i++) {
40
+ const sheet = sheets[i];
41
+ if (sheet.type === WorksheetType.NEW_PAGE) {
42
+ sheetsByPages.push({
43
+ header: newPage,
44
+ content: content.map(c => ({
45
+ id: c.id,
46
+ type: c.type,
47
+ title: c.title,
48
+ points: c.points,
49
+ })),
50
+ });
51
+ newPage = sheet;
52
+ content = [];
53
+ }
54
+ else {
55
+ content.push(sheet);
56
+ }
57
+ }
58
+ sheetsByPages.push({
59
+ header: newPage,
60
+ content: [...content],
61
+ });
62
+ return sheetsByPages;
63
+ };
64
+ export const getTotalExercisesOfSummaryWorksheetsInPages = (content) => content.reduce((sum, { content }) => sum + content.reduce((sum, { type }) => sum + +(type === WorksheetType.QUIZ_OPTIONS || type === WorksheetType.QUIZ_PROBLEM || type === WorksheetType.QUIZ_TEXT), 0), 0);
65
+ export const isBasicWorksheet = (value) => {
66
+ return typeof value?.id == 'string' && value.id
67
+ && Object.values(WorksheetType).includes(value?.type)
68
+ && typeof value?.title == 'string'
69
+ && typeof value?.points == 'number';
70
+ };
71
+ export const isJkmdSheet = (value) => {
72
+ return isBasicWorksheet(value)
73
+ && value?.type === WorksheetType.JK_MD
74
+ && typeof value?.content == 'string';
75
+ };
76
+ export const isCodeEditorSheet = (value) => {
77
+ return isBasicWorksheet(value)
78
+ && value?.type === WorksheetType.CODE_EDITOR
79
+ && typeof value?.sourceCode === 'object' && value?.sourceCode !== null
80
+ && value?.testCases === 'object' && value?.testCases !== null
81
+ && Array.isArray(value?.languages)
82
+ && typeof value?.height == 'number';
83
+ };
84
+ export const isQuizProblemSheet = (value) => {
85
+ return isBasicWorksheet(value)
86
+ && value?.type === WorksheetType.QUIZ_PROBLEM
87
+ && Object.values(Judge).includes(value?.problemJudge) || typeof value?.problemJudge === 'string'
88
+ && typeof value?.problemKey == 'string'
89
+ && Array.isArray(value?.languages)
90
+ && typeof value?.height == 'number';
91
+ };
92
+ export const isQuizOptionsSheet = (value) => {
93
+ return isBasicWorksheet(value)
94
+ && value?.type === WorksheetType.QUIZ_OPTIONS
95
+ && typeof value?.description == 'string'
96
+ && Array.isArray(value?.options)
97
+ && value?.options.every((option) => typeof option?.label == 'string' && typeof option?.correct == 'boolean' && typeof option?.id == 'string')
98
+ && typeof value?.multiple == 'boolean'
99
+ && (value?.scoringMode === 'TOTAL' || value?.scoringMode === 'PARTIAL');
100
+ };
101
+ export const isQuizTextSheet = (value) => {
102
+ return isBasicWorksheet(value)
103
+ && value?.type === WorksheetType.QUIZ_TEXT
104
+ && typeof value?.description == 'string'
105
+ && typeof value?.answer == 'string'
106
+ && ['text', 'number', 'textarea'].includes(value?.inputType);
107
+ };
@@ -0,0 +1,4 @@
1
+ export * from './constants/index.js';
2
+ export * from './dto/index.js';
3
+ export * from './helpers/index.js';
4
+ export * from './types/index.js';
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export * from './constants/index.js';
2
+ export * from './dto/index.js';
3
+ export * from './helpers/index.js';
4
+ export * from './types/index.js';
@@ -0,0 +1,10 @@
1
+ export var ProfileSetting;
2
+ (function (ProfileSetting) {
3
+ ProfileSetting["NEWSLETTER_SUBSCRIPTION"] = "newsletterSubscription";
4
+ ProfileSetting["LANGUAGE"] = "preferredLanguage";
5
+ ProfileSetting["THEME"] = "preferredTheme";
6
+ ProfileSetting["DATA_VIEW_MODE"] = "preferredDataViewMode";
7
+ ProfileSetting["MENU_VIEW_MODE"] = "preferredMenuViewMode";
8
+ ProfileSetting["TIME_ZONE"] = "preferredTimeZone";
9
+ ProfileSetting["FONT_SIZE"] = "preferredFontSize";
10
+ })(ProfileSetting || (ProfileSetting = {}));
@@ -1,5 +1,5 @@
1
- import { BodyWorksheet } from '../types/sheet';
2
- import { EntityMembers, EntityState } from './entity';
1
+ import { BodyWorksheet } from '../types/sheet.js';
2
+ import { EntityMembers, EntityState } from './entity.js';
3
3
  export declare enum AssignmentClass {
4
4
  NONE = "NONE",
5
5
  COURSE = "COURSE",
@@ -0,0 +1,7 @@
1
+ export var AssignmentClass;
2
+ (function (AssignmentClass) {
3
+ AssignmentClass["NONE"] = "NONE";
4
+ AssignmentClass["COURSE"] = "COURSE";
5
+ AssignmentClass["WORKSHEET"] = "WORKSHEET";
6
+ AssignmentClass["CONTEST"] = "CONTEST";
7
+ })(AssignmentClass || (AssignmentClass = {}));
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
- import { Language } from './prisma';
1
+ import { Language } from './prisma.js';
2
2
  export declare enum CodeLanguage {
3
3
  C_11 = "c11",
4
4
  CPP_11 = "cpp11",
@@ -0,0 +1,69 @@
1
+ export var CodeLanguage;
2
+ (function (CodeLanguage) {
3
+ CodeLanguage["C_11"] = "c11";
4
+ CodeLanguage["CPP_11"] = "cpp11";
5
+ CodeLanguage["CPP_20"] = "cpp20";
6
+ CodeLanguage["JAVA_21"] = "java21";
7
+ CodeLanguage["PYTHON_3"] = "python3";
8
+ CodeLanguage["PYTHON_PYPY_3"] = "pypy3";
9
+ CodeLanguage["JAVASCRIPT_NODE_JS_22"] = "nodejs22";
10
+ // DEPRECATED
11
+ CodeLanguage["PYTHON_2"] = "python2";
12
+ CodeLanguage["PYTHON_PYPY_2"] = "pypy2";
13
+ CodeLanguage["ICPC_C"] = "ICPC_C";
14
+ CodeLanguage["C"] = "C";
15
+ CodeLanguage["CPP"] = "CPP";
16
+ CodeLanguage["ICPC_CPP"] = "ICPC_CPP";
17
+ CodeLanguage["CPP11"] = "CPP11";
18
+ CodeLanguage["CPP14"] = "CPP14";
19
+ CodeLanguage["CPP17"] = "CPP17";
20
+ CodeLanguage["JAVA"] = "JAVA";
21
+ CodeLanguage["ICPC_PYTHON"] = "ICPC_PYTHON";
22
+ CodeLanguage["PYTHON"] = "PYTHON";
23
+ CodeLanguage["PYTHON2"] = "PYTHON2";
24
+ CodeLanguage["PYTHON3"] = "PYTHON3";
25
+ CodeLanguage["JAVASCRIPT"] = "JAVASCRIPT";
26
+ CodeLanguage["TYPESCRIPT"] = "TYPESCRIPT";
27
+ CodeLanguage["JSX"] = "JSX";
28
+ CodeLanguage["TSX"] = "TSX";
29
+ CodeLanguage["MDX"] = "MDX";
30
+ CodeLanguage["PSEUDOCODE_PSEINT"] = "PSEUDOCODE_PSEINT";
31
+ CodeLanguage["LATEX"] = "LATEX";
32
+ CodeLanguage["JSON"] = "JSON";
33
+ CodeLanguage["HTML"] = "HTML";
34
+ CodeLanguage["TEXT"] = "TEXT";
35
+ CodeLanguage["DIFF"] = "DIFF";
36
+ CodeLanguage["MARKDOWN"] = "MARKDOWN";
37
+ CodeLanguage["ARDUINO"] = "ARDUINO";
38
+ CodeLanguage["DOT"] = "DOT";
39
+ CodeLanguage["MERMAID"] = "MERMAID";
40
+ CodeLanguage["BASH"] = "BASH";
41
+ })(CodeLanguage || (CodeLanguage = {}));
42
+ export var ScopeData;
43
+ (function (ScopeData) {
44
+ ScopeData["USER"] = "USER";
45
+ ScopeData["PROBLEM"] = "PROBLEM";
46
+ ScopeData["CONTEST"] = "CONTEST";
47
+ ScopeData["ATTEMPT"] = "ATTEMPT";
48
+ })(ScopeData || (ScopeData = {}));
49
+ export var Status;
50
+ (function (Status) {
51
+ Status["SUCCESS"] = "SUCCESS";
52
+ Status["ERROR"] = "ERROR";
53
+ Status["LOADING"] = "LOADING";
54
+ Status["NONE"] = "NONE";
55
+ })(Status || (Status = {}));
56
+ export var EntityStatus;
57
+ (function (EntityStatus) {
58
+ EntityStatus["PUBLIC"] = "PUBLIC";
59
+ EntityStatus["RESERVED"] = "RESERVED";
60
+ EntityStatus["PRIVATE"] = "PRIVATE";
61
+ EntityStatus["ARCHIVED"] = "ARCHIVED";
62
+ })(EntityStatus || (EntityStatus = {}));
63
+ export var EntityAccess;
64
+ (function (EntityAccess) {
65
+ EntityAccess["PRIVATE"] = "PRIVATE";
66
+ EntityAccess["RESTRICTED"] = "RESTRICTED";
67
+ EntityAccess["PUBLIC"] = "PUBLIC";
68
+ EntityAccess["EXPOSED"] = "EXPOSED";
69
+ })(EntityAccess || (EntityAccess = {}));
@@ -1,7 +1,7 @@
1
- import { CodeLanguage } from './commons';
2
- import { EntityMembers } from './entity';
3
- import { Judge } from './judge';
4
- import { UserBasicInfo } from './users';
1
+ import { CodeLanguage } from './commons.js';
2
+ import { EntityMembers } from './entity.js';
3
+ import { Judge } from './judge.js';
4
+ import { UserBasicInfo } from './users.js';
5
5
  export declare enum ContestStatus {
6
6
  PUBLIC = "PUBLIC",
7
7
  RESERVED = "RESERVED",
@@ -0,0 +1,27 @@
1
+ export var ContestStatus;
2
+ (function (ContestStatus) {
3
+ ContestStatus["PUBLIC"] = "PUBLIC";
4
+ ContestStatus["RESERVED"] = "RESERVED";
5
+ ContestStatus["ARCHIVED"] = "ARCHIVED";
6
+ })(ContestStatus || (ContestStatus = {}));
7
+ export var ContestTimeStatus;
8
+ (function (ContestTimeStatus) {
9
+ ContestTimeStatus["UPCOMING"] = "upcoming";
10
+ ContestTimeStatus["LIVE"] = "live";
11
+ ContestTimeStatus["PAST"] = "past";
12
+ })(ContestTimeStatus || (ContestTimeStatus = {}));
13
+ export var ContestProblemPrerequisiteType;
14
+ (function (ContestProblemPrerequisiteType) {
15
+ ContestProblemPrerequisiteType["INDIVIDUALLY"] = "INDIVIDUALLY";
16
+ ContestProblemPrerequisiteType["CONTEST"] = "CONTEST";
17
+ })(ContestProblemPrerequisiteType || (ContestProblemPrerequisiteType = {}));
18
+ export var ContestEventAction;
19
+ (function (ContestEventAction) {
20
+ ContestEventAction["DATA_UPDATE"] = "DATA_UPDATE";
21
+ ContestEventAction["SCOREBOARD_RECALCULATE"] = "SCOREBOARD_RECALCULATE";
22
+ ContestEventAction["SCOREBOARD_UNLOCK"] = "SCOREBOARD_UNLOCK";
23
+ ContestEventAction["SCOREBOARD_LOCK"] = "SCOREBOARD_LOCK";
24
+ ContestEventAction["ENABLE_UPSOLVING"] = "ENABLE_UPSOLVING";
25
+ ContestEventAction["DISABLE_UPSOLVING"] = "DISABLE_UPSOLVING";
26
+ ContestEventAction["PARTICIPANT_JOIN"] = "PARTICIPANT_JOIN";
27
+ })(ContestEventAction || (ContestEventAction = {}));
@@ -1,4 +1,4 @@
1
- import { EntityMembers, EntityState } from './entity';
1
+ import { EntityMembers, EntityState } from './entity.js';
2
2
  export interface CourseBaseDocument {
3
3
  key: string;
4
4
  title: string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,50 @@
1
+ export var EntityMembersRank;
2
+ (function (EntityMembersRank) {
3
+ EntityMembersRank["NONE"] = "NONE";
4
+ EntityMembersRank["CLOSE"] = "CLOSE";
5
+ EntityMembersRank["OPEN"] = "OPEN";
6
+ })(EntityMembersRank || (EntityMembersRank = {}));
7
+ export var EntityState;
8
+ (function (EntityState) {
9
+ EntityState["RELEASED"] = "RELEASED";
10
+ EntityState["ARCHIVED"] = "ARCHIVED";
11
+ })(EntityState || (EntityState = {}));
12
+ export var EntityCollection;
13
+ (function (EntityCollection) {
14
+ EntityCollection["ORGANIZATION"] = "ORGANIZATION";
15
+ EntityCollection["PROBLEM"] = "PROBLEM";
16
+ EntityCollection["CONTEST"] = "CONTEST";
17
+ EntityCollection["JUDGE"] = "JUDGE";
18
+ EntityCollection["USER"] = "USER";
19
+ EntityCollection["SUBMISSION"] = "SUBMISSION";
20
+ })(EntityCollection || (EntityCollection = {}));
21
+ export var CollectionKey;
22
+ (function (CollectionKey) {
23
+ CollectionKey["ORGANIZATION"] = "C";
24
+ CollectionKey["USER"] = "U";
25
+ CollectionKey["PROBLEM"] = "P";
26
+ CollectionKey["CLASS"] = "K";
27
+ CollectionKey["CLASS_ASSIGNMENT"] = "KA";
28
+ CollectionKey["CONTEST"] = "T";
29
+ CollectionKey["SCOREBOARD"] = "B";
30
+ CollectionKey["SCOREBOARD_EVENTS"] = "BE";
31
+ CollectionKey["COURSE"] = "R";
32
+ CollectionKey["FILE"] = "F";
33
+ CollectionKey["GROUP"] = "G";
34
+ CollectionKey["JUDGE"] = "J";
35
+ CollectionKey["WORKSHEET"] = "W";
36
+ CollectionKey["WORKSHEET_SUBMISSIONS"] = "WS";
37
+ CollectionKey["SUBMIT"] = "S";
38
+ CollectionKey["LOCALE"] = "L";
39
+ CollectionKey["COMMENT"] = "M";
40
+ CollectionKey["EXCALIDRAW"] = "E";
41
+ CollectionKey["MARKDOWN"] = "MD";
42
+ CollectionKey["DOCUMENT_TEMPLATE"] = "DT";
43
+ CollectionKey["MERMAID"] = "MM";
44
+ })(CollectionKey || (CollectionKey = {}));
45
+ export var LogOperation;
46
+ (function (LogOperation) {
47
+ LogOperation["REMOVE"] = "REMOVE";
48
+ LogOperation["ADD"] = "ADD";
49
+ LogOperation["UPDATE"] = "UPDATE";
50
+ })(LogOperation || (LogOperation = {}));
@@ -1,4 +1,4 @@
1
- import { EntityMembers } from './entity';
1
+ import { EntityMembers } from './entity.js';
2
2
  export interface ExcalidrawBaseDocument {
3
3
  key: string;
4
4
  name: string;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
- import { EntityState } from './entity';
2
- import { Role } from './users';
1
+ import { EntityState } from './entity.js';
2
+ import { Role } from './users.js';
3
3
  export type FileRole = Role.RESTRICTED | Role.GUEST | Role.REGULAR | Role.MASTER | Role.ADMIN | Role.SUPER_ADMIN;
4
4
  export declare enum FileMemberRole {
5
5
  VIEWER = "VIEWER",
@@ -0,0 +1,19 @@
1
+ import { CollectionKey } from './entity.js';
2
+ export var FileMemberRole;
3
+ (function (FileMemberRole) {
4
+ FileMemberRole["VIEWER"] = "VIEWER";
5
+ FileMemberRole["EDITOR"] = "EDITOR";
6
+ })(FileMemberRole || (FileMemberRole = {}));
7
+ export var FileType;
8
+ (function (FileType) {
9
+ FileType["FOLDER"] = "FOLDER";
10
+ FileType["FILE"] = "FILE";
11
+ })(FileType || (FileType = {}));
12
+ export var FilesJukiPub;
13
+ (function (FilesJukiPub) {
14
+ FilesJukiPub["SHARED"] = "shared";
15
+ FilesJukiPub["SHARED_EXCALIDRAW"] = "shared/E";
16
+ FilesJukiPub["TEMP"] = "temp";
17
+ FilesJukiPub["PROBLEMS"] = "problems";
18
+ FilesJukiPub["CONTESTS"] = "contests";
19
+ })(FilesJukiPub || (FilesJukiPub = {}));
@@ -1,4 +1,4 @@
1
- import { EntityMembers, EntityState } from './entity';
1
+ import { EntityMembers, EntityState } from './entity.js';
2
2
  export declare enum GroupType {
3
3
  CLASS = "CLASS",
4
4
  TEAM = "TEAM"
@@ -0,0 +1,5 @@
1
+ export var GroupType;
2
+ (function (GroupType) {
3
+ GroupType["CLASS"] = "CLASS";
4
+ GroupType["TEAM"] = "TEAM";
5
+ })(GroupType || (GroupType = {}));
@@ -1,4 +1,27 @@
1
- export * from './constants';
2
- export * from './dto';
3
- export * from './helpers';
4
- export * from './types';
1
+ export * from './account.js';
2
+ export * from './class.js';
3
+ export * from './comments.js';
4
+ export * from './commons.js';
5
+ export * from './organization.js';
6
+ export * from './contest.js';
7
+ export * from './course.js';
8
+ export * from './entity.js';
9
+ export * from './excalidraw.js';
10
+ export * from './file.js';
11
+ export * from './group.js';
12
+ export * from './judge.js';
13
+ export * from './markdown.js';
14
+ export * from './mermaid.js';
15
+ export * from './notification.js';
16
+ export * from './prisma.js';
17
+ export * from './problems.js';
18
+ export * from './scoreboard.js';
19
+ export * from './services.js';
20
+ export * from './sheet.js';
21
+ export * from './socket.js';
22
+ export * from './submission.js';
23
+ export * from './system.js';
24
+ export * from './teams.js';
25
+ export * from './users.js';
26
+ export * from './virtual-user.js';
27
+ export * from './worksheet.js';
@@ -0,0 +1,27 @@
1
+ export * from './account.js';
2
+ export * from './class.js';
3
+ export * from './comments.js';
4
+ export * from './commons.js';
5
+ export * from './organization.js';
6
+ export * from './contest.js';
7
+ export * from './course.js';
8
+ export * from './entity.js';
9
+ export * from './excalidraw.js';
10
+ export * from './file.js';
11
+ export * from './group.js';
12
+ export * from './judge.js';
13
+ export * from './markdown.js';
14
+ export * from './mermaid.js';
15
+ export * from './notification.js';
16
+ export * from './prisma.js';
17
+ export * from './problems.js';
18
+ export * from './scoreboard.js';
19
+ export * from './services.js';
20
+ export * from './sheet.js';
21
+ export * from './socket.js';
22
+ export * from './submission.js';
23
+ export * from './system.js';
24
+ export * from './teams.js';
25
+ export * from './users.js';
26
+ export * from './virtual-user.js';
27
+ export * from './worksheet.js';
@@ -1,5 +1,5 @@
1
- import { CodeLanguage } from './commons';
2
- import { DataLog } from './submission';
1
+ import { CodeLanguage } from './commons.js';
2
+ import { DataLog } from './submission.js';
3
3
  export type JudgeLanguage = {
4
4
  value: string;
5
5
  label: string;
@@ -0,0 +1,49 @@
1
+ export var Judge;
2
+ (function (Judge) {
3
+ Judge["JUKI_JUDGE"] = "JUKI_JUDGE";
4
+ Judge["CODEFORCES"] = "CODEFORCES";
5
+ Judge["CODEFORCES_GYM"] = "CODEFORCES_GYM";
6
+ Judge["JV_UMSA"] = "JV_UMSA";
7
+ Judge["UVA_ONLINE_JUDGE"] = "UVA_ONLINE_JUDGE";
8
+ Judge["AT_CODER"] = "AT_CODER";
9
+ Judge["CODECHEF"] = "CODECHEF";
10
+ Judge["TOPCODER"] = "TOPCODER";
11
+ Judge["LEETCODE"] = "LEETCODE";
12
+ })(Judge || (Judge = {}));
13
+ export var ProblemVerdict;
14
+ (function (ProblemVerdict) {
15
+ ProblemVerdict["NONE"] = "NONE";
16
+ ProblemVerdict["PENDING"] = "PENDING";
17
+ ProblemVerdict["HIDDEN"] = "HIDDEN";
18
+ ProblemVerdict["CE"] = "CE";
19
+ ProblemVerdict["RE"] = "RE";
20
+ ProblemVerdict["TLE"] = "TLE";
21
+ ProblemVerdict["MLE"] = "MLE";
22
+ ProblemVerdict["WA"] = "WA";
23
+ ProblemVerdict["PE"] = "PE";
24
+ ProblemVerdict["PA"] = "PA";
25
+ ProblemVerdict["AC"] = "AC";
26
+ })(ProblemVerdict || (ProblemVerdict = {}));
27
+ export var SubmissionRunStatus;
28
+ (function (SubmissionRunStatus) {
29
+ SubmissionRunStatus["NONE"] = "NONE";
30
+ SubmissionRunStatus["RECEIVED"] = "RECEIVED";
31
+ SubmissionRunStatus["COMPILING"] = "COMPILING";
32
+ SubmissionRunStatus["COMPILED"] = "COMPILED";
33
+ SubmissionRunStatus["COMPILATION_ERROR"] = "COMPILATION_ERROR";
34
+ SubmissionRunStatus["FETCHING_TEST_CASES"] = "FETCHING_TEST_CASES";
35
+ SubmissionRunStatus["RUNNING_TEST_CASE"] = "RUNNING_TEST_CASE";
36
+ SubmissionRunStatus["RUNNING_TEST_CASES"] = "RUNNING_TEST_CASES";
37
+ SubmissionRunStatus["RUNNING_SAMPLE_TEST_CASES"] = "RUNNING_SAMPLE_TEST_CASES";
38
+ SubmissionRunStatus["EXECUTED_TEST_CASE"] = "EXECUTED_TEST_CASE";
39
+ SubmissionRunStatus["FAILED_TEST_CASE"] = "FAILED_TEST_CASE";
40
+ SubmissionRunStatus["JUDGING_TEST_CASE"] = "JUDGING_TEST_CASE";
41
+ SubmissionRunStatus["GRADING"] = "GRADING";
42
+ SubmissionRunStatus["FAILED"] = "FAILED";
43
+ SubmissionRunStatus["COMPLETED"] = "COMPLETED";
44
+ })(SubmissionRunStatus || (SubmissionRunStatus = {}));
45
+ export var RunnerType;
46
+ (function (RunnerType) {
47
+ RunnerType["HIGH_PERFORMANCE"] = "HIGH_PERFORMANCE";
48
+ RunnerType["LOW_PERFORMANCE"] = "LOW_PERFORMANCE";
49
+ })(RunnerType || (RunnerType = {}));
@@ -1,4 +1,4 @@
1
- import { CodeEditorFiles, CodeLanguage, EntityMembers } from '../types';
1
+ import { CodeEditorFiles, CodeLanguage, EntityMembers } from '../types/index.js';
2
2
  export interface MarkdownBaseDocument {
3
3
  key: string;
4
4
  name: string;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
- import { CodeEditorFiles, CodeLanguage, EntityMembers } from '../types';
1
+ import { CodeEditorFiles, CodeLanguage, EntityMembers } from '../types/index.js';
2
2
  export interface MermaidBaseDocument {
3
3
  key: string;
4
4
  name: string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ export var NotificationType;
2
+ (function (NotificationType) {
3
+ NotificationType["SUCCESS"] = "success";
4
+ NotificationType["INFO"] = "info";
5
+ NotificationType["WARNING"] = "warning";
6
+ NotificationType["ERROR"] = "error";
7
+ NotificationType["QUIET"] = "quiet";
8
+ })(NotificationType || (NotificationType = {}));