first commit
All checks were successful
Code quality checks / biome (push) Successful in 9s

This commit is contained in:
creations 2025-04-19 11:58:49 -04:00
commit cfbcaa4851
Signed by: creations
GPG key ID: 8F553AA4320FC711
25 changed files with 1096 additions and 0 deletions

11
types/badge.d.ts vendored Normal file
View file

@ -0,0 +1,11 @@
type Badge = {
tooltip: string;
badge: string;
};
type BadgeResult = Badge[] | Record<string, Badge[]>;
interface FetchBadgesOptions {
nocache?: boolean;
separated?: boolean;
}

14
types/bun.d.ts vendored Normal file
View file

@ -0,0 +1,14 @@
import type { Server } from "bun";
type Query = Record<string, string>;
type Params = Record<string, string>;
declare global {
type BunServer = Server;
interface ExtendedRequest extends Request {
startPerf: number;
query: Query;
params: Params;
}
}

10
types/config.d.ts vendored Normal file
View file

@ -0,0 +1,10 @@
type Environment = {
port: number;
host: string;
development: boolean;
};
type badgeURLMap = {
service: string;
url: string | ((userId: string) => string);
};

9
types/logger.d.ts vendored Normal file
View file

@ -0,0 +1,9 @@
type ILogMessagePart = { value: string; color: string };
type ILogMessageParts = {
level: ILogMessagePart;
filename: ILogMessagePart;
readableTimestamp: ILogMessagePart;
message: ILogMessagePart;
[key: string]: ILogMessagePart;
};

15
types/routes.d.ts vendored Normal file
View file

@ -0,0 +1,15 @@
type RouteDef = {
method: string | string[];
accepts: string | null | string[];
returns: string;
needsBody?: "multipart" | "json";
};
type RouteModule = {
handler: (
request: Request | ExtendedRequest,
requestBody: unknown,
server: BunServer,
) => Promise<Response> | Response;
routeDef: RouteDef;
};