@timardex/cluemart-server-shared 1.0.150 → 1.0.151

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,41 @@ 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
+ gameDate {
10032
+ ...GameDateFields
10033
+ }
10034
+ questions {
10035
+ ...MiniQuizQuestionFields
10036
+ }
10037
+ }
10038
+ ${GAME_DATE_FIELDS_FRAGMENT}
10039
+ ${MINI_QUIZ_QUESTION_FIELDS_FRAGMENT}
10040
+ `;
10041
+ var MINI_QUIZ_GAME_DATA_FIELDS_FRAGMENT = gql`
10042
+ fragment MiniQuizGameDataFields on MiniQuizGameDataType {
10043
+ gameFields {
10044
+ ...MiniQuizBaseGameFields
10045
+ }
10046
+ quizInfo {
10047
+ ...MiniQuizQuestionFields
10048
+ }
10049
+ points
10050
+ streak
10051
+ }
10052
+ ${MINI_QUIZ_BASE_GAME_FIELDS_FRAGMENT}
10053
+ ${MINI_QUIZ_QUESTION_FIELDS_FRAGMENT}
10054
+ `;
10020
10055
  var GAME_HISTORY_FIELDS_FRAGMENT = gql`
10021
10056
  fragment GameHistoryFields on GameHistoryType {
10022
10057
  createdAt
@@ -10034,8 +10069,12 @@ var GAME_DATA_FIELDS_FRAGMENT = gql`
10034
10069
  dailyClue {
10035
10070
  ...DailyClueGameDataFields
10036
10071
  }
10072
+ miniQuiz {
10073
+ ...MiniQuizGameDataFields
10074
+ }
10037
10075
  }
10038
10076
  ${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}
10077
+ ${MINI_QUIZ_GAME_DATA_FIELDS_FRAGMENT}
10039
10078
  `;
10040
10079
  var GAME_FIELDS_FRAGMENT = gql`
10041
10080
  fragment GameFields on GameType {
@@ -10109,8 +10148,12 @@ var BASE_GAME_FIELDS_FRAGMENT = gql`
10109
10148
  dailyClue {
10110
10149
  ...DailyClueBaseGameFields
10111
10150
  }
10151
+ miniQuiz {
10152
+ ...MiniQuizBaseGameFields
10153
+ }
10112
10154
  }
10113
10155
  ${DAILY_CLUE_BASE_GAME_FIELDS_FRAGMENT}
10156
+ ${MINI_QUIZ_BASE_GAME_FIELDS_FRAGMENT}
10114
10157
  `;
10115
10158
  var POST_CONTENT_DATA_FIELDS_FRAGMENT = gql`
10116
10159
  fragment PostContentDataFields on PostContentData {
@@ -11107,6 +11150,7 @@ var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
11107
11150
  })(EnumGameStatus || {});
11108
11151
  var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
11109
11152
  EnumGameType2["DAILY_CLUE"] = "dailyClue";
11153
+ EnumGameType2["MINI_QUIZ"] = "miniQuiz";
11110
11154
  return EnumGameType2;
11111
11155
  })(EnumGameType || {});
11112
11156
 
@@ -12352,6 +12396,9 @@ var AppSettingSchema = new MongooseSchema18(
12352
12396
  var AppSettingModel = import_mongoose18.default.models.AppSetting || import_mongoose18.default.model("AppSetting", AppSettingSchema);
12353
12397
 
12354
12398
  // src/mongoose/game/Game.ts
12399
+ var import_mongoose22 = __toESM(require("mongoose"));
12400
+
12401
+ // src/mongoose/game/DailyClue.ts
12355
12402
  var import_mongoose20 = __toESM(require("mongoose"));
12356
12403
 
12357
12404
  // src/mongoose/game/utils.ts
@@ -12364,7 +12411,10 @@ var schemaGameDate = new MongooseSchema19(
12364
12411
  },
12365
12412
  { _id: false }
12366
12413
  );
