26 lines
757 B
TypeScript
26 lines
757 B
TypeScript
import { Request, Response } from 'express';
|
|
|
|
type Authentication = {
|
|
(req: Request, res: Response, next: Function);
|
|
(req: Request, res: Response): Promise<boolean>;
|
|
}
|
|
|
|
type Authorization = {
|
|
(req: Request, res: Response, next: Function);
|
|
(req: Request, res: Response): Promise<boolean>;
|
|
}
|
|
|
|
export class KnexCrudOptions {
|
|
public create_authentication?: Authentication;
|
|
public read_authentication?: Authentication;
|
|
public update_authentication?: Authentication;
|
|
public delete_authentication?: Authentication;
|
|
|
|
public create_authorization?: Authorization;
|
|
public read_authorization?: Authorization;
|
|
public update_authorization?: Authorization;
|
|
public delete_authorization?: Authorization;
|
|
|
|
public optional_columns?: Array<string>;
|
|
}
|