As follow-up of request #26044, it would be nice to have consolidated type definitions for the Tracker REST API. Tracker Structure and field values are actually quite complicated, with arrays containing fields with wildly different shapes. We have probably already written several definitions already, but the REST API must preserve backwards compatibility. This means we could share a definition and update it only once when needed.
We should extract a "lib" to centralize such definitions. We can then import it where needed. It would have a dependency on Tracker constants (because of the field types and text formats and permissions, and so on).