@timardex/cluemart-server-shared 1.0.150 → 1.0.152

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10017,6 +10017,37 @@ var DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT = gql`
10017
10017
  }
10018
10018
  ${DAILY_CLUE_BASE_GAME_FIELDS_FRAGMENT}
10019
10019
  `;
10020
+ var MINI_QUIZ_QUESTION_FIELDS_FRAGMENT = gql`
10021
+ fragment MiniQuizQuestionFields on MiniQuizQuestionType {
10022
+ answers {
10023
+ answer
10024
+ correct
10025
+ }
10026
+ question
10027
+ }
10028
+ `;
10029
+ var MINI_QUIZ_BASE_GAME_FIELDS_FRAGMENT = gql`
10030
+ fragment MiniQuizBaseGameFields on MiniQuizBaseGameType {
10031
+ questions {
10032
+ ...MiniQuizQuestionFields
10033
+ }
10034
+ }
10035
+ ${MINI_QUIZ_QUESTION_FIELDS_FRAGMENT}
10036
+ `;
10037
+ var MINI_QUIZ_GAME_DATA_FIELDS_FRAGMENT = gql`
10038
+ fragment MiniQuizGameDataFields on MiniQuizGameDataType {
10039
+ gameFields {
10040
+ ...MiniQuizBaseGameFields
10041
+ }
10042
+ quizInfo {
10043
+ ...MiniQuizQuestionFields
10044
+ }
10045
+ points
10046
+ streak
10047
+ }
10048
+ ${MINI_QUIZ_BASE_GAME_FIELDS_FRAGMENT}
10049
+ ${MINI_QUIZ_QUESTION_FIELDS_FRAGMENT}
10050
+ `;
10020
10051
  var GAME_HISTORY_FIELDS_FRAGMENT = gql`
10021
10052
  fragment GameHistoryFields on GameHistoryType {
10022
10053
  createdAt
@@ -10034,8 +10065,12 @@ var GAME_DATA_FIELDS_FRAGMENT = gql`
10034
10065
  dailyClue {
10035
10066
  ...DailyClueGameDataFields
10036
10067
  }
10068
+ miniQuiz {
10069
+ ...MiniQuizGameDataFields
10070
+ }
10037
10071
  }
10038
10072
  ${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}
10073
+ ${MINI_QUIZ_GAME_DATA_FIELDS_FRAGMENT}
10039
10074
  `;
10040
10075
  var GAME_FIELDS_FRAGMENT = gql`
