@juki-team/commons 0.1.32 → 0.1.41

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 (254) hide show
  1. package/dist/cjs/index.cjs +3567 -0
  2. package/dist/esm/index.js +3347 -0
  3. package/dist/{constants → types/constants}/commons.d.ts +8 -8
  4. package/dist/{constants → types/constants}/company.d.ts +3 -3
  5. package/dist/{constants → types/constants}/contest.d.ts +3 -3
  6. package/dist/{constants → types/constants}/course.d.ts +2 -2
  7. package/dist/{constants → types/constants}/entity.d.ts +1 -1
  8. package/dist/{constants → types/constants}/file.d.ts +5 -6
  9. package/dist/types/constants/index.d.ts +18 -0
  10. package/dist/{constants → types/constants}/judge.d.ts +9 -11
  11. package/dist/{constants → types/constants}/problem.d.ts +8 -9
  12. package/dist/types/constants/services.d.ts +8 -0
  13. package/dist/{constants → types/constants}/system.d.ts +2 -2
  14. package/dist/{constants → types/constants}/teams.d.ts +3 -4
  15. package/dist/types/constants/user.d.ts +16 -0
  16. package/dist/{constants → types/constants}/websocket.d.ts +1 -1
  17. package/dist/{constants → types/constants}/worksheet.d.ts +2 -2
  18. package/dist/{dto → types/dto}/class.d.ts +4 -4
  19. package/dist/{dto → types/dto}/code.d.ts +1 -1
  20. package/dist/{dto → types/dto}/comments.d.ts +3 -3
  21. package/dist/types/dto/company.d.ts +67 -0
  22. package/dist/{dto → types/dto}/contest.d.ts +8 -9
  23. package/dist/{dto → types/dto}/course.d.ts +5 -5
  24. package/dist/{dto → types/dto}/entity.d.ts +3 -3
  25. package/dist/{dto → types/dto}/excalidraw.d.ts +4 -4
  26. package/dist/{dto → types/dto}/file.d.ts +2 -2
  27. package/dist/types/dto/index.d.ts +25 -0
  28. package/dist/{dto → types/dto}/judge.d.ts +1 -1
  29. package/dist/{dto → types/dto}/markdown.d.ts +4 -4
  30. package/dist/{dto → types/dto}/mermaid.d.ts +4 -4
  31. package/dist/{dto → types/dto}/problem.d.ts +4 -5
  32. package/dist/{dto → types/dto}/scoreboard.d.ts +1 -1
  33. package/dist/{dto → types/dto}/session.d.ts +2 -2
  34. package/dist/{dto → types/dto}/socket.d.ts +7 -8
  35. package/dist/{dto → types/dto}/statistics.d.ts +2 -2
  36. package/dist/{dto → types/dto}/submission.d.ts +4 -5
  37. package/dist/{dto → types/dto}/system.d.ts +18 -18
  38. package/dist/{dto → types/dto}/user.d.ts +14 -14
  39. package/dist/{dto → types/dto}/virtual-user.d.ts +1 -2
  40. package/dist/{dto → types/dto}/worksheet-submissions.d.ts +4 -4
  41. package/dist/{dto → types/dto}/worksheet.d.ts +4 -4
  42. package/dist/{helpers → types/helpers}/class.d.ts +1 -1
  43. package/dist/{helpers → types/helpers}/commons.d.ts +11 -9
  44. package/dist/{helpers → types/helpers}/contest.d.ts +1 -1
  45. package/dist/{helpers → types/helpers}/document.d.ts +2 -2
  46. package/dist/types/helpers/index.d.ts +14 -0
  47. package/dist/types/helpers/interval.d.ts +2 -0
  48. package/dist/{helpers → types/helpers}/judging.d.ts +2 -3
  49. package/dist/types/helpers/object.d.ts +1 -0
  50. package/dist/types/helpers/responses.d.ts +8 -0
  51. package/dist/types/helpers/socket.d.ts +45 -0
  52. package/dist/{helpers → types/helpers}/time.d.ts +1 -1
  53. package/dist/{helpers → types/helpers}/user.d.ts +1 -1
  54. package/dist/types/helpers/worksheet.d.ts +10 -0
  55. package/dist/types/index.d.ts +5 -23
  56. package/dist/{prototypes → types/prototypes}/Error.d.ts +3 -3
  57. package/dist/types/prototypes/Number.d.ts +7 -0
  58. package/dist/types/prototypes/index.d.ts +3 -0
  59. package/dist/types/{class.d.ts → types/class.d.ts} +2 -2
  60. package/dist/types/{commons.d.ts → types/commons.d.ts} +3 -3
  61. package/dist/types/types/company.d.ts +29 -0
  62. package/dist/types/{contest.d.ts → types/contest.d.ts} +26 -9
  63. package/dist/types/{course.d.ts → types/course.d.ts} +1 -1
  64. package/dist/types/{entity.d.ts → types/entity.d.ts} +4 -4
  65. package/dist/types/{excalidraw.d.ts → types/excalidraw.d.ts} +3 -3
  66. package/dist/types/{file.d.ts → types/file.d.ts} +9 -4
  67. package/dist/types/{group.d.ts → types/group.d.ts} +5 -2
  68. package/dist/types/types/index.d.ts +25 -0
  69. package/dist/types/{judge.d.ts → types/judge.d.ts} +32 -3
  70. package/dist/types/{markdown.d.ts → types/markdown.d.ts} +1 -1
  71. package/dist/types/{mermaid.d.ts → types/mermaid.d.ts} +1 -1
  72. package/dist/types/types/prisma.d.ts +284 -0
  73. package/dist/types/{problems.d.ts → types/problems.d.ts} +13 -4
  74. package/dist/types/types/services.d.ts +213 -0
  75. package/dist/types/{sheet.d.ts → types/sheet.d.ts} +2 -3
  76. package/dist/types/{socket.d.ts → types/socket.d.ts} +3 -3
  77. package/dist/types/{teams.d.ts → types/teams.d.ts} +2 -25
  78. package/dist/types/{users.d.ts → types/users.d.ts} +4 -10
  79. package/dist/types/types/virtual-user.d.ts +7 -0
  80. package/dist/types/{worksheet.d.ts → types/worksheet.d.ts} +3 -3
  81. package/package.json +27 -22
  82. package/biome.shared.json +0 -102
  83. package/dist/constants/commons.js +0 -658
  84. package/dist/constants/company.js +0 -24
  85. package/dist/constants/contest.js +0 -29
  86. package/dist/constants/course.js +0 -12
  87. package/dist/constants/date.js +0 -23
  88. package/dist/constants/email.js +0 -34
  89. package/dist/constants/entity.js +0 -18
  90. package/dist/constants/file.js +0 -46
  91. package/dist/constants/index.d.ts +0 -18
  92. package/dist/constants/index.js +0 -18
  93. package/dist/constants/judge.js +0 -221
  94. package/dist/constants/problem.js +0 -72
  95. package/dist/constants/routing.js +0 -7
  96. package/dist/constants/services.d.ts +0 -5
  97. package/dist/constants/services.js +0 -131
  98. package/dist/constants/system.js +0 -9
  99. package/dist/constants/teams.js +0 -18
  100. package/dist/constants/time.js +0 -9
  101. package/dist/constants/user.d.ts +0 -10
  102. package/dist/constants/user.js +0 -35
  103. package/dist/constants/websocket.js +0 -5
  104. package/dist/constants/worksheet.js +0 -66
  105. package/dist/dto/class.js +0 -1
  106. package/dist/dto/code.js +0 -1
  107. package/dist/dto/comments.js +0 -1
  108. package/dist/dto/contest.js +0 -7
  109. package/dist/dto/course.js +0 -1
  110. package/dist/dto/entity.js +0 -5
  111. package/dist/dto/excalidraw.js +0 -1
  112. package/dist/dto/file.js +0 -1
  113. package/dist/dto/image.js +0 -1
  114. package/dist/dto/index.d.ts +0 -24
  115. package/dist/dto/index.js +0 -24
  116. package/dist/dto/judge.js +0 -1
  117. package/dist/dto/markdown.js +0 -1
  118. package/dist/dto/mermaid.js +0 -1
  119. package/dist/dto/organization.d.ts +0 -102
  120. package/dist/dto/organization.js +0 -1
  121. package/dist/dto/problem.js +0 -1
  122. package/dist/dto/scoreboard.js +0 -1
  123. package/dist/dto/session.js +0 -1
  124. package/dist/dto/socket.js +0 -1
  125. package/dist/dto/statistics.js +0 -1
  126. package/dist/dto/submission.js +0 -1
  127. package/dist/dto/system.js +0 -1
  128. package/dist/dto/url.js +0 -1
  129. package/dist/dto/user.js +0 -1
  130. package/dist/dto/virtual-user.js +0 -1
  131. package/dist/dto/worksheet-submissions.js +0 -1
  132. package/dist/dto/worksheet.js +0 -1
  133. package/dist/helpers/class.js +0 -10
  134. package/dist/helpers/comments.js +0 -4
  135. package/dist/helpers/commons.js +0 -191
  136. package/dist/helpers/contest.js +0 -21
  137. package/dist/helpers/document.js +0 -38
  138. package/dist/helpers/file.js +0 -4
  139. package/dist/helpers/index.d.ts +0 -14
  140. package/dist/helpers/index.js +0 -14
  141. package/dist/helpers/interval.d.ts +0 -2
  142. package/dist/helpers/interval.js +0 -22
  143. package/dist/helpers/judging.js +0 -107
  144. package/dist/helpers/object.d.ts +0 -1
  145. package/dist/helpers/object.js +0 -32
  146. package/dist/helpers/responses.d.ts +0 -8
  147. package/dist/helpers/responses.js +0 -78
  148. package/dist/helpers/socket.d.ts +0 -45
  149. package/dist/helpers/socket.js +0 -238
  150. package/dist/helpers/time.js +0 -101
  151. package/dist/helpers/user.js +0 -14
  152. package/dist/helpers/worksheet.d.ts +0 -10
  153. package/dist/helpers/worksheet.js +0 -131
  154. package/dist/index.d.ts +0 -6
  155. package/dist/index.js +0 -6
  156. package/dist/prisma/enums/AssignmentClassType.d.ts +0 -7
  157. package/dist/prisma/enums/AssignmentClassType.js +0 -6
  158. package/dist/prisma/enums/ContestEventAction.d.ts +0 -10
  159. package/dist/prisma/enums/ContestEventAction.js +0 -9
  160. package/dist/prisma/enums/ContestProblemPrerequisiteType.d.ts +0 -5
  161. package/dist/prisma/enums/ContestProblemPrerequisiteType.js +0 -4
  162. package/dist/prisma/enums/ContestRole.d.ts +0 -11
  163. package/dist/prisma/enums/ContestRole.js +0 -10
  164. package/dist/prisma/enums/ContestStatus.d.ts +0 -6
  165. package/dist/prisma/enums/ContestStatus.js +0 -5
  166. package/dist/prisma/enums/CourseRole.d.ts +0 -12
  167. package/dist/prisma/enums/CourseRole.js +0 -11
  168. package/dist/prisma/enums/EntityObjectType.d.ts +0 -13
  169. package/dist/prisma/enums/EntityObjectType.js +0 -12
  170. package/dist/prisma/enums/EntityRole.d.ts +0 -8
  171. package/dist/prisma/enums/EntityRole.js +0 -7
  172. package/dist/prisma/enums/EntitySubjectType.d.ts +0 -7
  173. package/dist/prisma/enums/EntitySubjectType.js +0 -6
  174. package/dist/prisma/enums/FileRole.d.ts +0 -9
  175. package/dist/prisma/enums/FileRole.js +0 -8
  176. package/dist/prisma/enums/FileType.d.ts +0 -5
  177. package/dist/prisma/enums/FileType.js +0 -4
  178. package/dist/prisma/enums/GroupType.d.ts +0 -5
  179. package/dist/prisma/enums/GroupType.js +0 -4
  180. package/dist/prisma/enums/JudgeType.d.ts +0 -12
  181. package/dist/prisma/enums/JudgeType.js +0 -11
  182. package/dist/prisma/enums/OrganizationPlan.d.ts +0 -7
  183. package/dist/prisma/enums/OrganizationPlan.js +0 -6
  184. package/dist/prisma/enums/ProblemRole.d.ts +0 -11
  185. package/dist/prisma/enums/ProblemRole.js +0 -10
  186. package/dist/prisma/enums/ProblemScoringMode.d.ts +0 -6
  187. package/dist/prisma/enums/ProblemScoringMode.js +0 -5
  188. package/dist/prisma/enums/ProblemType.d.ts +0 -6
  189. package/dist/prisma/enums/ProblemType.js +0 -5
  190. package/dist/prisma/enums/ProblemVerdict.d.ts +0 -14
  191. package/dist/prisma/enums/ProblemVerdict.js +0 -13
  192. package/dist/prisma/enums/ShareLinkVisibility.d.ts +0 -5
  193. package/dist/prisma/enums/ShareLinkVisibility.js +0 -4
  194. package/dist/prisma/enums/SubmissionRunStatus.d.ts +0 -18
  195. package/dist/prisma/enums/SubmissionRunStatus.js +0 -17
  196. package/dist/prisma/enums/SystemRole.d.ts +0 -9
  197. package/dist/prisma/enums/SystemRole.js +0 -8
  198. package/dist/prisma/enums/TeamRole.d.ts +0 -9
  199. package/dist/prisma/enums/TeamRole.js +0 -8
  200. package/dist/prisma/enums/TelemetryType.d.ts +0 -9
  201. package/dist/prisma/enums/TelemetryType.js +0 -8
  202. package/dist/prisma/enums/UserRole.d.ts +0 -10
  203. package/dist/prisma/enums/UserRole.js +0 -9
  204. package/dist/prisma/enums/WorkingIn.d.ts +0 -8
  205. package/dist/prisma/enums/WorkingIn.js +0 -7
  206. package/dist/prisma/enums/WorksheetContentType.d.ts +0 -10
  207. package/dist/prisma/enums/WorksheetContentType.js +0 -9
  208. package/dist/prisma/enums/index.d.ts +0 -26
  209. package/dist/prisma/enums/index.js +0 -26
  210. package/dist/prototypes/Date.js +0 -218
  211. package/dist/prototypes/Error.js +0 -17
  212. package/dist/prototypes/Number.d.ts +0 -7
  213. package/dist/prototypes/Number.js +0 -8
  214. package/dist/prototypes/index.d.ts +0 -3
  215. package/dist/prototypes/index.js +0 -3
  216. package/dist/types/account.js +0 -10
  217. package/dist/types/class.js +0 -7
  218. package/dist/types/comments.js +0 -1
  219. package/dist/types/commons.js +0 -69
  220. package/dist/types/company.d.ts +0 -6
  221. package/dist/types/company.js +0 -7
  222. package/dist/types/contest.js +0 -6
  223. package/dist/types/course.js +0 -1
  224. package/dist/types/entity.js +0 -50
  225. package/dist/types/excalidraw.js +0 -1
  226. package/dist/types/file.js +0 -13
  227. package/dist/types/group.js +0 -1
  228. package/dist/types/index.js +0 -23
  229. package/dist/types/judge.js +0 -17
  230. package/dist/types/markdown.js +0 -1
  231. package/dist/types/mermaid.js +0 -1
  232. package/dist/types/notification.js +0 -8
  233. package/dist/types/problems.js +0 -16
  234. package/dist/types/services.d.ts +0 -214
  235. package/dist/types/services.js +0 -147
  236. package/dist/types/sheet.js +0 -16
  237. package/dist/types/socket.js +0 -49
  238. package/dist/types/submission.js +0 -1
  239. package/dist/types/teams.js +0 -28
  240. package/dist/types/users.js +0 -33
  241. package/dist/types/worksheet.js +0 -11
  242. /package/dist/{constants → types/constants}/date.d.ts +0 -0
  243. /package/dist/{constants → types/constants}/email.d.ts +0 -0
  244. /package/dist/{constants → types/constants}/routing.d.ts +0 -0
  245. /package/dist/{constants → types/constants}/time.d.ts +0 -0
  246. /package/dist/{dto → types/dto}/image.d.ts +0 -0
  247. /package/dist/{dto → types/dto}/url.d.ts +0 -0
  248. /package/dist/{helpers → types/helpers}/comments.d.ts +0 -0
  249. /package/dist/{helpers → types/helpers}/file.d.ts +0 -0
  250. /package/dist/{prototypes → types/prototypes}/Date.d.ts +0 -0
  251. /package/dist/types/{account.d.ts → types/account.d.ts} +0 -0
  252. /package/dist/types/{comments.d.ts → types/comments.d.ts} +0 -0
  253. /package/dist/types/{notification.d.ts → types/notification.d.ts} +0 -0
  254. /package/dist/types/{submission.d.ts → types/submission.d.ts} +0 -0
