-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
110 lines (98 loc) · 2.43 KB
/
Copy pathtypes.ts
File metadata and controls
110 lines (98 loc) · 2.43 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
export interface TableCell {
id: string;
content: string;
}
export interface TableRow {
id: string;
cells: TableCell[];
}
export interface TableContent {
hasHeaders: boolean;
rows: TableRow[];
}
export interface Block {
id:string;
type: 'paragraph' | 'heading1' | 'heading2' | 'image' | 'code' | 'todo' | 'blockquote' | 'bulleted-list-item' | 'divider' | 'table' | 'ai-prompt' | 'json-schema' | 'ui-component';
content: string | TableContent;
checked?: boolean; // For 'todo' blocks
}
export interface Page {
id:string;
title: string;
icon: string;
parentId: string | null;
position: number;
content: Block[];
dueDate: string | null;
status: 'todo' | 'in-progress' | 'done' | null;
}
// Import notification types
import type { Reminder } from './types/notifications';
export interface Event {
id: string;
title: string;
description?: string;
icon?: string; // Emoji icon for visual identification
startDate: string; // ISO string
endDate?: string; // ISO string for multi-day or timed events
allDay: boolean;
status: 'scheduled' | 'completed' | 'cancelled';
priority: 'low' | 'medium' | 'high';
linkedPageId?: string; // Optional reference to a related page
reminders?: Reminder[]; // Notification reminders for this event
createdAt: string;
updatedAt: string;
}
// Sharing Types
export type SharePermission = 'view' | 'edit' | 'admin';
export interface ShareLink {
id: string;
resourceId: string; // Page or Event ID
resourceType: 'page' | 'event';
permission: SharePermission;
isPublic: boolean;
expiresAt?: string; // ISO string
createdBy: string; // User ID
createdAt: string;
updatedAt: string;
}
export interface ShareAccess {
id: string;
resourceId: string; // Page or Event ID
resourceType: 'page' | 'event';
userId: string;
permission: SharePermission;
invitedBy: string; // User ID
createdAt: string;
updatedAt: string;
}
export interface User {
id: string;
email: string;
name?: string;
avatar?: string;
createdAt: string;
updatedAt: string;
}
export interface ShareModalProps {
isOpen: boolean;
onClose: () => void;
resourceId: string;
resourceType: 'page' | 'event';
resourceTitle: string;
}
export interface CollaboratorPresence {
userId: string;
userName: string;
userAvatar?: string;
cursor?: {
x: number;
y: number;
};
selection?: {
blockId: string;
start: number;
end: number;
};
lastSeen: string;
}