mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-08-31 04:57:35 -05:00
41 lines
693 B
TypeScript
41 lines
693 B
TypeScript
import { z } from 'zod';
|
|
|
|
export type GetApiAuthMe = {
|
|
pid: number;
|
|
username: string;
|
|
mii: {
|
|
imageUrl: string;
|
|
name: string;
|
|
} | null;
|
|
}
|
|
|
|
export type ProgressItem = {
|
|
title: string,
|
|
githubUrl?: string,
|
|
completion: number,
|
|
tasks: Array<{
|
|
status: 'completed' | 'inprogress' | 'notstarted',
|
|
title: string,
|
|
}>
|
|
}
|
|
|
|
export type GetProgress = {
|
|
donations: {
|
|
currentCents: number,
|
|
goalCents: number,
|
|
},
|
|
completion: number;
|
|
items: ProgressItem[];
|
|
}
|
|
|
|
export type ApiAuthLogin = {
|
|
accessToken: string;
|
|
refreshToken: string;
|
|
};
|
|
|
|
export const LoginSchema = z.object({
|
|
username: z.string(),
|
|
password: z.string()
|
|
});
|
|
export type ApiAuthLoginRequest = z.infer<typeof LoginSchema>;
|