When did Joseph Bramah invent the flusing toilet?

Joseph Bramah invented the flushing toilet or so called at the time water closet in 1778.