If you run an nlapiSearchRecord() for 'transactions', you can pass the 'type' filter.
The 'type' filter unfortunately does not follow rules of common sanity and does not use transaction type internal IDs - for example, you cannot filter on "type is invoice" - you have to filter on "type is CustInvc" (with the correct caps and all).
If there somewhere where I can quickly see a list of all these transaction names? My only option so far is to load up in the GUI one of each transaction, check the name in the URL and guess where the caps go.