const metadata = { event: "translations.translation.updated", persistent: true, id: "translations-reindex-entity" };
async function handle(payload, ctx) {
  const entityType = String(payload?.entityType || "");
  const entityId = String(payload?.entityId || "");
  if (!entityType || !entityId) return;
  const bus = ctx.resolve("eventBus");
  await bus.emitEvent("query_index.upsert_one", {
    entityType,
    recordId: entityId,
    tenantId: payload?.tenantId ?? null,
    organizationId: payload?.organizationId ?? null
  });
}
export {
  handle as default,
  metadata
};
//# sourceMappingURL=reindex.js.map
