I have seen this code suggesting how to return a list of entity IDs:
$query = \Drupal::entityQuery('node'); $query->condition('type', $bundle); $entity_ids = $query->execute();
but this requires the knowledge of when to use "type" or what "type" is. For example, for user entity i would think setting type to $bundle = 'user' would work - but it gives error.
for terms from a vocab i would expect type to be set to the name of the vocab; but that also gives an error.
Is there a generic method to call for entity_type that would hint at what is required to do a query for entity ids?