added autogeneration of api.d.ts