Schemas for stickers

This commit is contained in:
Rory&
2026-03-17 02:36:54 +01:00
parent 4850d73e51
commit ecea5540fa
7 changed files with 22 additions and 28 deletions
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -29,7 +29,7 @@ router.get(
route({
responses: {
200: {
body: "APIStickerArray",
body: "StickersResponse",
},
403: {
body: "APIErrorResponse",
+1 -1
View File
@@ -27,7 +27,7 @@ router.get(
route({
responses: {
200: {
body: "APIStickerPackArray",
body: "StickersResponse",
},
},
}),
+20
View File
@@ -1,3 +1,23 @@
import { Snowflake } from "../../Identifiers";
import { PartialUser } from "../users";
export type StickersResponse = StickerResponse[];
export interface StickerResponse {
id: Snowflake;
pack_id?: Snowflake;
name: string;
description: string | null;
tags: string;
type: StickerType;
format_type: StickerFormatType;
available?: boolean;
guild_id?: Snowflake;
// Only filled for Get Guild Sticker(/s)
user?: PartialUser;
// Only filled in for sticker packs
sort_value?: number;
}
export enum StickerType {
STANDARD = 1,
GUILD = 2,
-25
View File
@@ -25,15 +25,10 @@ import { GuildBansResponse, GuildCreateResponse, PrivateUser, PublicMember, Publ
// TODO: remove this entire file!
// removes internal properties from the guild class
export type APIGuild = Omit<Guild, "afk_channel" | "template" | "owner" | "public_updates_channel" | "rules_channel" | "system_channel" | "widget_channel">;
export type APIPublicUser = PublicUser;
export type APIPrivateUser = PrivateUser;
export type APIGuildArray = APIGuild[];
export type APIDMChannelArray = DmChannelDTO[];
export type APIBackupCodeArray = BackupCode[];
export interface UserUpdateResponse extends APIPrivateUser {
@@ -41,29 +36,16 @@ export interface UserUpdateResponse extends APIPrivateUser {
}
export type ApplicationDetectableResponse = unknown[];
export type ApplicationEntitlementsResponse = unknown[];
export type ApplicationSkusResponse = unknown[];
export type APIApplicationArray = Application[];
export type APIBansArray = GuildBansResponse[];
export type APIInviteArray = Invite[];
export type APIMessageArray = Message[];
export type APIWebhookArray = Webhook[];
export type APIDiscoveryCategoryArray = Categories[];
export type APIGeneralConfiguration = GeneralConfiguration;
export type APIChannelArray = Channel[];
export type APIEmojiArray = Emoji[];
export type APIMemberArray = Member[];
export type APIPublicMember = PublicMember;
@@ -72,17 +54,10 @@ export interface APIGuildWithJoinedAt extends GuildCreateResponse {
}
export type APIRoleArray = Role[];
export type APIStickerArray = Sticker[];
export type APITemplateArray = Template[];
export type APIGuildVoiceRegion = GuildVoiceRegion[];
export type APILimitsConfiguration = LimitsConfiguration;
export type APIStickerPackArray = StickerPack[];
export type APIConnectionsConfiguration = Record<
string,
{
-1
View File
@@ -17,7 +17,6 @@
*/
import { BeforeRemove, Column, Entity, JoinColumn, ManyToOne, RelationId } from "typeorm";
import { URL } from "url";
import { deleteFile } from "../util";
import { BaseClass } from "./BaseClass";
import { getUrlSignature, NewUrlUserSignatureData, NewUrlSignatureData } from "../Signing";