@villedemontreal/general-utils
Version:
General utilities library
22 lines • 822 B
TypeScript
/**
* IOrderBy represents an order specified for a search.
* Controllers can parse a search request and use this entity
* to type the orderBys found in its querystring.
*
* Note that a `httpUtils.getOrderBys(...)` utility is provided by
* the "@villemontreal/core-http-request-nodejs-lib" library to
* easily parse and type such orderBys from an Express request.
*
* @see https://confluence.montreal.ca/pages/viewpage.action?spaceKey=AES&title=REST+API#RESTAPI-Tridelarequ%C3%AAte
*/
export interface IOrderBy {
key: string;
direction: OrderByDirection;
}
export declare const isOrderBy: (obj: any) => obj is IOrderBy;
export declare const isOrderByArray: (objs: any) => objs is IOrderBy[];
export declare enum OrderByDirection {
ASC = "ASC",
DESC = "DESC"
}
//# sourceMappingURL=orderBy.d.ts.map