Files
chad/server/plugins/schemas/user.ts
2026-05-22 05:08:02 +06:00

20 lines
557 B
TypeScript

import { Type } from 'typebox'
export const GetUserQuerySchema = Type.Partial(Type.Object({
username: Type.String(),
}), { $id: 'GetUserQuery' })
export const UserPreferencesSchema = Type.Object({
toggleInputHotkey: Type.String(),
toggleOutputHotkey: Type.String(),
}, { $id: 'UserPreferences' })
export const UpdateUserPreferencesPayloadSchema = Type.Partial(
UserPreferencesSchema,
{ $id: 'UpdateUserPreferencesPayload' },
)
export const UpdateUserPayloadSchema = Type.Object({
displayName: Type.String(),
}, { $id: 'UpdateUserPayload' })