/
home
/
infinitibizsol
/
insurcrm.infinitibizsol.com
/
docs
/
common
/
File Upload :
llllll
Current File: /home/infinitibizsol/insurcrm.infinitibizsol.com/docs/common/roleAndPermissions.js
/** * @swagger * components: * schemas: * RoleAndPermissions: * type: object * required: * - role * properties: * role: * type: string * enum: ["user", "manager"] * description: Role of the user * profile: * type: object * properties: * basic_contact_info: * $ref: '#/components/schemas/PermissionSet' * address_info: * $ref: '#/components/schemas/PermissionSet' * employee_info: * $ref: '#/components/schemas/PermissionSet' * employment_info: * $ref: '#/components/schemas/PermissionSet' * goals: * $ref: '#/components/schemas/PermissionSet' * social_media: * $ref: '#/components/schemas/PermissionSet' * system: * $ref: '#/components/schemas/PermissionSet' * signature: * $ref: '#/components/schemas/PermissionSet' * email_setup: * $ref: '#/components/schemas/PermissionSet' * email_signature: * $ref: '#/components/schemas/PermissionSet' * createdOn: * type: string * format: date-time * description: Timestamp when the role and permissions were created * modifiedOn: * type: string * format: date-time * description: Timestamp when the role and permissions were last modified * PermissionSet: * type: object * properties: * add: * type: boolean * default: false * description: Permission to add * view: * type: boolean * default: true * description: Permission to view * edit: * type: boolean * default: false * description: Permission to edit * delete: * type: boolean * default: false * description: Permission to delete * UpdateResponse: * type: object * properties: * message: * type: string * example: "Role and permissions updated successfully" * DeleteResponse: * type: object * properties: * message: * type: string * example: "Role and permissions deleted successfully" * securitySchemes: * bearerAuth: * type: http * scheme: bearer * bearerFormat: JWT */ /** * @swagger * tags: * - name: RoleAndPermissions * description: Operations related to role and permissions */ /** * @swagger * /role-and-permissions/list: * get: * summary: Returns the list of roles and permissions * tags: [RoleAndPermissions] * security: * - bearerAuth: [] * responses: * 200: * description: The list of roles and permissions * content: * application/json: * schema: * type: array * items: * $ref: '#/components/schemas/RoleAndPermissions' */ /** * @swagger * /role-and-permissions/add: * post: * summary: Create a new role and permissions entry * tags: [RoleAndPermissions] * security: * - bearerAuth: [] * requestBody: * required: true * content: * application/json: * schema: * $ref: '#/components/schemas/RoleAndPermissions' * responses: * 201: * description: The role and permissions entry was successfully created * content: * application/json: * schema: * $ref: '#/components/schemas/RoleAndPermissions' */ /** * @swagger * /role-and-permissions/edit/{id}: * put: * summary: Update the role and permissions entry by ID * tags: [RoleAndPermissions] * security: * - bearerAuth: [] * parameters: * - in: path * name: id * schema: * type: string * required: true * description: The ID of the role and permissions entry * requestBody: * required: true * content: * application/json: * schema: * $ref: '#/components/schemas/RoleAndPermissions' * responses: * 200: * description: The role and permissions entry was successfully updated * content: * application/json: * schema: * $ref: '#/components/schemas/UpdateResponse' * 404: * description: Role and permissions not found */ /** * @swagger * /role-and-permissions/delete/{id}: * delete: * summary: Delete the role and permissions entry by ID * tags: [RoleAndPermissions] * security: * - bearerAuth: [] * parameters: * - in: path * name: id * schema: * type: string * required: true * description: The ID of the role and permissions entry * responses: * 200: * description: The role and permissions entry was successfully deleted * content: * application/json: * schema: * $ref: '#/components/schemas/DeleteResponse' * 404: * description: Role and permissions not found */ /** * @swagger * /role-and-permissions/remove-user: * delete: * summary: Remove permissions from user and assigned him default permissions. * tags: [RoleAndPermissions] * security: * - bearerAuth: [] * requestBody: * required: true * content: * application/json: * schema: * type: object * properties: * permissions_id: * type: string * description: The ID of the permissions to delete * example: "60b8a76f9e1b2c3d4e5f6789" * responses: * 200: * description: Permissions successfully deleted * content: * application/json: * schema: * type: object * properties: * message: * type: string * example: "Permissions deleted successfully." * 404: * description: Permissions not found * content: * application/json: * schema: * type: object * properties: * error: * type: string * example: "Permissions not found." */ /** * @swagger * /role-and-permissions/assign-user: * post: * summary: Assign permissions to user. * tags: [RoleAndPermissions] * security: * - bearerAuth: [] * requestBody: * required: true * content: * application/json: * schema: * type: object * properties: * user_id: * type: string * description: The ID of the user * example: "60b8a76f9e1b2c3d4e5f6789" * permissions_id: * type: string * description: The ID of the permissions. * example: "60b8a76f9e1b2c3d4e5f6789" * responses: * 200: * description: Permissions successfully deleted * content: * application/json: * schema: * type: object * properties: * message: * type: string * example: "Permissions assigned successfully." * 404: * description: Permissions not found * content: * application/json: * schema: * type: object * properties: * error: * type: string * example: "Permissions not found." */ "use strict";
Copyright ©2k19 -
Hexid
|
Tex7ure