refactor(api): 🔥 Remove old @versia/client version

This commit is contained in:
Jesse Wierzbinski 2025-03-22 18:04:47 +01:00
parent 54e282b03c
commit 8d1af1b0cd
No known key found for this signature in database
121 changed files with 649 additions and 756 deletions

View file

@ -2,8 +2,9 @@ import type { OpenAPIHono } from "@hono/zod-openapi";
import { z } from "@hono/zod-openapi";
import { zValidator } from "@hono/zod-validator";
import { getLogger } from "@logtape/logtape";
import type { RolePermission } from "@versia/client/schemas";
import { Application, Emoji, Note, Token, User, db } from "@versia/kit/db";
import { Challenges, type RolePermissions } from "@versia/kit/tables";
import { Challenges } from "@versia/kit/tables";
import { extractParams, verifySolution } from "altcha-lib";
import chalk from "chalk";
import { type SQL, eq } from "drizzle-orm";
@ -185,7 +186,7 @@ export const handleZodError = (
const checkPermissions = (
auth: AuthData | null,
required: RolePermissions[],
required: RolePermission[],
): void => {
const userPerms = auth?.user
? auth.user.getAllPermissions()
@ -291,7 +292,7 @@ type HonoEnvWithAuth = HonoEnv & {
export const auth = <AuthRequired extends boolean>(options: {
auth: AuthRequired;
permissions?: RolePermissions[];
permissions?: RolePermission[];
challenge?: boolean;
scopes?: string[];
// If authRequired is true, HonoEnv.Variables.auth.user will never be null