openapi: 3.0.3
info:
  title: 'Taskify SaaS - API Documentation'
  description: ''
  version: 1.0.0
servers:
  -
    url: 'http://localhost:8000'
tags:
  -
    name: Endpoints
    description: ''
  -
    name: 'User Authentication'
    description: 'This endpoint allows a user or client to authenticate using email and password. It applies rate limiting and returns a Bearer token upon successful login.'
  -
    name: Dashboard
    description: "Retrieves a paginated list of users who have work anniversaries (based on their date of joining) within a specified number of upcoming days.\nThis endpoint supports filtering, sorting, searching, and pagination."
  -
    name: 'Project Managemant'
    description: "This endpoint retrieves one specific project if an ID is provided, or returns a paginated list of projects\nbased on applied filters such as status, users, clients, date range, search terms, and favorite flag."
  -
    name: 'Project Media'
    description: ''
  -
    name: 'Project Milestones'
    description: "This API returns either a single milestone (if an `id` is provided) or a paginated list of milestones.\nIt supports filtering by title, description, status, and date ranges. Sorting and pagination are also supported."
  -
    name: 'Project status and priority'
    description: "This endpoint updates the status of a specified project.\nThe status change is recorded in the status timeline,\nand notifications are sent to related users and clients.\n\nYou can include an optional `note` with the status update.\n\nIf `isApi` request parameter is true, response will use\nthe standardized API response format."
  -
    name: 'Project Comments'
    description: ''
  -
    name: 'project issues'
    description: 'This endpoint allows you to create a new issue related to a specific project. You must provide issue details such as title, description, status, and optional assignees. The issue will be created under the given project and notifications will be dispatched to the assignees.'
  -
    name: 'Task Management'
    description: "This API endpoint updates a task with given details including reminders and recurring configurations.\nIt handles:\n- Status change tracking with status timelines.\n- Optional reminder creation or update.\n- Optional recurring task creation or update.\n- User reassignment with notification dispatching."
  -
    name: 'Task status and performance'
    description: "This endpoint allows you to update the status of a task by providing the task ID and the new status ID.\nIt logs the status change in the task's status timeline and notifies assigned users and clients."
  -
    name: 'Task Media'
    description: "Upload one or more media files to an existing task using its ID. The uploaded files will be stored\nin the `task-media` media collection using Spatie MediaLibrary. This endpoint accepts multiple files."
  -
    name: 'Task Celender'
    description: ''
  -
    name: 'Task Comments'
    description: "This endpoint allows an authenticated user to add a comment to a specific model\nsuch as a Task, Project, or any commentable entity. It also supports mentions\n(e.g., @username) and file attachments (e.g., PNG, PDF)."
  -
    name: 'Status Management'
    description: ''
  -
    name: 'Client Management'
    description: "This endpoint deletes a specific client by their ID.\nIt removes the client from the database along with all their associated todos,\nand uses a reusable deletion service for standardized deletion handling."
  -
    name: Priority
    description: ''
  -
    name: 'User Managemant'
    description: "This endpoint allows admins to create a new user within a workspace.\nEmail uniqueness is checked across both users and clients.\nOptionally, a verification email and account creation email are sent based on system configuration."
  -
    name: 'Workspace Managemant'
    description: "This endpoint allows authenticated users to create a new workspace. It automatically associates users and clients,\nsets the workspace as primary (if requested), and logs activity. Notifications are sent to the participants."
  -
    name: 'Todos Managemant'
    description: "Updates a specific Todo item based on the provided ID and new data.\nRequires the `id`, `title`, and `priority` fields in the request."
  -
    name: 'Meeting Managemant'
    description: ''
  -
    name: 'note Managemant'
    description: "This endpoint allows you to delete a note by its ID.\nIt performs a lookup for the note, deletes it using the DeletionService,\nand returns a formatted API response."
  -
    name: Activitylog
    description: 'Returns a paginated list of activity logs, or a single activity log if an ID is provided. Supports filtering, searching, and pagination.'
  -
    name: Notifications
    description: 'List notifications for the authenticated user or specified user/client.'
  -
    name: Contracts
    description: ''
  -
    name: Allowances
    description: ''
  -
    name: Deductions
    description: ''
  -
    name: Payslips
    description: ''
  -
    name: 'Expenses & Expense Types'
    description: ''
  -
    name: 'Setting Management'
    description: ''
  -
    name: 'leaverequest Managemant'
    description: 'This endpoint allows a user, admin, or leave editor to create a leave request.'
