storyblok-cli
storyblok-cli copied to clipboard
Generate typescript types from space
The feature would affect: (check one with "x")
- [ ] app.storyblok.com (CMS - Interface)
- [x] api.storyblok.com (CMS - Content Delivery API)
- [ ] mapi.storyblok.com (CMS - Management API)
- [ ] capi.storyblok.com (Commerce - API)
- [ ] Commerce - Interface
- [ ] Other
Is your feature request related to a problem? Please describe. It would be great to have a typed api from storyblok making it much easier to implement components that match the schema
Describe the solution you'd like
storyblok generate --typescript
which generates typings based off the current storyblok's spaceid
Describe alternatives you've considered
Additional context We've hacked together an initial version of this for our own internal usage that we will extend as/when required for our internal usage but would be great to see this in the full storyblok cli. It would be nice if the API (get/getAll etc) could end up with nice typings too.
https://gist.github.com/eyn/b9dd0956b2fa6f783b9898b6ffaeb192