summary refs log tree commit diff
path: root/dist/models/User.js
blob: e40df925738170efbe66c4ea535cf876140f3e8b (plain) (blame)
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
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.UserModel = exports.UserSchema = void 0;
const Activity_1 = require("./Activity");
const Status_1 = require("./Status");
const mongoose_1 = require("mongoose");
const Database_1 = __importDefault(require("../util/Database"));
exports.UserSchema = new mongoose_1.Schema({
    id: mongoose_1.Types.Long,
    username: String,
    discriminator: String,
    avatar: String,
    fingerprints: [String],
    phone: String,
    desktop: Boolean,
    mobile: Boolean,
    premium: Boolean,
    premium_type: Number,
    bot: Boolean,
    system: Boolean,
    nsfw_allowed: Boolean,
    mfa_enabled: Boolean,
    created_at: Date,
    verified: Boolean,
    email: String,
    flags: mongoose_1.Types.Long,
    public_flags: mongoose_1.Types.Long,
    hash: String,
    guilds: [mongoose_1.Types.Long],
    valid_tokens_since: Date,
    user_settings: {
        afk_timeout: Number,
        allow_accessibility_detection: Boolean,
        animate_emoji: Boolean,
        animate_stickers: Number,
        contact_sync_enabled: Boolean,
        convert_emoticons: Boolean,
        custom_status: {
            emoji_id: mongoose_1.Types.Long,
            emoji_name: String,
            expires_at: Number,
            text: String,
        },
        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 },
        gateway_connected: Boolean,
        gif_auto_play: Boolean,
        // every top guild is displayed as a "folder"
        guild_folders: [
            {
                color: Number,
                guild_ids: [mongoose_1.Types.Long],
                id: Number,
                name: String,
            },
        ],
        guild_positions: [mongoose_1.Types.Long],
        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: [mongoose_1.Types.Long],
        show_current_game: Boolean,
        status: String,
        stream_notifications_enabled: Boolean,
        theme: String,
        timezone_offset: Number,
    },
    relationships: [
        {
            id: mongoose_1.Types.Long,
            nickname: String,
            type: Number,
            user_id: mongoose_1.Types.Long,
        },
    ],
    connected_accounts: [
        {
            access_token: String,
            friend_sync: Boolean,
            id: String,
            name: String,
            revoked: Boolean,
            show_activity: Boolean,
            type: String,
            verifie: Boolean,
            visibility: Number,
        },
    ],
    presence: {
        status: String,
        activities: [Activity_1.Activity],
        client_status: Status_1.ClientStatus,
    },
});
// @ts-ignore
exports.UserModel = Database_1.default.model("User", exports.UserSchema, "users");
//# sourceMappingURL=User.js.map