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: custom attributes support #16

Closed ffMathy closed 11 months ago

ffMathy commented 1 year ago

Making custom attributes strong-typed would be absolutely amazing.

ffMathy commented 1 year ago

@gismya if you can show me how to query custom attributes from the API, I can implement this.

gismya commented 1 year ago

Querying which custom attributes are available or query a specific custom attribute? The first one I don't think is available in the API yet. I think the team responsible for the API is looking into extending what is possible to do with custom attributes. If you have any requests on what you want to be able to do I can forward it to them and either get back how it's done, or it can be added as a suggestion for upcoming changes.

EDIT: The previous text was incorrect. See https://github.com/ftrackhq/ftrack-ts-schema-generator/issues/16#issuecomment-1717225115 for information about how to query for custom attribute information.

ffMathy commented 1 year ago

Forwarding that would be great! Thank you so much!

We operate a lot on custom attributes, and they change a lot for us. Being able to query them would allow for this generator to also strong-type them!

Let me know what they say.

gismya commented 1 year ago

Give me details on what you want to query, just so that I'm sure I understand correctly :)

ffMathy commented 1 year ago

Well, essentially anything that could lead to an Entity's custom_attributes object to become strong typed as well.

Right now, I am thinking:

gismya commented 1 year ago

So something like get custom_attributes_metadata from Task and get back an array with the different custom attributes and their metadata?

I'll forward that, I can see other times that could be useful.

ffMathy commented 1 year ago

Yeah that'd be perfect!

Yes indeed. Very useful!

gismya commented 1 year ago

Not working much with custom attributes, I was incorrect.

It is possible to query already, CustomAttributeConfiguration and CustomAttributeLinkConfiguration are the entity types to query. The available fields can be found in the API reference inside ftrack (Top right corner -> Help -> API reference).

ffMathy commented 1 year ago

Oooooh great! Then we should definitely utilize this from this project.

ffMathy commented 11 months ago

This is now supported.