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:
@@ -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>;
|
||||
Reference in New Issue
Block a user