package cloud.nstart.terravault.ordinis.notifications.dispatcher;

import java.util.Optional;

/**
 * Narrow anti-corruption port over {@code UserDisplayService} (ordinis-rest-api).
 *
 * <p>Keeps ordinis-notifications independent of ordinis-rest-api at compile time.
 * The production implementation in ordinis-app delegates to {@code UserDisplayService}.
 * Tests can mock this port with a simple lambda.
 */
public interface UserDisplayPort {

  Optional<DisplayInfo> findById(String userId);

  record DisplayInfo(String sub, String email, String name) {}
}
