openapi: 3.0.0
paths:
  /api/connection:
    get:
      operationId: AppController_connectionCheck
      parameters: []
      responses:
        "200":
          description: Success
      tags: &a1
        - App Connection
  /api/health:
    get:
      operationId: AppController_healthCheck
      parameters: []
      responses:
        "200":
          description: ""
      tags: *a1
  /api/product/stock/{inventoryItemId}:
    get:
      operationId: ProductController_getProductStockDetails
      parameters:
        - name: inventoryItemId
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/product/categories:
    get:
      operationId: ProductController_getProductCategories
      parameters: []
      responses:
        "200":
          description: Success
  /api/product/top-selling:
    get:
      operationId: ProductController_getTopSellingProducts
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
      responses:
        "200":
          description: Success
  /api/product:
    post:
      operationId: ProductController_createProduct
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateProductDto"
      responses:
        "200":
          description: Success
    get:
      operationId: ProductController_getProducts
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
        - name: query
          required: false
          in: query
          description: Query to search products
          schema:
            type: string
        - name: category
          required: false
          in: query
          description: Category to filter products
          schema:
            type: array
            items:
              type: string
        - name: price
          required: false
          in: query
          description: Query to search products by price range
          schema:
            type: number
        - name: status
          required: false
          in: query
          description: Status of the product
          schema:
            enum:
              - Deleted
              - Pending
              - Deactivated
              - Active
            type: string
      responses:
        "200":
          description: Success
  /api/product/{id}:
    get:
      operationId: ProductController_getProduct
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
    put:
      operationId: ProductController_updateProduct
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateProductDto"
      responses:
        "200":
          description: Success
    delete:
      operationId: ProductController_deleteProduct
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/product/inventory/{inventoryItemId}:
    put:
      operationId: ProductController_updateProductByInventoryItemId
      parameters:
        - name: inventoryItemId
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateProductDto"
      responses:
        "200":
          description: Success
  /api/activity-log:
    get:
      operationId: LogsController_getAllLogs
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
        - name: createDate
          required: false
          in: query
          description: Start date range of the logs
          schema:
            format: date-time
            type: string
        - name: startDate
          required: false
          in: query
          description: Start date range of the logs
          schema:
            format: date-time
            type: string
        - name: endDate
          required: false
          in: query
          description: End date range of the logs
          schema:
            format: date-time
            type: string
        - name: sort
          required: false
          in: query
          description: Sort batch by
          schema:
            type: string
        - name: userId
          required: false
          in: query
          description: Filter by userId
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/activity-log/user:
    get:
      operationId: LogsController_getUserLogs
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
        - name: createDate
          required: false
          in: query
          description: Start date range of the logs
          schema:
            format: date-time
            type: string
        - name: startDate
          required: false
          in: query
          description: Start date range of the logs
          schema:
            format: date-time
            type: string
        - name: endDate
          required: false
          in: query
          description: End date range of the logs
          schema:
            format: date-time
            type: string
        - name: sort
          required: false
          in: query
          description: Sort batch by
          schema:
            type: string
        - name: userId
          required: false
          in: query
          description: Filter by userId
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/activity-log/{id}:
    get:
      operationId: LogsController_getLogs
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/role:
    post:
      operationId: RoleController_createRole
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateRoleDto"
      responses:
        "200":
          description: Success
    get:
      operationId: RoleController_getRoles
      parameters: []
      responses:
        "200":
          description: Success
  /api/role/{id}:
    put:
      operationId: RoleController_updateRole
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateRoleDto"
      responses:
        "200":
          description: Success
    get:
      operationId: RoleController_getRole
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
    delete:
      operationId: RoleController_deleteRole
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/role/permission/{id}:
    put:
      operationId: RoleController_updateRolePermissions
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateRolePermissionsDto"
      responses:
        "200":
          description: Permissions updated successfully
  /api/auth/login:
    post:
      operationId: AuthController_login
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LoginDto"
      responses:
        "200":
          description: Success
        "400":
          description: Account not found with this email address, Invalid password change
            code, Please authenticate first
  /api/auth/signup:
    post:
      operationId: AuthController_signUp
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SignupDto"
      responses:
        "200":
          description: Success
        "400":
          description: Email already exists, Please authenticate first
  /api/auth/email-verification:
    post:
      operationId: AuthController_verifyEmail
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EmailVerificationDto"
      responses:
        "200":
          description: Verification code has been sent to the email address
        "400":
          description: User not found, Account is already verified, Invalid code
  /api/auth/forgot-password:
    post:
      operationId: AuthController_forgotPassword
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ForgotPasswordDto"
      responses:
        "200":
          description: Verification code has been sent to the email address
        "400":
          description: Account not found with this email address
  /api/auth/forgot-password/change-password:
    post:
      operationId: AuthController_forgotPasswordChange
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ForgotPassChangeDto"
      responses:
        "200":
          description: Success
        "400":
          description: Account not found with this email address, Invalid code
  /api/auth/forgot-password/validate-code:
    post:
      operationId: AuthController_validateCode
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ValidateCodeDto"
      responses:
        "200":
          description: Success
        "400":
          description: Account not found with this email address, Invalid code
  /api/auth/verification-code:
    post:
      operationId: AuthController_resendCode
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ResendCodeDto"
      responses:
        "200":
          description: Success
        "400":
          description: Account not found with this email address
  /api/team:
    get:
      operationId: TeamController_getTeams
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
        - name: query
          required: false
          in: query
          description: Query for general search
          schema:
            type: string
        - name: city
          required: false
          in: query
          description: Query to search teams by city
          schema:
            type: string
        - name: region
          required: false
          in: query
          description: Query to search teams by region
          schema:
            type: string
        - name: area
          required: false
          in: query
          description: Query to search teams by area
          schema:
            type: string
        - name: operatingUnitId
          required: false
          in: query
          description: OperatingUnit Id
          schema:
            type: number
        - name: reportingManagerId
          required: false
          in: query
          description: Reporting Manager Id
          schema:
            type: number
        - name: operatingUnitName
          required: false
          in: query
          description: Query to search teams by area
          schema:
            type: string
        - name: customerSegment
          required: false
          in: query
          description: Query to search teams by area
          schema:
            type: string
        - name: type
          required: false
          in: query
          description: type to search teams by area
          schema:
            type: string
        - name: segment
          required: false
          in: query
          description: type to search teams by area
          schema:
            type: string
      responses:
        "200":
          description: Success
    post:
      operationId: TeamController_createTeam
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateTeamDto"
      responses:
        "200":
          description: Success
  /api/team/{id}:
    get:
      operationId: TeamController_getTeam
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
        - name: query
          required: false
          in: query
          description: Query for general search
          schema:
            type: string
      responses:
        "200":
          description: Success
    delete:
      operationId: TeamController_deleteTeam
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/team/update/{id}:
    put:
      operationId: TeamController_updateTeam
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateTeamDto"
      responses:
        "200":
          description: Success
  /api/team/add:
    put:
      operationId: TeamController_addTeamMember
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AddTeamMemberDto"
      responses:
        "200":
          description: Success
  /api/team/add/multiple:
    put:
      operationId: TeamController_addUserToTeams
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AddUserToTeamDto"
      responses:
        "200":
          description: Success
  /api/team/remove/multiple:
    put:
      operationId: TeamController_removeUserFromTeams
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RemoveUserToTeamDto"
      responses:
        "200":
          description: Success
  /api/team/remove:
    put:
      operationId: TeamController_removeTeamMember
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RemoveTeamMemberDto"
      responses:
        "200":
          description: Success
  /api/user:
    get:
      operationId: UserController_getUser
      parameters: []
      responses:
        "200":
          description: Success
    put:
      operationId: UserController_update
      parameters: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: "#/components/schemas/UpdateUserProfileDto"
      responses:
        "200":
          description: Success
  /api/user/password/update:
    post:
      operationId: UserController_updatePassword
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdatePasswordDto"
      responses:
        "200":
          description: Success
  /api/customer/segments:
    get:
      operationId: CustomerController_getCustomerSegments
      parameters: []
      responses:
        "200":
          description: Success
  /api/customer:
    post:
      operationId: CustomerController_createCustomer
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateCustomerDto"
      responses:
        "200":
          description: Success
    get:
      operationId: CustomerController_getAllCustomers
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
        - name: query
          required: false
          in: query
          description: Search query for customer name, email, city, country, salesArea,
            strnStatus, or itFillerStatus
          schema:
            type: string
        - name: status
          required: false
          in: query
          description: Status of the customer
          schema:
            enum:
              - Deleted
              - Pending
              - Deactivated
              - Active
            type: string
        - name: division
          required: false
          in: query
          description: Filter by division
          schema:
            type: string
        - name: district
          required: false
          in: query
          description: Filter by district
          schema:
            type: string
        - name: city
          required: false
          in: query
          description: Filter by city
          schema:
            type: string
        - name: salesArea
          required: false
          in: query
          description: Filter by sales area
          schema:
            type: string
        - name: town
          required: false
          in: query
          description: Filter by town
          schema:
            type: string
        - name: classification
          required: false
          in: query
          description: Filter by classification
          schema:
            type: string
        - name: segment
          required: false
          in: query
          description: Filter by segment
          schema:
            type: string
        - name: customerType
          required: false
          in: query
          description: Filter by customer type
          schema:
            type: string
      responses:
        "200":
          description: Success
  /api/customer/note:
    post:
      operationId: CustomerController_createNote
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateNoteDto"
      responses:
        "200":
          description: Success
  /api/customer/note/{id}:
    put:
      operationId: CustomerController_updateNote
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateNoteDto"
      responses:
        "200":
          description: Success
    delete:
      operationId: CustomerController_deleteNote
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/customer/customer-notes:
    get:
      operationId: CustomerController_getAllCustomerNotes
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
      responses:
        "200":
          description: Success
    post:
      operationId: CustomerController_createCustomerNote
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateCustomerNotesDto"
      responses:
        "200":
          description: Success
  /api/customer/customer-notes/{id}:
    get:
      operationId: CustomerController_getCustomerNoteById
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
        "404":
          description: Notes not exists
    put:
      operationId: CustomerController_updateCustomerNote
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateCustomerNotesDto"
      responses:
        "200":
          description: Success
        "404":
          description: Notes not exists
    delete:
      operationId: CustomerController_deleteCustomerNote
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/customer/{id}:
    get:
      operationId: CustomerController_getCustomer
      parameters:
        - name: orderStatus
          required: false
          in: query
          description: Status of the orders placed by customer
          schema:
            type: string
      responses:
        "200":
          description: Success
    delete:
      operationId: CustomerController_deleteCustomer
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/customer/{erpId}:
    put:
      operationId: CustomerController_updateCustomer
      parameters:
        - name: erpId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateCustomerDto"
      responses:
        "200":
          description: Success
  /api/notifications:
    get:
      operationId: NotificationsController_getAllNotifications
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
        - name: createDate
          required: false
          in: query
          description: Start date range of the notification
          schema:
            format: date-time
            type: string
        - name: startDate
          required: false
          in: query
          description: Start date range of the notification
          schema:
            format: date-time
            type: string
        - name: endDate
          required: false
          in: query
          description: End date range of the notification
          schema:
            format: date-time
            type: string
        - name: sort
          required: false
          in: query
          description: Sort batch by
          schema:
            type: string
        - name: userId
          required: false
          in: query
          description: Filter by userId
          schema:
            type: number
      responses:
        "200":
          description: Success
    post:
      operationId: NotificationsController_createNotification
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateNotificationDto"
      responses:
        "201":
          description: Success
  /api/notifications/user:
    get:
      operationId: NotificationsController_getUserNotifications
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
        - name: createDate
          required: false
          in: query
          description: Start date range of the notification
          schema:
            format: date-time
            type: string
        - name: startDate
          required: false
          in: query
          description: Start date range of the notification
          schema:
            format: date-time
            type: string
        - name: endDate
          required: false
          in: query
          description: End date range of the notification
          schema:
            format: date-time
            type: string
        - name: sort
          required: false
          in: query
          description: Sort batch by
          schema:
            type: string
        - name: userId
          required: false
          in: query
          description: Filter by userId
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/notifications/{id}:
    get:
      operationId: NotificationsController_getNotification
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/orders:
    post:
      operationId: OrderController_createOrder
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateOrderDto"
      responses:
        "200":
          description: Success
    get:
      operationId: OrderController_getOrders
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Query to search products by name
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
        - name: userId
          required: false
          in: query
          description: Query to search products by name
          schema:
            type: number
        - name: status
          required: false
          in: query
          description: Query to search products by category
          schema:
            type: string
        - name: query
          required: false
          in: query
          description: Query to search orders by customer name
          schema:
            type: string
        - name: trackingNumber
          required: false
          in: query
          description: Query to search products by brand
          schema:
            type: string
      responses:
        "200":
          description: Success
  /api/orders/stats:
    get:
      operationId: OrderController_getOrderStats
      parameters: []
      responses:
        "200":
          description: Success
  /api/orders/{id}:
    get:
      operationId: OrderController_getOrder
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
    put:
      operationId: OrderController_updateOrder
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateOrderDto"
      responses:
        "200":
          description: Success
    delete:
      operationId: OrderController_deleteOrder
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/orders/status/{id}:
    put:
      operationId: OrderController_updateOrderStatus
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateOrderStatusDto"
      responses:
        "200":
          description: Success
  /api/lead:
    post:
      operationId: LeadController_createLead
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateLeadDto"
      responses:
        "200":
          description: Success
        "400":
          description: Please authenticate first
    get:
      operationId: LeadController_getAllLeads
      parameters: []
      responses:
        "200":
          description: Success
        "404":
          description: Lead Not found
  /api/lead/assign/{id}:
    post:
      operationId: LeadController_assignLead
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AssignLeadDto"
      responses:
        "200":
          description: Success
        "404":
          description: Lead Not found
  /api/lead/score/{id}:
    post:
      operationId: LeadController_updateScore
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateScoreDto"
      responses:
        "200":
          description: Success
        "404":
          description: Lead Not found
  /api/lead/status/{id}:
    post:
      operationId: LeadController_updateLeadStatus
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateLeadStatusDto"
      responses:
        "200":
          description: Success
        "404":
          description: Lead Not found
  /api/lead/{id}:
    put:
      operationId: LeadController_updateLead
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateLeadDto"
      responses:
        "200":
          description: Success
        "404":
          description: Lead Not found
    delete:
      operationId: LeadController_deleteLead
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
        "404":
          description: Lead Not found
  /api/admin/users:
    get:
      operationId: AdminController_getUsers
      parameters:
        - name: status
          required: false
          in: query
          description: Status filteration
          schema:
            type: string
        - name: page
          required: false
          in: query
          description: Page number
          schema:
            type: number
        - name: limit
          required: false
          in: query
          description: Page data limit
          schema:
            type: number
        - name: roleId
          required: false
          in: query
          description: Role id associated with the user
          schema:
            type: number
        - name: query
          required: false
          in: query
          description: FirstName, LastName, Email associated with the user
          schema:
            type: string
        - name: isVerified
          required: false
          in: query
          description: isVerified associated with the user
          schema:
            type: boolean
        - name: excludePositions
          required: false
          in: query
          description: If true, excludes users with positions System Administrator (SA)
            and Sales Representative (SR)
          schema:
            type: boolean
        - name: positionName
          required: false
          in: query
          description: Filter users by position name
          schema:
            enum:
              - System Administrator (SA)
              - Head of Sales (HOS)
              - Business Units (BU)
              - National Sales Manager - Customer Segment (NSM-CS)
              - Regional Sales Manager (RSM)
              - Branch Manager (BM)
              - Sales Representative (SR)
            type: string
        - name: operatingUnitId
          required: false
          in: query
          description: Filter users by operating unit ID
          schema:
            type: array
            items:
              type: string
        - name: customerSegmentId
          required: false
          in: query
          description: Filter users by customer segment ID
          schema:
            type: array
            items:
              type: string
      responses:
        "200":
          description: Success
  /api/admin/user/{id}:
    get:
      operationId: AdminController_getUser
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/admin/update-user/{identifier}:
    put:
      operationId: AdminController_updateUser
      parameters: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: "#/components/schemas/UpdateUserDto"
      responses:
        "200":
          description: Success
  /api/admin/complaints/status/{id}:
    put:
      operationId: AdminController_updateComplaintStatus
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateComplaintStatusDto"
      responses:
        "200":
          description: Success
  /api/complaint:
    post:
      operationId: ComplaintsController_createComplaint
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateComplaintDto"
      responses:
        "200":
          description: Success
      tags: &a2
        - Complaint
    get:
      operationId: ComplaintsController_getComplaints
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
        - name: query
          required: false
          in: query
          description: search query filter
          schema:
            type: string
        - name: createdById
          required: false
          in: query
          description: created by filter
          schema:
            type: number
        - name: isActive
          required: false
          in: query
          description: Active filte
          schema:
            type: boolean
        - name: sort
          required: false
          in: query
          description: Sort by latest
          schema:
            type: string
        - name: status
          required: false
          in: query
          description: Status filter
          schema:
            type: string
        - name: startDate
          required: false
          in: query
          description: Start date duration filter
          schema:
            format: date-time
            type: string
        - name: endDate
          required: false
          in: query
          description: End date duration filter
          schema:
            format: date-time
            type: string
      responses:
        "200":
          description: Success
      tags: *a2
  /api/complaint/stats:
    get:
      operationId: ComplaintsController_getComplaintStats
      parameters:
        - name: startDate
          required: false
          in: query
          description: The start date for the complaint stats
          schema:
            format: date-time
            type: string
        - name: endDate
          required: false
          in: query
          description: The end date for the complaint stats
          schema:
            format: date-time
            type: string
        - name: userId
          required: false
          in: query
          description: Filter by user ID who created the complaint
          schema:
            type: number
      responses:
        "200":
          description: Success
      tags: *a2
  /api/complaint/{id}:
    get:
      operationId: ComplaintsController_getComplaint
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        "200":
          description: Success
      tags: *a2
    put:
      operationId: ComplaintsController_update
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateComplaintDto"
      responses:
        "200":
          description: Success
      tags: *a2
    delete:
      operationId: ComplaintsController_deleteComplaint
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
      tags: *a2
  /api/location:
    get:
      operationId: LocationController_updatePassword
      parameters: []
      responses:
        "200":
          description: Success
  /api/location/region:
    post:
      operationId: LocationController_createRegion
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateRegionDto"
      responses:
        "200":
          description: Success
  /api/location/segment:
    post:
      operationId: LocationController_createSegment
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateSegmentsDto"
      responses:
        "200":
          description: Success
  /api/location/operating-unit:
    post:
      operationId: LocationController_createOperationUnits
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateOperatingUnitDto"
      responses:
        "200":
          description: Success
  /api/location/regions:
    get:
      operationId: LocationController_getRegions
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
      responses:
        "200":
          description: Success
  /api/location/segments:
    get:
      operationId: LocationController_getSegments
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
      responses:
        "200":
          description: Success
  /api/location/operating-units:
    get:
      operationId: LocationController_getOperationUnits
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
      responses:
        "200":
          description: Success
  /api/sales-target:
    post:
      operationId: SalesTargetController_create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateSalesTargetDto"
      responses:
        "200":
          description: Success
        "400":
          description: Email already exists, Please authenticate first
    get:
      operationId: SalesTargetController_findAll
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
        - name: query
          required: false
          in: query
          description: Search query filter
          schema:
            type: string
        - name: status
          required: false
          in: query
          description: Status of the lead
          schema:
            type: string
        - name: period
          required: false
          in: query
          description: Target period
          schema:
            example: Weekly
            type: string
        - name: type
          required: false
          in: query
          description: Assignee type
          schema:
            type: string
        - name: userId
          required: false
          in: query
          description: Search by user
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/sales-target/{id}:
    put:
      operationId: SalesTargetController_update
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateSalesTargetDto"
      responses:
        "200":
          description: Success
    get:
      operationId: SalesTargetController_getSalesTarget
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
    delete:
      operationId: SalesTargetController_remove
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/sales-target/kpi-commission:
    get:
      operationId: SalesTargetController_getKPIAndCommission
      parameters:
        - name: userId
          required: true
          in: query
          schema:
            type: number
        - name: startDate
          required: true
          in: query
          schema:
            format: date-time
            type: string
        - name: endDate
          required: true
          in: query
          schema:
            format: date-time
            type: string
      responses:
        "200":
          description: ""
  /api/sales-record:
    get:
      operationId: SalesRecordController_getSalesRecords
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
        - name: query
          required: false
          in: query
          description: Search query filter
          schema:
            type: string
        - name: status
          required: false
          in: query
          description: Status of the lead
          schema:
            type: string
        - name: userId
          required: false
          in: query
          description: Search by user
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/sales-record/{id}:
    get:
      operationId: SalesRecordController_getSalesRecord
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/survey:
    post:
      operationId: SurveyController_createSurvey
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateSurveyDto"
      responses:
        "200":
          description: Success
        "400":
          description: Please authenticate first
    get:
      operationId: SurveyController_getSurveys
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
        - name: query
          required: false
          in: query
          description: name of the survey for search
          schema:
            type: string
        - name: startDate
          required: false
          in: query
          description: Start date of the survey
          schema:
            format: date-time
            type: string
        - name: endDate
          required: false
          in: query
          description: End date of the survey
          schema:
            format: date-time
            type: string
      responses:
        "200":
          description: Success
  /api/survey/{id}:
    put:
      operationId: SurveyController_updateSurvey
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateSurveyDto"
      responses:
        "200":
          description: Success
    delete:
      operationId: SurveyController_deleteSurvey
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
    get:
      operationId: SurveyController_getSurvey
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/survey/mobile-view:
    get:
      operationId: SurveyController_getSurveyList
      parameters: []
      responses:
        "200":
          description: Success
  /api/survey/question:
    post:
      operationId: SurveyController_createQuestion
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateQuestionDto"
      responses:
        "200":
          description: Success
  /api/survey/question/{id}:
    put:
      operationId: SurveyController_updateQuestion
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateQuestionDto"
      responses:
        "200":
          description: Success
    get:
      operationId: SurveyController_getQuestion
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
    delete:
      operationId: SurveyController_deleteQuestion
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/survey/answerOpt/{id}:
    delete:
      operationId: SurveyController_deleteAnswerOpt
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/survey/response:
    post:
      operationId: SurveyController_createResponse
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateResponseDto"
      responses:
        "200":
          description: Success
    get:
      operationId: SurveyController_getResponses
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
        - name: query
          required: false
          in: query
          description: Id of survey
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/survey/response/{id}:
    get:
      operationId: SurveyController_getResponse
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
    delete:
      operationId: SurveyController_deleteResponse
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/survey/response-detail/{id}:
    get:
      operationId: SurveyController_getResponseDetail
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        "200":
          description: Success
    delete:
      operationId: SurveyController_deleteResponseDetail
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/survey/response-stat:
    get:
      operationId: SurveyController_getResponseDetailStat
      parameters:
        - name: surveyId
          required: true
          in: query
          description: Id of survey
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/survey/dashboard:
    get:
      operationId: SurveyController_getDasboardView
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
        - name: startDate
          required: false
          in: query
          description: Start date of the annuncement
          schema:
            format: date-time
            type: string
        - name: endDate
          required: false
          in: query
          description: End date of the annuncement
          schema:
            format: date-time
            type: string
      responses:
        "200":
          description: Success
  /api/survey/participant:
    post:
      operationId: SurveyController_createParticipnat
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateParticipantDto"
      responses:
        "200":
          description: Success
  /api/survey/participant/{id}:
    put:
      operationId: SurveyController_updateParticipant
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateParticipantDto"
      responses:
        "200":
          description: Success
    get:
      operationId: SurveyController_getParticipant
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        "200":
          description: Success
  /api/survey/pos-survey:
    post:
      operationId: SurveyController_createPosSurvey
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreatePosSurvey"
      responses:
        "200":
          description: Success
    get:
      operationId: SurveyController_getPosSurveys
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
      responses:
        "200":
          description: Success
  /api/survey/pos-survey/{id}:
    get:
      operationId: SurveyController_getPosSurvey
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/marketing:
    get:
      operationId: MarketingController_getMarketings
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
        - name: query
          required: false
          in: query
          description: Searchig query marketing
          schema:
            type: string
        - name: createDate
          required: false
          in: query
          description: Start date of the marketing
          schema:
            format: date-time
            type: string
        - name: startDate
          required: false
          in: query
          description: Start date of the marketing
          schema:
            format: date-time
            type: string
        - name: endDate
          required: false
          in: query
          description: End date of the marketing
          schema:
            format: date-time
            type: string
        - name: sort
          required: true
          in: query
          description: Sort batch by
          schema:
            type: string
        - name: status
          required: true
          in: query
          description: Filter by status
          schema:
            type: string
      responses:
        "200":
          description: Success
    post:
      operationId: MarketingController_createMarketing
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateMarketingDto"
      responses:
        "201":
          description: Success
  /api/marketing/{id}:
    get:
      operationId: MarketingController_getMarketing
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
    put:
      operationId: MarketingController_updateMarketing
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateMarketingDto"
      responses:
        "200":
          description: Success
    delete:
      operationId: MarketingController_deleteMarketing
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "204":
          description: Success
  /api/meeting-scheduler:
    post:
      operationId: MeetingSchedulerController_createMeeting
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateMeetingDto"
      responses:
        "200":
          description: Success
    get:
      operationId: MeetingSchedulerController_GetAllMeetings
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
        - name: date
          required: false
          in: query
          description: Date of the meeting
          schema:
            type: string
        - name: startDate
          required: true
          in: query
          description: Start Date
          schema:
            format: date-time
            type: string
        - name: endDate
          required: true
          in: query
          description: End Date
          schema:
            format: date-time
            type: string
        - name: subject
          required: false
          in: query
          description: Subject of the meeting
          schema:
            type: string
        - name: eventType
          required: false
          in: query
          description: Event type of Meeting
          schema:
            enum:
              - Customer
              - Architect
              - Consultant
              - Site Engineer
              - Customer Meeting
            type: string
      responses:
        "200":
          description: Success
  /api/meeting-scheduler/lead:
    post:
      operationId: MeetingSchedulerController_createMeetingForLead
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateLeadMeetingDto"
      responses:
        "200":
          description: Success
        "400":
          description: Time Slot not available
        "404":
          description: Lead Not found
    get:
      operationId: MeetingSchedulerController_getMeetings
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
        - name: salesRepId
          required: false
          in: query
          description: Filter meetings by Sales Representative ID. If not provided,
            defaults to logged-in user.
          schema:
            example: 15
            type: number
        - name: date
          required: false
          in: query
          description: Exact date of the meeting (YYYY-MM-DD)
          schema:
            format: date-time
            type: string
        - name: startDate
          required: false
          in: query
          description: Filter meetings from this start date
          schema:
            format: date-time
            type: string
        - name: endDate
          required: false
          in: query
          description: Filter meetings up to this end date
          schema:
            format: date-time
            type: string
        - name: subject
          required: false
          in: query
          description: Search by meeting subject (partial match)
          schema:
            type: string
        - name: eventType
          required: false
          in: query
          description: Filter by meeting type
          schema:
            enum:
              - Customer
              - Architect
              - Consultant
              - Site Engineer
              - Customer Meeting
            type: string
      responses:
        "200":
          description: Success
  /api/meeting-scheduler/{id}:
    put:
      operationId: MeetingSchedulerController_updateMeeting
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateMeetingDto"
      responses:
        "200":
          description: Success
    delete:
      operationId: MeetingSchedulerController_deleteMeeting
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
    get:
      operationId: MeetingSchedulerController_getMeeting
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/discount:
    post:
      operationId: DiscountController_createDiscount
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateDiscountDto"
      responses:
        "200":
          description: Success
    get:
      operationId: DiscountController_getDiscounts
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
        - name: query
          required: false
          in: query
          description: Query to search discounts
          schema:
            type: string
        - name: status
          required: false
          in: query
          description: Filter by status
          schema:
            enum:
              - Deleted
              - Pending
              - Deactivated
              - Active
            type: string
        - name: usedCount
          required: false
          in: query
          description: Use count of the discount
          schema:
            type: number
        - name: type
          required: false
          in: query
          description: Type of discount, either Percentage or Flat
          schema:
            enum:
              - Flat
              - Percentage
            type: string
        - name: amount
          required: false
          in: query
          description: Amount of the discount
          schema:
            type: number
        - name: minAmount
          required: false
          in: query
          description: Min amount of the discount
          schema:
            type: number
        - name: maxUsage
          required: false
          in: query
          description: Maximum usage allowed for the discount
          schema:
            type: number
        - name: validFrom
          required: false
          in: query
          description: Start date of the discount validity
          schema:
            format: date-time
            type: string
        - name: validTill
          required: false
          in: query
          description: End date of the discount validity
          schema:
            format: date-time
            type: string
        - name: productId
          required: false
          in: query
          description: Product id filter
          schema:
            type: number
        - name: regionId
          required: false
          in: query
          description: Region id filter
          schema:
            type: number
        - name: categoryId
          required: false
          in: query
          description: Category id filter
          schema:
            type: number
        - name: userId
          required: false
          in: query
          description: User id filter
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/discount/{id}:
    get:
      operationId: DiscountController_getDiscount
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
    put:
      operationId: DiscountController_updateDiscount
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateDiscountDto"
      responses:
        "200":
          description: Success
    delete:
      operationId: DiscountController_deleteDiscount
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/tax:
    post:
      operationId: TaxController_createTax
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateTaxDto"
      responses:
        "201":
          description: Success
    get:
      operationId: TaxController_getTaxes
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
        - name: query
          required: false
          in: query
          description: Query to search taxes
          schema:
            type: string
        - name: isActive
          required: false
          in: query
          description: Filter by status
          schema:
            type: string
        - name: forFiler
          required: false
          in: query
          description: For filer or non filer
          schema:
            type: boolean
        - name: value
          required: false
          in: query
          description: Amount of the tax
          schema:
            type: number
        - name: minAmount
          required: false
          in: query
          description: Min amount of the tax
          schema:
            type: number
        - name: maxAmount
          required: false
          in: query
          description: Min amount of the tax
          schema:
            type: number
        - name: productIds
          required: false
          in: query
          description: Product ids filter
          schema:
            type: array
            items:
              type: string
        - name: categories
          required: false
          in: query
          description: Category names filter
          schema:
            type: array
            items:
              type: string
        - name: regionId
          required: false
          in: query
          description: Region id filter
          schema:
            type: number
        - name: userId
          required: false
          in: query
          description: User id filter
          schema:
            type: number
      responses:
        "201":
          description: Success
  /api/tax/{id}:
    get:
      operationId: TaxController_getTax
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "201":
          description: Success
    put:
      operationId: TaxController_updateTax
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateTaxDto"
      responses:
        "201":
          description: Success
    delete:
      operationId: TaxController_deleteTax
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "201":
          description: Success
  /api/stock-take:
    post:
      operationId: StockTakeManagementController_createStockTake
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateStockTakeDto"
      responses:
        "201":
          description: ""
    get:
      operationId: StockTakeManagementController_getStockTakes
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            default: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            default: 10
            type: number
        - name: query
          required: false
          in: query
          description: Search by product name or customer name
          schema:
            type: string
        - name: customerId
          required: false
          in: query
          description: Filter by customer ID
          schema:
            type: number
        - name: pjpId
          required: false
          in: query
          description: Filter by PJP ID
          schema:
            type: number
        - name: stockStatus
          required: false
          in: query
          description: Filter by stock status
          schema:
            enum:
              - Manual Counting
              - Barcode Scanning
            type: string
      responses:
        "200":
          description: ""
  /api/stock-take/{id}:
    put:
      operationId: StockTakeManagementController_updateStockTake
      summary: Update a stock take record by ID
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateStockTakeDto"
      responses:
        "200":
          description: ""
  /api/upload:
    post:
      operationId: FileStorageController_uploadFileStorage
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UploadFileStorageDto"
      responses:
        "201":
          description: Success
    get:
      operationId: FileStorageController_getFilesStorage
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
        - name: type
          required: false
          in: query
          description: Module name for file to be upload
          schema:
            enum:
              - Product
              - Role
              - Auth
              - Team
              - User
              - Customer
              - Order
              - Lead
              - Admin
              - Complaint
              - Location
              - Sales target
              - Sales record
              - Survey
              - Logs
              - Notifications
              - Marketing
              - Meeting scheduler
              - Discount
              - Tax
              - Stock take management
            type: string
        - name: createDate
          required: false
          in: query
          description: Created date of the document
          schema:
            format: date-time
            type: string
        - name: startDate
          required: false
          in: query
          description: Start date of the document
          schema:
            format: date-time
            type: string
        - name: endDate
          required: false
          in: query
          description: End date of the document
          schema:
            format: date-time
            type: string
        - name: sort
          required: false
          in: query
          description: Sort documents by
          schema:
            type: string
      responses:
        "200":
          description: Success
  /api/upload/{id}:
    get:
      operationId: FileStorageController_getFileStorage
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
    put:
      operationId: FileStorageController_updateFileStorage
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateFileStorageDto"
      responses:
        "201":
          description: Success
    delete:
      operationId: FileStorageController_deleteFileStorage
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/position:
    post:
      operationId: PositionController_createPosition
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreatePositionDto"
      responses:
        "200":
          description: Success
    get:
      operationId: PositionController_getRoles
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
      responses:
        "200":
          description: Success
  /api/position/{id}:
    put:
      operationId: PositionController_updatePosition
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdatePositionDto"
      responses:
        "200":
          description: Success
    get:
      operationId: PositionController_getPosition
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
    delete:
      operationId: PositionController_deletePosition
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/metrics/kpis:
    post:
      operationId: KpiController_createKpi
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateKpiDto"
      responses:
        "201":
          description: ""
    get:
      operationId: KpiController_getAllKpis
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
        - name: query
          required: true
          in: query
          description: query params of kpi
          schema:
            type: string
        - name: operatingUnit
          required: true
          in: query
          description: operating unit  of kpis
          schema:
            type: number
        - name: type
          required: true
          in: query
          description: type params of kpi
          schema:
            type: string
      responses:
        "200":
          description: ""
  /api/metrics/kpis/{id}:
    put:
      operationId: KpiController_updateKpi
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateKpiDto"
      responses:
        "200":
          description: ""
    get:
      operationId: KpiController_getKpiById
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: ""
  /api/metrics/kpis-items:
    post:
      operationId: KpiController_addKpiItems
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AddKpiItemsDto"
      responses:
        "201":
          description: ""
  /api/metrics/kpi-items/{id}:
    put:
      operationId: KpiController_updateKpiItem
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateKpiItemDto"
      responses:
        "200":
          description: ""
  /api/metrics/team-kpi:
    get:
      operationId: KpiController_getTeams
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 5
            type: number
        - name: customerId
          required: false
          in: query
          description: Customer ID to filter POS surveys
          schema:
            example: 41
            type: number
        - name: pjpId
          required: false
          in: query
          description: PJP ID to filter POS surveys
          schema:
            example: 1
            type: number
        - name: query
          required: false
          in: query
          description: Query for general search
          schema:
            type: string
        - name: city
          required: false
          in: query
          description: Query to search teams by city
          schema:
            type: string
        - name: region
          required: false
          in: query
          description: Query to search teams by region
          schema:
            type: string
        - name: area
          required: false
          in: query
          description: Query to search teams by area
          schema:
            type: string
        - name: operatingUnitId
          required: false
          in: query
          description: OperatingUnit Id
          schema:
            type: number
        - name: reportingManagerId
          required: false
          in: query
          description: Reporting Manager Id
          schema:
            type: number
        - name: operatingUnitName
          required: false
          in: query
          description: Query to search teams by area
          schema:
            type: string
        - name: customerSegment
          required: false
          in: query
          description: Query to search teams by area
          schema:
            type: string
        - name: type
          required: false
          in: query
          description: type to search teams by area
          schema:
            type: string
        - name: segment
          required: false
          in: query
          description: type to search teams by area
          schema:
            type: string
      responses:
        "200":
          description: ""
  /api/metrics/team-kpi/{id}:
    get:
      operationId: KpiController_getTeamKpiSummary
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
        - name: type
          required: false
          in: query
          description: type of kpis
          schema:
            type: string
      responses:
        "200":
          description: ""
  /api/metrics/members/{id}:
    get:
      operationId: KpiController_getTeamMembersWithKpis
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
        - name: type
          required: false
          in: query
          description: type of kpis
          schema:
            type: string
      responses:
        "200":
          description: ""
  /api/metrics/user-kpi-summary/{userId}:
    get:
      operationId: KpiController_getUserKpiSummary
      parameters:
        - name: userId
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/pjp/navigation:
    post:
      operationId: PjpController_createPjpNavigation
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreatePjpNavigationDto"
      responses:
        "200":
          description: ""
    get:
      operationId: PjpController_getPjpNavigationByPjpId
      parameters:
        - name: pjpId
          required: true
          in: query
          description: ID of the PJP to retrieve navigation records for
          schema:
            example: 1
            type: number
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            default: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of records per page
          schema:
            default: 10
            type: number
      responses:
        "200":
          description: Navigation records retrieved successfully
          content:
            application/json:
              schema:
                type: object
  /api/pjp:
    post:
      operationId: PjpController_create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreatePjpDto"
      responses:
        "200":
          description: Success
    get:
      operationId: PjpController_getAllPjp
      parameters:
        - name: page
          required: false
          in: query
          description: Page number for pagination
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            example: 10
            type: number
        - name: customerName
          required: false
          in: query
          description: Partial customer name to filter PJPs
          schema:
            example: Customer
            type: string
        - name: salesPersonName
          required: false
          in: query
          description: Partial salesperson first or last name to filter PJPs
          schema:
            example: John
            type: string
        - name: userId
          required: false
          in: query
          description: User ID of the salesperson to filter PJPs
          schema:
            example: 1
            type: number
        - name: startDate
          required: false
          in: query
          description: Start date to filter PJPs (YYYY-MM-DD)
          schema:
            example: 2024-01-01
            type: string
        - name: endDate
          required: false
          in: query
          description: End date to filter PJPs (YYYY-MM-DD)
          schema:
            example: 2024-12-31
            type: string
      responses:
        "200":
          description: Success
  /api/pjp/start-navigation:
    post:
      operationId: PjpController_createStartNavigation
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateStartNavigationDto"
      responses:
        "200":
          description: Navigation Start record created successfully
          content:
            application/json:
              schema:
                type: object
  /api/pjp/complete-pjp:
    post:
      operationId: PjpController_completePjp
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CompletePjpDto"
      responses:
        "200":
          description: Success
  /api/pjp/complete-task:
    post:
      operationId: PjpController_completeTask
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdatePjpTaskDto"
      responses:
        "200":
          description: Success
  /api/pjp/navigation/overwrite:
    post:
      operationId: PjpController_setPjpNavigationOverwrite
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SetPjpNavigationOverwriteDto"
      responses:
        "200":
          description: ""
  /api/pjp/{id}:
    get:
      operationId: PjpController_getById
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
    put:
      operationId: PjpController_update
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdatePjpDto"
      responses:
        "200":
          description: Success
    delete:
      operationId: PjpController_delete
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
  /api/pjp/customers/{salesPersonId}:
    get:
      operationId: PjpController_getCustomersBySalesPersonOperatingUnits
      parameters:
        - name: salesPersonId
          required: true
          in: path
          schema:
            type: number
        - name: division
          required: false
          in: query
          schema:
            example: filter out the customer data based on division
            type: string
        - name: district
          required: false
          in: query
          schema:
            example: filter out the customer data based on district
            type: string
        - name: city
          required: false
          in: query
          schema:
            example: filter out the customer data based on city
            type: string
        - name: salesArea
          required: false
          in: query
          schema:
            example: filter out the customer data based on salesArea
            type: string
        - name: town
          required: false
          in: query
          schema:
            example: filter out the customer data based on town
            type: string
        - name: resourceId
          required: false
          in: query
          schema:
            example: filter out the customer data based on resource id
            type: string
        - name: operatingUnitId
          required: false
          in: query
          schema:
            example: filter out the customer data based on operating unit id
            type: string
        - name: classification
          required: false
          in: query
          schema:
            example: filter out the customer data based on classification
            type: string
        - name: segment
          required: false
          in: query
          schema:
            example: filter out the customer data based on segment
            type: string
        - name: customerType
          required: false
          in: query
          schema:
            example: filter out the customer data based on customerType
            type: string
        - name: attribute_1
          required: false
          in: query
          schema:
            example: filter out the customer data based on attribute 1
            type: string
        - name: attribute_2
          required: false
          in: query
          schema:
            example: filter out the customer data based on attribute 2
            type: string
        - name: attribute_3
          required: false
          in: query
          schema:
            example: filter out the customer data based on attribute 3
            type: string
        - name: attribute_4
          required: false
          in: query
          schema:
            example: filter out the customer data based on attribute 4
            type: string
        - name: attribute_5
          required: false
          in: query
          schema:
            example: filter out the customer data based on attribute 5
            type: string
        - name: attribute_6
          required: false
          in: query
          schema:
            example: filter out the customer data based on attribute 6
            type: string
      responses:
        "200":
          description: ""
  /api/pjp/test-cron:
    get:
      operationId: PjpController_testCron
      parameters: []
      responses:
        "200":
          description: ""
  /api/backlogs:
    post:
      operationId: BacklogsController_createBacklog
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreatePjpBacklogDto"
      responses:
        "201":
          description: ""
    get:
      operationId: BacklogsController_getAllBacklogs
      parameters: []
      responses:
        "200":
          description: ""
  /api/backlogs/all:
    get:
      operationId: BacklogsController_getAllBacklogsUnfiltered
      parameters: []
      responses:
        "200":
          description: ""
  /api/backlogs/reschedule:
    post:
      operationId: BacklogsController_rescheduleBacklog
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ReschedulePjpBacklogDto"
      responses:
        "201":
          description: ""
  /api/permission/with-permissions:
    post:
      operationId: PermissionController_createModuleWithPermissions
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateModuleWithPermissionsDto"
      responses:
        "201":
          description: Module created successfully
  /api/permission:
    get:
      operationId: PermissionController_getAllModules
      parameters: []
      responses:
        "200":
          description: Success
  /api/permission/menu:
    get:
      operationId: PermissionController_getMenuForUser
      parameters: []
      responses:
        "200":
          description: ""
  /api/permission/active:
    get:
      operationId: PermissionController_getActiveModules
      parameters: []
      responses:
        "200":
          description: Success
  /api/permission/{id}:
    get:
      operationId: PermissionController_getModule
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Success
    put:
      operationId: PermissionController_updateModule
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateModuleDto"
      responses:
        "200":
          description: Module updated successfully
    delete:
      operationId: PermissionController_deleteModule
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        "200":
          description: Module deleted successfully
  /api/permission/with-permissions/{id}:
    put:
      operationId: PermissionController_updateModuleWithPermissions
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateModuleWithPermissionsDto"
      responses:
        "200":
          description: Module and permissions updated successfully
