@euler-edu/schema 0.0.0-stage → 7.0.1-beta1

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 (129) hide show
  1. package/lib/.tsbuildinfo +1 -0
  2. package/lib/auths/index.d.ts +49 -0
  3. package/lib/auths/index.js +49 -0
  4. package/lib/auths/index.js.map +1 -0
  5. package/lib/configs/index.d.ts +2 -0
  6. package/lib/configs/index.js +19 -0
  7. package/lib/configs/index.js.map +1 -0
  8. package/lib/configs/oj-envConfig/index.d.ts +143 -0
  9. package/lib/configs/oj-envConfig/index.js +35 -0
  10. package/lib/configs/oj-envConfig/index.js.map +1 -0
  11. package/lib/configs/style/index.d.ts +53 -0
  12. package/lib/configs/style/index.js +46 -0
  13. package/lib/configs/style/index.js.map +1 -0
  14. package/lib/endpoints/hq-api/index.d.ts +37 -0
  15. package/lib/endpoints/hq-api/index.js +14 -0
  16. package/lib/endpoints/hq-api/index.js.map +1 -0
  17. package/lib/endpoints/hq-api/serviceUptime.atom.d.ts +12 -0
  18. package/lib/endpoints/hq-api/serviceUptime.atom.js +18 -0
  19. package/lib/endpoints/hq-api/serviceUptime.atom.js.map +1 -0
  20. package/lib/endpoints/hq-api/serviceUptime.endpoint.d.ts +23 -0
  21. package/lib/endpoints/hq-api/serviceUptime.endpoint.js +23 -0
  22. package/lib/endpoints/hq-api/serviceUptime.endpoint.js.map +1 -0
  23. package/lib/endpoints/index.d.ts +2622 -0
  24. package/lib/endpoints/index.js +12 -0
  25. package/lib/endpoints/index.js.map +1 -0
  26. package/lib/endpoints/oj-api/auth.atom.d.ts +10 -0
  27. package/lib/endpoints/oj-api/auth.atom.js +26 -0
  28. package/lib/endpoints/oj-api/auth.atom.js.map +1 -0
  29. package/lib/endpoints/oj-api/auth.endpoint.d.ts +105 -0
  30. package/lib/endpoints/oj-api/auth.endpoint.js +118 -0
  31. package/lib/endpoints/oj-api/auth.endpoint.js.map +1 -0
  32. package/lib/endpoints/oj-api/contest.atom.d.ts +23 -0
  33. package/lib/endpoints/oj-api/contest.atom.js +20 -0
  34. package/lib/endpoints/oj-api/contest.atom.js.map +1 -0
  35. package/lib/endpoints/oj-api/contest.endpoint.d.ts +53 -0
  36. package/lib/endpoints/oj-api/contest.endpoint.js +49 -0
  37. package/lib/endpoints/oj-api/contest.endpoint.js.map +1 -0
  38. package/lib/endpoints/oj-api/index.d.ts +2523 -0
  39. package/lib/endpoints/oj-api/index.js +58 -0
  40. package/lib/endpoints/oj-api/index.js.map +1 -0
  41. package/lib/endpoints/oj-api/mail.atom.d.ts +12 -0
  42. package/lib/endpoints/oj-api/mail.atom.js +14 -0
  43. package/lib/endpoints/oj-api/mail.atom.js.map +1 -0
  44. package/lib/endpoints/oj-api/mail.endpoint.d.ts +48 -0
  45. package/lib/endpoints/oj-api/mail.endpoint.js +51 -0
  46. package/lib/endpoints/oj-api/mail.endpoint.js.map +1 -0
  47. package/lib/endpoints/oj-api/problem.atom.d.ts +120 -0
  48. package/lib/endpoints/oj-api/problem.atom.js +164 -0
  49. package/lib/endpoints/oj-api/problem.atom.js.map +1 -0
  50. package/lib/endpoints/oj-api/problem.endpoint.d.ts +291 -0
  51. package/lib/endpoints/oj-api/problem.endpoint.js +199 -0
  52. package/lib/endpoints/oj-api/problem.endpoint.js.map +1 -0
  53. package/lib/endpoints/oj-api/rank.atom.d.ts +5 -0
  54. package/lib/endpoints/oj-api/rank.atom.js +9 -0
  55. package/lib/endpoints/oj-api/rank.atom.js.map +1 -0
  56. package/lib/endpoints/oj-api/rank.endpoint.d.ts +54 -0
  57. package/lib/endpoints/oj-api/rank.endpoint.js +59 -0
  58. package/lib/endpoints/oj-api/rank.endpoint.js.map +1 -0
  59. package/lib/endpoints/oj-api/record.atom.d.ts +31 -0
  60. package/lib/endpoints/oj-api/record.atom.js +12 -0
  61. package/lib/endpoints/oj-api/record.atom.js.map +1 -0
  62. package/lib/endpoints/oj-api/record.endpoint.d.ts +107 -0
  63. package/lib/endpoints/oj-api/record.endpoint.js +87 -0
  64. package/lib/endpoints/oj-api/record.endpoint.js.map +1 -0
  65. package/lib/endpoints/oj-api/run.atom.d.ts +29 -0
  66. package/lib/endpoints/oj-api/run.atom.js +22 -0
  67. package/lib/endpoints/oj-api/run.atom.js.map +1 -0
  68. package/lib/endpoints/oj-api/run.endpoint.d.ts +59 -0
  69. package/lib/endpoints/oj-api/run.endpoint.js +50 -0
  70. package/lib/endpoints/oj-api/run.endpoint.js.map +1 -0
  71. package/lib/endpoints/oj-api/scoringRequest.atom.d.ts +24 -0
  72. package/lib/endpoints/oj-api/scoringRequest.atom.js +21 -0
  73. package/lib/endpoints/oj-api/scoringRequest.atom.js.map +1 -0
  74. package/lib/endpoints/oj-api/scoringRequest.endpoint.d.ts +47 -0
  75. package/lib/endpoints/oj-api/scoringRequest.endpoint.js +37 -0
  76. package/lib/endpoints/oj-api/scoringRequest.endpoint.js.map +1 -0
  77. package/lib/endpoints/oj-api/scoringServer.atom.d.ts +10 -0
  78. package/lib/endpoints/oj-api/scoringServer.atom.js +18 -0
  79. package/lib/endpoints/oj-api/scoringServer.atom.js.map +1 -0
  80. package/lib/endpoints/oj-api/scoringServer.endpoint.d.ts +21 -0
  81. package/lib/endpoints/oj-api/scoringServer.endpoint.js +25 -0
  82. package/lib/endpoints/oj-api/scoringServer.endpoint.js.map +1 -0
  83. package/lib/endpoints/oj-api/source.atom.d.ts +10 -0
  84. package/lib/endpoints/oj-api/source.atom.js +22 -0
  85. package/lib/endpoints/oj-api/source.atom.js.map +1 -0
  86. package/lib/endpoints/oj-api/source.endpoint.d.ts +98 -0
  87. package/lib/endpoints/oj-api/source.endpoint.js +72 -0
  88. package/lib/endpoints/oj-api/source.endpoint.js.map +1 -0
  89. package/lib/endpoints/oj-api/submit.atom.d.ts +62 -0
  90. package/lib/endpoints/oj-api/submit.atom.js +40 -0
  91. package/lib/endpoints/oj-api/submit.atom.js.map +1 -0
  92. package/lib/endpoints/oj-api/submit.endpoint.d.ts +236 -0
  93. package/lib/endpoints/oj-api/submit.endpoint.js +162 -0
  94. package/lib/endpoints/oj-api/submit.endpoint.js.map +1 -0
  95. package/lib/endpoints/oj-api/user.atom.d.ts +220 -0
  96. package/lib/endpoints/oj-api/user.atom.js +74 -0
  97. package/lib/endpoints/oj-api/user.atom.js.map +1 -0
  98. package/lib/endpoints/oj-api/user.endpoint.d.ts +879 -0
  99. package/lib/endpoints/oj-api/user.endpoint.js +502 -0
  100. package/lib/endpoints/oj-api/user.endpoint.js.map +1 -0
  101. package/lib/endpoints/oj-archives/index.d.ts +51 -0
  102. package/lib/endpoints/oj-archives/index.js +47 -0
  103. package/lib/endpoints/oj-archives/index.js.map +1 -0
  104. package/lib/endpoints/oj-problemContents/index.d.ts +15 -0
  105. package/lib/endpoints/oj-problemContents/index.js +17 -0
  106. package/lib/endpoints/oj-problemContents/index.js.map +1 -0
  107. package/lib/index.d.ts +2 -0
  108. package/lib/index.js +6 -0
  109. package/lib/index.js.map +1 -0
  110. package/lib/queues/index.d.ts +12 -0
  111. package/lib/queues/index.js +11 -0
  112. package/lib/queues/index.js.map +1 -0
  113. package/lib/queues/oj-clientSocketEventQueue.d.ts +12 -0
  114. package/lib/queues/oj-clientSocketEventQueue.js +16 -0
  115. package/lib/queues/oj-clientSocketEventQueue.js.map +1 -0
  116. package/lib/sockets/index.d.ts +34 -0
  117. package/lib/sockets/index.js +13 -0
  118. package/lib/sockets/index.js.map +1 -0
  119. package/lib/sockets/oj-socket/index.d.ts +18 -0
  120. package/lib/sockets/oj-socket/index.js +21 -0
  121. package/lib/sockets/oj-socket/index.js.map +1 -0
  122. package/lib/sockets/oj-web/index.d.ts +18 -0
  123. package/lib/sockets/oj-web/index.js +21 -0
  124. package/lib/sockets/oj-web/index.js.map +1 -0
  125. package/lib/types/index.d.ts +28 -0
  126. package/lib/types/index.js +3 -0
  127. package/lib/types/index.js.map +1 -0
  128. package/package.json +29 -3
  129. package/README.md +0 -3
