Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 1x 1x 1x 1x 1x 1x 1x 1x 1x | import { roles } from "../../config" import { Roles, UserDetails } from "../../models" import { baseRequest, string, boolean, number } from "./utils" // User controller export const changePasswordReq = baseRequest({ description: "Change password with Token", required: ["oldPassword", "password", 'confirmPassword'], properties: { confirmPassword: string, password: string, oldPassword: string }, title: 'Change Password' }) export const myProfileReq = baseRequest({ description: "get my profile with Token ", properties: {}, title: 'My Profile' }) export const patchUserReq = baseRequest({ description: "update User with Token", properties: { email: string, name: string, image: string, phone: string }, title: 'Update Profile' }) // User Roles export const roleReq = baseRequest({ description: "", properties: { roleType: { type: 'string', default: roles.customer, enum: Object.values(roles) } }, title: "Save Role" }) // User Details export const userDetailsReq = baseRequest({ description: "", properties: { loadSchema: true, modelName: UserDetails, exclude: ['UID', 'userUID', 'isDelete', 'createdAt', 'updatedAt'], title: 'NewUserDetails', } }) export const updateUserDetailsReq = baseRequest({ description: "", properties: { name: string }, title: 'Update User' }) |