Sindbad~EG File Manager

Current Path : /home/infinitibizsol/insurcrm.infinitibizsol.com/docs/common/
Upload File :
Current File : /home/infinitibizsol/insurcrm.infinitibizsol.com/docs/common/tasks.js

/**
 * @swagger
 * components:
 *   schemas:
 *     Task:
 *       type: object
 *       required:
 *         - subject
 *         - created_by
 *       properties:
 *         subject:
 *           type: string
 *           description: The subject of the task
 *         details:
 *           type: string
 *           description: A detailed description of the task
 *         start_date:
 *           type: string
 *           format: date-time
 *           description: The start date and time of the task
 *         due_date:
 *           type: string
 *           format: date-time
 *           description: The due date and time of the task
 *         status:
 *           type: string
 *           enum: [not_started, waiting, in_progress, deferred, completed]
 *           description: The current status of the task
 *         priority:
 *           type: string
 *           enum: [low, medium, high]
 *           description: The priority level of the task
 *         completion_percentage:
 *           type: number
 *           description: The percentage of task completion (0-100)
 *         set_reminder:
 *           type: boolean
 *           description: Indicates if a reminder is set for the task
 *         assigned_to:
 *           type: string
 *           description: The ID of the associated contact
 *         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
 *         task_completion_info:
 *           type: object
 *           properties:
 *             completed:
 *               type: boolean
 *               description: Indicates if the task has been completed
 *             completed_by:
 *               type: string
 *               description: The ID of the user who completed the task
 *             completed_date:
 *               type: string
 *               format: date-time
 *               description: The date and time when the task was completed
 *         policies:
 *           type: array
 *           items:
 *             type: string
 *             description: A list of policy IDs associated with the task
 *       example:
 *         subject: "Task Test1"
 *         details: "Just testing you, no need to worry."
 *         start_date: "2024-06-10T00:00:00.000Z"
 *         due_date: "2024-06-17T00:00:00.000Z"
 *         status: "not_started"
 *         priority: "low"
 *         completion_percentage: 0
 *         set_reminder: false
 *         assigned_to: "66638b66494f69562876feab"
 *         contact_id: "666870a07c02c6c45761ce53"
 *         created_by: "66638b66494f69562876feab"
 *         task_completion_info:
 *           completed: false
 *           completed_date: "2024-06-17T00:00:00.000Z"
 *         policies: ["607d1a98f3df3e2a1c8c4b1a"]
 */
/**
 * @swagger
 * tags:
 *   - name: Tasks
 *     description: Operations related to task
 */
/**
 * @swagger
 * /task/list:
 *   post:
 *     summary: Get list of associated tasks.
 *     tags: [Tasks]
 *     security:
 *       - bearerAuth: []
 *     requestBody:
 *       required: true
 *       content:
 *         application/json:
 *           schema:
 *             type: object
 *             properties:
 *               contact_id:
 *                 type: string
 *                 description: The contact ID
 *               policy_id:
 *                 type: string
 *                 description: The policy ID
 *               assigned_to:
 *                 type: string
 *                 description: The user the task is assigned to
 *             required:
 *               - contact_id
 *               - policy_id
 *               - assigned_to
 *             example:
 *               contact_id: "66638b66494f69562876feab"
 *               policy_id: "66638b66494f69562876feab"
 *               assigned_to: "66638b66494f69562876feab"
 *     responses:
 *       200:
 *         description: The list of tasks
 *         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/complete/{id}:
 *   put:
 *     summary: Update the task entry by ID (mark as completed)
 *     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:
 *             type: object
 *             properties:
 *               completed:
 *                 type: boolean
 *                 description: Indicates whether the task is completed
 *                 default: false
 *               completed_date:
 *                 type: string
 *                 format: date-time
 *                 description: The date and time when the task was completed
 *             required:
 *               - completed
 *               - completed_date
 *             example:
 *               completed: true
 *               completed_date: "2024-11-18T00:00:00.000Z"
 *     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