- Add GameRequestSchema and derived types to packages/shared - Add SupportedLanguageCode, SupportedPos, DifficultyLevel type exports - Add getGameTerms() model to packages/db with pos/language/difficulty/limit filters - Add prepareGameQuestions() service skeleton in apps/api - Add createGame controller with Zod safeParse validation - Wire POST /api/v1/game/start route - Add scripts/gametest/test-game.ts for manual end-to-end testing
15 lines
649 B
TypeScript
15 lines
649 B
TypeScript
export const SUPPORTED_LANGUAGE_CODES = ["en", "it"] as const;
|
|
export type SupportedLanguageCode = (typeof SUPPORTED_LANGUAGE_CODES)[number];
|
|
|
|
export const SUPPORTED_POS = ["noun", "verb"] as const;
|
|
export type SupportedPos = (typeof SUPPORTED_POS)[number];
|
|
|
|
export const GAME_ROUNDS = ["3", "10"] as const;
|
|
export type GameRounds = (typeof GAME_ROUNDS)[number];
|
|
|
|
export const CEFR_LEVELS = ["A1", "A2", "B1", "B2", "C1", "C2"] as const;
|
|
|
|
export const SUPPORTED_DECK_TYPES = ["grammar", "media"] as const;
|
|
|
|
export const DIFFICULTY_LEVELS = ["easy", "intermediate", "hard"] as const;
|
|
export type DifficultyLevel = (typeof DIFFICULTY_LEVELS)[number];
|