@timardex/cluemart-server-shared 1.0.77 → 1.0.78

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.
@@ -6893,13 +6893,25 @@ var EnumRelationResource = /* @__PURE__ */ ((EnumRelationResource22) => {
6893
6893
  })(EnumRelationResource || {});
6894
6894
  var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceType22) => {
6895
6895
  EnumNotificationResourceType22["ADDED_AS_ASSOCIATE_EVENT"] = "added_as_associate_event";
6896
+ EnumNotificationResourceType22["ADDED_AS_ASSOCIATE_PARTNER"] = "added_as_associate_partner";
6896
6897
  EnumNotificationResourceType22["ADDED_AS_ASSOCIATE_VENDOR"] = "added_as_associate_vendor";
6897
6898
  EnumNotificationResourceType22["APPROVED_EVENT"] = "approved_event";
6899
+ EnumNotificationResourceType22["APPROVED_PARTNER"] = "approved_partner";
6898
6900
  EnumNotificationResourceType22["APPROVED_VENDOR"] = "approved_vendor";
6899
6901
  EnumNotificationResourceType22["CREATED_EVENT"] = "created_event";
6902
+ EnumNotificationResourceType22["CREATED_PARTNER"] = "created_partner";
6900
6903
  EnumNotificationResourceType22["CREATED_VENDOR"] = "created_vendor";
6904
+ EnumNotificationResourceType22["DEACTIVATED_EVENT"] = "deactivated_event";
6905
+ EnumNotificationResourceType22["DEACTIVATED_PARTNER"] = "deactivated_partner";
6906
+ EnumNotificationResourceType22["DEACTIVATED_VENDOR"] = "deactivated_vendor";
6907
+ EnumNotificationResourceType22["DECLINED_EVENT"] = "declined_event";
6908
+ EnumNotificationResourceType22["DECLINED_PARTNER"] = "declined_partner";
6909
+ EnumNotificationResourceType22["DECLINED_VENDOR"] = "declined_vendor";
6901
6910
  EnumNotificationResourceType22["EVENT_INVITE_VENDOR"] = "event_invite_vendor";
6902
6911
  EnumNotificationResourceType22["EVENT_STARTING_SOON"] = "event_starting_soon";
6912
+ EnumNotificationResourceType22["EXPIRATION_REMINDER_EVENT"] = "expiration_reminder_event";
6913
+ EnumNotificationResourceType22["EXPIRATION_REMINDER_PARTNER"] = "expiration_reminder_partner";
6914
+ EnumNotificationResourceType22["EXPIRATION_REMINDER_VENDOR"] = "expiration_reminder_vendor";
6903
6915
  EnumNotificationResourceType22["NEW_CHAT_MESSAGE"] = "new_chat_message";
6904
6916
  EnumNotificationResourceType22["SYSTEM_ALERT"] = "system_alert";
6905
6917
  EnumNotificationResourceType22["VENDOR_APPLICATION_TO_EVENT"] = "vendor_application_to_event";
@@ -8422,6 +8434,7 @@ var USER_FIELDS_FRAGMENT = gql`
8422
8434
  licences {
8423
8435
  ...LicenceFields
8424
8436
  }
8437
+ partner
8425
8438
  platform
8426
8439
  preferredRegion
8427
8440
  refreshToken
@@ -9108,7 +9121,21 @@ var CHAT_MESSAGE_FIELDS_FRAGMENT = gql`
9108
9121
  _id
9109
9122
  content
9110
9123
  createdAt
9124
+ replyToMessageId
9125
+ replyPreview {
9126
+ senderId
9127
+ senderName
9128
+ contentPreview
9129
+ }
9130
+ likedBy {
9131
+ userId
9132
+ createdAt
9133
+ }
9111
9134
  senderId
9135
+ seenBy {
9136
+ userId
9137
+ seenAt
9138
+ }
9112
9139
  updatedAt
9113
9140
  }
9114
9141
  `;
@@ -9182,6 +9209,22 @@ var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = gql`
9182
9209
  removeParticipantFromChat(chatId: $chatId, userId: $userId)
