The documents detail the 1922 to 1939 papacy of Pius XI , when his successor - the wartime Pope Pius XII - served as the Vatican 's secretary of state .