Enumerate all sensor types and their possible states programmatically

Is it possible to enumerate all sensor types and their possible states programmatically?

In all of the smartthings ecosystem, or within a user’s installation?

At user’s location. I am attempting to write an app that reacts to sensors staying in a particular state for a specified period of time.