@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.
@@ -9947,6 +9947,41 @@ var DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT = gql`
9947
9947
  }
9948
9948
  ${DAILY_CLUE_BASE_GAME_FIELDS_FRAGMENT}
9949
9949
  `;
9950
+ var MINI_QUIZ_QUESTION_FIELDS_FRAGMENT = gql`
9951
+ fragment MiniQuizQuestionFields on MiniQuizQuestionType {
9952
+ answers {
9953
+ answer
9954
+ correct
9955
+ }
9956
+ question
9957
+ }
9958
+ `;
9959
+ var MINI_QUIZ_BASE_GAME_FIELDS_FRAGMENT = gql`
9960
+ fragment MiniQuizBaseGameFields on MiniQuizBaseGameType {
9961
+ gameDate {
9962
+ ...GameDateFields
9963
+ }
9964
+ questions {
9965
+ ...MiniQuizQuestionFields
9966
+ }
9967
+ }
9968
+ ${GAME_DATE_FIELDS_FRAGMENT}
9969
+ ${MINI_QUIZ_QUESTION_FIELDS_FRAGMENT}
9970
+ `;
9971
+ var MINI_QUIZ_GAME_DATA_FIELDS_FRAGMENT = gql`
9972
+ fragment MiniQuizGameDataFields on MiniQuizGameDataType {
9973
+ gameFields {
9974
+ ...MiniQuizBaseGameFields
9975
+ }
9976
+ quizInfo {
9977
+ ...MiniQuizQuestionFields
9978
+ }
9979
+ points
9980
+ streak
9981
+ }
9982
+ ${MINI_QUIZ_BASE_GAME_FIELDS_FRAGMENT}
9983
+ ${MINI_QUIZ_QUESTION_FIELDS_FRAGMENT}
9984
+ `;
9950
9985
  var GAME_HISTORY_FIELDS_FRAGMENT = gql`
9951
9986
  fragment GameHistoryFields on GameHistoryType {
9952
9987
  createdAt
@@ -9964,8 +9999,12 @@ var GAME_DATA_FIELDS_FRAGMENT = gql`
9964
9999
  dailyClue {
9965
10000
  ...DailyClueGameDataFields
9966
10001
  }
10002
+ miniQuiz {
10003
+ ...MiniQuizGameDataFields
10004
+ }
9967
10005
  }
9968
10006
  ${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}
10007
+ ${MINI_QUIZ_GAME_DATA_FIELDS_FRAGMENT}
9969
10008
  `;
9970
10009
  var GAME_FIELDS_FRAGMENT = gql`
