迁移类型校验到zod

This commit is contained in:
手瓜一十雪 committed 2025-04-13 20:05:11 +08:00
1 parent d4ab191f34
commit 2147c4ffee
101 files changed
+951 -945

No files matched your search

+5 -5
View File
@@ -1,14 +1,14 @@
import { ActionName } from '@/onebot/action/router';
import { FileNapCatOneBotUUID } from '@/common/file-uuid';
import { GetPacketStatusDepends } from '@/onebot/action/packet/GetPacketStatus';
import { Static, Type } from '@sinclair/typebox';
import { z } from 'zod';
const SchemaData = Type.Object({
group_id: Type.Union([Type.Number(), Type.String()]),
file_id: Type.String(),
const SchemaData = z.object({
group_id: z.union([z.number(), z.string()]),
file_id: z.string(),
});
type Payload = Static<typeof SchemaData>;
type Payload = z.infer<typeof SchemaData>;
interface GetGroupFileUrlResponse {
url?: string;