mirror of
https://git.moonleay.net/Websites/liljudd-website.git
synced 2025-07-25 11:02:04 +02:00
Fix: Finished Backend
This commit is contained in:
parent
6b388729d9
commit
ffaf8d989e
30 changed files with 1478 additions and 873 deletions
335
src/types/liljudd.d.ts
vendored
335
src/types/liljudd.d.ts
vendored
|
@ -5,24 +5,48 @@
|
|||
|
||||
|
||||
export interface paths {
|
||||
"/api/config/{guildId}": {
|
||||
"/api/boot": {
|
||||
/**
|
||||
* Find guild config by ID
|
||||
* @description Returns a single guild config
|
||||
* Retrieve all guild's configs
|
||||
* @description Returns all guild's configs.
|
||||
*/
|
||||
get: operations["getGuildsForBoot"];
|
||||
};
|
||||
"/api/{guildId}/config": {
|
||||
/**
|
||||
* Find a guild's config by ID
|
||||
* @description Returns a single guild's config.
|
||||
*/
|
||||
get: operations["getGuildById"];
|
||||
/**
|
||||
* Deletes a guild config by ID
|
||||
* @description Delete a guild's config
|
||||
* 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/tp_messages/{guildId}": {
|
||||
"/api/{guildId}/tp_messages": {
|
||||
/**
|
||||
* Find guild by ID for it's tp_messages
|
||||
* Find the tp_messages of guild by ID
|
||||
* @description Returns tp_messages for a guild
|
||||
*/
|
||||
get: operations["getTp_messagesOfGuildById"];
|
||||
/**
|
||||
* Put new message IDs for tp_messages of guild by ID
|
||||
* @description Returns tp_messages for a guild
|
||||
*/
|
||||
put: operations["putTp_messagesOfGuildById"];
|
||||
};
|
||||
"/api/{guildId}/matches": {
|
||||
/**
|
||||
* Find all matches of guild by ID
|
||||
* @description Returns tp_messages for a guild
|
||||
*/
|
||||
get: operations["getMatchesOfGuildById"];
|
||||
/**
|
||||
* Save a new created match of guild by ID
|
||||
* @description Returns tp_messages for a guild
|
||||
*/
|
||||
post: operations["postMatchOfGuildById"];
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -32,66 +56,124 @@ export interface components {
|
|||
schemas: {
|
||||
guildConfig: {
|
||||
/**
|
||||
* Format: varchar(19)
|
||||
* Format: varchar(20)
|
||||
* @example 1234567890123456789
|
||||
*/
|
||||
guildID?: string;
|
||||
features?: {
|
||||
time_planning?: {
|
||||
guildId: string;
|
||||
/**
|
||||
* Format: text
|
||||
* @example Europe/Berlin
|
||||
*/
|
||||
timezone: string;
|
||||
features: {
|
||||
timePlanning: {
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Format: varchar(19)
|
||||
* Format: varchar(20)
|
||||
* @example 1234567890123456789
|
||||
*/
|
||||
channelID?: string;
|
||||
/** @example 0 0 1 * * * 60o 1w */
|
||||
cron?: string;
|
||||
/**
|
||||
* Format: varchar(19)
|
||||
* @example 1234567890123456789
|
||||
*/
|
||||
isAvailableRoleId?: string;
|
||||
/**
|
||||
* Format: varchar(19)
|
||||
* @example 1234567890123456789
|
||||
*/
|
||||
wantsToBeNotifieRoledId?: string;
|
||||
channelId: string | null;
|
||||
/** @example 0 */
|
||||
targetMinute: number;
|
||||
/** @example 1 */
|
||||
targetHour: number;
|
||||
/** @example 1 */
|
||||
targetDay: number;
|
||||
roles: {
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Format: varchar(20)
|
||||
* @example 1234567890123456789
|
||||
*/
|
||||
isAvailableRoleId: string | null;
|
||||
/**
|
||||
* Format: varchar(20)
|
||||
* @example 1234567890123456789
|
||||
*/
|
||||
wantsToBeNotifieRoledId: string | null;
|
||||
};
|
||||
};
|
||||
};
|
||||
matches?: components["schemas"]["match"][];
|
||||
matches: components["schemas"]["match"][];
|
||||
checksum: string;
|
||||
};
|
||||
match: {
|
||||
/**
|
||||
* Format: varchar(19)
|
||||
* Format: varcharq(20)
|
||||
* @example 1234567890123456789
|
||||
*/
|
||||
channelID?: string;
|
||||
channelId: string;
|
||||
/**
|
||||
* Format: varchar(50)
|
||||
* @example Scrim
|
||||
*/
|
||||
matchType?: string;
|
||||
matchType: string;
|
||||
/**
|
||||
* Format: varchar(19)
|
||||
* Format: varchar(20)
|
||||
* @example 1234567890123456789
|
||||
*/
|
||||
createrId?: string;
|
||||
createrId: string;
|
||||
/**
|
||||
* Format: varchar(19)
|
||||
* Format: varchar(20)
|
||||
* @example 1234567890123456789
|
||||
*/
|
||||
roleId?: string;
|
||||
roleId: string;
|
||||
/**
|
||||
* Format: varchar(100)
|
||||
* @example ?
|
||||
*/
|
||||
opponentName?: string;
|
||||
opponentName: string;
|
||||
/**
|
||||
* Format: varchar(19)
|
||||
* Format: varchar(20)
|
||||
* @example 1234567890123456789
|
||||
*/
|
||||
messsageId?: string;
|
||||
/** @example 0 0 1 5 2 2023 60o */
|
||||
cron?: string;
|
||||
messageId: string;
|
||||
/** @example 2020-01-01T00:00:00Z */
|
||||
utc_ts: string;
|
||||
};
|
||||
tp_messages: {
|
||||
/**
|
||||
* Format: varchar(20)
|
||||
* @example 1234567890123456789
|
||||
*/
|
||||
channelId: string;
|
||||
messageIds: {
|
||||
/**
|
||||
* Format: varchar(20)
|
||||
* @example 1234567890123456789
|
||||
*/
|
||||
0: string | null;
|
||||
/**
|
||||
* Format: varchar(20)
|
||||
* @example 1234567890123456789
|
||||
*/
|
||||
1: string | null;
|
||||
/**
|
||||
* Format: varchar(20)
|
||||
* @example 1234567890123456789
|
||||
*/
|
||||
2: string | null;
|
||||
/**
|
||||
* Format: varchar(20)
|
||||
* @example 1234567890123456789
|
||||
*/
|
||||
3: string | null;
|
||||
/**
|
||||
* Format: varchar(20)
|
||||
* @example 1234567890123456789
|
||||
*/
|
||||
4: string | null;
|
||||
/**
|
||||
* Format: varchar(20)
|
||||
* @example 1234567890123456789
|
||||
*/
|
||||
5: string | null;
|
||||
/**
|
||||
* Format: varchar(20)
|
||||
* @example 1234567890123456789
|
||||
*/
|
||||
6: string | null;
|
||||
};
|
||||
};
|
||||
};
|
||||
responses: never;
|
||||
|
@ -108,8 +190,34 @@ export type external = Record<string, never>;
|
|||
export interface operations {
|
||||
|
||||
/**
|
||||
* Find guild config by ID
|
||||
* @description Returns a single guild config
|
||||
* Retrieve all guild's configs
|
||||
* @description Returns all guild's configs.
|
||||
*/
|
||||
getGuildsForBoot: {
|
||||
responses: {
|
||||
/** @description successful operation */
|
||||
200: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["guildConfig"][];
|
||||
};
|
||||
};
|
||||
/** @description Invalid ID supplied */
|
||||
400: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Unauthorized */
|
||||
401: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Guild not found */
|
||||
404: {
|
||||
content: never;
|
||||
};
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Find a guild's config by ID
|
||||
* @description Returns a single guild's config.
|
||||
*/
|
||||
getGuildById: {
|
||||
parameters: {
|
||||
|
@ -129,6 +237,10 @@ export interface operations {
|
|||
400: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Unauthorized */
|
||||
401: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Guild not found */
|
||||
404: {
|
||||
content: never;
|
||||
|
@ -136,8 +248,8 @@ export interface operations {
|
|||
};
|
||||
};
|
||||
/**
|
||||
* Deletes a guild config by ID
|
||||
* @description Delete a guild's config
|
||||
* Deletes a guild's config by ID
|
||||
* @description Delete a guild's config when the bot is removed from the guild.
|
||||
*/
|
||||
deleteGuildById: {
|
||||
parameters: {
|
||||
|
@ -155,6 +267,10 @@ export interface operations {
|
|||
400: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Unauthorized */
|
||||
401: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Guild not found */
|
||||
404: {
|
||||
content: never;
|
||||
|
@ -162,7 +278,7 @@ export interface operations {
|
|||
};
|
||||
};
|
||||
/**
|
||||
* Find guild by ID for it's tp_messages
|
||||
* Find the tp_messages of guild by ID
|
||||
* @description Returns tp_messages for a guild
|
||||
*/
|
||||
getTp_messagesOfGuildById: {
|
||||
|
@ -176,7 +292,7 @@ export interface operations {
|
|||
/** @description successful operation */
|
||||
200: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["guildConfig"];
|
||||
"application/json": components["schemas"]["tp_messages"];
|
||||
};
|
||||
};
|
||||
/** @description Time planning not enabled for this guild */
|
||||
|
@ -187,6 +303,137 @@ export interface operations {
|
|||
400: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Unauthorized */
|
||||
401: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Guild not found */
|
||||
404: {
|
||||
content: never;
|
||||
};
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Put new message IDs for tp_messages of guild by ID
|
||||
* @description Returns tp_messages for a guild
|
||||
*/
|
||||
putTp_messagesOfGuildById: {
|
||||
parameters: {
|
||||
path: {
|
||||
/** @description ID of guild's tp_messages to return */
|
||||
guildId: string;
|
||||
};
|
||||
};
|
||||
/** @description Put new message IDs for tp_messages in channel */
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["tp_messages"];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description successful operation */
|
||||
204: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Invalid ID supplied */
|
||||
400: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Unauthorized */
|
||||
401: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Time planning not enabled for this guild */
|
||||
403: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Guild not found */
|
||||
404: {
|
||||
content: never;
|
||||
};
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Find all matches of guild by ID
|
||||
* @description Returns tp_messages for a guild
|
||||
*/
|
||||
getMatchesOfGuildById: {
|
||||
parameters: {
|
||||
path: {
|
||||
/** @description ID of guild's tp_messages to return */
|
||||
guildId: string;
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description successful operation */
|
||||
200: {
|
||||
content: {
|
||||
"application/json": {
|
||||
matches: components["schemas"]["match"][];
|
||||
/**
|
||||
* Format: text
|
||||
* @example Europe/Berlin
|
||||
*/
|
||||
timezone: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
/** @description Time planning not enabled for this guild */
|
||||
204: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Invalid ID supplied */
|
||||
400: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Unauthorized */
|
||||
401: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Guild not found */
|
||||
404: {
|
||||
content: never;
|
||||
};
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Save a new created match of guild by ID
|
||||
* @description Returns tp_messages for a guild
|
||||
*/
|
||||
postMatchOfGuildById: {
|
||||
parameters: {
|
||||
path: {
|
||||
/** @description ID of match's guild to set */
|
||||
guildId: string;
|
||||
};
|
||||
};
|
||||
/** @description Save a new created match in channel */
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": {
|
||||
match: components["schemas"]["match"];
|
||||
/**
|
||||
* Format: text
|
||||
* @description Has to match guild tz
|
||||
* @example Europe/Berlin
|
||||
*/
|
||||
timezone: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description successful operation */
|
||||
204: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Invalid ID supplied */
|
||||
400: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Unauthorized */
|
||||
401: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Guild not found */
|
||||
404: {
|
||||
content: never;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue