-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathtypes.ts
100 lines (88 loc) · 1.95 KB
/
types.ts
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
import {
Media,
PhotoType,
VideoType,
AudioType,
} from "./lib/models/media_class";
import { User } from "./lib/models/user_class";
export type MediaData = {
uuid: string;
type: string;
uri: string;
};
export type UserData = {
"@id": string;
name: string;
roles: {
administrator: boolean;
contributor: boolean;
};
};
export type Note = {
id: string;
title: string;
text: string;
time: Date;
media: (VideoType | PhotoType)[];
audio: AudioType[];
creator: string;
latitude: string;
longitude: string;
published: boolean | undefined;
tags: string[];
isArchived?: boolean; // Optional flag to indicate if the note is archived
};
export type RootStackParamList = {
Home: undefined;
Login: undefined;
Onboarding: undefined;
Register: undefined;
AccountPage: undefined;
AddNote: { onSave: (note: Note) => void };
EditNote: { note: Note; onSave: (note: Note) => void };
};
export type EditNoteScreenProps = {
route: {
params: {
note: Note;
onSave: (note: Note) => void;
};
};
navigation: {
goBack: () => void;
};
insertImageToEditor: (capturedImage: string) => void;
};
export type RootTabParamList = {
HomeTab: undefined;
Tab1: undefined;
Tab2: undefined;
};
export type HomeScreenProps = {
navigation: any;
route: { params?: { note: Note; onSave: (note: Note) => void } };
showTooltip: boolean;
};
export type ProfilePageProps = {
navigation: any;
};
export type EditNoteProps = {
route: { params: { note: Note; onSave: (note: Note) => void } };
navigation: {
setOptions: (options: { headerTitle: string }) => void;
goBack: () => void;
};
};
export type AddNoteScreenProps = {
navigation: any;
route: any;
};
export type ImageNote = {
image: string;
note: Note;
};
export type GoogleMapProps = {
route: any; // substitute any with the actual type if you know it
updateCounter: any; // substitute any with the actual type if you know it
user: User;
};