feat: add modelTypes
This commit is contained in:
9
src/types/IFilter.ts
Normal file
9
src/types/IFilter.ts
Normal file
@ -0,0 +1,9 @@
|
||||
export interface IFilter {
|
||||
sortBy: ('done' | 'id')[]
|
||||
orderBy: ('asc' | 'desc')[]
|
||||
filterBy: 'done'[]
|
||||
filterValue: 'false'[]
|
||||
filterComparator: 'equals'[]
|
||||
filterConcat: 'and'
|
||||
filterIncludeNulls: boolean
|
||||
}
|
16
src/types/IRelationKind.ts
Normal file
16
src/types/IRelationKind.ts
Normal 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
|
@ -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
7
src/types/IRepeatMode.ts
Normal 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]
|
Reference in New Issue
Block a user