summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-06-30 20:11:03 +0200
committerRory& <root@rory.gay>2026-07-01 19:46:31 +0200
commit49c21fb71cf1361609c5d8da7c77595fe2b885c1 (patch)
treeaa31326f0842c14be06275f5aedb4fe411c4aa90
parentEmoji application migration, set explicit foreign key constraint names (diff)
downloadserver-ts-49c21fb71cf1361609c5d8da7c77595fe2b885c1.tar.xz
Fix import in application entity
-rw-r--r--assets/openapi.json153
-rw-r--r--assets/schemas.json161
-rw-r--r--src/database/entities/Application.ts2
3 files changed, 191 insertions, 125 deletions
diff --git a/assets/openapi.json b/assets/openapi.json

index 424ef6d8..65e3a8f6 100644 --- a/assets/openapi.json +++ b/assets/openapi.json
@@ -11202,6 +11202,12 @@ "team": { "$ref": "#/components/schemas/Team" }, + "emojis": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Emoji" + } + }, "id": { "type": "string" } @@ -11210,6 +11216,7 @@ "description", "discoverability_state", "discovery_eligibility_flags", + "emojis", "flags", "hook", "id", @@ -11315,6 +11322,91 @@ "read_only" ] }, + "Emoji": { + "type": "object", + "properties": { + "animated": { + "type": "boolean" + }, + "available": { + "type": "boolean" + }, + "guild_id": { + "type": "string", + "nullable": true + }, + "guild": { + "anyOf": [ + { + "$ref": "#/components/schemas/Guild" + }, + { + "type": "null" + } + ] + }, + "application_id": { + "type": "string", + "nullable": true + }, + "application": { + "anyOf": [ + { + "$ref": "#/components/schemas/Application" + }, + { + "type": "null" + } + ] + }, + "user_id": { + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/User" + }, + "managed": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "require_colons": { + "type": "boolean" + }, + "roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "groups": { + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "type": "string" + } + }, + "required": [ + "animated", + "application", + "application_id", + "available", + "groups", + "guild", + "guild_id", + "id", + "managed", + "name", + "require_colons", + "roles", + "user", + "user_id" + ] + }, "Sticker": { "type": "object", "properties": { @@ -12997,67 +13089,6 @@ "updated_at" ] }, - "Emoji": { - "type": "object", - "properties": { - "animated": { - "type": "boolean" - }, - "available": { - "type": "boolean" - }, - "guild_id": { - "type": "string" - }, - "guild": { - "$ref": "#/components/schemas/Guild" - }, - "user_id": { - "type": "string" - }, - "user": { - "$ref": "#/components/schemas/User" - }, - "managed": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "require_colons": { - "type": "boolean" - }, - "roles": { - "type": "array", - "items": { - "type": "string" - } - }, - "groups": { - "type": "array", - "items": { - "type": "string" - } - }, - "id": { - "type": "string" - } - }, - "required": [ - "animated", - "available", - "groups", - "guild", - "guild_id", - "id", - "managed", - "name", - "require_colons", - "roles", - "user", - "user_id" - ] - }, "GuildWelcomeScreen": { "type": "object", "properties": { diff --git a/assets/schemas.json b/assets/schemas.json
index c49f1375..57c0a6c2 100644 --- a/assets/schemas.json +++ b/assets/schemas.json
@@ -11897,6 +11897,12 @@ "team": { "$ref": "#/definitions/Team" }, + "emojis": { + "type": "array", + "items": { + "$ref": "#/definitions/Emoji" + } + }, "id": { "type": "string" } @@ -11906,6 +11912,7 @@ "description", "discoverability_state", "discovery_eligibility_flags", + "emojis", "flags", "hook", "id", @@ -12018,6 +12025,97 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, + "Emoji": { + "type": "object", + "properties": { + "animated": { + "type": "boolean" + }, + "available": { + "type": "boolean" + }, + "guild_id": { + "type": [ + "null", + "string" + ] + }, + "guild": { + "anyOf": [ + { + "$ref": "#/definitions/Guild" + }, + { + "type": "null" + } + ] + }, + "application_id": { + "type": [ + "null", + "string" + ] + }, + "application": { + "anyOf": [ + { + "$ref": "#/definitions/Application" + }, + { + "type": "null" + } + ] + }, + "user_id": { + "type": "string" + }, + "user": { + "$ref": "#/definitions/User" + }, + "managed": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "require_colons": { + "type": "boolean" + }, + "roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "groups": { + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "animated", + "application", + "application_id", + "available", + "groups", + "guild", + "guild_id", + "id", + "managed", + "name", + "require_colons", + "roles", + "user", + "user_id" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, "Sticker": { "type": "object", "properties": { @@ -13893,69 +13991,6 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "Emoji": { - "type": "object", - "properties": { - "animated": { - "type": "boolean" - }, - "available": { - "type": "boolean" - }, - "guild_id": { - "type": "string" - }, - "guild": { - "$ref": "#/definitions/Guild" - }, - "user_id": { - "type": "string" - }, - "user": { - "$ref": "#/definitions/User" - }, - "managed": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "require_colons": { - "type": "boolean" - }, - "roles": { - "type": "array", - "items": { - "type": "string" - } - }, - "groups": { - "type": "array", - "items": { - "type": "string" - } - }, - "id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "animated", - "available", - "groups", - "guild", - "guild_id", - "id", - "managed", - "name", - "require_colons", - "roles", - "user", - "user_id" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, "GuildWelcomeScreen": { "type": "object", "properties": { diff --git a/src/database/entities/Application.ts b/src/database/entities/Application.ts
index 0085c895..1fcb9e07 100644 --- a/src/database/entities/Application.ts +++ b/src/database/entities/Application.ts
@@ -21,7 +21,7 @@ import { BaseClass } from "./BaseClass"; import { Team } from "./Team"; import { User } from "./User"; import { Guild } from "./Guild"; -import { Emoji } from "@spacebar/database"; +import { Emoji } from "./Emoji"; @Entity({ name: "applications",