Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/docs.4/common/
Upload File :
Current File : /home/infinitibizsol/.trash/docs.4/common/tasks.js

/**
 * @swagger
 * components:
 *   schemas:
 *     Task:
 *       type: object
 *       required:
 *         - subject
 *         - details
 *         - contact
 *         - assigned_to
 *         - start_date
 *         - end_date
 *         - priority
 *         - contact_id
 *         - created_by
 *       properties:
 *         subject:
 *           type: string
 *           description: The subject of the task
 *         details:
 *           type: string
 *           description: The details or description of the task
 *         contact:
 *           type: string
 *           description: The contact number related to the task
 *         assigned_to:
 *           type: string
 *           description: The ID of the user to whom the task is assigned
 *         start_date:
 *           type: string
 *           format: date-time
 *           description: The start date of the task
 *         end_date:
 *           type: string
 *           format: date-time
 *           description: The end date of the task
 *         priority:
 *           type: string
 *           enum: [low, medium, high]
 *           description: The priority level of the task
 *         contact_id:
 *           type: string
 *           description: The ID of the associated contact
 *         created_by:
 *           type: string
 *           description: The ID of the user who created the task
 *       example:
 *         subject: "Task Test1"
 *         details: "Just testing you, no needs to worry."
 *         contact: "678910"
 *         assigned_to: "66638b66494f69562876feab"
 *         start_date: "2024-06-10T00:00:00.000Z"
 *         end_date: "2024-06-17T00:00:00.000Z"
 *         priority: "low"
 *         contact_id: "666870a07c02c6c45761ce53"
 *         created_by: "64d5bd3aca0be228afc9e267"
 *     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: Tasks
 *     description: Operations related to task
 */

/**
 * @swagger
 * /task/list:
 *   get:
 *     summary: Returns the list of task
 *     tags: [Tasks]
 *     security:
 *       - bearerAuth: []
 *     responses:
 *       200:
 *         description: The list of task
 *         content:
 *           application/json:
 *             schema:
 *               $ref: '#/components/schemas/Task'
 */

/**
 * @swagger
 * /task/add:
 *   post:
 *     summary: Create a new task entry
 *     tags: [Tasks]
 *     security:
 *       - bearerAuth: []
 *     requestBody:
 *       required: true
 *       content:
 *         application/json:
 *           schema:
 *             $ref: '#/components/schemas/Task'
 *     responses:
 *       201:
 *         description: The task entry was successfully created
 *         content:
 *           application/json:
 *             schema:
 *               $ref: '#/components/schemas/Task'
 */

/**
 * @swagger
 * /task/edit/{id}:
 *   put:
 *     summary: Update the task entry by ID
 *     tags: [Tasks]
 *     security:
 *       - bearerAuth: []
 *     parameters:
 *       - in: path
 *         name: id
 *         schema:
 *           type: string
 *         required: true
 *         description: The ID of the task entry
 *     requestBody:
 *       required: true
 *       content:
 *         application/json:
 *           schema:
 *             $ref: '#/components/schemas/Task'
 *     responses:
 *       200:
 *         description: The task entry was successfully updated
 *         content:
 *           application/json:
 *             schema:
 *               $ref: '#/components/schemas/UpdateResponse'
 */

/**
 * @swagger
 * /task/delete/{id}:
 *   delete:
 *     summary: Delete the task entry by ID
 *     tags: [Tasks]
 *     security:
 *       - bearerAuth: []
 *     parameters:
 *       - in: path
 *         name: id
 *         schema:
 *           type: string
 *         required: true
 *         description: The ID of the task entry
 *     responses:
 *       200:
 *         description: The task entry was successfully deleted
 *         content:
 *           application/json:
 *             schema:
 *               $ref: '#/components/schemas/DeleteResponse'

 */
"use strict";

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