refacto: improves on wait in batch method
refacto: improves on wait in batch method

algolia/algoliasearch-client-javascript,algolia/algoliasearch-client-javascript,algolia/algoliasearch-client-javascript,algolia/algoliasearch-client-javascript