mirror of
https://github.com/spacebarchat/server.git
synced 2026-06-01 19:54:45 +00:00
Refactor applications
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export interface BotModifySchema {
|
||||
avatar?: string;
|
||||
username?: string;
|
||||
}
|
||||
@@ -22,6 +22,7 @@ export const ajv = new Ajv({
|
||||
messages: true,
|
||||
strict: true,
|
||||
strictRequired: true,
|
||||
allowUnionTypes: true,
|
||||
});
|
||||
|
||||
addFormats(ajv);
|
||||
|
||||
@@ -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";
|
||||
Reference in New Issue
Block a user