This commit is contained in:
Brian Cao 2022-10-31 23:42:37 -07:00
parent 246e4e5f4f
commit 17041efaae
73 changed files with 491 additions and 874 deletions

5
interface/auth.d.ts vendored Normal file
View file

@ -0,0 +1,5 @@
export interface Auth {
id: number;
email?: string;
teams?: string[];
}

22
interface/base.d.ts vendored Normal file
View file

@ -0,0 +1,22 @@
import { NextApiRequest } from 'next';
import { Auth } from './auth';
export interface NextApiRequestQueryBody<TQuery, TBody> extends NextApiRequest {
auth: Auth;
query: TQuery;
body: TBody;
}
export interface NextApiRequestQuery<TQuery> extends NextApiRequest {
auth: Auth;
query: TQuery;
}
export interface NextApiRequestBody<TBody> extends NextApiRequest {
auth: Auth;
body: TBody;
}
export interface ObjectAny {
[key: string]: any;
}

22
interface/index.d.ts vendored Normal file
View file

@ -0,0 +1,22 @@
import { NextApiRequest } from 'next';
import { Auth } from './auth';
export interface NextApiRequestQueryBody<TQuery, TBody> extends NextApiRequest {
auth: Auth;
query: TQuery;
body: TBody;
}
export interface NextApiRequestQuery<TQuery> extends NextApiRequest {
auth: Auth;
query: TQuery;
}
export interface NextApiRequestBody<TBody> extends NextApiRequest {
auth: Auth;
body: TBody;
}
export interface ObjectAny {
[key: string]: any;
}