-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtypes.ts
78 lines (69 loc) · 1.44 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
/*
* Vencord, a Discord client mod
* Copyright (c) 2024 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { ModalProps } from "@utils/modal";
import { User } from "discord-types/general";
type Author = {
github_name?: string;
discord_name: string;
discord_snowflake: string;
};
export interface Theme {
id: string;
name: string;
content: string;
type: string | "theme" | "snippet";
description: string;
version: string;
author: Author | Author[];
likes: number;
tags: string[];
thumbnail_url: string;
release_date: Date;
last_updated?: Date;
guild?: {
name: string;
snowflake: string;
invite_link: string;
};
source?: string;
requiresThemeAttributes?: boolean;
}
export interface ThemeInfoModalProps extends ModalProps {
author: User | User[];
theme: Theme;
}
export const enum TabItem {
THEMES,
SUBMIT_THEMES,
}
export interface LikesComponentProps {
theme: Theme;
userId: User["id"];
}
export const enum SearchStatus {
ALL,
ENABLED,
DISABLED,
THEME,
SNIPPET,
DARK,
LIGHT,
LIKED,
}
export type ThemeLikeProps = {
status: number;
likes: [{
themeId: number;
likes: number;
hasLiked?: boolean;
}];
};
export interface Contributor {
username: User["username"];
github_username: string;
id: User["id"];
avatar: string;
}