Quantum-kinetic theory of photocurrent generation via direct and phonon-mediated optical transitions