fides
fides copied to clipboard
Import autogenerated typescript types from a shared package
Is your feature request related to a specific problem?
Right now, whenever one of our frontend apps wants to utilize a backend type, we either:
- For admin-ui: run
npm run openapi:generate
in theadmin-ui
folder which generates types intoadmin-ui/types/api
- For privacy-center: copy the relevant types into the
privacy-center
folder inprivacy-center/types/api/
- For fides-js: copy the relevant types into the
fides-js
folder in one fileconsent-types.ts
This results in copies of types often being out of date.
Describe the solution you'd like
We should keep our autogenerated typescript types (the output from npm run openapi:generate
) in a shared separate package which all of these projects can import from. Now that we have turbo set up, this should be easier to iterate on.
Describe alternatives you've considered, if any
A description of any alternative solutions or features you've considered.
Additional context
See here for more details: https://github.com/ethyca/fides/pull/3340#discussion_r1210455050