allow defining jobs with function only

- function only definition
- transform 'sugar' API from outside into original job definition format