[IMP] package api.types refactoring