1
0

feat: add modelTypes

This commit is contained in:
Dominik Pschenitschni
2022-08-04 20:57:43 +02:00
parent 8416b1f448
commit 7d4ba6249e
91 changed files with 751 additions and 513 deletions

9
src/types/IFilter.ts Normal file
View File

@ -0,0 +1,9 @@
export interface IFilter {
sortBy: ('done' | 'id')[]
orderBy: ('asc' | 'desc')[]
filterBy: 'done'[]
filterValue: 'false'[]
filterComparator: 'equals'[]
filterConcat: 'and'
filterIncludeNulls: boolean
}

View File

@ -0,0 +1,16 @@
export enum RELATION_KIND {
'SUBTASK' = 'subtask',
'PARENTTASK' = 'parenttask',
'RELATED' = 'related',
'DUPLICATES' = 'duplicates',
'BLOCKING' = 'blocking',
'BLOCKED' = 'blocked',
'PROCEDES' = 'precedes',
'FOLLOWS' = 'follows',
'COPIEDFROM' = 'copiedfrom',
'COPIEDTO' = 'copiedto',
}
export type IRelationKind = typeof RELATION_KIND[keyof typeof RELATION_KIND]
export const RELATION_KINDS = [...Object.values(RELATION_KIND)] as const

View File

@ -6,9 +6,9 @@ export const REPEAT_TYPES = {
Years: 'years',
} as const
export type RepeatType = typeof REPEAT_TYPES[keyof typeof REPEAT_TYPES]
export type IRepeatType = typeof REPEAT_TYPES[keyof typeof REPEAT_TYPES]
export interface IRepeats {
type: RepeatType,
export interface IRepeatAfter {
type: IRepeatType,
amount: number,
}

7
src/types/IRepeatMode.ts Normal file
View File

@ -0,0 +1,7 @@
export const TASK_REPEAT_MODES = {
'REPEAT_MODE_DEFAULT': 0,
'REPEAT_MODE_MONTH': 1,
'REPEAT_MODE_FROM_CURRENT_DATE': 2,
} as const
export type IRepeatMode = typeof TASK_REPEAT_MODES[keyof typeof TASK_REPEAT_MODES]