function eventNameFromEntity(entityType, action) {
  const [mod, ent] = (entityType || "").split(":");
  if (!mod || !ent) throw new Error(`Invalid entityType: ${entityType}`);
  return `${mod}.${ent}.${action}`;
}
async function emitIndexUpdate(bus, entityType, payload, persistent = true) {
  const event = eventNameFromEntity(entityType, "updated");
  await bus.emitEvent(event, payload, { persistent });
}
export {
  emitIndexUpdate,
  eventNameFromEntity
};
//# sourceMappingURL=events.js.map
