-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.d.ts
136 lines (133 loc) · 3.41 KB
/
types.d.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/**
* Represents the types of files including their values and filenames.
*/
type FileTypes = {
/** The value or content of the file. */
value: string
/** The name of the file. */
filename: string
}
/**
* Represents the payload for a discord webhook message.
*/
type WebHookPayload = {
username?: string
avatar_url?: string
content?: string
embeds?: {
color?: number
author?: {
name?: string
url?: string
icon_url?: string
}
title?: string
url?: string
description?: string
fields?: {
name: string
value: string
inline?: boolean
}[]
thumbnail?: {
url: string
}
image?: {
url: string
}
footer?: {
text: string
icon_url?: string
}
timestamp?: string
}[]
tts?: boolean
allowed_mentions?: {
parse?: ('roles' | 'users' | 'everyone')[]
roles?: string[]
users?: string[]
}
}
/**
* Describes the content structure including its metadata and associated files.
*/
type Content = {
/** Unique identifier for the content. */
id: number
/** The creation date of the content. */
created_at: string
/** The title of the content. */
title: string
/** The number of stars the content has received. */
star_count: number
/** The user ID of the content creator. */
user_id: number
/** A brief description of the content. */
description: string
/** An array of files associated with the content. */
content: FileTypes[]
}
/**
* Contains metadata about a user, including authentication and personal information.
*/
type UserMetadata = {
/** Issuer of the token. */
iss: string
/** Subject of the token (usually user ID). */
sub: string
/** Name of the user. */
name: string
/** Email address of the user. */
email: string
/** URL to the user's profile picture. */
picture: string
/** Full name of the user. */
full_name: string
/** URL to the user's avatar. */
avatar_url: string
/** Provider-specific user ID. */
provider_id: string
/** Custom claims attached to the user. */
custom_claims: {
/** A global name identifier for the user. */
global_name: string
}
/** Indicates if the user's email is verified. */
email_verified: boolean
/** Indicates if the user's phone number is verified. */
phone_verified: boolean
/** Indicates if the user is a super admin. */
is_super_admin: boolean | null
/** Creation date of the user record. */
created_at: any
/** Last update date of the user record. */
updated_at: string
/** The user's phone number. */
phone: string | null
/** Date when the phone number was confirmed. */
phone_confirmed_at: string | null
/** Pending phone number change. */
phone_change: string
/** Token for phone number change verification. */
phone_change_token: string
/** Date when the phone change token was sent. */
phone_change_sent_at: string | null
/** Date when the email was confirmed. */
confirmed_at: string
/** Current token for email change verification. */
email_change_token_current: string
/** Status of the email change confirmation. */
email_change_confirm_status: number
/** Date until which the user is banned. */
banned_until: string | null
/** Token for reauthentication. */
reauthentication_token: string
/** Date when the reauthentication token was sent. */
reauthentication_sent_at: string | null
/** Indicates if the user is an SSO user. */
is_sso_user: boolean
/** Date when the user was deleted, if applicable. */
deleted_at: string | null
/** Indicates if the user is anonymous. */
is_anonymous: boolean
}