How do I find interactive elements in a design using figma plugin api ?

I want to find all the interactive elements in a Figma design file. How do I do that ? I want to use the Figma plugin api for this ?