using SVSim.Database.Enums; namespace SVSim.Database.Repositories.Viewer; public interface IViewerRepository { Task GetViewerBySocialConnection(SocialAccountType accountType, ulong socialId); Task GetViewerWithSocials(long id); Task GetViewerByShortUdid(long shortUdid); Task GetViewerByUdid(Guid udid); Task RegisterViewer(string displayName, SocialAccountType socialType, ulong socialAccountIdentifier, ulong? shortUdid = null); Task RegisterAnonymousViewer(Guid udid); Task LinkSteamToViewer(long viewerId, ulong steamId); /// /// Merges an anonymous viewer (just created by /tool/signup on a fresh UDID) /// into a target viewer that the Steam ticket resolved to. Transfers the anonymous /// viewer's UDID to the target, then deletes the anonymous viewer. /// Task MergeAnonymousViewerInto(long anonymousViewerId, long targetViewerId); /// /// Focused load for building a battle-node MatchContext: viewer + Info + Info's /// equipped Emblem/Degree nav refs. Read-only (AsNoTracking). Returns null if the viewer /// doesn't exist. /// Task LoadForMatchContextAsync(long viewerId); /// Sets Viewer.GuildId to . No-op if the viewer does not exist. Task SetGuildIdAsync(long viewerId, int guildId, CancellationToken ct = default); /// Clears Viewer.GuildId to null. No-op if the viewer does not exist. Task ClearGuildIdAsync(long viewerId, CancellationToken ct = default); }