Incremental Photoelectric Rotary Encoder - 400P R SKU SEN0230 for ESP32

How can i use the Incremental Photoelectric Rotary Encoder if the voltage requirement is from 4.8v and the GPIO pins from the ESP32 and STM32 accept 3.3v? how would the diagram change with the pull up scheme?