I recently ran into the same problem and noticed that the documentation plugin generates an openapi json spec. I tried some codegenerators to get my typescript types & client generated but didn’t get this to work well. The strapi types and openapi spec contain a lot of abstractions and details that aren’t exactly relevant for the frontend which I think are related to the issues I faced.
As this didn’t exactly work out and I didn’t want to roll everything by hand, I decided to try out the graphql endpoint plugin. turns out this comes with a graphql playground (little UI to play with the api) and let’s you configure the location where it generates the graphql schema. So now my Strapi server regenerates the schema every time the model changes and then this is consumed in my client app with the @graphql-codegen package. I had to learn how to write graphql queries though, but all in all this is working great for me now.
Note that I’m still hand-rolling simplified view models and mappers as I don’t want to deal with all the intermediary types of the strapi abstractions in my client application.
I would however have rather seen a cleaner and more straightforward solution to all this and might give the orval.dev generator a try if I find some time. Or the new plugin that’s coming soon.
Let me know if anyone wants more details on the graphql setup I’m currently using