supported apps domain + some refactor of data types redundancy

This commit is contained in:
user
2026-03-28 16:19:24 +02:00
parent 6639bcd799
commit 671a712b08
26 changed files with 2052 additions and 169 deletions

View File

@@ -0,0 +1,28 @@
import * as v from "valibot";
export const supportedAppSchema = v.object({
id: v.number(),
title: v.string(),
packageName: v.string(),
createdAt: v.date(),
updatedAt: v.date(),
});
export type SupportedApp = v.InferOutput<typeof supportedAppSchema>;
export const createSupportedAppSchema = v.object({
title: v.pipe(v.string(), v.minLength(1)),
packageName: v.pipe(v.string(), v.minLength(1)),
});
export type CreateSupportedApp = v.InferOutput<
typeof createSupportedAppSchema
>;
export const updateSupportedAppSchema = v.partial(
v.object({
title: v.string(),
packageName: v.string(),
}),
);
export type UpdateSupportedApp = v.InferOutput<
typeof updateSupportedAppSchema
>;