async def delete_sync(
        self,
        db: AsyncSession,
        sync_id: UUID,
        current_user: schemas.User,
        delete_data: bool = False,
        uow: Optional[UnitOfWork] = None,
    ) -> schemas.Sync:
        """Delete a sync configuration and optionally its associated data.

        Args:
        ----
            db (AsyncSession): The database session.
            sync_id (UUID): The ID of the sync to delete.
            current_user (schemas.User): The current user.
            delete_data (bool): Whether to delete the data.
            uow (Optional[UnitOfWork]): The unit of work.

        Returns:
        -------
            schemas.Sync: The deleted sync.

        Raises:
        ------
            HTTPException: If the sync is not found.
        """
        sync = await crud.sync.get(db=db, id=sync_id, current_user=current_user)
        if not sync:
            raise HTTPException(status_code=404, detail="Sync not found")

        if delete_data:
            # TODO: Implement data deletion logic, should be part of destination interface
            pass

        return await crud.sync.remove(db=db, id=sync_id, current_user=current_user, uow=uow)
Delete a sync configuration and optionally its associated data.

        Args:
        ----
            db (AsyncSession): The database session.
            sync_id (UUID): The ID of the sync to delete.
            current_user (schemas.User): The current user.
            delete_data (bool): Whether to delete the data.
            uow (Optional[UnitOfWork]): The unit of work.

        Returns:
        -------
            schemas.Sync: The deleted sync.

        Raises:
        ------
            HTTPException: If the sync is not found.
        
backend/airweave/core/sync_service.py