Updated report schemas. Removed yup.

This commit is contained in:
Mike Cao 2025-01-31 23:46:23 -08:00
parent edd72cd6e3
commit f3e733dea3
13 changed files with 37 additions and 146 deletions

View file

@ -1,4 +1,3 @@
import { NextApiRequest } from 'next';
import {
COLLECTION_TYPE,
DATA_TYPE,
@ -8,7 +7,6 @@ import {
REPORT_TYPES,
ROLES,
} from './constants';
import * as yup from 'yup';
import { TIME_UNIT } from './date';
import { Dispatch, SetStateAction } from 'react';
@ -65,26 +63,6 @@ export interface Auth {
};
}
export interface YupRequest {
GET?: yup.ObjectSchema<any>;
POST?: yup.ObjectSchema<any>;
PUT?: yup.ObjectSchema<any>;
DELETE?: yup.ObjectSchema<any>;
}
export interface NextApiRequestQueryBody<TQuery = any, TBody = any> extends NextApiRequest {
auth?: Auth;
query: TQuery & { [key: string]: string | string[] };
body: TBody;
headers: any;
yup: YupRequest;
}
export interface NextApiRequestAuth extends NextApiRequest {
auth?: Auth;
headers: any;
}
export interface User {
id: string;
username: string;