12367
- var schemaLetters = new MongooseSchema19(
12414
+
12415
+ // src/mongoose/game/DailyClue.ts
12416
+ var MongooseSchema20 = import_mongoose20.default.Schema;
12417
+ var schemaLetters = new MongooseSchema20(
12368
12418
  {
12369
12419
  collected: { required: false, type: [String] },
12370
12420
  solutionShuffled: { required: true, type: [String] }
@@ -12372,14 +12422,14 @@ var schemaLetters = new MongooseSchema19(
12372
12422
  },
12373
12423
  { _id: false }
12374
12424
  );
12375
- var schemaDailyClueBaseGame = new MongooseSchema19(
12425
+ var schemaDailyClueBaseGame = new MongooseSchema20(
12376
12426
  {
12377
12427
  gameDate: { required: true, type: schemaGameDate },
12378
12428
  gameSolution: { required: true, type: String }
12379
12429
  },
12380
12430
  { _id: false }
12381
12431
  );
12382
- var schemaDailyClueGameData = new MongooseSchema19(
12432
+ var schemaDailyClueGameData = new MongooseSchema20(
12383
12433
  {
12384
12434
  gameFields: { required: true, type: schemaDailyClueBaseGame },
12385
12435
  lastFoundDate: { default: null, required: false, type: Date },
@@ -12393,10 +12443,49 @@ var schemaDailyClueGameData = new MongooseSchema19(
12393
12443
  { _id: false }
12394
12444
  );
12395
12445
 
12446
+ // src/mongoose/game/MiniQuiz.ts
12447
+ var import_mongoose21 = __toESM(require("mongoose"));
12448
+ var MongooseSchema21 = import_mongoose21.default.Schema;
12449
+ var schemaMiniQuizAnswers = new MongooseSchema21(
12450
+ {
12451
+ answer: { required: true, type: String },
12452
+ correct: { required: true, type: Boolean }
12453
+ },
12454
+ { _id: false }
12455
+ );
12456
+ var schemaMiniQuizQuestions = new MongooseSchema21(
12457
+ {
12458
+ answers: { required: true, type: [schemaMiniQuizAnswers] },
12459
+ question: { required: true, type: String }
12460
+ },
12461
+ { _id: false }
12462
+ );
12463
+ var schemaMiniQuizBaseGame = new MongooseSchema21(
12464
+ {
12465
+ gameDate: { required: true, type: Date },
12466
+ questions: { required: true, type: [schemaMiniQuizQuestions] }
12467
+ },
12468
+ { _id: false }
12469
+ );
12470
+ var schemaMiniQuizGameData = new MongooseSchema21(
12471
+ {
12472
+ gameFields: { required: true, type: schemaMiniQuizBaseGame },
12473
+ points: { default: 0, required: true, type: Number },
12474
+ quizInfo: {
12475
+ default: null,
12476
+ required: false,
12477
+ type: [schemaMiniQuizQuestions]
12478
+ },
12479
+ streak: { default: 0, required: true, type: Number }
12480
+ },
12481
+ { _id: false }
12482
+ );
12483
+
12396
12484
  // src/mongoose/game/Game.ts
12397
- var MongooseSchema20 = import_mongoose20.default.Schema;
12485
+ var MongooseSchema22 = import_mongoose22.default.Schema;
12398
12486
  var gameDataSchemas = {
12399
- [EnumGameType.DAILY_CLUE]: schemaDailyClueGameData
12487
+ [EnumGameType.DAILY_CLUE]: schemaDailyClueGameData,
12488
+ [EnumGameType.MINI_QUIZ]: schemaMiniQuizGameData
12400
12489
  };
12401
12490
  var gameDataDefinition = Object.fromEntries(
12402
12491
  Object.entries(gameDataSchemas).map(([key, schema16]) => [
@@ -12404,7 +12493,7 @@ var gameDataDefinition = Object.fromEntries(
12404
12493
  { default: null, required: false, type: schema16 }
12405
12494
  ])
12406
12495
  );
12407
- var gameHistorySchema = new MongooseSchema20(
12496
+ var gameHistorySchema = new MongooseSchema22(
12408
12497
  {
12409
12498
  createdAt: { required: true, type: Date },
12410
12499
  gameDate: { required: true, type: schemaGameDate },
@@ -12422,7 +12511,7 @@ var gameHistorySchema = new MongooseSchema20(
12422
12511
  },
12423
12512
  { _id: false }
12424
12513
  );
12425
- var gameTypeSchema = new MongooseSchema20(
12514
+ var gameTypeSchema = new MongooseSchema22(
12426
12515
  {
12427
12516
  active: { default: true, required: true, type: Boolean },
12428
12517
  gameData: gameDataDefinition,
@@ -12435,7 +12524,7 @@ var gameTypeSchema = new MongooseSchema20(
12435
12524
  },
12436
12525
  { timestamps: true }
12437
12526
  );
12438
- var schema14 = new MongooseSchema20(
12527
+ var schema14 = new MongooseSchema22(
12439
12528
  {
12440
12529
  active: { default: false, required: true, type: Boolean },
12441
12530
  deletedAt: { default: null, required: false, type: Date },
@@ -12448,12 +12537,12 @@ var schema14 = new MongooseSchema20(
12448
12537
  },
12449
12538
  { timestamps: true }
12450
12539
  );
12451
- var GameModel = import_mongoose20.default.models.Game || import_mongoose20.default.model("Game", schema14);
12540
+ var GameModel = import_mongoose22.default.models.Game || import_mongoose22.default.model("Game", schema14);
12452
12541
 
12453
12542
  // src/mongoose/School.ts
12454
- var import_mongoose21 = __toESM(require("mongoose"));
12455
- var MongooseSchema21 = import_mongoose21.default.Schema;
12456
- var schema15 = new MongooseSchema21(
12543
+ var import_mongoose23 = __toESM(require("mongoose"));
12544
+ var MongooseSchema23 = import_mongoose23.default.Schema;
12545
+ var schema15 = new MongooseSchema23(
12457
12546
  {
12458
12547
  // New schools are active by default
12459
12548
  active: { default: true, required: true, type: Boolean },
@@ -12478,7 +12567,7 @@ var schema15 = new MongooseSchema21(
12478
12567
  },
12479
12568
  { timestamps: true }
12480
12569
  );
12481
- var SchoolModel = import_mongoose21.default.models.School || import_mongoose21.default.model("School", schema15);
12570
+ var SchoolModel = import_mongoose23.default.models.School || import_mongoose23.default.model("School", schema15);
12482
12571
  // Annotate the CommonJS export names for ESM import in node:
12483
12572
  0 && (module.exports = {
12484
12573
  APP_SETTINGS_ID,