Measurement of the WZ production cross section in pp collisions at \(\sqrt{s} = 7\) and 8\(\,\text{TeV}\) and search for anomalous triple gauge couplings at \(\sqrt{s} = 8\,\text{TeV} \)