@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.
- package/dist/{Chat-G9w7Bdl9.d.mts → Chat-Ctmtatmi.d.mts} +1 -12
- package/dist/{Chat-G9w7Bdl9.d.ts → Chat-Ctmtatmi.d.ts} +1 -12
- package/dist/{chunk-XT6SQI4D.mjs → chunk-QVELNUI7.mjs} +106 -15
- package/dist/chunk-QVELNUI7.mjs.map +1 -0
- package/dist/index.cjs +213 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1 -12
- package/dist/index.d.ts +1 -12
- package/dist/index.mjs +213 -52
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +104 -15
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +2 -2
- package/dist/mongoose/index.d.ts +2 -2
- package/dist/mongoose/index.mjs +1 -3
- package/dist/service/index.cjs +209 -47
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.d.mts +1 -1
- package/dist/service/index.d.ts +1 -1
- package/dist/service/index.mjs +108 -35
- package/dist/service/index.mjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/dist/chunk-XT6SQI4D.mjs.map +0 -1
|
@@ -74,17 +74,6 @@ type SchemaChatType = Omit<ChatType, "participants" | "messages"> & {
|
|
|
74
74
|
participants: SchemaParticipantType[];
|
|
75
75
|
messages: SchemaChatMessageType[];
|
|
76
76
|
};
|
|
77
|
-
declare const ParticipantSchema: mongoose.Schema<SchemaParticipantType, mongoose.Model<SchemaParticipantType, any, any, any, mongoose.Document<unknown, any, SchemaParticipantType, any, {}> & Omit<ParticipantType, "userId"> & {
|
|
78
|
-
userId: ObjectId;
|
|
79
|
-
} & {
|
|
80
|
-
_id: mongoose.Types.ObjectId;
|
|
81
|
-
} & {
|
|
82
|
-
__v: number;
|
|
83
|
-
}, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, SchemaParticipantType, mongoose.Document<unknown, {}, mongoose.FlatRecord<SchemaParticipantType>, {}, mongoose.ResolveSchemaOptions<mongoose.DefaultSchemaOptions>> & mongoose.FlatRecord<SchemaParticipantType> & {
|
|
84
|
-
_id: mongoose.Types.ObjectId;
|
|
85
|
-
} & {
|
|
86
|
-
__v: number;
|
|
87
|
-
}>;
|
|
88
77
|
declare const ChatModel: mongoose.Model<SchemaChatType, {}, {}, {}, mongoose.Document<unknown, {}, SchemaChatType, {}, {}> & Omit<ChatType, "participants" | "messages"> & {
|
|
89
78
|
participants: SchemaParticipantType[];
|
|
90
79
|
messages: SchemaChatMessageType[];
|
|
@@ -94,4 +83,4 @@ declare const ChatModel: mongoose.Model<SchemaChatType, {}, {}, {}, mongoose.Doc
|
|
|
94
83
|
__v: number;
|
|
95
84
|
}, any>;
|
|
96
85
|
|
|
97
|
-
export { type AuthUser as A, ChatModel as C, EnumPubSubEvents as E, type GraphQLContext as G, NotificationModel as N, type ObjectId as O,
|
|
86
|
+
export { type AuthUser as A, ChatModel as C, EnumPubSubEvents as E, type GraphQLContext as G, NotificationModel as N, type ObjectId as O, type SchemaChatMessageReplyPreviewType as S, type SchemaChatMessageReactionType as a, type SchemaChatMessageSeenType as b, type SchemaChatMessageType as c, type SchemaParticipantType as d, type SchemaChatType as e, type SchemaCreateBulkNotificationInput as f, type SchemaNotificationType as g, type SubscriptionPayload as h };
|
|
@@ -74,17 +74,6 @@ type SchemaChatType = Omit<ChatType, "participants" | "messages"> & {
|
|
|
74
74
|
participants: SchemaParticipantType[];
|
|
75
75
|
messages: SchemaChatMessageType[];
|
|
76
76
|
};
|
|
77
|
-
declare const ParticipantSchema: mongoose.Schema<SchemaParticipantType, mongoose.Model<SchemaParticipantType, any, any, any, mongoose.Document<unknown, any, SchemaParticipantType, any, {}> & Omit<ParticipantType, "userId"> & {
|
|
78
|
-
userId: ObjectId;
|
|
79
|
-
} & {
|
|
80
|
-
_id: mongoose.Types.ObjectId;
|
|
81
|
-
} & {
|
|
82
|
-
__v: number;
|
|
83
|
-
}, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, SchemaParticipantType, mongoose.Document<unknown, {}, mongoose.FlatRecord<SchemaParticipantType>, {}, mongoose.ResolveSchemaOptions<mongoose.DefaultSchemaOptions>> & mongoose.FlatRecord<SchemaParticipantType> & {
|
|
84
|
-
_id: mongoose.Types.ObjectId;
|
|
85
|
-
} & {
|
|
86
|
-
__v: number;
|
|
87
|
-
}>;
|
|
88
77
|
declare const ChatModel: mongoose.Model<SchemaChatType, {}, {}, {}, mongoose.Document<unknown, {}, SchemaChatType, {}, {}> & Omit<ChatType, "participants" | "messages"> & {
|
|
89
78
|
participants: SchemaParticipantType[];
|
|
90
79
|
messages: SchemaChatMessageType[];
|
|
@@ -94,4 +83,4 @@ declare const ChatModel: mongoose.Model<SchemaChatType, {}, {}, {}, mongoose.Doc
|
|
|
94
83
|
__v: number;
|
|
95
84
|
}, any>;
|
|
96
85
|
|
|
97
|
-
export { type AuthUser as A, ChatModel as C, EnumPubSubEvents as E, type GraphQLContext as G, NotificationModel as N, type ObjectId as O,
|
|
86
|
+
export { type AuthUser as A, ChatModel as C, EnumPubSubEvents as E, type GraphQLContext as G, NotificationModel as N, type ObjectId as O, type SchemaChatMessageReplyPreviewType as S, type SchemaChatMessageReactionType as a, type SchemaChatMessageSeenType as b, type SchemaChatMessageType as c, type SchemaParticipantType as d, type SchemaChatType as e, type SchemaCreateBulkNotificationInput as f, type SchemaNotificationType as g, type SubscriptionPayload as h };
|
|
@@ -8968,6 +8968,7 @@ var CHAT_MESSAGE_FIELDS_FRAGMENT = gql`
|
|
|
8968
8968
|
var CHAT_PARTICIPANT = gql`
|
|
8969
8969
|
fragment ChatParticipantFields on ChatParticipantType {
|
|
8970
8970
|
active
|
|
8971
|
+
isAssociate
|
|
8971
8972
|
userAvatar
|
|
8972
8973
|
userEmail
|
|
8973
8974
|
userId
|
|
@@ -9946,6 +9947,41 @@ var DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT = gql`
|
|
|
9946
9947
|
}
|
|
9947
9948
|
${DAILY_CLUE_BASE_GAME_FIELDS_FRAGMENT}
|
|
9948
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
|
+
`;
|
|
9949
9985
|
var GAME_HISTORY_FIELDS_FRAGMENT = gql`
|
|
9950
9986
|
fragment GameHistoryFields on GameHistoryType {
|
|
9951
9987
|
createdAt
|
|
@@ -9963,8 +9999,12 @@ var GAME_DATA_FIELDS_FRAGMENT = gql`
|
|
|
9963
9999
|
dailyClue {
|
|
9964
10000
|
...DailyClueGameDataFields
|
|
9965
10001
|
}
|
|
10002
|
+
miniQuiz {
|
|
10003
|
+
...MiniQuizGameDataFields
|
|
10004
|
+
}
|
|
9966
10005
|
}
|
|
9967
10006
|
${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}
|
|
10007
|
+
${MINI_QUIZ_GAME_DATA_FIELDS_FRAGMENT}
|
|
9968
10008
|
`;
|
|
9969
10009
|
var GAME_FIELDS_FRAGMENT = gql`
|
|
9970
10010
|
fragment GameFields on GameType {
|
|
@@ -10038,8 +10078,12 @@ var BASE_GAME_FIELDS_FRAGMENT = gql`
|
|
|
10038
10078
|
dailyClue {
|
|
10039
10079
|
...DailyClueBaseGameFields
|
|
10040
10080
|
}
|
|
10081
|
+
miniQuiz {
|
|
10082
|
+
...MiniQuizBaseGameFields
|
|
10083
|
+
}
|
|
10041
10084
|
}
|
|
10042
10085
|
${DAILY_CLUE_BASE_GAME_FIELDS_FRAGMENT}
|
|
10086
|
+
${MINI_QUIZ_BASE_GAME_FIELDS_FRAGMENT}
|
|
10043
10087
|
`;
|
|
10044
10088
|
var POST_CONTENT_DATA_FIELDS_FRAGMENT = gql`
|
|
10045
10089
|
fragment PostContentDataFields on PostContentData {
|
|
@@ -11036,6 +11080,7 @@ var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
|
|
|
11036
11080
|
})(EnumGameStatus || {});
|
|
11037
11081
|
var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
|
|
11038
11082
|
EnumGameType2["DAILY_CLUE"] = "dailyClue";
|
|
11083
|
+
EnumGameType2["MINI_QUIZ"] = "miniQuiz";
|
|
11039
11084
|
return EnumGameType2;
|
|
11040
11085
|
})(EnumGameType || {});
|
|
11041
11086
|
|
|
@@ -11162,6 +11207,7 @@ var MessageSchema = new MongooseSchema2(
|
|
|
11162
11207
|
var ParticipantSchema = new MongooseSchema2(
|
|
11163
11208
|
{
|
|
11164
11209
|
active: { default: true, required: true, type: Boolean },
|
|
11210
|
+
isAssociate: { default: null, required: false, type: Boolean },
|
|
11165
11211
|
userAvatar: { required: false, type: String },
|
|
11166
11212
|
userEmail: { required: true, type: String },
|
|
11167
11213
|
userId: {
|
|
@@ -12280,6 +12326,9 @@ var AppSettingSchema = new MongooseSchema18(
|
|
|
12280
12326
|
var AppSettingModel = mongoose18.models.AppSetting || mongoose18.model("AppSetting", AppSettingSchema);
|
|
12281
12327
|
|
|
12282
12328
|
// src/mongoose/game/Game.ts
|
|
12329
|
+
import mongoose22 from "mongoose";
|
|
12330
|
+
|
|
12331
|
+
// src/mongoose/game/DailyClue.ts
|
|
12283
12332
|
import mongoose20 from "mongoose";
|
|
12284
12333
|
|
|
12285
12334
|
// src/mongoose/game/utils.ts
|
|
@@ -12292,7 +12341,10 @@ var schemaGameDate = new MongooseSchema19(
|
|
|
12292
12341
|
},
|
|
12293
12342
|
{ _id: false }
|
|
12294
12343
|
);
|
|
12295
|
-
|
|
12344
|
+
|
|
12345
|
+
// src/mongoose/game/DailyClue.ts
|
|
12346
|
+
var MongooseSchema20 = mongoose20.Schema;
|
|
12347
|
+
var schemaLetters = new MongooseSchema20(
|
|
12296
12348
|
{
|
|
12297
12349
|
collected: { required: false, type: [String] },
|
|
12298
12350
|
solutionShuffled: { required: true, type: [String] }
|
|
@@ -12300,14 +12352,14 @@ var schemaLetters = new MongooseSchema19(
|
|
|
12300
12352
|
},
|
|
12301
12353
|
{ _id: false }
|
|
12302
12354
|
);
|
|
12303
|
-
var schemaDailyClueBaseGame = new
|
|
12355
|
+
var schemaDailyClueBaseGame = new MongooseSchema20(
|
|
12304
12356
|
{
|
|
12305
12357
|
gameDate: { required: true, type: schemaGameDate },
|
|
12306
12358
|
gameSolution: { required: true, type: String }
|
|
12307
12359
|
},
|
|
12308
12360
|
{ _id: false }
|
|
12309
12361
|
);
|
|
12310
|
-
var schemaDailyClueGameData = new
|
|
12362
|
+
var schemaDailyClueGameData = new MongooseSchema20(
|
|
12311
12363
|
{
|
|
12312
12364
|
gameFields: { required: true, type: schemaDailyClueBaseGame },
|
|
12313
12365
|
lastFoundDate: { default: null, required: false, type: Date },
|
|
@@ -12321,10 +12373,49 @@ var schemaDailyClueGameData = new MongooseSchema19(
|
|
|
12321
12373
|
{ _id: false }
|
|
12322
12374
|
);
|
|
12323
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
|
+
|
|
12324
12414
|
// src/mongoose/game/Game.ts
|
|
12325
|
-
var
|
|
12415
|
+
var MongooseSchema22 = mongoose22.Schema;
|
|
12326
12416
|
var gameDataSchemas = {
|
|
12327
|
-
[EnumGameType.DAILY_CLUE]: schemaDailyClueGameData
|
|
12417
|
+
[EnumGameType.DAILY_CLUE]: schemaDailyClueGameData,
|
|
12418
|
+
[EnumGameType.MINI_QUIZ]: schemaMiniQuizGameData
|
|
12328
12419
|
};
|
|
12329
12420
|
var gameDataDefinition = Object.fromEntries(
|
|
12330
12421
|
Object.entries(gameDataSchemas).map(([key, schema16]) => [
|
|
@@ -12332,7 +12423,7 @@ var gameDataDefinition = Object.fromEntries(
|
|
|
12332
12423
|
{ default: null, required: false, type: schema16 }
|
|
12333
12424
|
])
|
|
12334
12425
|
);
|
|
12335
|
-
var gameHistorySchema = new
|
|
12426
|
+
var gameHistorySchema = new MongooseSchema22(
|
|
12336
12427
|
{
|
|
12337
12428
|
createdAt: { required: true, type: Date },
|
|
12338
12429
|
gameDate: { required: true, type: schemaGameDate },
|
|
@@ -12350,7 +12441,7 @@ var gameHistorySchema = new MongooseSchema20(
|
|
|
12350
12441
|
},
|
|
12351
12442
|
{ _id: false }
|
|
12352
12443
|
);
|
|
12353
|
-
var gameTypeSchema = new
|
|
12444
|
+
var gameTypeSchema = new MongooseSchema22(
|
|
12354
12445
|
{
|
|
12355
12446
|
active: { default: true, required: true, type: Boolean },
|
|
12356
12447
|
gameData: gameDataDefinition,
|
|
@@ -12363,7 +12454,7 @@ var gameTypeSchema = new MongooseSchema20(
|
|
|
12363
12454
|
},
|
|
12364
12455
|
{ timestamps: true }
|
|
12365
12456
|
);
|
|
12366
|
-
var schema14 = new
|
|
12457
|
+
var schema14 = new MongooseSchema22(
|
|
12367
12458
|
{
|
|
12368
12459
|
active: { default: false, required: true, type: Boolean },
|
|
12369
12460
|
deletedAt: { default: null, required: false, type: Date },
|
|
@@ -12376,12 +12467,12 @@ var schema14 = new MongooseSchema20(
|
|
|
12376
12467
|
},
|
|
12377
12468
|
{ timestamps: true }
|
|
12378
12469
|
);
|
|
12379
|
-
var GameModel =
|
|
12470
|
+
var GameModel = mongoose22.models.Game || mongoose22.model("Game", schema14);
|
|
12380
12471
|
|
|
12381
12472
|
// src/mongoose/School.ts
|
|
12382
|
-
import
|
|
12383
|
-
var
|
|
12384
|
-
var schema15 = new
|
|
12473
|
+
import mongoose23 from "mongoose";
|
|
12474
|
+
var MongooseSchema23 = mongoose23.Schema;
|
|
12475
|
+
var schema15 = new MongooseSchema23(
|
|
12385
12476
|
{
|
|
12386
12477
|
// New schools are active by default
|
|
12387
12478
|
active: { default: true, required: true, type: Boolean },
|
|
@@ -12406,14 +12497,14 @@ var schema15 = new MongooseSchema21(
|
|
|
12406
12497
|
},
|
|
12407
12498
|
{ timestamps: true }
|
|
12408
12499
|
);
|
|
12409
|
-
var SchoolModel =
|
|
12500
|
+
var SchoolModel = mongoose23.models.School || mongoose23.model("School", schema15);
|
|
12410
12501
|
|
|
12411
12502
|
export {
|
|
12503
|
+
EnumChatType,
|
|
12412
12504
|
EnumResourceType,
|
|
12413
12505
|
EnumUserLicence,
|
|
12414
12506
|
EnumAdStatus,
|
|
12415
12507
|
AdModel,
|
|
12416
|
-
ParticipantSchema,
|
|
12417
12508
|
ChatModel,
|
|
12418
12509
|
ChatReportModel,
|
|
12419
12510
|
StallTypeSchema,
|
|
@@ -12475,4 +12566,4 @@ react/cjs/react.development.js:
|
|
|
12475
12566
|
* LICENSE file in the root directory of this source tree.
|
|
12476
12567
|
*)
|
|
12477
12568
|
*/
|
|
12478
|
-
//# sourceMappingURL=chunk-
|
|
12569
|
+
//# sourceMappingURL=chunk-QVELNUI7.mjs.map
|