using DeepDrftModels.Enums; using NetBlocks.Models; namespace DeepDrftData; /// /// SQL-side anonymous telemetry service (Phase 16). Records play and share events to the append-only /// logs and maintains the incremental play-counter rollup. The release dimension on a play is resolved /// server-side from the track key (§2.3 / D4) — callers pass only what the client cheaply knows. /// Returns NetBlocks at the boundary; the controller maps that to 202/4xx/5xx. /// public interface IEventService { /// /// Record one play: append a play_event row (release resolved from the track key) and bump /// the track's play_counter in the same transaction. A play of an unknown/removed track key /// still logs (with a null release and no counter bump) rather than failing. /// Task RecordPlay(string trackEntryKey, PlayBucket bucket, string? anonId = null, CancellationToken cancellationToken = default); /// Record one share: append a share_event row. Target and channel come straight from the client. Task RecordShare(ShareTargetType targetType, string targetKey, ShareChannel channel, string? anonId = null, CancellationToken cancellationToken = default); }