Add type hinting to user preferences api