@@ -1,18 +0,0 @@
1
- export declare const SubmissionRunStatus: {
2
- readonly NONE: "NONE";
3
- readonly RECEIVED: "RECEIVED";
4
- readonly COMPILING: "COMPILING";
5
- readonly COMPILED: "COMPILED";
6
- readonly COMPILATION_ERROR: "COMPILATION_ERROR";
7
- readonly FETCHING_TEST_CASES: "FETCHING_TEST_CASES";
8
- readonly RUNNING_TEST_CASE: "RUNNING_TEST_CASE";
9
- readonly RUNNING_TEST_CASES: "RUNNING_TEST_CASES";
10
- readonly RUNNING_SAMPLE_TEST_CASES: "RUNNING_SAMPLE_TEST_CASES";
11
- readonly EXECUTED_TEST_CASE: "EXECUTED_TEST_CASE";
12
- readonly FAILED_TEST_CASE: "FAILED_TEST_CASE";
13
- readonly JUDGING_TEST_CASE: "JUDGING_TEST_CASE";
14
- readonly GRADING: "GRADING";
15
- readonly FAILED: "FAILED";
16
- readonly COMPLETED: "COMPLETED";
17
- };
18
- export type SubmissionRunStatus = (typeof SubmissionRunStatus)[keyof typeof SubmissionRunStatus];
@@ -1,17 +0,0 @@
1
- export const SubmissionRunStatus = {
2
- NONE: 'NONE',
3
- RECEIVED: 'RECEIVED',
4
- COMPILING: 'COMPILING',
5
- COMPILED: 'COMPILED',
6
- COMPILATION_ERROR: 'COMPILATION_ERROR',
7
- FETCHING_TEST_CASES: 'FETCHING_TEST_CASES',
8
- RUNNING_TEST_CASE: 'RUNNING_TEST_CASE',
9
- RUNNING_TEST_CASES: 'RUNNING_TEST_CASES',
10
- RUNNING_SAMPLE_TEST_CASES: 'RUNNING_SAMPLE_TEST_CASES',
11
- EXECUTED_TEST_CASE: 'EXECUTED_TEST_CASE',
12
- FAILED_TEST_CASE: 'FAILED_TEST_CASE',
13
- JUDGING_TEST_CASE: 'JUDGING_TEST_CASE',
14
- GRADING: 'GRADING',
15
- FAILED: 'FAILED',
16
- COMPLETED: 'COMPLETED',
17
- };
@@ -1,9 +0,0 @@
1
- export declare const SystemRole: {
2
- readonly GUEST: "GUEST";
3
- readonly REGULAR: "REGULAR";
4
- readonly MANAGER: "MANAGER";
5
- readonly MASTER: "MASTER";
6
- readonly ADMIN: "ADMIN";
7
- readonly SUPER_ADMIN: "SUPER_ADMIN";
8
- };
9
- export type SystemRole = (typeof SystemRole)[keyof typeof SystemRole];
@@ -1,8 +0,0 @@
1
- export const SystemRole = {
2
- GUEST: 'GUEST',
3
- REGULAR: 'REGULAR',
4
- MANAGER: 'MANAGER',
5
- MASTER: 'MASTER',
6
- ADMIN: 'ADMIN',
7
- SUPER_ADMIN: 'SUPER_ADMIN',
8
- };
@@ -1,9 +0,0 @@
1
- export declare const TeamRole: {
2
- readonly RESTRICTED: "RESTRICTED";
3
- readonly GUEST: "GUEST";
4
- readonly REGULAR: "REGULAR";
5
- readonly MANAGER: "MANAGER";
6
- readonly ADMIN: "ADMIN";
7
- readonly SUPER_ADMIN: "SUPER_ADMIN";
8
- };
9
- export type TeamRole = (typeof TeamRole)[keyof typeof TeamRole];
@@ -1,8 +0,0 @@
1
- export const TeamRole = {
2
- RESTRICTED: 'RESTRICTED',
3
- GUEST: 'GUEST',
4
- REGULAR: 'REGULAR',
5
- MANAGER: 'MANAGER',
6
- ADMIN: 'ADMIN',
7
- SUPER_ADMIN: 'SUPER_ADMIN',
8
- };
@@ -1,9 +0,0 @@
1
- export declare const TelemetryType: {
2
- readonly UI_ERROR: "UI_ERROR";
3
- readonly UI_INFO: "UI_INFO";
4
- readonly EC2: "EC2";
5
- readonly ECS_TASK: "ECS_TASK";
6
- readonly INSTANCES: "INSTANCES";
7
- readonly USER_SESSION: "USER_SESSION";
8
- };
9
- export type TelemetryType = (typeof TelemetryType)[keyof typeof TelemetryType];
@@ -1,8 +0,0 @@
1
- export const TelemetryType = {
2
- UI_ERROR: 'UI_ERROR',
3
- UI_INFO: 'UI_INFO',
4
- EC2: 'EC2',
5
- ECS_TASK: 'ECS_TASK',
6
- INSTANCES: 'INSTANCES',
7
- USER_SESSION: 'USER_SESSION', // company-id/user-id: { timestamp: number, href: string, uiId: string
8
- };
@@ -1,10 +0,0 @@
1
- export declare const UserRole: {
2
- readonly RESTRICTED: "RESTRICTED";
3
- readonly GUEST: "GUEST";
4
- readonly LIMITED: "LIMITED";
5
- readonly REGULAR: "REGULAR";
6
- readonly MANAGER: "MANAGER";
7
- readonly ADMIN: "ADMIN";
8
- readonly SUPER_ADMIN: "SUPER_ADMIN";
9
- };
10
- export type UserRole = (typeof UserRole)[keyof typeof UserRole];
@@ -1,9 +0,0 @@
1
- export const UserRole = {
2
- RESTRICTED: 'RESTRICTED',
3
- GUEST: 'GUEST',
4
- LIMITED: 'LIMITED',
5
- REGULAR: 'REGULAR',
6
- MANAGER: 'MANAGER',
7
- ADMIN: 'ADMIN',
8
- SUPER_ADMIN: 'SUPER_ADMIN',
9
- };
@@ -1,8 +0,0 @@
1
- export declare const WorkingIn: {
2
- readonly NOTHING: "NOTHING";
3
- readonly SEND_SUBMISSION: "SEND_SUBMISSION";
4
- readonly TRACKING_SUBMISSION: "TRACKING_SUBMISSION";
5
- readonly CRAWLING_LANGUAGES: "CRAWLING_LANGUAGES";
6
- readonly CRAWLING_PROBLEM_DATA: "CRAWLING_PROBLEM_DATA";
7
- };
8
- export type WorkingIn = (typeof WorkingIn)[keyof typeof WorkingIn];
@@ -1,7 +0,0 @@
1
- export const WorkingIn = {
2
- NOTHING: 'NOTHING',
3
- SEND_SUBMISSION: 'SEND_SUBMISSION',
4
- TRACKING_SUBMISSION: 'TRACKING_SUBMISSION',
5
- CRAWLING_LANGUAGES: 'CRAWLING_LANGUAGES',
6
- CRAWLING_PROBLEM_DATA: 'CRAWLING_PROBLEM_DATA',
7
- };
@@ -1,10 +0,0 @@
1
- export declare const WorksheetContentType: {
2
- readonly JK_MD: "JK_MD";
3
- readonly CODE_EDITOR: "CODE_EDITOR";
4
- readonly GRAPH: "GRAPH";
5
- readonly QUIZ_PROBLEM: "QUIZ_PROBLEM";
6
- readonly QUIZ_TEXT: "QUIZ_TEXT";
7
- readonly QUIZ_OPTIONS: "QUIZ_OPTIONS";
8
- readonly NEW_PAGE: "NEW_PAGE";
9
- };
10
- export type WorksheetContentType = (typeof WorksheetContentType)[keyof typeof WorksheetContentType];
@@ -1,9 +0,0 @@
1
- export const WorksheetContentType = {
2
- JK_MD: 'JK_MD',
3
- CODE_EDITOR: 'CODE_EDITOR',
4
- GRAPH: 'GRAPH',
5
- QUIZ_PROBLEM: 'QUIZ_PROBLEM',
6
- QUIZ_TEXT: 'QUIZ_TEXT',
7
- QUIZ_OPTIONS: 'QUIZ_OPTIONS',
8
- NEW_PAGE: 'NEW_PAGE',
9
- };
@@ -1,26 +0,0 @@
1
- export { AssignmentClassType } from './AssignmentClassType.js';
2
- export { ContestStatus } from './ContestStatus.js';
3
- export { ContestProblemPrerequisiteType } from './ContestProblemPrerequisiteType.js';
4
- export { ContestEventAction } from './ContestEventAction.js';
5
- export { EntityObjectType } from './EntityObjectType.js';
6
- export { EntitySubjectType } from './EntitySubjectType.js';
7
- export { EntityRole } from './EntityRole.js';
8
- export { ShareLinkVisibility } from './ShareLinkVisibility.js';
9
- export { FileType } from './FileType.js';
10
- export { GroupType } from './GroupType.js';
11
- export { JudgeType } from './JudgeType.js';
12
- export { OrganizationPlan } from './OrganizationPlan.js';
13
- export { ProblemType } from './ProblemType.js';
14
- export { ProblemScoringMode } from './ProblemScoringMode.js';
15
- export { ProblemVerdict } from './ProblemVerdict.js';
16
- export { SubmissionRunStatus } from './SubmissionRunStatus.js';
17
- export { TelemetryType } from './TelemetryType.js';
18
- export { UserRole } from './UserRole.js';
19
- export { SystemRole } from './SystemRole.js';
20
- export { ProblemRole } from './ProblemRole.js';
21
- export { ContestRole } from './ContestRole.js';
22
- export { TeamRole } from './TeamRole.js';
23
- export { CourseRole } from './CourseRole.js';
24
- export { FileRole } from './FileRole.js';
25
- export { WorkingIn } from './WorkingIn.js';
26
- export { WorksheetContentType } from './WorksheetContentType.js';
@@ -1,26 +0,0 @@
1
- export { AssignmentClassType } from './AssignmentClassType.js';
2
- export { ContestStatus } from './ContestStatus.js';
3
- export { ContestProblemPrerequisiteType } from './ContestProblemPrerequisiteType.js';
4
- export { ContestEventAction } from './ContestEventAction.js';
5
- export { EntityObjectType } from './EntityObjectType.js';
6
- export { EntitySubjectType } from './EntitySubjectType.js';
7
- export { EntityRole } from './EntityRole.js';
8
- export { ShareLinkVisibility } from './ShareLinkVisibility.js';
9
- export { FileType } from './FileType.js';
10
- export { GroupType } from './GroupType.js';
11
- export { JudgeType } from './JudgeType.js';
12
- export { OrganizationPlan } from './OrganizationPlan.js';
13
- export { ProblemType } from './ProblemType.js';
14
- export { ProblemScoringMode } from './ProblemScoringMode.js';
15
- export { ProblemVerdict } from './ProblemVerdict.js';
16
- export { SubmissionRunStatus } from './SubmissionRunStatus.js';
17
- export { TelemetryType } from './TelemetryType.js';
18
- export { UserRole } from './UserRole.js';
19
- export { SystemRole } from './SystemRole.js';
20
- export { ProblemRole } from './ProblemRole.js';
21
- export { ContestRole } from './ContestRole.js';
22
- export { TeamRole } from './TeamRole.js';
23
- export { CourseRole } from './CourseRole.js';
24
- export { FileRole } from './FileRole.js';
25
- export { WorkingIn } from './WorkingIn.js';
26
- export { WorksheetContentType } from './WorksheetContentType.js';
@@ -1,218 +0,0 @@
1
- /* eslint-disable no-extend-native */
2
- Date.prototype.changeYear = function (year) {
3
- const newDate = new Date(this);
4
- newDate.setFullYear(year);
5
- return newDate;
6
- };
7
- Date.prototype.changeMonth = function (monthIndex) {
8
- const newDate = new Date(this);
9
- newDate.setMonth(monthIndex);
10
- return newDate;
11
- };
12
- Date.prototype.changeDay = function (date) {
13
- const newDate = new Date(this);
14
- newDate.setDate(date);
15
- return newDate;
16
- };
17
- Date.prototype.changeHours = function (hours) {
18
- const newDate = new Date(this);
19
- newDate.setHours(hours);
20
- return newDate;
21
- };
22
- Date.prototype.changeMinutes = function (minutes) {
23
- const newDate = new Date(this);
24
- newDate.setMinutes(minutes);
25
- return newDate;
26
- };
27
- Date.prototype.changeSeconds = function (seconds) {
28
- const newDate = new Date(this);
29
- newDate.setSeconds(seconds);
30
- return newDate;
31
- };
32
- Date.prototype.changeMilliseconds = function (milliseconds) {
33
- const newDate = new Date(this);
34
- newDate.setMilliseconds(milliseconds);
35
- return newDate;
36
- };
37
- Date.prototype.decreaseYear = function (count = 1) {
38
- return this.changeYear(this.getFullYear() - count);
39
- };
40
- Date.prototype.increaseYear = function (count = 1) {
41
- return this.changeYear(this.getFullYear() + count);
42
- };
43
- Date.prototype.decreaseMonth = function () {
44
- const newDate = new Date(this);
45
- newDate.setMonth(newDate.getMonth() - 1);
46
- return newDate;
47
- };
48
- Date.prototype.increaseMonth = function () {
49
- const newDate = new Date(this);
50
- newDate.setMonth(newDate.getMonth() + 1);
51
- return newDate;
52
- };
53
- Date.prototype.increaseDay = function () {
54
- const newDate = new Date(this);
55
- newDate.setDate(newDate.getDate() + 1);
56
- return newDate;
57
- };
58
- Date.prototype.decreaseDay = function () {
59
- const newDate = new Date(this);
60
- newDate.setDate(newDate.getDate() - 1);
61
- return newDate;
62
- };
63
- Date.prototype.startOfYear = function () {
64
- const newDate = new Date(this);
65
- newDate.setMonth(0);
66
- return newDate.startOfMonth();
67
- };
68
- Date.prototype.endOfYear = function () {
69
- const nextMonth = this.increaseYear().startOfYear();
70
- return new Date(nextMonth.getTime() - 1);
71
- };
72
- Date.prototype.startOfMonth = function () {
73
- const newDate = new Date(this);
74
- newDate.setDate(1);
75
- return newDate.startOfDay();
76
- };
77
- Date.prototype.endOfMonth = function () {
78
- const nextMonth = this.increaseMonth().startOfMonth();
79
- return new Date(nextMonth.getTime() - 1);
80
- };
81
- Date.prototype.startOfWeek = function () {
82
- const newDate = new Date(this);
83
- while (newDate.getDay()) {
84
- newDate.setDate(newDate.getDate() - 1);
85
- }
86
- return newDate.startOfDay();
87
- };
88
- Date.prototype.endOfWeek = function () {
89
- const newDate = new Date(this);
90
- while (newDate.getDay() < 6) {
91
- newDate.setDate(newDate.getDate() - 1);
92
- }
93
- return newDate.endOfDay();
94
- };
95
- Date.prototype.startOfDay = function () {
96
- const newDate = new Date(this);
97
- newDate.setHours(0, 0, 0, 0);
98
- return newDate;
99
- };
100
- Date.prototype.endOfDay = function () {
101
- const newDate = new Date(this);
102
- newDate.setHours(23, 59, 59, 999);
103
- return newDate;
104
- };
105
- Date.prototype.startOfHour = function () {
106
- const newDate = new Date(this);
107
- newDate.setMinutes(0, 0, 0);
108
- return newDate;
109
- };
110
- Date.prototype.endOfHour = function () {
111
- const newDate = new Date(this);
112
- newDate.setMinutes(59, 59, 999);
113
- return newDate;
114
- };
115
- Date.prototype.startOfMinute = function () {
116
- const newDate = new Date(this);
117
- newDate.setSeconds(0, 0);
118
- return newDate;
119
- };
120
- Date.prototype.endOfMinute = function () {
121
- const newDate = new Date(this);
122
- newDate.setSeconds(59, 999);
123
- return newDate;
124
- };
125
- Date.prototype.startOfSecond = function () {
126
- const newDate = new Date(this);
127
- newDate.setMilliseconds(0);
128
- return newDate;
129
- };
130
- Date.prototype.endOfSecond = function () {
131
- const newDate = new Date(this);
132
- newDate.setMilliseconds(999);
133
- return newDate;
134
- };
135
- Date.prototype.isToday = function () {
136
- const today = new Date();
137
- return this.isSameDay(today);
138
- };
139
- Date.prototype.isEqual = function (date) {
140
- return this.getTime() === date.getTime();
141
- };
142
- Date.prototype.isSameYear = function (date) {
143
- return this.getFullYear() === date.getFullYear();
144
- };
145
- Date.prototype.isSameMonth = function (date) {
146
- return this.isSameYear(date) && this.getMonth() === date.getMonth();
147
- };
148
- Date.prototype.isSameDay = function (date) {
149
- return this.isSameMonth(date) && this.getDate() === date.getDate();
150
- };
151
- Date.prototype.isSameHour = function (date) {
152
- return this.isSameDay(date) && this.getHours() === date.getHours();
153
- };
154
- Date.prototype.isSameMinute = function (date) {
155
- return this.isSameHour(date) && this.getMinutes() === date.getMinutes();
156
- };
157
- Date.prototype.isSameSecond = function (date) {
158
- return this.isSameMinute(date) && this.getSeconds() === date.getSeconds();
159
- };
160
- Date.prototype.isSameMillisecond = function (date) {
161
- return this.isEqual(date);
162
- };
163
- Date.prototype.isValidDate = function () {
164
- return this instanceof Date && !Number.isNaN(this.getTime());
165
- };
166
- Date.prototype.isYearAfter = function (date) {
167
- return this.getFullYear() > date.getFullYear();
168
- };
169
- Date.prototype.isMonthAfter = function (date) {
170
- return this.isYearAfter(date) || (this.isSameYear(date) && this.getMonth() > date.getMonth());
171
- };
172
- Date.prototype.isDayAfter = function (date) {
173
- return this.isMonthAfter(date) || (this.isSameMonth(date) && this.getDate() > date.getDate());
174
- };
175
- Date.prototype.isHoursAfter = function (date) {
176
- return this.isDayAfter(date) || (this.isSameDay(date) && this.getHours() > date.getHours());
177
- };
178
- Date.prototype.isMinutesAfter = function (date) {
179
- return this.isHoursAfter(date) || (this.isSameHour(date) && this.getMinutes() > date.getMinutes());
180
- };
181
- Date.prototype.isSecondsAfter = function (date) {
182
- return this.isMinutesAfter(date) || (this.isSameMinute(date) && this.getSeconds() > date.getSeconds());
183
- };
184
- Date.prototype.isMillisecondsAfter = function (date) {
185
- return this.isSecondsAfter(date) || (this.isSameSecond(date) && this.getMilliseconds() > date.getMilliseconds());
186
- };
187
- Date.prototype.isAfter = function (date) {
188
- return this.getTime() > date.getTime();
189
- };
190
- Date.prototype.isYearBefore = function (date) {
191
- return this.getFullYear() < date.getFullYear();
192
- };
193
- Date.prototype.isMonthBefore = function (date) {
194
- return this.isYearBefore(date) || (this.isSameYear(date) && this.getMonth() < date.getMonth());
195
- };
196
- Date.prototype.isDayBefore = function (date) {
197
- return this.isMonthBefore(date) || (this.isSameMonth(date) && this.getDate() < date.getDate());
198
- };
199
- Date.prototype.isHoursBefore = function (date) {
200
- return this.isDayBefore(date) || (this.isSameDay(date) && this.getHours() < date.getHours());
201
- };
202
- Date.prototype.isMinutesBefore = function (date) {
203
- return this.isHoursBefore(date) || (this.isSameHour(date) && this.getMinutes() < date.getMinutes());
204
- };
205
- Date.prototype.isSecondsBefore = function (date) {
206
- return this.isMinutesBefore(date) || (this.isSameMinute(date) && this.getSeconds() < date.getSeconds());
207
- };
208
- Date.prototype.isMillisecondsBefore = function (date) {
209
- return this.isSecondsBefore(date) || (this.isSameSecond(date) && this.getMilliseconds() < date.getMilliseconds());
210
- };
211
- Date.prototype.isBefore = function (date) {
212
- return this.getTime() < date.getTime();
213
- };
214
- Date.prototype.isWithinInterval = function ({ start, end }, cmp = '[]') {
215
- return ((cmp.charAt(0) === '[' ? this.isEqual(start) || this.isAfter(start) : this.isAfter(start)) &&
216
- (cmp.charAt(1) === '[' ? this.isEqual(end) || this.isBefore(end) : this.isBefore(end)));
217
- };
218
- export {};
@@ -1,17 +0,0 @@
1
- import { getErrorMessage } from '../constants/services.js';
2
- export class JkError extends Error {
3
- code;
4
- data;
5
- constructor(code, custom) {
6
- const message = custom?.message || getErrorMessage(code);
7
- super(message);
8
- this.message = message;
9
- this.code = code;
10
- if (custom?.stack) {
11
- this.stack = custom.stack;
12
- }
13
- if (custom?.data) {
14
- this.data = custom.data;
15
- }
16
- }
17
- }
@@ -1,7 +0,0 @@
1
- declare global {
2
- interface Number {
3
- padStart(maxLength: number, fillString?: string): string;
4
- padEnd(maxLength: number, fillString?: string): string;
5
- }
6
- }
7
- export {};
@@ -1,8 +0,0 @@
1
- /* eslint-disable no-extend-native */
2
- Number.prototype.padStart = function (maxLength, fillString = '0') {
3
- return `${this}`.padStart(maxLength, fillString);
4
- };
5
- Number.prototype.padEnd = function (maxLength, fillString = '0') {
6
- return `${this}`.padEnd(maxLength, fillString);
7
- };
8
- export {};
@@ -1,3 +0,0 @@
1
- export * from './Date.js';
2
- export * from './Error.js';
3
- export * from './Number.js';
@@ -1,3 +0,0 @@
1
- export * from './Date.js';
2
- export * from './Error.js';
3
- export * from './Number.js';
@@ -1,10 +0,0 @@
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,7 +0,0 @@
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 = {}));
@@ -1 +0,0 @@
1
- export {};
@@ -1,69 +0,0 @@
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,6 +0,0 @@
1
- export declare enum OrganizationLogoType {
2
- HORIZONTAL_WHITE = "horizontal-white",
3
- HORIZONTAL_COLOR = "horizontal-color",
4
- VERTICAL_WHITE = "vertical-white",
5
- VERTICAL_COLOR = "vertical-color"
6
- }
@@ -1,7 +0,0 @@
1
- export var OrganizationLogoType;
2
- (function (OrganizationLogoType) {
3
- OrganizationLogoType["HORIZONTAL_WHITE"] = "horizontal-white";
4
- OrganizationLogoType["HORIZONTAL_COLOR"] = "horizontal-color";
5
- OrganizationLogoType["VERTICAL_WHITE"] = "vertical-white";
6
- OrganizationLogoType["VERTICAL_COLOR"] = "vertical-color";
7
- })(OrganizationLogoType || (OrganizationLogoType = {}));
@@ -1,6 +0,0 @@
1
- export var ContestTimeStatus;
2
- (function (ContestTimeStatus) {
3
- ContestTimeStatus["UPCOMING"] = "upcoming";
4
- ContestTimeStatus["LIVE"] = "live";
5
- ContestTimeStatus["PAST"] = "past";
6
- })(ContestTimeStatus || (ContestTimeStatus = {}));
@@ -1 +0,0 @@
1
- export {};
@@ -1,50 +0,0 @@
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["COMPANY"] = "COMPANY";
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["COMPANY"] = "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 +0,0 @@
1
- export {};