feat: create types

This was commited on flight VA541 :)
This commit is contained in:
PandaDEV 2024-12-05 19:43:13 +11:00
parent 2f88644005
commit 163b298783
No known key found for this signature in database
GPG key ID: 13EFF9BAF70EE75C
2 changed files with 44 additions and 0 deletions

View file

@ -0,0 +1,23 @@
#[derive(Deserialize, Serialize)]
struct HistoryItem {
id: String,
content_type: ContentType,
content: String,
favicon: String,
timestamp: DATETIME,
}
#[derive(Deserialize, Serialize)]
struct Settings {
key: String,
value: String,
}
enum ContentType {
TEXT,
IMAGE,
FILE,
LINK,
COLOR,
CODE,
}

21
types/types.ts Normal file
View file

@ -0,0 +1,21 @@
export interface HistoryItem {
id: string;
content_type: ContentType;
content: string;
favicon: string;
timestamp: Date;
}
export interface Settings {
key: string;
value: string;
}
export enum ContentType {
TEXT,
IMAGE,
FILE,
LINK,
COLOR,
CODE,
}