[WIP] Improved auto roles #134
This commit is contained in:
31
kdb-web/src/app/models/data/discord.model.ts
Normal file
31
kdb-web/src/app/models/data/discord.model.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
export interface Guild {
|
||||
id?: string;
|
||||
name?: string;
|
||||
|
||||
channels: [Channel]
|
||||
role: [Role]
|
||||
emojis: [Emoji]
|
||||
}
|
||||
|
||||
export interface Channel {
|
||||
id?: string;
|
||||
name?: string;
|
||||
type?: ChannelType;
|
||||
}
|
||||
|
||||
export enum ChannelType {
|
||||
category = "category",
|
||||
text = "text",
|
||||
voice = "voice"
|
||||
}
|
||||
|
||||
export interface Role {
|
||||
id?: string;
|
||||
name?: string;
|
||||
}
|
||||
|
||||
export interface Emoji {
|
||||
id?: string;
|
||||
name?: string;
|
||||
url?: string;
|
||||
}
|
@@ -1,5 +1,29 @@
|
||||
export class Queries {
|
||||
|
||||
static guildsQuery = `
|
||||
query GuildsQuery($id: ID) {
|
||||
guilds(filter: {id: $id}) {
|
||||
id
|
||||
name
|
||||
|
||||
channels {
|
||||
id
|
||||
name
|
||||
type
|
||||
}
|
||||
roles {
|
||||
id
|
||||
name
|
||||
}
|
||||
emojis {
|
||||
id
|
||||
name
|
||||
url
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
static serversQuery = `
|
||||
query ServerInfo($filter: ServerFilter, $page: Page, $sort: Sort) {
|
||||
servers(filter: $filter, page: $page, sort: $sort) {
|
||||
|
@@ -1,12 +1,17 @@
|
||||
import { Server } from "../data/server.model";
|
||||
import { User } from "../data/user.model";
|
||||
import { AutoRole } from "../data/auto_role.model";
|
||||
import { Guild } from "../data/discord.model";
|
||||
|
||||
export interface Query {
|
||||
serverCount: number;
|
||||
servers: Server[];
|
||||
}
|
||||
|
||||
export interface SingleDiscordQuery {
|
||||
guilds: Guild[];
|
||||
}
|
||||
|
||||
export interface UserListQuery {
|
||||
userCount: number;
|
||||
users: User[];
|
||||
|
Reference in New Issue
Block a user