I have a foundation figma file with unpublished and published variables and collections. I am trying to apply such variables to another file with two ways:
-
Importing the foundation file library to the file i am working on. With the command
await figma.teamLibrary.getAvailableLibraryVariableCollectionsAsync();
i do get only the published collections so i do not have access to the unpublished ones. -
Using figma rest api endpoint
GET /v1/files/:file_key/variables/local
i get all the variables and collections but i cannot import the unpublished ones in my working file, so i cannot apply unpublished variables to the working file’s nodes.
Is there any way to apply unpublished variables to a file through figma api? the weird part is that through figma ui the user can apply unpublished variables. Something goes wrong when trying to do so via code.
Thanks in advance!