info:
  title: Posh
  description: ""
  version: 1.0.0
  contact: {}
tags: []
servers:
  - url: http://localhost:26042
  - url: http://crm.pakistancables.com:811
  - url: http://104.236.199.131:4100
  - url: https://crmdemo.unlockvpn.com/
  - url: https://crmdemo.unlockvpn.com/login
components:
  securitySchemes:
    jwt:
      scheme: bearer
      bearerFormat: JWT
      type: http
    api_key:
      type: apiKey
      in: header
      name: x-api-key
  schemas:
    CreateProductDto:
      type: object
      properties:
        inventoryItemId:
          type: number
          description: Inventory Item ID of the product
        description:
          type: string
          description: Product description
        sku:
          type: string
          description: SKU of the product
        productCategory:
          type: string
          description: Product Category
        productSubCategory:
          type: string
          description: Product Sub-category
        productGroup:
          type: string
          description: Product Group
        voltageGrade:
          type: string
          description: Voltage Grade
        productCores:
          type: number
          description: Number of product cores
        productCSA:
          type: number
          description: Cross-sectional area (CSA)
        productColor:
          type: string
          description: Product Color
        brand:
          type: string
          description: Brand
        quantity:
          type: number
          description: Quantity
        uomCode:
          type: string
          description: UOM Code
        uomConversion:
          type: number
          description: UOM Conversion
        price:
          type: number
          description: Price
        dimension:
          type: string
          description: Dimension
        attribute1:
          type: string
          description: Attribute 1
        attribute2:
          type: string
          description: Attribute 2
        attribute3:
          type: string
          description: Attribute 3
        attribute4:
          type: string
          description: Attribute 4
        attribute5:
          type: string
          description: Attribute 5
        attribute6:
          type: string
          description: Attribute 6
        attribute_n1:
          type: number
          description: Numeric Attribute 1
        attribute_n2:
          type: number
          description: Numeric Attribute 2
        attribute_n3:
          type: number
          description: Numeric Attribute 3
        attribute_n4:
          type: number
          description: Numeric Attribute 4
        attribute_n5:
          type: number
          description: Numeric Attribute 5
        attribute_n6:
          type: number
          description: Numeric Attribute 6
        attribute_d1:
          format: date-time
          type: string
          description: Date Attribute 2
        attribute_d2:
          format: date-time
          type: string
          description: Date Attribute 2
        status:
          type: string
          description: Product Status
          enum:
            - Deleted
            - Pending
            - Deactivated
            - Active
      required:
        - inventoryItemId
        - description
        - sku
        - productCategory
        - productSubCategory
        - uomCode
        - uomConversion
    UpdateProductDto:
      type: object
      properties:
        inventoryItemId:
          type: number
          description: Inventory Item ID of the product
        description:
          type: string
          description: Product description
        sku:
          type: string
          description: SKU of the product
        productCategory:
          type: string
          description: Product Category
        productSubCategory:
          type: string
          description: Product Sub-category
        productGroup:
          type: string
          description: Product Group
        voltageGrade:
          type: string
          description: Voltage Grade
        productCores:
          type: number
          description: Number of product cores
        productCSA:
          type: number
          description: Cross-sectional area (CSA)
        productColor:
          type: string
          description: Product Color
        brand:
          type: string
          description: Brand
        quantity:
          type: number
          description: Quantity
        uomCode:
          type: string
          description: UOM Code
        uomConversion:
          type: number
          description: UOM Conversion
        price:
          type: number
          description: Price
        dimension:
          type: string
          description: Dimension
        attribute1:
          type: string
          description: Attribute 1
        attribute2:
          type: string
          description: Attribute 2
        attribute3:
          type: string
          description: Attribute 3
        attribute4:
          type: string
          description: Attribute 4
        attribute5:
          type: string
          description: Attribute 5
        attribute6:
          type: string
          description: Attribute 6
        attribute_n1:
          type: number
          description: Numeric Attribute 1
        attribute_n2:
          type: number
          description: Numeric Attribute 2
        attribute_n3:
          type: number
          description: Numeric Attribute 3
        attribute_n4:
          type: number
          description: Numeric Attribute 4
        attribute_n5:
          type: number
          description: Numeric Attribute 5
        attribute_n6:
          type: number
          description: Numeric Attribute 6
        attribute_d1:
          format: date-time
          type: string
          description: Date Attribute 2
        attribute_d2:
          format: date-time
          type: string
          description: Date Attribute 2
        status:
          type: string
          description: Product Status
          enum:
            - Deleted
            - Pending
            - Deactivated
            - Active
    CreateRoleDto:
      type: object
      properties:
        title:
          type: string
          description: Title  of the role
        permissionIds:
          description: Array of permission IDs
          type: array
          items:
            type: number
      required:
        - title
    UpdateRoleDto:
      type: object
      properties:
        title:
          type: string
          description: Title  of the role
        permissionIds:
          description: Array of permission IDs
          type: array
          items:
            type: number
      required:
        - title
    UpdateRolePermissionsDto:
      type: object
      properties:
        permissionIds:
          description: Array of permission IDs
          example:
            - 1
            - 2
            - 3
            - 5
            - 7
          type: array
          items:
            type: number
      required:
        - permissionIds
    LoginDto:
      type: object
      properties:
        email:
          type: string
          description: Email of the user
        password:
          type: string
          description: Minimum 8 characters password of the user
        fcmToken:
          type: string
          description: fcm token that allow the real time push notification
      required:
        - email
        - password
    SignupDto:
      type: object
      properties:
        firstName:
          type: string
          description: First name of the user
        lastName:
          type: string
          description: Last name of the user
        phone:
          type: string
          description: phone number of the user
        resourceId:
          type: string
          description: resource id of the user
        address:
          type: string
          description: address  of the user
        erpId:
          type: string
          description: erp resource id of user
        image:
          type: string
          description: Image of the user profile
          format: binary
        designation:
          type: string
          description: Designation of the user
        email:
          type: string
          description: Email of the user
        password:
          type: string
          description: Minimum 8 characters password of the user
      required:
        - firstName
        - lastName
        - phone
        - address
        - erpId
        - designation
        - email
        - password
    EmailVerificationDto:
      type: object
      properties:
        code:
          type: string
          description: Verification code sent on the email address
        email:
          type: string
          description: Email of the user
      required:
        - code
        - email
    ForgotPasswordDto:
      type: object
      properties:
        email:
          type: string
          description: Email of the user
      required:
        - email
    ForgotPassChangeDto:
      type: object
      properties:
        email:
          type: string
          description: Email of the user
        newPassword:
          type: string
          description: New password of the user
        confirmPassword:
          type: string
          description: Again password for confirmation
      required:
        - email
        - newPassword
        - confirmPassword
    ValidateCodeDto:
      type: object
      properties:
        code:
          type: string
          description: Verification code sent on the email address
        email:
          type: string
          description: Email of the user
      required:
        - code
        - email
    ResendCodeDto:
      type: object
      properties:
        email:
          type: string
          description: Email of the user
      required:
        - email
    CreateTeamDto:
      type: object
      properties:
        name:
          type: string
          description: Name  of the team
        operatingUnitId:
          type: number
          description: OperatingUnit Id
        type:
          type: string
          description: type  of the team
        customerSegment:
          type: string
          description: Name  of the team
      required:
        - name
        - customerSegment
    UpdateTeamDto:
      type: object
      properties:
        name:
          type: string
          description: Name  of the team
        operatingUnitId:
          type: number
          description: OperatingUnit Id
        type:
          type: string
          description: type  of the team
        reportingManagerId:
          type: number
          description: reporting manager id
        customerSegment:
          type: string
          description: customer segments  of the team
        status:
          type: string
          enum:
            - Active
            - Deactivated
          description: Status of the team
      required:
        - customerSegment
    AddTeamMemberDto:
      type: object
      properties:
        userIds:
          description: Ids of the users to be added to the team
          type: array
          items:
            type: string
        teamId:
          type: number
          description: Id of the team
      required:
        - userIds
        - teamId
    AddUserToTeamDto:
      type: object
      properties:
        teamId:
          description: Ids of the users to be added to the team
          type: array
          items:
            type: string
        userId:
          type: number
          description: Id of the team
      required:
        - teamId
        - userId
    RemoveUserToTeamDto:
      type: object
      properties:
        teamId:
          description: Ids of the users to be added to the team
          type: array
          items:
            type: string
        userId:
          type: number
          description: Id of the team
      required:
        - teamId
        - userId
    RemoveTeamMemberDto:
      type: object
      properties:
        userIds:
          description: Ids of the users to be added to the team
          type: array
          items:
            type: string
        teamId:
          type: number
          description: Id of the team
      required:
        - userIds
        - teamId
    UpdateUserProfileDto:
      type: object
      properties:
        userName:
          type: string
          description: Username of the user
        firstName:
          type: string
          description: First name of the user
        lastName:
          type: string
          description: Last name of the user
        designation:
          type: string
          description: Designation of the user
        dob:
          format: date-time
          type: string
          description: Date of birth of the user in format 'YYYY-MM-DD
        image:
          type: string
          description: Image file of the user profile
          format: binary
        bio:
          type: string
          description: Information about the user
        phoneNo:
          type: string
          description: Phone number of the user
        gender:
          type: string
          description: Gender of the user
    UpdatePasswordDto:
      type: object
      properties:
        currentPassword:
          type: string
          description: Current password of the user
        newPassword:
          type: string
          description: New password of the user
        confirmPassword:
          type: string
          description: Again password for confirmation
      required:
        - currentPassword
        - newPassword
        - confirmPassword
    CreateCustomerDto:
      type: object
      properties:
        name:
          type: string
          description: Name of the customer
        classification:
          type: string
          description: Name of the customer
        segment:
          type: string
          description: Segment of customer
        resourceId:
          type: string
          description: Resource Id of customer
        groupErpId:
          type: string
          description: Group ERP id of the customer
        operatingUnitId:
          type: number
          description: Operating Unit Id of customer
        erpId:
          type: string
          description: Erp id of the customer
        contactPersonName:
          type: string
          description: Contact person name of the customer
        email:
          type: string
          description: Email of the customer
        phoneNumber:
          type: string
          description: Phone number of the customer
        isChild:
          type: boolean
          description: isChild flag of customer
        address:
          type: string
          description: Address of the customer
        billingAddress:
          type: string
          description: Billing address of the customer
        shippingAddress:
          type: string
          description: Shipping address of the customer
        city:
          type: string
          description: City of the customer
        cnic:
          type: string
          description: CNIC number of customer
        regno:
          type: string
          description: Registration number of customer
        strn:
          type: string
          description: Strn number of customer
        ntn:
          type: string
          description: Ntn number of customer
        province:
          type: string
          description: Province in which customer resides
        division:
          type: string
          description: Division in which customer resides
        district:
          type: string
          description: District in which customer resides
        town:
          type: string
          description: Town in which customer resides
        salesArea:
          type: string
          description: sales area of the customer
        country:
          type: string
          description: Country of the customer
        postalCode:
          type: string
          description: Postal code of the customer
        creditLimit:
          type: number
          description: Credit limit for the customer
          example: 10000.5
        paymentTerms:
          type: string
          description: Payment agreements with the customer
        specialPricingAgreements:
          type: string
          description: Special pricing agreements with the customer
        latitude:
          type: number
          description: Latitude for the location
          example: 37.774929
        longitude:
          type: number
          description: Longitude for the location
          example: -122.419418
        preferredComChannel:
          type: string
          description: Preferred communication chanel of the customer
        taxInfo:
          type: string
          description: Tax information of the customer
        customerType:
          type: string
          description: The type of customer
        strnStatus:
          type: string
          description: The status of STR number of customer
        itFillerStatus:
          type: string
          description: The status of Income Tax Filling of customer
        attribute_1:
          type: string
          description: Attribute 1 of the customer
        attribute_2:
          type: string
          description: Attribute 2 of the customer
        attribute_3:
          type: string
          description: Attribute 3 of the customer
        attribute_4:
          type: string
          description: Attribute 4 of the customer
        attribute_5:
          type: string
          description: Attribute 5 of the customer
        attribute_6:
          type: string
          description: Attribute 6 of the customer
      required:
        - name
        - classification
        - segment
        - resourceId
        - groupErpId
        - operatingUnitId
    CreateNoteDto:
      type: object
      properties:
        note:
          type: string
          description: Note for the customer
        customer:
          type: number
          description: Id of the customer
      required:
        - note
        - customer
    UpdateNoteDto:
      type: object
      properties:
        note:
          type: string
          description: note for the customer
    CreateCustomerNotesDto:
      type: object
      properties: {}
    UpdateCustomerNotesDto:
      type: object
      properties: {}
    UpdateCustomerDto:
      type: object
      properties:
        name:
          type: string
          description: Name of the customer
        classification:
          type: string
          description: Name of the customer
        segment:
          type: string
          description: Segment of customer
        resourceId:
          type: string
          description: Resource Id of customer
        groupErpId:
          type: string
          description: Group ERP id of the customer
        operatingUnitId:
          type: number
          description: Operating Unit Id of customer
        erpId:
          type: string
          description: Erp id of the customer
        contactPersonName:
          type: string
          description: Contact person name of the customer
        email:
          type: string
          description: Email of the customer
        phoneNumber:
          type: string
          description: Phone number of the customer
        isChild:
          type: boolean
          description: isChild flag of customer
        address:
          type: string
          description: Address of the customer
        billingAddress:
          type: string
          description: Billing address of the customer
        shippingAddress:
          type: string
          description: Shipping address of the customer
        city:
          type: string
          description: City of the customer
        cnic:
          type: string
          description: CNIC number of customer
        regno:
          type: string
          description: Registration number of customer
        strn:
          type: string
          description: Strn number of customer
        ntn:
          type: string
          description: Ntn number of customer
        province:
          type: string
          description: Province in which customer resides
        division:
          type: string
          description: Division in which customer resides
        district:
          type: string
          description: District in which customer resides
        town:
          type: string
          description: Town in which customer resides
        salesArea:
          type: string
          description: sales area of the customer
        country:
          type: string
          description: Country of the customer
        postalCode:
          type: string
          description: Postal code of the customer
        creditLimit:
          type: number
          description: Credit limit for the customer
          example: 10000.5
        paymentTerms:
          type: string
          description: Payment agreements with the customer
        specialPricingAgreements:
          type: string
          description: Special pricing agreements with the customer
        latitude:
          type: number
          description: Latitude for the location
          example: 37.774929
        longitude:
          type: number
          description: Longitude for the location
          example: -122.419418
        preferredComChannel:
          type: string
          description: Preferred communication chanel of the customer
        taxInfo:
          type: string
          description: Tax information of the customer
        customerType:
          type: string
          description: The type of customer
        strnStatus:
          type: string
          description: The status of STR number of customer
        itFillerStatus:
          type: string
          description: The status of Income Tax Filling of customer
        attribute_1:
          type: string
          description: Attribute 1 of the customer
        attribute_2:
          type: string
          description: Attribute 2 of the customer
        attribute_3:
          type: string
          description: Attribute 3 of the customer
        attribute_4:
          type: string
          description: Attribute 4 of the customer
        attribute_5:
          type: string
          description: Attribute 5 of the customer
        attribute_6:
          type: string
          description: Attribute 6 of the customer
    CreateNotificationDto:
      type: object
      properties:
        userId:
          type: number
          description: id of user
        name:
          type: string
          description: name of user
        roles:
          description: Roles for notification
          type: array
          items:
            type: string
        message:
          type: string
          description: message of notification
        relatedEntityId:
          type: number
          description: related entity
      required:
        - userId
        - name
        - roles
        - message
    OrderItemsDto:
      type: object
      properties:
        productId:
          type: number
          description: Id of the selected product
          example: "1"
        quantity:
          type: number
          description: Quantity of the selected product and variant
          example: "30"
      required:
        - productId
        - quantity
    CreateOrderDto:
      type: object
      properties:
        customerId:
          type: number
          description: Id of the customer placing the order
          example: "1"
        items:
          description: List of order items
          type: array
          items:
            $ref: "#/components/schemas/OrderItemsDto"
        paymentStatus:
          type: string
          description: Payment status of the order
          example: Paid
        shippingMethod:
          type: string
          description: Shipping method for the order
          example: Express
        trackingNumber:
          type: string
          description: Tracking number for the shipment
          example: TRACK12345
        deliveryDate:
          format: date-time
          type: string
          description: Expected delivery date
          example: 2023-12-25
        specialInstructions:
          type: string
          description: Special instructions for the order
          example: Leave at the front door
        totalAmount:
          type: number
          description: Total amount for the order
          example: "100.00"
        subTotal:
          type: number
          description: Subtotal amount for the order
          example: "90.00"
        orderStatus:
          type: string
          description: Status of the order
          enum:
            - Pending
            - Confirmed
            - Completed
            - Failed
          example: Pending
        shippingCharge:
          type: number
          description: Shipping charge for the order
          example: "10.00"
        discount:
          type: number
          description: Discount applied to the order
          example: "5.00"
        estimatedTax:
          type: number
          description: Estimated tax for the order
          example: "8.00"
      required:
        - customerId
        - items
        - paymentStatus
        - shippingMethod
        - orderStatus
    UpdateOrderDto:
      type: object
      properties: {}
    UpdateOrderStatusDto:
      type: object
      properties:
        orderStatus:
          type: string
          description: Status of the order
    CreateLeadDto:
      type: object
      properties: {}
    AssignLeadDto:
      type: object
      properties: {}
    UpdateScoreDto:
      type: object
      properties: {}
    UpdateLeadStatusDto:
      type: object
      properties: {}
    UpdateLeadDto:
      type: object
      properties: {}
    UpdateUserDto:
      type: object
      properties:
        roleId:
          type: number
          description: role id
        positionId:
          type: number
          description: position id
        firstName:
          type: string
          description: First name of the user
        lastName:
          type: string
          description: Last name of the user
        email:
          type: string
          description: email of the user
        resourceId:
          type: string
          description: resource id of the user
        phone:
          type: string
          description: phone of the user
        address:
          type: string
          description: address of the user
        password:
          type: string
          description: Minimum 8 characters password of the user
        confirmPassword:
          type: string
          description: Minimum 8 characters password of the user
        image:
          type: string
          description: Image file of the user profile
          format: binary
        status:
          type: object
          description: Status of the user
    UpdateComplaintStatusDto:
      type: object
      properties:
        resolutionDetail:
          type: string
          description: Resolution Details
        complaintStatus:
          type: string
          description: Complaint status
    CreateComplaintDto:
      type: object
      properties:
        subject:
          type: string
          description: Subject of the complaint
        reference:
          type: string
          description: Refferences
        description:
          type: string
          description: Description of the complaint
        customerId:
          type: number
          description: Customer who issued complaint
        assignedTo:
          type: number
          description: Assigned user
        type:
          type: string
          description: Type of the complaint
          enum:
            - Order
            - Shipment
            - Payment
            - Product
            - General Service
        priority:
          type: string
          description: Priority of the complaint
          enum:
            - High
            - Medium
            - Low
            - Critical
            - Normal
            - Low Priority
      required:
        - subject
        - description
        - type
        - priority
    UpdateComplaintDto:
      type: object
      properties:
        resolutionDetail:
          type: string
          description: Resolution details of the complaint
        status:
          type: string
          description: Status of the complaint
          enum:
            - Pending
            - Resolved
            - Rejected
            - Closed
            - InProgress
        priority:
          type: string
          description: Priority of the complaint
          enum:
            - High
            - Medium
            - Low
            - Critical
            - Normal
            - Low Priority
        assignedTo:
          type: number
          description: Assigned user
    CreateRegionDto:
      type: object
      properties:
        name:
          type: string
          description: Name of the region
        segmentId:
          type: number
          description: ID of the segment associated
      required:
        - name
        - segmentId
    CreateSegmentsDto:
      type: object
      properties:
        name:
          type: string
          description: Title of the segment
      required:
        - name
    CreateOperatingUnitDto:
      type: object
      properties:
        name:
          type: string
          description: Title of the operation unit
        segmentId:
          type: number
          description: ID of the segment associated
        regionId:
          type: number
          description: ID of the region associated
      required:
        - name
        - segmentId
        - regionId
    CreateSalesTargetDto:
      type: object
      properties:
        type:
          type: string
          description: Assignee type
        assignedUser:
          type: number
          description: Assigned user ID
          example: 1
        assignedTeam:
          type: number
          description: Assigned team ID
          example: 2
        targetValue:
          type: number
          description: Target value
          example: 1000
        measurementUnit:
          type: string
          description: Measurement unit
      required:
        - type
        - targetValue
        - measurementUnit
    UpdateSalesTargetDto:
      type: object
      properties:
        type:
          type: string
          description: Assignee type
        assignedUser:
          type: number
          description: Assigned user ID
          example: 1
        assignedTeam:
          type: number
          description: Assigned team ID
          example: 2
        targetValue:
          type: number
          description: Target value
          example: 1000
        measurementUnit:
          type: string
          description: Measurement unit
        targetAchieved:
          type: number
          description: Target value
          example: 1000
        status:
          type: string
          description: Assignee type
      required:
        - status
    CreateSurveyDto:
      type: object
      properties:
        name:
          type: string
          description: Name of the survey
        description:
          type: string
          description: Description of the survey
        startDate:
          format: date-time
          type: string
          description: Start date of the announcements
        endDate:
          format: date-time
          type: string
          description: End date of the announcements
        version:
          type: number
          description: version of survey
      required:
        - name
        - startDate
        - endDate
    UpdateSurveyDto:
      type: object
      properties:
        name:
          type: string
          description: Name of the survey
        description:
          type: string
          description: Description of the survey
        startDate:
          format: date-time
          type: string
          description: Start date of the announcements
        endDate:
          format: date-time
          type: string
          description: End date of the announcements
        version:
          type: number
          description: version of survey
        status:
          type: string
          description: Status of the survey
          enum:
            - New
            - Completed
    CreateQuestionDto:
      type: object
      properties:
        survey:
          type: number
          description: survey id of question
        questionText:
          type: string
          description: Question text
        questionType:
          type: string
          description: Type of question
          enum:
            - Required
            - Optional
        questionRequired:
          type: string
          description: Question required or optional
          enum:
            - Required
            - Optional
        order:
          type: number
          description: Order of the question
        answerOptions:
          type: array
          description: Array of answer options for the question.
          items:
            $ref: "#/components/schemas/CreateAnswerOptionDto"
      required:
        - survey
        - questionText
        - questionType
    UpdateQuestionDto:
      type: object
      properties:
        survey:
          type: number
          description: survey id of question
        questionText:
          type: string
          description: Question text
        questionType:
          type: string
          description: Type of question
          enum:
            - Multi Choice
            - Text
            - Single Choice
            - Rating
        questionRequired:
          type: string
          description: Question required or optional
          enum:
            - Required
            - Optional
        order:
          type: number
          description: Order of the question
        answerOptions:
          type: array
          description: Array of answer options for the question.
          items:
            $ref: "#/components/schemas/UpdateAnswerOptionDto"
    CreateResponseDto:
      type: object
      properties:
        surveyId:
          type: number
          description: Id of survey
        customerId:
          type: number
          description: Id of the customer
        pjpId:
          type: number
          description: pjp id associated with the survey response
        responseDetail:
          type: array
          description: Array of responseDetails
          items:
            $ref: "#/components/schemas/CreateResponseDetailsDto"
      required:
        - surveyId
        - customerId
        - pjpId
        - responseDetail
    CreateParticipantDto:
      type: object
      properties:
        name:
          type: string
          description: name of the participant
        email:
          type: string
          description: email of Participant
        age:
          type: number
          description: Order of the question
        gender:
          type: string
          description: Gender of the participant
        location:
          type: string
          description: Location of the participant
        consent:
          type: boolean
          description: consent of the participant
      required:
        - name
        - email
    UpdateParticipantDto:
      type: object
      properties:
        name:
          type: string
          description: name of the participant
        email:
          type: string
          description: email of Participant
        age:
          type: number
          description: Age of the Participant
        gender:
          type: string
          description: Gender of the participant
        location:
          type: string
          description: Location of the participant
        consent:
          type: boolean
          description: consent of the participant
    CreatePosSurvey:
      type: object
      properties:
        customerId:
          type: number
          description: Customer ID
          example: 1
        pjpId:
          type: number
          description: PJP ID
          example: 123
        latitude:
          type: number
          description: Latitude for the location
          example: 37.774929
        longitude:
          type: number
          description: Longitude for the location
          example: -122.419418
        shopSign:
          description: Array of image URLs for shop sign
          example:
            - https://example.com/image1.jpg
          type: array
          items:
            type: string
        shopDisplay:
          description: Array of image URLs for shop display
          example:
            - https://example.com/image2.jpg
          type: array
          items:
            type: string
        posters:
          description: Array of image URLs for posters
          example:
            - https://example.com/image3.jpg
          type: array
          items:
            type: string
        pamphlets:
          description: Array of image URLs for pamphlets
          example:
            - https://example.com/image4.jpg
          type: array
          items:
            type: string
      required:
        - customerId
        - pjpId
    CreateMarketingDto:
      type: object
      properties:
        startDate:
          format: date-time
          type: string
          description: Start date of the announcements
        endDate:
          format: date-time
          type: string
          description: End date of the announcements
        heading:
          type: string
          description: Heading of the announcement
        description:
          type: string
          description: Description of the announcement
        type:
          type: string
          description: Description of the announcement
      required:
        - heading
        - description
        - type
    UpdateMarketingDto:
      type: object
      properties:
        startDate:
          format: date-time
          type: string
          description: Start date of the announcements
        endDate:
          format: date-time
          type: string
          description: End date of the announcements
        heading:
          type: string
          description: Heading of the announcement
        description:
          type: string
          description: Description of the announcement
        type:
          type: string
          description: Description of the announcement
        status:
          type: string
          description: Status of the announcement
      required:
        - status
    CreateMeetingDto:
      type: object
      properties:
        eventType:
          type: string
          description: Event type of Meeting
          enum:
            - Customer
            - Architect
            - Consultant
            - Site Engineer
            - Customer Meeting
        subject:
          type: string
          description: Title of the meeting
        startTime:
          type: string
          description: Start Time of scheduled meeting
        endTime:
          type: string
          description: End Time of scheduled meeting
        date:
          format: date-time
          type: string
          description: Date on which meeting is scheduled
        description:
          type: string
          description: notes from the meeting
        attendeesIds:
          description: Ids of attendes attending the meeting
          type: array
          items:
            type: string
        customerIds:
          description: Ids of the customers attending the meeting
          type: array
          items:
            type: string
        location:
          type: string
          description: Location of the meeting
      required:
        - eventType
        - subject
        - startTime
        - endTime
        - date
        - attendeesIds
        - customerIds
        - location
    CreateLeadMeetingDto:
      type: object
      properties:
        leadId:
          type: number
          description: Lead ID for which meeting is scheduled
        eventType:
          type: string
          description: Event type of Meeting
          enum:
            - Customer
            - Architect
            - Consultant
            - Site Engineer
            - Customer Meeting
        subject:
          type: string
          description: Title of the meeting
        startTime:
          type: string
          description: Start Time (e.g., 10:00)
        endTime:
          type: string
          description: End Time (e.g., 11:00)
        date:
          format: date-time
          type: string
          description: Date of the meeting
        description:
          type: string
          description: Notes/description
        attendeesIds:
          description: Internal attendees (user IDs)
          type: array
          items:
            type: string
        location:
          type: string
          description: Location of the meeting
      required:
        - leadId
        - eventType
        - subject
        - startTime
        - endTime
        - date
        - location
    UpdateMeetingDto:
      type: object
      properties:
        eventType:
          type: string
          description: Event type of Meeting
          enum:
            - Customer
            - Architect
            - Consultant
            - Site Engineer
            - Customer Meeting
        subject:
          type: string
          description: Title of the meeting
          enum:
            - 12:00 am
            - 12:30 am
            - 01:00 am
            - 01:30 am
            - 02:00 am
            - 02:30 am
            - 03:00 am
            - 03:30 am
            - 04:00 am
            - 04:30 am
            - 05:00 am
            - 05:30 am
            - 06:00 am
            - 06:30 am
            - 07:00 am
            - 07:30 am
            - 08:00 am
            - 08:30 am
            - 09:00 am
            - 09:30 am
            - 10:00 am
            - 10:30 am
            - 11:00 am
            - 11:30 am
            - 12:00 pm
            - 12:30 pm
            - 01:00 pm
            - 01:30 pm
            - 02:00 pm
            - 02:30 pm
            - 03:00 pm
            - 03:30 pm
            - 04:00 pm
            - 04:30 pm
            - 05:00 pm
            - 05:30 pm
            - 06:00 pm
            - 06:30 pm
            - 07:00 pm
            - 07:30 pm
            - 08:00 pm
            - 08:30 pm
            - 09:00 pm
            - 09:30 pm
            - 10:00 pm
            - 10:30 pm
            - 11:00 pm
            - 11:30 pm
        startTime:
          type: string
          description: Start Time of scheduled meeting
        endTime:
          type: string
          description: End Time of scheduled meeting
        date:
          format: date-time
          type: string
          description: Date on which meeting is scheduled
        description:
          type: string
          description: notes from the meeting
        attendeesIds:
          description: Ids of the attendees attending the meeting
          type: array
          items:
            type: string
        customerIds:
          description: Ids of the customers attending the meeting
          type: array
          items:
            type: string
        location:
          type: string
          description: Location of the meeting
    DiscountCriteriaDto:
      type: object
      properties:
        categoryIds:
          description: Array of category IDs applicable for the discount
          type: array
          items:
            type: string
        userIds:
          description: Array of user IDs applicable for the discount
          type: array
          items:
            type: string
        regionIds:
          description: Array of region IDs applicable for the discount
          type: array
          items:
            type: string
        productIds:
          description: Array of product IDs applicable for the discount
          type: array
          items:
            type: string
        minAmount:
          type: number
          description: Eligible minimum ammount for the discount
    CreateDiscountDto:
      type: object
      properties:
        name:
          type: string
          description: Name of the discount
        type:
          type: string
          description: Type of discount, either Percentage or Flat
          enum:
            - Percentage
            - Flat
        amount:
          type: number
          description: Amount of the discount
        criteria:
          description: Criteria for the discount
          allOf:
            - $ref: "#/components/schemas/DiscountCriteriaDto"
        maxUsage:
          type: number
          description: Maximum usage allowed for the discount
        validFrom:
          format: date-time
          type: string
          description: Start date of the discount validity
        validTill:
          format: date-time
          type: string
          description: End date of the discount validity
    UpdateDiscountDto:
      type: object
      properties:
        status:
          type: string
          description: Discount Status
          enum:
            - Deleted
            - Pending
            - Deactivated
            - Active
    TaxCriteriaDto:
      type: object
      properties:
        categories:
          description: Array of category names applicable for the tax
          type: array
          items:
            type: string
        userIds:
          description: Array of user IDs applicable for the tax
          type: array
          items:
            type: string
        regionIds:
          description: Array of region IDs applicable for the tax
          type: array
          items:
            type: string
        productIds:
          description: Array of product IDs applicable for the tax
          type: array
          items:
            type: string
        minAmount:
          type: number
          description: Eligible minimum amount for the tax
        maxAmount:
          type: number
          description: Eligible minimum amount for the tax
    CreateTaxDto:
      type: object
      properties:
        name:
          type: string
          description: Name of the tax
        value:
          type: number
          description: Value in percent of the tax
        isActive:
          type: boolean
          description: Active or inactive
        forFiler:
          type: boolean
          description: Active or inactive
        criteria:
          description: Criteria for the tax
          allOf:
            - $ref: "#/components/schemas/TaxCriteriaDto"
    UpdateTaxDto:
      type: object
      properties: {}
    StockTakeItemDto:
      type: object
      properties:
        productName:
          type: string
          description: Name of the product
          example: XYZ product
        countedQTY:
          type: number
          description: Counted quantity of the product
          example: 22
        type:
          type: string
          description: Type of stock take
          enum:
            - Manual Counting
            - Barcode Scanning
          example: Manual Counting
        customerId:
          type: number
          description: ID of the customer associated with the stock take
          example: 1
        childCustomerId:
          type: number
          description: ID of the customer child accunt associated with the stock take
          example: 1
        pjpId:
          type: number
          description: pjp id associated with stock take
          example: 1
      required:
        - productName
        - countedQTY
        - type
        - customerId
        - childCustomerId
        - pjpId
    CreateStockTakeDto:
      type: object
      properties:
        data:
          description: Array of stock take items to create
          example:
            - productName: XYZ product
              countedQTY: 22
              type: ManualCounting
              customerId: 1
            - productName: ABC product
              countedQTY: 15
              type: ManualCounting
              customerId: 1
          type: array
          items:
            $ref: "#/components/schemas/StockTakeItemDto"
      required:
        - data
    UpdateStockTakeDto:
      type: object
      properties:
        productName:
          type: string
          description: Name of the product
          example: Product A
        countedQTY:
          type: number
          description: Quantity counted
          example: 100
        type:
          type: string
          description: Type of stock take
          example: Inventory Check
        customerId:
          type: number
          description: ID of the associated customer
          example: 1
    UploadFileStorageDto:
      type: object
      properties:
        type:
          type: string
          description: Module name for file to be upload
      required:
        - type
    UpdateFileStorageDto:
      type: object
      properties:
        type:
          type: string
          description: Module name for file to be upload
    CreatePositionDto:
      type: object
      properties:
        name:
          type: string
          description: Name  of the position
        jurisdictionType:
          type: string
          description: Governed jurisdiction type of the position
          enum: &a3
            - All
            - Segment
            - Region
            - Operating Unit
        jurisdictionPerCount:
          type: string
          description: Is this position singular per juridication or it can be multiple
          enum: &a4
            - Single
            - Multiple
        parentId:
          type: number
          description: Id of parent position
        totalPositionCount:
          type: number
          description: Number of spots available for this position, null for infinite when
            jurisdictionPerCount is multiple and 1 if jurisdictionPerCount is
            single
      required:
        - name
        - jurisdictionType
        - jurisdictionPerCount
        - parentId
        - totalPositionCount
    UpdatePositionDto:
      type: object
      properties:
        name:
          type: string
          description: Name  of the position
        jurisdictionType:
          type: string
          description: Governed jurisdiction type of the position
          enum: *a3
        jurisdictionPerCount:
          type: string
          description: Is this position singular per juridication or it can be multiple
          enum: *a4
        parentId:
          type: number
          description: Id of parent position
        totalPositionCount:
          type: number
          description: Number of spots available for this position, null for infinite when
            jurisdictionPerCount is multiple and 1 if jurisdictionPerCount is
            single
    CreateKpiDto:
      type: object
      properties:
        salesPerson:
          type: number
          description: id of sales person
        startDate:
          format: date-time
          type: string
          description: start date of kpi
        teamId:
          type: number
          description: team id for the kpi
        endDate:
          format: date-time
          type: string
          description: end date of kpi
        customerSegments:
          type: string
          description: customer segment of kpi
        operatingUnits:
          description: operating units of kpis
          type: array
          items:
            type: number
        type:
          type: string
          description: type of kpi
      required:
        - startDate
        - teamId
        - endDate
        - customerSegments
        - operatingUnits
    UpdateKpiDto:
      type: object
      properties:
        salesPerson:
          type: number
          description: sales person id
        startDate:
          format: date-time
          type: string
          description: start date of commission
        customerSegments:
          type: string
          description: customer segments of kpis
        operatingUnit:
          type: number
          description: operating unit  of kpis
        endDate:
          format: date-time
          type: string
          description: end date of commission
    AddKpiItemsDto:
      type: object
      properties:
        kpiId:
          type: number
          description: id of kpi
        kpiName:
          type: string
          description: KPI name of KPI items
          enum:
            - DSO
            - Active Dealer
            - Sales Trade
            - CM
        kpiUnit:
          type: string
          description: kpi unit of kpi items
        weightage:
          type: string
          description: weightage of kpi items
        target:
          type: number
          description: target of kpi items
        actual:
          type: string
          description: actual target of kpi items
        resourceId:
          type: string
          description: resource id for kpi items
      required:
        - kpiId
        - kpiName
        - kpiUnit
        - weightage
        - target
        - actual
    UpdateKpiItemDto:
      type: object
      properties:
        kpiName:
          type: string
          description: KPI name of KPI items
          enum:
            - DSO
            - Active Dealer
            - Sales Trade
            - CM
        kpiUnit:
          type: string
          description: kpi unit of kpi items
        weightage:
          type: string
          description: weightage of kpi items
        target:
          type: number
          description: target of kpi items
        actual:
          type: string
          description: actual of kpi items
    CreatePjpNavigationDto:
      type: object
      properties:
        pjpId:
          type: number
          description: ID of the PJP to associate with the navigation record
          example: 1
        endLatitude:
          type: number
          description: Latitude for the location
          example: 37.774929
        customerId:
          type: number
          description: ID of the Customer to associate with the navigation record
          example: 1
        endLongitude:
          type: number
          description: Longitude for the location
          example: -122.419418
        startLongitude:
          type: number
          description: hold the data from previous record
          example: -122.419418
        startLatitude:
          type: number
          description: hold the data from previous record
          example: 37.774929
        isChanged:
          type: boolean
          description: Whether this navigation record overwrites previous ones
          default: false
        isStart:
          type: boolean
          description: as a flag to hold the data from previous record
          default: false
      required:
        - pjpId
        - endLatitude
        - customerId
        - endLongitude
        - startLongitude
        - startLatitude
        - isChanged
        - isStart
    CreatePjpDto:
      type: object
      properties: {}
    CreateStartNavigationDto:
      type: object
      properties:
        pjpId:
          type: number
          description: ID of the PJP to associate with the navigation record
          example: 1
        startLatitude:
          type: number
          description: Latitude for the location
          example: 37.774929
        startLongitude:
          type: number
          description: Longitude for the location
          example: -122.419418
        customerId:
          type: number
          description: ID of the Customer to associate with the navigation record
          example: 1
        isStart:
          type: boolean
          description: Whether this navigation record overwrites previous ones
          default: false
      required:
        - pjpId
        - startLatitude
        - startLongitude
        - customerId
        - isStart
    CompletePjpDto:
      type: object
      properties:
        pjpId:
          type: number
          description: ID of the PJP to complete
          example: 1
        isCompleted:
          type: boolean
          description: Completion status of the PJP
          example: true
      required:
        - pjpId
        - isCompleted
    UpdatePjpTaskDto:
      type: object
      properties: {}
    SetPjpNavigationOverwriteDto:
      type: object
      properties:
        pjpId:
          type: number
          description: ID of the Pjp to set the most recent navigation record as overwrite
          example: 11
      required:
        - pjpId
    UpdatePjpDto:
      type: object
      properties: {}
    CreatePjpBacklogDto:
      type: object
      properties: {}
    ReschedulePjpBacklogDto:
      type: object
      properties: {}
    PermissionInput:
      type: object
      properties:
        action:
          type: string
          description: Action (e.g., view, create, update, delete)
        displayName:
          type: string
          description: Display name (e.g., View Inventory)
      required:
        - action
        - displayName
    CreateModuleWithPermissionsDto:
      type: object
      properties:
        name:
          type: string
          description: Module name
          example: inventory
        displayName:
          type: string
          description: Display name
          example: Inventory Management
        description:
          type: string
          description: Module description
        icon:
          type: string
          description: Icon name
        permissions:
          description: Array of permissions
          example:
            - action: view
              displayName: View Inventory
            - action: create
              displayName: Create Inventory
            - action: update
              displayName: Update Inventory
            - action: delete
              displayName: Delete Inventory
          type: array
          items:
            $ref: "#/components/schemas/PermissionInput"
      required:
        - name
        - displayName
        - permissions
    UpdateModuleDto:
      type: object
      properties:
        displayName:
          type: string
          description: Display name
        description:
          type: string
          description: Module description
        icon:
          type: string
          description: Icon name/class
        order:
          type: number
          description: Display order
        isActive:
          type: boolean
          description: Is module active
    UpdatePermissionInput:
      type: object
      properties:
        id:
          type: number
          description: Existing permission ID (required for update/delete)
        action:
          type: string
          description: Action (e.g., view, create, update, delete)
        displayName:
          type: string
          description: Display name (e.g., View Users)
      required:
        - action
        - displayName
    UpdateModuleWithPermissionsDto:
      type: object
      properties:
        displayName:
          type: string
          description: Display name
        description:
          type: string
          description: Description
        icon:
          type: string
          description: Icon
        order:
          type: number
          description: Display order
        isActive:
          type: boolean
          description: Is active
        permissions:
          description: Permissions to sync (create/update/delete)
          example:
            - id: 1
              action: view
              displayName: View Inventory
            - action: export
              displayName: Export Data
          type: array
          items:
            $ref: "#/components/schemas/UpdatePermissionInput"
    CreateAnswerOptionDto:
      type: object
      properties:
        optionText:
          type: string
          description: text of the option
        order:
          type: number
          description: Order of the option
      required:
        - optionText
    UpdateAnswerOptionDto:
      type: object
      properties:
        id:
          type: number
          description: ID of the answer option (required for existing options)
        question:
          type: number
          description: ID of the question (not required for updates)
        optionText:
          type: string
          description: Text of the option
        order:
          type: number
          description: Order of the option
    CreateResponseDetailsDto:
      type: object
      properties:
        question:
          type: number
          description: Id of the question tables
        answerText:
          type: string
          description: answer text
        option:
          description: Id of the option
          type: array
          items:
            type: string
        rating:
          type: number
          description: Rating
      required:
        - question
security:
  - jwt: []
  - api_key: []
