-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
46 lines (38 loc) · 805 Bytes
/
types.ts
File metadata and controls
46 lines (38 loc) · 805 Bytes
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
import { Bytes, Timestamp } from 'firebase/firestore';
import { Dispatch, SetStateAction } from 'react';
export type SetValShortcut<T> = Dispatch<SetStateAction<T>>;
export type ToastTypes = 'success' | 'error';
export type UserData = {
encryptedUserKey: string | EncryptedField;
salt: number[];
};
export type Note = {
id: string;
createdAt: Timestamp;
editedAt?: Timestamp;
userId?: string;
title: string;
content: string;
listId: string;
};
export type List = {
id: string;
name: string;
userId?: string;
};
export type Toast = {
type: ToastTypes;
title: string;
description?: string;
id: string;
duration?: number;
};
export type CommitInfo = {
hash: string;
message: string;
date: Date;
};
export type EncryptedField = {
iv: Bytes;
data: Bytes;
};