-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
84 lines (75 loc) · 1.74 KB
/
types.ts
File metadata and controls
84 lines (75 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import type { ListColorType } from "@/schema";
export type ListColor = ListColorType;
export interface NoteItemType {
id: string;
name: string;
content?: string;
createdAt: Date;
}
export interface ListItemMetaType {
id: string;
name: string;
color?: ListColor;
iconKey?: string | null;
todoCount?: number;
};
export type ListItemMetaMapType = {
[id: string]: Omit<ListItemMetaType, "id">;
};
export type NonNullableDateRange = {
from: Date;
to: Date;
};
export interface TodoItemType {
id: string;
title: string;
description: string | null;
pinned: boolean;
createdAt: Date;
order: number;
priority: "Low" | "Medium" | "High";
dtstart: Date;
durationMinutes: number;
due: Date;
rrule: string | null;
timeZone: string;
userID: string;
completed: boolean;
exdates: Date[];
instances?: overridingInstance[] | null;
instanceDate?: Date | null;
listID?: string | null;
}
export interface overridingInstance {
id: string;
completedAt: Date | null;
todoId: string;
recurId: string;
instanceDate: Date;
overriddenTitle: string | null;
overriddenDescription: string | null;
overriddenDtstart: Date | null;
overriddenDue: Date | null;
overriddenDurationMinutes: number | null;
overriddenPriority: "Low" | "Medium" | "High" | null;
}
export interface recurringTodoItemType extends TodoItemType {
rrule: string;
instances: overridingInstance[];
}
export interface CompletedTodoItemType {
id: string;
originalTodoID: string | null;
title: string;
description?: string;
createdAt: Date;
completedAt: Date;
priority: "Low" | "Medium" | "High";
dtstart: Date;
due: Date;
userID: string;
rrule: string | null;
instanceDate: Date | null;
listName?: string;
listColor?: string;
}