express-sequelize-autocrud
Version:
Express Sequelize AutoCRUD: Simplify API development with automatic CRUD routes for Sequelize models in Express.js.
8 lines (7 loc) • 722 B
TypeScript
import type { FindAndCountOptions } from 'sequelize';
import type { NextFunction, Request, Response } from 'express';
import type { customFields } from '../types.js';
export declare const buildOptionsFromQueryParams: (q: Record<string, any>, options: FindAndCountOptions) => FindAndCountOptions<unknown>;
export declare const checkFilterableFields: (filterableFields?: customFields) => (req: Request, res: Response, next: NextFunction) => Promise<void>;
export declare const checkSortableFields: (sortableFields?: customFields) => (req: Request, res: Response, next: NextFunction) => Promise<void>;
export declare const setContentRange: (res: Response, key: string, offset: number, length: number, total: number) => void;