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.

64 lines
1.3 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. import type { IconName } from "../external/icons";
  2. import type Item from "./item";
  3. import type { LogWithSecondaryItem } from "./log";
  4. import type Project from "./project";
  5. export default interface Task {
  6. id: string
  7. itemId: string
  8. projectId: string
  9. itemAmount: number
  10. name: string
  11. description: string
  12. icon: IconName
  13. active: boolean
  14. createdTime: string
  15. endTime?: string
  16. statusTag?: string
  17. }
  18. export interface TaskWithProject extends Task {
  19. project?: Project
  20. }
  21. export interface TaskResult extends Task {
  22. item: Item
  23. logs: LogWithSecondaryItem[]
  24. completedAmount: number
  25. project?: Project
  26. }
  27. // TaskLink is only returned by the API. The tasks are returned transparently.
  28. export interface TaskLink {
  29. taskId: string
  30. projectId: string
  31. }
  32. export interface TaskFilter {
  33. active?: boolean
  34. expiring?: boolean
  35. sort?: string[]
  36. }
  37. export interface TaskInput {
  38. itemId: string
  39. projectId: string
  40. itemAmount: number
  41. name: string
  42. description: string
  43. active: boolean
  44. endTime?: string | Date
  45. statusTag?: string
  46. }
  47. export interface TaskUpdate {
  48. itemId?: string
  49. itemAmount?: number
  50. name?: string
  51. description?: string
  52. active?: boolean
  53. endTime?: string | Date
  54. clearEndTime?: boolean
  55. statusTag?: string
  56. clearStatusTag?: boolean
  57. projectId?: string
  58. }