Sindbad~EG File Manager
/**
* @swagger
* components:
* schemas:
* Files:
* type: object
* required:
* - files
* - created_by
* properties:
* files:
* type: string
* description: The file path or URL
* title:
* type: string
* description: The title of the file
* tags:
* type: array
* items:
* type: string
* description: Tags related to the file
* description:
* type: string
* description: Description of the file
* apply_description:
* type: boolean
* description: Whether the description should be applied
* folder_id:
* type: string
* description: The ID of the associated folder
* contact_id:
* type: string
* description: The ID of the associated contact
* line_of_business:
* type: string
* description: Line of business associated with the file
* effective:
* type: string
* description: Effective date of the file
* created_by:
* type: string
* description: The ID of the user who created the file
* deleted:
* type: boolean
* description: Whether the file is marked as deleted
* createdOn:
* type: string
* format: date-time
* description: File creation timestamp
* modifiedOn:
* type: string
* format: date-time
* description: File modification timestamp
* example:
* files: "/path/to/file.pdf"
* title: "Sample File"
* tags: ["tag1", "tag2"]
* description: "A sample file description"
* apply_description: true
* folder_id: "60f8f0bce7c8b91c54d8c27d"
* contact_id: "60f8f0cbe7c8b91c54d8c27e"
* line_of_business: "Insurance"
* effective: "2024-10-04"
* created_by: "64d5bd3aca0be228afc9e267"
* deleted: false
* createdOn: "2024-10-04T10:30:00.000Z"
* modifiedOn: "2024-10-04T11:00:00.000Z"
*
* UpdateResponse:
* type: object
* properties:
* message:
* type: string
* example: "Data updated successfully"
*
* DeleteResponse:
* type: object
* properties:
* message:
* type: string
* example: "File and related data deleted successfully"
*
* securitySchemes:
* bearerAuth:
* type: http
* scheme: bearer
* bearerFormat: JWT
*/
/**
* @swagger
* tags:
* - name: Files
* description: Operations related to files
*/
/**
* @swagger
* /file/list:
* get:
* summary: Returns the list of files
* tags: [Files]
* security:
* - bearerAuth: []
* responses:
* 200:
* description: The list of files
* content:
* application/json:
* schema:
* type: array
* items:
* $ref: '#/components/schemas/Files'
*/
/**
* @swagger
* /file/add:
* post:
* summary: Create a new file entry
* tags: [Files]
* security:
* - bearerAuth: []
* requestBody:
* required: true
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/Files'
* responses:
* 201:
* description: The file entry was successfully created
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/Files'
*/
/**
* @swagger
* /file/edit/{id}:
* put:
* summary: Update the file entry by ID
* tags: [Files]
* security:
* - bearerAuth: []
* parameters:
* - in: path
* name: id
* schema:
* type: string
* required: true
* description: The ID of the file entry
* requestBody:
* required: true
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/Files'
* responses:
* 200:
* description: The file entry was successfully updated
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/UpdateResponse'
* 404:
* description: File not found
*/
/**
* @swagger
* /file/delete/{id}:
* delete:
* summary: Delete the file entry by ID
* tags: [Files]
* security:
* - bearerAuth: []
* parameters:
* - in: path
* name: id
* schema:
* type: string
* required: true
* description: The ID of the file entry
* responses:
* 200:
* description: The file entry was successfully deleted
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/DeleteResponse'
* 404:
* description: File not found
*/
"use strict";
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists