aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-08-10 20:25:27 +0900
committernsfisis <nsfisis@gmail.com>2024-08-10 21:01:58 +0900
commit7ca24d875c88bf1d063e156fac8f03507fc38382 (patch)
treee0ebe86861febaa1a268fb75e2187f9ef36a7e71 /frontend
parent9477788709127ffd5611caed0fa7ee191326ce00 (diff)
downloadiosdc-japan-2024-albatross-7ca24d875c88bf1d063e156fac8f03507fc38382.tar.gz
iosdc-japan-2024-albatross-7ca24d875c88bf1d063e156fac8f03507fc38382.tar.zst
iosdc-japan-2024-albatross-7ca24d875c88bf1d063e156fac8f03507fc38382.zip
feat: extends watcher message types
Diffstat (limited to 'frontend')
-rw-r--r--frontend/app/.server/api/schema.d.ts33
1 files changed, 29 insertions, 4 deletions
diff --git a/frontend/app/.server/api/schema.d.ts b/frontend/app/.server/api/schema.d.ts
index 779f11e..719babb 100644
--- a/frontend/app/.server/api/schema.d.ts
+++ b/frontend/app/.server/api/schema.d.ts
@@ -190,7 +190,7 @@ export interface components {
code: string;
};
GameWatcherMessage: components["schemas"]["GameWatcherMessageS2C"];
- GameWatcherMessageS2C: components["schemas"]["GameWatcherMessageS2CStart"] | components["schemas"]["GameWatcherMessageS2CCode"] | components["schemas"]["GameWatcherMessageS2CExecResult"];
+ GameWatcherMessageS2C: components["schemas"]["GameWatcherMessageS2CStart"] | components["schemas"]["GameWatcherMessageS2CCode"] | components["schemas"]["GameWatcherMessageS2CSubmit"] | components["schemas"]["GameWatcherMessageS2CExecResult"] | components["schemas"]["GameWatcherMessageS2CSubmitResult"];
GameWatcherMessageS2CStart: {
/** @constant */
type: "watcher:s2c:start";
@@ -211,6 +211,17 @@ export interface components {
/** @example print('Hello, world!') */
code: string;
};
+ GameWatcherMessageS2CSubmit: {
+ /** @constant */
+ type: "watcher:s2c:submit";
+ data: components["schemas"]["GameWatcherMessageS2CSubmitPayload"];
+ };
+ GameWatcherMessageS2CSubmitPayload: {
+ /** @example 1 */
+ player_id: number;
+ /** @example 100 */
+ preliminary_score: number;
+ };
GameWatcherMessageS2CExecResult: {
/** @constant */
type: "watcher:s2c:execresult";
@@ -219,18 +230,32 @@ export interface components {
GameWatcherMessageS2CExecResultPayload: {
/** @example 1 */
player_id: number;
+ /** @example 1 */
+ testcase_id: number | null;
/**
* @example success
* @enum {string}
*/
- status: "success";
- /** @example 100 */
- score: number | null;
+ status: "success" | "wrong_answer" | "timeout" | "runtime_error" | "internal_error" | "compile_error";
/** @example Hello, world! */
stdout: string;
/** @example */
stderr: string;
};
+ GameWatcherMessageS2CSubmitResult: {
+ /** @constant */
+ type: "watcher:s2c:submitresult";
+ data: components["schemas"]["GameWatcherMessageS2CSubmitResultPayload"];
+ };
+ GameWatcherMessageS2CSubmitResultPayload: {
+ /** @example 1 */
+ player_id: number;
+ /**
+ * @example success
+ * @enum {string}
+ */
+ status: "success" | "wrong_answer" | "timeout" | "runtime_error" | "internal_error" | "compile_error";
+ };
};
responses: {
/** @description Bad request */