@timardex/cluemart-server-shared 1.0.149 → 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.
@@ -1686,7 +1686,6 @@ __export(mongoose_exports, {
1686
1686
  GoogleImportedMarketModel: () => GoogleImportedMarketModel,
1687
1687
  NotificationModel: () => NotificationModel,
1688
1688
  OwnerTypeSchema: () => OwnerTypeSchema,
1689
- ParticipantSchema: () => ParticipantSchema,
1690
1689
  PartnerModel: () => PartnerModel,
1691
1690
  PostModel: () => PostModel,
1692
1691
  PushTokenModel: () => PushTokenModel,
@@ -9039,6 +9038,7 @@ var CHAT_MESSAGE_FIELDS_FRAGMENT = gql`
9039
9038
  var CHAT_PARTICIPANT = gql`
9040
9039
  fragment ChatParticipantFields on ChatParticipantType {
9041
9040
  active
9041
+ isAssociate
9042
9042
  userAvatar
9043
9043
  userEmail
9044
9044
  userId
@@ -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
 
@@ -11233,6 +11277,7 @@ var MessageSchema = new MongooseSchema2(
11233
11277
  var ParticipantSchema = new MongooseSchema2(
11234
11278
  {
11235
11279
  active: { default: true, required: true, type: Boolean },
11280
+ isAssociate: { default: null, required: false, type: Boolean },
11236
11281
  userAvatar: { required: false, type: String },
11237
11282
  userEmail: { required: true, type: String },
11238
11283
  userId: {
@@ -12351,6 +12396,9 @@ var AppSettingSchema = new MongooseSchema18(
12351
12396
  var AppSettingModel = import_mongoose18.default.models.AppSetting || import_mongoose18.default.model("AppSetting", AppSettingSchema);
12352
12397
 
12353
12398
  // src/mongoose/game/Game.ts
12399
+ var import_mongoose22 = __toESM(require("mongoose"));
12400
+
12401
+ // src/mongoose/game/DailyClue.ts
12354
12402
  var import_mongoose20 = __toESM(require("mongoose"));
12355
12403
 
12356
12404
  // src/mongoose/game/utils.ts
@@ -12363,7 +12411,10 @@ var schemaGameDate = new MongooseSchema19(
12363
12411
  },
12364
12412
  { _id: false }
12365
12413
  );
12366
- var schemaLetters = new MongooseSchema19(
12414
+
12415
+ // src/mongoose/game/DailyClue.ts
12416
+ var MongooseSchema20 = import_mongoose20.default.Schema;
12417
+ var schemaLetters = new MongooseSchema20(
12367
12418
  {
12368
12419
  collected: { required: false, type: [String] },
12369
12420
  solutionShuffled: { required: true, type: [String] }
@@ -12371,14 +12422,14 @@ var schemaLetters = new MongooseSchema19(
12371
12422
  },
12372
12423
  { _id: false }
12373
12424
  );
12374
- var schemaDailyClueBaseGame = new MongooseSchema19(
12425
+ var schemaDailyClueBaseGame = new MongooseSchema20(
12375
12426
  {
12376
12427
  gameDate: { required: true, type: schemaGameDate },
12377
12428
  gameSolution: { required: true, type: String }
12378
12429
  },
12379
12430
  { _id: false }
12380
12431
  );
12381
- var schemaDailyClueGameData = new MongooseSchema19(
12432
+ var schemaDailyClueGameData = new MongooseSchema20(
12382
12433
  {
12383
12434
  gameFields: { required: true, type: schemaDailyClueBaseGame },
12384
12435
  lastFoundDate: { default: null, required: false, type: Date },
@@ -12392,10 +12443,49 @@ var schemaDailyClueGameData = new MongooseSchema19(
12392
12443
  { _id: false }
12393
12444
  );
12394
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
+
12395
12484
  // src/mongoose/game/Game.ts
12396
- var MongooseSchema20 = import_mongoose20.default.Schema;
12485
+ var MongooseSchema22 = import_mongoose22.default.Schema;
12397
12486
  var gameDataSchemas = {
12398
- [EnumGameType.DAILY_CLUE]: schemaDailyClueGameData
12487
+ [EnumGameType.DAILY_CLUE]: schemaDailyClueGameData,
12488
+ [EnumGameType.MINI_QUIZ]: schemaMiniQuizGameData
12399
12489
  };
12400
12490
  var gameDataDefinition = Object.fromEntries(
12401
12491
  Object.entries(gameDataSchemas).map(([key, schema16]) => [
@@ -12403,7 +12493,7 @@ var gameDataDefinition = Object.fromEntries(
12403
12493
  { default: null, required: false, type: schema16 }
12404
12494
  ])
12405
12495
  );
12406
- var gameHistorySchema = new MongooseSchema20(
12496
+ var gameHistorySchema = new MongooseSchema22(
12407
12497
  {
12408
12498
  createdAt: { required: true, type: Date },
12409
12499
  gameDate: { required: true, type: schemaGameDate },
@@ -12421,7 +12511,7 @@ var gameHistorySchema = new MongooseSchema20(
12421
12511
  },
12422
12512
  { _id: false }
12423
12513
  );
12424
- var gameTypeSchema = new MongooseSchema20(
12514
+ var gameTypeSchema = new MongooseSchema22(
12425
12515
  {
12426
12516
  active: { default: true, required: true, type: Boolean },
12427
12517
  gameData: gameDataDefinition,
@@ -12434,7 +12524,7 @@ var gameTypeSchema = new MongooseSchema20(
12434
12524
  },
12435
12525
  { timestamps: true }
12436
12526
  );
12437
- var schema14 = new MongooseSchema20(
12527
+ var schema14 = new MongooseSchema22(
12438
12528
  {
12439
12529
  active: { default: false, required: true, type: Boolean },
12440
12530
  deletedAt: { default: null, required: false, type: Date },
@@ -12447,12 +12537,12 @@ var schema14 = new MongooseSchema20(
12447
12537
  },
12448
12538
  { timestamps: true }
12449
12539
  );
12450
- 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);
12451
12541
 
12452
12542
  // src/mongoose/School.ts
12453
- var import_mongoose21 = __toESM(require("mongoose"));
12454
- var MongooseSchema21 = import_mongoose21.default.Schema;
12455
- var schema15 = new MongooseSchema21(
12543
+ var import_mongoose23 = __toESM(require("mongoose"));
12544
+ var MongooseSchema23 = import_mongoose23.default.Schema;
12545
+ var schema15 = new MongooseSchema23(
12456
12546
  {
12457
12547
  // New schools are active by default
12458
12548
  active: { default: true, required: true, type: Boolean },
@@ -12477,7 +12567,7 @@ var schema15 = new MongooseSchema21(
12477
12567
  },
12478
12568
  { timestamps: true }
12479
12569
  );
12480
- 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);
12481
12571
  // Annotate the CommonJS export names for ESM import in node:
12482
12572
  0 && (module.exports = {
12483
12573
  APP_SETTINGS_ID,
@@ -12493,7 +12583,6 @@ var SchoolModel = import_mongoose21.default.models.School || import_mongoose21.d
12493
12583
  GoogleImportedMarketModel,
12494
12584
  NotificationModel,
12495
12585
  OwnerTypeSchema,
12496
- ParticipantSchema,
12497
12586
  PartnerModel,
12498
12587
  PostModel,
12499
12588
  PushTokenModel,