@@ -0,0 +1,12 @@
1
+ export declare const queues: {
2
+ ojClientSocketEventQueue: {
3
+ message: import("zod").ZodUnion<[import("zod").ZodObject<{
4
+ type: import("zod").ZodLiteral<"run">;
5
+ runId: import("zod").ZodString;
6
+ socketId: import("zod").ZodOptional<import("zod").ZodString>;
7
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
8
+ type: import("zod").ZodLiteral<"submit">;
9
+ submitId: import("zod").ZodString;
10
+ }, import("zod/v4/core").$strip>]>;
11
+ };
12
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.queues = void 0;
7
+ const oj_clientSocketEventQueue_1 = __importDefault(require("./oj-clientSocketEventQueue"));
8
+ exports.queues = {
9
+ ojClientSocketEventQueue: oj_clientSocketEventQueue_1.default,
10
+ };
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/queues/index.ts"],"names":[],"mappings":";;;;;;AAAA,4FAAmE;AAEtD,QAAA,MAAM,GAAG;IACpB,wBAAwB,EAAxB,mCAAwB;CACzB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ declare const _default: {
3
+ message: z.ZodUnion<[z.ZodObject<{
4
+ type: z.ZodLiteral<"run">;
5
+ runId: z.ZodString;
6
+ socketId: z.ZodOptional<z.ZodString>;
7
+ }, z.core.$strip>, z.ZodObject<{
8
+ type: z.ZodLiteral<"submit">;
9
+ submitId: z.ZodString;
10
+ }, z.core.$strip>]>;
11
+ };
12
+ export default _default;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const zod_1 = require("zod");
4
+ exports.default = {
5
+ message: zod_1.z
6
+ .object({
7
+ type: zod_1.z.literal('run'),
8
+ runId: zod_1.z.string().trim().min(1),
9
+ socketId: zod_1.z.string().trim().min(1).optional(),
10
+ })
11
+ .or(zod_1.z.object({
12
+ type: zod_1.z.literal('submit'),
13
+ submitId: zod_1.z.string().trim().min(1),
14
+ })),
15
+ };
16
+ //# sourceMappingURL=oj-clientSocketEventQueue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oj-clientSocketEventQueue.js","sourceRoot":"","sources":["../../src/queues/oj-clientSocketEventQueue.ts"],"names":[],"mappings":";;AAAA,6BAAwB;AAExB,kBAAe;IACb,OAAO,EAAE,OAAC;SACP,MAAM,CAAC;QACN,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,KAAK,CAAC;QACtB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC/B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;KAC9C,CAAC;SACD,EAAE,CACD,OAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;QACzB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KACnC,CAAC,CACH;CACJ,CAAC"}
@@ -0,0 +1,34 @@
1
+ export declare const socketMessages: {
2
+ ojSocket: {
3
+ readonly subscribeSubmit: {
4
+ readonly base: "oj-socket";
5
+ readonly key: "subscribeSubmit";
6
+ readonly body: import("zod").ZodObject<{
7
+ submitId: import("zod").ZodString;
8
+ }, import("zod/v4/core").$strip>;
9
+ };
10
+ readonly unsubscribeSubmit: {
11
+ readonly base: "oj-socket";
12
+ readonly key: "unsubscribeSubmit";
13
+ readonly body: import("zod").ZodObject<{
14
+ submitId: import("zod").ZodString;
15
+ }, import("zod/v4/core").$strip>;
16
+ };
17
+ };
18
+ ojWeb: {
19
+ readonly updateSubmit: {
20
+ readonly base: "oj-web";
21
+ readonly key: "updateSubmit";
22
+ readonly body: import("zod").ZodObject<{
23
+ submitId: import("zod").ZodString;
24
+ }, import("zod/v4/core").$strip>;
25
+ };
26
+ readonly updateRun: {
27
+ readonly base: "oj-web";
28
+ readonly key: "updateRun";
29
+ readonly body: import("zod").ZodObject<{
30
+ runId: import("zod").ZodString;
31
+ }, import("zod/v4/core").$strip>;
32
+ };
33
+ };
34
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.socketMessages = void 0;
7
+ const oj_socket_1 = __importDefault(require("./oj-socket"));
8
+ const oj_web_1 = __importDefault(require("./oj-web"));
9
+ exports.socketMessages = {
10
+ ojSocket: oj_socket_1.default,
11
+ ojWeb: oj_web_1.default,
12
+ };
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sockets/index.ts"],"names":[],"mappings":";;;;;;AAAA,4DAAmC;AACnC,sDAA6B;AAEhB,QAAA,cAAc,GAAG;IAC5B,QAAQ,EAAR,mBAAQ;IACR,KAAK,EAAL,gBAAK;CACN,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ declare const _default: {
3
+ readonly subscribeSubmit: {
4
+ readonly base: "oj-socket";
5
+ readonly key: "subscribeSubmit";
6
+ readonly body: z.ZodObject<{
7
+ submitId: z.ZodString;
8
+ }, z.core.$strip>;
9
+ };
10
+ readonly unsubscribeSubmit: {
11
+ readonly base: "oj-socket";
12
+ readonly key: "unsubscribeSubmit";
13
+ readonly body: z.ZodObject<{
14
+ submitId: z.ZodString;
15
+ }, z.core.$strip>;
16
+ };
17
+ };
18
+ export default _default;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const zod_1 = require("zod");
4
+ const base = 'oj-socket';
5
+ exports.default = {
6
+ subscribeSubmit: {
7
+ base,
8
+ key: 'subscribeSubmit',
9
+ body: zod_1.z.object({
10
+ submitId: zod_1.z.string().trim().min(1),
11
+ }),
12
+ },
13
+ unsubscribeSubmit: {
14
+ base,
15
+ key: 'unsubscribeSubmit',
16
+ body: zod_1.z.object({
17
+ submitId: zod_1.z.string().trim().min(1),
18
+ }),
19
+ },
20
+ };
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sockets/oj-socket/index.ts"],"names":[],"mappings":";;AACA,6BAAwB;AAExB,MAAM,IAAI,GAAG,WAAuC,CAAC;AAErD,kBAAe;IACb,eAAe,EAAE;QACf,IAAI;QACJ,GAAG,EAAE,iBAAiB;QACtB,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC;YACb,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;SACnC,CAAC;KACH;IACD,iBAAiB,EAAE;QACjB,IAAI;QACJ,GAAG,EAAE,mBAAmB;QACxB,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC;YACb,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;SACnC,CAAC;KACH;CAC+C,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ declare const _default: {
3
+ readonly updateSubmit: {
4
+ readonly base: "oj-web";
5
+ readonly key: "updateSubmit";
6
+ readonly body: z.ZodObject<{
7
+ submitId: z.ZodString;
8
+ }, z.core.$strip>;
9
+ };
10
+ readonly updateRun: {
11
+ readonly base: "oj-web";
12
+ readonly key: "updateRun";
13
+ readonly body: z.ZodObject<{
14
+ runId: z.ZodString;
15
+ }, z.core.$strip>;
16
+ };
17
+ };
18
+ export default _default;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const zod_1 = require("zod");
4
+ const base = 'oj-web';
5
+ exports.default = {
6
+ updateSubmit: {
7
+ base,
8
+ key: 'updateSubmit',
9
+ body: zod_1.z.object({
10
+ submitId: zod_1.z.string().trim().min(1),
11
+ }),
12
+ },
13
+ updateRun: {
14
+ base,
15
+ key: 'updateRun',
16
+ body: zod_1.z.object({
17
+ runId: zod_1.z.string().trim().min(1),
18
+ }),
19
+ },
20
+ };
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sockets/oj-web/index.ts"],"names":[],"mappings":";;AACA,6BAAwB;AAExB,MAAM,IAAI,GAAG,QAAoC,CAAC;AAElD,kBAAe;IACb,YAAY,EAAE;QACZ,IAAI;QACJ,GAAG,EAAE,cAAc;QACnB,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC;YACb,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;SACnC,CAAC;KACH;IACD,SAAS,EAAE;QACT,IAAI;QACJ,GAAG,EAAE,WAAW;QAChB,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC;YACb,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;SAChC,CAAC;KACH;CAC+C,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { type ZodObject, type ZodType, z } from 'zod';
2
+ export type EndpointBase = 'hq-api' | 'oj-api' | 'oj-archives' | 'oj-problemContents';
3
+ export type EndpointMethod = 'get' | 'post' | 'patch' | 'put' | 'delete';
4
+ export type Endpoint = {
5
+ base: EndpointBase;
6
+ method: EndpointMethod;
7
+ prefix: string;
8
+ path: (...args: Array<string>) => string;
9
+ body?: ZodType;
10
+ query?: ZodObject<z.ZodRawShape>;
11
+ data?: ZodType;
12
+ operation?: {
13
+ summary?: string;
14
+ description?: string;
15
+ deprecated?: boolean;
16
+ triggerHandler?: boolean;
17
+ };
18
+ auth?: {
19
+ temp?: number | boolean;
20
+ requiredLevel?: number | boolean;
21
+ };
22
+ };
23
+ export type SocketMessageBase = 'oj-web' | 'oj-socket';
24
+ export type SocketMessage = {
25
+ base: SocketMessageBase;
26
+ key: string;
27
+ body?: ZodType;
28
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,32 @@
1
1
  {
2
2
  "name": "@euler-edu/schema",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "7.0.1-beta1",
4
+ "description": "",
5
+ "type": "commonjs",
6
+ "author": "Geon Kim",
7
+ "license": "UNLICENSED",
8
+ "private": false,
9
+ "exports": {
10
+ ".": "./lib/index.js",
11
+ "./*": "./lib/*/index.js"
12
+ },
13
+ "typesVersions": {
14
+ "*": {
15
+ "*": [
16
+ "lib/*/index.d.ts"
17
+ ]
18
+ }
19
+ },
20
+ "dependencies": {
21
+ "zod": "^4.4.3",
22
+ "@euler-edu/constant": "7.0.1-beta1"
23
+ },
24
+ "files": [
25
+ "lib"
26
+ ],
27
+ "scripts": {
28
+ "clean": "rimraf lib",
29
+ "build": "tsc && tsc-alias",
30
+ "format": "prettier --write src"
31
+ }
6
32
  }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.