Updated report schemas. Removed yup.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user