/// /// import { IRepositoryQueryOptions } from './repository-operation-options'; /** * Value of order by in find options. */ export type FindOptionsOrderValue = 'ASC' | 'DESC' | 'asc' | 'desc' | 1 | -1 | { direction?: 'asc' | 'desc' | 'ASC' | 'DESC'; nulls?: 'first' | 'last' | 'FIRST' | 'LAST'; }; /** * A single property handler for FindOptionsOrder. */ export type FindOptionsOrderProperty = Property extends Promise ? FindOptionsOrderProperty> : Property extends Array ? FindOptionsOrderProperty> : Property extends Function ? never : Property extends string ? FindOptionsOrderValue : Property extends number ? FindOptionsOrderValue : Property extends boolean ? FindOptionsOrderValue : Property extends Buffer ? FindOptionsOrderValue : Property extends Date ? FindOptionsOrderValue : Property extends unknown ? FindOptionsOrderValue : Property extends object ? FindOptionsOrder | FindOptionsOrderValue : FindOptionsOrderValue; export type FindOptionsOrder = { [P in keyof Entity]?: P extends 'toString' ? unknown : FindOptionsOrderProperty>; }; export interface IQueryPaginationOptions { pageSize?: number; page?: number; } export interface IRepositoryPaginatedQueryOptions extends IRepositoryQueryOptions { pagination: IQueryPaginationOptions; }