Soliton, Wronskian and Grammian solutions to the generalised $$(3+1)$$-dimensional Kadomtsev–Petviashvili equation