1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-09-22 18:51:36 +02:00
server/dist/models/User.d.ts

112 lines
3.0 KiB
TypeScript
Raw Normal View History

2021-02-13 14:15:59 +01:00
/// <reference path="../util/MongoBigInt.d.ts" />
import { Activity } from "./Activity";
import { ClientStatus, Status } from "./Status";
2021-02-13 14:15:59 +01:00
import { Schema, Document } from "mongoose";
2021-02-22 17:34:30 +01:00
export interface User {
2021-02-05 22:01:01 +01:00
id: bigint;
username: string;
discriminator: string;
avatar: string | null;
2021-02-13 21:52:06 +01:00
fingerprints: string[];
2021-02-11 20:44:26 +01:00
phone?: string;
desktop: boolean;
mobile: boolean;
premium: boolean;
premium_type: number;
2021-02-05 22:01:01 +01:00
bot: boolean;
system: boolean;
2021-02-22 17:34:30 +01:00
level: string;
2021-02-11 20:44:26 +01:00
nsfw_allowed: boolean;
2021-02-05 22:01:01 +01:00
mfa_enabled: boolean;
2021-03-08 18:41:31 +01:00
created_at: Date;
2021-02-05 22:01:01 +01:00
verified: boolean;
2021-03-04 21:59:49 +01:00
email?: string;
2021-02-05 22:01:01 +01:00
flags: bigint;
2021-02-11 20:44:26 +01:00
public_flags: bigint;
2021-02-05 22:01:01 +01:00
hash: string;
2021-02-17 19:00:26 +01:00
guilds: bigint[];
2021-03-08 18:41:31 +01:00
valid_tokens_since: Date;
2021-02-05 22:01:01 +01:00
user_settings: UserSettings;
2021-02-11 20:44:26 +01:00
relationships: Relationship[];
connected_accounts: ConnectedAccount[];
presence: {
status: Status;
activities: Activity[];
client_status: ClientStatus;
};
2021-02-11 20:44:26 +01:00
}
2021-02-22 17:34:30 +01:00
export interface UserDocument extends User, Document {
id: bigint;
}
2021-02-11 20:44:26 +01:00
export interface PublicUser {
id: bigint;
discriminator: string;
username: string;
avatar?: string;
2021-02-22 17:34:30 +01:00
public_flags: bigint;
2021-02-11 20:44:26 +01:00
}
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;
2021-02-05 22:01:01 +01:00
}
export interface UserSettings {
afk_timeout: number;
allow_accessibility_detection: boolean;
animate_emoji: boolean;
animate_stickers: number;
contact_sync_enabled: boolean;
convert_emoticons: boolean;
custom_status: {
emoji_id: bigint | null;
emoji_name: string | null;
expires_at: number | null;
text: string | null;
};
default_guilds_restricted: boolean;
detect_platform_accounts: boolean;
developer_mode: boolean;
disable_games_tab: boolean;
enable_tts_command: boolean;
explicit_content_filter: number;
friend_source_flags: {
all: boolean;
};
2021-03-04 21:59:49 +01:00
gateway_connected: boolean;
2021-02-05 22:01:01 +01:00
gif_auto_play: boolean;
guild_folders: {
color: number;
guild_ids: bigint[];
id: number;
name: string;
}[];
guild_positions: bigint[];
inline_attachment_media: boolean;
inline_embed_media: boolean;
locale: string;
message_display_compact: boolean;
native_phone_integration_enabled: boolean;
render_embeds: boolean;
render_reactions: boolean;
restricted_guilds: bigint[];
show_current_game: boolean;
status: "online" | "offline" | "dnd" | "idle";
stream_notifications_enabled: boolean;
theme: "dark" | "white";
timezone_offset: number;
}
2021-02-13 14:15:59 +01:00
export declare const UserSchema: Schema<Document<any>, import("mongoose").Model<Document<any>>, undefined>;
2021-02-22 17:34:30 +01:00
export declare const UserModel: import("mongoose").Model<UserDocument>;