From e8070371450962d269293fd6af1a8c6a51444c25 Mon Sep 17 00:00:00 2001
From: TomatoCake <60300461+DEVTomatoCake@users.noreply.github.com>
Date: Sat, 31 Aug 2024 11:04:18 +0200
Subject: [PATCH] Add more application properties
---
assets/openapi.json | 18 +
assets/schemas.json | 1224 +++++++++++++++++
src/api/routes/applications/#id/index.ts | 25 +-
src/util/entities/Application.ts | 25 +-
.../1725090962922-applicationProperties.ts | 23 +
.../1725090962922-applicationProperties.ts | 23 +
.../1725090962922-applicationProperties.ts | 23 +
src/util/schemas/ApplicationModifySchema.ts | 13 +-
8 files changed, 1363 insertions(+), 11 deletions(-)
create mode 100644 src/util/migration/mariadb/1725090962922-applicationProperties.ts
create mode 100644 src/util/migration/mysql/1725090962922-applicationProperties.ts
create mode 100644 src/util/migration/postgres/1725090962922-applicationProperties.ts
diff --git a/assets/openapi.json b/assets/openapi.json
index b1818f4b..35b75a77 100644
--- a/assets/openapi.json
+++ b/assets/openapi.json
@@ -136,6 +136,9 @@
"icon": {
"type": "string"
},
+ "cover_image": {
+ "type": "string"
+ },
"interactions_endpoint_url": {
"type": "string"
},
@@ -169,6 +172,12 @@
},
"flags": {
"type": "integer"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
}
}
},
@@ -3099,6 +3108,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/components/schemas/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/components/schemas/Team"
},
diff --git a/assets/schemas.json b/assets/schemas.json
index c92ac3e9..6681e695 100644
--- a/assets/schemas.json
+++ b/assets/schemas.json
@@ -113,6 +113,9 @@
"icon": {
"type": "string"
},
+ "cover_image": {
+ "type": "string"
+ },
"interactions_endpoint_url": {
"type": "string"
},
@@ -148,6 +151,12 @@
},
"flags": {
"type": "integer"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
}
},
"additionalProperties": false,
@@ -3259,6 +3268,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -8111,6 +8129,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -12963,6 +12990,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -17810,6 +17846,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -22693,6 +22738,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -27545,6 +27599,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -32388,6 +32451,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -37234,6 +37306,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -42089,6 +42170,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -46932,6 +47022,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -51775,6 +51874,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -56634,6 +56742,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -61480,6 +61597,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -66384,6 +66510,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -71249,6 +71384,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -76255,6 +76399,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -81119,6 +81272,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -85993,6 +86155,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -90851,6 +91022,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -95713,6 +95893,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -100565,6 +100754,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -105405,6 +105603,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -110382,6 +110589,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -115213,6 +115429,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -120187,6 +120412,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -125032,6 +125266,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -129883,6 +130126,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -134729,6 +134981,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -139573,6 +139834,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -144451,6 +144721,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -149295,6 +149574,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -154138,6 +154426,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -159017,6 +159314,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -163875,6 +164181,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -168722,6 +169037,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -173643,6 +173967,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -178483,6 +178816,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -183326,6 +183668,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -188169,6 +188520,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -193011,6 +193371,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -197861,6 +198230,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -202717,6 +203095,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -207557,6 +207944,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -212446,6 +212842,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -217326,6 +217731,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -222166,6 +222580,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -227031,6 +227454,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -231991,6 +232423,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -236830,6 +237271,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -241708,6 +242158,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -246574,6 +247033,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -251492,6 +251960,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -256332,6 +256809,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -261180,6 +261666,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -266018,6 +266513,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -270862,6 +271366,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -275706,6 +276219,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -280636,6 +281158,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -285480,6 +286011,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -290356,6 +290896,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -295204,6 +295753,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -300042,6 +300600,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -304886,6 +305453,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -309741,6 +310317,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -314610,6 +315195,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -319450,6 +320044,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -324293,6 +324896,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -329165,6 +329777,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -334132,6 +334753,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -339051,6 +339681,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -343898,6 +344537,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -348738,6 +349386,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -353578,6 +354235,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -358425,6 +359091,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -363269,6 +363944,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -368109,6 +368793,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -373024,6 +373717,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -377875,6 +378577,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -382727,6 +383438,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -387629,6 +388349,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -392490,6 +393219,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -397357,6 +398095,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -402218,6 +402965,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -407058,6 +407814,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -411895,6 +412660,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -416763,6 +417537,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -421643,6 +422426,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -426477,6 +427269,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -431321,6 +432122,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -436161,6 +436971,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -441008,6 +441827,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -446059,6 +446887,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -450890,6 +451727,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -455821,6 +456667,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -460655,6 +461510,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -465489,6 +466353,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -470323,6 +471196,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -475257,6 +476139,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -480089,6 +480980,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -484921,6 +485821,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -489753,6 +490662,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -494587,6 +495505,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -499421,6 +500348,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -504255,6 +505191,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -509089,6 +510034,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -513923,6 +514877,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -518821,6 +519784,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -523655,6 +524627,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -528489,6 +529470,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -533323,6 +534313,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -538204,6 +539203,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -543175,6 +544183,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -548009,6 +549026,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -552843,6 +553869,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -557677,6 +558712,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -562511,6 +563555,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -567371,6 +568424,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -572205,6 +573267,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -577037,6 +578108,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -581892,6 +582972,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -586740,6 +587829,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -591707,6 +592805,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -596565,6 +597672,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -601417,6 +602533,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -606261,6 +607386,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -611105,6 +612239,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -615936,6 +617079,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -620782,6 +621934,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -625625,6 +626786,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -630483,6 +631653,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -635345,6 +636524,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -640186,6 +641374,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -645026,6 +646223,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -649866,6 +651072,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
@@ -654712,6 +655927,15 @@
"privacy_policy_url": {
"type": "string"
},
+ "guild_id": {
+ "type": "string"
+ },
+ "guild": {
+ "$ref": "#/definitions/Guild"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
"team": {
"$ref": "#/definitions/Team"
},
diff --git a/src/api/routes/applications/#id/index.ts b/src/api/routes/applications/#id/index.ts
index 949d66f8..2b4bcd88 100644
--- a/src/api/routes/applications/#id/index.ts
+++ b/src/api/routes/applications/#id/index.ts
@@ -1,17 +1,17 @@
/*
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
Copyright (C) 2023 Spacebar and Spacebar Contributors
-
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
*/
@@ -21,6 +21,7 @@ import {
Application,
ApplicationModifySchema,
DiscordApiErrors,
+ Guild,
handleFile,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
@@ -90,6 +91,24 @@ router.patch(
body.icon as string,
);
}
+ if (body.cover_image) {
+ body.cover_image = await handleFile(
+ `/app-icons/${app.id}`,
+ body.cover_image as string,
+ );
+ }
+
+ if (body.guild_id) {
+ const guild = await Guild.findOneOrFail({
+ where: { id: body.guild_id },
+ select: ["owner_id"],
+ });
+ if (guild.owner_id != req.user_id)
+ throw new HTTPError(
+ "You must be the owner of the guild to link it to an application",
+ 400,
+ );
+ }
if (app.bot) {
app.bot.assign({ bio: body.description });
diff --git a/src/util/entities/Application.ts b/src/util/entities/Application.ts
index 4ed75f27..747ef860 100644
--- a/src/util/entities/Application.ts
+++ b/src/util/entities/Application.ts
@@ -16,11 +16,19 @@
along with this program. If not, see .
*/
-import { Column, Entity, JoinColumn, ManyToOne, OneToOne } from "typeorm";
+import {
+ Column,
+ Entity,
+ JoinColumn,
+ ManyToOne,
+ OneToOne,
+ RelationId,
+} from "typeorm";
import { BaseClass } from "./BaseClass";
import { Team } from "./Team";
import { User } from "./User";
import { dbEngine } from "../util/Database";
+import { Guild } from "./Guild";
@Entity({
name: "applications",
@@ -108,15 +116,22 @@ export class Application extends BaseClass {
@Column({ nullable: true })
privacy_policy_url?: string;
+ @Column({ nullable: true })
+ @RelationId((application: Application) => application.guild)
+ guild_id?: string;
+
+ @JoinColumn({ name: "guild_id" })
+ @ManyToOne(() => Guild)
+ guild?: Guild; // guild to which the app is linked, e.g. a developer support server
+
+ @Column({ nullable: true })
+ custom_install_url?: string;
+
//just for us
//@Column({ type: "simple-array", nullable: true })
//rpc_origins?: string[];
- //@JoinColumn({ name: "guild_id" })
- //@ManyToOne(() => Guild)
- //guild?: Guild; // if this application is a game sold, this field will be the guild to which it has been linked
-
//@Column({ nullable: true })
//primary_sku_id?: string; // if this application is a game sold, this field will be the id of the "Game SKU" that is created,
diff --git a/src/util/migration/mariadb/1725090962922-applicationProperties.ts b/src/util/migration/mariadb/1725090962922-applicationProperties.ts
new file mode 100644
index 00000000..ee8c0bea
--- /dev/null
+++ b/src/util/migration/mariadb/1725090962922-applicationProperties.ts
@@ -0,0 +1,23 @@
+import { MigrationInterface, QueryRunner } from "typeorm";
+
+export class ApplicationProperties1725090962922 implements MigrationInterface {
+ name = "ApplicationProperties1725090962922";
+
+ public async up(queryRunner: QueryRunner): Promise {
+ await queryRunner.query(
+ "ALTER TABLE `applications` ADD COLUMN `guild_id` VARCHAR(255) NOT NULL",
+ );
+ await queryRunner.query(
+ "ALTER TABLE `applications` ADD COLUMN `custom_install_url` TEXT NOT NULL",
+ );
+ }
+
+ public async down(queryRunner: QueryRunner): Promise {
+ await queryRunner.query(
+ "ALTER TABLE `applications` DROP COLUMN `guild_id`",
+ );
+ await queryRunner.query(
+ "ALTER TABLE `applications` DROP COLUMN `custom_install_url`",
+ );
+ }
+}
diff --git a/src/util/migration/mysql/1725090962922-applicationProperties.ts b/src/util/migration/mysql/1725090962922-applicationProperties.ts
new file mode 100644
index 00000000..ee8c0bea
--- /dev/null
+++ b/src/util/migration/mysql/1725090962922-applicationProperties.ts
@@ -0,0 +1,23 @@
+import { MigrationInterface, QueryRunner } from "typeorm";
+
+export class ApplicationProperties1725090962922 implements MigrationInterface {
+ name = "ApplicationProperties1725090962922";
+
+ public async up(queryRunner: QueryRunner): Promise {
+ await queryRunner.query(
+ "ALTER TABLE `applications` ADD COLUMN `guild_id` VARCHAR(255) NOT NULL",
+ );
+ await queryRunner.query(
+ "ALTER TABLE `applications` ADD COLUMN `custom_install_url` TEXT NOT NULL",
+ );
+ }
+
+ public async down(queryRunner: QueryRunner): Promise {
+ await queryRunner.query(
+ "ALTER TABLE `applications` DROP COLUMN `guild_id`",
+ );
+ await queryRunner.query(
+ "ALTER TABLE `applications` DROP COLUMN `custom_install_url`",
+ );
+ }
+}
diff --git a/src/util/migration/postgres/1725090962922-applicationProperties.ts b/src/util/migration/postgres/1725090962922-applicationProperties.ts
new file mode 100644
index 00000000..d43a0277
--- /dev/null
+++ b/src/util/migration/postgres/1725090962922-applicationProperties.ts
@@ -0,0 +1,23 @@
+import { MigrationInterface, QueryRunner } from "typeorm";
+
+export class ApplicationProperties1725090962922 implements MigrationInterface {
+ name = "ApplicationProperties1725090962922";
+
+ public async up(queryRunner: QueryRunner): Promise {
+ await queryRunner.query(
+ "ALTER TABLE applications ADD COLUMN guild_id TEXT NOT NULL",
+ );
+ await queryRunner.query(
+ "ALTER TABLE applications ADD COLUMN custom_install_url TEXT NOT NULL",
+ );
+ }
+
+ public async down(queryRunner: QueryRunner): Promise {
+ await queryRunner.query(
+ "ALTER TABLE applications DROP COLUMN guild_id",
+ );
+ await queryRunner.query(
+ "ALTER TABLE applications DROP COLUMN custom_install_url",
+ );
+ }
+}
diff --git a/src/util/schemas/ApplicationModifySchema.ts b/src/util/schemas/ApplicationModifySchema.ts
index f75dd5b1..a8717976 100644
--- a/src/util/schemas/ApplicationModifySchema.ts
+++ b/src/util/schemas/ApplicationModifySchema.ts
@@ -1,17 +1,17 @@
/*
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
Copyright (C) 2023 Spacebar and Spacebar Contributors
-
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
*/
@@ -19,6 +19,7 @@
export interface ApplicationModifySchema {
description?: string;
icon?: string;
+ cover_image?: string;
interactions_endpoint_url?: string;
max_participants?: number | null;
name?: string;
@@ -29,4 +30,10 @@ export interface ApplicationModifySchema {
bot_public?: boolean;
bot_require_code_grant?: boolean;
flags?: number;
+ custom_install_url?: string;
+ guild_id?: string;
+ /*install_params?: { TODO: Validation
+ scopes: string[];
+ permissions: string;
+ };*/
}