Not sure I get the question nor the relevance of what type of device is on the other side of the interrupt signal as long as voltage are compatible.
You just need to configure an external interrupt - there are tons of doc if you google “esp32 external interrupt“... start there and test code “manually” (pulling the pin low or high)