Polarcraft/webv2/types/global.d.ts

44 lines
768 B
TypeScript

import { Document, Types } from 'mongoose'
export {}
declare global {
interface IUser extends Document {
_id: Types.ObjectId,
username: string,
usernameType: string,
discord: {
id: string,
username: string,
avatarHash: string
},
minecraft?: {
uuid: string,
username: string
},
teamInvites: Types.ObjectId[],
role: {
admin: boolean,
moderator: boolean,
},
team?: ITeam,
accessToken?: string
}
interface IWhitelist {
_id: types.ObjectId,
uuid: string,
connected: boolean,
code: string
}
interface ITeam {
_id: types.ObjectId,
name: string,
color: string,
members: string[],
textChannelId: string,
voiceChannelId: string
}
}