Finite state machine written in typescript
helper to flatten nested strapi v4 graphql structure including typings