272 lines
6.8 KiB
TypeScript
272 lines
6.8 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"];
|
|
};
|
|
"/auth": {
|
|
/** Check authentication status */
|
|
get: operations["getAuth"];
|
|
};
|
|
"/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/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: {
|
|
AuthInfo: {
|
|
authenticated: boolean;
|
|
user: string;
|
|
/** @default false */
|
|
god: boolean;
|
|
};
|
|
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"];
|
|
};
|
|
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;
|
|
};
|
|
};
|
|
/** Check authentication status */
|
|
getAuth: {
|
|
responses: {
|
|
200: {
|
|
content: {
|
|
"application/json": components["schemas"]["AuthInfo"];
|
|
};
|
|
};
|
|
/** @description No valid authentication presented */
|
|
401: never;
|
|
/** @description The user does not have access to the resource */
|
|
403: 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;
|
|
/** @description No valid authentication presented */
|
|
401: never;
|
|
/** @description The user does not have access to the resource */
|
|
403: never;
|
|
};
|
|
};
|
|
/** Create an infraction */
|
|
createInfraction: {
|
|
parameters: {
|
|
path: {
|
|
server: string;
|
|
};
|
|
};
|
|
requestBody: {
|
|
content: {
|
|
"application/json": components["schemas"]["CreateInfractionData"];
|
|
};
|
|
};
|
|
responses: {
|
|
201: never;
|
|
/** @description No valid authentication presented */
|
|
401: never;
|
|
/** @description The user does not have access to the resource */
|
|
403: never;
|
|
};
|
|
};
|
|
/** Fetch a single infraction */
|
|
getInfraction: {
|
|
parameters: {
|
|
path: {
|
|
server: string;
|
|
id: string;
|
|
};
|
|
};
|
|
responses: {
|
|
200: never;
|
|
/** @description No valid authentication presented */
|
|
401: never;
|
|
/** @description The user does not have access to the resource */
|
|
403: never;
|
|
};
|
|
};
|
|
/** List all servers both AutoMod and the user are in */
|
|
listServers: {
|
|
responses: {
|
|
/** @description No valid authentication presented */
|
|
401: never;
|
|
/** @description The user does not have access to the resource */
|
|
403: never;
|
|
default: {
|
|
content: {
|
|
"application/json": components["schemas"]["GetServersResponse"];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
/** Fetch details about a specific server */
|
|
getServer: {
|
|
parameters: {
|
|
path: {
|
|
server: string;
|
|
};
|
|
};
|
|
responses: {
|
|
/** @description No valid authentication presented */
|
|
401: never;
|
|
/** @description The user does not have access to the resource */
|
|
403: never;
|
|
default: {
|
|
content: {
|
|
"application/json": components["schemas"]["ServerDetails"];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
login: {
|
|
requestBody: {
|
|
content: {
|
|
"application/json": components["schemas"]["LoginData"];
|
|
};
|
|
};
|
|
responses: {
|
|
/** @description Access to the resource is forbidden */
|
|
403: never;
|
|
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;
|
|
};
|
|
};
|
|
}
|