feat: bunch of new stuff + proper dependency handling

This commit is contained in:
zkldi
2022-11-25 03:46:11 +00:00
parent cbce1a31f4
commit a6d89f748e
28 changed files with 567 additions and 232 deletions
-2
View File
@@ -657,7 +657,6 @@ const PRE_SCHEMAS = {
game: p.isIn(games),
playtype: isValidPlaytype,
achieved: "boolean",
timeSet: p.isPositive,
timeAchieved: p.nullable(p.isPositive),
lastInteraction: p.nullable(p.isPositive),
progress: "?number",
@@ -670,7 +669,6 @@ const PRE_SCHEMAS = {
userID: p.isPositiveNonZeroInteger,
game: p.isIn(games),
playtype: isValidPlaytype,
timeSet: p.isPositive,
achieved: "boolean",
timeAchieved: p.nullable(p.isPositive),
progress: p.isInteger,
+8 -2
View File
@@ -597,13 +597,16 @@ export type GoalSubscriptionDocument = MongoDBDocument & {
userID: integer;
game: Game;
playtype: Playtype;
timeSet: integer;
lastInteraction: integer | null;
progress: number | null;
progressHuman: string;
outOf: number;
outOfHuman: string;
wasInstantlyAchieved: boolean;
// Was this goal assigned "standalone"? I.e. a user explicitly subscribed to this.
// instead of it being a result of a quest subscription.
wasAssignedStandalone: boolean;
} & (
| {
achieved: false;
@@ -990,10 +993,13 @@ export type QuestSubscriptionDocument = MongoDBDocument & {
userID: integer;
game: Game;
playtype: Playtype;
timeSet: integer;
progress: integer;
lastInteraction: integer | null;
wasInstantlyAchieved: boolean;
// Was this quest assigned "standalone"? I.e. a user explicitly subscribed to this -
// instead of it being a result of a questline subscription.
wasAssignedStandalone: boolean;
} & (
| {
achieved: false;