@timardex/cluemart-server-shared 1.0.161 → 1.0.163

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
@@ -1718,6 +1718,7 @@ __export(index_exports, {
1718
1718
  sendPushNotifications: () => sendPushNotifications,
1719
1719
  termsAgreementSchema: () => termsAgreementSchema,
1720
1720
  updateAdStatuses: () => updateAdStatuses,
1721
+ updateRelationDatesToUnavailable: () => updateRelationDatesToUnavailable,
1721
1722
  updateVendorBasedOnUserLicense: () => updateVendorBasedOnUserLicense,
1722
1723
  userLicenseSchema: () => userLicenseSchema
1723
1724
  });
@@ -12331,7 +12332,8 @@ var schema11 = new MongooseSchema15(
12331
12332
  required: false,
12332
12333
  type: [resourceRelationsSchema]
12333
12334
  },
12334
- tags: { required: true, type: [String] }
12335
+ tags: { required: true, type: [String] },
12336
+ unregisteredVendorIds: { default: [], required: false, type: [String] }
12335
12337
  },
12336
12338
  { timestamps: true }
12337
12339
  );
@@ -13011,6 +13013,19 @@ async function findEventOrImportedMarketById(resourceId) {
13011
13013
  return eventDoc ?? googleImportedDoc;
13012
13014
  }
13013
13015
 
13016
+ // src/service/relations.ts
13017
+ function updateRelationDatesToUnavailable(relationDates, eventDateTime) {
13018
+ return relationDates.map((relationDate) => {
13019
+ const existsInEvent = eventDateTime?.some(
13020
+ (dt) => dt.startDate === relationDate.dateTime.startDate && dt.startTime === relationDate.dateTime.startTime
13021
+ ) ?? false;
13022
+ return {
13023
+ ...relationDate,
13024
+ status: existsInEvent ? relationDate.status : EnumInviteStatus.UNAVAILABLE
13025
+ };
13026
+ });
13027
+ }
13028
+
13014
13029
  // src/types/index.ts
13015
13030
  var import_express = __toESM(require("express"));
13016
13031
  var import_mongoose31 = __toESM(require("mongoose"));
@@ -13068,6 +13083,7 @@ var EnumPubSubEvents = /* @__PURE__ */ ((EnumPubSubEvents2) => {
13068
13083
  sendPushNotifications,
13069
13084
  termsAgreementSchema,
13070
13085
  updateAdStatuses,
13086
+ updateRelationDatesToUnavailable,
13071
13087
  updateVendorBasedOnUserLicense,
13072
13088
  userLicenseSchema
13073
13089
  });