18 lines
490 B
TypeScript
18 lines
490 B
TypeScript
import { Request, Response } from 'express';
|
|
|
|
type Authorization = {
|
|
(req: Request, res: Response): Promise<boolean>;
|
|
(req: Request, res: Response, next: Function): unknown;
|
|
}
|
|
|
|
interface KnexCrudOptions {
|
|
general_authorization?: Authorization;
|
|
create_authorization?: Authorization;
|
|
read_authorization?: Authorization;
|
|
update_authorization?: Authorization;
|
|
delete_authorization?: Authorization;
|
|
optional_columns?: Array<string>;
|
|
}
|
|
|
|
export { Authorization, KnexCrudOptions };
|