/** * 可分页的查询格式 */ export declare class Page { totalPages: number; totalElements: number; pageNum: number; pageSize: number; lastId: number | string; static parseQuery(queries: Record): Page; constructor(props?: Partial); } export interface SortOrder { property: string; direction: 'ASC' | 'DESC'; } export declare class SortOrders { sortOrders: SortOrder[]; constructor(sortOrders: SortOrder[]); getSortBy(): string | undefined; } /** * 具体的查询条件 */ export declare class Criteria { page: Page; equalFields: { [key: string]: any; }; likeFields: { [key: string]: any; }; otherFields: { [key: string]: any; }; constructor(props?: Partial); } export interface V2QueryParams { pageNum: number; pageSize: number; condition?: QueryConditionV2; /** property 为排序字段 (对应接口会给定一组支持的排序字段) */ sortBy?: { property: string; direction: 'asc' | 'desc'; }[]; includes?: string[]; } export type QueryConditionOP = 'and' | 'or' | '=' | 'not=' | '>' | '<' | '>=' | '<=' | 'in' | 'contains' | 'like'; export type QueryConditionV2 = { op: Exclude; args: [string, string | string[] | number | null | undefined]; } | { op: 'and' | 'or'; args: QueryConditionV2[]; }; export declare const transformQueryCondition: (op: 'and' | 'or', params: { value: any; key: string; op: Exclude; }[]) => { op: 'and' | 'or'; args: QueryConditionV2[]; };