mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 14:47:14 +01:00
Updated report schemas. Removed yup.
This commit is contained in:
parent
edd72cd6e3
commit
f3e733dea3
13 changed files with 37 additions and 146 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue