Merge pull request #838 from dalamudx/feat/user-group-provider-stats

fix(stats): scope group usage by providers and add ungrouped view
This commit is contained in:
ZheFox
2026-09-29 12:23:27 +08:00
committed by GitHub
15 changed files with 637 additions and 100 deletions
@@ -1202,6 +1202,9 @@ pub struct UsageAuditAggregationQuery {
#[derive(Debug, Clone, PartialEq, Eq, Default, serde::Serialize, serde::Deserialize)]
pub struct UsageAuditSummaryQuery {
/// Optional provider-name allowlist, intersected with provider_name; empty matches nothing.
#[serde(default)]
pub provider_names: Option<Vec<String>>,
pub created_from_unix_secs: u64,
pub created_until_unix_secs: u64,
pub user_id: Option<String>,
@@ -1595,6 +1598,9 @@ pub enum UsageTimeSeriesGranularity {
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub struct UsageTimeSeriesQuery {
/// Optional provider-name allowlist, intersected with provider_name; empty matches nothing.
#[serde(default)]
pub provider_names: Option<Vec<String>>,
pub created_from_unix_secs: u64,
pub created_until_unix_secs: u64,
pub granularity: UsageTimeSeriesGranularity,
@@ -1629,6 +1635,9 @@ pub enum UsageLeaderboardGroupBy {
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub struct UsageLeaderboardQuery {
/// Optional provider-name allowlist, intersected with provider_name; empty matches nothing.
#[serde(default)]
pub provider_names: Option<Vec<String>>,
pub created_from_unix_secs: u64,
pub created_until_unix_secs: u64,
pub group_by: UsageLeaderboardGroupBy,