export interfaces

This commit is contained in:
2026-06-12 11:22:54 +02:00
parent 802d46191e
commit 734c631356
3 changed files with 20 additions and 4 deletions
+18
View File
@@ -1,3 +1,6 @@
import type { infer } from "zod";
import type { TokenResponseSchema } from "#/schemas.ts";
export interface IPosition {
ply: number;
fen: string;
@@ -29,3 +32,18 @@ export interface IGameState {
diagrams: IPosition[];
diagramClock: boolean;
}
export interface ITokenData extends infer<typeof TokenResponseSchema> {}
export interface IUserStudy {
id: string;
name: string;
createdAt: number;
updatedAt: number;
}
export interface IUserStudyChapter {
chapterId: string;
name: string;
pgn: string;
}
+2 -2
View File
@@ -8,9 +8,9 @@ export const SessionSchema = z.object({
export const TokenResponseSchema = z.object({
access_token: z.string(),
expires_in: z.number().optional(),
expires_in: z.number(),
scope: z.string().optional(),
token_type: z.string().optional(),
token_type: z.string(),
});
export const LichessAccountSchema = z.object({