9183
9210
  }
9184
9211
  `;
9212
+ var TOGGLE_CHAT_MESSAGE_LIKE_MUTATION = gql`
9213
+ mutation toggleChatMessageLike($chatId: ID!, $messageId: ID!) {
9214
+ toggleChatMessageLike(chatId: $chatId, messageId: $messageId) {
9215
+ ...ChatFields
9216
+ }
9217
+ }
9218
+ ${CHAT_FIELDS_FRAGMENT}
9219
+ `;
9220
+ var MARK_CHAT_MESSAGES_SEEN_MUTATION = gql`
9221
+ mutation markChatMessagesSeen($chatId: ID!, $messageIds: [ID!]!) {
9222
+ markChatMessagesSeen(chatId: $chatId, messageIds: $messageIds) {
9223
+ ...ChatFields
9224
+ }
9225
+ }
9226
+ ${CHAT_FIELDS_FRAGMENT}
9227
+ `;
9185
9228
  var GET_CHAT_MESSAGE = gql`
9186
9229
  subscription {
9187
9230
  getChatMessage {
@@ -11264,9 +11307,54 @@ var AdModel = import_mongoose4.default.models.Ad || import_mongoose4.default.mod
11264
11307
  // src/mongoose/Chat.ts
11265
11308
  var import_mongoose5 = __toESM(require("mongoose"));
11266
11309
  var MongooseSchema5 = import_mongoose5.default.Schema;
11310
+ var MessageReplyPreviewSchema = new MongooseSchema5(
11311
+ {
11312
+ contentPreview: { required: true, type: String },
11313
+ senderId: {
11314
+ ref: "User",
11315
+ required: true,
11316
+ type: import_mongoose5.default.Schema.Types.ObjectId
11317
+ },
11318
+ senderName: { required: true, type: String }
11319
+ },
11320
+ { _id: false }
11321
+ );
11322
+ var MessageReactionSchema = new MongooseSchema5(
11323
+ {
11324
+ createdAt: { required: true, type: Date },
11325
+ userId: {
11326
+ ref: "User",
11327
+ required: true,
11328
+ type: import_mongoose5.default.Schema.Types.ObjectId
11329
+ }
11330
+ },
11331
+ { _id: false }
11332
+ );
11333
+ var MessageSeenSchema = new MongooseSchema5(
11334
+ {
11335
+ seenAt: { required: true, type: Date },
11336
+ userId: {
11337
+ ref: "User",
11338
+ required: true,
11339
+ type: import_mongoose5.default.Schema.Types.ObjectId
11340
+ }
11341
+ },
11342
+ { _id: false }
11343
+ );
11267
11344
  var MessageSchema = new MongooseSchema5(
11268
11345
  {
11269
11346
  content: { required: true, type: String },
11347
+ likedBy: { default: [], required: false, type: [MessageReactionSchema] },
11348
+ replyPreview: {
11349
+ required: false,
11350
+ type: MessageReplyPreviewSchema
11351
+ },
11352
+ replyToMessageId: {
11353
+ ref: "Chat.messages",
11354
+ required: false,
11355
+ type: import_mongoose5.default.Schema.Types.ObjectId
11356
+ },
11357
+ seenBy: { default: [], required: false, type: [MessageSeenSchema] },
11270
11358
  senderId: {
11271
11359
  ref: "User",
11272
11360
  required: true,
@@ -11436,7 +11524,7 @@ schema4.index({ isRead: 1, userId: 1 });
11436
11524
  schema4.index({ createdAt: -1, userId: 1 });
11437
11525
  var NotificationModel = import_mongoose7.default.models.Notification || import_mongoose7.default.model("Notification", schema4);
11438
11526
 
11439
- // node_modules/@timardex/cluemart-shared/dist/chunk-FLDXD65Z.mjs
11527
+ // node_modules/@timardex/cluemart-shared/dist/chunk-R5HMLIJS.mjs
11440
11528
  var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
11441
11529
  EnumOSPlatform22["ANDROID"] = "android";
11442
11530
  EnumOSPlatform22["IOS"] = "ios";