liljudd-website/src/types/liljudd.d.ts

461 lines
11 KiB
TypeScript

/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
export interface paths {
"/api/boot": {
/**
* 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"];
/**
* 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}/timePlanning": {
/**
* Find the timePlanning of guild by ID
* @description Returns timePlanning for a guild
*/
get: operations["gettimePlanningOfGuildById"];
/**
* Put new message IDs for timePlanning of guild by ID
* @description Returns timePlanning for a guild
*/
put: operations["puttimePlanningOfGuildById"];
};
"/api/{guildId}/matches": {
/**
* Find all matches of guild by ID
* @description Returns timePlanning for a guild
*/
get: operations["getMatchesOfGuildById"];
/**
* Save a new created match of guild by ID
* @description Returns timePlanning for a guild
*/
post: operations["postMatchOfGuildById"];
};
}
export type webhooks = Record<string, never>;
export interface components {
schemas: {
guildConfig: {
guildId: components["schemas"]["id"];
/**
* Format: text
* @example Europe/Berlin
*/
timezone: string;
features: {
timePlanning: {
enabled: boolean;
channelId: components["schemas"]["idOrNull"];
/** @example 0 */
targetMinute: number;
/** @example 1 */
targetHour: number;
/** @example 1 */
targetDay: number;
roles: {
enabled: boolean;
isAvailableRoleId: components["schemas"]["idOrNull"];
wantsToBeNotifieRoledId: components["schemas"]["idOrNull"];
};
};
};
matches: components["schemas"]["match"][];
checksum: string;
};
match: {
channelId: components["schemas"]["id"];
createrId: components["schemas"]["id"];
roleId: components["schemas"]["id"];
messageId: components["schemas"]["id"];
/**
* Format: varchar(50)
* @example Scrim
*/
matchType: string;
/**
* Format: varchar(100)
* @example ?
*/
opponentName: string;
/** @example 2020-01-01T00:00:00Z */
utc_ts: string;
};
timePlanning: {
enabled: boolean;
channelId: components["schemas"]["idOrNull"];
rolesEnabled: boolean;
isAvailableRoleId: components["schemas"]["idOrNull"];
wantsToBeNotifieRoledId: components["schemas"]["idOrNull"];
messageIds: {
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;
requestBodies: never;
headers: never;
pathItems: never;
}
export type $defs = Record<string, never>;
export type external = Record<string, never>;
export interface operations {
/**
* 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: {
"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"];
};
};
};
};
/**
* Find a guild's config by ID
* @description Returns a single guild's config.
*/
getGuildById: {
parameters: {
path: {
/** @description ID of guild config to return */
guildId: string;
};
};
responses: {
/** @description successful operation */
200: {
content: {
"application/json": components["schemas"]["guildConfig"];
};
};
/** @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"];
};
};
};
};
/**
* 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"];
};
};
};
};
/**
* Deletes a guild's config by ID
* @description Delete a guild's config when the bot is removed from the guild.
*/
deleteGuildById: {
parameters: {
path: {
/** @description ID of guild's config to delete */
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"];
};
};
};
};
/**
* Find the timePlanning of guild by ID
* @description Returns timePlanning for a guild
*/
gettimePlanningOfGuildById: {
parameters: {
path: {
/** @description ID of guild's timePlanning to return */
guildId: string;
};
};
responses: {
/** @description successful operation */
200: {
content: {
"application/json": components["schemas"]["timePlanning"];
};
};
/** @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"];
};
};
};
};
/**
* Put new message IDs for timePlanning of guild by ID
* @description Returns timePlanning for a guild
*/
puttimePlanningOfGuildById: {
parameters: {
path: {
/** @description ID of guild's timePlanning to return */
guildId: string;
};
};
/** @description Put new message IDs for timePlanning in channel */
requestBody: {
content: {
"application/json": components["schemas"]["timePlanning"];
};
};
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"];
};
};
};
};
/**
* Find all matches of guild by ID
* @description Returns timePlanning for a guild
*/
getMatchesOfGuildById: {
parameters: {
path: {
/** @description ID of guild's timePlanning to return */
guildId: string;
};
};
responses: {
/** @description successful operation */
200: {
content: {
"application/json": {
matches: components["schemas"]["match"][];
/**
* Format: text
* @example Europe/Berlin
*/
timezone: string;
};
};
};
/** @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"];
};
};
};
};
/**
* Save a new created match of guild by ID
* @description Returns timePlanning 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: {
"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"];
};
};
};
};
}