separate API types from bg-types.