milestoneimportinfo

This commit is contained in:
zkldi
2021-05-09 20:08:41 +01:00
parent 51df0a7a13
commit 16cfac8d8f
2 changed files with 22 additions and 4 deletions
+10 -2
View File
@@ -433,6 +433,7 @@ export interface ImportDocument extends MongoDBDocument {
importType: ImportTypes;
classDeltas: ClassDelta[];
goalInfo: GoalImportInfo[];
milestoneInfo: MilestoneImportInfo[];
/**
* Whether the user deliberately imported this through an action (i.e. uploaded a file personally) [true]
* or was imported on their behalf through a service (i.e. fervidex)
@@ -445,6 +446,12 @@ export interface GoalImportInfo {
old: GoalImportStat;
new: GoalImportStat;
}
export declare type MilestoneImportStat = Pick<UserMilestoneDocument, "progress" | "achieved">;
export interface MilestoneImportInfo {
milestoneID: string;
old: GoalImportStat;
new: GoalImportStat;
}
export interface UserGoalDocument extends MongoDBDocument {
goalID: string;
userID: integer;
@@ -473,8 +480,9 @@ export interface MilestoneDocument extends MongoDBDocument {
playtype: Playtypes[Game];
criteria: {
/**
* All: All goals must be achieved in order for the milestone to be complete
* Count: Goals achieved must be greater than or equal to criteria.value.
* all: All goals must be achieved in order for the milestone to be complete
* abs: Goals achieved must be greater than or equal to criteria.value.
* proportion: Goals achieved must be greater than or equal to criteria.value * total_goals.
*/
type: "all" | "abs" | "proportion";
value: number | null;
+12 -2
View File
@@ -600,6 +600,7 @@ export interface ImportDocument extends MongoDBDocument {
importType: ImportTypes;
classDeltas: ClassDelta[];
goalInfo: GoalImportInfo[];
milestoneInfo: MilestoneImportInfo[];
/**
* Whether the user deliberately imported this through an action (i.e. uploaded a file personally) [true]
* or was imported on their behalf through a service (i.e. fervidex)
@@ -618,6 +619,14 @@ export interface GoalImportInfo {
new: GoalImportStat;
}
export type MilestoneImportStat = Pick<UserMilestoneDocument, "progress" | "achieved">;
export interface MilestoneImportInfo {
milestoneID: string;
old: GoalImportStat;
new: GoalImportStat;
}
export interface UserGoalDocument extends MongoDBDocument {
goalID: string;
userID: integer;
@@ -649,8 +658,9 @@ export interface MilestoneDocument extends MongoDBDocument {
playtype: Playtypes[Game];
criteria: {
/**
* All: All goals must be achieved in order for the milestone to be complete
* Count: Goals achieved must be greater than or equal to criteria.value.
* all: All goals must be achieved in order for the milestone to be complete
* abs: Goals achieved must be greater than or equal to criteria.value.
* proportion: Goals achieved must be greater than or equal to criteria.value * total_goals.
*/
type: "all" | "abs" | "proportion";
value: number | null;