automod/oapilib/src/schema.ts
2023-07-24 23:03:23 +02:00

254 lines
5.9 KiB
TypeScript

/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
export interface paths {
"/": {
/** Fetch API configuration */
get: operations["getHello"];
};
"/servers/{server}/infractions": {
/** Fetch a list of infractions */
get: operations["listInfractions"];
/** Create an infraction */
post: operations["createInfraction"];
};
"/servers/{server}/infractions/{id}": {
/** Fetch a single infraction */
get: operations["getInfraction"];
};
"/servers": {
/** List all servers both AutoMod and the user are in */
get: operations["listServers"];
};
"/servers/{server}": {
/** Fetch details about a specific server */
get: operations["getServer"];
};
"/auth": {
/** Check authentication status */
get: operations["getAuth"];
};
"/auth/login": {
post: operations["login"];
};
"/test": {
get: operations["get"];
put: operations["put"];
post: operations["post"];
delete: operations["delete"];
patch: operations["patch"];
};
}
export type webhooks = Record<string, never>;
export interface components {
schemas: {
CreateInfractionData: {
user: string;
reason: string;
};
ServerInfo: {
id: string;
name: string;
icon: string | null;
moderator: boolean;
discoverable: boolean;
};
GetServersResponse: {
servers: (components["schemas"]["ServerInfo"])[];
};
ServerLogsConfig: {
/** @default 00000000000000000000000000 */
moderation: string | null;
/** @default 00000000000000000000000000 */
messages: string | null;
};
ServerConfig: {
language: string | null;
prefix: string | null;
/** @default own */
infraction_visibility: string | null;
logs: components["schemas"]["ServerLogsConfig"];
};
ServerDetails: {
info: components["schemas"]["ServerInfo"];
config: components["schemas"]["ServerConfig"];
};
ApiUserInfo: {
id: string;
username: string;
discriminator: string;
displayName: string | null;
avatarUrl: string | null;
};
AuthInfo: {
authenticated: boolean;
user: string;
/** @default false */
god: boolean;
profile: components["schemas"]["ApiUserInfo"] | null;
};
LoginData: {
/** @description The user ID you are trying to log in as */
user: string;
};
LoginResponse: {
token: string;
otp: string;
};
};
responses: never;
parameters: never;
requestBodies: never;
headers: never;
pathItems: never;
}
export type external = Record<string, never>;
export interface operations {
/** Fetch API configuration */
getHello: {
responses: {
200: never;
};
};
/** Fetch a list of infractions */
listInfractions: {
parameters: {
query?: {
user?: string;
mod?: string;
limit?: string;
/** @description Unix millis. Returns values before this timestamp. */
before?: number;
/** @description Unix millis. Returns values after this timestamp. */
after?: number;
};
path: {
server: string;
};
};
responses: {
200: never;
};
};
/** Create an infraction */
createInfraction: {
parameters: {
path: {
server: string;
};
};
requestBody: {
content: {
"application/json": components["schemas"]["CreateInfractionData"];
};
};
responses: {
201: never;
};
};
/** Fetch a single infraction */
getInfraction: {
parameters: {
path: {
server: string;
id: string;
};
};
responses: {
200: never;
};
};
/** List all servers both AutoMod and the user are in */
listServers: {
responses: {
default: {
content: {
"application/json": components["schemas"]["GetServersResponse"];
};
};
};
};
/** Fetch details about a specific server */
getServer: {
parameters: {
path: {
server: string;
};
};
responses: {
default: {
content: {
"application/json": components["schemas"]["ServerDetails"];
};
};
};
};
/** Check authentication status */
getAuth: {
responses: {
200: {
content: {
"application/json": components["schemas"]["AuthInfo"];
};
};
};
};
login: {
requestBody: {
content: {
"application/json": components["schemas"]["LoginData"];
};
};
responses: {
default: {
content: {
"application/json": components["schemas"]["LoginResponse"];
};
};
};
};
get: {
responses: {
200: never;
/** @description These routes exist as a temporary workaround because the OpenAPI spec is expected to have at least one route for every request method by @insertish/oapi. */
default: never;
};
};
put: {
responses: {
200: never;
/** @description These routes exist as a temporary workaround because the OpenAPI spec is expected to have at least one route for every request method by @insertish/oapi. */
default: never;
};
};
post: {
responses: {
201: never;
/** @description These routes exist as a temporary workaround because the OpenAPI spec is expected to have at least one route for every request method by @insertish/oapi. */
default: never;
};
};
delete: {
responses: {
200: never;
/** @description These routes exist as a temporary workaround because the OpenAPI spec is expected to have at least one route for every request method by @insertish/oapi. */
default: never;
};
};
patch: {
responses: {
200: never;
/** @description These routes exist as a temporary workaround because the OpenAPI spec is expected to have at least one route for every request method by @insertish/oapi. */
default: never;
};
};
}