You can easily get a list of template variables with the getTemplateVariables() method.
But is there a similar way to get a list of InputFields in the document?
As far as I can tell, it's possible to modify input fields via modifyInputFields($data) method, but there is no way to actually get a list of available input fields.
Edit: Same question for MergeFields.