paths:
  /api/user:
    get:
      summary: ''
      operationId: getApiUser
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
  '/api/roles/{id}':
    get:
      summary: 'Get all roles.'
      operationId: getAllRoles
      description: 'Returns a list of all roles available in the system.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  roles:
                    -
                      id: 1
                      name: Admin
                      guard_name: web
                      created_at: '2024-01-01T12:00:00.000000Z'
                      updated_at: '2024-01-01T12:00:00.000000Z'
                    -
                      id: 2
                      name: Client
                      guard_name: client
                      created_at: '2024-01-01T12:00:00.000000Z'
                      updated_at: '2024-01-01T12:00:00.000000Z'
                properties:
                  error:
                    type: boolean
                    example: false
                  roles:
                    type: array
                    example:
                      -
                        id: 1
                        name: Admin
                        guard_name: web
                        created_at: '2024-01-01T12:00:00.000000Z'
                        updated_at: '2024-01-01T12:00:00.000000Z'
                      -
                        id: 2
                        name: Client
                        guard_name: client
                        created_at: '2024-01-01T12:00:00.000000Z'
                        updated_at: '2024-01-01T12:00:00.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: Admin
                        guard_name:
                          type: string
                          example: web
                        created_at:
                          type: string
                          example: '2024-01-01T12:00:00.000000Z'
                        updated_at:
                          type: string
                          example: '2024-01-01T12:00:00.000000Z'
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'Optional parameter. The ID of the .'
        required: true
        schema:
          type: string
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: consequatur
  '/api/permissions/{id}':
    get:
      summary: ''
      operationId: getApiPermissionsId
      description: ''
      parameters: []
      responses:
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Role not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Role not found.'
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'Optional parameter. The ID of the .'
        required: true
        schema:
          type: string
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: consequatur
  /api/master-panel/dashboardList:
    get:
      summary: ''
      operationId: getApiMasterPanelDashboardList
      description: ''
      parameters: []
      responses:
        302:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "<!DOCTYPE html>\n<html>\n    <head>\n        <meta charset=\"UTF-8\" />\n        <meta http-equiv=\"refresh\" content=\"0;url='http://localhost:8000'\" />\n\n        <title>Redirecting to http://localhost:8000</title>\n    </head>\n    <body>\n        Redirecting to <a href=\"http://localhost:8000\">http://localhost:8000</a>.\n    </body>\n</html>"
      tags:
        - Endpoints
      security: []
  /api/master-panel/update-module-dates:
    post:
      summary: ''
      operationId: postApiMasterPanelUpdateModuleDates
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                module:
                  type: object
                  description: ''
                  example: []
                  nullable: false
                  properties:
                    type:
                      type: string
                      description: ''
                      example: project
                      nullable: false
                      enum:
                        - project
                        - task
                    id:
                      type: integer
                      description: ''
                      example: 17
                      nullable: false
                  required:
                    - type
                    - id
                start_date:
                  type: string
                  description: ''
                  example: consequatur
                  nullable: false
                end_date:
                  type: string
                  description: 'Temporarily validate as a string.'
                  example: consequatur
                  nullable: false
              required:
                - module
                - start_date
                - end_date
      security: []
  /api/master-panel/tasks/media/delete-multiple:
    post:
      summary: ''
      operationId: postApiMasterPanelTasksMediaDeleteMultiple
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                ids:
                  type: array
                  description: "Ensure 'ids' is present and an array. The <code>id</code> of an existing record in the media table."
                  example:
                    - 17
                  items:
                    type: integer
      security: []
  /api/master-panel/todo/update-status:
    post:
      summary: 'Update the completion status of a Todo.'
      operationId: updateTheCompletionStatusOfATodo
      description: 'This endpoint allows the user to update the `is_completed` status of a specific Todo item by providing its ID and the desired status.'
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Status updated successfully.'
                  id: 12
                  activity_message: 'John Doe marked todo Task Title as Completed'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Status updated successfully.'
                  id:
                    type: integer
                    example: 12
                  activity_message:
                    type: string
                    example: 'John Doe marked todo Task Title as Completed'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'No query results for model [App\Models\Todo] 999.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'No query results for model [App\Models\Todo] 999.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    id:
                      - 'The id field is required.'
                    status:
                      - 'The status field is required.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        example:
                          - 'The id field is required.'
                        items:
                          type: string
                      status:
                        type: array
                        example:
                          - 'The status field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Detailed error message'
                  message: "Todo couldn't be updated."
                  line: 123
                  file: /path/to/file.php
                properties:
                  error:
                    type: string
                    example: 'Detailed error message'
                  message:
                    type: string
                    example: "Todo couldn't be updated."
                  line:
                    type: integer
                    example: 123
                  file:
                    type: string
                    example: /path/to/file.php
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the Todo.'
                  example: 12
                  nullable: false
                status:
                  type: boolean
                  description: 'Status to set. 1 for completed, 0 for pending.'
                  example: true
                  nullable: false
                isApi:
                  type: boolean
                  description: 'optional Whether the request is API-based.'
                  example: true
                  nullable: false
              required:
                - id
                - status
      security: []
  '/api/master-panel/payslips/{id}':
    delete:
      summary: ''
      operationId: deleteApiMasterPanelPayslipsId
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
    get:
      summary: 'List Payslips (API)'
      operationId: listPayslipsAPI
      description: ''
      parameters:
        -
          in: query
          name: id
          description: 'Optional. If provided, returns the payslip with this ID.'
          example: 5
          required: false
          schema:
            type: integer
            description: 'Optional. If provided, returns the payslip with this ID.'
            example: 5
            nullable: false
        -
          in: query
          name: search
          description: 'Optional. Search term for payslips.'
          example: PSL-2024
          required: false
          schema:
            type: string
            description: 'Optional. Search term for payslips.'
            example: PSL-2024
            nullable: false
        -
          in: query
          name: sort
          description: 'Optional. Sort field. Default: id.'
          example: month
          required: false
          schema:
            type: string
            description: 'Optional. Sort field. Default: id.'
            example: month
            nullable: false
        -
          in: query
          name: order
          description: 'Optional. Sort order. Default: DESC.'
          example: ASC
          required: false
          schema:
            type: string
            description: 'Optional. Sort order. Default: DESC.'
            example: ASC
            nullable: false
        -
          in: query
          name: status
          description: 'Optional. Filter by status (0=Unpaid, 1=Paid).'
          example: 1
          required: false
          schema:
            type: integer
            description: 'Optional. Filter by status (0=Unpaid, 1=Paid).'
            example: 1
            nullable: false
        -
          in: query
          name: user_id
          description: 'Optional. Filter by user.'
          example: 3
          required: false
          schema:
            type: integer
            description: 'Optional. Filter by user.'
            example: 3
            nullable: false
        -
          in: query
          name: created_by
          description: 'Optional. Filter by creator.'
          example: 2
          required: false
          schema:
            type: integer
            description: 'Optional. Filter by creator.'
            example: 2
            nullable: false
        -
          in: query
          name: month
          description: 'Optional. Filter by month (YYYY-MM).'
          example: 2024-06
          required: false
          schema:
            type: string
            description: 'Optional. Filter by month (YYYY-MM).'
            example: 2024-06
            nullable: false
        -
          in: query
          name: limit
          description: 'Optional. Pagination limit. Default: 15.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Optional. Pagination limit. Default: 15.'
            example: 10
            nullable: false
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                oneOf:
                  -
                    description: List
                    type: string
                    example: "{\n  \"error\": false,\n  \"message\": \"Payslips fetched successfully.\",\n  \"total\": 2,\n  \"rows\": [\n    {\"id\":1,\"user\":\"John Doe\", ...},\n    {\"id\":2,\"user\":\"Jane Smith\", ...}\n  ]\n}"
                  -
                    description: Single
                    type: string
                    example: "{\n  \"error\": false,\n  \"message\": \"Payslip fetched successfully.\",\n  \"data\": {\"id\":1,\"user\":\"John Doe\", ...}\n}"
        404:
          description: 'Not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Payslip not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Payslip not found.'
        500:
          description: Error
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred: ...'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred: ...'
      tags:
        - Payslips
      security: []
    put:
      summary: 'Update Payslip'
      operationId: updatePayslip
      description: ''
      parameters:
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: Success
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"error\": false,\n  \"message\": \"Payslip updated successfully.\",\n  \"id\": 1,\n  \"data\": {\"id\":1, ...}\n}"
        400:
          description: 'Validation error'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: ...
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: ...
        404:
          description: 'Not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Payslip not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Payslip not found.'
        500:
          description: Error
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred: ...'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred: ...'
      tags:
        - Payslips
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                isApi:
                  type: boolean
                  description: 'Set to true for API response.'
                  example: true
                  nullable: false
                id:
                  type: integer
                  description: 'The ID of the payslip.'
                  example: 1
                  nullable: false
                user_id:
                  type: integer
                  description: 'The user ID.'
                  example: 2
                  nullable: false
                month:
                  type: string
                  description: 'The month (YYYY-MM).'
                  example: 2024-06
                  nullable: false
                basic_salary:
                  type: number
                  description: required.
                  example: 50000.0
                  nullable: false
                working_days:
                  type: integer
                  description: required.
                  example: 22
                  nullable: false
                lop_days:
                  type: integer
                  description: required.
                  example: 2
                  nullable: false
                paid_days:
                  type: integer
                  description: required.
                  example: 20
                  nullable: false
                bonus:
                  type: number
                  description: required.
                  example: 1000.0
                  nullable: false
                incentives:
                  type: number
                  description: required.
                  example: 500.0
                  nullable: false
                leave_deduction:
                  type: number
                  description: required.
                  example: 200.0
                  nullable: false
                ot_hours:
                  type: integer
                  description: required.
                  example: 5
                  nullable: false
                ot_rate:
                  type: number
                  description: required.
                  example: 100.0
                  nullable: false
                ot_payment:
                  type: number
                  description: required.
                  example: 500.0
                  nullable: false
                total_allowance:
                  type: number
                  description: required.
                  example: 1500.0
                  nullable: false
                total_deductions:
                  type: number
                  description: required.
                  example: 300.0
                  nullable: false
                total_earnings:
                  type: number
                  description: required.
                  example: 52000.0
                  nullable: false
                net_pay:
                  type: number
                  description: required.
                  example: 51700.0
                  nullable: false
                payment_method_id:
                  type: integer
                  description: optional.
                  example: 1
                  nullable: false
                payment_date:
                  type: string
                  description: optional.
                  example: '2024-06-30'
                  nullable: false
                status:
                  type: integer
                  description: required.
                  example: 1
                  nullable: false
                note:
                  type: string
                  description: optional.
                  example: 'June payslip'
                  nullable: false
                allowances:
                  type: array
                  description: optional.
                  example:
                    - 1
                    - 2
                  items:
                    type: string
                deductions:
                  type: array
                  description: optional.
                  example:
                    - 1
                    - 2
                  items:
                    type: string
              required:
                - isApi
                - id
                - user_id
                - month
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the payslip.'
        example: consequatur
        required: true
        schema:
          type: string
  /api/register:
    post:
      summary: 'Register a new user'
      operationId: registerANewUser
      description: "This endpoint allows a new user to register with first name, last name, email, phone, and password.\nThe system ensures the email and phone are unique across both users and clients.\nUpon successful registration, the user is assigned the \"admin\" role, an admin record is created, and a token is issued."
      parameters: []
      responses:
        200:
          description: 'Successful Registration'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'User registered successfully'
                  redirect_url: 'http://localhost:8000/login'
                  access_token: 1|ABCDEF1234567890...
                  token_type: Bearer
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'User registered successfully'
                  redirect_url:
                    type: string
                    example: 'http://localhost:8000/login'
                  access_token:
                    type: string
                    example: 1|ABCDEF1234567890...
                  token_type:
                    type: string
                    example: Bearer
        422:
          description: 'Validation Failed'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message:
                    email:
                      - 'The email has already been taken in users or clients.'
                    password:
                      - 'Password must be at least 6 characters long.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: object
                    properties:
                      email:
                        type: array
                        example:
                          - 'The email has already been taken in users or clients.'
                        items:
                          type: string
                      password:
                        type: array
                        example:
                          - 'Password must be at least 6 characters long.'
                        items:
                          type: string
        500:
          description: 'Server Error'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Something went wrong on the server.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Something went wrong on the server.'
      tags:
        - 'User Authentication'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                first_name:
                  type: string
                  description: 'The first name of the user. Must not contain numbers.'
                  example: John
                  nullable: false
                last_name:
                  type: string
                  description: 'The last name of the user. Must not contain numbers.'
                  example: ramanandi
                  nullable: false
                email:
                  type: string
                  description: 'Must be a valid email and unique across users and clients.'
                  example: bhurabhai@example.com
                  nullable: false
                phone:
                  type: string
                  description: 'Must be a string of digits and unique among users.'
                  example: '9876543210'
                  nullable: false
                password:
                  type: string
                  description: 'Minimum 6 characters.'
                  example: secret123
                  nullable: false
                password_confirmation:
                  type: string
                  description: 'Must match the password.'
                  example: secret123
                  nullable: false
              required:
                - first_name
                - last_name
                - email
                - phone
                - password
                - password_confirmation
      security: []
  /api/login:
    post:
      summary: login
      operationId: login
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"error\": false,\n  \"message\": \"User login successful\",\n  \"access_token\": \"1|X1Y2Z3TOKENEXAMPLE\",\n  \"token_type\": \"Bearer\",\n  \"account_type\": \"user\",\n  \"role\": \"admin\",\n  \"user\": {\n    \"id\": 1,\n    \"name\": \"John Doe\",\n    \"email\": \"johndoe@example.com\",\n    ...\n  },\n  \"redirect_url\": \"http://yourapp.com/workspaces/edit/1\"\n}"
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Invalid credentials. Please try again.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Invalid credentials. Please try again.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    email:
                      - 'The email field is required.'
                    password:
                      - 'The password field is required.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      email:
                        type: array
                        example:
                          - 'The email field is required.'
                        items:
                          type: string
                      password:
                        type: array
                        example:
                          - 'The password field is required.'
                        items:
                          type: string
        429:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Too many login attempts. Please try again in 60 seconds.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Too many login attempts. Please try again in 60 seconds.'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An unexpected error occurred. Please try again later.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An unexpected error occurred. Please try again later.'
      tags:
        - 'User Authentication'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: 'The email address of the account.'
                  example: admin@gmail.com
                  nullable: false
                password:
                  type: string
                  description: 'The password for the account.'
                  example: '123456'
                  nullable: false
              required:
                - email
                - password
      security: []
  /api/forgot-password:
    post:
      summary: 'Send Password Reset Link'
      operationId: sendPasswordResetLink
      description: "This endpoint sends a password reset link to the given email address\nif it belongs to a registered user or client."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Password reset link emailed successfully.'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Password reset link emailed successfully.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'The given data was invalid.'
                  errors:
                    email:
                      - 'The email field is required.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      email:
                        type: array
                        example:
                          - 'The email field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: ''
                    type: object
                    example:
                      error: true
                      message: "Password reset link couldn't be sent, please check email settings."
                    properties:
                      error:
                        type: boolean
                        example: true
                      message:
                        type: string
                        example: "Password reset link couldn't be sent, please check email settings."
                  -
                    description: ''
                    type: object
                    example:
                      error: true
                      message: "Password reset link couldn't be sent, please configure email settings."
                    properties:
                      error:
                        type: boolean
                        example: true
                      message:
                        type: string
                        example: "Password reset link couldn't be sent, please configure email settings."
      tags:
        - 'User Authentication'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: 'The email address of the user or client.'
                  example: user@example.com
                  nullable: false
              required:
                - email
      security: []
  /api/reset-password:
    post:
      summary: 'Reset Password (API)'
      operationId: resetPasswordAPI
      description: "Reset a user's or client's password using a valid token. This is used after the user clicks a reset link in their email."
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: 'integer required The ID of the workspace the user belongs to. Example: 1'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Password reset successful.'
                  data: []
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Password reset successful.'
                  data:
                    type: array
                    example: []
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'This password reset token is invalid.'
                  data: []
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'This password reset token is invalid.'
                  data:
                    type: array
                    example: []
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An unexpected error occurred.'
                  data:
                    error: 'Exception message here'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An unexpected error occurred.'
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                        example: 'Exception message here'
      tags:
        - 'User Authentication'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
                  description: 'The password reset token from the reset email.'
                  example: abc123
                  nullable: false
                email:
                  type: string
                  description: 'The email of the user or client.'
                  example: john.doe@example.com
                  nullable: false
                password:
                  type: string
                  description: 'The new password (min 6 characters).'
                  example: newPassword123
                  nullable: false
                password_confirmation:
                  type: string
                  description: 'Must match the password field.'
                  example: newPassword123
                  nullable: false
                account_type:
                  type: string
                  description: 'Type of account: `user` or `client`.'
                  example: user
                  nullable: false
              required:
                - token
                - email
                - password
                - password_confirmation
                - account_type
      security: []
  /api/master-panel/upcoming-birthdays:
    get:
      summary: 'Get Upcoming Birthdays'
      operationId: getUpcomingBirthdays
      description: "This endpoint retrieves a list of users within the current workspace whose birthdays are coming up within the next given number of days (default is 30).\nIt calculates the number of days left for each birthday and includes user details like name, photo, age, and profile link."
      parameters:
        -
          in: query
          name: upcoming_days
          description: 'Optional. Number of upcoming days to look for birthdays. Defaults to 30.'
          example: 15
          required: false
          schema:
            type: integer
            description: 'Optional. Number of upcoming days to look for birthdays. Defaults to 30.'
            example: 15
            nullable: false
        -
          in: query
          name: isApi
          description: 'Optional. Pass true to get formatted API response.'
          example: true
          required: false
          schema:
            type: boolean
            description: 'Optional. Pass true to get formatted API response.'
            example: true
            nullable: false
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Upcoming birthdays fetched successfully.'
                  data:
                    data:
                      -
                        id: 5
                        member: 'John Doe'
                        dob: '1995-07-18'
                        days_left: 12
                        age: 28
                        photo: 'http://example.com/storage/photos/user5.jpg'
                        profile_url: 'http://example.com/users/5'
                    total: 1
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Upcoming birthdays fetched successfully.'
                  data:
                    type: object
                    properties:
                      data:
                        type: array
                        example:
                          -
                            id: 5
                            member: 'John Doe'
                            dob: '1995-07-18'
                            days_left: 12
                            age: 28
                            photo: 'http://example.com/storage/photos/user5.jpg'
                            profile_url: 'http://example.com/users/5'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 5
                            member:
                              type: string
                              example: 'John Doe'
                            dob:
                              type: string
                              example: '1995-07-18'
                            days_left:
                              type: integer
                              example: 12
                            age:
                              type: integer
                              example: 28
                            photo:
                              type: string
                              example: 'http://example.com/storage/photos/user5.jpg'
                            profile_url:
                              type: string
                              example: 'http://example.com/users/5'
                      total:
                        type: integer
                        example: 1
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Internal Server Error: Something went wrong.'
                  data: []
                  status_code: 500
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Internal Server Error: Something went wrong.'
                  data:
                    type: array
                    example: []
                  status_code:
                    type: integer
                    example: 500
      tags:
        - Dashboard
  /api/master-panel/upcoming-work-anniversaries:
    get:
      summary: 'Get Upcoming Work Anniversaries'
      operationId: getUpcomingWorkAnniversaries
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional. Search term to filter users by first name, last name, full name, or date of joining.'
          example: John
          required: false
          schema:
            type: string
            description: 'Optional. Search term to filter users by first name, last name, full name, or date of joining.'
            example: John
            nullable: false
        -
          in: query
          name: sort
          description: 'Optional. Field to sort by. Default is "doj".'
          example: doj
          required: false
          schema:
            type: string
            description: 'Optional. Field to sort by. Default is "doj".'
            example: doj
            nullable: false
        -
          in: query
          name: order
          description: 'Optional. Sort order: ASC or DESC. Default is "ASC".'
          example: ASC
          required: false
          schema:
            type: string
            description: 'Optional. Sort order: ASC or DESC. Default is "ASC".'
            example: ASC
            nullable: false
        -
          in: query
          name: upcoming_days
          description: 'Optional. Number of upcoming days to check. Default is 30.'
          example: 30
          required: false
          schema:
            type: integer
            description: 'Optional. Number of upcoming days to check. Default is 30.'
            example: 30
            nullable: false
        -
          in: query
          name: user_id
          description: 'Optional. Filter by a specific user ID.'
          example: 15
          required: false
          schema:
            type: integer
            description: 'Optional. Filter by a specific user ID.'
            example: 15
            nullable: false
        -
          in: query
          name: limit
          description: 'Optional. Number of results per page. Default is 15.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Optional. Number of results per page. Default is 15.'
            example: 10
            nullable: false
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  rows:
                    -
                      id: 1
                      member: "Alice Smith 🥳<ul class='list-unstyled users-list m-0 avatar-group d-flex align-items-center'><a href='http://example.com/users/1' target='_blank'><li class='avatar avatar-sm pull-up' title='Alice Smith'><img src='http://example.com/storage/photos/alice.jpg' alt='Avatar' class='rounded-circle'>"
                      wa_date: "2025-05-19 <span class='badge bg-success'>Today</span>"
                      days_left: 0
                  total: 25
                properties:
                  rows:
                    type: array
                    example:
                      -
                        id: 1
                        member: "Alice Smith 🥳<ul class='list-unstyled users-list m-0 avatar-group d-flex align-items-center'><a href='http://example.com/users/1' target='_blank'><li class='avatar avatar-sm pull-up' title='Alice Smith'><img src='http://example.com/storage/photos/alice.jpg' alt='Avatar' class='rounded-circle'>"
                        wa_date: "2025-05-19 <span class='badge bg-success'>Today</span>"
                        days_left: 0
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        member:
                          type: string
                          example: "Alice Smith 🥳<ul class='list-unstyled users-list m-0 avatar-group d-flex align-items-center'><a href='http://example.com/users/1' target='_blank'><li class='avatar avatar-sm pull-up' title='Alice Smith'><img src='http://example.com/storage/photos/alice.jpg' alt='Avatar' class='rounded-circle'>"
                        wa_date:
                          type: string
                          example: "2025-05-19 <span class='badge bg-success'>Today</span>"
                        days_left:
                          type: integer
                          example: 0
                  total:
                    type: integer
                    example: 25
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    order:
                      - 'The selected order is invalid. Must be ASC or DESC.'
                    sort:
                      - 'The selected sort field is invalid.'
                    upcoming_days:
                      - 'The upcoming_days must be an integer.'
                    limit:
                      - 'The limit must be a positive integer.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      order:
                        type: array
                        example:
                          - 'The selected order is invalid. Must be ASC or DESC.'
                        items:
                          type: string
                      sort:
                        type: array
                        example:
                          - 'The selected sort field is invalid.'
                        items:
                          type: string
                      upcoming_days:
                        type: array
                        example:
                          - 'The upcoming_days must be an integer.'
                        items:
                          type: string
                      limit:
                        type: array
                        example:
                          - 'The limit must be a positive integer.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: 'Internal server error. Please try again later.'
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Internal server error. Please try again later.'
      tags:
        - Dashboard
  /api/master-panel/members-on-leave:
    get:
      summary: 'Get Members on Leave (Filtered & Paginated)'
      operationId: getMembersOnLeaveFilteredPaginated
      description: "Returns a paginated list of users who are currently on leave or scheduled to be on leave\nwithin a specified number of upcoming days. Supports filtering by search term, sorting,\nuser ID, and respects permission-based visibility for the requesting user."
      parameters:
        -
          in: query
          name: search
          description: 'Optional. Search by first name or last name.'
          example: Jane
          required: false
          schema:
            type: string
            description: 'Optional. Search by first name or last name.'
            example: Jane
            nullable: false
        -
          in: query
          name: sort
          description: 'Optional. Field to sort by. Default is `from_date`.'
          example: from_date
          required: false
          schema:
            type: string
            description: 'Optional. Field to sort by. Default is `from_date`.'
            example: from_date
            nullable: false
        -
          in: query
          name: order
          description: 'Optional. Sort direction. Must be "ASC" or "DESC". Default is "ASC".'
          example: DESC
          required: false
          schema:
            type: string
            description: 'Optional. Sort direction. Must be "ASC" or "DESC". Default is "ASC".'
            example: DESC
            nullable: false
        -
          in: query
          name: upcoming_days
          description: 'Optional. Number of upcoming days to include. Default is 30.'
          example: 15
          required: false
          schema:
            type: integer
            description: 'Optional. Number of upcoming days to include. Default is 30.'
            example: 15
            nullable: false
        -
          in: query
          name: user_id
          description: 'Optional. Filter by a specific user ID.'
          example: 5
          required: false
          schema:
            type: integer
            description: 'Optional. Filter by a specific user ID.'
            example: 5
            nullable: false
        -
          in: query
          name: limit
          description: 'Optional. Number of records per page. Default is 15.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Optional. Number of records per page. Default is 15.'
            example: 10
            nullable: false
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  rows:
                    -
                      id: 12
                      member: "John Doe <ul class='list-unstyled users-list ...'>...</ul>"
                      from_date: 'Mon, May 20, 2025'
                      to_date: 'Tue, May 21, 2025'
                      type: "<span class='badge bg-primary'>Full</span>"
                      duration: '2 days'
                      days_left: 1
                  total: 15
                properties:
                  rows:
                    type: array
                    example:
                      -
                        id: 12
                        member: "John Doe <ul class='list-unstyled users-list ...'>...</ul>"
                        from_date: 'Mon, May 20, 2025'
                        to_date: 'Tue, May 21, 2025'
                        type: "<span class='badge bg-primary'>Full</span>"
                        duration: '2 days'
                        days_left: 1
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 12
                        member:
                          type: string
                          example: "John Doe <ul class='list-unstyled users-list ...'>...</ul>"
                        from_date:
                          type: string
                          example: 'Mon, May 20, 2025'
                        to_date:
                          type: string
                          example: 'Tue, May 21, 2025'
                        type:
                          type: string
                          example: "<span class='badge bg-primary'>Full</span>"
                        duration:
                          type: string
                          example: '2 days'
                        days_left:
                          type: integer
                          example: 1
                  total:
                    type: integer
                    example: 15
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    order:
                      - 'The selected order is invalid. Allowed values are ASC or DESC.'
                    sort:
                      - 'The selected sort field is invalid.'
                    upcoming_days:
                      - 'The upcoming_days must be an integer.'
                    limit:
                      - 'The limit must be a positive integer.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      order:
                        type: array
                        example:
                          - 'The selected order is invalid. Allowed values are ASC or DESC.'
                        items:
                          type: string
                      sort:
                        type: array
                        example:
                          - 'The selected sort field is invalid.'
                        items:
                          type: string
                      upcoming_days:
                        type: array
                        example:
                          - 'The upcoming_days must be an integer.'
                        items:
                          type: string
                      limit:
                        type: array
                        example:
                          - 'The limit must be a positive integer.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: 'Internal server error. Please try again later.'
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Internal server error. Please try again later.'
      tags:
        - Dashboard
  '/api/master-panel/projects/{id}':
    get:
      summary: 'Get Project(s)'
      operationId: getProjects
      description: 'Fetch a single project by ID or a list of projects with optional filters.'
      parameters:
        -
          in: query
          name: search
          description: 'optional Search by project title, description, or ID.'
          example: redesign
          required: false
          schema:
            type: string
            description: 'optional Search by project title, description, or ID.'
            example: redesign
            nullable: false
        -
          in: query
          name: sort
          description: 'optional Column to sort by. Default is `created_at`.'
          example: title
          required: false
          schema:
            type: string
            description: 'optional Column to sort by. Default is `created_at`.'
            example: title
            nullable: false
        -
          in: query
          name: order
          description: 'optional Sort order. Accepts `asc` or `desc`. Default is `desc`.'
          example: asc
          required: false
          schema:
            type: string
            description: 'optional Sort order. Accepts `asc` or `desc`. Default is `desc`.'
            example: asc
            nullable: false
        -
          in: query
          name: limit
          description: 'optional Number of results per page. Default is 10.'
          example: 5
          required: false
          schema:
            type: integer
            description: 'optional Number of results per page. Default is 10.'
            example: 5
            nullable: false
        -
          in: query
          name: offset
          description: 'optional Offset for pagination. Default is 0.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'optional Offset for pagination. Default is 0.'
            example: 10
            nullable: false
        -
          in: query
          name: status
          description: 'optional Filter by status ID.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'optional Filter by status ID.'
            example: 1
            nullable: false
        -
          in: query
          name: user_id
          description: 'optional Filter by user ID (assigned user).'
          example: 2
          required: false
          schema:
            type: integer
            description: 'optional Filter by user ID (assigned user).'
            example: 2
            nullable: false
        -
          in: query
          name: client_id
          description: 'optional Filter by client ID.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'optional Filter by client ID.'
            example: 1
            nullable: false
        -
          in: query
          name: project_start_date_from
          description: 'date optional Filter by project start date from (YYYY-MM-DD).'
          example: '2025-01-01'
          required: false
          schema:
            type: string
            description: 'date optional Filter by project start date from (YYYY-MM-DD).'
            example: '2025-01-01'
            nullable: false
        -
          in: query
          name: project_start_date_to
          description: 'date optional Filter by project start date to (YYYY-MM-DD).'
          example: '2025-12-31'
          required: false
          schema:
            type: string
            description: 'date optional Filter by project start date to (YYYY-MM-DD).'
            example: '2025-12-31'
            nullable: false
        -
          in: query
          name: project_end_date_from
          description: 'date optional Filter by project end date from (YYYY-MM-DD).'
          example: '2025-01-01'
          required: false
          schema:
            type: string
            description: 'date optional Filter by project end date from (YYYY-MM-DD).'
            example: '2025-01-01'
            nullable: false
        -
          in: query
          name: project_end_date_to
          description: 'date optional Filter by project end date to (YYYY-MM-DD).'
          example: '2025-12-31'
          required: false
          schema:
            type: string
            description: 'date optional Filter by project end date to (YYYY-MM-DD).'
            example: '2025-12-31'
            nullable: false
        -
          in: query
          name: is_favorites
          description: 'optional Filter for favorite projects. Accepts 1 or 0.'
          example: true
          required: false
          schema:
            type: boolean
            description: 'optional Filter for favorite projects. Accepts 1 or 0.'
            example: true
            nullable: false
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: 'Single project found'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Project retrieved successfully'
                  total: 1
                  data:
                    -
                      id: 23
                      title: 'this is A projects'
                      task_count: 0
                      status: Open
                      status_id: 1
                      priority: low
                      priority_id: 2
                      users:
                        -
                          id: 2
                          first_name: herry
                          last_name: porter
                          email: admin@gmail.com
                          photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                      user_id:
                        - 2
                      clients:
                        -
                          id: 1
                          first_name: jerry
                          last_name: ginny
                          email: jg@gmail.com
                          photo: 'http://localhost:8000/storage/photos/gqHsvgmDBCbtf843SRYx31e6Zl51amPZY8eG05FB.jpg'
                      client_id:
                        - 1
                      tags:
                        -
                          id: 1
                          title: '.first tag'
                      tag_ids:
                        - 1
                      start_date: '2025-05-20'
                      end_date: '2025-05-25'
                      budget: '5000.00'
                      task_accessibility: private
                      description: 'Project description here...'
                      note: 'Internal note'
                      favorite: false
                      client_can_discuss: null
                      created_at: '2025-05-20'
                      updated_at: '2025-05-20'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Project retrieved successfully'
                  total:
                    type: integer
                    example: 1
                  data:
                    type: array
                    example:
                      -
                        id: 23
                        title: 'this is A projects'
                        task_count: 0
                        status: Open
                        status_id: 1
                        priority: low
                        priority_id: 2
                        users:
                          -
                            id: 2
                            first_name: herry
                            last_name: porter
                            email: admin@gmail.com
                            photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                        user_id:
                          - 2
                        clients:
                          -
                            id: 1
                            first_name: jerry
                            last_name: ginny
                            email: jg@gmail.com
                            photo: 'http://localhost:8000/storage/photos/gqHsvgmDBCbtf843SRYx31e6Zl51amPZY8eG05FB.jpg'
                        client_id:
                          - 1
                        tags:
                          -
                            id: 1
                            title: '.first tag'
                        tag_ids:
                          - 1
                        start_date: '2025-05-20'
                        end_date: '2025-05-25'
                        budget: '5000.00'
                        task_accessibility: private
                        description: 'Project description here...'
                        note: 'Internal note'
                        favorite: false
                        client_can_discuss: null
                        created_at: '2025-05-20'
                        updated_at: '2025-05-20'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 23
                        title:
                          type: string
                          example: 'this is A projects'
                        task_count:
                          type: integer
                          example: 0
                        status:
                          type: string
                          example: Open
                        status_id:
                          type: integer
                          example: 1
                        priority:
                          type: string
                          example: low
                        priority_id:
                          type: integer
                          example: 2
                        users:
                          type: array
                          example:
                            -
                              id: 2
                              first_name: herry
                              last_name: porter
                              email: admin@gmail.com
                              photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 2
                              first_name:
                                type: string
                                example: herry
                              last_name:
                                type: string
                                example: porter
                              email:
                                type: string
                                example: admin@gmail.com
                              photo:
                                type: string
                                example: 'http://localhost:8000/storage/photos/no-image.jpg'
                        user_id:
                          type: array
                          example:
                            - 2
                          items:
                            type: integer
                        clients:
                          type: array
                          example:
                            -
                              id: 1
                              first_name: jerry
                              last_name: ginny
                              email: jg@gmail.com
                              photo: 'http://localhost:8000/storage/photos/gqHsvgmDBCbtf843SRYx31e6Zl51amPZY8eG05FB.jpg'
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              first_name:
                                type: string
                                example: jerry
                              last_name:
                                type: string
                                example: ginny
                              email:
                                type: string
                                example: jg@gmail.com
                              photo:
                                type: string
                                example: 'http://localhost:8000/storage/photos/gqHsvgmDBCbtf843SRYx31e6Zl51amPZY8eG05FB.jpg'
                        client_id:
                          type: array
                          example:
                            - 1
                          items:
                            type: integer
                        tags:
                          type: array
                          example:
                            -
                              id: 1
                              title: '.first tag'
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              title:
                                type: string
                                example: '.first tag'
                        tag_ids:
                          type: array
                          example:
                            - 1
                          items:
                            type: integer
                        start_date:
                          type: string
                          example: '2025-05-20'
                        end_date:
                          type: string
                          example: '2025-05-25'
                        budget:
                          type: string
                          example: '5000.00'
                        task_accessibility:
                          type: string
                          example: private
                        description:
                          type: string
                          example: 'Project description here...'
                        note:
                          type: string
                          example: 'Internal note'
                        favorite:
                          type: boolean
                          example: false
                        client_can_discuss:
                          type: string
                          example: null
                        created_at:
                          type: string
                          example: '2025-05-20'
                        updated_at:
                          type: string
                          example: '2025-05-20'
        404:
          description: 'Project not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Project not found'
                  total: 0
                  data: []
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Project not found'
                  total:
                    type: integer
                    example: 0
                  data:
                    type: array
                    example: []
        500:
          description: 'Unexpected error'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Some error message'
                  message: "Lead Couldn't Created."
                  line: 143
                  file: /app/Http/Controllers/ProjectController.php
                properties:
                  error:
                    type: string
                    example: 'Some error message'
                  message:
                    type: string
                    example: "Lead Couldn't Created."
                  line:
                    type: integer
                    example: 143
                  file:
                    type: string
                    example: /app/Http/Controllers/ProjectController.php
      tags:
        - 'Project Managemant'
    put:
      summary: 'Update an existing project.'
      operationId: updateAnExistingProject
      description: ''
      parameters:
        -
          in: query
          name: isApi
          description: 'Optional. Set to true if you want API formatted response.'
          example: true
          required: false
          schema:
            type: boolean
            description: 'Optional. Set to true if you want API formatted response.'
            example: true
            nullable: false
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: Success
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Project updated successfully.'
                  id: 111
                  data:
                    id: 111
                    title: updated
                    task_count: 0
                    status: Open
                    status_id: 1
                    priority: r
                    priority_id: 4
                    users:
                      -
                        id: 2
                        first_name: herry
                        last_name: porter
                        email: admin@gmail.com
                        photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                    user_id:
                      - 2
                    clients: []
                    client_id: []
                    tags:
                      -
                        id: 1
                        title: 'first tag'
                    tag_ids:
                      - 1
                    start_date: '2025-05-01'
                    end_date: '2025-05-31'
                    budget: '5000'
                    task_accessibility: project_users
                    description: 'A complete redesign of the company website.'
                    note: 'Client prefers Figma for designs.'
                    favorite: 0
                    client_can_discuss: null
                    created_at: '2025-06-09'
                    updated_at: '2025-06-09'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Project updated successfully.'
                  id:
                    type: integer
                    example: 111
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 111
                      title:
                        type: string
                        example: updated
                      task_count:
                        type: integer
                        example: 0
                      status:
                        type: string
                        example: Open
                      status_id:
                        type: integer
                        example: 1
                      priority:
                        type: string
                        example: r
                      priority_id:
                        type: integer
                        example: 4
                      users:
                        type: array
                        example:
                          -
                            id: 2
                            first_name: herry
                            last_name: porter
                            email: admin@gmail.com
                            photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 2
                            first_name:
                              type: string
                              example: herry
                            last_name:
                              type: string
                              example: porter
                            email:
                              type: string
                              example: admin@gmail.com
                            photo:
                              type: string
                              example: 'http://localhost:8000/storage/photos/no-image.jpg'
                      user_id:
                        type: array
                        example:
                          - 2
                        items:
                          type: integer
                      clients:
                        type: array
                        example: []
                      client_id:
                        type: array
                        example: []
                      tags:
                        type: array
                        example:
                          -
                            id: 1
                            title: 'first tag'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: 'first tag'
                      tag_ids:
                        type: array
                        example:
                          - 1
                        items:
                          type: integer
                      start_date:
                        type: string
                        example: '2025-05-01'
                      end_date:
                        type: string
                        example: '2025-05-31'
                      budget:
                        type: string
                        example: '5000'
                      task_accessibility:
                        type: string
                        example: project_users
                      description:
                        type: string
                        example: 'A complete redesign of the company website.'
                      note:
                        type: string
                        example: 'Client prefers Figma for designs.'
                      favorite:
                        type: integer
                        example: 0
                      client_can_discuss:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-06-09'
                      updated_at:
                        type: string
                        example: '2025-06-09'
        422:
          description: 'Validation failed'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    title:
                      - 'The title field is required.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
        500:
          description: 'Unexpected error'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred while updating the project.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred while updating the project.'
      tags:
        - 'Project Managemant'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the project to update.'
                  example: 111
                  nullable: false
                title:
                  type: string
                  description: 'The title of the project.'
                  example: '"Website Redesign"'
                  nullable: false
                status_id:
                  type: integer
                  description: 'The ID of the status to assign.'
                  example: 1
                  nullable: false
                priority_id:
                  type: integer
                  description: 'The ID of the priority to assign. Nullable.'
                  example: 4
                  nullable: true
                budget:
                  type: integer
                  description: 'The budget allocated to the project. Nullable.'
                  example: 5000
                  nullable: true
                start_date:
                  type: date
                  description: 'The start date of the project. Must be before or equal to end_date. Format: Y-m-d.'
                  example: '2025-05-01'
                  nullable: false
                end_date:
                  type: date
                  description: 'The end date of the project. Format: Y-m-d.'
                  example: '2025-05-31'
                  nullable: false
                task_accessibility:
                  type: string
                  description: 'The task accessibility setting.'
                  example: project_users
                  nullable: false
                description:
                  type: string
                  description: 'A brief description of the project. Nullable.'
                  example: '"A complete redesign of the company website."'
                  nullable: true
                note:
                  type: string
                  description: 'Additional notes for the project. Nullable.'
                  example: '"Client prefers Figma for designs."'
                  nullable: true
                user_id:
                  type: array
                  description: 'Array of user IDs to assign.'
                  example:
                    - 1
                    - 2
                    - 3
                  items:
                    type: integer
                client_id:
                  type: array
                  description: 'Array of client IDs to assign.'
                  example:
                    - 1
                    - 43
                  items:
                    type: integer
                tag_ids:
                  type: array
                  description: 'Array of tag IDs to attach.'
                  example:
                    - 1
                  items:
                    type: integer
                enable_tasks_time_entries:
                  type: boolean
                  description: 'Whether to enable time entries on tasks.'
                  example: true
                  nullable: false
              required:
                - id
                - title
                - status_id
                - start_date
                - end_date
                - task_accessibility
                - user_id
                - client_id
                - tag_ids
    delete:
      summary: 'Delete a project.'
      operationId: deleteAProject
      description: "This endpoint deletes a project by its ID. It also removes all associated comments and their attachments.\nFiles are permanently removed from the public storage disk."
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Project deleted successfully.'
                  id: '85'
                  title: 'this is updated'
                  data: []
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Project deleted successfully.'
                  id:
                    type: string
                    example: '85'
                  title:
                    type: string
                    example: 'this is updated'
                  data:
                    type: array
                    example: []
        404:
          description: 'Project not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Project not found.'
                  data: []
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Project not found.'
                  data:
                    type: array
                    example: []
        500:
          description: 'Unexpected error'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An unexpected error occurred while deleting the project.'
                  exception: 'Exception message'
                  line: 123
                  file: path/to/file
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An unexpected error occurred while deleting the project.'
                  exception:
                    type: string
                    example: 'Exception message'
                  line:
                    type: integer
                    example: 123
                  file:
                    type: string
                    example: path/to/file
      tags:
        - 'Project Managemant'
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'Optional parameter. optional The ID of the project to retrieve. If provided, other filters are ignored.'
        required: true
        schema:
          type: integer
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: 23
  /api/master-panel/projects:
    post:
      summary: 'Create a new project'
      operationId: createANewProject
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: Success
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Project created successfully.'
                  id: 85
                  data:
                    id: 85
                    title: 'Website Redesign'
                    task_count: 0
                    status: Open
                    status_id: 1
                    priority: high
                    priority_id: 1
                    users:
                      -
                        id: 1
                        first_name: super
                        last_name: Admin
                        email: superadmin@gmail.com
                        photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                    user_id:
                      - 1
                      - 2
                      - 3
                    clients:
                      -
                        id: 1
                        first_name: jerry
                        last_name: ginny
                        email: jg@gmail.com
                        photo: 'http://localhost:8000/storage/photos/sample.jpg'
                    client_id:
                      - 1
                      - 28
                    tags:
                      -
                        id: 1
                        title: '.first tag'
                    tag_ids:
                      - 1
                    start_date: '2025-05-01'
                    end_date: '2025-05-31'
                    budget: '5000'
                    task_accessibility: project_users
                    description: 'A complete redesign of the company website.'
                    note: 'Client prefers Figma for designs.'
                    favorite: false
                    client_can_discuss: null
                    created_at: '2025-05-30'
                    updated_at: '2025-05-30'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Project created successfully.'
                  id:
                    type: integer
                    example: 85
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 85
                      title:
                        type: string
                        example: 'Website Redesign'
                      task_count:
                        type: integer
                        example: 0
                      status:
                        type: string
                        example: Open
                      status_id:
                        type: integer
                        example: 1
                      priority:
                        type: string
                        example: high
                      priority_id:
                        type: integer
                        example: 1
                      users:
                        type: array
                        example:
                          -
                            id: 1
                            first_name: super
                            last_name: Admin
                            email: superadmin@gmail.com
                            photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            first_name:
                              type: string
                              example: super
                            last_name:
                              type: string
                              example: Admin
                            email:
                              type: string
                              example: superadmin@gmail.com
                            photo:
                              type: string
                              example: 'http://localhost:8000/storage/photos/no-image.jpg'
                      user_id:
                        type: array
                        example:
                          - 1
                          - 2
                          - 3
                        items:
                          type: integer
                      clients:
                        type: array
                        example:
                          -
                            id: 1
                            first_name: jerry
                            last_name: ginny
                            email: jg@gmail.com
                            photo: 'http://localhost:8000/storage/photos/sample.jpg'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            first_name:
                              type: string
                              example: jerry
                            last_name:
                              type: string
                              example: ginny
                            email:
                              type: string
                              example: jg@gmail.com
                            photo:
                              type: string
                              example: 'http://localhost:8000/storage/photos/sample.jpg'
                      client_id:
                        type: array
                        example:
                          - 1
                          - 28
                        items:
                          type: integer
                      tags:
                        type: array
                        example:
                          -
                            id: 1
                            title: '.first tag'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: '.first tag'
                      tag_ids:
                        type: array
                        example:
                          - 1
                        items:
                          type: integer
                      start_date:
                        type: string
                        example: '2025-05-01'
                      end_date:
                        type: string
                        example: '2025-05-31'
                      budget:
                        type: string
                        example: '5000'
                      task_accessibility:
                        type: string
                        example: project_users
                      description:
                        type: string
                        example: 'A complete redesign of the company website.'
                      note:
                        type: string
                        example: 'Client prefers Figma for designs.'
                      favorite:
                        type: boolean
                        example: false
                      client_can_discuss:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-05-30'
                      updated_at:
                        type: string
                        example: '2025-05-30'
        403:
          description: 'Unauthorized status change'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'You are not authorized to set this status.'
                  data: []
                  code: 403
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'You are not authorized to set this status.'
                  data:
                    type: array
                    example: []
                  code:
                    type: integer
                    example: 403
        422:
          description: 'Validation errors'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    title:
                      - 'The title field is required.'
                    status_id:
                      - 'The status field is required.'
                    start_date:
                      - 'The start date must be before end date.'
                    budget:
                      - 'The budget format is invalid.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
                      status_id:
                        type: array
                        example:
                          - 'The status field is required.'
                        items:
                          type: string
                      start_date:
                        type: array
                        example:
                          - 'The start date must be before end date.'
                        items:
                          type: string
                      budget:
                        type: array
                        example:
                          - 'The budget format is invalid.'
                        items:
                          type: string
        500:
          description: 'Unexpected server error'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Something went wrong while creating the project.'
                  code: 500
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Something went wrong while creating the project.'
                  code:
                    type: integer
                    example: 500
      tags:
        - 'Project Managemant'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'The title of the project.'
                  example: 'Website Redesign'
                  nullable: false
                status_id:
                  type: integer
                  description: 'The status ID for the project. Must exist in statuses table.'
                  example: 1
                  nullable: false
                priority_id:
                  type: integer
                  description: 'The priority ID. Must exist in priorities table.'
                  example: 4
                  nullable: false
                start_date:
                  type: string
                  description: 'The project start date in `Y-m-d` format. Must be before or equal to `end_date`.'
                  example: '2025-05-01'
                  nullable: false
                end_date:
                  type: string
                  description: 'The project end date in `Y-m-d` format. Must be after or equal to `start_date`.'
                  example: '2025-05-31'
                  nullable: false
                budget:
                  type: string
                  description: 'The budget amount (formatted string or numeric).'
                  example: '5000'
                  nullable: false
                task_accessibility:
                  type: string
                  description: 'Must be either `project_users` or `assigned_users`.'
                  example: project_users
                  nullable: false
                description:
                  type: string
                  description: 'Project description (optional).'
                  example: 'A complete redesign of the company website.'
                  nullable: false
                note:
                  type: string
                  description: 'Internal note (optional).'
                  example: 'Client prefers Figma for designs.'
                  nullable: false
                enable_tasks_time_entries:
                  type: boolean
                  description: 'Whether time entries are enabled.'
                  example: true
                  nullable: false
                user_id:
                  type: array
                  description: 'Array of user IDs to assign.'
                  example:
                    - 1
                    - 2
                    - 3
                  items:
                    type: integer
                client_id:
                  type: array
                  description: 'Array of client IDs to assign.'
                  example:
                    - 1
                    - 43
                  items:
                    type: integer
                tag_ids:
                  type: array
                  description: 'Array of tag IDs to attach.'
                  example:
                    - 1
                  items:
                    type: integer
                isApi:
                  type: boolean
                  description: 'Optional flag to determine API-specific behavior.'
                  example: true
                  nullable: false
                workspace_id:
                  type: integer
                  description: 'Workspace Id . Must exist in wprkspaces table . example:2'
                  example: 17
                  nullable: false
              required:
                - title
                - status_id
                - task_accessibility
                - user_id
                - client_id
                - tag_ids
      security: []
  /api/master-panel/destroy-multiple-projects:
    delete:
      summary: 'Delete multiple projects.'
      operationId: deleteMultipleProjects
      description: "This endpoint allows you to delete multiple projects by providing their IDs.\nAll related comments and attachments will also be permanently deleted."
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Project(s) deleted successfully.'
                  ids:
                    - 1
                    - 2
                    - 3
                  titles:
                    - 'Project A'
                    - 'Project B'
                    - 'Project C'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Project(s) deleted successfully.'
                  ids:
                    type: array
                    example:
                      - 1
                      - 2
                      - 3
                    items:
                      type: integer
                  titles:
                    type: array
                    example:
                      - 'Project A'
                      - 'Project B'
                      - 'Project C'
                    items:
                      type: string
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    ids:
                      - 'The ids field is required.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      ids:
                        type: array
                        example:
                          - 'The ids field is required.'
                        items:
                          type: string
      tags:
        - 'Project Managemant'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ids:
                  type: array
                  description: 'An array of project IDs to delete.'
                  example:
                    - 1
                    - 2
                    - 3
                  items:
                    type: string
              required:
                - ids
  '/api/master-panel/update_favorite/{id}':
    post:
      summary: 'Update the favorite status of a project.'
      operationId: updateTheFavoriteStatusOfAProject
      description: 'This endpoint updates whether a project is marked as a favorite or not. The user must be authenticated to perform this action.'
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: ''
                    type: object
                    example:
                      error: false
                      message: 'Project favorite status updated successfully'
                      data:
                        id: 438
                        title: 'Res Test'
                        status: Default
                        priority: dsfdsf
                        users:
                          -
                            id: 7
                            first_name: Madhavan
                            last_name: Vaidya
                            photo: 'https://test-taskify.infinitietech.com/storage/photos/yxNYBlFLALdLomrL0JzUY2USPLILL9Ocr16j4n2o.png'
                        clients:
                          -
                            id: 103
                            first_name: Test
                            last_name: Test
                            photo: 'https://test-taskify.infinitietech.com/storage/photos/no-image.jpg'
                        tags:
                          -
                            id: 45
                            title: 'Tag from update project'
                        start_date: null
                        end_date: null
                        budget: '1000.00'
                        task_accessibility: assigned_users
                        description: null
                        note: null
                        favorite: 1
                        created_at: '07-08-2024 14:38:51'
                        updated_at: '12-08-2024 13:36:10'
                    properties:
                      error:
                        type: boolean
                        example: false
                      message:
                        type: string
                        example: 'Project favorite status updated successfully'
                      data:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 438
                          title:
                            type: string
                            example: 'Res Test'
                          status:
                            type: string
                            example: Default
                          priority:
                            type: string
                            example: dsfdsf
                          users:
                            type: array
                            example:
                              -
                                id: 7
                                first_name: Madhavan
                                last_name: Vaidya
                                photo: 'https://test-taskify.infinitietech.com/storage/photos/yxNYBlFLALdLomrL0JzUY2USPLILL9Ocr16j4n2o.png'
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 7
                                first_name:
                                  type: string
                                  example: Madhavan
                                last_name:
                                  type: string
                                  example: Vaidya
                                photo:
                                  type: string
                                  example: 'https://test-taskify.infinitietech.com/storage/photos/yxNYBlFLALdLomrL0JzUY2USPLILL9Ocr16j4n2o.png'
                          clients:
                            type: array
                            example:
                              -
                                id: 103
                                first_name: Test
                                last_name: Test
                                photo: 'https://test-taskify.infinitietech.com/storage/photos/no-image.jpg'
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 103
                                first_name:
                                  type: string
                                  example: Test
                                last_name:
                                  type: string
                                  example: Test
                                photo:
                                  type: string
                                  example: 'https://test-taskify.infinitietech.com/storage/photos/no-image.jpg'
                          tags:
                            type: array
                            example:
                              -
                                id: 45
                                title: 'Tag from update project'
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 45
                                title:
                                  type: string
                                  example: 'Tag from update project'
                          start_date:
                            type: string
                            example: null
                          end_date:
                            type: string
                            example: null
                          budget:
                            type: string
                            example: '1000.00'
                          task_accessibility:
                            type: string
                            example: assigned_users
                          description:
                            type: string
                            example: null
                          note:
                            type: string
                            example: null
                          favorite:
                            type: integer
                            example: 1
                          created_at:
                            type: string
                            example: '07-08-2024 14:38:51'
                          updated_at:
                            type: string
                            example: '12-08-2024 13:36:10'
                  -
                    description: ''
                    type: object
                    example:
                      error: true
                      message: 'Project not found'
                      data: []
                    properties:
                      error:
                        type: boolean
                        example: true
                      message:
                        type: string
                        example: 'Project not found'
                      data:
                        type: array
                        example: []
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Validation errors occurred'
                  errors:
                    is_favorite:
                      - 'The is favorite field must be either 0 or 1.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Validation errors occurred'
                  errors:
                    type: object
                    properties:
                      is_favorite:
                        type: array
                        example:
                          - 'The is favorite field must be either 0 or 1.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred while updating the favorite status.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred while updating the favorite status.'
      tags:
        - 'Project Managemant'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                is_favorite:
                  type: integer
                  description: 'Indicates whether the project is a favorite. Use 1 for true and 0 for false.'
                  example: 17
                  nullable: false
              required:
                - is_favorite
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the project to update.'
        example: 17
        required: true
        schema:
          type: integer
  '/api/master-panel/projects/{id}/duplicate':
    post:
      summary: 'Duplicate a project.'
      operationId: duplicateAProject
      description: ''
      parameters:
        -
          in: query
          name: title
          description: 'Optional. A new title for the duplicated project.'
          example: 'New Project Copy'
          required: false
          schema:
            type: string
            description: 'Optional. A new title for the duplicated project.'
            example: 'New Project Copy'
            nullable: false
        -
          in: query
          name: reload
          description: 'Optional. If true, flashes a session message.'
          example: true
          required: false
          schema:
            type: boolean
            description: 'Optional. If true, flashes a session message.'
            example: true
            nullable: false
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Project duplicated successfully.'
                  id: 12
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Project duplicated successfully.'
                  id:
                    type: integer
                    example: 12
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Project duplication failed.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Project duplication failed.'
      tags:
        - 'Project Managemant'
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the project to duplicate.'
        example: 12
        required: true
        schema:
          type: integer
  /api/master-panel/projects/upload-media:
    post:
      summary: 'Upload media files to a specific project.'
      operationId: uploadMediaFilesToASpecificProject
      description: 'This endpoint allows uploading one or multiple media files associated with a project.'
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Media uploaded successfully.'
                  id:
                    - 6
                    - 7
                  data:
                    -
                      id: 6
                      name: maxresdefault
                      file_name: maxresdefault.jpg
                      file_size: 72106
                      file_type: image/jpeg
                      created_at: '2025-06-02'
                      updated_at: '2025-06-02'
                    -
                      id: 7
                      name: screenshot
                      file_name: screenshot.png
                      file_size: 45000
                      file_type: image/png
                      created_at: '2025-06-02'
                      updated_at: '2025-06-02'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Media uploaded successfully.'
                  id:
                    type: array
                    example:
                      - 6
                      - 7
                    items:
                      type: integer
                  data:
                    type: array
                    example:
                      -
                        id: 6
                        name: maxresdefault
                        file_name: maxresdefault.jpg
                        file_size: 72106
                        file_type: image/jpeg
                        created_at: '2025-06-02'
                        updated_at: '2025-06-02'
                      -
                        id: 7
                        name: screenshot
                        file_name: screenshot.png
                        file_size: 45000
                        file_type: image/png
                        created_at: '2025-06-02'
                        updated_at: '2025-06-02'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 6
                        name:
                          type: string
                          example: maxresdefault
                        file_name:
                          type: string
                          example: maxresdefault.jpg
                        file_size:
                          type: integer
                          example: 72106
                        file_type:
                          type: string
                          example: image/jpeg
                        created_at:
                          type: string
                          example: '2025-06-02'
                        updated_at:
                          type: string
                          example: '2025-06-02'
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'No file(s) chosen.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'No file(s) chosen.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'The given data was invalid.'
                  errors:
                    media_files.0:
                      - 'The media files.0 may not be greater than 2048 kilobytes.'
                    id:
                      - 'The selected id is invalid.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      media_files.0:
                        type: array
                        example:
                          - 'The media files.0 may not be greater than 2048 kilobytes.'
                        items:
                          type: string
                      id:
                        type: array
                        example:
                          - 'The selected id is invalid.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Detailed exception message here'
                  message: 'Project could not be created.'
                  line: 123
                  file: /path/to/file.php
                properties:
                  error:
                    type: string
                    example: 'Detailed exception message here'
                  message:
                    type: string
                    example: 'Project could not be created.'
                  line:
                    type: integer
                    example: 123
                  file:
                    type: string
                    example: /path/to/file.php
      tags:
        - 'Project Media'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the project to attach media to.'
                  example: 15
                  nullable: false
                'media_files[]':
                  type: string
                  format: binary
                  description: 'One or more files to upload (multipart/form-data).'
                  nullable: false
              required:
                - id
                - 'media_files[]'
      security: []
  '/api/master-panel/projects/{id}/media':
    get:
      summary: 'Get project media files'
      operationId: getProjectMediaFiles
      description: 'Retrieves all media files uploaded to a specific project. Supports sorting and filtering. Returns a formatted list of media with file URL, preview, and action buttons.'
      parameters:
        -
          in: query
          name: search
          description: 'Optional. Search term to filter media by ID, file name, or creation date.'
          example: report
          required: false
          schema:
            type: string
            description: 'Optional. Search term to filter media by ID, file name, or creation date.'
            example: report
            nullable: false
        -
          in: query
          name: sort
          description: 'Optional. Field to sort by (e.g., id, file_name). Default: id.'
          example: file_name
          required: false
          schema:
            type: string
            description: 'Optional. Field to sort by (e.g., id, file_name). Default: id.'
            example: file_name
            nullable: false
        -
          in: query
          name: order
          description: 'Optional. Sorting order: `asc` or `desc`. Default: desc.'
          example: asc
          required: false
          schema:
            type: string
            description: 'Optional. Sorting order: `asc` or `desc`. Default: desc.'
            example: asc
            nullable: false
        -
          in: query
          name: isApi
          description: 'Optional. When true, returns a formatted API response instead of JSON table structure.'
          example: true
          required: false
          schema:
            type: boolean
            description: 'Optional. When true, returns a formatted API response instead of JSON table structure.'
            example: true
            nullable: false
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: 'Success - API response'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Media retrieved successfully.'
                  data:
                    -
                      id: 4
                      file: '<a href="http://localhost:8000/storage/project-media/images.jpg" data-lightbox="project-media"> <img src="http://localhost:8000/storage/project-media/images.jpg" alt="images.jpg" width="50"></a>'
                      file_name: images.jpg
                      file_size: '11.89 KB'
                      created_at: '2025-06-02'
                      updated_at: '2025-06-02'
                      actions:
                        - '<a href="http://localhost:8000/storage/project-media/images.jpg" title=Download download><i class="bx bx-download bx-sm"></i></a><button title=Delete type="button" class="btn delete" data-id="4" data-type="project-media" data-table="project_media_table"><i class="bx bx-trash text-danger"></i></button>'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Media retrieved successfully.'
                  data:
                    type: array
                    example:
                      -
                        id: 4
                        file: '<a href="http://localhost:8000/storage/project-media/images.jpg" data-lightbox="project-media"> <img src="http://localhost:8000/storage/project-media/images.jpg" alt="images.jpg" width="50"></a>'
                        file_name: images.jpg
                        file_size: '11.89 KB'
                        created_at: '2025-06-02'
                        updated_at: '2025-06-02'
                        actions:
                          - '<a href="http://localhost:8000/storage/project-media/images.jpg" title=Download download><i class="bx bx-download bx-sm"></i></a><button title=Delete type="button" class="btn delete" data-id="4" data-type="project-media" data-table="project_media_table"><i class="bx bx-trash text-danger"></i></button>'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 4
                        file:
                          type: string
                          example: '<a href="http://localhost:8000/storage/project-media/images.jpg" data-lightbox="project-media"> <img src="http://localhost:8000/storage/project-media/images.jpg" alt="images.jpg" width="50"></a>'
                        file_name:
                          type: string
                          example: images.jpg
                        file_size:
                          type: string
                          example: '11.89 KB'
                        created_at:
                          type: string
                          example: '2025-06-02'
                        updated_at:
                          type: string
                          example: '2025-06-02'
                        actions:
                          type: array
                          example:
                            - '<a href="http://localhost:8000/storage/project-media/images.jpg" title=Download download><i class="bx bx-download bx-sm"></i></a><button title=Delete type="button" class="btn delete" data-id="4" data-type="project-media" data-table="project_media_table"><i class="bx bx-trash text-danger"></i></button>'
                          items:
                            type: string
        404:
          description: 'Project not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'No query results for model [App\Models\Project] 99'
                properties:
                  message:
                    type: string
                    example: 'No query results for model [App\Models\Project] 99'
      tags:
        - 'Project Media'
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the project.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/master-panel/media/{id}':
    delete:
      summary: 'Delete a single media file by ID.'
      operationId: deleteASingleMediaFileByID
      description: 'Deletes a media file record and its associated file from storage.'
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'File deleted successfully.'
                  id: 101
                  title: example.jpg
                  parent_id: 15
                  type: media
                  parent_type: project
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'File deleted successfully.'
                  id:
                    type: integer
                    example: 101
                  title:
                    type: string
                    example: example.jpg
                  parent_id:
                    type: integer
                    example: 15
                  type:
                    type: string
                    example: media
                  parent_type:
                    type: string
                    example: project
        404:
          description: 'Media Not Found'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'File not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'File not found.'
      tags:
        - 'Project Media'
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the medium.'
        example: consequatur
        required: true
        schema:
          type: string
      -
        in: path
        name: mediaId
        description: 'The ID of the media file to delete.'
        example: 101
        required: true
        schema:
          type: integer
  /api/master-panel/media/delete-multiple:
    post:
      summary: 'Delete multiple media files by their IDs.'
      operationId: deleteMultipleMediaFilesByTheirIDs
      description: 'Accepts an array of media IDs to delete multiple media files in a single request.'
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Files(s) deleted successfully.'
                  id:
                    - 101
                    - 102
                  titles:
                    - example1.jpg
                    - example2.png
                  parent_id:
                    - 15
                    - 15
                  type: media
                  parent_type: project
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Files(s) deleted successfully.'
                  id:
                    type: array
                    example:
                      - 101
                      - 102
                    items:
                      type: integer
                  titles:
                    type: array
                    example:
                      - example1.jpg
                      - example2.png
                    items:
                      type: string
                  parent_id:
                    type: array
                    example:
                      - 15
                      - 15
                    items:
                      type: integer
                  type:
                    type: string
                    example: media
                  parent_type:
                    type: string
                    example: project
        422:
          description: 'Validation Error'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    ids:
                      - 'The ids field is required.'
                    ids.0:
                      - 'The selected ids.0 is invalid.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      ids:
                        type: array
                        example:
                          - 'The ids field is required.'
                        items:
                          type: string
                      ids.0:
                        type: array
                        example:
                          - 'The selected ids.0 is invalid.'
                        items:
                          type: string
      tags:
        - 'Project Media'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ids:
                  type: array
                  description: 'Array of media IDs to delete.'
                  example:
                    - 101
                    - 102
                    - 103
                  items:
                    type: string
              required:
                - ids
      security: []
  /api/master-panel/create-milestone:
    post:
      summary: 'Create a new milestone for a project'
      operationId: createANewMilestoneForAProject
      description: 'This endpoint allows users to create a milestone under a specific project.'
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Milestone created successfully.'
                  data:
                    id: 12
                    type: milestone
                    parent_type: project
                    parent_id: 5
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Milestone created successfully.'
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 12
                      type:
                        type: string
                        example: milestone
                      parent_type:
                        type: string
                        example: project
                      parent_id:
                        type: integer
                        example: 5
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    project_id:
                      - 'The project_id field is required.'
                    title:
                      - 'The title field is required.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      project_id:
                        type: array
                        example:
                          - 'The project_id field is required.'
                        items:
                          type: string
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: "Milestone couldn't be created: Milestone creation failed due to mass assignment or DB error."
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: "Milestone couldn't be created: Milestone creation failed due to mass assignment or DB error."
      tags:
        - 'Project Milestones'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project_id:
                  type: integer
                  description: 'The ID of the project the milestone belongs to.'
                  example: 5
                  nullable: false
                title:
                  type: string
                  description: 'The title of the milestone.'
                  example: 'Final Design Review'
                  nullable: false
                status:
                  type: string
                  description: 'The status of the milestone. Must be one of: incomplete, complete, pending.'
                  example: incomplete
                  nullable: false
                start_date:
                  type: string
                  description: 'The start date of the milestone in the current PHP date format. Must be before or equal to end_date.'
                  example: '2025-06-10'
                  nullable: false
                end_date:
                  type: string
                  description: 'The end date of the milestone.'
                  example: '2025-06-20'
                  nullable: false
                cost:
                  type: string
                  description: 'The cost of the milestone.'
                  example: '2000.50'
                  nullable: false
                description:
                  type: string
                  description: 'The description of the milestone (optional).'
                  example: 'All screens finalized and approved by client.'
                  nullable: true
              required:
                - project_id
                - title
                - status
                - start_date
                - end_date
                - cost
      security: []
  '/api/master-panel/get-milestones/{id}':
    get:
      summary: 'Get milestone(s) (single or list)'
      operationId: getMilestonessingleOrList
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'optional A keyword to search by milestone title, description, or ID.'
          example: Review
          required: false
          schema:
            type: string
            description: 'optional A keyword to search by milestone title, description, or ID.'
            example: Review
            nullable: false
        -
          in: query
          name: status
          description: 'optional Filter by milestone status.'
          example: complete
          required: false
          schema:
            type: string
            description: 'optional Filter by milestone status.'
            example: complete
            nullable: false
        -
          in: query
          name: start_date_from
          description: 'date optional Filter milestones starting from this date (Y-m-d).'
          example: '2025-06-01'
          required: false
          schema:
            type: string
            description: 'date optional Filter milestones starting from this date (Y-m-d).'
            example: '2025-06-01'
            nullable: false
        -
          in: query
          name: start_date_to
          description: 'date optional Filter milestones starting up to this date (Y-m-d).'
          example: '2025-06-30'
          required: false
          schema:
            type: string
            description: 'date optional Filter milestones starting up to this date (Y-m-d).'
            example: '2025-06-30'
            nullable: false
        -
          in: query
          name: end_date_from
          description: 'date optional Filter milestones ending from this date (Y-m-d).'
          example: '2025-07-01'
          required: false
          schema:
            type: string
            description: 'date optional Filter milestones ending from this date (Y-m-d).'
            example: '2025-07-01'
            nullable: false
        -
          in: query
          name: end_date_to
          description: 'date optional Filter milestones ending up to this date (Y-m-d).'
          example: '2025-07-31'
          required: false
          schema:
            type: string
            description: 'date optional Filter milestones ending up to this date (Y-m-d).'
            example: '2025-07-31'
            nullable: false
        -
          in: query
          name: sort
          description: 'optional Field to sort by. Defaults to `id`.'
          example: title
          required: false
          schema:
            type: string
            description: 'optional Field to sort by. Defaults to `id`.'
            example: title
            nullable: false
        -
          in: query
          name: order
          description: 'optional Sort direction (`asc` or `desc`). Defaults to `desc`.'
          example: asc
          required: false
          schema:
            type: string
            description: 'optional Sort direction (`asc` or `desc`). Defaults to `desc`.'
            example: asc
            nullable: false
        -
          in: query
          name: limit
          description: 'optional Number of records per page. Defaults to 10.'
          example: 20
          required: false
          schema:
            type: integer
            description: 'optional Number of records per page. Defaults to 10.'
            example: 20
            nullable: false
        -
          in: header
          name: workspace_id
          description: ''
          example: 'integer required The ID of the workspace context. Example: 2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Milestones retrieved successfully.'
                  data:
                    -
                      id: 3
                      title: 'Final Review'
                      status: complete
                      start_date: '2025-06-01'
                      end_date: '2025-06-15'
                      cost: '1500.00'
                      progress: 100
                      description: 'Final phase of project delivery.'
                  total: 1
                  page: 1
                  limit: 10
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Milestones retrieved successfully.'
                  data:
                    type: array
                    example:
                      -
                        id: 3
                        title: 'Final Review'
                        status: complete
                        start_date: '2025-06-01'
                        end_date: '2025-06-15'
                        cost: '1500.00'
                        progress: 100
                        description: 'Final phase of project delivery.'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 3
                        title:
                          type: string
                          example: 'Final Review'
                        status:
                          type: string
                          example: complete
                        start_date:
                          type: string
                          example: '2025-06-01'
                        end_date:
                          type: string
                          example: '2025-06-15'
                        cost:
                          type: string
                          example: '1500.00'
                        progress:
                          type: integer
                          example: 100
                        description:
                          type: string
                          example: 'Final phase of project delivery.'
                  total:
                    type: integer
                    example: 1
                  page:
                    type: integer
                    example: 1
                  limit:
                    type: integer
                    example: 10
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Milestone not found.'
                  data: []
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Milestone not found.'
                  data:
                    type: array
                    example: []
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Error: Unexpected exception message'
                  data:
                    line: 123
                    file: path/to/file.php
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Error: Unexpected exception message'
                  data:
                    type: object
                    properties:
                      line:
                        type: integer
                        example: 123
                      file:
                        type: string
                        example: path/to/file.php
      tags:
        - 'Project Milestones'
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'Optional parameter. optional The ID of the milestone to retrieve. If provided, other filters are ignored.'
        required: true
        schema:
          type: integer
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: 3
  '/api/master-panel/update-milestone/{id}':
    put:
      summary: 'Update an existing milestone.'
      operationId: updateAnExistingMilestone
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: 'integer required The ID of the workspace context. Example: 2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Milestone updated successfully.'
                  id: 5
                  type: milestone
                  parent_type: project
                  parent_id: 12
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Milestone updated successfully.'
                  id:
                    type: integer
                    example: 5
                  type:
                    type: string
                    example: milestone
                  parent_type:
                    type: string
                    example: project
                  parent_id:
                    type: integer
                    example: 12
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Invalid date format.'
                  exception: InvalidArgumentException
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Invalid date format.'
                  exception:
                    type: string
                    example: InvalidArgumentException
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'The given data was invalid.'
                  errors:
                    title:
                      - 'The title field is required.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
      tags:
        - 'Project Milestones'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'The title of the milestone.'
                  example: 'Final Review'
                  nullable: false
                status:
                  type: string
                  description: 'The current status of the milestone.'
                  example: complete
                  nullable: false
                start_date:
                  type: date
                  description: 'The start date in `d-m-Y` format. Must be before or equal to end_date.'
                  example: 01-06-2025
                  nullable: false
                end_date:
                  type: date
                  description: 'The end date in `d-m-Y` format.'
                  example: 15-06-2025
                  nullable: false
                cost:
                  type: number
                  description: 'The estimated cost (numbers or decimal).'
                  example: 2000.5
                  nullable: false
                progress:
                  type: integer
                  description: 'Progress of the milestone in percentage (0–100).'
                  example: 80
                  nullable: false
                description:
                  type: string
                  description: 'nullable Optional description of the milestone.'
                  example: 'Final review and delivery milestone.'
                  nullable: true
                id:
                  type: integer
                  description: 'The ID of the milestone to update.'
                  example: 5
                  nullable: false
              required:
                - title
                - status
                - start_date
                - end_date
                - cost
                - progress
                - id
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the update milestone.'
        example: consequatur
        required: true
        schema:
          type: string
  /api/master-panel/save-view-preference:
    post:
      summary: "Save the user's default view preference for projects."
      operationId: saveTheUsersDefaultViewPreferenceForProjects
      description: "This endpoint allows the authenticated user or client to set their preferred default view (e.g., kanban, list, or calendar) for how projects are displayed in the UI.\nThe view preference is stored in the `user_client_preferences` table."
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Default View Set Successfully.'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Default View Set Successfully.'
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Something Went Wrong.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Something Went Wrong.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    view:
                      - 'The view field is required.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      view:
                        type: array
                        example:
                          - 'The view field is required.'
                        items:
                          type: string
      tags:
        - 'Project status and priority'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                view:
                  type: string
                  description: 'The preferred default view type. Valid options might include "kanban", "list", or "calendar".'
                  example: kanban
                  nullable: false
              required:
                - view
  '/api/master-panel/update-status/{id}':
    put:
      summary: 'Update the status of a project.'
      operationId: updateTheStatusOfAProject
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Status updated successfully.'
                  id: 438
                  type: project
                  old_status: Default
                  new_status: Completed
                  activity_message: 'John Doe updated project status from Default to Completed'
                  data:
                    id: 438
                    title: 'Res Test'
                    status: Completed
                    priority: High
                    users:
                      -
                        id: 7
                        first_name: John
                        last_name: Doe
                        photo: 'https://example.com/photos/johndoe.png'
                    clients:
                      -
                        id: 103
                        first_name: Client
                        last_name: Name
                        photo: 'https://example.com/photos/no-image.jpg'
                    tags:
                      -
                        id: 45
                        title: Important
                    start_date: '07-08-2024 14:38:51'
                    end_date: '12-08-2024 13:49:33'
                    budget: '1000.00'
                    task_accessibility: assigned_users
                    description: null
                    note: 'Project on track'
                    favorite: 1
                    created_at: '07-08-2024 14:38:51'
                    updated_at: '12-08-2024 13:49:33'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Status updated successfully.'
                  id:
                    type: integer
                    example: 438
                  type:
                    type: string
                    example: project
                  old_status:
                    type: string
                    example: Default
                  new_status:
                    type: string
                    example: Completed
                  activity_message:
                    type: string
                    example: 'John Doe updated project status from Default to Completed'
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 438
                      title:
                        type: string
                        example: 'Res Test'
                      status:
                        type: string
                        example: Completed
                      priority:
                        type: string
                        example: High
                      users:
                        type: array
                        example:
                          -
                            id: 7
                            first_name: John
                            last_name: Doe
                            photo: 'https://example.com/photos/johndoe.png'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 7
                            first_name:
                              type: string
                              example: John
                            last_name:
                              type: string
                              example: Doe
                            photo:
                              type: string
                              example: 'https://example.com/photos/johndoe.png'
                      clients:
                        type: array
                        example:
                          -
                            id: 103
                            first_name: Client
                            last_name: Name
                            photo: 'https://example.com/photos/no-image.jpg'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 103
                            first_name:
                              type: string
                              example: Client
                            last_name:
                              type: string
                              example: Name
                            photo:
                              type: string
                              example: 'https://example.com/photos/no-image.jpg'
                      tags:
                        type: array
                        example:
                          -
                            id: 45
                            title: Important
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 45
                            title:
                              type: string
                              example: Important
                      start_date:
                        type: string
                        example: '07-08-2024 14:38:51'
                      end_date:
                        type: string
                        example: '12-08-2024 13:49:33'
                      budget:
                        type: string
                        example: '1000.00'
                      task_accessibility:
                        type: string
                        example: assigned_users
                      description:
                        type: string
                        example: null
                      note:
                        type: string
                        example: 'Project on track'
                      favorite:
                        type: integer
                        example: 1
                      created_at:
                        type: string
                        example: '07-08-2024 14:38:51'
                      updated_at:
                        type: string
                        example: '12-08-2024 13:49:33'
        403:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'You are not authorized to set this status.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'You are not authorized to set this status.'
        500:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: ''
                    type: object
                    example:
                      error: true
                      message: "Status couldn't be updated."
                    properties:
                      error:
                        type: boolean
                        example: true
                      message:
                        type: string
                        example: "Status couldn't be updated."
                  -
                    description: ''
                    type: object
                    example:
                      error: true
                      message: 'Error: Exception message here'
                      line: 123
                      file: /path/to/file.php
                    properties:
                      error:
                        type: boolean
                        example: true
                      message:
                        type: string
                        example: 'Error: Exception message here'
                      line:
                        type: integer
                        example: 123
                      file:
                        type: string
                        example: /path/to/file.php
      tags:
        - 'Project status and priority'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the project to update.'
                  example: 438
                  nullable: false
                statusId:
                  type: integer
                  description: 'The ID of the new status to set.'
                  example: 5
                  nullable: false
                note:
                  type: string
                  description: 'Optional note about the status update.'
                  example: consequatur
                  nullable: false
                isApi:
                  type: boolean
                  description: 'Optional flag to specify if the request is API (true or false). Defaults to false.'
                  example: false
                  nullable: false
              required:
                - id
                - statusId
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the update status.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/master-panel/update-priority/{id}':
    put:
      summary: 'Update the priority of a project.'
      operationId: updateThePriorityOfAProject
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"error\": false,\n  \"message\": \"Priority updated successfully.\",\n  \"id\": 123,\n  \"type\": \"project\",\n  \"old_priority\": \"Medium\",\n  \"new_priority\": \"High\",\n  \"activity_message\": \"John Doe updated project priority from Medium to High\",\n  \"data\": {\n    // Detailed formatted project data as returned by formatProject helper\n  }\n}"
        403:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'You are not authorized to update this priority.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'You are not authorized to update this priority.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    id:
                      - 'The selected id is invalid.'
                    priorityId:
                      - 'The selected priority id is invalid.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        example:
                          - 'The selected id is invalid.'
                        items:
                          type: string
                      priorityId:
                        type: array
                        example:
                          - 'The selected priority id is invalid.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Error: Exception message here'
                  line: 45
                  file: /path/to/file.php
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Error: Exception message here'
                  line:
                    type: integer
                    example: 45
                  file:
                    type: string
                    example: /path/to/file.php
      tags:
        - 'Project status and priority'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the project to update.'
                  example: 123
                  nullable: false
                priorityId:
                  type: int|null
                  description: 'The ID of the new priority to set. Pass null to reset.'
                  example: '5'
                  nullable: true
                note:
                  type: string|null
                  description: 'Optional note related to the priority update.'
                  example: '"Urgent priority needed"'
                  nullable: false
                isApi:
                  type: boolean
                  description: 'Optional flag (true/false) indicating if the request expects an API-formatted response. Default is false.'
                  example: false
                  nullable: false
              required:
                - id
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the update priority.'
        example: consequatur
        required: true
        schema:
          type: string
  /api/master-panel/project/comments:
    post:
      summary: 'Add a comment.'
      operationId: addAComment
      description: "This endpoint allows the authenticated user to post a comment on any model (like a project or task)\nusing polymorphic relationships. It supports file attachments (images, PDFs, documents)\nand also handles user mentions (e.g., @username), sending notifications to mentioned users."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: 'Comment Added Successfully'
                  comment:
                    id: 21
                    commentable_type: App\Models\Project
                    commentable_id: 14
                    content: "This is a comment with a mention to <a href='/users/5'>@jane</a>"
                    user_id: 1
                    parent_id: null
                    created_at: '2025-06-12T10:31:02.000000Z'
                    updated_at: '2025-06-12T10:31:02.000000Z'
                    user:
                      id: 1
                      first_name: John
                      last_name: Doe
                      email: john@example.com
                    attachments:
                      -
                        id: 1
                        comment_id: 21
                        file_name: screenshot.png
                        file_path: comment_attachments/screenshot.png
                        file_type: image/png
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Comment Added Successfully'
                  comment:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 21
                      commentable_type:
                        type: string
                        example: App\Models\Project
                      commentable_id:
                        type: integer
                        example: 14
                      content:
                        type: string
                        example: "This is a comment with a mention to <a href='/users/5'>@jane</a>"
                      user_id:
                        type: integer
                        example: 1
                      parent_id:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-06-12T10:31:02.000000Z'
                      updated_at:
                        type: string
                        example: '2025-06-12T10:31:02.000000Z'
                      user:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          first_name:
                            type: string
                            example: John
                          last_name:
                            type: string
                            example: Doe
                          email:
                            type: string
                            example: john@example.com
                      attachments:
                        type: array
                        example:
                          -
                            id: 1
                            comment_id: 21
                            file_name: screenshot.png
                            file_path: comment_attachments/screenshot.png
                            file_type: image/png
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            comment_id:
                              type: integer
                              example: 21
                            file_name:
                              type: string
                              example: screenshot.png
                            file_path:
                              type: string
                              example: comment_attachments/screenshot.png
                            file_type:
                              type: string
                              example: image/png
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: false
                  message: 'Validation failed.'
                  errors:
                    model_type:
                      - 'The model_type field is required.'
                    content:
                      - 'The content field is required.'
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Validation failed.'
                  errors:
                    type: object
                    properties:
                      model_type:
                        type: array
                        example:
                          - 'The model_type field is required.'
                        items:
                          type: string
                      content:
                        type: array
                        example:
                          - 'The content field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: false
                  message: 'An error occurred: [error details]'
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'An error occurred: [error details]'
      tags:
        - 'Project Comments'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                model_type:
                  type: string
                  description: 'The fully qualified model class name.'
                  example: App\\Models\\Project
                  nullable: false
                model_id:
                  type: integer
                  description: 'The ID of the model being commented on.'
                  example: 14
                  nullable: false
                content:
                  type: string
                  description: 'The comment content. Mentions like "@john" are supported.'
                  example: 'This is a comment with a mention to @jane.'
                  nullable: false
                parent_id:
                  type: integer
                  description: 'Optional. The ID of the parent comment (for replies).'
                  example: 5
                  nullable: false
                attachments:
                  type: array
                  description: 'Optional. Files to attach with the comment (jpg, jpeg, png, pdf, xlsx, txt, docx). Max size: 2MB per file.'
                  items:
                    type: string
                    format: binary
              required:
                - model_type
                - model_id
                - content
      security: []
  '/api/master-panel/project/comments/{id}':
    get:
      summary: 'Get  comment by ID.'
      operationId: getCommentByID
      description: 'This endpoint retrieves the details of a specific comment, including any attachments associated with it.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  comment:
                    id: 21
                    commentable_type: App\Models\Project
                    commentable_id: 14
                    content: "This is a comment with mention to <a href='/users/5'>@jane</a>"
                    user_id: 1
                    parent_id: null
                    created_at: '2025-06-12T10:31:02.000000Z'
                    updated_at: '2025-06-12T10:31:02.000000Z'
                    attachments:
                      -
                        id: 1
                        comment_id: 21
                        file_name: report.pdf
                        file_path: comment_attachments/report.pdf
                        file_type: application/pdf
                properties:
                  comment:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 21
                      commentable_type:
                        type: string
                        example: App\Models\Project
                      commentable_id:
                        type: integer
                        example: 14
                      content:
                        type: string
                        example: "This is a comment with mention to <a href='/users/5'>@jane</a>"
                      user_id:
                        type: integer
                        example: 1
                      parent_id:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-06-12T10:31:02.000000Z'
                      updated_at:
                        type: string
                        example: '2025-06-12T10:31:02.000000Z'
                      attachments:
                        type: array
                        example:
                          -
                            id: 1
                            comment_id: 21
                            file_name: report.pdf
                            file_path: comment_attachments/report.pdf
                            file_type: application/pdf
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            comment_id:
                              type: integer
                              example: 21
                            file_name:
                              type: string
                              example: report.pdf
                            file_path:
                              type: string
                              example: comment_attachments/report.pdf
                            file_type:
                              type: string
                              example: application/pdf
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'No query results for model [App\Models\Comment] 99'
                properties:
                  message:
                    type: string
                    example: 'No query results for model [App\Models\Comment] 99'
      tags:
        - 'Project Comments'
      security: []
    put:
      summary: 'Update a comment'
      operationId: updateAComment
      description: 'This endpoint updates the content of an existing comment. It also handles user mention parsing and sends notifications to mentioned users.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Comment updated successfully.'
                  id: 12
                  type: project
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Comment updated successfully.'
                  id:
                    type: integer
                    example: 12
                  type:
                    type: string
                    example: project
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    comment_id:
                      - 'The comment_id field is required.'
                    content:
                      - 'The content field is required.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      comment_id:
                        type: array
                        example:
                          - 'The comment_id field is required.'
                        items:
                          type: string
                      content:
                        type: array
                        example:
                          - 'The content field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Internal Server Error'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Internal Server Error'
      tags:
        - 'Project Comments'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                comment_id:
                  type: integer
                  description: 'The ID of the comment to update.'
                  example: 12
                  nullable: false
                content:
                  type: string
                  description: 'The new content of the comment. Mentions can be included using @username format.'
                  example: '"Updated comment with mention to @john"'
                  nullable: false
                isApi:
                  type: boolean
                  description: "Optional flag to determine if it's an API request."
                  example: true
                  nullable: false
              required:
                - comment_id
                - content
      security: []
    delete:
      summary: 'Delete a comment'
      operationId: deleteAComment
      description: 'This endpoint permanently deletes a comment and all of its associated attachments from the storage.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Comment deleted successfully.'
                  id: 15
                  type: project
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Comment deleted successfully.'
                  id:
                    type: integer
                    example: 15
                  type:
                    type: string
                    example: project
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'No query results for model [App\Models\Comment] 15'
                properties:
                  message:
                    type: string
                    example: 'No query results for model [App\Models\Comment] 15'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    comment_id:
                      - 'The comment_id field is required.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      comment_id:
                        type: array
                        example:
                          - 'The comment_id field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: "Comment couldn't deleted."
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: "Comment couldn't deleted."
      tags:
        - 'Project Comments'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                comment_id:
                  type: integer
                  description: 'The ID of the comment to delete.'
                  example: 15
                  nullable: false
              required:
                - comment_id
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the comment to retrieve.'
        example: 21
        required: true
        schema:
          type: integer
  '/api/master-panel/projects/{project_id}/issues':
    post:
      summary: 'Create a new issue under a project.'
      operationId: createANewIssueUnderAProject
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Issue created successfully.'
                  data:
                    id: 17
                    project_id: 5
                    title: 'Database connectivity issue'
                    description: 'There is an intermittent issue connecting to the database from the API server.'
                    status: open
                    created_by: 2
                    assignees:
                      -
                        id: 1
                        name: 'John Doe'
                        email: john@example.com
                      -
                        id: 3
                        name: 'Jane Smith'
                        email: jane@example.com
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Issue created successfully.'
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 17
                      project_id:
                        type: integer
                        example: 5
                      title:
                        type: string
                        example: 'Database connectivity issue'
                      description:
                        type: string
                        example: 'There is an intermittent issue connecting to the database from the API server.'
                      status:
                        type: string
                        example: open
                      created_by:
                        type: integer
                        example: 2
                      assignees:
                        type: array
                        example:
                          -
                            id: 1
                            name: 'John Doe'
                            email: john@example.com
                          -
                            id: 3
                            name: 'Jane Smith'
                            email: jane@example.com
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type: string
                              example: 'John Doe'
                            email:
                              type: string
                              example: john@example.com
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Validation failed.'
                  data:
                    title:
                      - 'The title field is required.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Validation failed.'
                  data:
                    type: object
                    properties:
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Database error occurred while creating the issue.'
                  data:
                    details: "SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'project_id' cannot be null..."
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Database error occurred while creating the issue.'
                  data:
                    type: object
                    properties:
                      details:
                        type: string
                        example: "SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'project_id' cannot be null..."
      tags:
        - 'project issues'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'The title of the issue.'
                  example: 'Database connectivity issue'
                  nullable: false
                description:
                  type: string
                  description: 'A description of the issue.'
                  example: 'There is an intermittent issue connecting to the database from the API server.'
                  nullable: false
                status:
                  type: string
                  description: 'The current status of the issue. Must be one of: `open`, `in_progress`, `resolved`, `closed`.'
                  example: open
                  nullable: false
                assignee_id:
                  type: array
                  description: 'optional An array of user IDs to assign the issue to.'
                  example:
                    - 1
                    - 3
                  items:
                    type: string
              required:
                - title
                - description
                - status
    parameters:
      -
        in: path
        name: project_id
        description: 'The ID of the project.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: project
        description: 'The ID of the project in which the issue is being created.'
        example: 5
        required: true
        schema:
          type: integer
  '/api/master-panel/projects/issues/{id}':
    put:
      summary: 'Update an existing issue within a project.'
      operationId: updateAnExistingIssueWithinAProject
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"error\": false,\n  \"message\": \"Issue updated successfully.\",\n  \"issue\": {\n    \"id\": 8,\n    \"title\": \"Database connectivity issue\",\n    \"description\": \"There is an intermittent issue connecting to the database from the API server.\",\n    \"status\": \"in_progress\",\n    \"assignees\": [...]\n  }\n}"
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Issue not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Issue not found.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Validation failed.'
                  errors:
                    title:
                      - 'The title field is required.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Validation failed.'
                  errors:
                    type: object
                    properties:
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An unexpected error occurred.'
                  details: 'Exception message here'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An unexpected error occurred.'
                  details:
                    type: string
                    example: 'Exception message here'
      tags:
        - 'project issues'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the issue to update.'
                  example: 8
                  nullable: false
                title:
                  type: string
                  description: 'The updated title of the issue. Max 256 characters.'
                  example: 'Database connectivity issue'
                  nullable: false
                description:
                  type: string
                  description: 'The updated description of the issue. Max 512 characters.'
                  example: 'There is an intermittent issue connecting to the database from the API server.'
                  nullable: false
                status:
                  type: string
                  description: 'The current status of the issue. Must be one of: open, in_progress, resolved, closed.'
                  example: in_progress
                  nullable: false
                assignee_id:
                  type: array
                  description: 'The list of user IDs to assign this issue to. Optional.'
                  example:
                    - 1
                    - 3
                  items:
                    type: string
              required:
                - id
                - title
                - description
                - status
      security: []
    get:
      summary: "List or fetch issues (API)\n\nThis endpoint returns a paginated list of issues for a given project, or a single issue by its ID if `type=issue` is provided."
      operationId: listOrFetchIssuesAPIThisEndpointReturnsAPaginatedListOfIssuesForAGivenProjectOrASingleIssueByItsIDIftypeissueIsProvided
      description: ''
      parameters:
        -
          in: query
          name: type
          description: "optional If set to 'issue', fetches a single issue by its ID."
          example: issue
          required: false
          schema:
            type: string
            description: "optional If set to 'issue', fetches a single issue by its ID."
            example: issue
            nullable: false
        -
          in: query
          name: search
          description: 'optional Search term for title, description, status, assignee, or creator.'
          example: bug
          required: false
          schema:
            type: string
            description: 'optional Search term for title, description, status, assignee, or creator.'
            example: bug
            nullable: false
        -
          in: query
          name: sort
          description: 'optional Field to sort by. Default: created_at.'
          example: updated_at
          required: false
          schema:
            type: string
            description: 'optional Field to sort by. Default: created_at.'
            example: updated_at
            nullable: false
        -
          in: query
          name: order
          description: 'optional Sort direction (ASC or DESC). Default: DESC.'
          example: ASC
          required: false
          schema:
            type: string
            description: 'optional Sort direction (ASC or DESC). Default: DESC.'
            example: ASC
            nullable: false
        -
          in: query
          name: status
          description: 'optional Filter by issue status.'
          example: open
          required: false
          schema:
            type: string
            description: 'optional Filter by issue status.'
            example: open
            nullable: false
        -
          in: query
          name: assigned_to
          description: 'optional Filter by assigned user ID.'
          example: 5
          required: false
          schema:
            type: integer
            description: 'optional Filter by assigned user ID.'
            example: 5
            nullable: false
        -
          in: query
          name: created_by
          description: 'optional Filter by creator user ID.'
          example: 2
          required: false
          schema:
            type: integer
            description: 'optional Filter by creator user ID.'
            example: 2
            nullable: false
        -
          in: query
          name: start_date
          description: 'date optional Filter issues created after this date.'
          example: '2025-06-01'
          required: false
          schema:
            type: string
            description: 'date optional Filter issues created after this date.'
            example: '2025-06-01'
            nullable: false
        -
          in: query
          name: end_date
          description: 'date optional Filter issues created before this date.'
          example: '2025-06-30'
          required: false
          schema:
            type: string
            description: 'date optional Filter issues created before this date.'
            example: '2025-06-30'
            nullable: false
        -
          in: query
          name: limit
          description: 'optional Number of results per page. Default: 10.'
          example: 20
          required: false
          schema:
            type: integer
            description: 'optional Number of results per page. Default: 10.'
            example: 20
            nullable: false
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Issue list fetched successfully.'
                  rows:
                    -
                      id: 1
                      project_id: 117
                      title: 'data not retrive'
                      description: 'when Api was call data nor retrived'
                      status: in_progress
                      created_by:
                        id: 2
                        first_name: herry
                        last_name: porter
                        email: admin@gmail.com
                      assignees:
                        -
                          id: 2
                          first_name: herry
                          last_name: porter
                          email: admin@gmail.com
                          photo: null
                      created_at: '2025-06-12 03:59:42'
                      updated_at: '2025-06-12 03:59:42'
                  total: 1
                  current_page: 1
                  last_page: 1
                  per_page: 10
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Issue list fetched successfully.'
                  rows:
                    type: array
                    example:
                      -
                        id: 1
                        project_id: 117
                        title: 'data not retrive'
                        description: 'when Api was call data nor retrived'
                        status: in_progress
                        created_by:
                          id: 2
                          first_name: herry
                          last_name: porter
                          email: admin@gmail.com
                        assignees:
                          -
                            id: 2
                            first_name: herry
                            last_name: porter
                            email: admin@gmail.com
                            photo: null
                        created_at: '2025-06-12 03:59:42'
                        updated_at: '2025-06-12 03:59:42'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        project_id:
                          type: integer
                          example: 117
                        title:
                          type: string
                          example: 'data not retrive'
                        description:
                          type: string
                          example: 'when Api was call data nor retrived'
                        status:
                          type: string
                          example: in_progress
                        created_by:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 2
                            first_name:
                              type: string
                              example: herry
                            last_name:
                              type: string
                              example: porter
                            email:
                              type: string
                              example: admin@gmail.com
                        assignees:
                          type: array
                          example:
                            -
                              id: 2
                              first_name: herry
                              last_name: porter
                              email: admin@gmail.com
                              photo: null
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 2
                              first_name:
                                type: string
                                example: herry
                              last_name:
                                type: string
                                example: porter
                              email:
                                type: string
                                example: admin@gmail.com
                              photo:
                                type: string
                                example: null
                        created_at:
                          type: string
                          example: '2025-06-12 03:59:42'
                        updated_at:
                          type: string
                          example: '2025-06-12 03:59:42'
                  total:
                    type: integer
                    example: 1
                  current_page:
                    type: integer
                    example: 1
                  last_page:
                    type: integer
                    example: 1
                  per_page:
                    type: integer
                    example: 10
      tags:
        - 'project issues'
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the issue.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/master-panel/projects/issues/{id_id}':
    delete:
      summary: 'Delete an issue from a project.'
      operationId: deleteAnIssueFromAProject
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Issue deleted successfully.'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Issue deleted successfully.'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Issue not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Issue not found.'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An unexpected error occurred.'
                  details: 'Exception message here'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An unexpected error occurred.'
                  details:
                    type: string
                    example: 'Exception message here'
      tags:
        - 'project issues'
      security: []
    parameters:
      -
        in: path
        name: id_id
        description: 'The ID of the id.'
        example: 17
        required: true
        schema:
          type: integer
      -
        in: path
        name: project
        description: 'The ID of the project to which the issue belongs.'
        example: 5
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the issue to delete.'
        example: 8
        required: true
        schema:
          type: integer
  '/api/master-panel/tasks/list-api/{id}':
    get:
      summary: "List or Get Task(s)\n\nThis endpoint returns a paginated list of tasks, or a single task if an ID is provided.\nIt supports advanced filtering, searching, sorting, and eager loading of related entities\nsuch as users, project, status, priority, reminders, and recurring task details.\n\nIf the ID is numeric, it returns a single formatted task object.\nIf the ID follows the format `user_{id}` or `project_{id}`, it filters tasks belonging\nto the specified user or project."
      operationId: listOrGetTasksThisEndpointReturnsAPaginatedListOfTasksOrASingleTaskIfAnIDIsProvidedItSupportsAdvancedFilteringSearchingSortingAndEagerLoadingOfRelatedEntitiessuchAsUsersProjectStatusPriorityRemindersAndRecurringTaskDetailsIfTheIDIsNumericItReturnsASingleFormattedTaskObjectIfTheIDFollowsTheFormatuseridOrprojectidItFiltersTasksBelongingtoTheSpecifiedUserOrProject
      description: ''
      parameters:
        -
          in: query
          name: isApi
          description: "Optional. Indicate if it's an API call. Default: false"
          example: false
          required: false
          schema:
            type: boolean
            description: "Optional. Indicate if it's an API call. Default: false"
            example: false
            nullable: false
        -
          in: query
          name: search
          description: 'Optional. Search tasks by title or ID.'
          example: Design
          required: false
          schema:
            type: string
            description: 'Optional. Search tasks by title or ID.'
            example: Design
            nullable: false
        -
          in: query
          name: sort
          description: 'Optional. Field to sort by. Default: id.'
          example: title
          required: false
          schema:
            type: string
            description: 'Optional. Field to sort by. Default: id.'
            example: title
            nullable: false
        -
          in: query
          name: order
          description: 'Optional. Sorting order: ASC or DESC. Default: DESC'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Optional. Sorting order: ASC or DESC. Default: DESC'
            example: consequatur
            nullable: false
        -
          in: query
          name: 'status_ids[]'
          description: 'Optional. Filter tasks by status ID(s).'
          example: 1
          required: false
          schema:
            type: integer
            description: 'Optional. Filter tasks by status ID(s).'
            example: 1
            nullable: false
        -
          in: query
          name: 'priority_ids[]'
          description: 'Optional. Filter tasks by priority ID(s).'
          example: 2
          required: false
          schema:
            type: integer
            description: 'Optional. Filter tasks by priority ID(s).'
            example: 2
            nullable: false
        -
          in: query
          name: 'user_ids[]'
          description: 'Optional. Filter tasks assigned to these user ID(s).'
          example: 3
          required: false
          schema:
            type: integer
            description: 'Optional. Filter tasks assigned to these user ID(s).'
            example: 3
            nullable: false
        -
          in: query
          name: 'client_ids[]'
          description: 'Optional. Filter tasks linked to clients via project(s).'
          example: 5
          required: false
          schema:
            type: integer
            description: 'Optional. Filter tasks linked to clients via project(s).'
            example: 5
            nullable: false
        -
          in: query
          name: 'project_ids[]'
          description: 'Optional. Filter tasks by project ID(s).'
          example: 2
          required: false
          schema:
            type: integer
            description: 'Optional. Filter tasks by project ID(s).'
            example: 2
            nullable: false
        -
          in: query
          name: task_start_date_from
          description: 'date Optional. Filter tasks starting from this date. Format: Y-m-d.'
          example: '2025-06-01'
          required: false
          schema:
            type: string
            description: 'date Optional. Filter tasks starting from this date. Format: Y-m-d.'
            example: '2025-06-01'
            nullable: false
        -
          in: query
          name: task_start_date_to
          description: 'date Optional. Filter tasks starting up to this date. Format: Y-m-d.'
          example: '2025-06-30'
          required: false
          schema:
            type: string
            description: 'date Optional. Filter tasks starting up to this date. Format: Y-m-d.'
            example: '2025-06-30'
            nullable: false
        -
          in: query
          name: task_end_date_from
          description: 'date Optional. Filter tasks due from this date. Format: Y-m-d.'
          example: '2025-06-05'
          required: false
          schema:
            type: string
            description: 'date Optional. Filter tasks due from this date. Format: Y-m-d.'
            example: '2025-06-05'
            nullable: false
        -
          in: query
          name: task_end_date_to
          description: 'date Optional. Filter tasks due up to this date. Format: Y-m-d.'
          example: '2025-06-20'
          required: false
          schema:
            type: string
            description: 'date Optional. Filter tasks due up to this date. Format: Y-m-d.'
            example: '2025-06-20'
            nullable: false
        -
          in: query
          name: limit
          description: 'Optional. Number of results per page. Default: 10.'
          example: 20
          required: false
          schema:
            type: integer
            description: 'Optional. Number of results per page. Default: 10.'
            example: 20
            nullable: false
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: 'Single task response'
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 25
                  workspace_id: 2
                  title: 'Test Task Title'
                  status: Open
                  status_id: 1
                  priority: low
                  priority_id: 2
                  users:
                    -
                      id: 2
                      first_name: herry
                      last_name: porter
                      email: admin@gmail.com
                      photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                  user_id:
                    - 2
                  clients: []
                  start_date: '2025-06-01'
                  due_date: '2025-06-10'
                  project: 'favorite project'
                  project_id: 2
                  description: 'This is a test task description.'
                  note: 'Optional note about the task.'
                  favorite: 0
                  client_can_discuss: null
                  created_at: '2025-05-28'
                  updated_at: '2025-05-28'
                  enable_reminder: 1
                  last_reminder_sent: null
                  frequency_type: weekly
                  day_of_week: 3
                  day_of_month: null
                  time_of_day: '14:30:00'
                  enable_recurring_task: 1
                  recurrence_frequency: monthly
                  recurrence_day_of_week: null
                  recurrence_day_of_month: 15
                  recurrence_month_of_year: null
                  recurrence_starts_from: '2025-06-01'
                  recurrence_occurrences: 6
                  completed_occurrences: null
                  billing_type: billable
                  completion_percentage: 0
                  task_list_id: null
                properties:
                  id:
                    type: integer
                    example: 25
                  workspace_id:
                    type: integer
                    example: 2
                  title:
                    type: string
                    example: 'Test Task Title'
                  status:
                    type: string
                    example: Open
                  status_id:
                    type: integer
                    example: 1
                  priority:
                    type: string
                    example: low
                  priority_id:
                    type: integer
                    example: 2
                  users:
                    type: array
                    example:
                      -
                        id: 2
                        first_name: herry
                        last_name: porter
                        email: admin@gmail.com
                        photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 2
                        first_name:
                          type: string
                          example: herry
                        last_name:
                          type: string
                          example: porter
                        email:
                          type: string
                          example: admin@gmail.com
                        photo:
                          type: string
                          example: 'http://localhost:8000/storage/photos/no-image.jpg'
                  user_id:
                    type: array
                    example:
                      - 2
                    items:
                      type: integer
                  clients:
                    type: array
                    example: []
                  start_date:
                    type: string
                    example: '2025-06-01'
                  due_date:
                    type: string
                    example: '2025-06-10'
                  project:
                    type: string
                    example: 'favorite project'
                  project_id:
                    type: integer
                    example: 2
                  description:
                    type: string
                    example: 'This is a test task description.'
                  note:
                    type: string
                    example: 'Optional note about the task.'
                  favorite:
                    type: integer
                    example: 0
                  client_can_discuss:
                    type: string
                    example: null
                  created_at:
                    type: string
                    example: '2025-05-28'
                  updated_at:
                    type: string
                    example: '2025-05-28'
                  enable_reminder:
                    type: integer
                    example: 1
                  last_reminder_sent:
                    type: string
                    example: null
                  frequency_type:
                    type: string
                    example: weekly
                  day_of_week:
                    type: integer
                    example: 3
                  day_of_month:
                    type: string
                    example: null
                  time_of_day:
                    type: string
                    example: '14:30:00'
                  enable_recurring_task:
                    type: integer
                    example: 1
                  recurrence_frequency:
                    type: string
                    example: monthly
                  recurrence_day_of_week:
                    type: string
                    example: null
                  recurrence_day_of_month:
                    type: integer
                    example: 15
                  recurrence_month_of_year:
                    type: string
                    example: null
                  recurrence_starts_from:
                    type: string
                    example: '2025-06-01'
                  recurrence_occurrences:
                    type: integer
                    example: 6
                  completed_occurrences:
                    type: string
                    example: null
                  billing_type:
                    type: string
                    example: billable
                  completion_percentage:
                    type: integer
                    example: 0
                  task_list_id:
                    type: string
                    example: null
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Task not found'
                    type: object
                    example:
                      message: 'Task not found'
                    properties:
                      message:
                        type: string
                        example: 'Task not found'
                  -
                    description: 'Project or User not found'
                    type: object
                    example:
                      message: 'Project not found'
                    properties:
                      message:
                        type: string
                        example: 'Project not found'
      tags:
        - 'Task Management'
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'Optional parameter. int|string Optional. Numeric task ID to fetch a single task, or `user_{id}`, `project_{id}` to filter by user/project.'
        required: true
        schema:
          type: string
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: '25'
  /api/master-panel/create-tasks:
    post:
      summary: 'Create a new task'
      operationId: createANewTask
      description: "This endpoint allows you to create a new task within a workspace and assign it to users.\nIt supports additional features like setting reminders and recurring schedules."
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: 'Task created successfully'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Task created successfully.'
                  id: 28
                  type: task
                  parent_id: 15
                  parent_type: project
                  Data:
                    id: 28
                    workspace_id: 2
                    title: 'Create new onboarding flow'
                    status: Open
                    status_id: 1
                    priority: low
                    priority_id: 2
                    users:
                      -
                        id: 2
                        first_name: herry
                        last_name: porter
                        email: admin@gmail.com
                        photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                      -
                        id: 3
                        first_name: John
                        last_name: Doe
                        email: admin2@gmail.com
                        photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                    user_id:
                      - 2
                      - 3
                    clients:
                      -
                        id: 1
                        first_name: jerry
                        last_name: ginny
                        email: jg@gmail.com
                        photo: 'http://localhost:8000/storage/photos/gqHsvgmDBCbtf843SRYx31e6Zl51amPZY8eG05FB.jpg'
                    start_date: '2015-01-01'
                    due_date: '2025-06-06'
                    project: 'New Project Title'
                    project_id: 15
                    description: 'Implement onboarding UI and logic.'
                    note: 'Coordinate with HR and DevOps.'
                    favorite: 0
                    client_can_discuss: null
                    created_at: '2025-06-03'
                    updated_at: '2025-06-03'
                    enable_reminder: 1
                    last_reminder_sent: null
                    frequency_type: weekly
                    day_of_week: 2
                    day_of_month: 15
                    time_of_day: '09:00:00'
                    enable_recurring_task: 1
                    recurrence_frequency: monthly
                    recurrence_day_of_week: 3
                    recurrence_day_of_month: 10
                    recurrence_month_of_year: 6
                    recurrence_starts_from: '2025-06-03'
                    recurrence_occurrences: 5
                    completed_occurrences: null
                    billing_type: billable
                    completion_percentage: 0
                    task_list_id: null
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Task created successfully.'
                  id:
                    type: integer
                    example: 28
                  type:
                    type: string
                    example: task
                  parent_id:
                    type: integer
                    example: 15
                  parent_type:
                    type: string
                    example: project
                  Data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 28
                      workspace_id:
                        type: integer
                        example: 2
                      title:
                        type: string
                        example: 'Create new onboarding flow'
                      status:
                        type: string
                        example: Open
                      status_id:
                        type: integer
                        example: 1
                      priority:
                        type: string
                        example: low
                      priority_id:
                        type: integer
                        example: 2
                      users:
                        type: array
                        example:
                          -
                            id: 2
                            first_name: herry
                            last_name: porter
                            email: admin@gmail.com
                            photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                          -
                            id: 3
                            first_name: John
                            last_name: Doe
                            email: admin2@gmail.com
                            photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 2
                            first_name:
                              type: string
                              example: herry
                            last_name:
                              type: string
                              example: porter
                            email:
                              type: string
                              example: admin@gmail.com
                            photo:
                              type: string
                              example: 'http://localhost:8000/storage/photos/no-image.jpg'
                      user_id:
                        type: array
                        example:
                          - 2
                          - 3
                        items:
                          type: integer
                      clients:
                        type: array
                        example:
                          -
                            id: 1
                            first_name: jerry
                            last_name: ginny
                            email: jg@gmail.com
                            photo: 'http://localhost:8000/storage/photos/gqHsvgmDBCbtf843SRYx31e6Zl51amPZY8eG05FB.jpg'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            first_name:
                              type: string
                              example: jerry
                            last_name:
                              type: string
                              example: ginny
                            email:
                              type: string
                              example: jg@gmail.com
                            photo:
                              type: string
                              example: 'http://localhost:8000/storage/photos/gqHsvgmDBCbtf843SRYx31e6Zl51amPZY8eG05FB.jpg'
                      start_date:
                        type: string
                        example: '2015-01-01'
                      due_date:
                        type: string
                        example: '2025-06-06'
                      project:
                        type: string
                        example: 'New Project Title'
                      project_id:
                        type: integer
                        example: 15
                      description:
                        type: string
                        example: 'Implement onboarding UI and logic.'
                      note:
                        type: string
                        example: 'Coordinate with HR and DevOps.'
                      favorite:
                        type: integer
                        example: 0
                      client_can_discuss:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-06-03'
                      updated_at:
                        type: string
                        example: '2025-06-03'
                      enable_reminder:
                        type: integer
                        example: 1
                      last_reminder_sent:
                        type: string
                        example: null
                      frequency_type:
                        type: string
                        example: weekly
                      day_of_week:
                        type: integer
                        example: 2
                      day_of_month:
                        type: integer
                        example: 15
                      time_of_day:
                        type: string
                        example: '09:00:00'
                      enable_recurring_task:
                        type: integer
                        example: 1
                      recurrence_frequency:
                        type: string
                        example: monthly
                      recurrence_day_of_week:
                        type: integer
                        example: 3
                      recurrence_day_of_month:
                        type: integer
                        example: 10
                      recurrence_month_of_year:
                        type: integer
                        example: 6
                      recurrence_starts_from:
                        type: string
                        example: '2025-06-03'
                      recurrence_occurrences:
                        type: integer
                        example: 5
                      completed_occurrences:
                        type: string
                        example: null
                      billing_type:
                        type: string
                        example: billable
                      completion_percentage:
                        type: integer
                        example: 0
                      task_list_id:
                        type: string
                        example: null
        422:
          description: 'Validation error'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Invalid date format. Please use yyyy-mm-dd.'
                  exception: 'InvalidArgumentException message here...'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Invalid date format. Please use yyyy-mm-dd.'
                  exception:
                    type: string
                    example: 'InvalidArgumentException message here...'
        500:
          description: 'Unexpected server error'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred while creating the task. SQLSTATE[23000]: Integrity constraint violation: 1452...'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred while creating the task. SQLSTATE[23000]: Integrity constraint violation: 1452...'
      tags:
        - 'Task Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'The title of the task.'
                  example: 'Create new onboarding flow'
                  nullable: false
                status_id:
                  type: integer
                  description: 'The ID of the task status.'
                  example: 1
                  nullable: false
                start_date:
                  type: date
                  description: 'The start date in `YYYY-MM-DD` format.'
                  example: '2025-06-01'
                  nullable: false
                due_date:
                  type: date
                  description: 'The due date in `YYYY-MM-DD` format.'
                  example: '2025-06-06'
                  nullable: false
                description:
                  type: string
                  description: 'The description of the task.'
                  example: 'Implement onboarding UI and logic.'
                  nullable: false
                project:
                  type: integer
                  description: 'The ID of the project to which the task belongs.'
                  example: 15
                  nullable: false
                priority_id:
                  type: integer
                  description: 'The ID of the priority level. Must exist in priorities table.'
                  example: 2
                  nullable: false
                note:
                  type: string
                  description: 'Optional note for the task.'
                  example: 'Coordinate with HR and DevOps.'
                  nullable: false
                billing_type:
                  type: string
                  description: 'The billing type (none, billable, non-billable).'
                  example: billable
                  nullable: false
                completion_percentage:
                  type: integer
                  description: 'Completion in steps of 10. One of: 0,10,...,100.'
                  example: 0
                  nullable: false
                users_id:
                  type: array
                  description: 'User IDs assigned to the task.'
                  example:
                    - 2
                    - 3
                  items:
                    type: string
                enable_reminder:
                  type: string
                  description: "Enable reminders. Must be 'on' if enabled."
                  example: 'on'
                  nullable: false
                frequency_type:
                  type: string
                  description: 'Frequency of reminder (daily, weekly, monthly).'
                  example: weekly
                  nullable: false
                day_of_week:
                  type: integer
                  description: 'Day of the week for reminders (1 = Monday).'
                  example: 2
                  nullable: false
                day_of_month:
                  type: integer
                  description: 'Day of the month for reminders.'
                  example: 15
                  nullable: false
                time_of_day:
                  type: string
                  description: 'Time of day for reminder (HH:MM).'
                  example: '09:00'
                  nullable: false
                enable_recurring_task:
                  type: string
                  description: "Enable recurring task. Must be 'on' if enabled."
                  example: 'on'
                  nullable: false
                recurrence_frequency:
                  type: string
                  description: 'Frequency (daily, weekly, monthly, yearly).'
                  example: monthly
                  nullable: false
                recurrence_day_of_week:
                  type: integer
                  description: 'Day of the week for recurrence.'
                  example: 3
                  nullable: false
                recurrence_day_of_month:
                  type: integer
                  description: 'Day of the month for recurrence.'
                  example: 10
                  nullable: false
                recurrence_month_of_year:
                  type: integer
                  description: 'Month of the year for recurrence.'
                  example: 6
                  nullable: false
                recurrence_starts_from:
                  type: date
                  description: 'Date from which recurrence starts. Must be today or future.'
                  example: '2025-06-03'
                  nullable: false
                recurrence_occurrences:
                  type: integer
                  description: 'Number of occurrences.'
                  example: 5
                  nullable: false
                task_list_id:
                  type: integer
                  description: 'The ID of the task list (if any). Must exist in task_lists table.'
                  example: 1
                  nullable: false
              required:
                - title
                - status_id
                - start_date
                - due_date
                - project
                - completion_percentage
      security: []
  '/api/master-panel/update-tasks/{id}':
    put:
      summary: 'Update an existing task.'
      operationId: updateAnExistingTask
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"error\": false,\n  \"message\": \"Task updated successfully.\",\n  \"data\": {\n    \"id\": 25,\n    \"parent_id\": 2,\n    \"parent_type\": \"project\",\n    \"data\": {\n      \"id\": 25,\n      \"title\": \"Test Task Title\",\n      \"status_id\": 15,\n      \"priority_id\": 4,\n      \"completion_percentage\": 0,\n      ...\n    }\n  }\n}"
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message:
                    title:
                      - 'The title field is required.'
                    start_date:
                      - 'The start date must be before or equal to due date.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: object
                    properties:
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
                      start_date:
                        type: array
                        example:
                          - 'The start date must be before or equal to due date.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred while updating the task. [Error Details]'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred while updating the task. [Error Details]'
      tags:
        - 'Task Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the task to update.'
                  example: 25
                  nullable: false
                title:
                  type: string
                  description: 'The title of the task.'
                  example: 'Test Task Title'
                  nullable: false
                description:
                  type: string
                  description: 'Optional description for the task.'
                  example: 'This is a test task description.'
                  nullable: false
                status_id:
                  type: integer
                  description: 'The status ID associated with the task.'
                  example: 15
                  nullable: false
                priority_id:
                  type: integer
                  description: 'nullable The priority ID associated with the task.'
                  example: 4
                  nullable: false
                start_date:
                  type: date
                  description: 'Start date of the task (must be before or equal to due_date).'
                  example: '2025-06-01'
                  nullable: false
                due_date:
                  type: date
                  description: 'Due date of the task.'
                  example: '2025-06-10'
                  nullable: false
                note:
                  type: string
                  description: 'nullable Optional notes related to the task.'
                  example: consequatur
                  nullable: false
                billing_type:
                  type: string
                  description: 'nullable Must be one of: none, billable, non-billable.'
                  example: billable
                  nullable: false
                completion_percentage:
                  type: integer
                  description: 'Completion in steps of 10. Must be between 0 and 100.'
                  example: 0
                  nullable: false
                user_id:
                  type: array
                  description: 'Optional. Array of user IDs to assign to the task.'
                  example:
                    - 2
                    - 3
                  items:
                    type: string
                enable_reminder:
                  type: string
                  description: 'Optional. Pass "on" to enable reminders.'
                  example: 'on'
                  nullable: false
                frequency_type:
                  type: string
                  description: 'Optional. Reminder frequency. One of: daily, weekly, monthly.'
                  example: weekly
                  nullable: false
                day_of_week:
                  type: integer
                  description: 'Nullable. Day of the week if frequency is weekly (1=Monday ... 7=Sunday).'
                  example: 3
                  nullable: false
                day_of_month:
                  type: integer
                  description: 'Nullable. Day of the month if frequency is monthly.'
                  example: 15
                  nullable: false
                time_of_day:
                  type: string
                  description: 'Nullable. Time for the reminder (HH:MM format).'
                  example: '09:00'
                  nullable: false
                enable_recurring_task:
                  type: string
                  description: 'Optional. Pass "on" to enable recurring tasks.'
                  example: 'on'
                  nullable: false
                recurrence_frequency:
                  type: string
                  description: 'Optional. One of: daily, weekly, monthly, yearly.'
                  example: monthly
                  nullable: false
                recurrence_day_of_week:
                  type: integer
                  description: 'Nullable. Used if recurrence_frequency is weekly.'
                  example: 5
                  nullable: false
                recurrence_day_of_month:
                  type: integer
                  description: 'Nullable. Used if recurrence_frequency is monthly.'
                  example: 10
                  nullable: false
                recurrence_month_of_year:
                  type: integer
                  description: 'Nullable. Used if recurrence_frequency is yearly.'
                  example: 6
                  nullable: false
                recurrence_starts_from:
                  type: date
                  description: 'Nullable. Start date for recurring tasks. Must be today or future.'
                  example: '2025-06-13'
                  nullable: false
                recurrence_occurrences:
                  type: integer
                  description: 'Nullable. Number of occurrences for recurrence.'
                  example: 12
                  nullable: false
              required:
                - id
                - title
                - status_id
                - start_date
                - due_date
                - completion_percentage
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the update task.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/master-panel/delete-tasks/{id}':
    delete:
      summary: 'Delete a specific task by ID.'
      operationId: deleteASpecificTaskByID
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: 'Task deleted successfully'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Task deleted successfully.'
                  data:
                    id: 23
                    title: 'Update client onboarding flow'
                    parent_id: 2
                    parent_type: project
                    data: []
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Task deleted successfully.'
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 23
                      title:
                        type: string
                        example: 'Update client onboarding flow'
                      parent_id:
                        type: integer
                        example: 2
                      parent_type:
                        type: string
                        example: project
                      data:
                        type: array
                        example: []
        404:
          description: 'Task not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Task not found.'
                  data: []
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Task not found.'
                  data:
                    type: array
                    example: []
        500:
          description: 'Unexpected error'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An unexpected error occurred while deleting the task.'
                  data: []
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An unexpected error occurred while deleting the task.'
                  data:
                    type: array
                    example: []
      tags:
        - 'Task Management'
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the task to delete.'
        example: 23
        required: true
        schema:
          type: integer
  /api/master-panel/destroy-multiple-tasks:
    delete:
      summary: 'Delete multiple tasks'
      operationId: deleteMultipleTasks
      description: 'This endpoint deletes multiple tasks by their IDs. All associated comments and attachments are also permanently removed.'
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Task(s) deleted successfully.'
                  id:
                    - 101
                    - 102
                  titles:
                    - 'Task One'
                    - 'Task Two'
                  parent_id:
                    - 5
                    - 6
                  parent_type: project
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Task(s) deleted successfully.'
                  id:
                    type: array
                    example:
                      - 101
                      - 102
                    items:
                      type: integer
                  titles:
                    type: array
                    example:
                      - 'Task One'
                      - 'Task Two'
                    items:
                      type: string
                  parent_id:
                    type: array
                    example:
                      - 5
                      - 6
                    items:
                      type: integer
                  parent_type:
                    type: string
                    example: project
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    ids.0:
                      - 'The selected ids.0 is invalid.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      ids.0:
                        type: array
                        example:
                          - 'The selected ids.0 is invalid.'
                        items:
                          type: string
      tags:
        - 'Task Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ids:
                  type: array
                  description: 'An array of task IDs to be deleted.'
                  example:
                    - 101
                    - 102
                    - 103
                  items:
                    type: string
              required:
                - ids
      security: []
  '/api/master-panel/tasks/{id}/duplicate':
    post:
      summary: 'Duplicate a task.'
      operationId: duplicateATask
      description: "This endpoint allows you to duplicate an existing task. You can optionally set a custom title for the duplicated task.\nRelated data such as assigned users will also be duplicated."
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Task duplicated successfully.'
                  id: 12
                  parent_id: 5
                  parent_type: project
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Task duplicated successfully.'
                  id:
                    type: integer
                    example: 12
                  parent_id:
                    type: integer
                    example: 5
                  parent_type:
                    type: string
                    example: project
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Task duplication failed.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Task duplication failed.'
      tags:
        - 'Task Management'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'optional A new title for the duplicated task. If not provided, the system will use a default naming convention.'
                  example: 'Copy of Design Review Task'
                  nullable: false
                reload:
                  type: string
                  description: 'optional Set to "true" if you want to trigger a session flash message (usually used for reloading UI).'
                  example: 'true'
                  nullable: false
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the task to duplicate.'
        example: 12
        required: true
        schema:
          type: integer
  '/api/master-panel/task/{id}/status/{newStatus}':
    post:
      summary: 'Update the status of a task.'
      operationId: updateTheStatusOfATask
      description: ''
      parameters:
        -
          in: query
          name: isApi
          description: 'Optional. Set to true if calling from API to get a structured API response.'
          example: true
          required: false
          schema:
            type: boolean
            description: 'Optional. Set to true if calling from API to get a structured API response.'
            example: true
            nullable: false
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Status updated successfully.'
                  id: '33'
                  type: task
                  activity_message: 'herry porter updated task status from Approved to Completed'
                  data:
                    id: 33
                    workspace_id: 2
                    title: 'Test Task Title'
                    status: Completed
                    status_id: 4
                    priority: low
                    priority_id: 2
                    users:
                      -
                        id: 2
                        first_name: herry
                        last_name: porter
                        email: admin@gmail.com
                        photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                    start_date: '2025-06-01'
                    due_date: '2025-06-10'
                    project: 'favorite project'
                    project_id: 2
                    description: 'This is a test task description.'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Status updated successfully.'
                  id:
                    type: string
                    example: '33'
                  type:
                    type: string
                    example: task
                  activity_message:
                    type: string
                    example: 'herry porter updated task status from Approved to Completed'
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 33
                      workspace_id:
                        type: integer
                        example: 2
                      title:
                        type: string
                        example: 'Test Task Title'
                      status:
                        type: string
                        example: Completed
                      status_id:
                        type: integer
                        example: 4
                      priority:
                        type: string
                        example: low
                      priority_id:
                        type: integer
                        example: 2
                      users:
                        type: array
                        example:
                          -
                            id: 2
                            first_name: herry
                            last_name: porter
                            email: admin@gmail.com
                            photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 2
                            first_name:
                              type: string
                              example: herry
                            last_name:
                              type: string
                              example: porter
                            email:
                              type: string
                              example: admin@gmail.com
                            photo:
                              type: string
                              example: 'http://localhost:8000/storage/photos/no-image.jpg'
                      start_date:
                        type: string
                        example: '2025-06-01'
                      due_date:
                        type: string
                        example: '2025-06-10'
                      project:
                        type: string
                        example: 'favorite project'
                      project_id:
                        type: integer
                        example: 2
                      description:
                        type: string
                        example: 'This is a test task description.'
        403:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'You are not authorized to set this status.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'You are not authorized to set this status.'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'No query results for model [App\Models\Task] 999'
                properties:
                  message:
                    type: string
                    example: 'No query results for model [App\Models\Task] 999'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: "Task status couldn't updated."
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: "Task status couldn't updated."
      tags:
        - 'Task status and performance'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the task to update.'
                  example: 33
                  nullable: false
                statusId:
                  type: integer
                  description: 'The new status ID to set on the task.'
                  example: 4
                  nullable: false
              required:
                - id
                - statusId
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the task.'
        example: consequatur
        required: true
        schema:
          type: string
      -
        in: path
        name: newStatus
        description: ''
        example: 3
        required: true
        schema:
          type: integer
  /api/master-panel/tasks/save-view-preference:
    post:
      summary: "Save User's Default Task View Preference"
      operationId: saveUsersDefaultTaskViewPreference
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Default View Set Successfully.'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Default View Set Successfully.'
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    view:
                      - 'The view field is required.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      view:
                        type: array
                        example:
                          - 'The view field is required.'
                        items:
                          type: string
      tags:
        - 'Task status and performance'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                view:
                  type: string
                  description: 'The view preference to set.'
                  example: board
                  nullable: false
              required:
                - view
      security: []
  /api/master-panel/tasks/update-priority:
    post:
      summary: 'Update Task Priority'
      operationId: updateTaskPriority
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Priority updated successfully.'
                  id: 25
                  type: task
                  activity_message: 'herry porter updated task priority from low to high'
                  data:
                    id: 25
                    workspace_id: 2
                    title: 'Test Task Title'
                    status: Approved
                    status_id: 8
                    priority: high
                    priority_id: 1
                    users:
                      -
                        id: 2
                        first_name: herry
                        last_name: porter
                        email: admin@gmail.com
                        photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                      -
                        id: 3
                        first_name: John
                        last_name: Doe
                        email: admin2@gmail.com
                        photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                    user_id:
                      - 2
                      - 3
                    clients: []
                    start_date: '2025-06-01'
                    due_date: '2025-06-10'
                    project: 'favorite project'
                    project_id: 2
                    description: 'This is a test task description.'
                    note: 'Optional note about the task.'
                    favorite: 0
                    client_can_discuss: null
                    created_at: '2025-05-28'
                    updated_at: '2025-06-03'
                    enable_reminder: 1
                    last_reminder_sent: null
                    frequency_type: weekly
                    day_of_week: 3
                    time_of_day: '14:30:00'
                    enable_recurring_task: 1
                    recurrence_frequency: monthly
                    recurrence_day_of_month: 15
                    recurrence_starts_from: '2025-06-01'
                    recurrence_occurrences: 6
                    billing_type: billable
                    completion_percentage: 0
                    task_list_id: null
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Priority updated successfully.'
                  id:
                    type: integer
                    example: 25
                  type:
                    type: string
                    example: task
                  activity_message:
                    type: string
                    example: 'herry porter updated task priority from low to high'
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 25
                      workspace_id:
                        type: integer
                        example: 2
                      title:
                        type: string
                        example: 'Test Task Title'
                      status:
                        type: string
                        example: Approved
                      status_id:
                        type: integer
                        example: 8
                      priority:
                        type: string
                        example: high
                      priority_id:
                        type: integer
                        example: 1
                      users:
                        type: array
                        example:
                          -
                            id: 2
                            first_name: herry
                            last_name: porter
                            email: admin@gmail.com
                            photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                          -
                            id: 3
                            first_name: John
                            last_name: Doe
                            email: admin2@gmail.com
                            photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 2
                            first_name:
                              type: string
                              example: herry
                            last_name:
                              type: string
                              example: porter
                            email:
                              type: string
                              example: admin@gmail.com
                            photo:
                              type: string
                              example: 'http://localhost:8000/storage/photos/no-image.jpg'
                      user_id:
                        type: array
                        example:
                          - 2
                          - 3
                        items:
                          type: integer
                      clients:
                        type: array
                        example: []
                      start_date:
                        type: string
                        example: '2025-06-01'
                      due_date:
                        type: string
                        example: '2025-06-10'
                      project:
                        type: string
                        example: 'favorite project'
                      project_id:
                        type: integer
                        example: 2
                      description:
                        type: string
                        example: 'This is a test task description.'
                      note:
                        type: string
                        example: 'Optional note about the task.'
                      favorite:
                        type: integer
                        example: 0
                      client_can_discuss:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-05-28'
                      updated_at:
                        type: string
                        example: '2025-06-03'
                      enable_reminder:
                        type: integer
                        example: 1
                      last_reminder_sent:
                        type: string
                        example: null
                      frequency_type:
                        type: string
                        example: weekly
                      day_of_week:
                        type: integer
                        example: 3
                      time_of_day:
                        type: string
                        example: '14:30:00'
                      enable_recurring_task:
                        type: integer
                        example: 1
                      recurrence_frequency:
                        type: string
                        example: monthly
                      recurrence_day_of_month:
                        type: integer
                        example: 15
                      recurrence_starts_from:
                        type: string
                        example: '2025-06-01'
                      recurrence_occurrences:
                        type: integer
                        example: 6
                      billing_type:
                        type: string
                        example: billable
                      completion_percentage:
                        type: integer
                        example: 0
                      task_list_id:
                        type: string
                        example: null
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'No priority change detected.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'No priority change detected.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    id:
                      - 'The id field is required.'
                    priorityId:
                      - 'The selected priorityId is invalid.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        example:
                          - 'The id field is required.'
                        items:
                          type: string
                      priorityId:
                        type: array
                        example:
                          - 'The selected priorityId is invalid.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Priority couldn’t be updated.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Priority couldn’t be updated.'
      tags:
        - 'Task status and performance'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the task to update. Required if not provided in the URL.'
                  example: 25
                  nullable: false
                priorityId:
                  type: integer
                  description: 'nullable The new priority ID. Use `null` or `0` to remove the priority.'
                  example: 1
                  nullable: false
              required:
                - id
      security: []
    parameters:
      -
        in: path
        name: id
        description: "Optional parameter. optional The ID of the task. If provided in the URL, it doesn't need to be in the body."
        required: true
        schema:
          type: integer
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: 25
  /api/master-panel/tasks/upload-media:
    post:
      summary: 'Upload media files to a task.'
      operationId: uploadMediaFilesToATask
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: Success
                    type: object
                    example:
                      error: false
                      message: 'File(s) uploaded successfully.'
                      id:
                        - 15
                        - 16
                      type: media
                      parent_type: task
                      parent_id: 25
                    properties:
                      error:
                        type: boolean
                        example: false
                      message:
                        type: string
                        example: 'File(s) uploaded successfully.'
                      id:
                        type: array
                        example:
                          - 15
                          - 16
                        items:
                          type: integer
                      type:
                        type: string
                        example: media
                      parent_type:
                        type: string
                        example: task
                      parent_id:
                        type: integer
                        example: 25
                  -
                    description: 'No files uploaded'
                    type: object
                    example:
                      error: true
                      message: 'No file(s) chosen.'
                    properties:
                      error:
                        type: boolean
                        example: true
                      message:
                        type: string
                        example: 'No file(s) chosen.'
        422:
          description: 'Missing or invalid task ID'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    id:
                      - 'The selected id is invalid.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        example:
                          - 'The selected id is invalid.'
                        items:
                          type: string
      tags:
        - 'Task Media'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the task to which the files should be uploaded.'
                  example: 25
                  nullable: false
                media_files:
                  type: array
                  description: 'The media files to upload. Must be provided as an array of files.'
                  items:
                    type: string
                    format: binary
              required:
                - id
                - media_files
      security: []
  '/api/master-panel/tasks/{id}/media':
    get:
      summary: 'Get task media list.'
      operationId: getTaskMediaList
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter by file name, ID, or creation date.'
          example: image
          required: false
          schema:
            type: string
            description: 'Optional search term to filter by file name, ID, or creation date.'
            example: image
            nullable: false
        -
          in: query
          name: sort
          description: 'Field to sort by. Default is `id`.'
          example: file_name
          required: false
          schema:
            type: string
            description: 'Field to sort by. Default is `id`.'
            example: file_name
            nullable: false
        -
          in: query
          name: order
          description: 'Sorting direction: `asc` or `desc`. Default is `desc`.'
          example: asc
          required: false
          schema:
            type: string
            description: 'Sorting direction: `asc` or `desc`. Default is `desc`.'
            example: asc
            nullable: false
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  rows:
                    -
                      id: 16
                      file: '<a href="http://localhost:8000/storage/task-media/hmgoepprod.jpg" data-lightbox="task-media"><img src="http://localhost:8000/storage/task-media/hmgoepprod.jpg" alt="hmgoepprod.jpg" width="50"></a>'
                      file_name: hmgoepprod.jpg
                      file_size: '67.54 KB'
                      created_at: '2025-06-04'
                      updated_at: '2025-06-04'
                      actions: '<a href="http://localhost:8000/storage/task-media/hmgoepprod.jpg" title="Download" download><i class="bx bx-download bx-sm"></i></a><button title="Delete" type="button" class="btn delete" data-id="16" data-type="task-media" data-table="task_media_table"><i class="bx bx-trash text-danger"></i></button>'
                  total: 2
                properties:
                  rows:
                    type: array
                    example:
                      -
                        id: 16
                        file: '<a href="http://localhost:8000/storage/task-media/hmgoepprod.jpg" data-lightbox="task-media"><img src="http://localhost:8000/storage/task-media/hmgoepprod.jpg" alt="hmgoepprod.jpg" width="50"></a>'
                        file_name: hmgoepprod.jpg
                        file_size: '67.54 KB'
                        created_at: '2025-06-04'
                        updated_at: '2025-06-04'
                        actions: '<a href="http://localhost:8000/storage/task-media/hmgoepprod.jpg" title="Download" download><i class="bx bx-download bx-sm"></i></a><button title="Delete" type="button" class="btn delete" data-id="16" data-type="task-media" data-table="task_media_table"><i class="bx bx-trash text-danger"></i></button>'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 16
                        file:
                          type: string
                          example: '<a href="http://localhost:8000/storage/task-media/hmgoepprod.jpg" data-lightbox="task-media"><img src="http://localhost:8000/storage/task-media/hmgoepprod.jpg" alt="hmgoepprod.jpg" width="50"></a>'
                        file_name:
                          type: string
                          example: hmgoepprod.jpg
                        file_size:
                          type: string
                          example: '67.54 KB'
                        created_at:
                          type: string
                          example: '2025-06-04'
                        updated_at:
                          type: string
                          example: '2025-06-04'
                        actions:
                          type: string
                          example: '<a href="http://localhost:8000/storage/task-media/hmgoepprod.jpg" title="Download" download><i class="bx bx-download bx-sm"></i></a><button title="Delete" type="button" class="btn delete" data-id="16" data-type="task-media" data-table="task_media_table"><i class="bx bx-trash text-danger"></i></button>'
                  total:
                    type: integer
                    example: 2
      tags:
        - 'Task Media'
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the task to get media for.'
        example: 25
        required: true
        schema:
          type: integer
  '/api/master-panel/tasks/media/{id}':
    delete:
      summary: 'Delete a media file from a task.'
      operationId: deleteAMediaFileFromATask
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'File deleted successfully.'
                  id: 45
                  title: example-file.pdf
                  parent_id: 23
                  type: media
                  parent_type: task
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'File deleted successfully.'
                  id:
                    type: integer
                    example: 45
                  title:
                    type: string
                    example: example-file.pdf
                  parent_id:
                    type: integer
                    example: 23
                  type:
                    type: string
                    example: media
                  parent_type:
                    type: string
                    example: task
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'File not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'File not found.'
      tags:
        - 'Task Media'
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the medium.'
        example: consequatur
        required: true
        schema:
          type: string
      -
        in: path
        name: mediaId
        description: 'The ID of the media file to delete.'
        example: 45
        required: true
        schema:
          type: integer
  '/api/master-panel/calendar/{workspaceId}':
    get:
      summary: 'Get calendar tasks data for a workspace.'
      operationId: getCalendarTasksDataForAWorkspace
      description: "Retrieves tasks for the specified workspace filtered by an optional date range and project ID.\nThe tasks are formatted for use with FullCalendar."
      parameters:
        -
          in: query
          name: start
          description: 'optional Start date for filtering tasks (format: YYYY-MM-DD).'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'optional Start date for filtering tasks (format: YYYY-MM-DD).'
            example: consequatur
            nullable: false
        -
          in: query
          name: end
          description: 'optional End date for filtering tasks (format: YYYY-MM-DD).'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'optional End date for filtering tasks (format: YYYY-MM-DD).'
            example: consequatur
            nullable: false
        -
          in: query
          name: project_id
          description: 'optional Project ID to filter tasks by project.'
          example: 17
          required: false
          schema:
            type: integer
            description: 'optional Project ID to filter tasks by project.'
            example: 17
            nullable: false
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                example:
                  -
                    id: 25
                    tasks_info_url: 'http://localhost:8000/master-panel/tasks/information/25'
                    title: 'Test Task Title'
                    start: '2025-06-01'
                    end: '2025-06-10'
                    backgroundColor: '#a0e4a3'
                    borderColor: '#ffffff'
                    textColor: '#000000'
                  -
                    id: 28
                    tasks_info_url: 'http://localhost:8000/master-panel/tasks/information/28'
                    title: 'Create new onboarding flow'
                    start: '2015-01-01'
                    end: '2025-06-06'
                    backgroundColor: '#a0e4a3'
                    borderColor: '#ffffff'
                    textColor: '#000000'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Workspace not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Workspace not found.'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Something went wrong: <error_message>'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Something went wrong: <error_message>'
      tags:
        - 'Task Celender'
      security: []
    parameters:
      -
        in: path
        name: workspaceId
        description: 'The ID of the workspace to fetch tasks from.'
        example: 17
        required: true
        schema:
          type: integer
  /api/master-panel/comments-create:
    post:
      summary: 'Add a comment to a model (e.g., task, project).'
      operationId: addACommentToAModelegTaskProject
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: 'Comment Added Successfully'
                  comment:
                    id: 20
                    content: 'This is a test comment mentioning @john_doe'
                    user:
                      id: null
                      name: null
                      email: null
                    attachments: []
                    parent_id: null
                    created_at: '2025-06-04 06:05:24'
                    created_human: '1 second ago'
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Comment Added Successfully'
                  comment:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 20
                      content:
                        type: string
                        example: 'This is a test comment mentioning @john_doe'
                      user:
                        type: object
                        properties:
                          id:
                            type: string
                            example: null
                          name:
                            type: string
                            example: null
                          email:
                            type: string
                            example: null
                      attachments:
                        type: array
                        example: []
                      parent_id:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-06-04 06:05:24'
                      created_human:
                        type: string
                        example: '1 second ago'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    model_type:
                      - 'The model_type field is required.'
                    model_id:
                      - 'The model_id field is required.'
                    content:
                      - 'The content field is required.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      model_type:
                        type: array
                        example:
                          - 'The model_type field is required.'
                        items:
                          type: string
                      model_id:
                        type: array
                        example:
                          - 'The model_id field is required.'
                        items:
                          type: string
                      content:
                        type: array
                        example:
                          - 'The content field is required.'
                        items:
                          type: string
      tags:
        - 'Task Comments'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                model_type:
                  type: string
                  description: 'The fully qualified model class name.'
                  example: App\Models\Task
                  nullable: false
                model_id:
                  type: integer
                  description: 'The ID of the model to comment on.'
                  example: 25
                  nullable: false
                content:
                  type: string
                  description: 'The comment content. Mentions like @username will be parsed.'
                  example: 'This is a test comment mentioning @john_doe'
                  nullable: false
                parent_id:
                  type: integer
                  description: 'nullable The ID of the parent comment (for replies).'
                  example: 5
                  nullable: true
                attachments:
                  type: array
                  description: 'Must be a file. Must not be greater than 2048 kilobytes.'
                  items:
                    type: string
                    format: binary
                'attachments[]':
                  type: string
                  format: binary
                  description: 'optional Optional file attachments (JPG, PNG, PDF, etc).'
                  nullable: false
              required:
                - model_type
                - model_id
                - content
      security: []
  '/api/master-panel/comments/{id}':
    get:
      summary: 'get comments'
      operationId: getComments
      description: "This endpoint allows an authenticated user to add a comment to any commentable model (e.g., Task, Project).\nSupports file attachments and user mentions within the comment content."
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"success\": true,\n  \"comment\": {\n    \"id\": 20,\n    \"commentable_type\": \"App\\\\Models\\\\Task\",\n    \"commentable_id\": 12,\n    \"content\": \"This is a test comment with <a href='/user/profile/5'>@johndoe</a>\",\n    \"user_id\": 3,\n    \"parent_id\": null,\n    \"created_at\": \"2025-05-28T12:45:00.000000Z\",\n    \"updated_at\": \"2025-05-28T12:45:00.000000Z\",\n    \"attachments\": [\n      {\n        \"id\": 1,\n        \"comment_id\": 20,\n        \"file_name\": \"screenshot.png\",\n        \"file_path\": \"comment_attachments/screenshot.png\",\n        \"file_type\": \"image/png\"\n      }\n    ]\n  },\n  \"message\": \"Comment Added Successfully\",\n  \"user\": {\n    \"id\": 3,\n    \"name\": \"John Doe\",\n    ...\n  },\n  \"created_at\": \"just now\"\n}"
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    content:
                      - 'The content field is required.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      content:
                        type: array
                        example:
                          - 'The content field is required.'
                        items:
                          type: string
      tags:
        - 'Task Comments'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                model_type:
                  type: string
                  description: 'The fully qualified class name of the model being commented on (e.g., App\Models\Task).'
                  example: App\Models\Task
                  nullable: false
                model_id:
                  type: integer
                  description: 'The ID of the model instance being commented on.'
                  example: 12
                  nullable: false
                content:
                  type: string
                  description: 'The content of the comment. Mentions (e.g., @username) will be converted to user links.'
                  example: 'This is a test comment with @johndoe mentioned.'
                  nullable: false
                parent_id:
                  type: integer
                  description: 'nullable The ID of the parent comment if this is a reply.'
                  example: 5
                  nullable: false
                attachments:
                  type: array
                  description: 'Optional array of files to attach to the comment (jpg, jpeg, png, pdf, xlsx, txt, docx, max 2MB each).'
                  items:
                    type: string
                    format: binary
              required:
                - model_type
                - model_id
                - content
      security: []
    put:
      summary: "Update a comment's content."
      operationId: updateACommentsContent
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Comment updated successfully.'
                  id: 15
                  type: project
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Comment updated successfully.'
                  id:
                    type: integer
                    example: 15
                  type:
                    type: string
                    example: project
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: "Comment couldn't updated."
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: "Comment couldn't updated."
      tags:
        - 'Task Comments'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                comment_id:
                  type: integer
                  description: 'The ID of the comment to update.'
                  example: 15
                  nullable: false
                content:
                  type: string
                  description: 'The updated content of the comment. User mentions using @username will be parsed and linked.'
                  example: 'Updated comment mentioning @janedoe.'
                  nullable: false
              required:
                - comment_id
                - content
      security: []
    delete:
      summary: 'Permanently delete a comment and its attachments.'
      operationId: permanentlyDeleteACommentAndItsAttachments
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Comment deleted successfully.'
                  id: 12
                  type: project
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Comment deleted successfully.'
                  id:
                    type: integer
                    example: 12
                  type:
                    type: string
                    example: project
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: "Comment couldn't deleted."
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: "Comment couldn't deleted."
      tags:
        - 'Task Comments'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                comment_id:
                  type: integer
                  description: 'The ID of the comment to delete.'
                  example: 12
                  nullable: false
              required:
                - comment_id
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the comment.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/master-panel/status/{id}':
    get:
      summary: 'Get Status List or a Single Status'
      operationId: getStatusListOrASingleStatus
      description: "This endpoint allows you to:\n- Retrieve a list of all status records.\n- Retrieve a specific status record by providing its ID."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Fetch all statuses'
                    type: object
                    example:
                      rows:
                        -
                          id: 1
                          title: Pending
                          roles_has_access: 'Admin, Manager'
                          color: '<span class="badge bg-warning">Pending</span>'
                          created_at: '2024-08-20 10:12 AM'
                          updated_at: '2024-08-25 03:45 PM'
                        -
                          id: 2
                          title: Approved
                          roles_has_access: Admin
                          color: '<span class="badge bg-success">Approved</span>'
                          created_at: '2024-08-21 11:30 AM'
                          updated_at: '2024-08-26 02:15 PM'
                      total: 2
                    properties:
                      rows:
                        type: array
                        example:
                          -
                            id: 1
                            title: Pending
                            roles_has_access: 'Admin, Manager'
                            color: '<span class="badge bg-warning">Pending</span>'
                            created_at: '2024-08-20 10:12 AM'
                            updated_at: '2024-08-25 03:45 PM'
                          -
                            id: 2
                            title: Approved
                            roles_has_access: Admin
                            color: '<span class="badge bg-success">Approved</span>'
                            created_at: '2024-08-21 11:30 AM'
                            updated_at: '2024-08-26 02:15 PM'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: Pending
                            roles_has_access:
                              type: string
                              example: 'Admin, Manager'
                            color:
                              type: string
                              example: '<span class="badge bg-warning">Pending</span>'
                            created_at:
                              type: string
                              example: '2024-08-20 10:12 AM'
                            updated_at:
                              type: string
                              example: '2024-08-25 03:45 PM'
                      total:
                        type: integer
                        example: 2
                  -
                    description: 'Fetch single status by ID'
                    type: object
                    example:
                      id: 3
                      title: Rejected
                      roles_has_access: User
                      color: '<span class="badge bg-danger">Rejected</span>'
                      created_at: '2024-08-22 09:00 AM'
                      updated_at: '2024-08-28 01:00 PM'
                    properties:
                      id:
                        type: integer
                        example: 3
                      title:
                        type: string
                        example: Rejected
                      roles_has_access:
                        type: string
                        example: User
                      color:
                        type: string
                        example: '<span class="badge bg-danger">Rejected</span>'
                      created_at:
                        type: string
                        example: '2024-08-22 09:00 AM'
                      updated_at:
                        type: string
                        example: '2024-08-28 01:00 PM'
        401:
          description: 'Unauthenticated request'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
        404:
          description: 'Status not found for given ID'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Status not found.'
                properties:
                  message:
                    type: string
                    example: 'Status not found.'
        500:
          description: 'Unexpected server error'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Internal Server Error'
                properties:
                  message:
                    type: string
                    example: 'Internal Server Error'
      tags:
        - 'Status Management'
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'Optional parameter. Optional. The ID of the status you want to retrieve.'
        required: true
        schema:
          type: integer
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: 3
  /api/master-panel/statuses:
    post:
      summary: 'Create a New Status'
      operationId: createANewStatus
      description: 'This endpoint creates a new status entry with a unique slug and assigns roles that have access to it.'
      parameters: []
      responses:
        200:
          description: 'Successful creation'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Status created successfully.'
                  id: 5
                  status:
                    id: 5
                    title: Approved
                    color: success
                    slug: approved
                    admin_id: 1
                    created_at: '2025-05-28T12:34:56.000000Z'
                    updated_at: '2025-05-28T12:34:56.000000Z'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Status created successfully.'
                  id:
                    type: integer
                    example: 5
                  status:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 5
                      title:
                        type: string
                        example: Approved
                      color:
                        type: string
                        example: success
                      slug:
                        type: string
                        example: approved
                      admin_id:
                        type: integer
                        example: 1
                      created_at:
                        type: string
                        example: '2025-05-28T12:34:56.000000Z'
                      updated_at:
                        type: string
                        example: '2025-05-28T12:34:56.000000Z'
        422:
          description: 'Validation failed'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    title:
                      - 'The title field is required.'
                    color:
                      - 'The color field is required.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
                      color:
                        type: array
                        example:
                          - 'The color field is required.'
                        items:
                          type: string
        500:
          description: 'Creation failed due to internal error'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: "Status couldn't created."
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: "Status couldn't created."
      tags:
        - 'Status Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'The name of the status.'
                  example: Approved
                  nullable: false
                color:
                  type: string
                  description: 'The Bootstrap color class (without `bg-` prefix).'
                  example: success
                  nullable: false
                role_ids:
                  type: array
                  description: 'Optional list of role IDs to associate with the status.'
                  example:
                    - 1
                    - 2
                  items:
                    type: string
              required:
                - title
                - color
      security: []
  '/api/master-panel/statuses/{id}':
    put:
      summary: 'Update an Existing Status'
      operationId: updateAnExistingStatus
      description: 'This endpoint updates the title, color, and associated roles of an existing status.'
      parameters: []
      responses:
        200:
          description: 'Successful update'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Status updated successfully.'
                  id: 5
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Status updated successfully.'
                  id:
                    type: integer
                    example: 5
        404:
          description: 'Status not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'No query results for model [App\Models\Status] 99'
                properties:
                  message:
                    type: string
                    example: 'No query results for model [App\Models\Status] 99'
        422:
          description: 'Validation failed'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    id:
                      - 'The id field is required.'
                    title:
                      - 'The title field is required.'
                    color:
                      - 'The color field is required.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        example:
                          - 'The id field is required.'
                        items:
                          type: string
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
                      color:
                        type: array
                        example:
                          - 'The color field is required.'
                        items:
                          type: string
        500:
          description: 'Update failed due to internal error'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: "Status couldn't updated."
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: "Status couldn't updated."
      tags:
        - 'Status Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the status to update.'
                  example: 5
                  nullable: false
                title:
                  type: string
                  description: 'The updated title of the status.'
                  example: Rejected
                  nullable: false
                color:
                  type: string
                  description: 'The updated color class (without `bg-` prefix).'
                  example: danger
                  nullable: false
                role_ids:
                  type: array
                  description: 'Optional array of role IDs to sync with the status.'
                  example:
                    - 1
                    - 3
                  items:
                    type: string
              required:
                - id
                - title
                - color
      security: []
    delete:
      summary: 'Delete a Status'
      operationId: deleteAStatus
      description: 'This endpoint deletes a status if it is not associated with any project or task.'
      parameters: []
      responses:
        200:
          description: 'Successful deletion'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Status deleted successfully.'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Status deleted successfully.'
        403:
          description: 'Status associated with project or task'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: "Status can't be deleted.It is associated with a project or task."
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: "Status can't be deleted.It is associated with a project or task."
        404:
          description: 'Status not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'No query results for model [App\Models\Status] 99'
                properties:
                  message:
                    type: string
                    example: 'No query results for model [App\Models\Status] 99'
        500:
          description: 'Deletion failed due to server error'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Something went wrong while deleting the status.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Something went wrong while deleting the status.'
      tags:
        - 'Status Management'
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the status.'
        example: 3
        required: true
        schema:
          type: integer
  /api/master-panel/destroy-multiple-statuses:
    delete:
      summary: 'Delete Multiple Statuses'
      operationId: deleteMultipleStatuses
      description: 'Deletes multiple statuses by their IDs if they are not associated with any project or task.'
      parameters: []
      responses:
        200:
          description: 'Successful deletion'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Status(es) deleted successfully.'
                  id:
                    - 1
                    - 2
                  titles:
                    - Approved
                    - Pending
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Status(es) deleted successfully.'
                  id:
                    type: array
                    example:
                      - 1
                      - 2
                    items:
                      type: integer
                  titles:
                    type: array
                    example:
                      - Approved
                      - Pending
                    items:
                      type: string
        403:
          description: 'Status associated with project or task'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: "Status can't be deleted.It is associated with a project"
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: "Status can't be deleted.It is associated with a project"
        404:
          description: 'Status not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'No query results for model [App\Models\Status] 99'
                properties:
                  message:
                    type: string
                    example: 'No query results for model [App\Models\Status] 99'
        422:
          description: 'Validation failed'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    ids:
                      - 'The ids field is required.'
                    ids.0:
                      - 'The selected ids.0 is invalid.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      ids:
                        type: array
                        example:
                          - 'The ids field is required.'
                        items:
                          type: string
                      ids.0:
                        type: array
                        example:
                          - 'The selected ids.0 is invalid.'
                        items:
                          type: string
        500:
          description: 'Deletion failed due to server error'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Something went wrong while deleting the statuses.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Something went wrong while deleting the statuses.'
      tags:
        - 'Status Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ids:
                  type: array
                  description: 'Array of status IDs to delete. Each ID must exist in the statuses table.'
                  example:
                    - 1
                    - 2
                    - 3
                  items:
                    type: string
              required:
                - ids
      security: []
  '/api/master-panel/clients/{id}':
    get:
      summary: "List or Retrieve Clients\n\nThis endpoint is used to retrieve a list of all clients for the current workspace,\nor a single client if an ID is provided. It supports searching, sorting, and pagination.\n\nRequires a `workspace_id` header to identify the current workspace context."
      operationId: listOrRetrieveClientsThisEndpointIsUsedToRetrieveAListOfAllClientsForTheCurrentWorkspaceorASingleClientIfAnIDIsProvidedItSupportsSearchingSortingAndPaginationRequiresAworkspaceIdHeaderToIdentifyTheCurrentWorkspaceContext
      description: ''
      parameters:
        -
          in: query
          name: isApi
          description: 'Optional. Indicates if the request is from an API context. Default: false.'
          example: true
          required: false
          schema:
            type: boolean
            description: 'Optional. Indicates if the request is from an API context. Default: false.'
            example: true
            nullable: false
        -
          in: query
          name: search
          description: 'Optional. Search clients by first name, last name, company, email, or phone.'
          example: john
          required: false
          schema:
            type: string
            description: 'Optional. Search clients by first name, last name, company, email, or phone.'
            example: john
            nullable: false
        -
          in: query
          name: sort
          description: 'Optional. Field to sort by. Default: id.'
          example: first_name
          required: false
          schema:
            type: string
            description: 'Optional. Field to sort by. Default: id.'
            example: first_name
            nullable: false
        -
          in: query
          name: order
          description: 'Optional. Sort direction: ASC or DESC. Default: DESC.'
          example: ASC
          required: false
          schema:
            type: string
            description: 'Optional. Sort direction: ASC or DESC. Default: DESC.'
            example: ASC
            nullable: false
        -
          in: query
          name: limit
          description: 'Optional. Number of clients per page. Default: 10.'
          example: 15
          required: false
          schema:
            type: integer
            description: 'Optional. Number of clients per page. Default: 10.'
            example: 15
            nullable: false
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"success\": false,\n  \"message\": \"Clients retrieved successfully\",\n  \"data\": {\n    \"total\": 2,\n    \"data\": [\n      {\n        \"id\": 1,\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"email\": \"john@example.com\",\n        \"company\": \"Acme Inc\",\n        ...\n      }\n    ],\n    \"pagination\": {\n      \"current_page\": 1,\n      \"last_page\": 1,\n      \"per_page\": 10,\n      \"total\": 2\n    }\n  }\n}"
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Workspace ID header missing'
                properties:
                  error:
                    type: string
                    example: 'Workspace ID header missing'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Client not found'
                properties:
                  error:
                    type: string
                    example: 'Client not found'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: "Client couldn't be retrieved."
                  data:
                    error: 'Detailed error message'
                    line: 123
                    file: path/to/file.php
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: "Client couldn't be retrieved."
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                        example: 'Detailed error message'
                      line:
                        type: integer
                        example: 123
                      file:
                        type: string
                        example: path/to/file.php
      tags:
        - 'Client Management'
      security: []
    delete:
      summary: 'Delete a client.'
      operationId: deleteAClient
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Client deleted successfully.'
                  id: 28
                  title: 'hrdeep Raa'
                  data: []
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Client deleted successfully.'
                  id:
                    type: integer
                    example: 28
                  title:
                    type: string
                    example: 'hrdeep Raa'
                  data:
                    type: array
                    example: []
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'No query results for model [App\Models\Client] 15'
                  message: 'Client not found.'
                properties:
                  error:
                    type: string
                    example: 'No query results for model [App\Models\Client] 15'
                  message:
                    type: string
                    example: 'Client not found.'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Exception message'
                  message: 'Client could not be deleted.'
                  line: 123
                  file: path/to/file
                properties:
                  error:
                    type: string
                    example: 'Exception message'
                  message:
                    type: string
                    example: 'Client could not be deleted.'
                  line:
                    type: integer
                    example: 123
                  file:
                    type: string
                    example: path/to/file
      tags:
        - 'Client Management'
    parameters:
      -
        in: path
        name: id
        description: 'Optional parameter. Optional. The ID of the client to retrieve. If not provided, a paginated list of clients will be returned.'
        required: true
        schema:
          type: integer
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: 17
  /api/master-panel/clients:
    post:
      summary: 'Create a new client.'
      operationId: createANewClient
      description: "This endpoint is used to create a new client, either for internal purposes or for general usage.\nThe client can be created with optional email verification and notification settings.\nThe request must include a `workspace-id` in the headers to identify which workspace the client belongs to."
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"error\": false,\n  \"message\": \"Client created successfully.\",\n  \"data\": {\n    \"id\": 23,\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    ...\n  }\n}"
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Invalid or missing workspace.'
                  workspace_id: null
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Invalid or missing workspace.'
                  workspace_id:
                    type: string
                    example: null
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'The email has already been taken in users or clients.'
                  errors:
                    email:
                      - 'The email has already been taken in users or clients.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'The email has already been taken in users or clients.'
                  errors:
                    type: object
                    properties:
                      email:
                        type: array
                        example:
                          - 'The email has already been taken in users or clients.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Exception message here'
                  message: 'Client could not be created.'
                  line: 120
                  file: ClientController.php
                properties:
                  error:
                    type: string
                    example: 'Exception message here'
                  message:
                    type: string
                    example: 'Client could not be created.'
                  line:
                    type: integer
                    example: 120
                  file:
                    type: string
                    example: ClientController.php
      tags:
        - 'Client Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                first_name:
                  type: string
                  description: 'The first name of the client.'
                  example: John
                  nullable: false
                last_name:
                  type: string
                  description: 'The last name of the client.'
                  example: Doe
                  nullable: false
                company:
                  type: string
                  description: 'The company name of the client.'
                  example: 'Acme Corp'
                  nullable: false
                email:
                  type: string
                  description: 'The email address of the client. Must be unique.'
                  example: john@example.com
                  nullable: false
                phone:
                  type: string
                  description: 'The phone number of the client.'
                  example: '1234567890'
                  nullable: false
                country_code:
                  type: string
                  description: 'The phone country code.'
                  example: '+1'
                  nullable: false
                password:
                  type: string
                  description: 'required_if:internal_purpose,off The password for the client (min 6 characters). Required unless internal_purpose is on.'
                  example: password123
                  nullable: false
                password_confirmation:
                  type: string
                  description: 'Same as password. Required if password is present.'
                  example: password123
                  nullable: false
                address:
                  type: string
                  description: 'The address of the client.'
                  example: '123 Main St'
                  nullable: false
                city:
                  type: string
                  description: 'The city of the client.'
                  example: 'New York'
                  nullable: false
                state:
                  type: string
                  description: 'The state of the client.'
                  example: NY
                  nullable: false
                country:
                  type: string
                  description: 'The country of the client.'
                  example: USA
                  nullable: false
                zip:
                  type: string
                  description: 'The ZIP/postal code.'
                  example: '10001'
                  nullable: false
                dob:
                  type: string
                  description: 'The date of birth in the configured date format.'
                  example: '1990-01-01'
                  nullable: false
                doj:
                  type: string
                  description: 'The date of joining in the configured date format.'
                  example: '2023-01-01'
                  nullable: false
                country_iso_code:
                  type: string
                  description: 'ISO country code.'
                  example: US
                  nullable: false
                internal_purpose:
                  type: boolean
                  description: 'Whether the client is for internal purpose only.'
                  example: true
                  nullable: false
                require_ev:
                  type: boolean
                  description: 'Should email verification be required. Only applicable if user has permission.'
                  example: false
                  nullable: false
                status:
                  type: boolean
                  description: 'Should the client be activated immediately. Only applicable if user has permission.'
                  example: true
                  nullable: false
                example:
                  type: '{'
                  description: "\"first_name\": \"John\",\n  \"last_name\": \"Doe\",\n  \"company\": \"Acme Corp\",\n  \"email\": \"john@example.com\",\n  \"phone\": \"1234567890\",\n  \"country_code\": \"+1\",\n  \"password\": \"password123\",\n  \"password_confirmation\": \"password123\",\n  \"address\": \"123 Main St\",\n  \"city\": \"New York\",\n  \"state\": \"NY\",\n  \"country\": \"USA\",\n  \"zip\": \"10001\",\n  \"dob\": \"1990-01-01\",\n  \"doj\": \"2023-01-01\",\n  \"country_iso_code\": \"US\",\n  \"internal_purpose\": \"on\",\n  \"require_ev\": 0,\n  \"status\": 1\n}"
                  example: consequatur
                  nullable: false
              required:
                - first_name
                - last_name
                - email
      security: []
  '/api/master-panel/clients/{client}':
    put:
      summary: 'Update a client'
      operationId: updateAClient
      description: "This endpoint updates the details of an existing client, including profile information,\nstatus, internal usage flag, password, and triggers account creation or email verification emails if needed."
      parameters:
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"error\": false,\n  \"message\": \"Client details updated successfully.\",\n  \"data\": {\n    \"id\": 5,\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    ...\n  }\n}"
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    email:
                      - 'The email has already been taken.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      email:
                        type: array
                        example:
                          - 'The email has already been taken.'
                        items:
                          type: string
      tags:
        - 'Client Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                first_name:
                  type: string
                  description: "The client's first name."
                  example: John
                  nullable: false
                last_name:
                  type: string
                  description: "The client's last name."
                  example: Doe
                  nullable: false
                company:
                  type: string
                  description: "The client's company name."
                  example: 'Acme Corp'
                  nullable: false
                email:
                  type: string
                  description: 'Must be a valid and unique email address.'
                  example: john.doe@example.com
                  nullable: false
                phone:
                  type: string
                  description: "The client's phone number."
                  example: '+1234567890'
                  nullable: false
                country_code:
                  type: string
                  description: 'The country code for the phone number.'
                  example: '+91'
                  nullable: false
                address:
                  type: string
                  description: "The client's address."
                  example: '123 Main St'
                  nullable: false
                city:
                  type: string
                  description: "The client's city."
                  example: Mumbai
                  nullable: false
                state:
                  type: string
                  description: "The client's state."
                  example: Maharashtra
                  nullable: false
                country:
                  type: string
                  description: "The client's country."
                  example: India
                  nullable: false
                zip:
                  type: string
                  description: "The client's postal code."
                  example: '400001'
                  nullable: false
                dob:
                  type: date
                  description: "The client's date of birth (YYYY-MM-DD)."
                  example: '1990-05-01'
                  nullable: false
                doj:
                  type: date
                  description: "The client's date of joining (YYYY-MM-DD)."
                  example: '2023-04-15'
                  nullable: false
                country_iso_code:
                  type: string
                  description: "The ISO code of the client's country."
                  example: IN
                  nullable: false
                status:
                  type: integer
                  description: "The client's status (1 = active, 0 = inactive)."
                  example: 1
                  nullable: false
                require_ev:
                  type: integer
                  description: 'Set to 1 to send email verification, 0 to skip.'
                  example: 1
                  nullable: false
              required:
                - first_name
                - last_name
                - email
      security: []
    parameters:
      -
        in: path
        name: client
        description: 'The client.'
        example: consequatur
        required: true
        schema:
          type: string
      -
        in: path
        name: id
        description: 'The ID of the client to update.'
        example: 5
        required: true
        schema:
          type: integer
  /api/master-panel/destroy-multiple-clients:
    delete:
      summary: 'Delete multiple clients.'
      operationId: deleteMultipleClients
      description: 'Deletes multiple clients by their IDs along with their associated todos.'
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Clients(s) deleted successfully.'
                  id:
                    - 1
                    - 2
                    - 3
                  titles:
                    - 'John Doe'
                    - 'Jane Smith'
                    - 'Alice Johnson'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Clients(s) deleted successfully.'
                  id:
                    type: array
                    example:
                      - 1
                      - 2
                      - 3
                    items:
                      type: integer
                  titles:
                    type: array
                    example:
                      - 'John Doe'
                      - 'Jane Smith'
                      - 'Alice Johnson'
                    items:
                      type: string
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Client not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Client not found.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    ids:
                      - 'The ids field is required.'
                    ids.0:
                      - 'The selected ids.0 is invalid.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      ids:
                        type: array
                        example:
                          - 'The ids field is required.'
                        items:
                          type: string
                      ids.0:
                        type: array
                        example:
                          - 'The selected ids.0 is invalid.'
                        items:
                          type: string
      tags:
        - 'Client Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ids:
                  type: array
                  description: 'An array of client IDs to delete.'
                  example:
                    - 1
                    - 2
                    - 3
                  items:
                    type: string
              required:
                - ids
      security: []
  /api/master-panel/priorities:
    post:
      summary: 'Create a new priority'
      operationId: createANewPriority
      description: 'This endpoint allows you to create a new priority with a title and color. It automatically generates a unique slug and assigns the current admin as the creator.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Priority created successfully.'
                  data:
                    id: 7
                    title: 'High Priority'
                    slug: high-priority
                    color: '#FF0000'
                    admin_id: 1
                    created_at: '2025-06-04T14:25:30.000000Z'
                    updated_at: '2025-06-04T14:25:30.000000Z'
                  id: 7
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Priority created successfully.'
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 7
                      title:
                        type: string
                        example: 'High Priority'
                      slug:
                        type: string
                        example: high-priority
                      color:
                        type: string
                        example: '#FF0000'
                      admin_id:
                        type: integer
                        example: 1
                      created_at:
                        type: string
                        example: '2025-06-04T14:25:30.000000Z'
                      updated_at:
                        type: string
                        example: '2025-06-04T14:25:30.000000Z'
                  id:
                    type: integer
                    example: 7
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'The given data was invalid.'
                  errors:
                    title:
                      - 'The title field is required.'
                    color:
                      - 'The color field is required.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
                      color:
                        type: array
                        example:
                          - 'The color field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Exception message here'
                  message: 'Priority could not be created.'
                  line: 45
                  file: PriorityController.php
                properties:
                  error:
                    type: string
                    example: 'Exception message here'
                  message:
                    type: string
                    example: 'Priority could not be created.'
                  line:
                    type: integer
                    example: 45
                  file:
                    type: string
                    example: PriorityController.php
      tags:
        - Priority
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'The title of the priority.'
                  example: 'High Priority'
                  nullable: false
                color:
                  type: string
                  description: 'The color associated with the priority (hex code or color name).'
                  example: '#FF0000'
                  nullable: false
              required:
                - title
                - color
      security: []
  '/api/master-panel/priorities/{priority}':
    put:
      summary: 'Update an existing priority.'
      operationId: updateAnExistingPriority
      description: "This endpoint updates the title, color, and slug of an existing priority record.\nThe priority is identified by its ID."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Priority updated successfully.'
                  data:
                    id: 10
                    title: High
                    color: '#FF0000'
                    slug: high
                  id: 10
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Priority updated successfully.'
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 10
                      title:
                        type: string
                        example: High
                      color:
                        type: string
                        example: '#FF0000'
                      slug:
                        type: string
                        example: high
                  id:
                    type: integer
                    example: 10
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Priority not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Priority not found.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Validation error.'
                  errors:
                    title:
                      - 'The title field is required.'
                    color:
                      - 'The color field is required.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Validation error.'
                  errors:
                    type: object
                    properties:
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
                      color:
                        type: array
                        example:
                          - 'The color field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Priority could not be updated due to server error.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Priority could not be updated due to server error.'
      tags:
        - Priority
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the priority to update.'
                  example: 10
                  nullable: false
                title:
                  type: string
                  description: 'The new title of the priority.'
                  example: High
                  nullable: false
                color:
                  type: string
                  description: 'The new color code for the priority.'
                  example: '#FF0000'
                  nullable: false
              required:
                - id
                - title
                - color
      security: []
    delete:
      summary: 'Delete a priority.'
      operationId: deleteAPriority
      description: "This endpoint deletes a specific priority by its ID.\nBefore deletion, it detaches the priority from all related projects and tasks."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Priority deleted successfully.'
                  id: 5
                  title: 'High Priority'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Priority deleted successfully.'
                  id:
                    type: integer
                    example: 5
                  title:
                    type: string
                    example: 'High Priority'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'No query results for model [App\Models\Priority] 999'
                  message: 'Priority not found.'
                properties:
                  error:
                    type: string
                    example: 'No query results for model [App\Models\Priority] 999'
                  message:
                    type: string
                    example: 'Priority not found.'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Exception message here'
                  message: 'Priority could not be deleted.'
                  line: 42
                  file: PriorityController.php
                properties:
                  error:
                    type: string
                    example: 'Exception message here'
                  message:
                    type: string
                    example: 'Priority could not be deleted.'
                  line:
                    type: integer
                    example: 42
                  file:
                    type: string
                    example: PriorityController.php
      tags:
        - Priority
      security: []
    parameters:
      -
        in: path
        name: priority
        description: 'The priority.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/master-panel/priorities/{id}':
    get:
      summary: 'Get priorities list or a specific priority.'
      operationId: getPrioritiesListOrASpecificPriority
      description: "This endpoint allows fetching either a paginated list of priorities or a single priority by providing its ID.\nIt supports optional searching, sorting, and pagination when listing all priorities."
      parameters:
        -
          in: query
          name: search
          description: 'optional Search term for filtering by title or ID.'
          example: Urgent
          required: false
          schema:
            type: string
            description: 'optional Search term for filtering by title or ID.'
            example: Urgent
            nullable: false
        -
          in: query
          name: sort
          description: 'optional Field to sort by. Defaults to id.'
          example: title
          required: false
          schema:
            type: string
            description: 'optional Field to sort by. Defaults to id.'
            example: title
            nullable: false
        -
          in: query
          name: order
          description: 'optional Sort order. Either ASC or DESC. Defaults to DESC.'
          example: ASC
          required: false
          schema:
            type: string
            description: 'optional Sort order. Either ASC or DESC. Defaults to DESC.'
            example: ASC
            nullable: false
        -
          in: query
          name: limit
          description: 'optional Number of records per page. Defaults to 15.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'optional Number of records per page. Defaults to 15.'
            example: 10
            nullable: false
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: ''
                    type: object
                    example:
                      error: false
                      message: 'Priorities fetched successfully.'
                      data:
                        rows:
                          -
                            id: 1
                            title: High
                            color: red
                            created_at: '2024-06-01'
                            updated_at: '2024-06-01'
                        total: 1
                        current_page: 1
                        last_page: 1
                    properties:
                      error:
                        type: boolean
                        example: false
                      message:
                        type: string
                        example: 'Priorities fetched successfully.'
                      data:
                        type: object
                        properties:
                          rows:
                            type: array
                            example:
                              -
                                id: 1
                                title: High
                                color: red
                                created_at: '2024-06-01'
                                updated_at: '2024-06-01'
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type: string
                                  example: High
                                color:
                                  type: string
                                  example: red
                                created_at:
                                  type: string
                                  example: '2024-06-01'
                                updated_at:
                                  type: string
                                  example: '2024-06-01'
                          total:
                            type: integer
                            example: 1
                          current_page:
                            type: integer
                            example: 1
                          last_page:
                            type: integer
                            example: 1
                  -
                    description: ''
                    type: object
                    example:
                      error: false
                      message: 'Priority fetched successfully.'
                      data:
                        id: 1
                        title: High
                        color: red
                        created_at: '2024-06-01'
                        updated_at: '2024-06-01'
                    properties:
                      error:
                        type: boolean
                        example: false
                      message:
                        type: string
                        example: 'Priority fetched successfully.'
                      data:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          title:
                            type: string
                            example: High
                          color:
                            type: string
                            example: red
                          created_at:
                            type: string
                            example: '2024-06-01'
                          updated_at:
                            type: string
                            example: '2024-06-01'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'No query results for model [App\Models\Priority] 3'
                  message: 'Priority not found.'
                properties:
                  error:
                    type: string
                    example: 'No query results for model [App\Models\Priority] 3'
                  message:
                    type: string
                    example: 'Priority not found.'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Exception message here'
                  message: 'Failed to fetch priorities.'
                  line: 101
                  file: PriorityController.php
                properties:
                  error:
                    type: string
                    example: 'Exception message here'
                  message:
                    type: string
                    example: 'Failed to fetch priorities.'
                  line:
                    type: integer
                    example: 101
                  file:
                    type: string
                    example: PriorityController.php
      tags:
        - Priority
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'Optional parameter. optional The ID of the priority to retrieve.'
        required: true
        schema:
          type: integer
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: 3
  /api/master-panel/multiple-delete:
    delete:
      summary: 'Delete multiple priorities.'
      operationId: deleteMultiplePriorities
      description: "This endpoint deletes one or more priorities based on the provided array of IDs.\nIt also detaches the priorities from any associated projects and tasks before deletion.\nEach priority must exist in the database."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Priority/Priorities deleted successfully.'
                  ids:
                    - 1
                    - 2
                    - 3
                  titles:
                    - High
                    - Medium
                    - Low
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Priority/Priorities deleted successfully.'
                  ids:
                    type: array
                    example:
                      - 1
                      - 2
                      - 3
                    items:
                      type: integer
                  titles:
                    type: array
                    example:
                      - High
                      - Medium
                      - Low
                    items:
                      type: string
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'The given data was invalid.'
                  errors:
                    ids.0:
                      - 'The selected ids.0 is invalid.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      ids.0:
                        type: array
                        example:
                          - 'The selected ids.0 is invalid.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Exception message'
                  message: 'Priorities could not be deleted.'
                  line: 123
                  file: PriorityController.php
                properties:
                  error:
                    type: string
                    example: 'Exception message'
                  message:
                    type: string
                    example: 'Priorities could not be deleted.'
                  line:
                    type: integer
                    example: 123
                  file:
                    type: string
                    example: PriorityController.php
      tags:
        - Priority
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ids:
                  type: array
                  description: 'The list of priority IDs to delete.'
                  example:
                    - 1
                    - 2
                    - 3
                  items:
                    type: string
              required:
                - ids
      security: []
  /api/master-panel/user:
    post:
      summary: 'Create a new user'
      operationId: createANewUser
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'User created successfully.'
                  id: 54
                  data:
                    id: 54
                    first_name: John
                    last_name: Doe
                    full_name: 'John Doe'
                    email: john.smith@example.com
                    phone: '+1234567890'
                    address: '123 Main St'
                    country_code: '+91'
                    city: Mumbai
                    state: Maharashtra
                    country: India
                    zip: '400001'
                    dob: null
                    doj: null
                    role: admin
                    status: 1
                    email_verified: false
                    photo_url: 'http://localhost:8000/storage/photos/no-image.jpg'
                    created_at: '2025-06-11 06:48:45'
                    updated_at: '2025-06-11 06:48:45'
                    require_ev: 1
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'User created successfully.'
                  id:
                    type: integer
                    example: 54
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 54
                      first_name:
                        type: string
                        example: John
                      last_name:
                        type: string
                        example: Doe
                      full_name:
                        type: string
                        example: 'John Doe'
                      email:
                        type: string
                        example: john.smith@example.com
                      phone:
                        type: string
                        example: '+1234567890'
                      address:
                        type: string
                        example: '123 Main St'
                      country_code:
                        type: string
                        example: '+91'
                      city:
                        type: string
                        example: Mumbai
                      state:
                        type: string
                        example: Maharashtra
                      country:
                        type: string
                        example: India
                      zip:
                        type: string
                        example: '400001'
                      dob:
                        type: string
                        example: null
                      doj:
                        type: string
                        example: null
                      role:
                        type: string
                        example: admin
                      status:
                        type: integer
                        example: 1
                      email_verified:
                        type: boolean
                        example: false
                      photo_url:
                        type: string
                        example: 'http://localhost:8000/storage/photos/no-image.jpg'
                      created_at:
                        type: string
                        example: '2025-06-11 06:48:45'
                      updated_at:
                        type: string
                        example: '2025-06-11 06:48:45'
                      require_ev:
                        type: integer
                        example: 1
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  errors:
                    email:
                      - 'The email has already been taken in users or clients.'
                properties:
                  errors:
                    type: object
                    properties:
                      email:
                        type: array
                        example:
                          - 'The email has already been taken in users or clients.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: "User couldn't be created, please make sure email settings are operational."
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: "User couldn't be created, please make sure email settings are operational."
      tags:
        - 'User Managemant'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                first_name:
                  type: string
                  description: "The user's first name."
                  example: John
                  nullable: false
                last_name:
                  type: string
                  description: "The user's last name."
                  example: Doe
                  nullable: false
                email:
                  type: string
                  description: "The user's unique email address. Must not exist in users or clients."
                  example: john.smith@example.com
                  nullable: false
                password:
                  type: string
                  description: 'The password (minimum 6 characters).'
                  example: secret123
                  nullable: false
                password_confirmation:
                  type: string
                  description: 'Must match the password.'
                  example: secret123
                  nullable: false
                address:
                  type: string
                  description: "The user's address."
                  example: '123 Main St'
                  nullable: false
                phone:
                  type: string
                  description: "The user's phone number."
                  example: '+1234567890'
                  nullable: false
                country_code:
                  type: string
                  description: 'Country dialing code.'
                  example: '+91'
                  nullable: false
                city:
                  type: string
                  description: 'The city.'
                  example: Mumbai
                  nullable: false
                state:
                  type: string
                  description: 'The state.'
                  example: Maharashtra
                  nullable: false
                country:
                  type: string
                  description: 'The country.'
                  example: India
                  nullable: false
                zip:
                  type: string
                  description: 'The zip/postal code.'
                  example: '400001'
                  nullable: false
                dob:
                  type: date
                  description: "The user's date of birth (in 'Y-m-d' format)."
                  example: '1990-01-01'
                  nullable: false
                doj:
                  type: date
                  description: "The user's date of joining (in 'Y-m-d' format)."
                  example: '2022-01-01'
                  nullable: false
                role:
                  type: string
                  description: 'The role to assign to the user.'
                  example: admin
                  nullable: false
                country_iso_code:
                  type: string
                  description: 'Optional country ISO code.'
                  example: IN
                  nullable: false
                require_ev:
                  type: boolean
                  description: 'Whether email verification is required. 1 = yes, 0 = no.'
                  example: true
                  nullable: false
                status:
                  type: boolean
                  description: 'Whether the user account should be active immediately.'
                  example: true
                  nullable: false
              required:
                - first_name
                - last_name
                - email
                - password
                - password_confirmation
                - role
      security: []
  '/api/master-panel/user/{id}':
    put:
      summary: 'Update user details.'
      operationId: updateUserDetails
      description: "This endpoint allows updating user profile information. The request must be sent in **raw JSON format**.\n\n📎 Required Headers:\n- `Authorization: Bearer {YOUR_API_TOKEN}`\n- `workspace_id: {WORKSPACE_ID}`\n- `Content-Type: application/json`"
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'User updated successfully.'
                  id: 18
                  data:
                    id: 18
                    first_name: John
                    last_name: Doe
                    full_name: 'John Doe'
                    email: john.doe27@example.com
                    phone: '+1234567890'
                    address: '123 Main St'
                    country_code: US
                    city: 'New York'
                    state: NY
                    country: USA
                    zip: '10001'
                    dob: null
                    doj: null
                    role: admin
                    status: true
                    email_verified: true
                    photo_url: 'http://localhost:8000/storage/photos/no-image.jpg'
                    created_at: '2025-06-10 10:00:16'
                    updated_at: '2025-06-11 06:41:43'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'User updated successfully.'
                  id:
                    type: integer
                    example: 18
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 18
                      first_name:
                        type: string
                        example: John
                      last_name:
                        type: string
                        example: Doe
                      full_name:
                        type: string
                        example: 'John Doe'
                      email:
                        type: string
                        example: john.doe27@example.com
                      phone:
                        type: string
                        example: '+1234567890'
                      address:
                        type: string
                        example: '123 Main St'
                      country_code:
                        type: string
                        example: US
                      city:
                        type: string
                        example: 'New York'
                      state:
                        type: string
                        example: NY
                      country:
                        type: string
                        example: USA
                      zip:
                        type: string
                        example: '10001'
                      dob:
                        type: string
                        example: null
                      doj:
                        type: string
                        example: null
                      role:
                        type: string
                        example: admin
                      status:
                        type: boolean
                        example: true
                      email_verified:
                        type: boolean
                        example: true
                      photo_url:
                        type: string
                        example: 'http://localhost:8000/storage/photos/no-image.jpg'
                      created_at:
                        type: string
                        example: '2025-06-10 10:00:16'
                      updated_at:
                        type: string
                        example: '2025-06-11 06:41:43'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'The given data was invalid.'
                  errors:
                    first_name:
                      - 'The first name field is required.'
                    password:
                      - 'The password must be at least 6 characters.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      first_name:
                        type: array
                        example:
                          - 'The first name field is required.'
                        items:
                          type: string
                      password:
                        type: array
                        example:
                          - 'The password must be at least 6 characters.'
                        items:
                          type: string
      tags:
        - 'User Managemant'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                first_name:
                  type: string
                  description: "The user's first name."
                  example: John
                  nullable: false
                last_name:
                  type: string
                  description: "The user's last name."
                  example: Doe
                  nullable: false
                phone:
                  type: string
                  description: "nullable The user's phone number."
                  example: '+1234567890'
                  nullable: false
                country_code:
                  type: string
                  description: 'nullable Country calling code.'
                  example: US
                  nullable: false
                address:
                  type: string
                  description: 'nullable Street address.'
                  example: '123 Main St'
                  nullable: false
                city:
                  type: string
                  description: 'nullable City name.'
                  example: 'New York'
                  nullable: false
                state:
                  type: string
                  description: 'nullable State name.'
                  example: NY
                  nullable: false
                country:
                  type: string
                  description: 'nullable Country name.'
                  example: USA
                  nullable: false
                zip:
                  type: string
                  description: 'nullable Zip or postal code.'
                  example: '10001'
                  nullable: false
                dob:
                  type: date
                  description: 'nullable Date of birth (Y-m-d).'
                  example: '1990-01-01'
                  nullable: false
                doj:
                  type: date
                  description: 'nullable Date of joining (Y-m-d).'
                  example: '2020-01-01'
                  nullable: false
                password:
                  type: string
                  description: 'nullable Minimum 6 characters to change password.'
                  example: newsecret
                  nullable: false
                password_confirmation:
                  type: string
                  description: 'required_with:password Must match the password.'
                  example: newsecret
                  nullable: false
                country_iso_code:
                  type: string
                  description: 'nullable ISO country code.'
                  example: US
                  nullable: false
                status:
                  type: boolean
                  description: 'nullable Whether the user is active.'
                  example: true
                  nullable: false
                role:
                  type: string
                  description: 'nullable Role to assign (not for admins).'
                  example: admin
                  nullable: false
              required:
                - first_name
                - last_name
    delete:
      summary: 'Delete a user'
      operationId: deleteAUser
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'User deleted successfully.'
                  id: '6'
                  title: 'John Doe'
                  data: []
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'User deleted successfully.'
                  id:
                    type: string
                    example: '6'
                  title:
                    type: string
                    example: 'John Doe'
                  data:
                    type: array
                    example: []
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'No query results for model [App\Models\User] 999'
                properties:
                  message:
                    type: string
                    example: 'No query results for model [App\Models\User] 999'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Failed to delete User due to internal server error.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Failed to delete User due to internal server error.'
      tags:
        - 'User Managemant'
      security: []
    get:
      summary: 'Get users list or specific user'
      operationId: getUsersListOrSpecificUser
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'optional Filter users by name, email, or phone.'
          example: John
          required: false
          schema:
            type: string
            description: 'optional Filter users by name, email, or phone.'
            example: John
            nullable: false
        -
          in: query
          name: sort
          description: 'optional Field to sort by. Default is `id`.'
          example: first_name
          required: false
          schema:
            type: string
            description: 'optional Field to sort by. Default is `id`.'
            example: first_name
            nullable: false
        -
          in: query
          name: order
          description: 'optional Sort order: `ASC` or `DESC`. Default is `DESC`.'
          example: ASC
          required: false
          schema:
            type: string
            description: 'optional Sort order: `ASC` or `DESC`. Default is `DESC`.'
            example: ASC
            nullable: false
        -
          in: query
          name: status
          description: 'optional Filter users by status (1 for active, 0 for inactive).'
          example: 1
          required: false
          schema:
            type: integer
            description: 'optional Filter users by status (1 for active, 0 for inactive).'
            example: 1
            nullable: false
        -
          in: query
          name: role_ids
          description: 'optional Filter users by one or more role IDs.'
          example:
            - 1
            - 2
          required: false
          schema:
            type: array
            description: 'optional Filter users by one or more role IDs.'
            example:
              - 1
              - 2
            items:
              type: string
        -
          in: query
          name: type
          description: 'optional Source of user relation (`project` or `task`).'
          example: project
          required: false
          schema:
            type: string
            description: 'optional Source of user relation (`project` or `task`).'
            example: project
            nullable: false
        -
          in: query
          name: typeId
          description: 'optional ID of the related project or task. Required if `type` is provided.'
          example: 3
          required: false
          schema:
            type: integer
            description: 'optional ID of the related project or task. Required if `type` is provided.'
            example: 3
            nullable: false
        -
          in: query
          name: limit
          description: 'optional Number of results per page.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'optional Number of results per page.'
            example: 10
            nullable: false
        -
          in: query
          name: isApi
          description: 'optional Indicates API context (used internally). Default: true.'
          example: true
          required: false
          schema:
            type: boolean
            description: 'optional Indicates API context (used internally). Default: true.'
            example: true
            nullable: false
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Users retrieved successfully'
                  total: 2
                  data:
                    -
                      id: 1
                      first_name: John
                      last_name: Doe
                      email: john@example.com
                      phone: '+91 9876543210'
                      status: 1
                      created_at: '2024-01-01 10:00:00'
                      updated_at: '2024-06-01 09:00:00'
                      role: Admin
                      profile: ...
                      assigned: ...
                      actions: ...
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Users retrieved successfully'
                  total:
                    type: integer
                    example: 2
                  data:
                    type: array
                    example:
                      -
                        id: 1
                        first_name: John
                        last_name: Doe
                        email: john@example.com
                        phone: '+91 9876543210'
                        status: 1
                        created_at: '2024-01-01 10:00:00'
                        updated_at: '2024-06-01 09:00:00'
                        role: Admin
                        profile: ...
                        assigned: ...
                        actions: ...
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        first_name:
                          type: string
                          example: John
                        last_name:
                          type: string
                          example: Doe
                        email:
                          type: string
                          example: john@example.com
                        phone:
                          type: string
                          example: '+91 9876543210'
                        status:
                          type: integer
                          example: 1
                        created_at:
                          type: string
                          example: '2024-01-01 10:00:00'
                        updated_at:
                          type: string
                          example: '2024-06-01 09:00:00'
                        role:
                          type: string
                          example: Admin
                        profile:
                          type: string
                          example: ...
                        assigned:
                          type: string
                          example: ...
                        actions:
                          type: string
                          example: ...
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'User not found'
                  data: []
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'User not found'
                  data:
                    type: array
                    example: []
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Exception message'
                  message: 'Failed to retrieve users'
                properties:
                  error:
                    type: string
                    example: 'Exception message'
                  message:
                    type: string
                    example: 'Failed to retrieve users'
      tags:
        - 'User Managemant'
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the user to update.'
        example: 18
        required: true
        schema:
          type: integer
  /api/master-panel/workspace:
    post:
      summary: 'Create a new workspace'
      operationId: createANewWorkspace
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Workspace created successfully.'
                  id: 438
                  data:
                    id: 438
                    title: 'Design Team'
                    is_primary: true
                    users:
                      -
                        id: 7
                        first_name: Madhavan
                        last_name: Vaidya
                        photo: 'https://yourdomain.com/storage/photos/user.png'
                    clients:
                      -
                        id: 103
                        first_name: Test
                        last_name: Test
                        photo: 'https://yourdomain.com/storage/photos/no-image.jpg'
                    created_at: '07-08-2024 14:38:51'
                    updated_at: '07-08-2024 14:38:51'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Workspace created successfully.'
                  id:
                    type: integer
                    example: 438
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 438
                      title:
                        type: string
                        example: 'Design Team'
                      is_primary:
                        type: boolean
                        example: true
                      users:
                        type: array
                        example:
                          -
                            id: 7
                            first_name: Madhavan
                            last_name: Vaidya
                            photo: 'https://yourdomain.com/storage/photos/user.png'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 7
                            first_name:
                              type: string
                              example: Madhavan
                            last_name:
                              type: string
                              example: Vaidya
                            photo:
                              type: string
                              example: 'https://yourdomain.com/storage/photos/user.png'
                      clients:
                        type: array
                        example:
                          -
                            id: 103
                            first_name: Test
                            last_name: Test
                            photo: 'https://yourdomain.com/storage/photos/no-image.jpg'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 103
                            first_name:
                              type: string
                              example: Test
                            last_name:
                              type: string
                              example: Test
                            photo:
                              type: string
                              example: 'https://yourdomain.com/storage/photos/no-image.jpg'
                      created_at:
                        type: string
                        example: '07-08-2024 14:38:51'
                      updated_at:
                        type: string
                        example: '07-08-2024 14:38:51'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    title:
                      - 'The title field is required.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
      tags:
        - 'Workspace Managemant'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'The name of the workspace.'
                  example: 'Design Team'
                  nullable: false
                user_ids:
                  type: array
                  description: 'List of user IDs to attach to the workspace.'
                  example:
                    - 3
                    - 5
                  items:
                    type: string
                client_ids:
                  type: array
                  description: 'List of client IDs to attach to the workspace.'
                  example:
                    - 101
                    - 102
                  items:
                    type: string
                primaryWorkspace:
                  type: boolean
                  description: 'Indicates if this workspace should be set as the primary workspace.'
                  example: true
                  nullable: false
                isApi:
                  type: boolean
                  description: 'Optional flag to return API-formatted response.'
                  example: true
                  nullable: false
              required:
                - title
      security: []
  '/api/master-panel/workspace/{id}':
    put:
      summary: 'Update an existing workspace'
      operationId: updateAnExistingWorkspace
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  id: 12
                  message: 'Workspace updated successfully.'
                  data:
                    id: 12
                    title: 'Design Team'
                    is_primary: true
                    users:
                      -
                        id: 3
                        first_name: Alice
                        last_name: Doe
                        photo: 'https://example.com/photos/user3.jpg'
                    clients:
                      -
                        id: 101
                        first_name: Bob
                        last_name: Client
                        photo: 'https://example.com/photos/client101.jpg'
                    created_at: '07-08-2024 14:38:51'
                    updated_at: '07-08-2024 15:10:02'
                properties:
                  error:
                    type: boolean
                    example: false
                  id:
                    type: integer
                    example: 12
                  message:
                    type: string
                    example: 'Workspace updated successfully.'
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 12
                      title:
                        type: string
                        example: 'Design Team'
                      is_primary:
                        type: boolean
                        example: true
                      users:
                        type: array
                        example:
                          -
                            id: 3
                            first_name: Alice
                            last_name: Doe
                            photo: 'https://example.com/photos/user3.jpg'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 3
                            first_name:
                              type: string
                              example: Alice
                            last_name:
                              type: string
                              example: Doe
                            photo:
                              type: string
                              example: 'https://example.com/photos/user3.jpg'
                      clients:
                        type: array
                        example:
                          -
                            id: 101
                            first_name: Bob
                            last_name: Client
                            photo: 'https://example.com/photos/client101.jpg'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 101
                            first_name:
                              type: string
                              example: Bob
                            last_name:
                              type: string
                              example: Client
                            photo:
                              type: string
                              example: 'https://example.com/photos/client101.jpg'
                      created_at:
                        type: string
                        example: '07-08-2024 14:38:51'
                      updated_at:
                        type: string
                        example: '07-08-2024 15:10:02'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Validation failed.'
                  errors:
                    title:
                      - 'The title field is required.'
                    id:
                      - 'The selected id is invalid.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Validation failed.'
                  errors:
                    type: object
                    properties:
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
                      id:
                        type: array
                        example:
                          - 'The selected id is invalid.'
                        items:
                          type: string
      tags:
        - 'Workspace Managemant'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the workspace.'
                  example: 12
                  nullable: false
                title:
                  type: string
                  description: 'The updated title of the workspace.'
                  example: 'Design Team'
                  nullable: false
                user_ids:
                  type: array
                  description: 'optional List of user IDs to associate with the workspace.'
                  example:
                    - 1
                    - 3
                  items:
                    type: string
                client_ids:
                  type: array
                  description: 'optional List of client IDs to associate with the workspace.'
                  example:
                    - 101
                    - 104
                  items:
                    type: string
                primaryWorkspace:
                  type: boolean
                  description: 'optional Whether this workspace is set as the primary one.'
                  example: true
                  nullable: false
              required:
                - id
                - title
      security: []
    delete:
      summary: 'Delete a workspace'
      operationId: deleteAWorkspace
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Workspace deleted successfully.'
                  id: '3'
                  title: 'Design Team Workspace'
                  data: []
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Workspace deleted successfully.'
                  id:
                    type: string
                    example: '3'
                  title:
                    type: string
                    example: 'Design Team Workspace'
                  data:
                    type: array
                    example: []
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Cannot delete the currently active workspace.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Cannot delete the currently active workspace.'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Workspace not found or already deleted.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Workspace not found or already deleted.'
      tags:
        - 'Workspace Managemant'
      security: []
    get:
      summary: 'Get a list of workspaces or a specific workspace.'
      operationId: getAListOfWorkspacesOrASpecificWorkspace
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'optional Search by workspace title or ID.'
          example: first
          required: false
          schema:
            type: string
            description: 'optional Search by workspace title or ID.'
            example: first
            nullable: false
        -
          in: query
          name: sort
          description: 'optional Column to sort by. Default is "id".'
          example: title
          required: false
          schema:
            type: string
            description: 'optional Column to sort by. Default is "id".'
            example: title
            nullable: false
        -
          in: query
          name: order
          description: 'optional Sort direction ("ASC" or "DESC"). Default is "DESC".'
          example: ASC
          required: false
          schema:
            type: string
            description: 'optional Sort direction ("ASC" or "DESC"). Default is "DESC".'
            example: ASC
            nullable: false
        -
          in: query
          name: limit
          description: 'optional Number of results per page. Default is 10.'
          example: 20
          required: false
          schema:
            type: integer
            description: 'optional Number of results per page. Default is 10.'
            example: 20
            nullable: false
        -
          in: query
          name: isApi
          description: 'optional Set true if called from API. Default is true.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'optional Set true if called from API. Default is true.'
            example: false
            nullable: false
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Workspaces retrieved successfully.'
                  total: 2
                  data:
                    -
                      id: 1
                      title: 'Marketing Team'
                      is_primary: true
                      users:
                        -
                          id: 2
                          first_name: Jane
                          last_name: Doe
                          photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                      clients:
                        -
                          id: 5
                          first_name: Client
                          last_name: One
                          photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                      created_at: '2025-05-19 09:53:37'
                      updated_at: '2025-06-05 11:35:18'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Workspaces retrieved successfully.'
                  total:
                    type: integer
                    example: 2
                  data:
                    type: array
                    example:
                      -
                        id: 1
                        title: 'Marketing Team'
                        is_primary: true
                        users:
                          -
                            id: 2
                            first_name: Jane
                            last_name: Doe
                            photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                        clients:
                          -
                            id: 5
                            first_name: Client
                            last_name: One
                            photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                        created_at: '2025-05-19 09:53:37'
                        updated_at: '2025-06-05 11:35:18'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        title:
                          type: string
                          example: 'Marketing Team'
                        is_primary:
                          type: boolean
                          example: true
                        users:
                          type: array
                          example:
                            -
                              id: 2
                              first_name: Jane
                              last_name: Doe
                              photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 2
                              first_name:
                                type: string
                                example: Jane
                              last_name:
                                type: string
                                example: Doe
                              photo:
                                type: string
                                example: 'http://localhost:8000/storage/photos/no-image.jpg'
                        clients:
                          type: array
                          example:
                            -
                              id: 5
                              first_name: Client
                              last_name: One
                              photo: 'http://localhost:8000/storage/photos/no-image.jpg'
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 5
                              first_name:
                                type: string
                                example: Client
                              last_name:
                                type: string
                                example: One
                              photo:
                                type: string
                                example: 'http://localhost:8000/storage/photos/no-image.jpg'
                        created_at:
                          type: string
                          example: '2025-05-19 09:53:37'
                        updated_at:
                          type: string
                          example: '2025-06-05 11:35:18'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'No query results for model [App\Models\Workspace] 999.'
                  data: []
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'No query results for model [App\Models\Workspace] 999.'
                  data:
                    type: array
                    example: []
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Internal Server Error'
                  data: []
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Internal Server Error'
                  data:
                    type: array
                    example: []
      tags:
        - 'Workspace Managemant'
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the workspace.'
        example: consequatur
        required: true
        schema:
          type: string
  /api/master-panel/todo:
    post:
      summary: 'Create a new Todo item.'
      operationId: createANewTodoItem
      description: 'This endpoint creates a new todo item associated with the current workspace and admin.'
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Todo created successfully.'
                  data:
                    id: 1
                    title: 'Finish report'
                    priority: High
                    description: 'Complete the monthly sales report.'
                    workspace_id: 5
                    admin_id: 3
                    created_at: '2025-06-05 10:00:00'
                    updated_at: '2025-06-05 10:00:00'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Todo created successfully.'
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      title:
                        type: string
                        example: 'Finish report'
                      priority:
                        type: string
                        example: High
                      description:
                        type: string
                        example: 'Complete the monthly sales report.'
                      workspace_id:
                        type: integer
                        example: 5
                      admin_id:
                        type: integer
                        example: 3
                      created_at:
                        type: string
                        example: '2025-06-05 10:00:00'
                      updated_at:
                        type: string
                        example: '2025-06-05 10:00:00'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Workspace not found in session.'
                  data: []
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Workspace not found in session.'
                  data:
                    type: array
                    example: []
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Validation error.'
                  errors:
                    title:
                      - 'The title field is required.'
                    priority:
                      - 'The priority field is required.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Validation error.'
                  errors:
                    type: object
                    properties:
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
                      priority:
                        type: array
                        example:
                          - 'The priority field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row'
                  message: "Lead Couldn't Created."
                  line: 45
                  file: /var/www/html/app/Http/Controllers/TodoController.php
                properties:
                  error:
                    type: string
                    example: 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row'
                  message:
                    type: string
                    example: "Lead Couldn't Created."
                  line:
                    type: integer
                    example: 45
                  file:
                    type: string
                    example: /var/www/html/app/Http/Controllers/TodoController.php
      tags:
        - 'Todos Managemant'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'The title of the todo item.'
                  example: '"Finish report"'
                  nullable: false
                priority:
                  type: string
                  description: 'The priority level of the todo.'
                  example: '"High"'
                  nullable: false
                description:
                  type: string
                  description: 'nullable Optional detailed description of the todo.'
                  example: '"Complete the monthly sales report."'
                  nullable: false
              required:
                - title
                - priority
  '/api/master-panel/todo/{id}':
    put:
      summary: 'Update an existing Todo'
      operationId: updateAnExistingTodo
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Todo updated successfully.'
                  data:
                    id: 5
                    data:
                      id: 5
                      title: 'Complete Report'
                      priority: High
                      description: 'Submit final version to manager'
                      workspace_id: 2
                      admin_id: 1
                      created_at: '2025-06-05 14:45:23'
                      updated_at: '2025-06-06 10:12:45'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Todo updated successfully.'
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 5
                      data:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 5
                          title:
                            type: string
                            example: 'Complete Report'
                          priority:
                            type: string
                            example: High
                          description:
                            type: string
                            example: 'Submit final version to manager'
                          workspace_id:
                            type: integer
                            example: 2
                          admin_id:
                            type: integer
                            example: 1
                          created_at:
                            type: string
                            example: '2025-06-05 14:45:23'
                          updated_at:
                            type: string
                            example: '2025-06-06 10:12:45'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'No query results for model [App\Models\Todo] 999.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'No query results for model [App\Models\Todo] 999.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'The given data was invalid.'
                  errors:
                    title:
                      - 'The title field is required.'
                    priority:
                      - 'The priority field is required.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
                      priority:
                        type: array
                        example:
                          - 'The priority field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: "Todo couldn't be updated."
                  data:
                    error: 'Error message details...'
                    line: 45
                    file: /app/Http/Controllers/TodoController.php
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: "Todo couldn't be updated."
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                        example: 'Error message details...'
                      line:
                        type: integer
                        example: 45
                      file:
                        type: string
                        example: /app/Http/Controllers/TodoController.php
      tags:
        - 'Todos Managemant'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the Todo to update.'
                  example: 5
                  nullable: false
                title:
                  type: string
                  description: 'The updated title for the Todo.'
                  example: 'Complete Report'
                  nullable: false
                priority:
                  type: string
                  description: 'The updated priority level.'
                  example: High
                  nullable: false
                description:
                  type: string
                  description: 'The updated description for the Todo (optional).'
                  example: 'Submit final version to manager'
                  nullable: false
                isApi:
                  type: boolean
                  description: 'Whether the request is from API.'
                  example: true
                  nullable: false
              required:
                - id
                - title
                - priority
      security: []
    delete:
      summary: 'Delete a Todo'
      operationId: deleteATodo
      description: 'Deletes a specific todo item by ID.'
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Todo deleted successfully.'
                  data:
                    id: 42
                    title: 'Call client'
                    priority: High
                    description: 'Discuss contract terms'
                    created_at: '2025-06-05T12:00:00Z'
                    updated_at: '2025-06-05T14:00:00Z'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Todo deleted successfully.'
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 42
                      title:
                        type: string
                        example: 'Call client'
                      priority:
                        type: string
                        example: High
                      description:
                        type: string
                        example: 'Discuss contract terms'
                      created_at:
                        type: string
                        example: '2025-06-05T12:00:00Z'
                      updated_at:
                        type: string
                        example: '2025-06-05T14:00:00Z'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Todo not found.'
                  data: []
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Todo not found.'
                  data:
                    type: array
                    example: []
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred while deleting Todo.'
                  data:
                    error: 'SQLSTATE[23000]: Integrity constraint violation: ...'
                    line: 88
                    file: /app/Http/Controllers/TodoController.php
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred while deleting Todo.'
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                        example: 'SQLSTATE[23000]: Integrity constraint violation: ...'
                      line:
                        type: integer
                        example: 88
                      file:
                        type: string
                        example: /app/Http/Controllers/TodoController.php
      tags:
        - 'Todos Managemant'
      security: []
    get:
      summary: 'Display a listing of todos or a specific todo by ID.'
      operationId: displayAListingOfTodosOrASpecificTodoByID
      description: ''
      parameters:
        -
          in: query
          name: isApi
          description: 'Optional. Defaults to true. Set to true to receive API formatted response.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Optional. Defaults to true. Set to true to receive API formatted response.'
            example: false
            nullable: false
        -
          in: query
          name: id
          description: 'Optional. If provided, fetch a specific todo by this ID.'
          example: 17
          required: false
          schema:
            type: integer
            description: 'Optional. If provided, fetch a specific todo by this ID.'
            example: 17
            nullable: false
        -
          in: query
          name: search
          description: 'Optional. Search term to filter todos by title or description.'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Optional. Search term to filter todos by title or description.'
            example: consequatur
            nullable: false
        -
          in: query
          name: sort
          description: 'Optional. Column name to sort by. Default: id.'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Optional. Column name to sort by. Default: id.'
            example: consequatur
            nullable: false
        -
          in: query
          name: order
          description: 'Optional. Sort order: asc or desc. Default: desc.'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Optional. Sort order: asc or desc. Default: desc.'
            example: consequatur
            nullable: false
        -
          in: query
          name: limit
          description: 'Optional. Number of items per page for pagination. Default: 10.'
          example: 17
          required: false
          schema:
            type: integer
            description: 'Optional. Number of items per page for pagination. Default: 10.'
            example: 17
            nullable: false
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Todos retrieved successfully.'
                  total: 25
                  data:
                    -
                      id: 1
                      title: 'Sample Todo'
                      description: 'Description here'
                      priority: High
                      is_completed: false
                      creator:
                        id: 2
                        first_name: John
                        last_name: Doe
                      created_at: '2025-06-05 10:00:00'
                      updated_at: '2025-06-05 10:30:00'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Todos retrieved successfully.'
                  total:
                    type: integer
                    example: 25
                  data:
                    type: array
                    example:
                      -
                        id: 1
                        title: 'Sample Todo'
                        description: 'Description here'
                        priority: High
                        is_completed: false
                        creator:
                          id: 2
                          first_name: John
                          last_name: Doe
                        created_at: '2025-06-05 10:00:00'
                        updated_at: '2025-06-05 10:30:00'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        title:
                          type: string
                          example: 'Sample Todo'
                        description:
                          type: string
                          example: 'Description here'
                        priority:
                          type: string
                          example: High
                        is_completed:
                          type: boolean
                          example: false
                        creator:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 2
                            first_name:
                              type: string
                              example: John
                            last_name:
                              type: string
                              example: Doe
                        created_at:
                          type: string
                          example: '2025-06-05 10:00:00'
                        updated_at:
                          type: string
                          example: '2025-06-05 10:30:00'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Todo not found.'
                  data: []
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Todo not found.'
                  data:
                    type: array
                    example: []
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Internal Server Error'
                  data:
                    line: 123
                    file: /app/Http/Controllers/TodoController.php
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Internal Server Error'
                  data:
                    type: object
                    properties:
                      line:
                        type: integer
                        example: 123
                      file:
                        type: string
                        example: /app/Http/Controllers/TodoController.php
      tags:
        - 'Todos Managemant'
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the todo.'
        example: consequatur
        required: true
        schema:
          type: string
  /api/master-panel/meeting:
    post:
      summary: 'Create a new meeting'
      operationId: createANewMeeting
      description: 'This endpoint creates a new meeting within the current workspace. It validates the meeting date/time, ensures the creator is part of the participant list, and sends notifications to all participants.'
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: 'Meeting successfully created'
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"error\": false,\n  \"message\": \"Meeting created successfully.\",\n  \"data\": {\n    \"id\": 12,\n    \"data\": {\n      \"id\": 12,\n      \"title\": \"Project Kickoff\",\n      \"start_date_time\": \"2025-06-05 10:00:00\",\n      \"end_date_time\": \"2025-06-05 11:30:00\",\n      \"workspace_id\": 3,\n      \"admin_id\": 1,\n      ...\n    }\n  }\n}"
        400:
          description: 'Missing workspace or user context'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Missing workspace or user context.'
                  data: []
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Missing workspace or user context.'
                  data:
                    type: array
                    example: []
        422:
          description: 'Validation error'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Validation failed'
                  data:
                    title:
                      - 'The title field is required.'
                    start_date:
                      - 'The start date is required.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Validation failed'
                  data:
                    type: object
                    properties:
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
                      start_date:
                        type: array
                        example:
                          - 'The start date is required.'
                        items:
                          type: string
        500:
          description: 'Unexpected server error'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: "Meeting couldn't be created."
                  data:
                    error: 'SQLSTATE[...]: Some database error'
                    line: 102
                    file: app/Http/Controllers/MeetingController.php
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: "Meeting couldn't be created."
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                        example: 'SQLSTATE[...]: Some database error'
                      line:
                        type: integer
                        example: 102
                      file:
                        type: string
                        example: app/Http/Controllers/MeetingController.php
      tags:
        - 'Meeting Managemant'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'The title of the meeting.'
                  example: 'Project Kickoff'
                  nullable: false
                start_date:
                  type: date
                  description: 'The start date of the meeting (format: Y-m-d).'
                  example: '2025-06-05'
                  nullable: false
                end_date:
                  type: date
                  description: 'The end date of the meeting (format: Y-m-d). Must be equal to or after start_date.'
                  example: '2025-06-05'
                  nullable: false
                start_time:
                  type: string
                  description: 'The start time in 24-hour format (HH:mm).'
                  example: '10:00'
                  nullable: false
                end_time:
                  type: string
                  description: 'The end time in 24-hour format (HH:mm). Must be after start_time if on the same day.'
                  example: '11:30'
                  nullable: false
                user_ids:
                  type: array
                  description: 'Optional array of internal user IDs to be added as participants.'
                  example:
                    - 1
                    - 2
                    - 3
                  items:
                    type: string
                client_ids:
                  type: array
                  description: 'Optional array of client user IDs to be added as participants.'
                  example:
                    - 5
                    - 6
                  items:
                    type: string
              required:
                - title
                - start_date
                - end_date
                - start_time
                - end_time
  '/api/master-panel/meeting/{id}':
    get:
      summary: 'List Meetings'
      operationId: listMeetings
      description: 'Retrieve a list of all meetings or a single meeting by ID, with support for search, filters, sort, and pagination.'
      parameters:
        -
          in: query
          name: search
          description: 'Optional. Search by meeting title or ID.'
          example: 'team sync'
          required: false
          schema:
            type: string
            description: 'Optional. Search by meeting title or ID.'
            example: 'team sync'
            nullable: false
        -
          in: query
          name: sort
          description: 'Optional. Field to sort by. Default is id.'
          example: start_date_time
          required: false
          schema:
            type: string
            description: 'Optional. Field to sort by. Default is id.'
            example: start_date_time
            nullable: false
        -
          in: query
          name: order
          description: 'Optional. Sort order (ASC or DESC). Default is DESC.'
          example: ASC
          required: false
          schema:
            type: string
            description: 'Optional. Sort order (ASC or DESC). Default is DESC.'
            example: ASC
            nullable: false
        -
          in: query
          name: limit
          description: 'Optional. Number of results per page.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Optional. Number of results per page.'
            example: 10
            nullable: false
        -
          in: query
          name: status
          description: 'Optional. Filter by meeting status. Options: ongoing, yet_to_start, ended.'
          example: ongoing
          required: false
          schema:
            type: string
            description: 'Optional. Filter by meeting status. Options: ongoing, yet_to_start, ended.'
            example: ongoing
            nullable: false
        -
          in: query
          name: user_id
          description: 'Optional. Filter meetings assigned to a specific user.'
          example: 2
          required: false
          schema:
            type: integer
            description: 'Optional. Filter meetings assigned to a specific user.'
            example: 2
            nullable: false
        -
          in: query
          name: client_id
          description: 'Optional. Filter meetings assigned to a specific client.'
          example: 8
          required: false
          schema:
            type: integer
            description: 'Optional. Filter meetings assigned to a specific client.'
            example: 8
            nullable: false
        -
          in: query
          name: start_date_from
          description: 'date Optional. Start date filter from (Y-m-d).'
          example: '2025-06-01'
          required: false
          schema:
            type: string
            description: 'date Optional. Start date filter from (Y-m-d).'
            example: '2025-06-01'
            nullable: false
        -
          in: query
          name: start_date_to
          description: 'date Optional. Start date filter to (Y-m-d).'
          example: '2025-06-30'
          required: false
          schema:
            type: string
            description: 'date Optional. Start date filter to (Y-m-d).'
            example: '2025-06-30'
            nullable: false
        -
          in: query
          name: end_date_from
          description: 'date Optional. End date filter from (Y-m-d).'
          example: '2025-06-01'
          required: false
          schema:
            type: string
            description: 'date Optional. End date filter from (Y-m-d).'
            example: '2025-06-01'
            nullable: false
        -
          in: query
          name: end_date_to
          description: 'date Optional. End date filter to (Y-m-d).'
          example: '2025-06-30'
          required: false
          schema:
            type: string
            description: 'date Optional. End date filter to (Y-m-d).'
            example: '2025-06-30'
            nullable: false
        -
          in: query
          name: isApi
          description: 'Optional. Default is true. Used to enable API-formatted responses.'
          example: true
          required: false
          schema:
            type: boolean
            description: 'Optional. Default is true. Used to enable API-formatted responses.'
            example: true
            nullable: false
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: 'Meetings retrieved successfully.'
                  data:
                    total: 1
                    data:
                      -
                        id: 5
                        title: 'Client Update Meeting'
                        start_date_time: '2025-06-10 10:00:00'
                        end_date_time: '2025-06-10 11:00:00'
                        users: '<ul>...</ul>'
                        clients: '<ul>...</ul>'
                        status: Ongoing
                        created_at: '2025-06-01 09:30:00'
                        updated_at: '2025-06-01 09:45:00'
                        actions: '<a>...</a>'
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Meetings retrieved successfully.'
                  data:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 1
                      data:
                        type: array
                        example:
                          -
                            id: 5
                            title: 'Client Update Meeting'
                            start_date_time: '2025-06-10 10:00:00'
                            end_date_time: '2025-06-10 11:00:00'
                            users: '<ul>...</ul>'
                            clients: '<ul>...</ul>'
                            status: Ongoing
                            created_at: '2025-06-01 09:30:00'
                            updated_at: '2025-06-01 09:45:00'
                            actions: '<a>...</a>'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 5
                            title:
                              type: string
                              example: 'Client Update Meeting'
                            start_date_time:
                              type: string
                              example: '2025-06-10 10:00:00'
                            end_date_time:
                              type: string
                              example: '2025-06-10 11:00:00'
                            users:
                              type: string
                              example: '<ul>...</ul>'
                            clients:
                              type: string
                              example: '<ul>...</ul>'
                            status:
                              type: string
                              example: Ongoing
                            created_at:
                              type: string
                              example: '2025-06-01 09:30:00'
                            updated_at:
                              type: string
                              example: '2025-06-01 09:45:00'
                            actions:
                              type: string
                              example: '<a>...</a>'
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: true
                  message: 'Missing workspace or user context.'
                  data: []
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Missing workspace or user context.'
                  data:
                    type: array
                    example: []
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: true
                  message: 'Meeting not found.'
                  data: []
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Meeting not found.'
                  data:
                    type: array
                    example: []
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: true
                  message: 'Validation failed.'
                  data:
                    user_id:
                      - 'The selected user_id is invalid.'
                    client_id:
                      - 'The selected client_id is invalid.'
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Validation failed.'
                  data:
                    type: object
                    properties:
                      user_id:
                        type: array
                        example:
                          - 'The selected user_id is invalid.'
                        items:
                          type: string
                      client_id:
                        type: array
                        example:
                          - 'The selected client_id is invalid.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: true
                  message: 'An error occurred while retrieving meetings.'
                  data:
                    error: 'SQLSTATE[HY000]: General error...'
                    file: /app/Http/Controllers/MeetingsController.php
                    line: 75
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred while retrieving meetings.'
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                        example: 'SQLSTATE[HY000]: General error...'
                      file:
                        type: string
                        example: /app/Http/Controllers/MeetingsController.php
                      line:
                        type: integer
                        example: 75
      tags:
        - 'Meeting Managemant'
    put:
      summary: 'Update a Meeting'
      operationId: updateAMeeting
      description: 'Update the details of an existing meeting. Also supports assigning users and clients to the meeting, and notifies newly assigned participants.'
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"status\": false,\n  \"message\": \"meeting updated successfully.\",\n  \"data\": {\n    \"id\": 7,\n    \"data\": {\n      \"id\": 7,\n      \"title\": \"Project Planning\",\n      \"start_date_time\": \"2025-06-08 10:00:00\",\n      \"end_date_time\": \"2025-06-08 11:30:00\",\n      \"users\": [...],\n      \"clients\": [...],\n      ...\n    }\n  }\n}"
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: true
                  message: 'Meeting not found.'
                  data: []
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Meeting not found.'
                  data:
                    type: array
                    example: []
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: true
                  message: 'Validation failed.'
                  data:
                    title:
                      - 'The title field is required.'
                    start_date:
                      - 'The start date field is required.'
                    end_date:
                      - 'The end date must be after or equal to start date.'
                    end_time:
                      - 'End time must be after start time on the same day.'
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Validation failed.'
                  data:
                    type: object
                    properties:
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
                      start_date:
                        type: array
                        example:
                          - 'The start date field is required.'
                        items:
                          type: string
                      end_date:
                        type: array
                        example:
                          - 'The end date must be after or equal to start date.'
                        items:
                          type: string
                      end_time:
                        type: array
                        example:
                          - 'End time must be after start time on the same day.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred while updating the meeting.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred while updating the meeting.'
      tags:
        - 'Meeting Managemant'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'The title of the meeting.'
                  example: 'Project Planning'
                  nullable: false
                start_date:
                  type: date
                  description: 'Start date of the meeting (Y-m-d). Must be before or equal to end_date.'
                  example: '2025-06-08'
                  nullable: false
                end_date:
                  type: date
                  description: 'End date of the meeting (Y-m-d). Must be after or equal to start_date.'
                  example: '2025-06-08'
                  nullable: false
                start_time:
                  type: string
                  description: 'Start time in 24-hour format (H:i:s).'
                  example: '10:00:00'
                  nullable: false
                end_time:
                  type: string
                  description: 'End time in 24-hour format (H:i:s). Must be after start_time if dates are the same.'
                  example: '11:30:00'
                  nullable: false
                id:
                  type: integer
                  description: 'The ID of the meeting to update.'
                  example: 7
                  nullable: false
                user_ids:
                  type: array
                  description: 'Optional. An array of user IDs to assign to the meeting.'
                  example:
                    - 1
                    - 4
                    - 5
                  items:
                    type: string
                client_ids:
                  type: array
                  description: 'Optional. An array of client IDs to assign to the meeting.'
                  example:
                    - 2
                    - 8
                  items:
                    type: string
                isApi:
                  type: boolean
                  description: 'Optional. Use true to get a standardized API response. Default is false.'
                  example: true
                  nullable: false
              required:
                - title
                - start_date
                - end_date
                - start_time
                - end_time
                - id
    delete:
      summary: 'Delete a Meeting'
      operationId: deleteAMeeting
      description: 'This endpoint allows you to delete a meeting by its ID. Only users with proper permissions can delete meetings.'
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: 'Meeting deleted successfully.'
                  data:
                    id: 15
                    data: []
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Meeting deleted successfully.'
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 15
                      data:
                        type: array
                        example: []
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Meeting not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Meeting not found.'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred while deleting the meeting.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred while deleting the meeting.'
      tags:
        - 'Meeting Managemant'
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'Optional parameter. Optional. The ID of the meeting to retrieve.'
        required: true
        schema:
          type: integer
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: 5
  /api/master-panel/note:
    post:
      summary: 'Create a new note.'
      operationId: createANewNote
      description: "This endpoint allows you to create a new note of type `text` or `drawing`. If the note type is `drawing`,\nyou must provide valid `drawing_data` in base64-encoded SVG format. The note is associated with the current\nworkspace and the authenticated user (either client or user)."
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"error\": false,\n  \"message\": \"Note created successfully.\",\n  \"data\": {\n    \"id\": 12,\n    \"data\": {\n      \"id\": 12,\n      \"title\": \"Project Kickoff Notes\",\n      \"note_type\": \"text\",\n      \"color\": \"#ffcc00\",\n      \"description\": \"Discussed project milestones and timelines.\",\n      \"creator_id\": \"u_1\",\n      \"workspace_id\": 3,\n      ...\n    }\n  }\n}"
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'The given data was invalid.'
                  errors:
                    note_type:
                      - 'The note type field is required.'
                    title:
                      - 'The title field is required.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      note_type:
                        type: array
                        example:
                          - 'The note type field is required.'
                        items:
                          type: string
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred while creating the note.'
                  data:
                    error: 'Exception message here'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred while creating the note.'
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                        example: 'Exception message here'
      tags:
        - 'note Managemant'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                note_type:
                  type: string
                  description: 'The type of note. Must be either `text` or `drawing`.'
                  example: text
                  nullable: false
                title:
                  type: string
                  description: 'The title of the note.'
                  example: 'Project Kickoff Notes'
                  nullable: false
                color:
                  type: string
                  description: 'Color code or name for the note.'
                  example: '#ffcc00'
                  nullable: false
                description:
                  type: string
                  description: 'The description or body content of the note (required for text notes).'
                  example: 'Discussed project milestones and timelines.'
                  nullable: false
                drawing_data:
                  type: string
                  description: 'The base64-encoded SVG content (required if note_type is `drawing`).'
                  example: PHN2ZyB...
                  nullable: false
              required:
                - note_type
                - title
                - color
      security: []
  '/api/master-panel/note/{id}':
    put:
      summary: 'Update an existing note.'
      operationId: updateAnExistingNote
      description: "Updates the note identified by `id` with the provided data.\nSupports notes of type `text` or `drawing`. For `drawing` type,\nthe `drawing_data` must be a base64-encoded string, which will be decoded."
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n   \"error\": false,\n   \"message\": \"Note updated successfully.\",\n   \"data\": {\n      \"id\": 12,\n      \"data\": {\n         \"id\": 12,\n         \"note_type\": \"text\",\n         \"title\": \"Meeting notes\",\n         \"color\": \"#FF5733\",\n         \"description\": \"Detailed notes from the meeting\",\n         \"drawing_data\": null,\n         // ... other formatted note fields\n      }\n   }\n}"
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'The given data was invalid.'
                  errors:
                    title:
                      - 'The title field is required.'
                    note_type:
                      - 'The selected note type is invalid.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
                      note_type:
                        type: array
                        example:
                          - 'The selected note type is invalid.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Detailed error message here'
                  message: 'An error occurred while updating the note.'
                properties:
                  error:
                    type: string
                    example: 'Detailed error message here'
                  message:
                    type: string
                    example: 'An error occurred while updating the note.'
      tags:
        - 'note Managemant'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the note to update.'
                  example: 12
                  nullable: false
                note_type:
                  type: string
                  description: 'The type of note, either `text` or `drawing`.'
                  example: text
                  nullable: false
                title:
                  type: string
                  description: 'The title of the note.'
                  example: 'Meeting notes'
                  nullable: false
                color:
                  type: string
                  description: 'The color associated with the note.'
                  example: '#FF5733'
                  nullable: false
                description:
                  type: string
                  description: 'nullable Optional description for the note.'
                  example: 'Detailed notes from the meeting'
                  nullable: false
                drawing_data:
                  type: string
                  description: 'required_if:note_type,drawing Base64-encoded SVG data for drawing notes.'
                  example: consequatur
                  nullable: false
              required:
                - id
                - note_type
                - title
                - color
      security: []
    delete:
      summary: 'Delete a Note'
      operationId: deleteANote
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: 'Note deleted successfully.'
                  data:
                    id: 7
                    title: 'Project Kickoff Notes'
                    content: 'Initial project meeting details...'
                    user_id: 3
                    workspace_id: 2
                    created_at: '2024-05-24T08:12:54.000000Z'
                    updated_at: '2024-06-01T10:20:41.000000Z'
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Note deleted successfully.'
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 7
                      title:
                        type: string
                        example: 'Project Kickoff Notes'
                      content:
                        type: string
                        example: 'Initial project meeting details...'
                      user_id:
                        type: integer
                        example: 3
                      workspace_id:
                        type: integer
                        example: 2
                      created_at:
                        type: string
                        example: '2024-05-24T08:12:54.000000Z'
                      updated_at:
                        type: string
                        example: '2024-06-01T10:20:41.000000Z'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: false
                  message: 'No query results for model [App\Models\Note] 99'
                  data: []
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'No query results for model [App\Models\Note] 99'
                  data:
                    type: array
                    example: []
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: false
                  message: 'Something went wrong while deleting the note.'
                  data: []
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Something went wrong while deleting the note.'
                  data:
                    type: array
                    example: []
      tags:
        - 'note Managemant'
      security: []
    get:
      summary: "Get All Notes or a Specific Note\n\nThis endpoint retrieves either:\n- A list of all notes (if no ID is provided), or\n- A single note by its ID (if provided).\n\nNotes are filtered by the current workspace and admin context."
      operationId: getAllNotesOrASpecificNoteThisEndpointRetrievesEitherAListOfAllNotesifNoIDIsProvidedOrASingleNoteByItsIDifProvidedNotesAreFilteredByTheCurrentWorkspaceAndAdminContext
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: ''
                    type: object
                    example:
                      success: true
                      message: 'Notes retrieved successfully.'
                      data:
                        total: 2
                        data:
                          -
                            id: 1
                            title: 'Sprint Planning'
                            note_type: text
                            color: '#ffffff'
                            workspace_id: 1
                            admin_id: 1
                            creator_id: u_3
                            created_at: '2025-06-01T12:00:00.000000Z'
                            updated_at: '2025-06-01T12:30:00.000000Z'
                          -
                            id: 2
                            title: 'UI Wireframe'
                            note_type: drawing
                            color: '#000000'
                            workspace_id: 1
                            admin_id: 1
                            creator_id: u_3
                            created_at: '2025-06-02T08:45:00.000000Z'
                            updated_at: '2025-06-02T09:15:00.000000Z'
                    properties:
                      success:
                        type: boolean
                        example: true
                      message:
                        type: string
                        example: 'Notes retrieved successfully.'
                      data:
                        type: object
                        properties:
                          total:
                            type: integer
                            example: 2
                          data:
                            type: array
                            example:
                              -
                                id: 1
                                title: 'Sprint Planning'
                                note_type: text
                                color: '#ffffff'
                                workspace_id: 1
                                admin_id: 1
                                creator_id: u_3
                                created_at: '2025-06-01T12:00:00.000000Z'
                                updated_at: '2025-06-01T12:30:00.000000Z'
                              -
                                id: 2
                                title: 'UI Wireframe'
                                note_type: drawing
                                color: '#000000'
                                workspace_id: 1
                                admin_id: 1
                                creator_id: u_3
                                created_at: '2025-06-02T08:45:00.000000Z'
                                updated_at: '2025-06-02T09:15:00.000000Z'
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type: string
                                  example: 'Sprint Planning'
                                note_type:
                                  type: string
                                  example: text
                                color:
                                  type: string
                                  example: '#ffffff'
                                workspace_id:
                                  type: integer
                                  example: 1
                                admin_id:
                                  type: integer
                                  example: 1
                                creator_id:
                                  type: string
                                  example: u_3
                                created_at:
                                  type: string
                                  example: '2025-06-01T12:00:00.000000Z'
                                updated_at:
                                  type: string
                                  example: '2025-06-01T12:30:00.000000Z'
                  -
                    description: ''
                    type: object
                    example:
                      success: true
                      message: 'Note retrieved successfully.'
                      data:
                        total: 1
                        data:
                          -
                            id: 3
                            title: 'Design Plan'
                            note_type: drawing
                            color: '#ffdd00'
                            workspace_id: 1
                            admin_id: 1
                            creator_id: u_5
                            created_at: '2025-06-03T10:00:00.000000Z'
                            updated_at: '2025-06-03T10:30:00.000000Z'
                    properties:
                      success:
                        type: boolean
                        example: true
                      message:
                        type: string
                        example: 'Note retrieved successfully.'
                      data:
                        type: object
                        properties:
                          total:
                            type: integer
                            example: 1
                          data:
                            type: array
                            example:
                              -
                                id: 3
                                title: 'Design Plan'
                                note_type: drawing
                                color: '#ffdd00'
                                workspace_id: 1
                                admin_id: 1
                                creator_id: u_5
                                created_at: '2025-06-03T10:00:00.000000Z'
                                updated_at: '2025-06-03T10:30:00.000000Z'
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 3
                                title:
                                  type: string
                                  example: 'Design Plan'
                                note_type:
                                  type: string
                                  example: drawing
                                color:
                                  type: string
                                  example: '#ffdd00'
                                workspace_id:
                                  type: integer
                                  example: 1
                                admin_id:
                                  type: integer
                                  example: 1
                                creator_id:
                                  type: string
                                  example: u_5
                                created_at:
                                  type: string
                                  example: '2025-06-03T10:00:00.000000Z'
                                updated_at:
                                  type: string
                                  example: '2025-06-03T10:30:00.000000Z'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: false
                  message: 'Note not found.'
                  data: []
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Note not found.'
                  data:
                    type: array
                    example: []
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: false
                  message: 'Failed to retrieve notes.'
                  data:
                    error: "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'notes' doesn't exist"
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Failed to retrieve notes.'
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                        example: "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'notes' doesn't exist"
      tags:
        - 'note Managemant'
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the note.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/master-panel/activity-log/{id}':
    get:
      summary: 'Get a list of activity logs or a single activity log by ID.'
      operationId: getAListOfActivityLogsOrASingleActivityLogByID
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Search term for activity logs.'
          example: login
          required: false
          schema:
            type: string
            description: 'Search term for activity logs.'
            example: login
            nullable: false
        -
          in: query
          name: sort
          description: 'Field to sort by. Default: id.'
          example: created_at
          required: false
          schema:
            type: string
            description: 'Field to sort by. Default: id.'
            example: created_at
            nullable: false
        -
          in: query
          name: order
          description: 'Sort order (ASC or DESC). Default: DESC.'
          example: ASC
          required: false
          schema:
            type: string
            description: 'Sort order (ASC or DESC). Default: DESC.'
            example: ASC
            nullable: false
        -
          in: query
          name: date_from
          description: 'Filter by start date (Y-m-d).'
          example: '2024-01-01'
          required: false
          schema:
            type: string
            description: 'Filter by start date (Y-m-d).'
            example: '2024-01-01'
            nullable: false
        -
          in: query
          name: date_to
          description: 'Filter by end date (Y-m-d).'
          example: '2024-01-31'
          required: false
          schema:
            type: string
            description: 'Filter by end date (Y-m-d).'
            example: '2024-01-31'
            nullable: false
        -
          in: query
          name: user_ids
          description: 'Filter by user IDs.'
          example:
            - 1
            - 2
          required: false
          schema:
            type: array
            description: 'Filter by user IDs.'
            example:
              - 1
              - 2
            items:
              type: string
        -
          in: query
          name: client_ids
          description: 'Filter by client IDs.'
          example:
            - 3
            - 4
          required: false
          schema:
            type: array
            description: 'Filter by client IDs.'
            example:
              - 3
              - 4
            items:
              type: string
        -
          in: query
          name: activities
          description: 'Filter by activity types.'
          example:
            - created
            - updated
          required: false
          schema:
            type: array
            description: 'Filter by activity types.'
            example:
              - created
              - updated
            items:
              type: string
        -
          in: query
          name: types
          description: 'Filter by log types.'
          example:
            - task
            - project
          required: false
          schema:
            type: array
            description: 'Filter by log types.'
            example:
              - task
              - project
            items:
              type: string
        -
          in: query
          name: type
          description: 'Filter by a specific type.'
          example: task
          required: false
          schema:
            type: string
            description: 'Filter by a specific type.'
            example: task
            nullable: false
        -
          in: query
          name: type_id
          description: 'Filter by a specific type ID.'
          example: 5
          required: false
          schema:
            type: integer
            description: 'Filter by a specific type ID.'
            example: 5
            nullable: false
        -
          in: query
          name: offset
          description: 'Pagination offset. Default: 0.'
          example: 0
          required: false
          schema:
            type: integer
            description: 'Pagination offset. Default: 0.'
            example: 0
            nullable: false
        -
          in: query
          name: limit
          description: 'Pagination limit. Default: 10.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Pagination limit. Default: 10.'
            example: 10
            nullable: false
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Activity logs retrieved successfully'
                  data:
                    -
                      id: 1
                      actor_id: 2
                      actor_name: 'John Doe'
                      actor_type: User
                      type_id: 3
                      parent_type_id: 4
                      type: Task
                      parent_type: Project
                      type_title: 'Task Title'
                      parent_type_title: 'Project Title'
                      activity: Created
                      message: 'Task created successfully.'
                      created_at: '2024-01-01 12:00:00'
                      updated_at: '2024-01-01 12:00:00'
                      actions: '-'
                  total: 1
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Activity logs retrieved successfully'
                  data:
                    type: array
                    example:
                      -
                        id: 1
                        actor_id: 2
                        actor_name: 'John Doe'
                        actor_type: User
                        type_id: 3
                        parent_type_id: 4
                        type: Task
                        parent_type: Project
                        type_title: 'Task Title'
                        parent_type_title: 'Project Title'
                        activity: Created
                        message: 'Task created successfully.'
                        created_at: '2024-01-01 12:00:00'
                        updated_at: '2024-01-01 12:00:00'
                        actions: '-'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        actor_id:
                          type: integer
                          example: 2
                        actor_name:
                          type: string
                          example: 'John Doe'
                        actor_type:
                          type: string
                          example: User
                        type_id:
                          type: integer
                          example: 3
                        parent_type_id:
                          type: integer
                          example: 4
                        type:
                          type: string
                          example: Task
                        parent_type:
                          type: string
                          example: Project
                        type_title:
                          type: string
                          example: 'Task Title'
                        parent_type_title:
                          type: string
                          example: 'Project Title'
                        activity:
                          type: string
                          example: Created
                        message:
                          type: string
                          example: 'Task created successfully.'
                        created_at:
                          type: string
                          example: '2024-01-01 12:00:00'
                        updated_at:
                          type: string
                          example: '2024-01-01 12:00:00'
                        actions:
                          type: string
                          example: '-'
                  total:
                    type: integer
                    example: 1
      tags:
        - Activitylog
      security: []
    delete:
      summary: 'Delete an activity log record by ID.'
      operationId: deleteAnActivityLogRecordByID
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Record deleted successfully.'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Record deleted successfully.'
      tags:
        - Activitylog
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'Optional parameter. optional The ID of the activity log to retrieve.'
        required: true
        schema:
          type: integer
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: 1
  '/api/master-panel/notification/{id}':
    get:
      summary: 'List notifications (API)'
      operationId: listNotificationsAPI
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term.'
          example: project
          required: false
          schema:
            type: string
            description: 'Optional search term.'
            example: project
            nullable: false
        -
          in: query
          name: sort
          description: 'Field to sort by. Default: id.'
          example: id
          required: false
          schema:
            type: string
            description: 'Field to sort by. Default: id.'
            example: id
            nullable: false
        -
          in: query
          name: order
          description: 'Sort order (ASC|DESC). Default: DESC.'
          example: DESC
          required: false
          schema:
            type: string
            description: 'Sort order (ASC|DESC). Default: DESC.'
            example: DESC
            nullable: false
        -
          in: query
          name: status
          description: 'Filter by read/unread.'
          example: unread
          required: false
          schema:
            type: string
            description: 'Filter by read/unread.'
            example: unread
            nullable: false
        -
          in: query
          name: type
          description: 'Filter by notification type.'
          example: project
          required: false
          schema:
            type: string
            description: 'Filter by notification type.'
            example: project
            nullable: false
        -
          in: query
          name: user_id
          description: 'Filter by user ID (admin only).'
          example: 1
          required: false
          schema:
            type: integer
            description: 'Filter by user ID (admin only).'
            example: 1
            nullable: false
        -
          in: query
          name: client_id
          description: 'Filter by client ID (admin only).'
          example: 2
          required: false
          schema:
            type: integer
            description: 'Filter by client ID (admin only).'
            example: 2
            nullable: false
        -
          in: query
          name: limit
          description: 'Results per page.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Results per page.'
            example: 10
            nullable: false
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  rows:
                    -
                      id: 1
                      title: Title
                      users: []
                      clients: []
                      type_id: 1
                      message: 'Message text'
                      type: Project
                      read_at: '2024-06-27 10:00:00'
                      created_at: '2024-06-27 10:00:00'
                      updated_at: '2024-06-27 10:00:00'
                  total: 1
                properties:
                  rows:
                    type: array
                    example:
                      -
                        id: 1
                        title: Title
                        users: []
                        clients: []
                        type_id: 1
                        message: 'Message text'
                        type: Project
                        read_at: '2024-06-27 10:00:00'
                        created_at: '2024-06-27 10:00:00'
                        updated_at: '2024-06-27 10:00:00'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        title:
                          type: string
                          example: Title
                        users:
                          type: array
                          example: []
                        clients:
                          type: array
                          example: []
                        type_id:
                          type: integer
                          example: 1
                        message:
                          type: string
                          example: 'Message text'
                        type:
                          type: string
                          example: Project
                        read_at:
                          type: string
                          example: '2024-06-27 10:00:00'
                        created_at:
                          type: string
                          example: '2024-06-27 10:00:00'
                        updated_at:
                          type: string
                          example: '2024-06-27 10:00:00'
                  total:
                    type: integer
                    example: 1
      tags:
        - Notifications
      security: []
    delete:
      summary: 'Remove the specified notification.'
      operationId: removeTheSpecifiedNotification
      description: 'This endpoint deletes a notification based on the provided ID. The user must be authenticated to perform this action.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: ''
                    type: object
                    example:
                      error: false
                      message: 'Notification deleted successfully.'
                      data: []
                    properties:
                      error:
                        type: boolean
                        example: false
                      message:
                        type: string
                        example: 'Notification deleted successfully.'
                      data:
                        type: array
                        example: []
                  -
                    description: ''
                    type: object
                    example:
                      error: true
                      message: 'Notification not found.'
                      data: []
                    properties:
                      error:
                        type: boolean
                        example: true
                      message:
                        type: string
                        example: 'Notification not found.'
                      data:
                        type: array
                        example: []
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred while deleting the notification.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred while deleting the notification.'
      tags:
        - Notifications
    parameters:
      -
        in: path
        name: id
        description: 'Optional parameter. The ID of the .'
        required: true
        schema:
          type: string
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: consequatur
  '/api/master-panel/notifications/mark-as-read/{id}':
    patch:
      summary: 'Mark all notifications as read (API)'
      operationId: markAllNotificationsAsReadAPI
      description: 'Marks all notifications for the authenticated user as read and returns the updated notifications using the formatNotification helper.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"error\": false,\n  \"message\": \"All notifications marked as read.\",\n  \"data\": [\n    { \"id\": 1, \"title\": \"...\", ...notification fields... }\n  ]\n}"
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: Unauthenticated.
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Unauthenticated.
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred while marking notifications as read.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred while marking notifications as read.'
      tags:
        - Notifications
    parameters:
      -
        in: path
        name: id
        description: 'Optional parameter. The ID of the .'
        required: true
        schema:
          type: string
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: consequatur
  '/api/master-panel/contracts/{id}':
    get:
      summary: ''
      operationId: getApiMasterPanelContractsId
      description: ''
      parameters:
        -
          in: query
          name: id
          description: 'Optional. The ID of the contract to fetch.'
          example: 17
          required: false
          schema:
            type: integer
            description: 'Optional. The ID of the contract to fetch.'
            example: 17
            nullable: false
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"message\": \"Contracts fetched successfully.\",\n  \"data\": [\n    {\n      \"id\": 1,\n      \"title\": \"Sample Contract\",\n      \"value\": \"1000.00\",\n      \"start_date\": \"2024-01-01\",\n      \"end_date\": \"2024-12-31\",\n      ...\n    }\n  ]\n}"
      tags:
        - Contracts
      security: []
    put:
      summary: ''
      operationId: putApiMasterPanelContractsId
      description: ''
      parameters:
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"message\": \"Contract updated successfully.\",\n  \"data\": {\n    \"id\": 1,\n    \"title\": \"Updated Contract\",\n    ...\n  }\n}"
      tags:
        - Contracts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the contract to update.'
                  example: 17
                  nullable: false
                title:
                  type: string
                  description: 'The contract title.'
                  example: consequatur
                  nullable: false
                value:
                  type: number
                  description: 'The contract value.'
                  example: 11613.31890586
                  nullable: false
                start_date:
                  type: date
                  description: 'The start date (Y-m-d).'
                  example: consequatur
                  nullable: false
                end_date:
                  type: date
                  description: 'The end date (Y-m-d).'
                  example: consequatur
                  nullable: false
                client_id:
                  type: integer
                  description: 'The client ID.'
                  example: 17
                  nullable: false
                project_id:
                  type: integer
                  description: 'The project ID.'
                  example: 17
                  nullable: false
                contract_type_id:
                  type: integer
                  description: 'The contract type ID.'
                  example: 17
                  nullable: false
                description:
                  type: string
                  description: 'The contract description.'
                  example: 'Dolores dolorum amet iste laborum eius est dolor.'
                  nullable: true
              required:
                - id
                - title
                - value
                - start_date
                - end_date
                - client_id
                - project_id
                - contract_type_id
      security: []
    delete:
      summary: ''
      operationId: deleteApiMasterPanelContractsId
      description: ''
      parameters:
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Contract deleted successfully.'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Contract deleted successfully.'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Contract not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Contract not found.'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred while deleting the contract.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred while deleting the contract.'
      tags:
        - Contracts
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'Optional parameter. The ID of the .'
        required: true
        schema:
          type: string
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: consequatur
  /api/master-panel/contracts:
    post:
      summary: ''
      operationId: postApiMasterPanelContracts
      description: ''
      parameters:
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"message\": \"Contract created successfully.\",\n  \"data\": {\n    \"id\": 1,\n    \"title\": \"Sample Contract\",\n    ...\n  }\n}"
      tags:
        - Contracts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'The contract title.'
                  example: consequatur
                  nullable: false
                value:
                  type: number
                  description: 'The contract value.'
                  example: 11613.31890586
                  nullable: false
                start_date:
                  type: date
                  description: 'The start date (Y-m-d).'
                  example: consequatur
                  nullable: false
                end_date:
                  type: date
                  description: 'The end date (Y-m-d).'
                  example: consequatur
                  nullable: false
                client_id:
                  type: integer
                  description: 'The client ID.'
                  example: 17
                  nullable: false
                project_id:
                  type: integer
                  description: 'The project ID.'
                  example: 17
                  nullable: false
                contract_type_id:
                  type: integer
                  description: 'The contract type ID.'
                  example: 17
                  nullable: false
                description:
                  type: string
                  description: 'The contract description.'
                  example: 'Dolores dolorum amet iste laborum eius est dolor.'
                  nullable: true
              required:
                - title
                - value
                - start_date
                - end_date
                - client_id
                - project_id
                - contract_type_id
      security: []
  /api/master-panel/contract-types/store:
    post:
      summary: ''
      operationId: postApiMasterPanelContractTypesStore
      description: ''
      parameters:
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"error\": false,\n  \"message\": \"Contract type created successfully.\",\n  \"id\": 1,\n  \"title\": \"NDA\",\n  \"type\": \"contract_type\",\n  \"ct\": { ... }\n}"
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: "Contract type couldn't created."
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: "Contract type couldn't created."
      tags:
        - Contracts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  description: 'The contract type name.'
                  example: consequatur
                  nullable: false
              required:
                - type
      security: []
  /api/master-panel/contract-types/list:
    get:
      summary: ''
      operationId: getApiMasterPanelContractTypesList
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional. Search by contract type name or ID.'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Optional. Search by contract type name or ID.'
            example: consequatur
            nullable: false
        -
          in: query
          name: sort
          description: 'Optional. Field to sort by. Default is "id".'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Optional. Field to sort by. Default is "id".'
            example: consequatur
            nullable: false
        -
          in: query
          name: order
          description: 'Optional. Sort order (ASC or DESC). Default is "DESC".'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Optional. Sort order (ASC or DESC). Default is "DESC".'
            example: consequatur
            nullable: false
        -
          in: query
          name: limit
          description: 'Optional. Number of results per page.'
          example: 17
          required: false
          schema:
            type: integer
            description: 'Optional. Number of results per page.'
            example: 17
            nullable: false
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  rows:
                    -
                      id: 1
                      type: NDA
                    -
                      id: 2
                      type: MSA
                  total: 2
                properties:
                  rows:
                    type: array
                    example:
                      -
                        id: 1
                        type: NDA
                      -
                        id: 2
                        type: MSA
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        type:
                          type: string
                          example: NDA
                  total:
                    type: integer
                    example: 2
      tags:
        - Contracts
      security: []
  '/api/master-panel/contract-types/{id}':
    delete:
      summary: ''
      operationId: deleteApiMasterPanelContractTypesId
      description: ''
      parameters:
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Contract type deleted successfully.'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Contract type deleted successfully.'
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Cannot delete this contract type as it is associated with one or more contracts.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Cannot delete this contract type as it is associated with one or more contracts.'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Contract type not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Contract type not found.'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred while deleting the contract type.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred while deleting the contract type.'
      tags:
        - Contracts
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the contract type to delete.'
        example: 17
        required: true
        schema:
          type: integer
  '/api/master-panel/contracts-types/{id}':
    put:
      summary: ''
      operationId: putApiMasterPanelContractsTypesId
      description: ''
      parameters:
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"error\": false,\n  \"message\": \"Contract type updated successfully.\",\n  \"id\": 1,\n  \"title\": \"NDA\",\n  \"type\": \"contract_type\",\n  \"ct\": { ... }\n}"
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: "Contract type couldn't be updated."
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: "Contract type couldn't be updated."
      tags:
        - Contracts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the contract type to update.'
                  example: 17
                  nullable: false
                type:
                  type: string
                  description: 'The contract type name.'
                  example: consequatur
                  nullable: false
              required:
                - id
                - type
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the contracts type.'
        example: consequatur
        required: true
        schema:
          type: string
  /api/master-panel/allowances:
    post:
      summary: ''
      operationId: postApiMasterPanelAllowances
      description: ''
      parameters:
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"error\": false,\n  \"message\": \"Allowance created successfully.\",\n  \"id\": 1,\n  \"data\": {\n    \"id\": 1,\n    \"title\": \"Travel Allowance\",\n    \"amount\": 1500,\n    ...\n  }\n}"
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: "Allowance couldn't be created."
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: "Allowance couldn't be created."
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'The given data was invalid.'
                  errors:
                    title:
                      - 'The title field is required.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred: ...'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred: ...'
      tags:
        - Allowances
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'The allowance title.'
                  example: consequatur
                  nullable: false
                amount:
                  type: number
                  description: 'The allowance amount.'
                  example: 11613.31890586
                  nullable: false
              required:
                - title
                - amount
      security: []
  '/api/master-panel/allowances/{id}':
    get:
      summary: ''
      operationId: getApiMasterPanelAllowancesId
      description: ''
      parameters:
        -
          in: query
          name: id
          description: 'Optional. The ID of the allowance to fetch.'
          example: 17
          required: false
          schema:
            type: integer
            description: 'Optional. The ID of the allowance to fetch.'
            example: 17
            nullable: false
        -
          in: query
          name: search
          description: 'Optional. Search by title, amount, or ID.'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Optional. Search by title, amount, or ID.'
            example: consequatur
            nullable: false
        -
          in: query
          name: sort
          description: 'Optional. Field to sort by. Default is "id".'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Optional. Field to sort by. Default is "id".'
            example: consequatur
            nullable: false
        -
          in: query
          name: order
          description: 'Optional. Sort order (ASC or DESC). Default is "DESC".'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Optional. Sort order (ASC or DESC). Default is "DESC".'
            example: consequatur
            nullable: false
        -
          in: query
          name: limit
          description: 'Optional. Number of results per page.'
          example: 17
          required: false
          schema:
            type: integer
            description: 'Optional. Number of results per page.'
            example: 17
            nullable: false
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"error\": false,\n  \"message\": \"Allowances fetched successfully.\",\n  \"rows\": [\n    { \"id\": 1, \"title\": \"Travel Allowance\", \"amount\": 1500, ... }\n  ],\n  \"total\": 1\n}"
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Allowance not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Allowance not found.'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred: ...'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred: ...'
      tags:
        - Allowances
      security: []
    delete:
      summary: ''
      operationId: deleteApiMasterPanelAllowancesId
      description: ''
      parameters:
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Allowance(s) deleted successfully.'
                  id:
                    - 1
                  titles:
                    - 'Travel Allowance'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Allowance(s) deleted successfully.'
                  id:
                    type: array
                    example:
                      - 1
                    items:
                      type: integer
                  titles:
                    type: array
                    example:
                      - 'Travel Allowance'
                    items:
                      type: string
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Allowance not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Allowance not found.'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred: ...'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred: ...'
      tags:
        - Allowances
      security: []
    put:
      summary: ''
      operationId: putApiMasterPanelAllowancesId
      description: ''
      parameters:
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"error\": false,\n  \"message\": \"Allowance updated successfully.\",\n  \"id\": 1,\n  \"data\": {\n    \"id\": 1,\n    \"title\": \"Updated Allowance\",\n    \"amount\": 2000,\n    ...\n  }\n}"
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: "Allowance couldn't be updated."
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: "Allowance couldn't be updated."
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Allowance not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Allowance not found.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'The given data was invalid.'
                  errors:
                    title:
                      - 'The title field is required.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred: ...'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred: ...'
      tags:
        - Allowances
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the allowance to update.'
                  example: 17
                  nullable: false
                title:
                  type: string
                  description: 'The allowance title.'
                  example: consequatur
                  nullable: false
                amount:
                  type: number
                  description: 'The allowance amount.'
                  example: 11613.31890586
                  nullable: false
              required:
                - id
                - title
                - amount
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'Optional parameter. The ID of the .'
        required: true
        schema:
          type: string
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: consequatur
  /api/master-panel/deductions:
    post:
      summary: 'Create Deduction'
      operationId: createDeduction
      description: ''
      parameters:
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: Success
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"error\": false,\n  \"message\": \"Deduction created successfully.\",\n  \"id\": 1,\n  \"data\": {\"id\":1, ...}\n}"
        400:
          description: 'Validation error'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: ...
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: ...
        500:
          description: Error
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred: ...'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred: ...'
      tags:
        - Deductions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                isApi:
                  type: boolean
                  description: 'Set to true for API response.'
                  example: true
                  nullable: false
                title:
                  type: string
                  description: 'The deduction title.'
                  example: 'Provident Fund'
                  nullable: false
                type:
                  type: string
                  description: 'The deduction type (amount or percentage).'
                  example: amount
                  nullable: false
                amount:
                  type: number
                  description: 'if type=amount The deduction amount.'
                  example: 500.0
                  nullable: false
                percentage:
                  type: number
                  description: 'if type=percentage The deduction percentage.'
                  example: 10.0
                  nullable: false
              required:
                - isApi
                - title
                - type
                - amount
                - percentage
      security: []
  '/api/master-panel/deductions/{id}':
    get:
      summary: 'List Deductions (API)'
      operationId: listDeductionsAPI
      description: ''
      parameters:
        -
          in: query
          name: id
          description: 'Optional. If provided, returns the deduction with this ID.'
          example: 5
          required: false
          schema:
            type: integer
            description: 'Optional. If provided, returns the deduction with this ID.'
            example: 5
            nullable: false
        -
          in: query
          name: search
          description: 'Optional. Search term for deductions.'
          example: Provident
          required: false
          schema:
            type: string
            description: 'Optional. Search term for deductions.'
            example: Provident
            nullable: false
        -
          in: query
          name: sort
          description: 'Optional. Sort field. Default: id.'
          example: title
          required: false
          schema:
            type: string
            description: 'Optional. Sort field. Default: id.'
            example: title
            nullable: false
        -
          in: query
          name: order
          description: 'Optional. Sort order. Default: DESC.'
          example: ASC
          required: false
          schema:
            type: string
            description: 'Optional. Sort order. Default: DESC.'
            example: ASC
            nullable: false
        -
          in: query
          name: limit
          description: 'Optional. Pagination limit. Default: 10.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Optional. Pagination limit. Default: 10.'
            example: 10
            nullable: false
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                oneOf:
                  -
                    description: List
                    type: string
                    example: "{\n  \"error\": false,\n  \"message\": \"Deductions fetched successfully.\",\n  \"total\": 2,\n  \"rows\": [\n    {\"id\":1,\"title\":\"Provident Fund\", ...},\n    {\"id\":2,\"title\":\"TDS\", ...}\n  ]\n}"
                  -
                    description: Single
                    type: string
                    example: "{\n  \"error\": false,\n  \"message\": \"Deduction fetched successfully.\",\n  \"data\": {\"id\":1,\"title\":\"Provident Fund\", ...}\n}"
        404:
          description: 'Not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Deduction not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Deduction not found.'
        500:
          description: Error
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred: ...'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred: ...'
      tags:
        - Deductions
      security: []
    put:
      summary: 'Update Deduction'
      operationId: updateDeduction
      description: ''
      parameters:
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: Success
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"error\": false,\n  \"message\": \"Deduction updated successfully.\",\n  \"id\": 1,\n  \"data\": {\"id\":1, ...}\n}"
        400:
          description: 'Validation error'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: ...
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: ...
        404:
          description: 'Not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Deduction not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Deduction not found.'
        500:
          description: Error
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred: ...'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred: ...'
      tags:
        - Deductions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                isApi:
                  type: boolean
                  description: 'Set to true for API response.'
                  example: true
                  nullable: false
                id:
                  type: integer
                  description: 'The ID of the deduction.'
                  example: 1
                  nullable: false
                title:
                  type: string
                  description: 'The deduction title.'
                  example: 'Provident Fund'
                  nullable: false
                type:
                  type: string
                  description: 'The deduction type (amount or percentage).'
                  example: amount
                  nullable: false
                amount:
                  type: number
                  description: 'if type=amount The deduction amount.'
                  example: 500.0
                  nullable: false
                percentage:
                  type: number
                  description: 'if type=percentage The deduction percentage.'
                  example: 10.0
                  nullable: false
              required:
                - isApi
                - id
                - title
                - type
                - amount
                - percentage
      security: []
    delete:
      summary: 'Delete Deduction(s)'
      operationId: deleteDeductions
      description: ''
      parameters:
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: Success
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Deduction(s) deleted successfully.'
                  id:
                    - 1
                    - 2
                  titles:
                    - 'Provident Fund'
                    - TDS
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Deduction(s) deleted successfully.'
                  id:
                    type: array
                    example:
                      - 1
                      - 2
                    items:
                      type: integer
                  titles:
                    type: array
                    example:
                      - 'Provident Fund'
                      - TDS
                    items:
                      type: string
        400:
          description: 'Validation error'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: ...
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: ...
        500:
          description: Error
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred: ...'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred: ...'
      tags:
        - Deductions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                isApi:
                  type: boolean
                  description: 'Set to true for API response.'
                  example: true
                  nullable: false
                ids:
                  type: array
                  description: 'The IDs of the deductions to delete.'
                  example:
                    - 1
                    - 2
                  items:
                    type: string
              required:
                - isApi
                - ids
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'Optional parameter. The ID of the .'
        required: true
        schema:
          type: string
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: consequatur
  /api/master-panel/payslips:
    post:
      summary: 'Create Payslip'
      operationId: createPayslip
      description: ''
      parameters:
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: Success
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"error\": false,\n  \"message\": \"Payslip created successfully.\",\n  \"id\": 1,\n  \"data\": {\"id\":1, ...}\n}"
        400:
          description: 'Validation error'
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: ...
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: ...
        500:
          description: Error
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred: ...'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred: ...'
      tags:
        - Payslips
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                isApi:
                  type: boolean
                  description: 'Set to true for API response.'
                  example: true
                  nullable: false
                user_id:
                  type: integer
                  description: 'The user ID.'
                  example: 2
                  nullable: false
                month:
                  type: string
                  description: 'The month (YYYY-MM).'
                  example: 2024-06
                  nullable: false
                basic_salary:
                  type: number
                  description: required.
                  example: 50000.0
                  nullable: false
                working_days:
                  type: integer
                  description: required.
                  example: 22
                  nullable: false
                lop_days:
                  type: integer
                  description: required.
                  example: 2
                  nullable: false
                paid_days:
                  type: integer
                  description: required.
                  example: 20
                  nullable: false
                bonus:
                  type: number
                  description: required.
                  example: 1000.0
                  nullable: false
                incentives:
                  type: number
                  description: required.
                  example: 500.0
                  nullable: false
                leave_deduction:
                  type: number
                  description: required.
                  example: 200.0
                  nullable: false
                ot_hours:
                  type: integer
                  description: required.
                  example: 5
                  nullable: false
                ot_rate:
                  type: number
                  description: required.
                  example: 100.0
                  nullable: false
                ot_payment:
                  type: number
                  description: required.
                  example: 500.0
                  nullable: false
                total_allowance:
                  type: number
                  description: required.
                  example: 1500.0
                  nullable: false
                total_deductions:
                  type: number
                  description: required.
                  example: 300.0
                  nullable: false
                total_earnings:
                  type: number
                  description: required.
                  example: 52000.0
                  nullable: false
                net_pay:
                  type: number
                  description: required.
                  example: 51700.0
                  nullable: false
                payment_method_id:
                  type: integer
                  description: optional.
                  example: 1
                  nullable: false
                payment_date:
                  type: string
                  description: optional.
                  example: '2024-06-30'
                  nullable: false
                status:
                  type: integer
                  description: required.
                  example: 1
                  nullable: false
                note:
                  type: string
                  description: optional.
                  example: 'June payslip'
                  nullable: false
                allowances:
                  type: array
                  description: optional.
                  example:
                    - 1
                    - 2
                  items:
                    type: string
                deductions:
                  type: array
                  description: optional.
                  example:
                    - 1
                    - 2
                  items:
                    type: string
              required:
                - isApi
                - user_id
                - month
      security: []
  /api/master-panel/expenses:
    post:
      summary: 'Store a new expense.'
      operationId: storeANewExpense
      description: 'Create a new expense record in the workspace.'
      parameters:
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"error\": false,\n  \"message\": \"Expense created successfully.\",\n  \"id\": 12,\n  \"expenses\": {\"id\": 12, \"title\": \"Travel Reimbursement\", ...}\n}"
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: "Expense couldn't be created."
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: "Expense couldn't be created."
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'The given data was invalid.'
                  errors:
                    title:
                      - 'The title field is required.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred: ...'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred: ...'
      tags:
        - 'Expenses & Expense Types'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'The title of the expense.'
                  example: '"Travel Reimbursement"'
                  nullable: false
                expense_type_id:
                  type: integer
                  description: 'The ID of the expense type.'
                  example: 1
                  nullable: false
                user_id:
                  type: integer
                  description: 'The ID of the user.'
                  example: 3
                  nullable: false
                amount:
                  type: number
                  description: 'The amount of the expense.'
                  example: 150.75
                  nullable: false
                expense_date:
                  type: date
                  description: 'The date of the expense.'
                  example: '"2024-06-30"'
                  nullable: false
                note:
                  type: string
                  description: 'Optional note for the expense.'
                  example: '"Taxi fare for client meeting."'
                  nullable: false
              required:
                - title
                - expense_type_id
                - user_id
                - amount
                - expense_date
      security: []
  '/api/master-panel/expenses/{id}':
    get:
      summary: 'List expenses (API).'
      operationId: listExpensesAPI
      description: 'Get a paginated list of expenses or a single expense by ID.'
      parameters:
        -
          in: query
          name: id
          description: 'The ID of the expense to fetch.'
          example: 12
          required: false
          schema:
            type: integer
            description: 'The ID of the expense to fetch.'
            example: 12
            nullable: false
        -
          in: query
          name: search
          description: 'Search term for filtering expenses.'
          example: '"Travel"'
          required: false
          schema:
            type: string
            description: 'Search term for filtering expenses.'
            example: '"Travel"'
            nullable: false
        -
          in: query
          name: sort
          description: 'Field to sort by.'
          example: '"id"'
          required: false
          schema:
            type: string
            description: 'Field to sort by.'
            example: '"id"'
            nullable: false
        -
          in: query
          name: order
          description: 'Sort order (ASC or DESC).'
          example: '"DESC"'
          required: false
          schema:
            type: string
            description: 'Sort order (ASC or DESC).'
            example: '"DESC"'
            nullable: false
        -
          in: query
          name: type_id
          description: 'Filter by expense type ID.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'Filter by expense type ID.'
            example: 1
            nullable: false
        -
          in: query
          name: user_id
          description: 'Filter by user ID.'
          example: 3
          required: false
          schema:
            type: integer
            description: 'Filter by user ID.'
            example: 3
            nullable: false
        -
          in: query
          name: date_from
          description: 'date Filter expenses from this date.'
          example: '"2024-06-01"'
          required: false
          schema:
            type: string
            description: 'date Filter expenses from this date.'
            example: '"2024-06-01"'
            nullable: false
        -
          in: query
          name: date_to
          description: 'date Filter expenses up to this date.'
          example: '"2024-06-30"'
          required: false
          schema:
            type: string
            description: 'date Filter expenses up to this date.'
            example: '"2024-06-30"'
            nullable: false
        -
          in: query
          name: limit
          description: 'Number of records per page.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of records per page.'
            example: 10
            nullable: false
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"error\": false,\n  \"message\": \"Expenses retrieved.\",\n  \"data\": {\n    \"rows\": [{\"id\": 12, \"title\": \"Travel Reimbursement\", ...}],\n    \"total\": 1\n  }\n}"
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Expense not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Expense not found.'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred: ...'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred: ...'
      tags:
        - 'Expenses & Expense Types'
      security: []
    put:
      summary: 'Update an expense.'
      operationId: updateAnExpense
      description: 'Update an existing expense record by ID.'
      parameters:
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Expense updated successfully.'
                  id: 12
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Expense updated successfully.'
                  id:
                    type: integer
                    example: 12
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: "Expense couldn't be updated."
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: "Expense couldn't be updated."
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Expense not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Expense not found.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'The given data was invalid.'
                  errors:
                    title:
                      - 'The title field is required.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred: ...'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred: ...'
      tags:
        - 'Expenses & Expense Types'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the expense.'
                  example: 12
                  nullable: false
                title:
                  type: string
                  description: 'The title of the expense.'
                  example: '"Updated Title"'
                  nullable: false
                expense_type_id:
                  type: integer
                  description: 'The ID of the expense type.'
                  example: 1
                  nullable: false
                user_id:
                  type: integer
                  description: 'The ID of the user.'
                  example: 3
                  nullable: false
                amount:
                  type: number
                  description: 'The amount of the expense.'
                  example: 200.0
                  nullable: false
                expense_date:
                  type: date
                  description: 'The date of the expense.'
                  example: '"2024-07-01"'
                  nullable: false
                note:
                  type: string
                  description: 'Optional note for the expense.'
                  example: '"Updated note."'
                  nullable: false
              required:
                - id
                - title
                - expense_type_id
                - user_id
                - amount
                - expense_date
      security: []
    delete:
      summary: 'Delete an expense.'
      operationId: deleteAnExpense
      description: 'Delete an expense by ID.'
      parameters:
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Expense deleted successfully.'
                  id: 12
                  title: 'Travel Reimbursement'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Expense deleted successfully.'
                  id:
                    type: integer
                    example: 12
                  title:
                    type: string
                    example: 'Travel Reimbursement'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Expense not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Expense not found.'
      tags:
        - 'Expenses & Expense Types'
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'Optional parameter. The ID of the .'
        required: true
        schema:
          type: string
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: consequatur
  /api/master-panel/expense-type:
    post:
      summary: 'Store a new expense type.'
      operationId: storeANewExpenseType
      description: 'Create a new expense type in the workspace.'
      parameters:
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"error\": false,\n  \"message\": \"Expense type created successfully.\",\n  \"id\": 1,\n  \"expenses\": {\"id\": 1, \"title\": \"Travel\", ...}\n}"
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: "Expense type couldn't be created."
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: "Expense type couldn't be created."
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'The given data was invalid.'
                  errors:
                    title:
                      - 'The title field is required.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred: ...'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred: ...'
      tags:
        - 'Expenses & Expense Types'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'The title of the expense type.'
                  example: '"Travel"'
                  nullable: false
                description:
                  type: string
                  description: 'Optional description.'
                  example: '"Expenses related to travel."'
                  nullable: false
              required:
                - title
      security: []
  '/api/master-panel/expense-type/{id}':
    put:
      summary: 'Update an expense type.'
      operationId: updateAnExpenseType
      description: 'Update an existing expense type by ID.'
      parameters:
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Expense Type updated successfully.'
                  id: 1
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Expense Type updated successfully.'
                  id:
                    type: integer
                    example: 1
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: "Expense Type couldn't be updated."
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: "Expense Type couldn't be updated."
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Expense type not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Expense type not found.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'The given data was invalid.'
                  errors:
                    title:
                      - 'The title field is required.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      title:
                        type: array
                        example:
                          - 'The title field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred: ...'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred: ...'
      tags:
        - 'Expenses & Expense Types'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the expense type.'
                  example: 1
                  nullable: false
                title:
                  type: string
                  description: 'The title of the expense type.'
                  example: '"Updated Type"'
                  nullable: false
                description:
                  type: string
                  description: 'Optional description.'
                  example: '"Updated description."'
                  nullable: false
              required:
                - id
                - title
      security: []
    delete:
      summary: 'Delete an expense type.'
      operationId: deleteAnExpenseType
      description: 'Delete an expense type by ID. Will fail if the type is assigned to any expenses.'
      parameters:
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Expense type deleted successfully.'
                  id: 1
                  title: Travel
                  type: expense_type
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Expense type deleted successfully.'
                  id:
                    type: integer
                    example: 1
                  title:
                    type: string
                    example: Travel
                  type:
                    type: string
                    example: expense_type
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Cannot delete this expense type as it is associated with one or more expenses.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Cannot delete this expense type as it is associated with one or more expenses.'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Expense type not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Expense type not found.'
      tags:
        - 'Expenses & Expense Types'
      security: []
    get:
      summary: 'List or fetch expense types (API).'
      operationId: listOrFetchExpenseTypesAPI
      description: 'Get a paginated list of expense types or a single expense type by ID.'
      parameters:
        -
          in: query
          name: search
          description: 'Search term for filtering expense types.'
          example: '"Travel"'
          required: false
          schema:
            type: string
            description: 'Search term for filtering expense types.'
            example: '"Travel"'
            nullable: false
        -
          in: query
          name: sort
          description: 'Field to sort by.'
          example: '"id"'
          required: false
          schema:
            type: string
            description: 'Field to sort by.'
            example: '"id"'
            nullable: false
        -
          in: query
          name: order
          description: 'Sort order (ASC or DESC).'
          example: '"DESC"'
          required: false
          schema:
            type: string
            description: 'Sort order (ASC or DESC).'
            example: '"DESC"'
            nullable: false
        -
          in: query
          name: limit
          description: 'Number of records per page.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of records per page.'
            example: 10
            nullable: false
        -
          in: header
          name: 'workspace_id:'
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"error\": false,\n  \"message\": \"Expense types fetched successfully.\",\n  \"data\": {\n    \"rows\": [{\"id\": 1, \"title\": \"Travel\", ...}],\n    \"total\": 1\n  }\n}"
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Expense type not found.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Expense type not found.'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred: ...'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred: ...'
      tags:
        - 'Expenses & Expense Types'
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the expense type.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/settings/{variable}':
    get:
      summary: 'Retrieve the settings for a specific variable.'
      operationId: retrieveTheSettingsForASpecificVariable
      description: 'This endpoint returns the settings for a given variable. The user must be authenticated.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Settings retrieved successfully'
                  settings:
                    company_title: 'Taskify SaaS'
                    currency_full_form: 'Indian Rupee'
                    currency_symbol: ₹
                    currency_code: INR
                    currency_symbol_position: before
                    currency_formate: comma_separated
                    decimal_points_in_currency: '2'
                    allowed_max_upload_size: '2000'
                    allowSignup: 1
                    timezone: Asia/Kolkata
                    date_format: DD-MM-YYYY|d-m-Y
                    time_format: 'H:i:s'
                    toast_position: toast-bottom-center
                    toast_time_out: '2'
                    footer_text: '<p>made with ❤️ by <a href="https://www.infinitietech.com/" target="_blank" rel="noopener">Infinitie Technologies</a></p>'
                    full_logo: 'https://test-taskify.infinitietech.com/storage/logos/zEy4tSCAFSMczWbOoxBZ3B43Nc9eeqMlNBXDrOzn.png'
                    half_logo: null
                    favicon: 'https://test-taskify.infinitietech.com/storage/logos/2FZTNY1qDTz7CTtwWC8Hh1eY4l7cIHgOXG2stVIU.png'
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Settings retrieved successfully'
                  settings:
                    type: object
                    properties:
                      company_title:
                        type: string
                        example: 'Taskify SaaS'
                      currency_full_form:
                        type: string
                        example: 'Indian Rupee'
                      currency_symbol:
                        type: string
                        example: ₹
                      currency_code:
                        type: string
                        example: INR
                      currency_symbol_position:
                        type: string
                        example: before
                      currency_formate:
                        type: string
                        example: comma_separated
                      decimal_points_in_currency:
                        type: string
                        example: '2'
                      allowed_max_upload_size:
                        type: string
                        example: '2000'
                      allowSignup:
                        type: integer
                        example: 1
                      timezone:
                        type: string
                        example: Asia/Kolkata
                      date_format:
                        type: string
                        example: DD-MM-YYYY|d-m-Y
                      time_format:
                        type: string
                        example: 'H:i:s'
                      toast_position:
                        type: string
                        example: toast-bottom-center
                      toast_time_out:
                        type: string
                        example: '2'
                      footer_text:
                        type: string
                        example: '<p>made with ❤️ by <a href="https://www.infinitietech.com/" target="_blank" rel="noopener">Infinitie Technologies</a></p>'
                      full_logo:
                        type: string
                        example: 'https://test-taskify.infinitietech.com/storage/logos/zEy4tSCAFSMczWbOoxBZ3B43Nc9eeqMlNBXDrOzn.png'
                      half_logo:
                        type: string
                        example: null
                      favicon:
                        type: string
                        example: 'https://test-taskify.infinitietech.com/storage/logos/2FZTNY1qDTz7CTtwWC8Hh1eY4l7cIHgOXG2stVIU.png'
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Un Authorized Action!'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Un Authorized Action!'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Setting not found'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Setting not found'
      tags:
        - 'Setting Management'
    parameters:
      -
        in: path
        name: variable
        description: 'The variable type for which settings are to be retrieved. Must be one of the following: general_settings, pusher_settings, email_settings, media_storage_settings, sms_gateway_settings, whatsapp_settings, privacy_policy, about_us, terms_conditions.'
        example: general_settings
        required: true
        schema:
          type: string
  /api/master-panel/leaverequest:
    post:
      summary: 'Create a Leave Request'
      operationId: createALeaveRequest
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n \"error\": false,\n \"message\": \"Leave request created successfully.\",\n \"id\": 13,\n \"type\": \"leave_request\",\n \"data\": {\n   \"id\": 13,\n   \"user_id\": 9,\n   \"reason\": \"Family function\",\n   \"from_date\": \"2025-06-10\",\n   \"to_date\": \"2025-06-12\",\n   \"from_time\": null,\n   \"to_time\": null,\n   \"status\": \"pending\",\n   \"visible_to_all\": true,\n   ...\n }\n}"
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    reason:
                      - 'The reason field is required.'
                    from_date:
                      - 'The from date field is required.'
                    to_date:
                      - 'The to date field is required.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      reason:
                        type: array
                        example:
                          - 'The reason field is required.'
                        items:
                          type: string
                      from_date:
                        type: array
                        example:
                          - 'The from date field is required.'
                        items:
                          type: string
                      to_date:
                        type: array
                        example:
                          - 'The to date field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Exception message'
                  message: 'leave request culd not created'
                  line: 125
                  file: app/Http/Controllers/LeaveRequestController.php
                properties:
                  error:
                    type: string
                    example: 'Exception message'
                  message:
                    type: string
                    example: 'leave request culd not created'
                  line:
                    type: integer
                    example: 125
                  file:
                    type: string
                    example: app/Http/Controllers/LeaveRequestController.php
      tags:
        - 'leaverequest Managemant'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  description: 'The reason for the leave.'
                  example: 'Family function'
                  nullable: false
                from_date:
                  type: date
                  description: 'The start date of the leave in the format Y-m-d.'
                  example: '2025-06-10'
                  nullable: false
                to_date:
                  type: date
                  description: 'The end date of the leave in the format Y-m-d. If partialLeave is on, this must match from_date.'
                  example: '2025-06-12'
                  nullable: false
                partialLeave:
                  type: boolean
                  description: 'optional If set to "on", indicates a partial day leave.'
                  example: true
                  nullable: false
                from_time:
                  type: string
                  description: 'required_if:partialLeave,on The start time for a partial leave (24-hour format).'
                  example: '10:00'
                  nullable: false
                to_time:
                  type: string
                  description: 'required_if:partialLeave,on The end time for a partial leave (24-hour format).'
                  example: '14:00'
                  nullable: false
                status:
                  type: string
                  description: "optional Only admins or leave editors can set status to 'approved' or 'rejected'. Default is 'pending'."
                  example: pending
                  nullable: false
                leaveVisibleToAll:
                  type: boolean
                  description: 'optional If set to "on", the leave is visible to all workspace users.'
                  example: true
                  nullable: false
                visible_to_ids:
                  type: array
                  description: 'optional Required if leaveVisibleToAll is not set. An array of user IDs who can view the leave.'
                  example:
                    - 3
                    - 5
                    - 7
                  items:
                    type: string
                user_id:
                  type: integer
                  description: 'optional Only admins or leave editors can create leave requests on behalf of another user.'
                  example: 9
                  nullable: false
                isApi:
                  type: boolean
                  description: 'optional Indicates if this is an API request. Defaults to true.'
                  example: true
                  nullable: false
              required:
                - reason
                - from_date
                - to_date
      security: []
  '/api/master-panel/leaverequest/{id}':
    get:
      summary: "List Leave Requests (all or by ID)\n\nThis API returns either a paginated list of leave requests based on filters or a single leave request if an ID is provided.\n\nRequires authentication. Workspace must be set via header `workspace-id`."
      operationId: listLeaveRequestsallOrByIDThisAPIReturnsEitherAPaginatedListOfLeaveRequestsBasedOnFiltersOrASingleLeaveRequestIfAnIDIsProvidedRequiresAuthenticationWorkspaceMustBeSetViaHeaderworkspaceId
      description: ''
      parameters:
        -
          in: query
          name: isApi
          description: 'Optional. Set to `true` for API mode. Default: true'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Optional. Set to `true` for API mode. Default: true'
            example: false
            nullable: false
        -
          in: query
          name: search
          description: 'Optional. Search by leave reason or ID.'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Optional. Search by leave reason or ID.'
            example: consequatur
            nullable: false
        -
          in: query
          name: sort
          description: 'Optional. Column to sort by. Default: id'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Optional. Column to sort by. Default: id'
            example: consequatur
            nullable: false
        -
          in: query
          name: order
          description: 'Optional. Sort direction: ASC or DESC. Default: DESC'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Optional. Sort direction: ASC or DESC. Default: DESC'
            example: consequatur
            nullable: false
        -
          in: query
          name: user_ids
          description: 'Optional. Filter by one or more user IDs.'
          example:
            - consequatur
          required: false
          schema:
            type: array
            description: 'Optional. Filter by one or more user IDs.'
            example:
              - consequatur
            items:
              type: string
        -
          in: query
          name: action_by_ids
          description: 'Optional. Filter by action_by user IDs.'
          example:
            - consequatur
          required: false
          schema:
            type: array
            description: 'Optional. Filter by action_by user IDs.'
            example:
              - consequatur
            items:
              type: string
        -
          in: query
          name: types
          description: 'Optional. Filter by types: full or partial.'
          example:
            - consequatur
          required: false
          schema:
            type: array
            description: 'Optional. Filter by types: full or partial.'
            example:
              - consequatur
            items:
              type: string
        -
          in: query
          name: statuses
          description: 'Optional. Filter by status: pending, approved, rejected.'
          example:
            - consequatur
          required: false
          schema:
            type: array
            description: 'Optional. Filter by status: pending, approved, rejected.'
            example:
              - consequatur
            items:
              type: string
        -
          in: query
          name: start_date_from
          description: 'date Optional. Start range for from_date filter.'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'date Optional. Start range for from_date filter.'
            example: consequatur
            nullable: false
        -
          in: query
          name: start_date_to
          description: 'date Optional. End range for from_date filter.'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'date Optional. End range for from_date filter.'
            example: consequatur
            nullable: false
        -
          in: query
          name: end_date_from
          description: 'date Optional. Start range for to_date filter.'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'date Optional. Start range for to_date filter.'
            example: consequatur
            nullable: false
        -
          in: query
          name: end_date_to
          description: 'date Optional. End range for to_date filter.'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'date Optional. End range for to_date filter.'
            example: consequatur
            nullable: false
        -
          in: query
          name: limit
          description: 'Optional. Results per page. Default: 10'
          example: 17
          required: false
          schema:
            type: integer
            description: 'Optional. Results per page. Default: 10'
            example: 17
            nullable: false
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Single Leave Request Found'
                    type: object
                    example:
                      success: true
                      message: 'Leave request retrieved successfully.'
                      data:
                        total: 1
                        data:
                          -
                            id: 14
                            user_name: 'John Doe'
                            action_by: 'Jane Smith'
                            from_date: 'Mon, 2024-06-01'
                            to_date: 'Tue, 2024-06-02'
                            type: Full
                            duration: '2 days'
                            reason: 'Medical leave'
                            status: "<span class='badge bg-warning'>Pending</span>"
                            visible_to: All
                            created_at: '2024-05-15 10:30 AM'
                            updated_at: '2024-05-16 09:20 AM'
                            actions: '<a href=...>Edit</a> <button>Delete</button>'
                    properties:
                      success:
                        type: boolean
                        example: true
                      message:
                        type: string
                        example: 'Leave request retrieved successfully.'
                      data:
                        type: object
                        properties:
                          total:
                            type: integer
                            example: 1
                          data:
                            type: array
                            example:
                              -
                                id: 14
                                user_name: 'John Doe'
                                action_by: 'Jane Smith'
                                from_date: 'Mon, 2024-06-01'
                                to_date: 'Tue, 2024-06-02'
                                type: Full
                                duration: '2 days'
                                reason: 'Medical leave'
                                status: "<span class='badge bg-warning'>Pending</span>"
                                visible_to: All
                                created_at: '2024-05-15 10:30 AM'
                                updated_at: '2024-05-16 09:20 AM'
                                actions: '<a href=...>Edit</a> <button>Delete</button>'
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 14
                                user_name:
                                  type: string
                                  example: 'John Doe'
                                action_by:
                                  type: string
                                  example: 'Jane Smith'
                                from_date:
                                  type: string
                                  example: 'Mon, 2024-06-01'
                                to_date:
                                  type: string
                                  example: 'Tue, 2024-06-02'
                                type:
                                  type: string
                                  example: Full
                                duration:
                                  type: string
                                  example: '2 days'
                                reason:
                                  type: string
                                  example: 'Medical leave'
                                status:
                                  type: string
                                  example: "<span class='badge bg-warning'>Pending</span>"
                                visible_to:
                                  type: string
                                  example: All
                                created_at:
                                  type: string
                                  example: '2024-05-15 10:30 AM'
                                updated_at:
                                  type: string
                                  example: '2024-05-16 09:20 AM'
                                actions:
                                  type: string
                                  example: '<a href=...>Edit</a> <button>Delete</button>'
                  -
                    description: 'List of Leave Requests'
                    type: object
                    example:
                      success: true
                      message: 'Leave requests retrieved successfully.'
                      data:
                        total: 5
                        data:
                          -
                            id: 1
                            user_name: 'John Doe'
                            action_by: 'Jane Smith'
                            from_date: 'Mon, 2024-06-01'
                            to_date: 'Tue, 2024-06-02'
                            type: Full
                            duration: '2 days'
                            reason: 'Annual Leave'
                            status: "<span class='badge bg-success'>Approved</span>"
                            visible_to: All
                            created_at: '2024-05-01 08:00 AM'
                            updated_at: '2024-05-02 09:00 AM'
                            actions: '<a href=...>Edit</a> <button>Delete</button>'
                    properties:
                      success:
                        type: boolean
                        example: true
                      message:
                        type: string
                        example: 'Leave requests retrieved successfully.'
                      data:
                        type: object
                        properties:
                          total:
                            type: integer
                            example: 5
                          data:
                            type: array
                            example:
                              -
                                id: 1
                                user_name: 'John Doe'
                                action_by: 'Jane Smith'
                                from_date: 'Mon, 2024-06-01'
                                to_date: 'Tue, 2024-06-02'
                                type: Full
                                duration: '2 days'
                                reason: 'Annual Leave'
                                status: "<span class='badge bg-success'>Approved</span>"
                                visible_to: All
                                created_at: '2024-05-01 08:00 AM'
                                updated_at: '2024-05-02 09:00 AM'
                                actions: '<a href=...>Edit</a> <button>Delete</button>'
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                user_name:
                                  type: string
                                  example: 'John Doe'
                                action_by:
                                  type: string
                                  example: 'Jane Smith'
                                from_date:
                                  type: string
                                  example: 'Mon, 2024-06-01'
                                to_date:
                                  type: string
                                  example: 'Tue, 2024-06-02'
                                type:
                                  type: string
                                  example: Full
                                duration:
                                  type: string
                                  example: '2 days'
                                reason:
                                  type: string
                                  example: 'Annual Leave'
                                status:
                                  type: string
                                  example: "<span class='badge bg-success'>Approved</span>"
                                visible_to:
                                  type: string
                                  example: All
                                created_at:
                                  type: string
                                  example: '2024-05-01 08:00 AM'
                                updated_at:
                                  type: string
                                  example: '2024-05-02 09:00 AM'
                                actions:
                                  type: string
                                  example: '<a href=...>Edit</a> <button>Delete</button>'
        404:
          description: 'Leave request not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  success: false
                  message: 'Unable to retrieve leave requests.'
                  data: []
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Unable to retrieve leave requests.'
                  data:
                    type: array
                    example: []
        500:
          description: 'Server error or internal exception'
          content:
            application/json:
              schema:
                type: object
                example:
                  success: false
                  message: 'Unable to retrieve leave requests.'
                  data: []
                  error: 'Call to undefined relationship [actionBy] on model [App\Models\LeaveRequest].'
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Unable to retrieve leave requests.'
                  data:
                    type: array
                    example: []
                  error:
                    type: string
                    example: 'Call to undefined relationship [actionBy] on model [App\Models\LeaveRequest].'
      tags:
        - 'leaverequest Managemant'
      security: []
    put:
      summary: 'Update Leave Request'
      operationId: updateLeaveRequest
      description: "This endpoint allows authorized users to update an existing leave request.\nOnly admins or leave editors can change the status. Team members cannot approve their own leaves.\nLeave requests already actioned (approved/rejected) can only be modified by an admin."
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Leave request updated successfully.'
                  data:
                    id: 12
                    data:
                      id: 12
                      user_id: 3
                      reason: 'Family emergency'
                      from_date: '2025-06-10'
                      to_date: '2025-06-12'
                      from_time: '09:00'
                      to_time: '13:00'
                      status: approved
                      action_by: 1
                      visible_to_all: 1
                      created_at: '2025-06-01T12:30:00.000000Z'
                      updated_at: '2025-06-06T10:45:00.000000Z'
                    type: leave_request
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Leave request updated successfully.'
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 12
                      data:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 12
                          user_id:
                            type: integer
                            example: 3
                          reason:
                            type: string
                            example: 'Family emergency'
                          from_date:
                            type: string
                            example: '2025-06-10'
                          to_date:
                            type: string
                            example: '2025-06-12'
                          from_time:
                            type: string
                            example: '09:00'
                          to_time:
                            type: string
                            example: '13:00'
                          status:
                            type: string
                            example: approved
                          action_by:
                            type: integer
                            example: 1
                          visible_to_all:
                            type: integer
                            example: 1
                          created_at:
                            type: string
                            example: '2025-06-01T12:30:00.000000Z'
                          updated_at:
                            type: string
                            example: '2025-06-06T10:45:00.000000Z'
                      type:
                        type: string
                        example: leave_request
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Missing or invalid input.'
                  details:
                    from_date:
                      - 'The from date field is required.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Missing or invalid input.'
                  details:
                    type: object
                    properties:
                      from_date:
                        type: array
                        example:
                          - 'The from date field is required.'
                        items:
                          type: string
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: ''
                    type: object
                    example:
                      error: true
                      message: 'You cannot approve your own leave request.'
                    properties:
                      error:
                        type: boolean
                        example: true
                      message:
                        type: string
                        example: 'You cannot approve your own leave request.'
                  -
                    description: ''
                    type: object
                    example:
                      error: true
                      message: 'Once actioned only admin can update leave request.'
                    properties:
                      error:
                        type: boolean
                        example: true
                      message:
                        type: string
                        example: 'Once actioned only admin can update leave request.'
                  -
                    description: ''
                    type: object
                    example:
                      error: true
                      message: 'You cannot set the status to pending if it has already been approved or rejected.'
                    properties:
                      error:
                        type: boolean
                        example: true
                      message:
                        type: string
                        example: 'You cannot set the status to pending if it has already been approved or rejected.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Validation failed.'
                  details:
                    status:
                      - 'The selected status is invalid.'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Validation failed.'
                  details:
                    type: object
                    properties:
                      status:
                        type: array
                        example:
                          - 'The selected status is invalid.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred while updating the leave request.'
                  details: 'SQLSTATE[23000]: Integrity constraint violation...'
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred while updating the leave request.'
                  details:
                    type: string
                    example: 'SQLSTATE[23000]: Integrity constraint violation...'
      tags:
        - 'leaverequest Managemant'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the leave request to update.'
                  example: 12
                  nullable: false
                reason:
                  type: string
                  description: 'Reason for leave.'
                  example: 'Family emergency'
                  nullable: false
                from_date:
                  type: date
                  description: 'Start date of leave (in Y-m-d format). Must be before or equal to `to_date`.'
                  example: '2025-06-10'
                  nullable: false
                to_date:
                  type: date
                  description: 'End date of leave (in Y-m-d format).'
                  example: '2025-06-12'
                  nullable: false
                from_time:
                  type: string
                  description: 'Optional. Required if partial leave is selected. Format: HH:MM.'
                  example: '09:00'
                  nullable: false
                to_time:
                  type: string
                  description: 'Optional. Required if partial leave is selected. Format: HH:MM.'
                  example: '13:00'
                  nullable: false
                partialLeave:
                  type: string
                  description: 'Optional. If "on", indicates it''s a partial leave.'
                  example: 'on'
                  nullable: false
                leaveVisibleToAll:
                  type: string
                  description: 'Optional. If "on", the leave will be visible to all users.'
                  example: 'on'
                  nullable: false
                visible_to_ids:
                  type: array
                  description: 'Optional. List of user IDs who can view this leave (if leaveVisibleToAll is not set).'
                  example:
                    - 2
                    - 3
                    - 4
                  items:
                    type: string
                status:
                  type: string
                  description: 'optional New status of the leave. Allowed values: pending, approved, rejected. Required if user is admin or leave editor.'
                  example: approved
                  nullable: false
              required:
                - id
                - reason
                - from_date
                - to_date
    delete:
      summary: 'Delete a leave request by ID.'
      operationId: deleteALeaveRequestByID
      description: ''
      parameters:
        -
          in: header
          name: workspace_id
          description: ''
          example: '2'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: false
                  message: 'Leave request deleted successfully.'
                  id: 1
                  type: leave_request
                  data: []
                properties:
                  error:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Leave request deleted successfully.'
                  id:
                    type: integer
                    example: 1
                  type:
                    type: string
                    example: leave_request
                  data:
                    type: array
                    example: []
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'Leave request not found.'
                  data: []
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Leave request not found.'
                  data:
                    type: array
                    example: []
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: true
                  message: 'An error occurred while deleting the leave request.'
                  data: []
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'An error occurred while deleting the leave request.'
                  data:
                    type: array
                    example: []
      tags:
        - 'leaverequest Managemant'
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'Optional parameter. Optional. Leave request ID. If provided, returns only that leave request.'
        required: true
        schema:
          type: integer
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: 17
