ftrackhq / ftrack-ts-schema-generator

Gets the schema from an ftrack instance and generates typescript interfaces for all the entity types in the instance.
Apache License 2.0
2 stars 1 forks source link

feat: Support generating string literal union type of Types #15

Closed ffMathy closed 1 year ago

ffMathy commented 1 year ago

In Ftrack, my "Types" in the settings are not generated into the schema.

It would be awesome if I had a string literal union type of something like:

export type Types = 
  "some-type-a" |
  "some-type-b";

Assuming I had two "Types" in my Ftrack, with those type names.

Maybe actually all of the attributes could be included, such as the ID and color. But that would require generating objects instead of types.

gismya commented 1 year ago

If I understand what you're looking for it's included in this repo, but for it to be useable it needs an API update that was released to our cloud customers about a month ago and will be in the next on-prem release when that arrives.

ffMathy commented 1 year ago

Ah I see! Awesome stuff.