prisma-criteria
Version:
Parses, validates, and creates a criteria object that can be passed to the Prisma "findMany" method to query a list of resources matching the given filters, pagination and order.
6 lines (5 loc) • 319 B
TypeScript
import { Validation } from './shared/validation.util.js';
import { PrismaCriteria } from './types.js';
export declare function validateOrder(orderByProspect: string | undefined, orderDirProspect: string | undefined, allowedFieldsToOrderBy: string[]): Validation<undefined, {
orderBy: PrismaCriteria['orderBy'];
}>;