From ba15be164d7aa5cc6592259464c71a2d60e1d6cd Mon Sep 17 00:00:00 2001 From: zkldi Date: Thu, 22 Jul 2021 01:40:28 +0100 Subject: [PATCH] Small refactor on UGPTStats. --- common/src/types.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/common/src/types.ts b/common/src/types.ts index 46472dcab..3860b3e88 100644 --- a/common/src/types.ts +++ b/common/src/types.ts @@ -1302,10 +1302,19 @@ export interface ImportLockDocument extends MongoDBDocument { userID: integer; } -export interface UGPTStatDetails { - folderID: string; - key: "score" | "percent" | "grade" | "lamp"; - value: number; +export type UGPTStatDetails = UGPTStatFolder | UGPTStatChart; + +export interface UGPTStatFolder { + mode: "folder"; + folderID: string | string[]; + property: "score" | "percent" | "grade" | "lamp"; + gte: number; +} + +export interface UGPTStatChart { + mode: "chart"; + chartID: string; + property: "score" | "percent" | "grade" | "lamp" | "playcount"; } export interface UGPTSettings extends MongoDBDocument {