fides icon indicating copy to clipboard operation
fides copied to clipboard

Import autogenerated typescript types from a shared package

Open allisonking opened this issue 1 year ago • 2 comments

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:

  1. For admin-ui: run npm run openapi:generate in the admin-ui folder which generates types into admin-ui/types/api
  2. For privacy-center: copy the relevant types into the privacy-center folder in privacy-center/types/api/
  3. For fides-js: copy the relevant types into the fides-js folder in one file consent-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

allisonking avatar May 30 '23 16:05 allisonking