1.0.0 #253

Merged
edraft merged 262 commits from 1.0.0 into master 2023-03-27 09:30:50 +02:00
4 changed files with 58 additions and 3 deletions
Showing only changes of commit 10d79f8c2c - Show all commits

View File

@ -24,6 +24,7 @@ export interface AutoRoleRule extends Data {
id?: number;
emojiName?: string;
roleId?: string;
roleName?: string;
autoRole?: AutoRole;
}

View File

@ -16,7 +16,7 @@ export class Mutations {
`;
static createAutoRole = `
mutation updateAutoRole($serverId: ID, $channelId: String, $messageId: String) {
mutation createAutoRole($serverId: ID, $channelId: String, $messageId: String) {
autoRole {
createAutoRole(input: { serverId: $serverId, channelId: $channelId, messageId: $messageId }) {
id
@ -29,7 +29,7 @@ export class Mutations {
`;
static deleteAutoRole = `
mutation updateAutoRole($id: ID) {
mutation deleteAutoRole($id: ID) {
autoRole {
deleteAutoRole(id: $id) {
id
@ -40,4 +40,30 @@ export class Mutations {
}
}
`;
static createAutoRoleRule = `
mutation createAutoRoleRule($autoRoleId: ID, $emojiName: String, roleId: String) {
autoRoleRule {
createAutoRoleRule(input: { autoRoleId: $autoRoleId, emojiName: $emojiName, roleId: $roleId }) {
id
emojiName
roleId
roleName
}
}
}
`;
static deleteAutoRoleRule = `
mutation deleteAutoRoleRule($id: ID) {
autoRoleRule {
deleteAutoRoleRule(id: $id) {
id
emojiName
roleId
roleName
}
}
}
`;
}

View File

@ -175,4 +175,27 @@ export class Queries {
}
}
`;
static autoRoleRulesQuery = `
query AutoRoleRuleQuery($serverId: ID, $autoRoleId: ID, $filter: AutoRoleFilter, $page: Page, $sort: Sort) {
servers(filter: {id: $serverId} {
autoRoles(filter: {id: $autoRoleId}) {
autoRoleRuleCount
autoRoleRules(filter: $filter, page: $page, sort: $sort) {
id
emojiName
roleId
roleName
autoRole {
id
}
createdAt
modifiedAt
}
}
}
}
`;
}

View File

@ -1,6 +1,6 @@
import { Server } from "../data/server.model";
import { User } from "../data/user.model";
import { AutoRole } from "../data/auto_role.model";
import { AutoRole, AutoRoleRule } from "../data/auto_role.model";
import { Guild } from "../data/discord.model";
import { Level } from "../data/level.model";
@ -28,3 +28,8 @@ export interface AutoRoleQuery {
autoRoles: AutoRole[];
}
export interface AutoRoleRuleQuery {
autoRoleRuleCount: number;
autoRoleRules: AutoRoleRule[];
}