import { NextApiRequest } from 'next'; import { RingAnswers, RingScore, ScoreItem, User, UserAnswer } from './user'; export enum ApiRoutes { Login = '/auth/local', Register = '/auth/local/register', UpdateUser = '/users', CreateTeam = '/teams', GetDepartments = '/departments', GetTeams = '/teams', UpdateTeam = '/teams', GetUser = '/users', GetRings = '/rings', GetCommittees = '/commitees', ForgotPassword = '/auth/forgot-password', ResetPassword = '/auth/reset-password', Upload = '/upload', UpdatePassword = '/password', Settings = '/settings', } export enum ApiMethods { Post = 'post', Get = 'get', Put = 'put', } export interface LoginParams { identifier: string; password: string; } export interface ForgotPasswordParams { email: string; } export interface ResetPasswordParams { code: string; password: string; passwordConfirmation: string; } export interface UpdateTeamBody { score?: Partial[]; totalScore?: number; ringScores?: RingScore[]; clinicCase?: string; } export interface UpdateProgressBody { user: User; phase: number; ring: string; score?: Partial[]; data?: Partial; file?: string; } export interface UpdateUserBody { answers: { id?: string; ring?: string; testAnswers?: Partial[]; challengeAnswer?: Partial; phase?: number; }[]; } export interface NextRequestWithBody extends NextApiRequest { body: T; }