1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- import { z } from "zod";
- import { DbShema } from "../../db-shema.js";
- class sigameApiShema {
- public ZSelectQuestion = {
- req: z.object({
- questionIdx: z.number(),
- categoryIdx: z.number(),
- }),
- };
- public ZPlayerAnswer = {
- req: z.object({
- isRightAnswer: z.boolean(),
- }),
- };
- public ZTypePlayerAnswer = {
- req: z.object({
- isRightAnswer: z.boolean(),
- }),
- };
- public ZCatSelectPlayer = {
- req: z.object({
- playerIdx: z.number(),
- }),
- };
- public ZAuctionPlayerBet = {
- req: z.object({
- bet: z.union([z.number().min(1), z.literal("AllIn"), z.literal("check")]),
- }),
- };
- public ZRemoveFinalCategory = {
- req: z.object({
- categoryId: DbShema.ZCategories.shape.category_id,
- }),
- };
- public ZGodChangePlayerScore = {
- req: z.object({
- playerIdx: z.number(),
- newScore: z.number(),
- }),
- };
- public ZFinalPlayerBet = {
- req: z.object({
- playerIdx: z.number(),
- bet: z.number(),
- }),
- };
- public ZFinalPlayerAnswer = {
- req: z.object({
- playerIdx: z.number(),
- newVal: z.string(),
- }),
- };
- public ZFinalPlayerEvaluation = {
- req: z.object({
- playerIdx: z.number(),
- isRight: z.boolean(),
- }),
- };
- public ZPLayerButtonIsPressed = {
- req: z.object({
- consoleIdx: z.number(),
- }),
- };
- }
- export const SigameApiShema = new sigameApiShema();
|