import { ParamSchema , Schema } from 'express-validator' ; import { inBody , inParams , isBoolean , isDateTime , isOptional , isRequired , } from './common' ; export const userIdParamSchema = { ... inParams , ... isRequired } ; export const userSchema = { id : { ... inBody , ... isRequired } , websocketId : { ... inBody , ... isOptional } , providerId : { ... inBody , ... isOptional } , session : { ... inBody , ... isRequired } , route : { ... inBody , ... isRequired } , isOnline : { ... inBody , ... isRequired , ... isBoolean } , locationInfo : { ... inBody , ... isOptional } , } ; export const userWithUserIdParamSchema = { userId : userIdParamSchema , ... userSchema , id : { ... inBody , ... isOptional } , } ;