-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
70 lines (62 loc) · 1.52 KB
/
Copy pathtypes.ts
File metadata and controls
70 lines (62 loc) · 1.52 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
export enum View {
LANDING = 'LANDING',
CONNECTION = 'CONNECTION',
TIMELINE = 'TIMELINE',
FOCUS = 'FOCUS',
ANNIVERSARY = 'ANNIVERSARY',
PROFILE = 'PROFILE',
ACCOUNT_SECURITY = 'ACCOUNT_SECURITY',
EDIT_PROFILE = 'EDIT_PROFILE',
}
export interface User {
id: string;
email: string;
// NOTE: passwordHash is intentionally excluded from frontend types — it only exists on the backend model.
invitationCode: string; // User's own unique invite code
boundInvitationCode?: string; // Invite code from another account that user has bound
emailVerified?: boolean;
createdAt: string;
name?: string;
avatar?: string;
gender?: 'male' | 'female';
partnerId?: string | null;
}
export interface ContentAuthor {
id: string;
name?: string;
email?: string;
avatar?: string;
gender?: 'male' | 'female';
}
export interface AuthState {
currentUser: User | null;
users: User[];
}
export interface Memory {
id: string;
title: string;
date: string;
image: string;
rotation: string;
userId?: string;
author?: ContentAuthor | null;
}
export interface YearStat {
year: string;
count: number;
coverMemoryId: string;
}
export type EventType = string;
export const DEFAULT_EVENT_TYPES = ['纪念日', '生日', '旅行', '节日', '其他'] as const;
export interface AnniversaryEvent {
id: string;
title: string;
subtitle: string;
date: string; // YYYY-MM-DD
type: EventType;
image?: string;
userId?: string;
author?: ContentAuthor | null;
createdAt?: string;
updatedAt?: string;
}