@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.
@@ -9947,6 +9947,37 @@ 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
+ questions {
9962
+ ...MiniQuizQuestionFields
9963
+ }
9964
+ }
9965
+ ${MINI_QUIZ_QUESTION_FIELDS_FRAGMENT}
9966
+ `;
9967
+ var MINI_QUIZ_GAME_DATA_FIELDS_FRAGMENT = gql`
9968
+ fragment MiniQuizGameDataFields on MiniQuizGameDataType {
9969
+ gameFields {
9970
+ ...MiniQuizBaseGameFields
9971
+ }
9972
+ quizInfo {
9973
+ ...MiniQuizQuestionFields
9974
+ }
9975
+ points
9976
+ streak
9977
+ }
9978
+ ${MINI_QUIZ_BASE_GAME_FIELDS_FRAGMENT}
9979
+ ${MINI_QUIZ_QUESTION_FIELDS_FRAGMENT}
9980
+ `;
9950
9981
  var GAME_HISTORY_FIELDS_FRAGMENT = gql`
9951
9982
  fragment GameHistoryFields on GameHistoryType {
9952
9983
  createdAt
@@ -9964,8 +9995,12 @@ var GAME_DATA_FIELDS_FRAGMENT = gql`
9964
9995
  dailyClue {
9965
9996
  ...DailyClueGameDataFields
9966
9997
  }
9998
+ miniQuiz {
9999
+ ...MiniQuizGameDataFields
10000
+ }
9967
10001
  }
9968
10002
  ${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}
10003
+ ${MINI_QUIZ_GAME_DATA_FIELDS_FRAGMENT}
9969
10004
  `;
9970
10005
  var GAME_FIELDS_FRAGMENT = gql`
9971
10006
  fragment GameFields on GameType {
@@ -10039,8 +10074,12 @@ var BASE_GAME_FIELDS_FRAGMENT = gql`
10039
10074
  dailyClue {
10040
10075
  ...DailyClueBaseGameFields
10041
10076
  }
10077
+ miniQuiz {
10078
+ ...MiniQuizBaseGameFields
10079
+ }
10042
10080
  }
10043
10081
  ${DAILY_CLUE_BASE_GAME_FIELDS_FRAGMENT}
10082
+ ${MINI_QUIZ_BASE_GAME_FIELDS_FRAGMENT}
10044
10083
  `;
10045
10084
  var POST_CONTENT_DATA_FIELDS_FRAGMENT = gql`
10046
10085
  fragment PostContentDataFields on PostContentData {
@@ -11037,6 +11076,7 @@ var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
11037
11076
  })(EnumGameStatus || {});
11038
11077
  var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
11039
11078
  EnumGameType2["DAILY_CLUE"] = "dailyClue";
11079
+ EnumGameType2["MINI_QUIZ"] = "miniQuiz";
11040
11080
  return EnumGameType2;
11041
11081
  })(EnumGameType || {});
11042
11082
 
@@ -12282,6 +12322,9 @@ var AppSettingSchema = new MongooseSchema18(
12282
12322
  var AppSettingModel = mongoose18.models.AppSetting || mongoose18.model("AppSetting", AppSettingSchema);
12283
12323
 
12284
12324
  // src/mongoose/game/Game.ts
12325
+ import mongoose22 from "mongoose";
12326
+
12327
+ // src/mongoose/game/DailyClue.ts
12285
12328
  import mongoose20 from "mongoose";
12286
12329
 
12287
12330
  // src/mongoose/game/utils.ts
@@ -12294,7 +12337,10 @@ var schemaGameDate = new MongooseSchema19(
12294
12337
  },
12295
12338
  { _id: false }
12296
12339
  );
