refactor(api): ♻️ Move all client schema code to new package

This commit is contained in:
Jesse Wierzbinski 2025-03-22 02:34:03 +01:00
parent 52602c3da7
commit 3fe07a79b8
No known key found for this signature in database
128 changed files with 3904 additions and 169 deletions

View file

@ -5,17 +5,20 @@ import {
RolePermissions,
} from "@versia/kit/tables";
import { type BunFile, file } from "bun";
import ISO6391 from "iso-639-1";
import { types as mimeTypes } from "mime-types";
import { generateVAPIDKeys } from "web-push";
import { ZodError } from "zod";
import { fromZodError } from "zod-validation-error";
import { iso631 } from "../schemas/common.ts";
export enum MediaBackendType {
Local = "local",
S3 = "s3",
}
// Need to declare this here instead of importing it otherwise we get cyclical import errors
export const iso631 = z.enum(ISO6391.getAllCodes() as [string, ...string[]]);
const urlPath = z
.string()
.trim()