You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

65 lines
1.3 KiB

import type { IconName } from "../external/icons";
import type Item from "./item";
import type { LogWithSecondaryItem } from "./log";
import type Project from "./project";
export default interface Task {
id: string
itemId: string
projectId: string
itemAmount: number
name: string
description: string
icon: IconName
active: boolean
createdTime: string
endTime?: string
statusTag?: string
}
export interface TaskWithProject extends Task {
project?: Project
}
export interface TaskResult extends Task {
item: Item
logs: LogWithSecondaryItem[]
completedAmount: number
project?: Project
}
// TaskLink is only returned by the API. The tasks are returned transparently.
export interface TaskLink {
taskId: string
projectId: string
}
export interface TaskFilter {
active?: boolean
expiring?: boolean
sort?: string[]
}
export interface TaskInput {
itemId: string
projectId: string
itemAmount: number
name: string
description: string
active: boolean
endTime?: string | Date
statusTag?: string
}
export interface TaskUpdate {
itemId?: string
itemAmount?: number
name?: string
description?: string
active?: boolean
endTime?: string | Date
clearEndTime?: boolean
statusTag?: string
clearStatusTag?: boolean
projectId?: string
}