feat: return user data when marking episode as watched
This commit is contained in:
21
src/types/user.ts
Normal file
21
src/types/user.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export type User = z.infer<typeof User>;
|
||||
export const User = z
|
||||
.object({
|
||||
statistics: z.object({
|
||||
minutesWatched: z.number().openapi({ type: "integer", format: "int64" }),
|
||||
episodesWatched: z.number().openapi({ type: "integer", format: "int64" }),
|
||||
count: z
|
||||
.number()
|
||||
.int() /* .openapi({ type: "integer", format: "int64" }) */,
|
||||
meanScore: z.number().openapi({ type: "number", format: "float" }),
|
||||
}),
|
||||
name: z.string(),
|
||||
avatar: z.object({
|
||||
medium: z.string(),
|
||||
large: z.string(),
|
||||
}),
|
||||
})
|
||||
.optional()
|
||||
.nullable();
|
||||
Reference in New Issue
Block a user