9971
10010
  fragment GameFields on GameType {
@@ -10039,8 +10078,12 @@ var BASE_GAME_FIELDS_FRAGMENT = gql`
10039
10078
  dailyClue {
10040
10079
  ...DailyClueBaseGameFields
10041
10080
  }
10081
+ miniQuiz {
10082
+ ...MiniQuizBaseGameFields
10083
+ }
10042
10084
  }
10043
10085
  ${DAILY_CLUE_BASE_GAME_FIELDS_FRAGMENT}
10086
+ ${MINI_QUIZ_BASE_GAME_FIELDS_FRAGMENT}
10044
10087
  `;
10045
10088
  var POST_CONTENT_DATA_FIELDS_FRAGMENT = gql`
10046
10089
  fragment PostContentDataFields on PostContentData {
@@ -11037,6 +11080,7 @@ var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
11037
11080
  })(EnumGameStatus || {});
11038
11081
  var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
11039
11082
  EnumGameType2["DAILY_CLUE"] = "dailyClue";
11083
+ EnumGameType2["MINI_QUIZ"] = "miniQuiz";
11040
11084
  return EnumGameType2;
11041
11085
  })(EnumGameType || {});
11042
11086
 
@@ -12282,6 +12326,9 @@ var AppSettingSchema = new MongooseSchema18(
12282
12326
  var AppSettingModel = mongoose18.models.AppSetting || mongoose18.model("AppSetting", AppSettingSchema);
12283
12327
 
12284
12328
  // src/mongoose/game/Game.ts
12329
+ import mongoose22 from "mongoose";
12330
+
12331
+ // src/mongoose/game/DailyClue.ts
12285
12332
  import mongoose20 from "mongoose";
12286
12333
 
12287
12334
  // src/mongoose/game/utils.ts
@@ -12294,7 +12341,10 @@ var schemaGameDate = new MongooseSchema19(
12294
12341
  },
12295
12342
  { _id: false }
12296
12343
  );
12297
- var schemaLetters = new MongooseSchema19(
12344
+
12345
+ // src/mongoose/game/DailyClue.ts
12346
+ var MongooseSchema20 = mongoose20.Schema;
12347
+ var schemaLetters = new MongooseSchema20(
12298
12348
  {
12299
12349
  collected: { required: false, type: [String] },
12300
12350
  solutionShuffled: { required: true, type: [String] }
@@ -12302,14 +12352,14 @@ var schemaLetters = new MongooseSchema19(
12302
12352
  },
12303
12353
  { _id: false }
12304
12354
  );
12305
- var schemaDailyClueBaseGame = new MongooseSchema19(
12355
+ var schemaDailyClueBaseGame = new MongooseSchema20(
12306
12356
  {
12307
12357
  gameDate: { required: true, type: schemaGameDate },
12308
12358
  gameSolution: { required: true, type: String }
12309
12359
  },
12310
12360
  { _id: false }
12311
12361
  );
12312
- var schemaDailyClueGameData = new MongooseSchema19(
12362
+ var schemaDailyClueGameData = new MongooseSchema20(
12313
12363
  {
12314
12364
  gameFields: { required: true, type: schemaDailyClueBaseGame },
12315
12365
  lastFoundDate: { default: null, required: false, type: Date },
@@ -12323,10 +12373,49 @@ var schemaDailyClueGameData = new MongooseSchema19(
12323
12373
  { _id: false }
12324
12374
  );
12325
12375
 
12376
+ // src/mongoose/game/MiniQuiz.ts
12377
+ import mongoose21 from "mongoose";
12378
+ var MongooseSchema21 = mongoose21.Schema;
12379
+ var schemaMiniQuizAnswers = new MongooseSchema21(
12380
+ {
12381
+ answer: { required: true, type: String },
12382
+ correct: { required: true, type: Boolean }
12383
+ },
12384
+ { _id: false }
12385
+ );
12386
+ var schemaMiniQuizQuestions = new MongooseSchema21(
12387
+ {
12388
+ answers: { required: true, type: [schemaMiniQuizAnswers] },
12389
+ question: { required: true, type: String }
12390
+ },
12391
+ { _id: false }
12392
+ );
12393
+ var schemaMiniQuizBaseGame = new MongooseSchema21(
12394
+ {
12395
+ gameDate: { required: true, type: Date },
12396
+ questions: { required: true, type: [schemaMiniQuizQuestions] }
12397
+ },
12398
+ { _id: false }
12399
+ );
12400
+ var schemaMiniQuizGameData = new MongooseSchema21(
12401
+ {
12402
+ gameFields: { required: true, type: schemaMiniQuizBaseGame },
12403
+ points: { default: 0, required: true, type: Number },
12404
+ quizInfo: {
12405
+ default: null,
12406
+ required: false,
12407
+ type: [schemaMiniQuizQuestions]
12408
+ },
12409
+ streak: { default: 0, required: true, type: Number }
12410
+ },
12411
+ { _id: false }
12412
+ );
12413
+
12326
12414
  // src/mongoose/game/Game.ts
12327
- var MongooseSchema20 = mongoose20.Schema;
12415
+ var MongooseSchema22 = mongoose22.Schema;
12328
12416
  var gameDataSchemas = {
12329
- [EnumGameType.DAILY_CLUE]: schemaDailyClueGameData
12417
+ [EnumGameType.DAILY_CLUE]: schemaDailyClueGameData,
12418
+ [EnumGameType.MINI_QUIZ]: schemaMiniQuizGameData
12330
12419
  };
12331
12420
  var gameDataDefinition = Object.fromEntries(
12332
12421
  Object.entries(gameDataSchemas).map(([key, schema16]) => [
@@ -12334,7 +12423,7 @@ var gameDataDefinition = Object.fromEntries(
12334
12423
  { default: null, required: false, type: schema16 }
12335
12424
  ])
12336
12425
  );
12337
- var gameHistorySchema = new MongooseSchema20(
12426
+ var gameHistorySchema = new MongooseSchema22(
12338
12427
  {
12339
12428
  createdAt: { required: true, type: Date },
12340
12429
  gameDate: { required: true, type: schemaGameDate },
@@ -12352,7 +12441,7 @@ var gameHistorySchema = new MongooseSchema20(
12352
12441
  },
12353
12442
  { _id: false }
12354
12443
  );
12355
- var gameTypeSchema = new MongooseSchema20(
12444
+ var gameTypeSchema = new MongooseSchema22(
12356
12445
  {
12357
12446
  active: { default: true, required: true, type: Boolean },
12358
12447
  gameData: gameDataDefinition,
@@ -12365,7 +12454,7 @@ var gameTypeSchema = new MongooseSchema20(
12365
12454
  },
12366
12455
  { timestamps: true }
12367
12456
  );
12368
- var schema14 = new MongooseSchema20(
12457
+ var schema14 = new MongooseSchema22(
12369
12458
  {
12370
12459
  active: { default: false, required: true, type: Boolean },
12371
12460
  deletedAt: { default: null, required: false, type: Date },
@@ -12378,12 +12467,12 @@ var schema14 = new MongooseSchema20(
12378
12467
  },
12379
12468
  { timestamps: true }
12380
12469
  );
12381
- var GameModel = mongoose20.models.Game || mongoose20.model("Game", schema14);
12470
+ var GameModel = mongoose22.models.Game || mongoose22.model("Game", schema14);
12382
12471
 
12383
12472
  // src/mongoose/School.ts
12384
- import mongoose21 from "mongoose";
12385
- var MongooseSchema21 = mongoose21.Schema;
12386
- var schema15 = new MongooseSchema21(
12473
+ import mongoose23 from "mongoose";
12474
+ var MongooseSchema23 = mongoose23.Schema;
12475
+ var schema15 = new MongooseSchema23(
12387
12476
  {
12388
12477
  // New schools are active by default
12389
12478
  active: { default: true, required: true, type: Boolean },
@@ -12408,7 +12497,7 @@ var schema15 = new MongooseSchema21(
12408
12497
  },
12409
12498
  { timestamps: true }
12410
12499
  );
12411
- var SchoolModel = mongoose21.models.School || mongoose21.model("School", schema15);
12500
+ var SchoolModel = mongoose23.models.School || mongoose23.model("School", schema15);
12412
12501
 
12413
12502
  export {
12414
12503
  EnumChatType,
@@ -12477,4 +12566,4 @@ react/cjs/react.development.js:
12477
12566
  * LICENSE file in the root directory of this source tree.
12478
12567
  *)
12479
12568
  */
12480
- //# sourceMappingURL=chunk-YNM5IJGO.mjs.map
12569
+ //# sourceMappingURL=chunk-QVELNUI7.mjs.map