@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.
package/dist/index.cjs CHANGED
@@ -6900,13 +6900,25 @@ var EnumRelationResource = /* @__PURE__ */ ((EnumRelationResource22) => {
6900
6900
  })(EnumRelationResource || {});
6901
6901
  var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceType22) => {
6902
6902
  EnumNotificationResourceType22["ADDED_AS_ASSOCIATE_EVENT"] = "added_as_associate_event";
6903
+ EnumNotificationResourceType22["ADDED_AS_ASSOCIATE_PARTNER"] = "added_as_associate_partner";
6903
6904
  EnumNotificationResourceType22["ADDED_AS_ASSOCIATE_VENDOR"] = "added_as_associate_vendor";
6904
6905
  EnumNotificationResourceType22["APPROVED_EVENT"] = "approved_event";
6906
+ EnumNotificationResourceType22["APPROVED_PARTNER"] = "approved_partner";
6905
6907
  EnumNotificationResourceType22["APPROVED_VENDOR"] = "approved_vendor";
6906
6908
  EnumNotificationResourceType22["CREATED_EVENT"] = "created_event";
6909
+ EnumNotificationResourceType22["CREATED_PARTNER"] = "created_partner";
6907
6910
  EnumNotificationResourceType22["CREATED_VENDOR"] = "created_vendor";
6911
+ EnumNotificationResourceType22["DEACTIVATED_EVENT"] = "deactivated_event";
6912
+ EnumNotificationResourceType22["DEACTIVATED_PARTNER"] = "deactivated_partner";
6913
+ EnumNotificationResourceType22["DEACTIVATED_VENDOR"] = "deactivated_vendor";
6914
+ EnumNotificationResourceType22["DECLINED_EVENT"] = "declined_event";
6915
+ EnumNotificationResourceType22["DECLINED_PARTNER"] = "declined_partner";
6916
+ EnumNotificationResourceType22["DECLINED_VENDOR"] = "declined_vendor";
6908
6917
  EnumNotificationResourceType22["EVENT_INVITE_VENDOR"] = "event_invite_vendor";
6909
6918
  EnumNotificationResourceType22["EVENT_STARTING_SOON"] = "event_starting_soon";
6919
+ EnumNotificationResourceType22["EXPIRATION_REMINDER_EVENT"] = "expiration_reminder_event";
6920
+ EnumNotificationResourceType22["EXPIRATION_REMINDER_PARTNER"] = "expiration_reminder_partner";
6921
+ EnumNotificationResourceType22["EXPIRATION_REMINDER_VENDOR"] = "expiration_reminder_vendor";
6910
6922
  EnumNotificationResourceType22["NEW_CHAT_MESSAGE"] = "new_chat_message";
6911
6923
  EnumNotificationResourceType22["SYSTEM_ALERT"] = "system_alert";
6912
6924
  EnumNotificationResourceType22["VENDOR_APPLICATION_TO_EVENT"] = "vendor_application_to_event";
@@ -8429,6 +8441,7 @@ var USER_FIELDS_FRAGMENT = gql`
8429
8441
  licences {
8430
8442
  ...LicenceFields
8431
8443
  }
8444
+ partner
8432
8445
  platform
8433
8446
  preferredRegion
8434
8447
  refreshToken
@@ -9115,7 +9128,21 @@ var CHAT_MESSAGE_FIELDS_FRAGMENT = gql`
9115
9128
  _id
9116
9129
  content
9117
9130
  createdAt
9131
+ replyToMessageId
9132
+ replyPreview {
9133
+ senderId
9134
+ senderName
9135
+ contentPreview
9136
+ }
9137
+ likedBy {
9138
+ userId
9139
+ createdAt
9140
+ }
9118
9141
  senderId
9142
+ seenBy {
9143
+ userId
9144
+ seenAt
9145
+ }
9119
9146
  updatedAt
9120
9147
  }
9121
9148
  `;
@@ -9189,6 +9216,22 @@ var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = gql`
9189
9216
  removeParticipantFromChat(chatId: $chatId, userId: $userId)
9190
9217
  }
