How to export custom files?

I have a creative platform B which has its own file format.

I am converting the selected frames and converting them to that format.

The question is how can I export that object using the plugin API?

Because there’s no access to node fs library in the plugin environment either as Figma runs on the browser aswell