Deploy API: get bin buildVersion or update versionId before download

Hi,
I have a question: I’m trying to create a workflow inside my Ionic application for manually handling the live deploy of Ionic AppFlow in my application. The plugin configuration is, of course, currently set on ‘none’ for update mode.

My goal is to check the latest update data before downloading and extracting it in order to update the application only if the buildVersion is the same.

I was looking in the Deploy API but I did not found a way to retrieve the latest update buildVersion of the binary nor the versionId of the update. In fact the only method that return some information on the latest update is checkForUpdate() that does not return any of these data. The other method that maybe I can use is getVersionById but without the versionId I’m not able to get that information.

Is there a way to accomplish that?
I was wondering: maybe there is a way to make a Web Build in the Ionic Hub that is compatible only with a specific buildVersion (so when I publish a new APK on the store, with a different buildVersion, there is no update available from AppFlow)?

I hope I explained the problem well.

Thanks