1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-14 06:32:36 +01:00
server/dist/models/Member.d.ts

44 lines
1.2 KiB
TypeScript
Raw Normal View History

2021-02-13 14:15:59 +01:00
/// <reference path="../util/MongoBigInt.d.ts" />
import { PublicUser, User } from "./User";
2021-02-13 14:15:59 +01:00
import { Schema, Document } from "mongoose";
2021-02-14 20:16:49 +01:00
export interface Member {
2021-02-11 08:33:46 +01:00
id: bigint;
guild_id: bigint;
2021-02-11 08:33:46 +01:00
nick?: string;
roles: bigint[];
2021-02-05 22:01:01 +01:00
joined_at: number;
2021-02-11 08:33:46 +01:00
premium_since?: number;
2021-02-05 22:01:01 +01:00
deaf: boolean;
mute: boolean;
pending: boolean;
2021-02-11 20:44:26 +01:00
settings: UserGuildSettings;
user?: User;
2021-02-11 20:44:26 +01:00
}
2021-02-14 20:16:49 +01:00
export interface MemberDocument extends Member, Document {
id: bigint;
}
2021-02-11 20:44:26 +01:00
export interface UserGuildSettings {
channel_overrides: {
channel_id: bigint;
message_notifications: number;
mute_config: MuteConfig;
muted: boolean;
}[];
message_notifications: number;
mobile_push: boolean;
mute_config: MuteConfig;
muted: boolean;
suppress_everyone: boolean;
suppress_roles: boolean;
version: number;
}
export interface MuteConfig {
end_time: number;
selected_time_window: number;
2021-02-05 22:01:01 +01:00
}
2021-02-13 14:15:59 +01:00
export declare const MemberSchema: Schema<Document<any>, import("mongoose").Model<Document<any>>, undefined>;
2021-02-14 20:16:49 +01:00
export declare const MemberModel: import("mongoose").Model<MemberDocument>;
2021-02-13 14:15:59 +01:00
export interface PublicMember extends Omit<Member, "settings" | "id"> {
user: PublicUser;
}