10041
10076
  fragment GameFields on GameType {
@@ -10109,8 +10144,12 @@ var BASE_GAME_FIELDS_FRAGMENT = gql`
10109
10144
  dailyClue {
10110
10145
  ...DailyClueBaseGameFields
10111
10146
  }
10147
+ miniQuiz {
10148
+ ...MiniQuizBaseGameFields
10149
+ }
10112
10150
  }
10113
10151
  ${DAILY_CLUE_BASE_GAME_FIELDS_FRAGMENT}
10152
+ ${MINI_QUIZ_BASE_GAME_FIELDS_FRAGMENT}
10114
10153
  `;
10115
10154
  var POST_CONTENT_DATA_FIELDS_FRAGMENT = gql`
10116
10155
  fragment PostContentDataFields on PostContentData {
@@ -11107,6 +11146,7 @@ var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
11107
11146
  })(EnumGameStatus || {});
11108
11147
  var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
11109
11148
  EnumGameType2["DAILY_CLUE"] = "dailyClue";
11149
+ EnumGameType2["MINI_QUIZ"] = "miniQuiz";
11110
11150
  return EnumGameType2;
11111
11151
  })(EnumGameType || {});
11112
11152
 
@@ -12352,6 +12392,9 @@ var AppSettingSchema = new MongooseSchema18(
12352
12392
  var AppSettingModel = import_mongoose18.default.models.AppSetting || import_mongoose18.default.model("AppSetting", AppSettingSchema);
12353
12393
 
12354
12394
  // src/mongoose/game/Game.ts
12395
+ var import_mongoose22 = __toESM(require("mongoose"));
12396
+
12397
+ // src/mongoose/game/DailyClue.ts
12355
12398
  var import_mongoose20 = __toESM(require("mongoose"));
12356
12399
 
12357
12400
  // src/mongoose/game/utils.ts
@@ -12364,7 +12407,10 @@ var schemaGameDate = new MongooseSchema19(
12364
12407
  },
12365
12408
  { _id: false }
12366
12409
  );
12367
- var schemaLetters = new MongooseSchema19(
12410
+
12411
+ // src/mongoose/game/DailyClue.ts
12412
+ var MongooseSchema20 = import_mongoose20.default.Schema;
12413
+ var schemaLetters = new MongooseSchema20(
12368
12414
  {
12369
12415
  collected: { required: false, type: [String] },
12370
12416
  solutionShuffled: { required: true, type: [String] }
@@ -12372,14 +12418,14 @@ var schemaLetters = new MongooseSchema19(
12372
12418
  },
12373
12419
  { _id: false }
12374
12420
  );
12375
- var schemaDailyClueBaseGame = new MongooseSchema19(
12421
+ var schemaDailyClueBaseGame = new MongooseSchema20(
12376
12422
  {
12377
12423
  gameDate: { required: true, type: schemaGameDate },
12378
12424
  gameSolution: { required: true, type: String }
12379
12425
  },
12380
12426
  { _id: false }
12381
12427
  );
12382
- var schemaDailyClueGameData = new MongooseSchema19(
12428
+ var schemaDailyClueGameData = new MongooseSchema20(
12383
12429
  {
12384
12430
  gameFields: { required: true, type: schemaDailyClueBaseGame },
12385
12431
  lastFoundDate: { default: null, required: false, type: Date },
@@ -12393,10 +12439,48 @@ var schemaDailyClueGameData = new MongooseSchema19(
12393
12439
  { _id: false }
12394
12440
  );
12395
12441
 
12442
+ // src/mongoose/game/MiniQuiz.ts
12443
+ var import_mongoose21 = __toESM(require("mongoose"));
12444
+ var MongooseSchema21 = import_mongoose21.default.Schema;
12445
+ var schemaMiniQuizAnswers = new MongooseSchema21(
12446
+ {
12447
+ answer: { required: true, type: String },
12448
+ correct: { required: true, type: Boolean }
12449
+ },
12450
+ { _id: false }
12451
+ );
12452
+ var schemaMiniQuizQuestions = new MongooseSchema21(
12453
+ {
12454
+ answers: { required: true, type: [schemaMiniQuizAnswers] },
12455
+ question: { required: true, type: String }
12456
+ },
12457
+ { _id: false }
12458
+ );
12459
+ var schemaMiniQuizBaseGame = new MongooseSchema21(
12460
+ {
12461
+ questions: { required: true, type: [schemaMiniQuizQuestions] }
12462
+ },
12463
+ { _id: false }
12464
+ );
12465
+ var schemaMiniQuizGameData = new MongooseSchema21(
12466
+ {
12467
+ gameFields: { required: true, type: schemaMiniQuizBaseGame },
12468
+ points: { default: 0, required: true, type: Number },
12469
+ quizInfo: {
12470
+ default: null,
12471
+ required: false,
12472
+ type: [schemaMiniQuizQuestions]
12473
+ },
12474
+ streak: { default: 0, required: true, type: Number }
12475
+ },
12476
+ { _id: false }
12477
+ );
12478
+
12396
12479
  // src/mongoose/game/Game.ts
12397
- var MongooseSchema20 = import_mongoose20.default.Schema;
12480
+ var MongooseSchema22 = import_mongoose22.default.Schema;
12398
12481
  var gameDataSchemas = {
12399
- [EnumGameType.DAILY_CLUE]: schemaDailyClueGameData
12482
+ [EnumGameType.DAILY_CLUE]: schemaDailyClueGameData,
12483
+ [EnumGameType.MINI_QUIZ]: schemaMiniQuizGameData
12400
12484
  };
12401
12485
  var gameDataDefinition = Object.fromEntries(
12402
12486
  Object.entries(gameDataSchemas).map(([key, schema16]) => [
@@ -12404,7 +12488,7 @@ var gameDataDefinition = Object.fromEntries(
12404
12488
  { default: null, required: false, type: schema16 }
12405
12489
  ])
12406
12490
  );
12407
- var gameHistorySchema = new MongooseSchema20(
12491
+ var gameHistorySchema = new MongooseSchema22(
12408
12492
  {
12409
12493
  createdAt: { required: true, type: Date },
12410
12494
  gameDate: { required: true, type: schemaGameDate },
@@ -12422,7 +12506,7 @@ var gameHistorySchema = new MongooseSchema20(
12422
12506
  },
12423
12507
  { _id: false }
12424
12508
  );
12425
- var gameTypeSchema = new MongooseSchema20(
12509
+ var gameTypeSchema = new MongooseSchema22(
12426
12510
  {
12427
12511
  active: { default: true, required: true, type: Boolean },
12428
12512
  gameData: gameDataDefinition,
@@ -12435,7 +12519,7 @@ var gameTypeSchema = new MongooseSchema20(
12435
12519
  },
12436
12520
  { timestamps: true }
12437
12521
  );
12438
- var schema14 = new MongooseSchema20(
12522
+ var schema14 = new MongooseSchema22(
12439
12523
  {
12440
12524
  active: { default: false, required: true, type: Boolean },
12441
12525
  deletedAt: { default: null, required: false, type: Date },
@@ -12448,12 +12532,12 @@ var schema14 = new MongooseSchema20(
12448
12532
  },
12449
12533
  { timestamps: true }
12450
12534
  );
12451
- var GameModel = import_mongoose20.default.models.Game || import_mongoose20.default.model("Game", schema14);
12535
+ var GameModel = import_mongoose22.default.models.Game || import_mongoose22.default.model("Game", schema14);
12452
12536
 
12453
12537
  // src/mongoose/School.ts
12454
- var import_mongoose21 = __toESM(require("mongoose"));
12455
- var MongooseSchema21 = import_mongoose21.default.Schema;
12456
- var schema15 = new MongooseSchema21(
12538
+ var import_mongoose23 = __toESM(require("mongoose"));
12539
+ var MongooseSchema23 = import_mongoose23.default.Schema;
12540
+ var schema15 = new MongooseSchema23(
12457
12541
  {
12458
12542
  // New schools are active by default
12459
12543
  active: { default: true, required: true, type: Boolean },
@@ -12478,7 +12562,7 @@ var schema15 = new MongooseSchema21(
12478
12562
  },
12479
12563
  { timestamps: true }
12480
12564
  );
12481
- var SchoolModel = import_mongoose21.default.models.School || import_mongoose21.default.model("School", schema15);
12565
+ var SchoolModel = import_mongoose23.default.models.School || import_mongoose23.default.model("School", schema15);
12482
12566
  // Annotate the CommonJS export names for ESM import in node:
12483
12567
  0 && (module.exports = {
12484
12568
  APP_SETTINGS_ID,