017f10e60b
- Ambiguous lookups (2+ contacts on one email) now dedupe by Contact Id and fetch each candidate's full record so the picker shows name + account + email instead of just the bare search payload. - Per-row "תייק" button on each linked case lets the user pick the correct case to file to when a contact has multiple cases; bottom "תייק לתיק הזה" button is hidden in that scenario. - "→ חזור לרשימת אנשי קשר" link restores the candidate list after drilling into one of them. - Contact name + case rows in the sidebar are now hyperlinks that open the entity in Klear. - AddInHost.LaunchFileToCaseAsync accepts an optional MatchResult and auto-files when the sidebar resolved a single linked case, skipping the manual search dialog. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
28 lines
1.1 KiB
C#
28 lines
1.1 KiB
C#
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using MarcusLaw.OutlookAddin.Core.Models;
|
|
|
|
namespace MarcusLaw.OutlookAddin.Core.Services
|
|
{
|
|
public interface IMatchingService
|
|
{
|
|
/// <summary>
|
|
/// Looks up the contact/account/recent-cases bundle for a sender
|
|
/// email address. Returns null when there is no unique Contact match
|
|
/// (0 or 2+ candidates). Results are cached for 10 minutes.
|
|
/// </summary>
|
|
Task<MatchResult?> LookupAsync(string senderEmail, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// Loads the full contact + account + recent-cases bundle for a
|
|
/// specific contact id. Used when the sender's email matches
|
|
/// multiple contacts and the user picks one from the candidate
|
|
/// list — we then drill into that contact's cases without
|
|
/// dropping back to manual search.
|
|
/// </summary>
|
|
Task<MatchResult?> LookupContactAsync(string contactId, string? senderEmail = null, CancellationToken cancellationToken = default);
|
|
|
|
void Invalidate(string senderEmail);
|
|
}
|
|
}
|