Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/docs.1/user/
Upload File :
Current File : /home/infinitibizsol/.trash/docs.1/user/user.js

/**
 * @swagger
 * components:
 *   schemas:
 *     User:
 *       type: object
 *       required:
 *         - first_name
 *         - last_name
 *         - email
 *         - password
 *         - contact_type
 *         - current_status
 *       properties:
 *         id:
 *           type: string
 *           description: The auto-generated id of the contact
 *         first_name:
 *           type: string
 *           description: The first name of the user
 *         last_name:
 *           type: string
 *           description: The last name of the user
 *         email:
 *           type: string
 *           description: The primary email of the user
 *         profile_picture:
 *           type: string
 *           description: The primary email of the user
 *         password:
 *           type: string
 *           description: The password of the user
 *         contact_type:
 *           type: string
 *           description: The contact type of the user
 *         current_status:
 *           type: string
 *           description: The current status of the user
 *         location:
 *           type: string
 *           description: The location of the user
 *         role:
 *           type: string
 *           description: The role of the user
 *       example:
 *         first_name: "Admin"
 *         last_name: "Admin"
 *         email: "admin@gmail.com"
 *         profile_picture: "data-75757.png"
 *         password: "12345"
 *         contact_type: "prospective"
 *         current_status: "active"
 *         location: "USA"
 *         role: "admin"
 *     UpdateResponse:
 *       type: object
 *       properties:
 *         message:
 *           type: string
 *           example: "Data updated successfully"
 *     DeleteResponse:
 *       type: object
 *       properties:
 *         message:
 *           type: string
 *           example: "entry_name and related data deleted successfully"
 *   securitySchemes:
 *     bearerAuth:
 *       type: http
 *       scheme: bearer
 *       bearerFormat: JWT
 */

/**
 * @swagger
 * tags:
 *   - name: User
 *     description: Parent tag for user-related operations
 *   - name: User
 */

/**
 * @swagger
 * /user/profile:
 *   get:
 *     summary: Get the user's profile
 *     tags: [User]
 *     security:
 *       - bearerAuth: []
 *     parameters:
 *       - in: query
 *         name: user_id
 *         schema:
 *           type: string
 *         required: false
 *         description: ID of the contact

 *     responses:
 *       200:
 *         description: The user's profile description
 *         content:
 *           application/json:
 *             schema:
 *               $ref: '#/components/schemas/User'
 */

/**
 * @swagger
 * /user/basic-profile:
 *   get:
 *     summary: Get the user's profile
 *     tags: [User]
 *     security:
 *       - bearerAuth: []
 *     responses:
 *       200:
 *         description: The user's profile description
 *         content:
 *           application/json:
 *             schema:
 *               $ref: '#/components/schemas/User'
 */

/**
 * @swagger
 * /user/list:
 *   get:
 *     summary: Returns the list of all user contacts
 *     tags: [User]
 *     security:
 *       - bearerAuth: []
 *     responses:
 *       200:
 *         description: The list of user contacts
 *         content:
 *           application/json:
 *             schema:
 *               type: array
 *               items:
 *                 $ref: '#/components/schemas/User'
 */

/**
 * @swagger
 * /user/all-users:
 *   post:
 *     summary: Returns the list of all users filter by role ["agent","admin"] instead of logged user
 *     tags: [User]
 *     security:
 *       - bearerAuth: []
 *     requestBody:
 *       required: true
 *       content:
 *         application/json:
 *           schema:
 *             $ref: '#/components/schemas/User'
 *     responses:
 *       200:
 *         description: The list of user contacts
 *         content:
 *           application/json:
 *             schema:
 *               type: array
 *               items:
 *                 $ref: '#/components/schemas/User'
 */

/**
 * @swagger
 * /user/create-agent:
 *   post:
 *     summary: Create a new user
 *     tags: [User]
 *     security:
 *       - bearerAuth: []
 *     requestBody:
 *       required: true
 *       content:
 *         application/json:
 *           schema:
 *             $ref: '#/components/schemas/User'
 *     responses:
 *       201:
 *         description: The contact was successfully created
 *         content:
 *           application/json:
 *             schema:
 *               $ref: '#/components/schemas/User'
 */

/**
 * @swagger
 * /user/edit:
 *   put:
 *     summary: Update by UserID,taken from token
 *     tags: [User]
 *     security:
 *       - bearerAuth: []
 *     requestBody:
 *       required: true
 *       content:
 *         application/json:
 *           schema:
 *             $ref: '#/components/schemas/User'
 *     responses:
 *       200:
 *         description: The contact was updated
 *         content:
 *           application/json:
 *             schema:
 *               $ref: '#/components/schemas/UpdateResponse'
 */

/**
 * @swagger
 * /user/delete/{id}:
 *   delete:
 *     summary: Remove a user by ID
 *     tags: [User]
 *     security:
 *       - bearerAuth: []
 *     parameters:
 *       - in: path
 *         name: id
 *         schema:
 *           type: string
 *         required: true
 *         description: The contact ID
 *     responses:
 *       200:
 *         description: The contact was deleted
 *         content:
 *           application/json:
 *             schema:
 *               $ref: '#/components/schemas/DeleteResponse'
 */
"use strict";

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists