diff options
Diffstat (limited to 'frontend/app/.server/api/schema.d.ts')
| -rw-r--r-- | frontend/app/.server/api/schema.d.ts | 198 |
1 files changed, 197 insertions, 1 deletions
diff --git a/frontend/app/.server/api/schema.d.ts b/frontend/app/.server/api/schema.d.ts index d12600c..000c876 100644 --- a/frontend/app/.server/api/schema.d.ts +++ b/frontend/app/.server/api/schema.d.ts @@ -198,7 +198,9 @@ export interface paths { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["Game"]; + "application/json": { + game: components["schemas"]["Game"]; + }; }; }; /** @description Forbidden */ @@ -287,6 +289,200 @@ export interface paths { patch?: never; trace?: never; }; + "/admin/games": { + parameters: { + query?: never; + header?: never; + path?: never; + 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 Forbidden */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @example Forbidden operation */ + message: string; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + [path: `/admin/games/${integer}`]: { + parameters: { + query?: never; + header?: never; + path?: never; + 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 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; + }; + }; + }; + }; + }; + /** 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 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; + }; + }; + }; + }; + }; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; } export type webhooks = Record<string, never>; export interface components { |
