feat: initial prototype

This commit is contained in:
2026-02-13 15:52:13 +07:00
parent 134351b326
commit e8dbefde43
140 changed files with 12390 additions and 1369 deletions

View File

@@ -0,0 +1,24 @@
import { api } from "@/lib/api";
type ReverseProxyApi = {
get: () => Promise<{ data?: unknown }>;
(params: { id: string }): {
delete: () => Promise<{ data?: unknown; error?: unknown }>;
"connection-info": { get: () => Promise<{ data?: unknown }> };
};
};
type UserSuspensionApi = {
suspension: {
patch: (body: { isSuspended: boolean; suspendedUntil: string | null }) => Promise<{ error?: unknown }>;
};
};
export const getReverseProxyApi = (): ReverseProxyApi => {
const apiRoot = api.api as unknown as { "reverse-proxy": ReverseProxyApi };
return apiRoot["reverse-proxy"];
};
export const getUserApi = (id: string): UserSuspensionApi => {
return api.api.users({ id }) as unknown as UserSuspensionApi;
};