server/types/api.ts

13 lines
275 B
TypeScript
Raw Normal View History

export interface APIRouteMeta {
allowedMethods: ("GET" | "POST" | "PUT" | "DELETE" | "PATCH")[];
ratelimits: {
max: number;
duration: number;
};
route: string;
auth: {
required: boolean;
requiredOnMethods?: ("GET" | "POST" | "PUT" | "DELETE" | "PATCH")[];
};
}