12297
- var schemaLetters = new MongooseSchema19(
12340
+
12341
+ // src/mongoose/game/DailyClue.ts
12342
+ var MongooseSchema20 = mongoose20.Schema;
12343
+ var schemaLetters = new MongooseSchema20(
12298
12344
  {
12299
12345
  collected: { required: false, type: [String] },
12300
12346
  solutionShuffled: { required: true, type: [String] }
@@ -12302,14 +12348,14 @@ var schemaLetters = new MongooseSchema19(
12302
12348
  },
12303
12349
  { _id: false }
12304
12350
  );
12305
- var schemaDailyClueBaseGame = new MongooseSchema19(
12351
+ var schemaDailyClueBaseGame = new MongooseSchema20(
12306
12352
  {
12307
12353
  gameDate: { required: true, type: schemaGameDate },
12308
12354
  gameSolution: { required: true, type: String }
12309
12355
  },
12310
12356
  { _id: false }
12311
12357
  );
12312
- var schemaDailyClueGameData = new MongooseSchema19(
12358
+ var schemaDailyClueGameData = new MongooseSchema20(
12313
12359
  {
12314
12360
  gameFields: { required: true, type: schemaDailyClueBaseGame },
12315
12361
  lastFoundDate: { default: null, required: false, type: Date },
@@ -12323,10 +12369,48 @@ var schemaDailyClueGameData = new MongooseSchema19(
12323
12369
  { _id: false }
12324
12370
  );
12325
12371
 
12372
+ // src/mongoose/game/MiniQuiz.ts
12373
+ import mongoose21 from "mongoose";
12374
+ var MongooseSchema21 = mongoose21.Schema;
12375
+ var schemaMiniQuizAnswers = new MongooseSchema21(
12376
+ {
12377
+ answer: { required: true, type: String },
12378
+ correct: { required: true, type: Boolean }
12379
+ },
12380
+ { _id: false }
12381
+ );
12382
+ var schemaMiniQuizQuestions = new MongooseSchema21(
12383
+ {
12384
+ answers: { required: true, type: [schemaMiniQuizAnswers] },
12385
+ question: { required: true, type: String }
12386
+ },
12387
+ { _id: false }
12388
+ );
12389
+ var schemaMiniQuizBaseGame = new MongooseSchema21(
12390
+ {
12391
+ questions: { required: true, type: [schemaMiniQuizQuestions] }
12392
+ },
12393
+ { _id: false }
12394
+ );
12395
+ var schemaMiniQuizGameData = new MongooseSchema21(
12396
+ {
12397
+ gameFields: { required: true, type: schemaMiniQuizBaseGame },
12398
+ points: { default: 0, required: true, type: Number },
12399
+ quizInfo: {
12400
+ default: null,
12401
+ required: false,
12402
+ type: [schemaMiniQuizQuestions]
12403
+ },
12404
+ streak: { default: 0, required: true, type: Number }
12405
+ },
12406
+ { _id: false }
12407
+ );
12408
+
12326
12409
  // src/mongoose/game/Game.ts
12327
- var MongooseSchema20 = mongoose20.Schema;
12410
+ var MongooseSchema22 = mongoose22.Schema;
12328
12411
  var gameDataSchemas = {
12329
- [EnumGameType.DAILY_CLUE]: schemaDailyClueGameData
12412
+ [EnumGameType.DAILY_CLUE]: schemaDailyClueGameData,
12413
+ [EnumGameType.MINI_QUIZ]: schemaMiniQuizGameData
12330
12414
  };
12331
12415
  var gameDataDefinition = Object.fromEntries(
12332
12416
  Object.entries(gameDataSchemas).map(([key, schema16]) => [
@@ -12334,7 +12418,7 @@ var gameDataDefinition = Object.fromEntries(
12334
12418
  { default: null, required: false, type: schema16 }
12335
12419
  ])
12336
12420
  );
12337
- var gameHistorySchema = new MongooseSchema20(
12421
+ var gameHistorySchema = new MongooseSchema22(
12338
12422
  {
12339
12423
  createdAt: { required: true, type: Date },
12340
12424
  gameDate: { required: true, type: schemaGameDate },
@@ -12352,7 +12436,7 @@ var gameHistorySchema = new MongooseSchema20(
12352
12436
  },
12353
12437
  { _id: false }
12354
12438
  );
12355
- var gameTypeSchema = new MongooseSchema20(
12439
+ var gameTypeSchema = new MongooseSchema22(
12356
12440
  {
12357
12441
  active: { default: true, required: true, type: Boolean },
12358
12442
  gameData: gameDataDefinition,
@@ -12365,7 +12449,7 @@ var gameTypeSchema = new MongooseSchema20(
12365
12449
  },
12366
12450
  { timestamps: true }
12367
12451
  );
12368
- var schema14 = new MongooseSchema20(
12452
+ var schema14 = new MongooseSchema22(
12369
12453
  {
12370
12454
  active: { default: false, required: true, type: Boolean },
12371
12455
  deletedAt: { default: null, required: false, type: Date },
@@ -12378,12 +12462,12 @@ var schema14 = new MongooseSchema20(
12378
12462
  },
12379
12463
  { timestamps: true }
12380
12464
  );
12381
- var GameModel = mongoose20.models.Game || mongoose20.model("Game", schema14);
12465
+ var GameModel = mongoose22.models.Game || mongoose22.model("Game", schema14);
12382
12466
 
12383
12467
  // src/mongoose/School.ts
12384
- import mongoose21 from "mongoose";
12385
- var MongooseSchema21 = mongoose21.Schema;
12386
- var schema15 = new MongooseSchema21(
12468
+ import mongoose23 from "mongoose";
12469
+ var MongooseSchema23 = mongoose23.Schema;
12470
+ var schema15 = new MongooseSchema23(
12387
12471
  {
12388
12472
  // New schools are active by default
12389
12473
  active: { default: true, required: true, type: Boolean },
@@ -12408,7 +12492,7 @@ var schema15 = new MongooseSchema21(
12408
12492
  },
12409
12493
  { timestamps: true }
12410
12494
  );
12411
- var SchoolModel = mongoose21.models.School || mongoose21.model("School", schema15);
12495
+ var SchoolModel = mongoose23.models.School || mongoose23.model("School", schema15);
12412
12496
 
12413
12497
  export {
12414
12498
  EnumChatType,
@@ -12477,4 +12561,4 @@ react/cjs/react.development.js:
12477
12561
  * LICENSE file in the root directory of this source tree.
12478
12562
  *)
12479
12563
  */
12480
- //# sourceMappingURL=chunk-YNM5IJGO.mjs.map
12564
+ //# sourceMappingURL=chunk-KM44V4EU.mjs.map