express-crud-router
Version:
React Admin backend for Express. 1 line per resource! ORM agnostic.
15 lines (14 loc) • 825 B
TypeScript
import { Get, GetListOptions } from './getList';
import { Create } from './create';
import { Update } from './update';
import { Destroy } from './delete';
import { populateReference, populateReferenceMany, populateReferenceManyCount, populateReferenceOne } from './additionalAttributeHelpers';
export interface Actions<I extends string | number, R> {
get: Get<R> | null;
create: Create<I, R> | null;
destroy: Destroy | null;
update: Update<R> | null;
}
export { Create, Destroy, Update, Get, populateReference, populateReferenceMany, populateReferenceManyCount, populateReferenceOne };
export declare const crud: <I extends string | number, R>(path: string, actions: Partial<Actions<I, R>>, options?: Partial<GetListOptions<R>> | undefined) => import("express-serve-static-core").Router;
export default crud;