Adds the media consumption history, statistics, resume, and deletion queries

This commit is contained in:
BinaryAlley committed 2026-10-24 18:48:48 +03:00
1 parent bde7ee4b1f
commit f777af07cf
61 files changed
+2833 -35

No files matched your search

@@ -0,0 +1,17 @@
#region ========================================================================= USING =====================================================================================
using System.Collections.Generic;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.MediaConsumption;
/// <summary>
/// Represents the consumption statistics of every user, together with their combined totals.
/// </summary>
/// <param name="Total">The combined consumption statistics of every user.</param>
/// <param name="Users">The consumption statistics of each user.</param>
[DebuggerDisplay("UserCount: {Users.Count}; CountedSessionCount: {Total.CountedSessionCount}")]
public sealed record AllUsersConsumptionStatisticsResponse(
ConsumptionTotalsResponse Total,
IReadOnlyList<ConsumptionSummaryResponse> Users
);
@@ -0,0 +1,25 @@
#region ========================================================================= USING =====================================================================================
using System.Collections.Generic;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.MediaConsumption;
/// <summary>
/// Represents the combined consumption statistics of every user.
/// </summary>
/// <param name="TotalConsumedDurationInSeconds">The total duration consumed over every recorded session of every user, in seconds.</param>
/// <param name="CountedSessionCount">The number of recorded sessions of every user that count towards statistics.</param>
/// <param name="CompletedSessionCount">The number of recorded sessions of every user that completed.</param>
/// <param name="StoppedSessionCount">The number of recorded sessions of every user that stopped before they completed and count towards statistics.</param>
/// <param name="CompletionRate">The fraction of the counted sessions of every user that completed, between 0 and 1, or 0 when there is no counted session.</param>
/// <param name="MediaKindSummaries">The combined consumption statistics broken down by media kind.</param>
[DebuggerDisplay("CountedSessionCount: {CountedSessionCount}; CompletedSessionCount: {CompletedSessionCount}")]
public sealed record ConsumptionTotalsResponse(
double TotalConsumedDurationInSeconds,
int CountedSessionCount,
int CompletedSessionCount,
int StoppedSessionCount,
double CompletionRate,
IReadOnlyList<MediaKindConsumptionSummaryResponse> MediaKindSummaries
);