Added API to get all the fields in a type.