2020-04-22 15:52:17 +02:00
|
|
|
import {Environment} from "nunjucks";
|
|
|
|
import Model from "../db/Model";
|
2020-04-24 12:12:27 +02:00
|
|
|
import AuthGuard from "../auth/AuthGuard";
|
2020-06-14 21:47:18 +02:00
|
|
|
import {Files} from "formidable";
|
2020-06-16 11:12:58 +02:00
|
|
|
import User from "../auth/models/User";
|
2020-04-22 15:52:17 +02:00
|
|
|
|
2020-04-23 11:16:05 +02:00
|
|
|
declare global {
|
|
|
|
namespace Express {
|
|
|
|
export interface Request {
|
|
|
|
env: Environment;
|
2020-06-16 11:12:58 +02:00
|
|
|
models: {
|
|
|
|
user?: User | null,
|
|
|
|
[p: string]: Model | null | undefined,
|
|
|
|
};
|
2020-04-23 11:16:05 +02:00
|
|
|
modelCollections: { [p: string]: Model[] | null };
|
2020-04-24 12:12:27 +02:00
|
|
|
authGuard: AuthGuard<any>;
|
2020-06-14 21:47:18 +02:00
|
|
|
files: Files;
|
2020-04-22 15:52:17 +02:00
|
|
|
|
2020-04-23 11:16:05 +02:00
|
|
|
flash(): { [key: string]: string[] };
|
2020-04-22 15:52:17 +02:00
|
|
|
|
2020-04-23 11:16:05 +02:00
|
|
|
flash(message: string): any;
|
2020-04-22 15:52:17 +02:00
|
|
|
|
2020-04-23 11:16:05 +02:00
|
|
|
flash(event: string, message: any): any;
|
|
|
|
}
|
2020-04-22 15:52:17 +02:00
|
|
|
|
2020-04-23 11:16:05 +02:00
|
|
|
export interface Response {
|
|
|
|
redirectBack(defaultUrl?: string): any;
|
|
|
|
}
|
2020-04-22 15:52:17 +02:00
|
|
|
}
|
|
|
|
}
|