@timardex/cluemart-server-shared 1.0.156 → 1.0.158

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.
package/dist/index.mjs CHANGED
@@ -9985,6 +9985,12 @@ var MINI_QUIZ_QUESTION_FIELDS_FRAGMENT = gql`
9985
9985
  }
9986
9986
  ${MINI_QUIZ_ANSWER_FIELDS_FRAGMENT}
9987
9987
  `;
9988
+ var MINI_QUIZ_ANSWERED_QUESTION_FIELDS_FRAGMENT = gql`
9989
+ fragment MiniQuizAnsweredQuestionFields on MiniQuizAnsweredQuestionType {
9990
+ questionId
9991
+ selectedAnswerId
9992
+ }
9993
+ `;
9988
9994
  var MINI_QUIZ_BASE_GAME_FIELDS_FRAGMENT = gql`
9989
9995
  fragment MiniQuizBaseGameFields on MiniQuizBaseGameType {
9990
9996
  questions {
@@ -9998,14 +10004,14 @@ var MINI_QUIZ_GAME_DATA_FIELDS_FRAGMENT = gql`
9998
10004
  gameFields {
9999
10005
  ...MiniQuizBaseGameFields
10000
10006
  }
10001
- quizInfo {
10002
- ...MiniQuizQuestionFields
10007
+ answeredQuestions {
10008
+ ...MiniQuizAnsweredQuestionFields
10003
10009
  }
10004
10010
  points
10005
10011
  streak
10006
10012
  }
10007
10013
  ${MINI_QUIZ_BASE_GAME_FIELDS_FRAGMENT}
10008
- ${MINI_QUIZ_QUESTION_FIELDS_FRAGMENT}
10014
+ ${MINI_QUIZ_ANSWERED_QUESTION_FIELDS_FRAGMENT}
10009
10015
  `;
10010
10016
  var GAME_HISTORY_FIELDS_FRAGMENT = gql`
10011
10017
  fragment GameHistoryFields on GameHistoryType {
@@ -10043,6 +10049,7 @@ var GAME_FIELDS_FRAGMENT = gql`
10043
10049
  ...GameHistoryFields
10044
10050
  }
10045
10051
  gameType
10052
+ gameTypeId
10046
10053
  updatedAt
10047
10054
  }
10048
10055
  ${GAME_DATA_FIELDS_FRAGMENT}
@@ -10099,6 +10106,7 @@ var GET_GAME_LEADERBOARD = gql`
10099
10106
  `;
10100
10107
  var BASE_GAME_FIELDS_FRAGMENT = gql`
10101
10108
  fragment BaseGameFields on BaseGameType {
10109
+ gameTypeId
10102
10110
  gameType
10103
10111
  dailyClue {
10104
10112
  ...DailyClueBaseGameFields
@@ -10278,9 +10286,9 @@ var UPDATE_DAILY_CLUE_MUTATION = gql`
10278
10286
  var UPDATE_MINI_QUIZ_MUTATION = gql`
10279
10287
  mutation updateMiniQuizGame(
10280
10288
  $_id: ID!
10281
- $questions: [MiniQuizQuestionInputType!]!
10289
+ $answeredQuestions: [MiniQuizAnsweredQuestionInputType!]!
10282
10290
  ) {
10283
- updateMiniQuizGame(_id: $_id, questions: $questions) {
10291
+ updateMiniQuizGame(_id: $_id, answeredQuestions: $answeredQuestions) {
10284
10292
  ...GameDocFields
10285
10293
  }
10286
10294
  }
@@ -12434,15 +12442,22 @@ var schemaMiniQuizBaseGame = new MongooseSchema21(
12434
12442
  },
12435
12443
  { _id: false }
12436
12444
  );
12445
+ var schemaMiniQuizAnsweredQuestion = new MongooseSchema21(
12446
+ {
12447
+ questionId: { required: true, type: String },
12448
+ selectedAnswerId: { required: true, type: String }
12449
+ },
12450
+ { _id: false }
12451
+ );
12437
12452
  var schemaMiniQuizGameData = new MongooseSchema21(
12438
12453
  {
12439
- gameFields: { required: true, type: schemaMiniQuizBaseGame },
12440
- points: { default: 0, required: true, type: Number },
12441
- quizInfo: {
12454
+ answeredQuestions: {
12442
12455
  default: null,
12443
12456
  required: false,
12444
- type: [schemaMiniQuizQuestion]
12457
+ type: [schemaMiniQuizAnsweredQuestion]
12445
12458
  },
12459
+ gameFields: { required: true, type: schemaMiniQuizBaseGame },
12460
+ points: { default: 0, required: true, type: Number },
12446
12461
  streak: { default: 0, required: true, type: Number }
12447
12462
  },
12448
12463
  { _id: false }
@@ -12487,7 +12502,8 @@ var gameTypeSchema = new MongooseSchema22(
12487
12502
  enum: Object.values(EnumGameType),
12488
12503
  required: true,
12489
12504
  type: String
12490
- }
12505
+ },
12506
+ gameTypeId: { required: true, type: String }
12491
12507
  },
12492
12508
  { timestamps: true }
12493
12509
  );