RTL from Plugin API


I would like to know if there is a way to transform text to RTL using the Figma API. I would like to replicate the behavior of the button to change the direction of the text that Figma offers, but doing it from my plugin, and I currently can’t find a way.

Thank you very much and greetings.