Create thunk based api of module