mirror of
https://git.moonleay.net/Websites/liljudd-website.git
synced 2025-07-25 11:02:04 +02:00
Fix: Using bigint and added backend testing
This commit is contained in:
parent
ed6195e1e2
commit
89507f8412
20 changed files with 830 additions and 292 deletions
244
src/types/liljudd.d.ts
vendored
244
src/types/liljudd.d.ts
vendored
|
@ -18,33 +18,38 @@ export interface paths {
|
|||
* @description Returns a single guild's config.
|
||||
*/
|
||||
get: operations["getGuildById"];
|
||||
/**
|
||||
* Creates a guild's config by ID
|
||||
* @description Create a guild's config when the bot is has joined a new guild.
|
||||
*/
|
||||
post: operations["postGuildById"];
|
||||
/**
|
||||
* Deletes a guild's config by ID
|
||||
* @description Delete a guild's config when the bot is removed from the guild.
|
||||
*/
|
||||
delete: operations["deleteGuildById"];
|
||||
};
|
||||
"/api/{guildId}/tp_messages": {
|
||||
"/api/{guildId}/timePlanning": {
|
||||
/**
|
||||
* Find the tp_messages of guild by ID
|
||||
* @description Returns tp_messages for a guild
|
||||
* Find the timePlanning of guild by ID
|
||||
* @description Returns timePlanning for a guild
|
||||
*/
|
||||
get: operations["getTp_messagesOfGuildById"];
|
||||
get: operations["gettimePlanningOfGuildById"];
|
||||
/**
|
||||
* Put new message IDs for tp_messages of guild by ID
|
||||
* @description Returns tp_messages for a guild
|
||||
* Put new message IDs for timePlanning of guild by ID
|
||||
* @description Returns timePlanning for a guild
|
||||
*/
|
||||
put: operations["putTp_messagesOfGuildById"];
|
||||
put: operations["puttimePlanningOfGuildById"];
|
||||
};
|
||||
"/api/{guildId}/matches": {
|
||||
/**
|
||||
* Find all matches of guild by ID
|
||||
* @description Returns tp_messages for a guild
|
||||
* @description Returns timePlanning for a guild
|
||||
*/
|
||||
get: operations["getMatchesOfGuildById"];
|
||||
/**
|
||||
* Save a new created match of guild by ID
|
||||
* @description Returns tp_messages for a guild
|
||||
* @description Returns timePlanning for a guild
|
||||
*/
|
||||
post: operations["postMatchOfGuildById"];
|
||||
};
|
||||
|
@ -55,8 +60,7 @@ export type webhooks = Record<string, never>;
|
|||
export interface components {
|
||||
schemas: {
|
||||
guildConfig: {
|
||||
/** @example 1234567890123456800 */
|
||||
guildId: number;
|
||||
guildId: components["schemas"]["id"];
|
||||
/**
|
||||
* Format: text
|
||||
* @example Europe/Berlin
|
||||
|
@ -65,8 +69,7 @@ export interface components {
|
|||
features: {
|
||||
timePlanning: {
|
||||
enabled: boolean;
|
||||
/** @example 1234567890123456800 */
|
||||
channelId: number | null;
|
||||
channelId: components["schemas"]["idOrNull"];
|
||||
/** @example 0 */
|
||||
targetMinute: number;
|
||||
/** @example 1 */
|
||||
|
@ -75,10 +78,8 @@ export interface components {
|
|||
targetDay: number;
|
||||
roles: {
|
||||
enabled: boolean;
|
||||
/** @example 1234567890123456800 */
|
||||
isAvailableRoleId: number | null;
|
||||
/** @example 1234567890123456800 */
|
||||
wantsToBeNotifieRoledId: number | null;
|
||||
isAvailableRoleId: components["schemas"]["idOrNull"];
|
||||
wantsToBeNotifieRoledId: components["schemas"]["idOrNull"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -86,14 +87,10 @@ export interface components {
|
|||
checksum: string;
|
||||
};
|
||||
match: {
|
||||
/** @example 1234567890123456800 */
|
||||
channelId: number;
|
||||
/** @example 1234567890123456800 */
|
||||
createrId: number;
|
||||
/** @example 1234567890123456800 */
|
||||
roleId: number;
|
||||
/** @example 1234567890123456800 */
|
||||
messageId: number;
|
||||
channelId: components["schemas"]["id"];
|
||||
createrId: components["schemas"]["id"];
|
||||
roleId: components["schemas"]["id"];
|
||||
messageId: components["schemas"]["id"];
|
||||
/**
|
||||
* Format: varchar(50)
|
||||
* @example Scrim
|
||||
|
@ -107,26 +104,29 @@ export interface components {
|
|||
/** @example 2020-01-01T00:00:00Z */
|
||||
utc_ts: string;
|
||||
};
|
||||
tp_messages: {
|
||||
/** @example 1234567890123456800 */
|
||||
channelId: number;
|
||||
timePlanning: {
|
||||
enabled: boolean;
|
||||
channelId: components["schemas"]["idOrNull"];
|
||||
rolesEnabled: boolean;
|
||||
isAvailableRoleId: components["schemas"]["idOrNull"];
|
||||
wantsToBeNotifieRoledId: components["schemas"]["idOrNull"];
|
||||
messageIds: {
|
||||
/** @example 1234567890123456800 */
|
||||
0: number | null;
|
||||
/** @example 1234567890123456800 */
|
||||
1: number | null;
|
||||
/** @example 1234567890123456800 */
|
||||
2: number | null;
|
||||
/** @example 1234567890123456800 */
|
||||
3: number | null;
|
||||
/** @example 1234567890123456800 */
|
||||
4: number | null;
|
||||
/** @example 1234567890123456800 */
|
||||
5: number | null;
|
||||
/** @example 1234567890123456800 */
|
||||
6: number | null;
|
||||
0: components["schemas"]["idOrNull"];
|
||||
1: components["schemas"]["idOrNull"];
|
||||
2: components["schemas"]["idOrNull"];
|
||||
3: components["schemas"]["idOrNull"];
|
||||
4: components["schemas"]["idOrNull"];
|
||||
5: components["schemas"]["idOrNull"];
|
||||
6: components["schemas"]["idOrNull"];
|
||||
};
|
||||
};
|
||||
/** @example 1234567890123456789 */
|
||||
id: string;
|
||||
/** @example 1234567890123456789 */
|
||||
idOrNull: string | null;
|
||||
error: {
|
||||
error?: string;
|
||||
};
|
||||
};
|
||||
responses: never;
|
||||
parameters: never;
|
||||
|
@ -155,15 +155,21 @@ export interface operations {
|
|||
};
|
||||
/** @description Invalid ID supplied */
|
||||
400: {
|
||||
content: never;
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
/** @description Unauthorized */
|
||||
401: {
|
||||
content: never;
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
/** @description Guild not found */
|
||||
404: {
|
||||
content: never;
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -187,16 +193,58 @@ export interface operations {
|
|||
};
|
||||
/** @description Invalid ID supplied */
|
||||
400: {
|
||||
content: never;
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
/** @description Unauthorized */
|
||||
401: {
|
||||
content: never;
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
/** @description Guild not found */
|
||||
404: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Creates a guild's config by ID
|
||||
* @description Create a guild's config when the bot is has joined a new guild.
|
||||
*/
|
||||
postGuildById: {
|
||||
parameters: {
|
||||
path: {
|
||||
/** @description ID of guild's config to create */
|
||||
guildId: string;
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description successful operation */
|
||||
204: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Invalid ID supplied */
|
||||
400: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
/** @description Unauthorized */
|
||||
401: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
/** @description Guild not found */
|
||||
404: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/**
|
||||
|
@ -206,7 +254,7 @@ export interface operations {
|
|||
deleteGuildById: {
|
||||
parameters: {
|
||||
path: {
|
||||
/** @description ID of guild config to delete */
|
||||
/** @description ID of guild's config to delete */
|
||||
guildId: string;
|
||||
};
|
||||
};
|
||||
|
@ -217,26 +265,32 @@ export interface operations {
|
|||
};
|
||||
/** @description Invalid ID supplied */
|
||||
400: {
|
||||
content: never;
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
/** @description Unauthorized */
|
||||
401: {
|
||||
content: never;
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
/** @description Guild not found */
|
||||
404: {
|
||||
content: never;
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Find the tp_messages of guild by ID
|
||||
* @description Returns tp_messages for a guild
|
||||
* Find the timePlanning of guild by ID
|
||||
* @description Returns timePlanning for a guild
|
||||
*/
|
||||
getTp_messagesOfGuildById: {
|
||||
gettimePlanningOfGuildById: {
|
||||
parameters: {
|
||||
path: {
|
||||
/** @description ID of guild's tp_messages to return */
|
||||
/** @description ID of guild's timePlanning to return */
|
||||
guildId: string;
|
||||
};
|
||||
};
|
||||
|
@ -244,42 +298,44 @@ export interface operations {
|
|||
/** @description successful operation */
|
||||
200: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["tp_messages"];
|
||||
"application/json": components["schemas"]["timePlanning"];
|
||||
};
|
||||
};
|
||||
/** @description Time planning not enabled for this guild */
|
||||
204: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Invalid ID supplied */
|
||||
400: {
|
||||
content: never;
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
/** @description Unauthorized */
|
||||
401: {
|
||||
content: never;
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
/** @description Guild not found */
|
||||
404: {
|
||||
content: never;
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Put new message IDs for tp_messages of guild by ID
|
||||
* @description Returns tp_messages for a guild
|
||||
* Put new message IDs for timePlanning of guild by ID
|
||||
* @description Returns timePlanning for a guild
|
||||
*/
|
||||
putTp_messagesOfGuildById: {
|
||||
puttimePlanningOfGuildById: {
|
||||
parameters: {
|
||||
path: {
|
||||
/** @description ID of guild's tp_messages to return */
|
||||
/** @description ID of guild's timePlanning to return */
|
||||
guildId: string;
|
||||
};
|
||||
};
|
||||
/** @description Put new message IDs for tp_messages in channel */
|
||||
/** @description Put new message IDs for timePlanning in channel */
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["tp_messages"];
|
||||
"application/json": components["schemas"]["timePlanning"];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
|
@ -289,30 +345,32 @@ export interface operations {
|
|||
};
|
||||
/** @description Invalid ID supplied */
|
||||
400: {
|
||||
content: never;
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
/** @description Unauthorized */
|
||||
401: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Time planning not enabled for this guild */
|
||||
403: {
|
||||
content: never;
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
/** @description Guild not found */
|
||||
404: {
|
||||
content: never;
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Find all matches of guild by ID
|
||||
* @description Returns tp_messages for a guild
|
||||
* @description Returns timePlanning for a guild
|
||||
*/
|
||||
getMatchesOfGuildById: {
|
||||
parameters: {
|
||||
path: {
|
||||
/** @description ID of guild's tp_messages to return */
|
||||
/** @description ID of guild's timePlanning to return */
|
||||
guildId: string;
|
||||
};
|
||||
};
|
||||
|
@ -330,27 +388,29 @@ export interface operations {
|
|||
};
|
||||
};
|
||||
};
|
||||
/** @description Time planning not enabled for this guild */
|
||||
204: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Invalid ID supplied */
|
||||
400: {
|
||||
content: never;
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
/** @description Unauthorized */
|
||||
401: {
|
||||
content: never;
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
/** @description Guild not found */
|
||||
404: {
|
||||
content: never;
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Save a new created match of guild by ID
|
||||
* @description Returns tp_messages for a guild
|
||||
* @description Returns timePlanning for a guild
|
||||
*/
|
||||
postMatchOfGuildById: {
|
||||
parameters: {
|
||||
|
@ -380,15 +440,21 @@ export interface operations {
|
|||
};
|
||||
/** @description Invalid ID supplied */
|
||||
400: {
|
||||
content: never;
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
/** @description Unauthorized */
|
||||
401: {
|
||||
content: never;
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
/** @description Guild not found */
|
||||
404: {
|
||||
content: never;
|
||||
content: {
|
||||
"application/json": components["schemas"]["error"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue