This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/src/types/IParams.ts

38 lines
861 B
TypeScript

import type { ITask } from '@/modelTypes/ITask'
export type SortBy =
| 'id'
| 'title'
| 'description'
| 'done'
| 'doneAt'
| 'dueDate'
| 'createdById'
| 'listId'
| 'repeatAfter'
| 'priority'
| 'start_date'
| 'end_date'
| 'hex_color'
| 'percent_done'
| 'uid'
| 'created'
| 'updated'
| 'position'
export type OrderBy = 'asc' | 'desc'
export type FilterComparator = 'equals' | 'greater' | 'greaterEquals' | 'less' | 'lessEquals' | 'like' |'in'
export type FilterBy = keyof ITask | 'namespace'
export type FilterValue = 'false' | string | number | boolean | Date | {dateFrom: string | Date, dateTo: string | Date}
export interface IParams {
sortBy: SortBy[]
orderBy: OrderBy[]
filterBy: FilterBy[]
filterValue: FilterValue[]
filterComparator: FilterComparator[]
filterConcat: 'and' | 'or'
filterIncludeNulls: boolean
s: '' // search
}