async def delete_source_connection(
        self,
        db: AsyncSession,
        source_connection_id: UUID,
        current_user: schemas.User,
        delete_data: bool = False,
    ) -> schemas.SourceConnection:
        """Delete a source connection and all related components.

        This method:
        1. Deletes the sync if it exists
        2. Deletes the integration credential if it exists
        3. Deletes the source connection

        Args:
            db: The database session
            source_connection_id: The ID of the source connection to delete
            current_user: The current user
            delete_data: Whether to delete the data in destinations

        Returns:
            The deleted source connection

        Raises:
            HTTPException: If the source connection is not found
        """
        source_connection = await crud.source_connection.get(
            db=db, id=source_connection_id, current_user=current_user
        )
        if not source_connection:
            raise HTTPException(status_code=404, detail="Source connection not found")

        # Save a copy of the source_connection for returning
        source_connection_schema = schemas.SourceConnection.from_orm_with_collection_mapping(
            source_connection
        )

        await crud.source_connection.remove(
            db=db, id=source_connection_id, current_user=current_user
        )

        return source_connection_schema
Delete a source connection and all related components.

        This method:
        1. Deletes the sync if it exists
        2. Deletes the integration credential if it exists
        3. Deletes the source connection

        Args:
            db: The database session
            source_connection_id: The ID of the source connection to delete
            current_user: The current user
            delete_data: Whether to delete the data in destinations

        Returns:
            The deleted source connection

        Raises:
            HTTPException: If the source connection is not found
        
backend/airweave/core/source_connection_service.py