aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/.server/api/schema.d.ts
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-08-01 21:07:37 +0900
committernsfisis <nsfisis@gmail.com>2024-08-01 21:07:37 +0900
commit5e6775c9c1efbbd3b08363ffda421a5996dc7143 (patch)
tree7f23d867ffc0548c129e8a52bbb6c52b13f37584 /frontend/app/.server/api/schema.d.ts
parent0ad7b9e54615eedfffa41709900d8e86814d2471 (diff)
downloadphperkaigi-2025-albatross-5e6775c9c1efbbd3b08363ffda421a5996dc7143.tar.gz
phperkaigi-2025-albatross-5e6775c9c1efbbd3b08363ffda421a5996dc7143.tar.zst
phperkaigi-2025-albatross-5e6775c9c1efbbd3b08363ffda421a5996dc7143.zip
refactor: specify `operationId` in OpenAPI spec
Diffstat (limited to 'frontend/app/.server/api/schema.d.ts')
-rw-r--r--frontend/app/.server/api/schema.d.ts889
1 files changed, 449 insertions, 440 deletions
diff --git a/frontend/app/.server/api/schema.d.ts b/frontend/app/.server/api/schema.d.ts
index abe2b59..3ef97ab 100644
--- a/frontend/app/.server/api/schema.d.ts
+++ b/frontend/app/.server/api/schema.d.ts
@@ -14,50 +14,7 @@ export interface paths {
get?: never;
put?: never;
/** User login */
- post: {
- parameters: {
- query?: never;
- header?: never;
- path?: never;
- cookie?: never;
- };
- requestBody: {
- content: {
- "application/json": {
- /** @example john */
- username: string;
- /** @example password123 */
- password: string;
- };
- };
- };
- responses: {
- /** @description Successfully authenticated */
- 200: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- /** @example xxxxx.xxxxx.xxxxx */
- token: string;
- };
- };
- };
- /** @description Invalid username or password */
- 401: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- /** @example Invalid credentials */
- message: string;
- };
- };
- };
- };
- };
+ post: operations["postLogin"];
delete?: never;
options?: never;
head?: never;
@@ -72,43 +29,7 @@ export interface paths {
cookie?: never;
};
/** Get a short-lived access token */
- get: {
- parameters: {
- query?: never;
- header: {
- Authorization: string;
- };
- path?: never;
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description Successfully authenticated */
- 200: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- /** @example xxxxx.xxxxx.xxxxx */
- token: string;
- };
- };
- };
- /** @description Unauthorized */
- 401: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- /** @example Unauthorized */
- message: string;
- };
- };
- };
- };
- };
+ get: operations["getToken"];
put?: never;
post?: never;
delete?: never;
@@ -125,56 +46,7 @@ export interface paths {
cookie?: never;
};
/** List games */
- get: {
- parameters: {
- query?: {
- player_id?: number;
- };
- header: {
- Authorization: string;
- };
- path?: never;
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description List of games */
- 200: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- games: components["schemas"]["Game"][];
- };
- };
- };
- /** @description Unauthorized */
- 401: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- /** @example Unauthorized */
- message: string;
- };
- };
- };
- /** @description Forbidden */
- 403: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- /** @example Forbidden operation */
- message: string;
- };
- };
- };
- };
- };
+ get: operations["getGames"];
put?: never;
post?: never;
delete?: never;
@@ -191,68 +63,7 @@ export interface paths {
cookie?: never;
};
/** Get a game */
- get: {
- parameters: {
- query?: never;
- header: {
- Authorization: string;
- };
- path: {
- game_id: number;
- };
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description A game */
- 200: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- game: components["schemas"]["Game"];
- };
- };
- };
- /** @description Unauthorized */
- 401: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- /** @example Unauthorized */
- message: string;
- };
- };
- };
- /** @description Forbidden */
- 403: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- /** @example Forbidden operation */
- message: string;
- };
- };
- };
- /** @description Not found */
- 404: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- /** @example Not found */
- message: string;
- };
- };
- };
- };
- };
+ get: operations["getGame"];
put?: never;
post?: never;
delete?: never;
@@ -269,54 +80,7 @@ export interface paths {
cookie?: never;
};
/** List all users */
- get: {
- parameters: {
- query?: never;
- header: {
- Authorization: string;
- };
- path?: never;
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description List of users */
- 200: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- users: components["schemas"]["User"][];
- };
- };
- };
- /** @description Unauthorized */
- 401: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- /** @example Unauthorized */
- message: string;
- };
- };
- };
- /** @description Forbidden */
- 403: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- /** @example Forbidden operation */
- message: string;
- };
- };
- };
- };
- };
+ get: operations["adminGetUsers"];
put?: never;
post?: never;
delete?: never;
@@ -333,54 +97,7 @@ export interface paths {
cookie?: never;
};
/** List games */
- get: {
- parameters: {
- query?: never;
- header: {
- Authorization: string;
- };
- path?: never;
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description List of games */
- 200: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- games: components["schemas"]["Game"][];
- };
- };
- };
- /** @description Unauthorized */
- 401: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- /** @example Unauthorized */
- message: string;
- };
- };
- };
- /** @description Forbidden */
- 403: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- /** @example Forbidden operation */
- message: string;
- };
- };
- };
- };
- };
+ get: operations["adminGetGames"];
put?: never;
post?: never;
delete?: never;
@@ -397,157 +114,9 @@ export interface paths {
cookie?: never;
};
/** Get a game */
- get: {
- parameters: {
- query?: never;
- header: {
- Authorization: string;
- };
- path: {
- game_id: number;
- };
- cookie?: never;
- };
- requestBody?: never;
- responses: {
- /** @description A game */
- 200: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- game: components["schemas"]["Game"];
- };
- };
- };
- /** @description Unauthorized */
- 401: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- /** @example Unauthorized */
- message: string;
- };
- };
- };
- /** @description Forbidden */
- 403: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- /** @example Forbidden operation */
- message: string;
- };
- };
- };
- /** @description Not found */
- 404: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- /** @example Not found */
- message: string;
- };
- };
- };
- };
- };
+ get: operations["adminGetGame"];
/** Update a game */
- put: {
- parameters: {
- query?: never;
- header: {
- Authorization: string;
- };
- path: {
- game_id: number;
- };
- cookie?: never;
- };
- requestBody: {
- content: {
- "application/json": {
- /**
- * @example closed
- * @enum {string}
- */
- state?: "closed" | "waiting_entries" | "waiting_start" | "prepare" | "starting" | "gaming" | "finished";
- /** @example Game 1 */
- display_name?: string;
- /** @example 360 */
- duration_seconds?: number;
- /** @example 946684800 */
- started_at?: number | null;
- /** @example 1 */
- problem_id?: number | null;
- };
- };
- };
- responses: {
- /** @description Successfully updated */
- 204: {
- headers: {
- [name: string]: unknown;
- };
- content?: never;
- };
- /** @description Invalid request */
- 400: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- /** @example Invalid request */
- message: string;
- };
- };
- };
- /** @description Unauthorized */
- 401: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- /** @example Unauthorized */
- message: string;
- };
- };
- };
- /** @description Forbidden */
- 403: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- /** @example Forbidden operation */
- message: string;
- };
- };
- };
- /** @description Not found */
- 404: {
- headers: {
- [name: string]: unknown;
- };
- content: {
- "application/json": {
- /** @example Not found */
- message: string;
- };
- };
- };
- };
- };
+ put: operations["adminPutGame"];
post?: never;
delete?: never;
options?: never;
@@ -696,4 +265,444 @@ export interface components {
pathItems: never;
}
export type $defs = Record<string, never>;
-export type operations = Record<string, never>;
+export interface operations {
+ postLogin: {
+ parameters: {
+ query?: never;
+ header?: never;
+ path?: never;
+ cookie?: never;
+ };
+ requestBody: {
+ content: {
+ "application/json": {
+ /** @example john */
+ username: string;
+ /** @example password123 */
+ password: string;
+ };
+ };
+ };
+ responses: {
+ /** @description Successfully authenticated */
+ 200: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ /** @example xxxxx.xxxxx.xxxxx */
+ token: string;
+ };
+ };
+ };
+ /** @description Invalid username or password */
+ 401: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ /** @example Invalid credentials */
+ message: string;
+ };
+ };
+ };
+ };
+ };
+ getToken: {
+ parameters: {
+ query?: never;
+ header: {
+ Authorization: string;
+ };
+ path?: never;
+ cookie?: never;
+ };
+ requestBody?: never;
+ responses: {
+ /** @description Successfully authenticated */
+ 200: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ /** @example xxxxx.xxxxx.xxxxx */
+ token: string;
+ };
+ };
+ };
+ /** @description Unauthorized */
+ 401: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ /** @example Unauthorized */
+ message: string;
+ };
+ };
+ };
+ };
+ };
+ getGames: {
+ parameters: {
+ query?: {
+ player_id?: number;
+ };
+ header: {
+ Authorization: string;
+ };
+ path?: never;
+ cookie?: never;
+ };
+ requestBody?: never;
+ responses: {
+ /** @description List of games */
+ 200: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ games: components["schemas"]["Game"][];
+ };
+ };
+ };
+ /** @description Unauthorized */
+ 401: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ /** @example Unauthorized */
+ message: string;
+ };
+ };
+ };
+ /** @description Forbidden */
+ 403: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ /** @example Forbidden operation */
+ message: string;
+ };
+ };
+ };
+ };
+ };
+ getGame: {
+ parameters: {
+ query?: never;
+ header: {
+ Authorization: string;
+ };
+ path: {
+ game_id: number;
+ };
+ cookie?: never;
+ };
+ requestBody?: never;
+ responses: {
+ /** @description A game */
+ 200: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ game: components["schemas"]["Game"];
+ };
+ };
+ };
+ /** @description Unauthorized */
+ 401: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ /** @example Unauthorized */
+ message: string;
+ };
+ };
+ };
+ /** @description Forbidden */
+ 403: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ /** @example Forbidden operation */
+ message: string;
+ };
+ };
+ };
+ /** @description Not found */
+ 404: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ /** @example Not found */
+ message: string;
+ };
+ };
+ };
+ };
+ };
+ adminGetUsers: {
+ parameters: {
+ query?: never;
+ header: {
+ Authorization: string;
+ };
+ path?: never;
+ cookie?: never;
+ };
+ requestBody?: never;
+ responses: {
+ /** @description List of users */
+ 200: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ users: components["schemas"]["User"][];
+ };
+ };
+ };
+ /** @description Unauthorized */
+ 401: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ /** @example Unauthorized */
+ message: string;
+ };
+ };
+ };
+ /** @description Forbidden */
+ 403: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ /** @example Forbidden operation */
+ message: string;
+ };
+ };
+ };
+ };
+ };
+ adminGetGames: {
+ parameters: {
+ query?: never;
+ header: {
+ Authorization: string;
+ };
+ path?: never;
+ cookie?: never;
+ };
+ requestBody?: never;
+ responses: {
+ /** @description List of games */
+ 200: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ games: components["schemas"]["Game"][];
+ };
+ };
+ };
+ /** @description Unauthorized */
+ 401: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ /** @example Unauthorized */
+ message: string;
+ };
+ };
+ };
+ /** @description Forbidden */
+ 403: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ /** @example Forbidden operation */
+ message: string;
+ };
+ };
+ };
+ };
+ };
+ adminGetGame: {
+ parameters: {
+ query?: never;
+ header: {
+ Authorization: string;
+ };
+ path: {
+ game_id: number;
+ };
+ cookie?: never;
+ };
+ requestBody?: never;
+ responses: {
+ /** @description A game */
+ 200: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ game: components["schemas"]["Game"];
+ };
+ };
+ };
+ /** @description Unauthorized */
+ 401: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ /** @example Unauthorized */
+ message: string;
+ };
+ };
+ };
+ /** @description Forbidden */
+ 403: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ /** @example Forbidden operation */
+ message: string;
+ };
+ };
+ };
+ /** @description Not found */
+ 404: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ /** @example Not found */
+ message: string;
+ };
+ };
+ };
+ };
+ };
+ adminPutGame: {
+ parameters: {
+ query?: never;
+ header: {
+ Authorization: string;
+ };
+ path: {
+ game_id: number;
+ };
+ cookie?: never;
+ };
+ requestBody: {
+ content: {
+ "application/json": {
+ /**
+ * @example closed
+ * @enum {string}
+ */
+ state?: "closed" | "waiting_entries" | "waiting_start" | "prepare" | "starting" | "gaming" | "finished";
+ /** @example Game 1 */
+ display_name?: string;
+ /** @example 360 */
+ duration_seconds?: number;
+ /** @example 946684800 */
+ started_at?: number | null;
+ /** @example 1 */
+ problem_id?: number | null;
+ };
+ };
+ };
+ responses: {
+ /** @description Successfully updated */
+ 204: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content?: never;
+ };
+ /** @description Invalid request */
+ 400: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ /** @example Invalid request */
+ message: string;
+ };
+ };
+ };
+ /** @description Unauthorized */
+ 401: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ /** @example Unauthorized */
+ message: string;
+ };
+ };
+ };
+ /** @description Forbidden */
+ 403: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ /** @example Forbidden operation */
+ message: string;
+ };
+ };
+ };
+ /** @description Not found */
+ 404: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": {
+ /** @example Not found */
+ message: string;
+ };
+ };
+ };
+ };
+ };
+}