Refactor applications

This commit is contained in:
Madeline
2022-12-18 23:45:29 +11:00
parent 44c21039a3
commit b74453d802
11 changed files with 132 additions and 85 deletions
+1
View File
@@ -37,6 +37,7 @@ export class Application extends BaseClass {
@ManyToOne(() => User)
owner: User;
// TODO: enum this? https://discord.com/developers/docs/resources/application#application-object-application-flags
@Column()
flags: number = 0;
@@ -0,0 +1,4 @@
export interface ApplicationCreateSchema {
name: string;
team_id?: string | number;
}
@@ -0,0 +1,14 @@
export interface ApplicationModifySchema {
description?: string;
icon?: string;
interactions_endpoint_url?: string;
max_participants?: number | null;
name?: string;
privacy_policy_url?: string;
role_connections_verification_url?: string;
tags?: string[];
terms_of_service_url?: string;
bot_public?: boolean;
bot_require_code_grant?: boolean;
flags?: number;
}
+4
View File
@@ -0,0 +1,4 @@
export interface BotModifySchema {
avatar?: string;
username?: string;
}
+1
View File
@@ -22,6 +22,7 @@ export const ajv = new Ajv({
messages: true,
strict: true,
strictRequired: true,
allowUnionTypes: true,
});
addFormats(ajv);
+4 -1
View File
@@ -45,4 +45,7 @@ export * from "./UserGuildSettingsSchema";
export * from "./GatewayPayloadSchema";
export * from "./RolePositionUpdateSchema";
export * from "./ChannelReorderSchema";
export * from "./UserSettingsSchema";
export * from "./UserSettingsSchema";
export * from "./BotModifySchema";
export * from "./ApplicationModifySchema";
export * from "./ApplicationCreateSchema";