move validationResult to value instead, add create, delete, list, info route for guilds
All checks were successful
Code quality checks / biome (push) Successful in 11s

This commit is contained in:
creations 2025-06-18 18:43:47 -04:00
parent ca0410f7fb
commit 1e6003079b
Signed by: creations
GPG key ID: 8F553AA4320FC711
30 changed files with 870 additions and 90 deletions

View file

@ -0,0 +1,39 @@
interface GuildResponse {
id: string;
name: string;
description: string | null;
iconUrl: string | null;
bannerUrl: string | null;
splashUrl: string | null;
ownerId: string;
verificationLevel: number;
defaultMessageNotifications: number;
systemChannelId: string | null;
rulesChannelId: string | null;
publicUpdatesChannelId: string | null;
features: string[];
preferredLocale: string;
createdAt: string;
updatedAt: string;
}
interface GuildRow {
id: string;
name: string;
description: string | null;
icon_url: string | null;
banner_url: string | null;
splash_url: string | null;
owner_id: string;
verification_level: number;
default_message_notifications: number;
system_channel_id: string | null;
rules_channel_id: string | null;
public_updates_channel_id: string | null;
features: Set<string>;
preferred_locale: string;
created_at: Date;
updated_at: Date;
}
export type { GuildResponse, GuildRow };

View file

@ -0,0 +1,15 @@
import type { BaseResponse } from "../base";
import type { GuildResponse } from "./base";
interface CreateGuildRequest {
name: string;
description?: string;
icon_url?: string;
banner_url?: string;
}
interface CreateGuildResponse extends BaseResponse {
guild?: GuildResponse;
}
export type { CreateGuildRequest, CreateGuildResponse };

View file

@ -0,0 +1,6 @@
interface DeleteGuildRequest {
id: string;
name: string;
}
export type { DeleteGuildRequest };

View file

@ -0,0 +1,4 @@
export * from "./base";
export * from "./create";
export * from "./delete";
export * from "./list";

View file

@ -0,0 +1,9 @@
import type { BaseResponse } from "../base";
import type { GuildResponse } from "./base";
interface GuildListResponse extends BaseResponse {
guilds?: GuildResponse[];
count?: number;
}
export type { GuildListResponse };

View file

@ -1,3 +1,4 @@
export * from "./user";
export * from "./health";
export * from "./base";
export * from "./guild";