Relativistic calculation of two-electron one-photon and hypersatellite transition energies for 12 ⩽ Z ⩽ 30 elements