An earthquake with a magnitude of 7.0 has rocked eastern parts of Indonesia.