our approach is to create a separate npm package for this specific use cae and maintain it manually. Your db types, app types and published types might differ widely in the future.