9191
9218
  `;
9219
+ var TOGGLE_CHAT_MESSAGE_LIKE_MUTATION = gql`
9220
+ mutation toggleChatMessageLike($chatId: ID!, $messageId: ID!) {
9221
+ toggleChatMessageLike(chatId: $chatId, messageId: $messageId) {
9222
+ ...ChatFields
9223
+ }
9224
+ }
9225
+ ${CHAT_FIELDS_FRAGMENT}
9226
+ `;
9227
+ var MARK_CHAT_MESSAGES_SEEN_MUTATION = gql`
9228
+ mutation markChatMessagesSeen($chatId: ID!, $messageIds: [ID!]!) {
9229
+ markChatMessagesSeen(chatId: $chatId, messageIds: $messageIds) {
9230
+ ...ChatFields
9231
+ }
9232
+ }
9233
+ ${CHAT_FIELDS_FRAGMENT}
9234
+ `;
9192
9235
  var GET_CHAT_MESSAGE = gql`
9193
9236
  subscription {
9194
9237
  getChatMessage {
@@ -11271,9 +11314,54 @@ var AdModel = import_mongoose4.default.models.Ad || import_mongoose4.default.mod
11271
11314
  // src/mongoose/Chat.ts
11272
11315
  var import_mongoose5 = __toESM(require("mongoose"));
11273
11316
  var MongooseSchema5 = import_mongoose5.default.Schema;
11317
+ var MessageReplyPreviewSchema = new MongooseSchema5(
11318
+ {
11319
+ contentPreview: { required: true, type: String },
11320
+ senderId: {
11321
+ ref: "User",
11322
+ required: true,
11323
+ type: import_mongoose5.default.Schema.Types.ObjectId
11324
+ },
11325
+ senderName: { required: true, type: String }
11326
+ },
11327
+ { _id: false }
11328
+ );
11329
+ var MessageReactionSchema = new MongooseSchema5(
11330
+ {
11331
+ createdAt: { required: true, type: Date },
11332
+ userId: {
11333
+ ref: "User",
11334
+ required: true,
11335
+ type: import_mongoose5.default.Schema.Types.ObjectId
11336
+ }
11337
+ },
11338
+ { _id: false }
11339
+ );
11340
+ var MessageSeenSchema = new MongooseSchema5(
11341
+ {
11342
+ seenAt: { required: true, type: Date },
11343
+ userId: {
11344
+ ref: "User",
11345
+ required: true,
11346
+ type: import_mongoose5.default.Schema.Types.ObjectId
11347
+ }
11348
+ },
11349
+ { _id: false }
11350
+ );
11274
11351
  var MessageSchema = new MongooseSchema5(
11275
11352
  {
11276
11353
  content: { required: true, type: String },
11354
+ likedBy: { default: [], required: false, type: [MessageReactionSchema] },
11355
+ replyPreview: {
11356
+ required: false,
11357
+ type: MessageReplyPreviewSchema
11358
+ },
11359
+ replyToMessageId: {
11360
+ ref: "Chat.messages",
11361
+ required: false,
11362
+ type: import_mongoose5.default.Schema.Types.ObjectId
11363
+ },
11364
+ seenBy: { default: [], required: false, type: [MessageSeenSchema] },
11277
11365
  senderId: {
11278
11366
  ref: "User",
11279
11367
  required: true,
@@ -11443,7 +11531,7 @@ schema4.index({ isRead: 1, userId: 1 });
11443
11531
  schema4.index({ createdAt: -1, userId: 1 });
11444
11532
  var NotificationModel = import_mongoose7.default.models.Notification || import_mongoose7.default.model("Notification", schema4);
11445
11533
 
11446
- // node_modules/@timardex/cluemart-shared/dist/chunk-FLDXD65Z.mjs
11534
+ // node_modules/@timardex/cluemart-shared/dist/chunk-R5HMLIJS.mjs
11447
11535
  var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
11448
11536
  EnumOSPlatform22["ANDROID"] = "android";
11449
11537
  EnumOSPlatform22["IOS"] = "ios";