refactor(schemas): group network schemas by direction

Move request and response schemas into matching subdirectories, extract the shared chat lock type, and update barrels and imports without changing wire formats.
This commit is contained in:
2026-07-14 15:12:19 +08:00
parent 8eaea17156
commit 759481b621
75 changed files with 222 additions and 124 deletions
@@ -0,0 +1,26 @@
/**
* 发送消息请求
*
*/
import { z } from "zod";
import {
booleanOrFalse,
numberOrZero,
stringOrEmpty,
} from "../../nullable-defaults";
export const SendMessageRequestSchema = z.object({
message: stringOrEmpty,
image: stringOrEmpty,
imageId: stringOrEmpty,
imageThumbUrl: stringOrEmpty,
imageMediumUrl: stringOrEmpty,
imageOriginalUrl: stringOrEmpty,
imageWidth: numberOrZero,
imageHeight: numberOrZero,
useWebSocket: booleanOrFalse,
});
export type SendMessageRequestInput = z.input<typeof SendMessageRequestSchema>;
export type SendMessageRequestData = z.output<typeof SendMessageRequestSchema>;