Add custom sql query doco

#290
Update TypeScript definitions
Allow shell models with multiple keys