From 1f7ebe256e00583bf0888d3f9e32ea1b8ef1b237 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Thu, 11 Feb 2021 20:44:12 +0100 Subject: :sparkles: updated other models --- src/models/User.ts | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) (limited to 'src/models/User.ts') diff --git a/src/models/User.ts b/src/models/User.ts index 27e20e1c..36184ce6 100644 --- a/src/models/User.ts +++ b/src/models/User.ts @@ -1,21 +1,55 @@ -import { UserFlags } from "../util/UserFlags"; - export interface User { id: bigint; username: string; discriminator: string; avatar: string | null; + phone?: string; + desktop: boolean; + mobile: boolean; + premium: boolean; + premium_type: number; bot: boolean; system: boolean; + nsfw_allowed: boolean; mfa_enabled: boolean; created_at: number; verified: boolean; email: string; flags: bigint; // TODO: automatically convert BigInt to BitField of UserFlags + public_flags: bigint; hash: string; // hash of the password, salt is saved in password (bcrypt) + guilds: bigint[]; // array of guild ids the user is part of valid_tokens_since: number; // all tokens with a previous issue date are invalid user_settings: UserSettings; - guilds: bigint[] // array of guild ids the user is part of + relationships: Relationship[]; + connected_accounts: ConnectedAccount[]; +} + +export interface PublicUser { + id: bigint; + discriminator: string; + username: string; + avatar?: string; + publicFlags: bigint; +} + +export interface ConnectedAccount { + access_token: string; + friend_sync: boolean; + id: string; + name: string; + revoked: boolean; + show_activity: boolean; + type: string; + verifie: boolean; + visibility: number; +} + +export interface Relationship { + id: bigint; + nickname?: string; + type: number; + user_id: bigint; } export interface UserSettings { -- cgit 1.5.1