This repository was archived by the owner on Feb 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.d.ts
More file actions
72 lines (64 loc) · 1.43 KB
/
types.d.ts
File metadata and controls
72 lines (64 loc) · 1.43 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
71
72
export type ticket = {
id: string;
opened: { timestamp: string; reason: string; by: { id: string; username: string; avatar: string } };
closed: { timestamp: string; reason: string; by: { id: string; username: string; avatar: string } };
};
export type message = {
username: string;
id: string;
timestamp: number;
content: string;
avatar: string;
bot: boolean;
};
export type fullTicket = {
ticket: ticket;
messages: message[];
};
export type user = {
id: string;
username: string;
admin: boolean;
tickets: string[];
};
export type discordApiUser = {
id: string;
username: string;
avatar: string;
discriminator: string;
public_flags: number;
flags: number;
banner: null | string;
accent_color: number;
global_name: string;
avatar_decoration_data: null | { asset: string; sku_id: string };
banner_color: string;
mfa_enabled: boolean;
locale: string;
premium_type: number;
};
export type oauthData = {
token_type: string;
access_token: string;
expires_in: number;
refresh_token: string;
scope: string;
id?: string;
username?: string;
};
export declare module 'express-session' {
interface SessionData {
oauthData?: oauthData;
userData?: discordApiUser;
ticketId?: string;
}
}
export interface userResult {
success: boolean;
info: user;
}
export type mongoResponse = {
success: boolean;
info: string | user | ticket | message[] | fullTicket;
error?: string;
};