'Returns int of `1` (hosted), `2` (packaged), or `3` (privileged).
Used by ES.'

@property
def app_type_id(self):

    if (self.latest_version and self.latest_version.is_privileged):
        return mkt.ADDON_WEBAPP_PRIVILEGED
    elif self.is_packaged:
        return mkt.ADDON_WEBAPP_PACKAGED
    return mkt.ADDON_WEBAPP_HOSTED
